00001 #ifndef _TrkTables_h_ 00002 #define _TrkTables_h_ 00003 00004 #include <string> 00005 #include <iostream> 00006 #include <vector> 00007 00008 #include "MdcTables/MdcTables.h" 00009 00010 using namespace std; 00011 00012 // 00013 //*** Info. on tracks reconstructed in KalFitter. For each track 5 slots 00014 //*** are allocated to handle different mass hypotheses. 00015 // 00016 class MdcTrk_global; // what is the purpose of this class ??? 00017 class MdcTrk_localz; 00018 class MdcTrk_localf; 00019 class MdcTrk_locall; 00020 class MdcRec_trk; 00021 class MdcTrk { 00022 public: 00023 MdcTrk() :prekal(0) { 00024 for(int i =0; i<5; i++) { 00025 glob[i]=0; 00026 zero[i]=0; 00027 first[i]=0; 00028 last[i]=0; 00029 } 00030 } 00031 00032 MdcTrk(const MdcTrk& rhs) { 00033 for( int i=0; i<5; i++) { 00034 glob[i] = rhs.glob[i]; 00035 zero[i] = rhs.zero[i]; 00036 first[i] = rhs.first[i]; 00037 last[i] = rhs.last[i]; 00038 } 00039 prekal = rhs.prekal; 00040 } 00041 00042 MdcTrk& operator =(const MdcTrk& rhs) { 00043 00044 if(this == &rhs) 00045 return *this; 00046 for( int i=0; i<5; i++) { 00047 glob[i] = rhs.glob[i]; 00048 zero[i] = rhs.zero[i]; 00049 first[i] = rhs.first[i]; 00050 last[i] = rhs.last[i]; 00051 } 00052 prekal = rhs.prekal; 00053 00054 return *this; 00055 } 00056 00057 00058 public: 00059 int id; 00060 MdcTrk_global * glob[5]; 00061 MdcTrk_localz * zero[5]; 00062 MdcTrk_localf * first[5]; 00063 MdcTrk_locall * last[5]; 00064 MdcRec_trk * prekal; 00065 private: 00066 00067 00068 }; 00069 00070 class MdcTrkCol { 00071 public: 00072 static vector<MdcTrk>* getMdcTrkCol(void); 00073 private: 00074 static vector<MdcTrk>* s_col; 00075 }; 00076 00077 // 00078 //*** Track fit results indep. of position. *** 00079 // 00080 class MdcTrk_global { 00081 public: 00082 MdcTrk_global() { 00083 id = 0; 00084 mass = 0.0; 00085 pathl = 0.0; 00086 tof = 0.0; 00087 pathl_rd = 0.0; 00088 pathl_ab = 0.0; 00089 00090 for ( int i=0; i<5; i++ ) { 00091 if( i<2 ) stat[i] = 0; 00092 if( i<3 ) { 00093 chisq[i] = 999; 00094 ndf[i] = 0; 00095 hit[i] = 0; 00096 } 00097 nhits[i] = 0; 00098 } 00099 } 00100 00101 MdcTrk_global(const MdcTrk_global& rhs) { 00102 00103 id = rhs.id; 00104 mass = rhs.mass; 00105 pathl = rhs.pathl; 00106 tof = rhs.tof; 00107 pathl_rd = rhs.pathl_rd; 00108 pathl_ab = rhs.pathl_ab; 00109 00110 for ( int i=0; i<5; i++ ) { 00111 if( i<2 ) stat[i] = rhs.stat[i]; 00112 if( i<3 ) { 00113 chisq[i] = rhs.chisq[i]; 00114 ndf[i] = rhs.ndf[i]; 00115 hit[i] = rhs.hit[i]; 00116 } 00117 nhits[i] = rhs.nhits[i]; 00118 } 00119 } 00120 00121 MdcTrk_global& operator =(const MdcTrk_global& rhs) { 00122 00123 if(this == &rhs) 00124 return *this; 00125 id = rhs.id; 00126 mass = rhs.mass; 00127 pathl = rhs.pathl; 00128 tof = rhs.tof; 00129 pathl_rd = rhs.pathl_rd; 00130 pathl_ab = rhs.pathl_ab; 00131 00132 for ( int i=0; i<5; i++ ) { 00133 if( i<2 ) stat[i] = rhs.stat[i]; 00134 if( i<3 ) { 00135 chisq[i] = rhs.chisq[i]; 00136 ndf[i] = rhs.ndf[i]; 00137 hit[i] = rhs.hit[i]; 00138 } 00139 nhits[i] = rhs.nhits[i]; 00140 } 00141 00142 return *this; 00143 } 00144 00145 public: 00146 int id; 00147 float mass; 00148 float chisq[3]; 00149 int ndf[3]; 00150 float pathl; 00151 float tof; 00152 float pathl_rd; 00153 float pathl_ab; 00154 int stat[2]; 00155 int nhits[5]; 00156 int hit[3]; 00157 }; 00158 00159 class MdcTrkGlobalCol { 00160 public: 00161 static vector<MdcTrk_global>* getMdcTrkGlobalCol(void); 00162 private: 00163 static vector<MdcTrk_global>* s_col; 00164 }; 00165 00166 // 00167 //*** Track fit results at near the coord. origin. *** 00168 // 00169 class MdcTrk_localz { 00170 public: 00171 MdcTrk_localz() {}; 00172 MdcTrk_localz(const MdcTrk_localz& rhs) { 00173 id = rhs.id; 00174 for ( int i=0; i<15; i++ ) { 00175 if( i<3 ) pivot[i] = rhs.pivot[i]; 00176 if( i<5 ) helix[i] = rhs.helix[i]; 00177 error[i] = rhs.error[i]; 00178 } 00179 } 00180 00181 MdcTrk_localz& operator =(const MdcTrk_localz& rhs) { 00182 00183 if(this == &rhs) 00184 return *this; 00185 id = rhs.id; 00186 for ( int i=0; i<15; i++ ) { 00187 if( i<3 ) pivot[i] = rhs.pivot[i]; 00188 if( i<5 ) helix[i] = rhs.helix[i]; 00189 error[i] = rhs.error[i]; 00190 } 00191 00192 return *this; 00193 } 00194 public: 00195 int id; 00196 float pivot[3]; 00197 float helix[5]; 00198 float error[15]; 00199 }; 00200 00201 class MdcTrkLocalzCol { 00202 public: 00203 static vector<MdcTrk_localz>* getMdcTrkLocalzCol(void); 00204 private: 00205 static vector<MdcTrk_localz>* s_col; 00206 }; 00207 00208 // 00209 //*** Track fit results at the first hit point. *** 00210 // 00211 class MdcTrk_localf { 00212 public: 00213 MdcTrk_localf() {}; 00214 MdcTrk_localf(const MdcTrk_localf& rhs) { 00215 id = rhs.id; 00216 for ( int i=0; i<15; i++ ) { 00217 if( i<3 ) pivot[i] = rhs.pivot[i]; 00218 if( i<5 ) helix[i] = rhs.helix[i]; 00219 error[i] = rhs.error[i]; 00220 } 00221 } 00222 00223 MdcTrk_localf& operator =(const MdcTrk_localf& rhs) { 00224 00225 if(this == &rhs) 00226 return *this; 00227 id = rhs.id; 00228 for ( int i=0; i<15; i++ ) { 00229 if( i<3 ) pivot[i] = rhs.pivot[i]; 00230 if( i<5 ) helix[i] = rhs.helix[i]; 00231 error[i] = rhs.error[i]; 00232 } 00233 00234 return *this; 00235 } 00236 public: 00237 int id; 00238 float pivot[3]; 00239 float helix[5]; 00240 float error[15]; 00241 }; 00242 00243 class MdcTrkLocalfCol { 00244 public: 00245 static vector<MdcTrk_localf>* getMdcTrkLocalfCol(void); 00246 private: 00247 static vector<MdcTrk_localf>* s_col; 00248 }; 00249 00250 // 00251 //*** Track fit results at the last hit point. *** 00252 // 00253 class MdcTrk_locall { 00254 public: 00255 MdcTrk_locall() {}; 00256 MdcTrk_locall(const MdcTrk_locall& rhs) { 00257 id = rhs.id; 00258 for ( int i=0; i<15; i++ ) { 00259 if( i<3 ) pivot[i] = rhs.pivot[i]; 00260 if( i<5 ) helix[i] = rhs.helix[i]; 00261 error[i] = rhs.error[i]; 00262 } 00263 } 00264 MdcTrk_locall& operator =(const MdcTrk_locall& rhs) { 00265 00266 if(this == &rhs) 00267 return *this; 00268 id = rhs.id; 00269 for ( int i=0; i<15; i++ ) { 00270 if( i<3 ) pivot[i] = rhs.pivot[i]; 00271 if( i<5 ) helix[i] = rhs.helix[i]; 00272 error[i] = rhs.error[i]; 00273 } 00274 00275 return *this; 00276 } 00277 public: 00278 int id; 00279 float pivot[3]; 00280 float helix[5]; 00281 float error[15]; 00282 }; 00283 00284 class MdcTrkLocallCol { 00285 public: 00286 static vector<MdcTrk_locall>* getMdcTrkLocallCol(void); 00287 private: 00288 static vector<MdcTrk_locall>* s_col; 00289 }; 00290 00291 // 00292 //*** V0 candidates. *** 00293 // 00294 class MdcTrk_v0 { 00295 public: 00296 MdcTrk_v0() {}; 00297 public: 00298 int id; 00299 int kind; 00300 MdcTrk * dau[2]; 00301 float vtx[3]; 00302 float P[5]; 00303 float fl; 00304 float dz; 00305 int type; 00306 }; 00307 00308 class MdcTrkV0Col { 00309 public: 00310 static vector<MdcTrk_v0>* getMdcTrkV0Col(void); 00311 private: 00312 static vector<MdcTrk_v0>* s_col; 00313 }; 00314 00315 // 00316 //*** V0 candidates; V0 info. after vtx-constrained fit*** 00317 // 00318 class MdcTrk_v0_daughters; 00319 class MdcTrk_v02 { 00320 public: 00321 MdcTrk_v02() {}; 00322 public: 00323 int id; 00324 int kind; 00325 MdcTrk * daut[2]; 00326 float P[4]; 00327 float vtx[3]; 00328 float dz; 00329 float chisq; 00330 int type; 00331 MdcTrk_v0_daughters * dau; 00332 }; 00333 00334 class MdcTrkV02Col { 00335 public: 00336 static vector<MdcTrk_v02>* getMdcTrkV02Col(void); 00337 private: 00338 static vector<MdcTrk_v02>* s_col; 00339 }; 00340 00341 // 00342 //*** Track params. and error matrix of V0 daughters before the *** 00343 //*** vtx-constraint fit. They are defined at the V0 vtx-position. *** 00344 // 00345 class MdcTrk_v0_daughters { 00346 public: 00347 MdcTrk_v0_daughters() {}; 00348 public: 00349 int id; 00350 float helix_p[5]; 00351 float helix_m[5]; 00352 float error_p[15]; 00353 float error_m[15]; 00354 }; 00355 00356 class MdcTrkV0DaughtersCol { 00357 public: 00358 static vector<MdcTrk_v0_daughters>* getMdcTrkV0DaughtersCol(void); 00359 private: 00360 static vector<MdcTrk_v0_daughters>* s_col; 00361 }; 00362 00363 // 00364 //*** Path length in MDC for dEdx pid. *** 00365 // 00366 class MdcTrk_pathl { 00367 public: 00368 MdcTrk_pathl():trk(0) {}; 00369 MdcTrk_pathl& operator=( MdcTrk_pathl& rhs) { 00370 id = rhs.id; 00371 layer = rhs.layer; 00372 trk = rhs.trk; 00373 xin = rhs.xin; 00374 yin = rhs.yin; 00375 zin = rhs.zin; 00376 xout = rhs.xout; 00377 yout = rhs.yout; 00378 zout = rhs.zout; 00379 pathl = rhs.pathl; 00380 px = rhs.px; 00381 py = rhs.py; 00382 pz = rhs.pz; 00383 status = rhs.status; 00384 return *this; 00385 }; 00386 00387 // MdcTrk_pathl(const MdcTrk_pathl& rhs){ 00388 // this = rhs; 00389 // } 00390 public: 00391 int id; 00392 int layer; 00393 MdcTrk * trk; 00394 float xin; 00395 float yin; 00396 float zin; 00397 float xout; 00398 float yout; 00399 float zout; 00400 float pathl; 00401 float px; 00402 float py; 00403 float pz; 00404 int status; 00405 private: 00406 00407 00408 }; 00409 00410 class MdcTrkPathlCol { 00411 public: 00412 static vector<MdcTrk_pathl>* getMdcTrkPathlCol(void); 00413 private: 00414 static vector<MdcTrk_pathl>* s_col; 00415 }; 00416 00417 // 00418 //*** Info. on tracks found either in MDC+SVD combined system or in SVD only. *** 00419 // 00420 class MdcRec_trk_add; 00421 class MdcTrk_svd { 00422 public: 00423 MdcTrk_svd() {}; 00424 public: 00425 int id; 00426 float Helix[5]; 00427 MdcRec_trk_add * mdc_trk; 00428 // svd_cluster[24]; 00429 int Status; 00430 }; 00431 00432 class MdcTrkSvdCol { 00433 public: 00434 static vector<MdcTrk_svd>* getMdcTrkSvdCol(void); 00435 private: 00436 static vector<MdcTrk_svd>* s_col; 00437 }; 00438 00439 // 00440 //*** Tof results for diff mass assumptions *** 00441 // 00442 class MdcTrk_tof { 00443 public: 00444 MdcTrk_tof() : rectrk(0) {}; 00445 MdcTrk_tof& operator=(MdcTrk_tof& rhs) { 00446 id = rhs.id ; 00447 rectrk = rhs.rectrk; 00448 tof_k = rhs.tof_k; 00449 tof_p = rhs.tof_p; 00450 return *this; 00451 00452 }; 00453 public: 00454 int id; 00455 MdcTrk * rectrk; 00456 float tof; 00457 float tof_k; 00458 float tof_p; 00459 private: 00460 // MdcTrk_tof(MdcTrk_tof &rhs); 00461 00462 00463 }; 00464 00465 class MdcTrkTofCol { 00466 public: 00467 static vector<MdcTrk_tof>* getMdcTrkTofCol(void); 00468 private: 00469 static vector<MdcTrk_tof>* s_col; 00470 }; 00471 00472 #endif // _TrkTables_h_ 00473