BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
RecMdcKalTrack.cxx
Go to the documentation of this file.
1/*
2 *
3 * this class models "Kalman Track" used in Mdc Reconstruction
4 *
5 * ********************************************************/
6
7#include "MdcRecEvent/RecMdcKalTrack.h"
8//#include "MdcRecEvent/MdcKalHelixSeg.h"
9
10#include <cstdio>
11#include <fstream>
12
15{
16 HepVector a(5,0);
17 HepSymMatrix Ea(5,0);
18 HepPoint3D poca(0,0,0);
19 HepPoint3D point(0.,0.,0);
20 HepPoint3D pivot(0.,0.,0);
21
22 m_ta(5,0);
23 m_tEa(5,0);
24 m_trackId = -1;
25
26 pidSeg=4;
27
28 for(int pid=0; pid<5; pid++){
29 m_lhelixs.push_back(a);
30 m_lerrors.push_back(Ea);
31 // m_fhelixs.push_back(a);
32 // m_ferrors.push_back(Ea);
33 m_lpoints.push_back(point);
34 m_lpivots.push_back(pivot);
35
36 m_length[pid] = 0.0;
37 m_tof[pid] = 0.0;
38 m_nhits[pid] = 0;
39 m_pathSM[pid] = 0.0;
40 m_fiTerm[pid] = 0.0;
41 m_stat[0][pid] = -1;
42 m_stat[1][pid] = -1;
43 m_nster[0][pid] = -1;
44 m_nster[1][pid] = -1;
45 m_firstLayer[0][pid] = 0;
46 m_firstLayer[1][pid] = 0;
47 m_lastLayer[0][pid] = 43;
48 m_lastLayer[1][pid] = 43;
49 m_chisq[0][pid] = 999.0;
50 m_chisq[1][pid] = 999.0;
51 m_ndf[0][pid] = 0;
52 m_ndf[1][pid] = 0;
53 }
54 for( int i=0; i<43; i++) {
55 m_pathl[i] = 0.0;
56 }
57 for(int j=0; j<5; j++) {
58 m_thelix[j] = 0.0;
59 }
60 for(int k=0; k<15; k++){
61 m_terror[k]= 0.;
62 }
63}
64
65
68{
69 for(int i=0; i<5; i++) m_vechelixsegs[i]=trk.m_vechelixsegs[i];
70}
71
73:DstMdcKalTrack(dstrk)
74{
75 HepVector a(5,-99);
76 HepSymMatrix Ea(5,-99);
77 HepPoint3D poca(-99.,-99.,-99.);
78 HepPoint3D point(0.,0.,0);
79 HepPoint3D pivot(0.,0.,0);
80
81 m_ta(5,0);
82 m_tEa(5,0);
83
84 //m_trackId = -1;
85 for(int pid=0; pid<5; pid++){
86 //m_pocas.push_back(poca);
87 //m_zhelixs.push_back(a);
88 //m_zerrors.push_back(Ea);
89 m_lhelixs.push_back(a);
90 m_lerrors.push_back(Ea);
91 // m_fhelixs.push_back(a);
92 // m_ferrors.push_back(Ea);
93 m_lpoints.push_back(point);
94 m_lpivots.push_back(pivot);
95
96 m_length[pid] = 0.0;
97 m_tof[pid] = 0.0;
98 m_nhits[pid] = 0;
99 m_pathSM[pid] = 0.0;
100 m_fiTerm[pid] = 0.0;
101
102 m_stat[0][pid] = -1;
103 m_stat[1][pid] = -1;
104 m_nster[0][pid] = -1;
105 m_nster[1][pid] = -1;
106 m_firstLayer[0][pid] = 0;
107 m_firstLayer[1][pid] = 0;
108 m_lastLayer[0][pid] = 43;
109 m_lastLayer[1][pid] = 43;
110 m_chisq[0][pid] = 999.0;
111 m_chisq[1][pid] = 999.0;
112 m_ndf[0][pid] = 0;
113 m_ndf[1][pid] = 0;
114 }
115 for(int i=0; i<43; i++) {
116 m_pathl[i] = 0.0;
117 }
118 for(int j=0; j<5; j++) {
119 m_thelix[j] = 0.0;
120 }
121 for(int k=0; k<15; k++){
122 m_terror[k]= 0.;
123 }
124}
125
127{
128 if( &dstrk != this ){
130 HepVector a(5,0);
131 HepSymMatrix Ea(5,0);
132 HepPoint3D poca(-99.,-99.,-99.);
133 HepPoint3D point(0.,0.,0.);
134 HepPoint3D pivot(0.,0.,0.);
135
136 //m_trackId = -1;
137 //m_pocas.clear();
138 //m_zhelixs.clear();
139 //m_zerrors.clear();
140 m_lhelixs.clear();
141 m_lerrors.clear();
142 // m_fhelixs.clear();
143 // m_ferrors.clear();
144 m_lpoints.clear();
145 m_lpivots.clear();
146 m_ta(5,0) ;
147 m_tEa(5,0);
148 for(int pid=0; pid<5; pid++){
149 //m_pocas.push_back(poca);
150 //m_zhelixs.push_back(a);
151 //m_zerrors.push_back(Ea);
152 m_lhelixs.push_back(a);
153 m_lerrors.push_back(Ea);
154 // m_fhelixs.push_back(a);
155 // m_ferrors.push_back(Ea);
156 m_lpoints.push_back(point);
157
158
159 m_length[pid] = 0.0;
160 m_tof[pid] = 0.0;
161 m_nhits[pid] = 0;
162 m_pathSM[pid] = 0.;
163 m_fiTerm[pid] = 0.;
164 }
165
166 for(int i=0; i<43; i++) {
167 m_pathl[i] = 0.0;
168 }
169 for(int j=0; j<5; j++) {
170 m_thelix[j] = 0.0;
171 }
172 for(int k=0; k<15; k++){
173 m_terror[k]= 0.;
174 }
175 }
176 return *this;
177}
178
179// 2011-05-06
181{
182 if(pid>=0&&pid<5) return m_vechelixsegs[pid];
183 else {
184 return m_vechelixsegs[pidSeg];
185 }
186}
187
188// 2011-05-06
189void RecMdcKalTrack::setVecHelixSegs(const HelixSegRefVec& vechelixsegs, int pid){
190 if(pid>=0&&pid<5) {
191 m_vechelixsegs[pid] = vechelixsegs;
192 pidSeg=pid;
193 }
194 else std::cout<<"RecMdcKalTrack::setVecHelixSegs error, wrong particle id"<<std::endl;
195}
196
198
199}
SmartRefVector< RecMdcKalHelixSeg > HelixSegRefVec
DstMdcKalTrack & operator=(const DstMdcKalTrack &)
RecMdcKalTrack & operator=(const RecMdcKalTrack &)
HelixSegRefVec getVecHelixSegs(int pid=-1) const
void setVecHelixSegs(const HelixSegRefVec &vechelixsegs, int pid=-1)