BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
TofTrack Class Reference

#include <TofTrack.h>

Public Member Functions

 TofTrack (int run, int event)
 
 ~TofTrack ()
 
int trackId () const
 
int tofTrackId () const
 
int id1 () const
 
int id2 () const
 
int istrip1 () const
 
int istrip2 () const
 
int dstrip1 () const
 
int dstrip2 () const
 
unsigned int barrel () const
 
ExtTrackCase hitCase () const
 
double p () const
 
double path () const
 
double path1 () const
 
double path2 () const
 
double zrhit1 () const
 
double zrhit2 () const
 
double errzrhit1 () const
 
double errzrhit2 () const
 
double xhit1 () const
 
double yhit1 () const
 
double xhit2 () const
 
double yhit2 () const
 
int kal (unsigned int i) const
 
double zr1 (unsigned int i) const
 
double zr2 (unsigned int i) const
 
double errzr1 (unsigned int i) const
 
double errzr2 (unsigned int i) const
 
std::vector< TofData * > tofData1 () const
 
std::vector< TofData * > tofData2 () const
 
int size1 () const
 
int size2 () const
 
int size3 () const
 
int size4 () const
 
double theta1 () const
 
double theta2 () const
 
double phi1 () const
 
double phi2 () const
 
unsigned int quality1 () const
 
unsigned int quality2 () const
 
unsigned int quality () const
 
int tofId1 () const
 
int tofId2 () const
 
int strip1 () const
 
int strip2 () const
 
double ph11 () const
 
double ph12 () const
 
double ph21 () const
 
double ph22 () const
 
double ph1 () const
 
double ph2 () const
 
double ph () const
 
double tof11 (unsigned int i) const
 
double tof12 (unsigned int i) const
 
double tof21 (unsigned int i) const
 
double tof22 (unsigned int i) const
 
double tof1 (unsigned int i) const
 
double tof2 (unsigned int i) const
 
double tof (unsigned int i) const
 
double qch1 () const
 
double qch2 () const
 
double qch3 () const
 
double qch4 () const
 
double adc1 () const
 
double adc2 () const
 
double adc3 () const
 
double adc4 () const
 
double tdc1 () const
 
double tdc2 () const
 
double tdc3 () const
 
double tdc4 () const
 
double texpInner (unsigned int i) const
 
double texpOuter (unsigned int i) const
 
double texp (unsigned int i) const
 
double ztdc1 () const
 
double ztdc2 () const
 
double zadc1 () const
 
double zadc2 () const
 
double estime () const
 
double tdiff1 () const
 
double tdiff2 () const
 
int t0Stat () const
 
unsigned int flag () const
 
bool isNoHit () const
 
void setQuality (int qual)
 
void setQuality1 (int qual1)
 
void setQuality2 (int qual2)
 
void setFlag (unsigned int flag)
 
void setExtTrack (RecExtTrack *extTrack, double costheta, double p[5], int kal[5], double t0, int t0Stat)
 
void getMultiHit (TofTrack *&)
 
void setTofData (TofDataMap tofDataMap)
 
void tofDataAnalysis (TofData *tof, unsigned int iflag)
 
void getTofData (TofData *tof, unsigned int iflag)
 
void getTofDataEast (TofData *tof, unsigned int iflag)
 
void getTofDataWest (TofData *tof, unsigned int iflag)
 
void getTofDataNohit (unsigned int iflag)
 
void getEtfData (TofData *tof, unsigned int iflag, unsigned int qual)
 
void match (bool forCalibration, std::vector< int > deadId, std::vector< TofTrack * > *&tofTrackVec)
 
void findTofDataBarrel (std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zrhit, unsigned int iflag, std::vector< TofTrack * > *&tofTrackVec)
 
TofDatachooseTofData (std::vector< TofData * > tofDataVec, double zrhit)
 
TofDatacompareTofData (TofData *tofData1, TofData *tofData2, double zrhit)
 
void findTofDataEndcap (std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zr1[5])
 
TofDatachooseTofDataEndcap (std::vector< TofData * > tofDataVec, double zr1[5])
 
TofDatacompareTofDataEndcap (TofData *tofData1, TofData *tofData2)
 
void findEtfData (std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, std::vector< TofData * > tofDataVec3, double zrhit, unsigned int iflag)
 
TofDatachooseEtfData1 (std::vector< TofData * > tofDataVec, double zrhit)
 
TofDatachooseEtfData2 (std::vector< TofData * > tofDataVec, double zrhit)
 
void tofDataStudy ()
 
void setCalibration ()
 
void convert2RecTofTrackCol (RecTofTrackCol *recTofTrackCol)
 
void buildRecTofTrack (RecTofTrack *track, int layerorend)
 
void setRecTofTrack (RecTofTrack *track, int layerorend)
 
void convert2RecBTofCalHitColBarrel (int runNumber, int eventNumber, RecBTofCalHitCol *btofCalHitCol, std::string calibData)
 
void convert2RecETofCalHitCol (int runNumber, int eventNumber, RecETofCalHitCol *etofCalHitCol, std::string calibData)
 
void convert2RecBTofCalHitColETF (int runNumber, int eventNumber, RecBTofCalHitCol *btofCalHitCol, std::string calibData)
 
void qualityAnalysis ()
 
 TofTrack (int run, int event)
 
 ~TofTrack ()
 
int trackId () const
 
int tofTrackId () const
 
int id1 () const
 
int id2 () const
 
int istrip1 () const
 
int istrip2 () const
 
int dstrip1 () const
 
int dstrip2 () const
 
unsigned int barrel () const
 
ExtTrackCase hitCase () const
 
double p () const
 
double path () const
 
double path1 () const
 
double path2 () const
 
double zrhit1 () const
 
double zrhit2 () const
 
double errzrhit1 () const
 
double errzrhit2 () const
 
double xhit1 () const
 
double yhit1 () const
 
double xhit2 () const
 
double yhit2 () const
 
int kal (unsigned int i) const
 
double zr1 (unsigned int i) const
 
double zr2 (unsigned int i) const
 
double errzr1 (unsigned int i) const
 
double errzr2 (unsigned int i) const
 
std::vector< TofData * > tofData1 () const
 
std::vector< TofData * > tofData2 () const
 
int size1 () const
 
int size2 () const
 
int size3 () const
 
int size4 () const
 
double theta1 () const
 
double theta2 () const
 
double phi1 () const
 
double phi2 () const
 
unsigned int quality1 () const
 
unsigned int quality2 () const
 
unsigned int quality () const
 
int tofId1 () const
 
int tofId2 () const
 
int strip1 () const
 
int strip2 () const
 
double ph11 () const
 
double ph12 () const
 
double ph21 () const
 
double ph22 () const
 
double ph1 () const
 
double ph2 () const
 
double ph () const
 
double tof11 (unsigned int i) const
 
double tof12 (unsigned int i) const
 
double tof21 (unsigned int i) const
 
double tof22 (unsigned int i) const
 
double tof1 (unsigned int i) const
 
double tof2 (unsigned int i) const
 
double tof (unsigned int i) const
 
double qch1 () const
 
double qch2 () const
 
double qch3 () const
 
double qch4 () const
 
double adc1 () const
 
double adc2 () const
 
double adc3 () const
 
double adc4 () const
 
double tdc1 () const
 
double tdc2 () const
 
double tdc3 () const
 
double tdc4 () const
 
double texpInner (unsigned int i) const
 
double texpOuter (unsigned int i) const
 
double texp (unsigned int i) const
 
double ztdc1 () const
 
double ztdc2 () const
 
double zadc1 () const
 
double zadc2 () const
 
double estime () const
 
double tdiff1 () const
 
double tdiff2 () const
 
int t0Stat () const
 
unsigned int flag () const
 
bool isNoHit () const
 
void setQuality (int qual)
 
void setQuality1 (int qual1)
 
void setQuality2 (int qual2)
 
void setFlag (unsigned int flag)
 
void setExtTrack (RecExtTrack *extTrack, double costheta, double p[5], int kal[5], double t0, int t0Stat)
 
void getMultiHit (TofTrack *&)
 
void setTofData (TofDataMap tofDataMap)
 
void tofDataAnalysis (TofData *tof, unsigned int iflag)
 
void getTofData (TofData *tof, unsigned int iflag)
 
void getTofDataEast (TofData *tof, unsigned int iflag)
 
void getTofDataWest (TofData *tof, unsigned int iflag)
 
void getTofDataNohit (unsigned int iflag)
 
void getEtfData (TofData *tof, unsigned int iflag, unsigned int qual)
 
void match (bool forCalibration, std::vector< int > deadId, std::vector< TofTrack * > *&tofTrackVec)
 
void findTofDataBarrel (std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zrhit, unsigned int iflag, std::vector< TofTrack * > *&tofTrackVec)
 
TofDatachooseTofData (std::vector< TofData * > tofDataVec, double zrhit)
 
TofDatacompareTofData (TofData *tofData1, TofData *tofData2, double zrhit)
 
void findTofDataEndcap (std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zr1[5])
 
TofDatachooseTofDataEndcap (std::vector< TofData * > tofDataVec, double zr1[5])
 
TofDatacompareTofDataEndcap (TofData *tofData1, TofData *tofData2)
 
void findEtfData (std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, std::vector< TofData * > tofDataVec3, double zrhit, unsigned int iflag)
 
TofDatachooseEtfData1 (std::vector< TofData * > tofDataVec, double zrhit)
 
TofDatachooseEtfData2 (std::vector< TofData * > tofDataVec, double zrhit)
 
void tofDataStudy ()
 
void setCalibration ()
 
void convert2RecTofTrackCol (RecTofTrackCol *recTofTrackCol)
 
void buildRecTofTrack (RecTofTrack *track, int layerorend)
 
void setRecTofTrack (RecTofTrack *track, int layerorend)
 
void convert2RecBTofCalHitColBarrel (int runNumber, int eventNumber, RecBTofCalHitCol *btofCalHitCol, std::string calibData)
 
void convert2RecETofCalHitCol (int runNumber, int eventNumber, RecETofCalHitCol *etofCalHitCol, std::string calibData)
 
void convert2RecBTofCalHitColETF (int runNumber, int eventNumber, RecBTofCalHitCol *btofCalHitCol, std::string calibData)
 
void qualityAnalysis ()
 

Detailed Description

Definition at line 22 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

Constructor & Destructor Documentation

◆ TofTrack() [1/2]

TofTrack::TofTrack ( int  run,
int  event 
)

Definition at line 10 of file TofTrack.cxx.

10 {
11 m_run = run;
12 m_event = event;
13 m_trackId = -1;
14 m_tofTrackId = -1;
15 m_id1 = -9;
16 m_id2 = -9;
17 m_istrip1 = -9;
18 m_istrip2 = -9;
19 m_hitCase = NoHit;
20 m_momentum = -99.0;
21 m_path = 0.0;
22 m_path1 = 0.0;
23 m_path2 = 0.0;
24 m_zrhit1 = 99.0;
25 m_errzr1 = 99.0;
26 m_zrhit2 = 99.0;
27 m_errzr2 = 99.0;
28 m_xhit1 = 99.0;
29 m_yhit1 = 99.0;
30 m_xhit2 = 99.0;
31 m_yhit2 = 99.0;
32 for( unsigned int i=0; i<5; i++ ) {
33 m_kal[i] = -1;
34 m_zr1[i] = 99.0;
35 m_zr2[i] = 99.0;
36 m_ezr1[i] = 99.0;
37 m_ezr2[i] = 99.0;
38 }
39 if( m_tofData1.size()>0 ) {
40 m_tofData1.clear();
41 }
42 if( m_tofData2.size()>0 ) {
43 m_tofData2.clear();
44 }
45 if( m_tofData3.size()>0 ) {
46 m_tofData3.clear();
47 }
48 if( m_tofData4.size()>0 ) {
49 m_tofData4.clear();
50 }
51 if( m_tofData5.size()>0 ) {
52 m_tofData5.clear();
53 }
54 if( m_tofData6.size()>0 ) {
55 m_tofData6.clear();
56 }
57 m_quality1 = 0;
58 m_quality2 = 0;
59 m_quality = 10;
60
61 m_delStrip1 = 20;
62 m_delStrip2 = 20;
63
64 m_tofId1 = -9;
65 m_tofId2 = -9;
66 m_strip1 = -9;
67 m_strip2 = -9;
68
69 m_ph11 = -99.0;
70 m_ph12 = -99.0;
71 m_ph21 = -99.0;
72 m_ph22 = -99.0;
73 m_ph1 = -99.0;
74 m_ph2 = -99.0;
75 m_ph = -99.0;
76
77 for( unsigned int i=0; i<5; i++ ) {
78 m_tof11[i] = 0.0;
79 m_tof12[i] = 0.0;
80 m_tof21[i] = 0.0;
81 m_tof22[i] = 0.0;
82 m_tof1[i] = 0.0;
83 m_tof2[i] = 0.0;
84 m_tof[i] = 0.0;
85 }
86
87 m_sigma11 = -99.0;
88 m_sigma12 = -99.0;
89 m_sigma21 = -99.0;
90 m_sigma22 = -99.0;
91 m_sigma1 = -99.0;
92 m_sigma2 = -99.0;
93 m_sigma = -99.0;
94
95 m_qch1 = -99.0;
96 m_qch2 = -99.0;
97 m_qch3 = -99.0;
98 m_qch4 = -99.0;
99 m_adc1 = -99.0;
100 m_adc2 = -99.0;
101 m_adc3 = -99.0;
102 m_adc4 = -99.0;
103 m_tdc1 = -99.0;
104 m_tdc2 = -99.0;
105 m_tdc3 = -99.0;
106 m_tdc4 = -99.0;
107
108 for( unsigned int i=0; i<5; i++ ) {
109 m_texpInner[i] = -99.0;
110 m_texpOuter[i] = -99.0;
111 m_texp[i] = -99.0;
112 }
113
114 m_ztdc1 = -99.0;
115 m_ztdc2 = -99.0;
116 m_zadc1 = -99.0;
117 m_zadc2 = -99.0;
118
119 m_estime = -99.0;
120 m_tdiff1 = -99.0;
121 m_tdiff2 = -99.0;
122
123 m_flag = 0;
124
125 return;
126}

◆ ~TofTrack() [1/2]

TofTrack::~TofTrack ( )

Definition at line 129 of file TofTrack.cxx.

129 {
130 if( m_tofData1.size()>0 ) {
131 m_tofData1.clear();
132 }
133 if( m_tofData2.size()>0 ) {
134 m_tofData2.clear();
135 }
136 if( m_tofData3.size()>0 ) {
137 m_tofData3.clear();
138 }
139 if( m_tofData4.size()>0 ) {
140 m_tofData4.clear();
141 }
142 if( m_tofData5.size()>0 ) {
143 m_tofData5.clear();
144 }
145 if( m_tofData6.size()>0 ) {
146 m_tofData6.clear();
147 }
148 return;
149}

◆ TofTrack() [2/2]

TofTrack::TofTrack ( int  run,
int  event 
)

◆ ~TofTrack() [2/2]

TofTrack::~TofTrack ( )

Member Function Documentation

◆ adc1() [1/2]

double TofTrack::adc1 ( ) const
inline

Definition at line 93 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

93{ return m_adc1; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ adc1() [2/2]

double TofTrack::adc1 ( ) const
inline

Definition at line 93 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

93{ return m_adc1; }

◆ adc2() [1/2]

double TofTrack::adc2 ( ) const
inline

Definition at line 94 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

94{ return m_adc2; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ adc2() [2/2]

double TofTrack::adc2 ( ) const
inline

Definition at line 94 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

94{ return m_adc2; }

◆ adc3() [1/2]

double TofTrack::adc3 ( ) const
inline

Definition at line 95 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

95{ return m_adc3; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ adc3() [2/2]

double TofTrack::adc3 ( ) const
inline

Definition at line 95 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

95{ return m_adc3; }

◆ adc4() [1/2]

double TofTrack::adc4 ( ) const
inline

Definition at line 96 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

96{ return m_adc4; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ adc4() [2/2]

double TofTrack::adc4 ( ) const
inline

Definition at line 96 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

96{ return m_adc4; }

◆ barrel() [1/2]

unsigned int TofTrack::barrel ( ) const
inline

◆ barrel() [2/2]

unsigned int TofTrack::barrel ( ) const
inline

Definition at line 35 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

35{ return m_barrel; }

◆ buildRecTofTrack() [1/2]

void TofTrack::buildRecTofTrack ( RecTofTrack track,
int  layerorend 
)

Definition at line 2429 of file TofTrack.cxx.

2429 {
2430
2431 track->setTofTrackID( m_tofTrackId );
2432 track->setTrackID( m_trackId );
2433
2434 track->setErrTof( 0.0 );
2435 track->setBeta( 0.0 );
2436
2437 double sigma[6];
2438 for( int i=0; i<6; i++ ) {
2439 sigma[i] = 0.0;
2440 }
2441 track->setSigma( sigma );
2442 track->setQuality( m_quality );
2443 track->setT0( m_estime );
2444 track->setErrT0( 0.0 );
2445 track->setPhi( 9999.0 );
2446 track->setErrPhi( 9999.0 );
2447 track->setEnergy( 9999.0 );
2448 track->setErrEnergy( 9999.0 );
2449
2450 if( ( layerorend == 11 ) || ( layerorend == 12 ) || ( layerorend == 1 ) ) {
2451 if( m_strip1<0 ) {
2452 track->setTofID( m_tofId1 ); // scintillator
2453 }
2454 else {
2455 track->setTofID( 12*m_tofId1+m_strip1 ); // MRPC
2456 }
2457 track->setPath( m_path1 );
2458 track->setZrHit( m_zrhit1 );
2459 track->setErrZ( m_errzr1 );
2460 track->setTexp( m_texpInner );
2461
2462 setRecTofTrack( track, layerorend );
2463 }
2464
2465 if( ( layerorend==21 ) || ( layerorend==22 ) || ( layerorend==2 ) ) {
2466 if( m_strip2<0 ) {
2467 track->setTofID( m_tofId2 ); // scintillator
2468 }
2469 else {
2470 track->setTofID( 12*m_tofId2+m_strip2 ); // MRPC
2471 }
2472 track->setPath( m_path2 );
2473 track->setZrHit( m_zrhit2 );
2474 track->setErrZ( m_errzr2 );
2475 track->setTexp( m_texpOuter );
2476
2477 setRecTofTrack( track, layerorend );
2478 }
2479
2480 if( layerorend==0 ) {
2481 track->setTofID( m_tofId1 );
2482 track->setPath( m_path2 );
2483 track->setZrHit( m_zrhit2 );
2484 track->setErrZ( m_errzr2 );
2485 track->setTexp( m_texp );
2486
2487 setRecTofTrack( track, layerorend );
2488 }
2489
2490 if( layerorend == 3 ) {
2491 if( m_strip1<0 ) {
2492 track->setTofID( m_id1 ); // scintillator
2493 }
2494 else {
2495 track->setTofID( 12*m_id1 + m_strip1 ); // mrpc
2496 }
2497 track->setPath( m_path1 );
2498 track->setZrHit( m_zrhit1 );
2499 track->setErrZ( m_errzr1 );
2500 track->setTexp( m_texpInner );
2501 }
2502
2503 return;
2504}
void setRecTofTrack(RecTofTrack *track, int layerorend)
Definition: TofTrack.cxx:2507

Referenced by convert2RecTofTrackCol().

◆ buildRecTofTrack() [2/2]

void TofTrack::buildRecTofTrack ( RecTofTrack track,
int  layerorend 
)

◆ chooseEtfData1() [1/2]

TofData * TofTrack::chooseEtfData1 ( std::vector< TofData * >  tofDataVec,
double  zrhit 
)

Definition at line 1503 of file TofTrack.cxx.

1503 {
1504 if( tofDataVec.size() == 0 ) {
1505 return 0;
1506 }
1507 std::vector<TofData*>::iterator igood = tofDataVec.begin();
1508 if( tofDataVec.size() == 1 ) {
1509 return (*igood);
1510 }
1511 else if( tofDataVec.size() > 1 ) {
1512 double deltaZ = 1000.0;
1513 std::vector<TofData*>::iterator iter = tofDataVec.begin();
1514 for( ; iter != tofDataVec.end(); iter++ ) {
1515 if( ( (*iter)->quality() & 0xf ) == 0xf ) {
1516 if( abs( (*iter)->ztdc() - zrhit ) < deltaZ ) {
1517 deltaZ = abs( (*iter)->ztdc() - zrhit );
1518 igood = iter;
1519 }
1520 }
1521 }
1522 // Max Q
1523 if( deltaZ > 999.0 ) {
1524 double maxQ = -1;
1525 iter = tofDataVec.begin();
1526 for( ; iter != tofDataVec.end(); iter++ ) {
1527 if( ( (*iter)->quality() & 0xc ) == 0xc ) {
1528 if( (*iter)->adc1() > maxQ ) {
1529 maxQ = (*iter)->adc1();
1530 igood = iter;
1531 }
1532 }
1533 else if( ( (*iter)->quality() & 0x3 ) == 0x3 ) {
1534 if( (*iter)->adc2() > maxQ ) {
1535 maxQ = (*iter)->adc2();
1536 igood = iter;
1537 }
1538 }
1539 }
1540 }
1541 }
1542
1543 return (*igood);
1544}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)

Referenced by findEtfData().

◆ chooseEtfData1() [2/2]

TofData * TofTrack::chooseEtfData1 ( std::vector< TofData * >  tofDataVec,
double  zrhit 
)

◆ chooseEtfData2() [1/2]

TofData * TofTrack::chooseEtfData2 ( std::vector< TofData * >  tofDataVec,
double  zrhit 
)

Definition at line 1549 of file TofTrack.cxx.

1549 {
1550 if( tofDataVec.size() == 0 ) {
1551 return 0;
1552 }
1553 std::vector<TofData*>::iterator igood = tofDataVec.begin();
1554 if( tofDataVec.size() == 1 ) {
1555 return (*igood);
1556 }
1557 else if( tofDataVec.size() > 1 ) {
1558 double maxQ = -1;
1559 std::vector<TofData*>::iterator iter = tofDataVec.begin();
1560 for( ; iter != tofDataVec.end(); iter++ ) {
1561 if( ( (*iter)->quality() & 0xc ) == 0xc ) {
1562 if( (*iter)->adc1() > maxQ ) {
1563 maxQ = (*iter)->adc1();
1564 igood = iter;
1565 }
1566 }
1567 else if( ( (*iter)->quality() & 0x3 ) == 0x3 ) {
1568 if( (*iter)->adc2() > maxQ ) {
1569 maxQ = (*iter)->adc2();
1570 igood = iter;
1571 }
1572 }
1573 }
1574 }
1575
1576 return (*igood);
1577}

Referenced by findEtfData().

◆ chooseEtfData2() [2/2]

TofData * TofTrack::chooseEtfData2 ( std::vector< TofData * >  tofDataVec,
double  zrhit 
)

◆ chooseTofData() [1/2]

TofData * TofTrack::chooseTofData ( std::vector< TofData * >  tofDataVec,
double  zrhit 
)

Definition at line 1215 of file TofTrack.cxx.

1215 {
1216 if( tofDataVec.size() == 0 ) {
1217 cout << "TofRec::TofTrack::ChooseTofData: Size of TofData Vector is Zero!" << endl;
1218 return 0;
1219 }
1220 std::vector<TofData*>::iterator igood = tofDataVec.begin();
1221 if( tofDataVec.size() > 1 ) {
1222 double deltaZ = 1000.0;
1223 std::vector<TofData*>::iterator iter = tofDataVec.begin();
1224 // ZTDC compare
1225 for( ; iter != tofDataVec.end(); iter++ ) {
1226 if( ( (*iter)->quality() & 0x5 ) == 0x5 ) {
1227 if( abs( (*iter)->ztdc() - zrhit ) < deltaZ ) {
1228 deltaZ = abs( (*iter)->ztdc() - zrhit );
1229 igood = iter;
1230 }
1231 }
1232 }
1233 // ZADC compare
1234 if( deltaZ > 999.0 ) {
1235 iter = tofDataVec.begin();
1236 for( ; iter != tofDataVec.end(); iter++ ) {
1237 if( ( (*iter)->quality() & 0xa ) == 0xa ) {
1238 if( abs( (*iter)->zadc() - zrhit ) < deltaZ ) {
1239 deltaZ = abs( (*iter)->zadc() - zrhit );
1240 igood = iter;
1241 }
1242 }
1243 }
1244 }
1245 // Max Q
1246 if( deltaZ > 999.0 ) {
1247 unsigned int ibad = 0xf0;
1248 iter = tofDataVec.begin();
1249 for( ; iter != tofDataVec.end(); iter++ ) {
1250 if( ( (*iter)->quality() & 0xf0 ) < ibad ) {
1251 igood = iter;
1252 ibad = ( (*iter)->quality() & 0xf0 );
1253 }
1254 else if( ( (*iter)->quality() & 0xf0 ) == ibad ) {
1255 if( ( (*iter)->adc1() + (*iter)->adc2() ) > ( (*igood)->adc1() + (*igood)->adc2() ) ) {
1256 igood = iter;
1257 ibad = ( (*iter)->quality() & 0xf0 );
1258 }
1259 }
1260 }
1261 }
1262 }
1263
1264 return (*igood);
1265}

Referenced by findTofDataBarrel().

◆ chooseTofData() [2/2]

TofData * TofTrack::chooseTofData ( std::vector< TofData * >  tofDataVec,
double  zrhit 
)

◆ chooseTofDataEndcap() [1/2]

TofData * TofTrack::chooseTofDataEndcap ( std::vector< TofData * >  tofDataVec,
double  zr1[5] 
)

Definition at line 1375 of file TofTrack.cxx.

1375 {
1376 if( tofDataVec.size() == 0 ) {
1377 cout << "TofRec::TofTrack::ChooseTofData: Size of TofData Vector is Zero!" << endl;
1378 return 0;
1379 }
1380 std::vector<TofData*>::iterator igood = tofDataVec.begin();
1381 if( tofDataVec.size() > 1 ) {
1382 bool multihit = false;
1383 std::vector<TofData*>::iterator iter = tofDataVec.begin();
1384 for( ; iter != tofDataVec.end(); iter++ ) {
1385 if( (*iter)->qtimes1()>1 ) { multihit = true; }
1386 }
1387 iter = tofDataVec.begin();
1388 if( multihit ) {
1389 double tcorr = -999.0;
1390 double deltaTMin = 999.0;
1391 for( ; iter != tofDataVec.end(); iter++ ) {
1392 tcorr = tofCaliSvc->ETime( (*iter)->adc(), (*iter)->tdc()-m_estime, zr1[2], (*iter)->tofId() );
1393 for( unsigned int i=0; i<5; i++ ) {
1394 if( abs(tcorr-m_texpInner[i]) < deltaTMin ) {
1395 deltaTMin = abs(tcorr-m_texpInner[i]);
1396 igood = iter;
1397 }
1398 }
1399 }
1400 }
1401 else {
1402 double maxQ = 0.0;
1403 for( ; iter != tofDataVec.end(); iter++ ) {
1404 if( (*iter)->adc() > maxQ ) {
1405 maxQ = (*iter)->adc();
1406 igood = iter;
1407 }
1408 }
1409 }
1410 }
1411 return (*igood);
1412}
ITofCaliSvc * tofCaliSvc
virtual const double ETime(double ADC, double TDC, double rHit, unsigned id)=0
double zr1(unsigned int i) const

Referenced by findTofDataEndcap().

◆ chooseTofDataEndcap() [2/2]

TofData * TofTrack::chooseTofDataEndcap ( std::vector< TofData * >  tofDataVec,
double  zr1[5] 
)

◆ compareTofData() [1/2]

TofData * TofTrack::compareTofData ( TofData tofData1,
TofData tofData2,
double  zrhit 
)

Definition at line 1272 of file TofTrack.cxx.

1272 {
1273 TofData* tof = tofData1;
1274 // ZTDC compare
1275 if( abs(tofData1->ztdc() - zrhit ) > abs(tofData2->ztdc() - zrhit ) ) {
1276 // SingleEnd/NoT/NoQ compare
1277 if( ( tofData1->quality() & 0xf0 ) >= ( tofData1->quality() & 0xf0 ) ) {
1278 // QDC compare
1279 // if( ( tofData1->adc1() + tofData1->adc2() ) < ( tofData2->adc1() + tofData2->adc2() ) ) {
1280 tof = tofData2;
1281 // }
1282 }
1283 // }
1284 }
1285
1286 return tof;
1287}
std::vector< TofData * > tofData1() const
double tof(unsigned int i) const
std::vector< TofData * > tofData2() const

Referenced by findTofDataBarrel().

◆ compareTofData() [2/2]

TofData * TofTrack::compareTofData ( TofData tofData1,
TofData tofData2,
double  zrhit 
)

◆ compareTofDataEndcap() [1/2]

TofData * TofTrack::compareTofDataEndcap ( TofData tofData1,
TofData tofData2 
)

Definition at line 1418 of file TofTrack.cxx.

1418 {
1419 TofData* tof = tofData1;
1420 if( tof->adc() < tofData2->adc() ) {
1421 tof = tofData2;
1422 }
1423 return tof;
1424}

Referenced by findTofDataEndcap().

◆ compareTofDataEndcap() [2/2]

TofData * TofTrack::compareTofDataEndcap ( TofData tofData1,
TofData tofData2 
)

◆ convert2RecBTofCalHitColBarrel() [1/2]

void TofTrack::convert2RecBTofCalHitColBarrel ( int  runNumber,
int  eventNumber,
RecBTofCalHitCol btofCalHitCol,
std::string  calibData 
)

Definition at line 2591 of file TofTrack.cxx.

2591 {
2592
2593 if( ( m_quality1 & 0x800 ) == 0x800 ) {
2594
2595 RecBTofCalHit* ahit = new RecBTofCalHit;
2596 ahit->setRun( runNumber );
2597 ahit->setEvent( eventNumber );
2598 ahit->setMod( m_tofId1 );
2599 ahit->setQual( m_hitCase );
2600 ahit->setdZHit( 1 );
2601
2602 for( int i=0; i<5; i++ ) {
2603 ahit->setTpred( i, m_texpInner[i] );
2604 }
2605 if( calibData == "Dimu" ) {
2606 ahit->setTpred( m_texpInner[1] );
2607 ahit->setZHit( m_zr1[1] );
2608 // ahit->setdZHit( m_ezr1[1] );
2609 }
2610 else {
2611 ahit->setTpred( m_texpInner[0] );
2612 ahit->setZHit( m_zr1[0] );
2613 // ahit->setdZHit( m_ezr1[0] );
2614 }
2615
2616 ahit->setTdc1( m_tdc1-m_estime );
2617 ahit->setTdc2( m_tdc2-m_estime );
2618 ahit->setAdc1( m_adc1 );
2619 ahit->setAdc2( m_adc2 );
2620 // ahit->setZHit( m_zrhit1 );
2621 // ahit->setdZHit( m_errzr1 );
2622 ahit->setDeltaPhi( m_estime );
2623 ahit->setsinTheta( m_theta1 );
2624 ahit->setP( m_momentum );
2625 ahit->setQ( m_ph1 );
2626 ahit->setPath( m_path1 );
2627
2628 btofCalHitCol->push_back( ahit );
2629
2630 if( ( m_quality2 & 0x800 ) == 0x800 ) {
2631
2632 RecBTofCalHit* bhit = new RecBTofCalHit;
2633 bhit->setRun( runNumber );
2634 bhit->setEvent( eventNumber );
2635 bhit->setMod( m_tofId2 );
2636 bhit->setQual( m_hitCase );
2637 bhit->setdZHit( 1 );
2638
2639 for( int i=0; i<5; i++ ) {
2640 bhit->setTpred( i, m_texpOuter[i] );
2641 }
2642 if( calibData == "Dimu" ) {
2643 bhit->setTpred( m_texpOuter[1] );
2644 bhit->setZHit( m_zr2[1] );
2645 // bhit->setdZHit( m_ezr2[1] );
2646 }
2647 else {
2648 bhit->setTpred( m_texpOuter[0] );
2649 bhit->setZHit( m_zr2[0] );
2650 // bhit->setdZHit( m_ezr2[0] );
2651 }
2652
2653 bhit->setTdc1( m_tdc3-m_estime );
2654 bhit->setTdc2( m_tdc4-m_estime );
2655 bhit->setAdc1( m_adc3 );
2656 bhit->setAdc2( m_adc4 );
2657 // bhit->setZHit( m_zrhit2 );
2658 // bhit->setdZHit( m_errzr2 );
2659 bhit->setDeltaPhi( m_estime );
2660 bhit->setsinTheta( m_theta2 );
2661 bhit->setP( m_momentum );
2662 bhit->setQ( m_ph2 );
2663 bhit->setPath( m_path2 );
2664
2665 ahit->setnext(bhit);
2666
2667 btofCalHitCol->push_back( bhit );
2668
2669 }
2670 }
2671
2672 return;
2673}

◆ convert2RecBTofCalHitColBarrel() [2/2]

void TofTrack::convert2RecBTofCalHitColBarrel ( int  runNumber,
int  eventNumber,
RecBTofCalHitCol btofCalHitCol,
std::string  calibData 
)

◆ convert2RecBTofCalHitColETF() [1/2]

void TofTrack::convert2RecBTofCalHitColETF ( int  runNumber,
int  eventNumber,
RecBTofCalHitCol btofCalHitCol,
std::string  calibData 
)

Definition at line 2716 of file TofTrack.cxx.

2716 {
2717
2718 if( ( m_quality1 & 0x800 ) == 0x800 ) {
2719
2720 RecBTofCalHit* ahit = new RecBTofCalHit;
2721 ahit->setRun( runNumber );
2722 ahit->setEvent( eventNumber );
2723 ahit->setMod( m_tofId1 );
2724 ahit->setQual( m_hitCase );
2725 ahit->setdZHit( 0 );
2726
2727 for( int i=0; i<5; i++ ) {
2728 ahit->setTpred( i, m_texpInner[i] );
2729 }
2730 if( calibData == "Dimu" ) {
2731 ahit->setTpred( m_texpInner[1] );
2732 ahit->setZHit( m_zr1[1] );
2733 }
2734 else {
2735 ahit->setTpred( m_texpInner[0] );
2736 ahit->setZHit( m_zr1[0] );
2737 }
2738
2739 ahit->setTdc1( m_tdc1-m_estime );
2740 ahit->setTdc2( m_tdc2-m_estime );
2741 ahit->setAdc1( m_adc1 );
2742 ahit->setAdc2( m_adc2 );
2743 ahit->setDeltaPhi( m_estime );
2744 ahit->setsinTheta( m_strip1 );
2745 ahit->setP( m_momentum );
2746 ahit->setQ( m_ph1 );
2747 ahit->setPath( m_path1 );
2748
2749 btofCalHitCol->push_back( ahit );
2750 }
2751
2752 if( ( m_quality2 & 0x800 ) == 0x800 ) {
2753
2754 RecBTofCalHit* bhit = new RecBTofCalHit;
2755 bhit->setRun( runNumber );
2756 bhit->setEvent( eventNumber );
2757 bhit->setMod( m_tofId2 );
2758 bhit->setQual( m_hitCase );
2759 bhit->setdZHit( 0 );
2760
2761 for( int i=0; i<5; i++ ) {
2762 bhit->setTpred( i, m_texpOuter[i] );
2763 }
2764 if( calibData == "Dimu" ) {
2765 bhit->setTpred( m_texpOuter[1] );
2766 bhit->setZHit( m_zr2[1] );
2767 }
2768 else {
2769 bhit->setTpred( m_texpOuter[0] );
2770 bhit->setZHit( m_zr2[0] );
2771 }
2772
2773 bhit->setTdc1( m_tdc3-m_estime );
2774 bhit->setTdc2( m_tdc4-m_estime );
2775 bhit->setAdc1( m_adc3 );
2776 bhit->setAdc2( m_adc4 );
2777 bhit->setDeltaPhi( m_estime );
2778 bhit->setsinTheta( m_strip2 );
2779 bhit->setP( m_momentum );
2780 bhit->setQ( m_ph2 );
2781 bhit->setPath( m_path2 );
2782
2783 btofCalHitCol->push_back( bhit );
2784 }
2785
2786 return;
2787}

◆ convert2RecBTofCalHitColETF() [2/2]

void TofTrack::convert2RecBTofCalHitColETF ( int  runNumber,
int  eventNumber,
RecBTofCalHitCol btofCalHitCol,
std::string  calibData 
)

◆ convert2RecETofCalHitCol() [1/2]

void TofTrack::convert2RecETofCalHitCol ( int  runNumber,
int  eventNumber,
RecETofCalHitCol etofCalHitCol,
std::string  calibData 
)

Definition at line 2676 of file TofTrack.cxx.

2676 {
2677
2678 if( ( m_quality1 & 0x800 ) != 0x800 ) return;
2679
2680 RecETofCalHit* chit = new RecETofCalHit;
2681 chit->setRun( runNumber );
2682 chit->setEvent( eventNumber );
2683 chit->setMod( m_tofId1 );
2684 chit->setQual( m_hitCase );
2685
2686 for( int i=0; i<5; i++ ) {
2687 chit->setTpred( i, m_texpInner[i] );
2688 }
2689 if( calibData == "Dimu" ) {
2690 chit->setTpred( m_texpInner[1] );
2691 chit->setRHit( m_zr1[1] );
2692 chit->setdRHit( m_ezr1[1] );
2693 }
2694 else {
2695 chit->setTpred( m_texpInner[0] );
2696 chit->setRHit( m_zr1[0] );
2697 chit->setdRHit( m_ezr1[0] );
2698 }
2699
2700 chit->setTdc( m_tdc1-m_estime );
2701 chit->setAdc( m_adc1 );
2702 // chit->setRHit( m_zrhit1 );
2703 // chit->setdRHit( m_errzr1 );
2704 chit->setDeltaPhi( m_estime );
2705 chit->setcosTheta( m_theta1 );
2706 chit->setQ( m_ph1 );
2707 chit->setP( m_momentum );
2708 chit->setPath( m_path1 );
2709
2710 etofCalHitCol->push_back( chit );
2711
2712 return;
2713}

◆ convert2RecETofCalHitCol() [2/2]

void TofTrack::convert2RecETofCalHitCol ( int  runNumber,
int  eventNumber,
RecETofCalHitCol etofCalHitCol,
std::string  calibData 
)

◆ convert2RecTofTrackCol() [1/2]

void TofTrack::convert2RecTofTrackCol ( RecTofTrackCol recTofTrackCol)

Definition at line 2114 of file TofTrack.cxx.

2114 {
2115
2116 bool barrel = ( ( m_hitCase == InnerLayer ) || ( m_hitCase == OuterLayer ) || ( m_hitCase == DoubleLayer ) );
2117
2118 bool innerEast = ( ( m_quality1 & 0xc ) == 0xc );
2119 bool innerWest = ( ( m_quality1 & 0x3 ) == 0x3 );
2120 bool outerEast = ( ( m_quality2 & 0xc ) == 0xc );
2121 bool outerWest = ( ( m_quality2 & 0x3 ) == 0x3 );
2122
2123 if( barrel ) {
2124
2125 if( innerEast ) {
2126 RecTofTrack* atrack11 = new RecTofTrack;
2127 buildRecTofTrack( atrack11, 11 ); // innerlayer east readout
2128 TofHitStatus* hitStatus11 = new TofHitStatus;
2129 if( innerWest ) {
2130 hitStatus11->setBarrelReadout( 1, true ); // innerlayer east readout
2131 }
2132 else {
2133 if( m_hitCase == InnerLayer ) {
2134 hitStatus11->setBarrelCluster( 11 ); // innerlayer east cluster
2135 }
2136 else if( m_hitCase == DoubleLayer ) {
2137 if( outerEast && outerWest ) {
2138 hitStatus11->setBarrelCounter( 11 ); // innerlayer east counter
2139 }
2140 else {
2141 hitStatus11->setBarrelCluster( 11 ); // innerlayer east cluster
2142 }
2143 }
2144 else {
2145 cout << "TofRec::TofTrack:convert2RecTofTrackCol: 11- Impossible!" << endl;
2146 }
2147 }
2148 atrack11->setStatus( hitStatus11->value() );
2149 delete hitStatus11;
2150 recTofTrackCol->push_back( atrack11 );
2151 }
2152
2153 if( innerWest ) {
2154 RecTofTrack* atrack12 = new RecTofTrack;
2155 buildRecTofTrack( atrack12, 12 ); // innerlayer west readout
2156 TofHitStatus* hitStatus12 = new TofHitStatus;
2157 if( innerEast ) {
2158 hitStatus12->setBarrelReadout( 1, false ); // innerlayer west
2159 }
2160 else {
2161 if( m_hitCase == InnerLayer ) {
2162 hitStatus12->setBarrelCluster( 12 ); // innerlayer west cluster
2163 }
2164 else if( m_hitCase == DoubleLayer ) {
2165 if( outerEast && outerWest ) {
2166 hitStatus12->setBarrelCounter( 12 ); // innerlayer west counter
2167 }
2168 else {
2169 hitStatus12->setBarrelCluster( 12 ); // innerlayer west cluster
2170 }
2171 }
2172 else {
2173 cout << "TofRec::TofTrack:convert2RecTofTrackCol: 12- Impossible!" << endl;
2174 }
2175 }
2176 atrack12->setStatus( hitStatus12->value() );
2177 delete hitStatus12;
2178 recTofTrackCol->push_back( atrack12 );
2179 }
2180
2181 if( innerEast && innerWest ) {
2182 RecTofTrack* atrack1 = new RecTofTrack;
2183 buildRecTofTrack( atrack1, 1 ); // innerlayer counter
2184 TofHitStatus* hitStatus1 = new TofHitStatus;
2185 if( m_hitCase == InnerLayer ) {
2186 hitStatus1->setBarrelCluster( 1 ); // innerlayer cluster and counter
2187 }
2188 else if( m_hitCase == DoubleLayer ) {
2189 if( outerEast && outerWest ) {
2190 hitStatus1->setBarrelCounter( 1 ); // innerlayer counter
2191 }
2192 else {
2193 hitStatus1->setBarrelCluster( 1 ); // innerlayer cluster and counter
2194 }
2195 }
2196 else {
2197 cout << "TofRec::TofTrack:convert2RecTofTrackCol: 1- Impossible!" << endl;
2198 }
2199 atrack1->setStatus( hitStatus1->value() );
2200 delete hitStatus1;
2201 recTofTrackCol->push_back( atrack1 );
2202 }
2203
2204 if( outerEast ) {
2205 RecTofTrack* atrack21 = new RecTofTrack;
2206 buildRecTofTrack( atrack21, 21 ); // outerlayer east readout
2207 TofHitStatus* hitStatus21 = new TofHitStatus;
2208 if( outerWest ) {
2209 hitStatus21->setBarrelReadout( 2, true ); // outerlayer east readout
2210 }
2211 else {
2212 if( m_hitCase == OuterLayer ) {
2213 hitStatus21->setBarrelCluster( 21 ); // outerlayer east cluster
2214 }
2215 else if( m_hitCase == DoubleLayer ) {
2216 if( innerEast || innerWest ) {
2217 hitStatus21->setBarrelCounter( 21 ); // outerlayer east counter
2218 }
2219 // else {
2220 // hitStatus21->setBarrelCluster( 21 ); // outerlayer east cluster
2221 // }
2222 }
2223 else {
2224 cout << "TofRec::TofTrack:convert2RecTofTrackCol: 21- Impossible!" << endl;
2225 }
2226 }
2227 atrack21->setStatus( hitStatus21->value() );
2228 delete hitStatus21;
2229 recTofTrackCol->push_back( atrack21 );
2230 }
2231
2232 if( outerWest ) {
2233 RecTofTrack* atrack22 = new RecTofTrack;
2234 buildRecTofTrack( atrack22, 22 ); // outerlayer west readout
2235 TofHitStatus* hitStatus22 = new TofHitStatus;
2236 if( outerEast ) {
2237 hitStatus22->setBarrelReadout( 2, false ); // outerlayer west readout
2238 }
2239 else {
2240 if( m_hitCase == OuterLayer ) {
2241 hitStatus22->setBarrelCluster( 22 ); // outerlayer west cluster
2242 }
2243 else if( m_hitCase == DoubleLayer ) {
2244 if( innerEast || innerWest ) {
2245 hitStatus22->setBarrelCounter( 22 ); // outerlayer west counter
2246 }
2247 // else {
2248 // hitStatus22->setBarrelCluster( 22 ); // outerlayer west cluster
2249 // }
2250 }
2251 else {
2252 cout << "TofRec::TofTrack:convert2RecTofTrackCol: 22- Impossible!" << endl;
2253 }
2254 }
2255 atrack22->setStatus( hitStatus22->value() );
2256 delete hitStatus22;
2257 recTofTrackCol->push_back( atrack22 );
2258 }
2259
2260 if( outerEast && outerWest ) {
2261 RecTofTrack* atrack2 = new RecTofTrack;
2262 buildRecTofTrack( atrack2, 2 ); // outerlayer counter
2263 TofHitStatus* hitStatus2 = new TofHitStatus;
2264 if( m_hitCase == OuterLayer ) {
2265 hitStatus2->setBarrelCluster( 2 ); // outerlayer cluster and counter
2266 }
2267 else if( m_hitCase == DoubleLayer ) {
2268 if( innerEast && innerWest ) {
2269 hitStatus2->setBarrelCounter( 2 ); // outerlayer counter
2270 }
2271 else {
2272 hitStatus2->setBarrelCluster( 2 ); // outerlayer cluster and counter
2273 }
2274 }
2275 else {
2276 cout << "TofRec::TofTrack:convert2RecTofTrackCol: 2- Impossible!" << endl;
2277 }
2278 atrack2->setStatus( hitStatus2->value() );
2279 delete hitStatus2;
2280 recTofTrackCol->push_back( atrack2 );
2281 }
2282
2283 if( innerEast && innerWest && outerEast && outerWest ) {
2284 RecTofTrack* atrack = new RecTofTrack;
2285 buildRecTofTrack( atrack, 0 ); // doublelayer cluster
2286 TofHitStatus* hitStatus = new TofHitStatus;
2287 hitStatus->setBarrelCluster( 3 ); // doublelayer cluster
2288 atrack->setStatus( hitStatus->value() );
2289 delete hitStatus;
2290 recTofTrackCol->push_back( atrack );
2291 }
2292
2293 }
2294
2295 if( ( m_hitCase == EastEndcap ) || ( m_hitCase == WestEndcap ) ) {
2296 RecTofTrack* atrack = new RecTofTrack;
2297 buildRecTofTrack( atrack, 11 ); // eastendcap counter
2298 TofHitStatus* hitStatus = new TofHitStatus;
2299 if( m_hitCase == EastEndcap ) {
2300 hitStatus->setEndcapCluster( true ); // east endcap cluster counter readout
2301 }
2302 else if( m_hitCase == WestEndcap ) {
2303 hitStatus->setEndcapCluster( false ); // west endcap cluster counter readout
2304 }
2305 else {
2306 cout << "TofRec::TofTrack:convert2RecTofTrackCol: endcap- Impossible!" << endl;
2307 }
2308 atrack->setStatus( hitStatus->value() );
2309 delete hitStatus;
2310 recTofTrackCol->push_back( atrack );
2311 }
2312
2313 if( ( m_hitCase == EastEndcapMRPC ) || ( m_hitCase == WestEndcapMRPC ) ) {
2314
2315 if( innerEast || innerWest ) {
2316
2317 if( innerEast ) {
2318 RecTofTrack* atrack1 = new RecTofTrack;
2319 buildRecTofTrack( atrack1, 11 ); // mrpc east readout
2320 TofHitStatus* hitStatus1 = new TofHitStatus;
2321 if( innerWest ) {
2322 hitStatus1->setMRPCReadout( true ); // mrpc east readout
2323 }
2324 else {
2325 hitStatus1->setMRPCCluster( false, true ); // mrpc east cluster
2326 }
2327 atrack1->setStatus( hitStatus1->value() );
2328 delete hitStatus1;
2329 recTofTrackCol->push_back( atrack1 );
2330 }
2331
2332 if( innerWest ) {
2333 RecTofTrack* atrack2 = new RecTofTrack;
2334 buildRecTofTrack( atrack2, 12 ); // mrpc west readout
2335 TofHitStatus* hitStatus2 = new TofHitStatus;
2336 if( innerEast ) {
2337 hitStatus2->setMRPCReadout( false ); // mrpc west readout
2338 }
2339 else {
2340 hitStatus2->setMRPCCluster( false, false ); // mrpc east cluster
2341 }
2342 atrack2->setStatus( hitStatus2->value() );
2343 delete hitStatus2;
2344 recTofTrackCol->push_back( atrack2 );
2345 }
2346
2347 if( innerEast && innerWest ) {
2348 RecTofTrack* atrack = new RecTofTrack;
2349 buildRecTofTrack( atrack, 1 ); // mrpc east readout
2350 TofHitStatus* hitStatus = new TofHitStatus;
2351 if( m_hitCase == EastEndcapMRPC ) {
2352 hitStatus->setMRPCCluster( true, true ); // mrpc east cluster
2353 }
2354 else {
2355 hitStatus->setMRPCCluster( true, false );// mrpc west cluster
2356 }
2357 atrack->setStatus( hitStatus->value() );
2358 delete hitStatus;
2359 recTofTrackCol->push_back( atrack );
2360 }
2361
2362 }
2363 else {
2364
2365 if( outerEast ) {
2366 RecTofTrack* atrack1 = new RecTofTrack;
2367 buildRecTofTrack( atrack1, 21 ); // mrpc east readout
2368 TofHitStatus* hitStatus1 = new TofHitStatus;
2369 if( outerWest ) {
2370 hitStatus1->setMRPCReadout( true ); // mrpc east readout
2371 }
2372 else {
2373 hitStatus1->setMRPCCluster( false, true ); // mrpc east cluster
2374 }
2375 atrack1->setStatus( hitStatus1->value() );
2376 delete hitStatus1;
2377 recTofTrackCol->push_back( atrack1 );
2378 }
2379
2380 if( outerWest ) {
2381 RecTofTrack* atrack2 = new RecTofTrack;
2382 buildRecTofTrack( atrack2, 22 ); // mrpc west readout
2383 TofHitStatus* hitStatus2 = new TofHitStatus;
2384 if( outerEast ) {
2385 hitStatus2->setMRPCReadout( false ); // mrpc west readout
2386 }
2387 else {
2388 hitStatus2->setMRPCCluster( false, false ); // mrpc east cluster
2389 }
2390 atrack2->setStatus( hitStatus2->value() );
2391 delete hitStatus2;
2392 recTofTrackCol->push_back( atrack2 );
2393 }
2394
2395 if( outerEast && outerWest ) {
2396 RecTofTrack* atrack = new RecTofTrack;
2397 buildRecTofTrack( atrack, 2 ); // mrpc east readout
2398 TofHitStatus* hitStatus = new TofHitStatus;
2399 if( m_hitCase == EastEndcapMRPC ) {
2400 hitStatus->setMRPCCluster( true, true ); // mrpc east cluster
2401 }
2402 else {
2403 hitStatus->setMRPCCluster( true, false );// mrpc west cluster
2404 }
2405 atrack->setStatus( hitStatus->value() );
2406 delete hitStatus;
2407 recTofTrackCol->push_back( atrack );
2408 }
2409
2410 }
2411
2412 }
2413
2414 if( m_hitCase == NoHit ) {
2415 RecTofTrack* atrack = new RecTofTrack;
2416 buildRecTofTrack( atrack, 3 ); // no hit
2417 TofHitStatus* hitStatus = new TofHitStatus;
2418 hitStatus->setNoHit(); // no hit
2419 atrack->setStatus( hitStatus->value() );
2420 delete hitStatus;
2421 recTofTrackCol->push_back( atrack );
2422 }
2423
2424 return;
2425}
void setMRPCReadout(bool east)
void setMRPCCluster(bool cluster, bool east)
void setBarrelReadout(unsigned int layer, bool east)
void setEndcapCluster(bool east)
void setBarrelCounter(unsigned int layer)
void setBarrelCluster(unsigned int layer)
void buildRecTofTrack(RecTofTrack *track, int layerorend)
Definition: TofTrack.cxx:2429

◆ convert2RecTofTrackCol() [2/2]

void TofTrack::convert2RecTofTrackCol ( RecTofTrackCol recTofTrackCol)

◆ dstrip1() [1/2]

int TofTrack::dstrip1 ( ) const
inline

Definition at line 33 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

33{ return m_delStrip1; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ dstrip1() [2/2]

int TofTrack::dstrip1 ( ) const
inline

Definition at line 33 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

33{ return m_delStrip1; }

◆ dstrip2() [1/2]

int TofTrack::dstrip2 ( ) const
inline

Definition at line 34 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

34{ return m_delStrip2; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ dstrip2() [2/2]

int TofTrack::dstrip2 ( ) const
inline

Definition at line 34 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

34{ return m_delStrip2; }

◆ errzr1() [1/2]

double TofTrack::errzr1 ( unsigned int  i) const
inline

Definition at line 52 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

52{ return m_ezr1[i]; }

◆ errzr1() [2/2]

double TofTrack::errzr1 ( unsigned int  i) const
inline

Definition at line 52 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

52{ return m_ezr1[i]; }

◆ errzr2() [1/2]

double TofTrack::errzr2 ( unsigned int  i) const
inline

Definition at line 53 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

53{ return m_ezr2[i]; }

◆ errzr2() [2/2]

double TofTrack::errzr2 ( unsigned int  i) const
inline

Definition at line 53 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

53{ return m_ezr2[i]; }

◆ errzrhit1() [1/2]

double TofTrack::errzrhit1 ( ) const
inline

Definition at line 43 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

43{ return m_errzr1; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ errzrhit1() [2/2]

double TofTrack::errzrhit1 ( ) const
inline

Definition at line 43 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

43{ return m_errzr1; }

◆ errzrhit2() [1/2]

double TofTrack::errzrhit2 ( ) const
inline

Definition at line 44 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

44{ return m_errzr2; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ errzrhit2() [2/2]

double TofTrack::errzrhit2 ( ) const
inline

Definition at line 44 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

44{ return m_errzr2; }

◆ estime() [1/2]

double TofTrack::estime ( ) const
inline

Definition at line 111 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

111{ return m_estime; }

◆ estime() [2/2]

double TofTrack::estime ( ) const
inline

Definition at line 111 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

111{ return m_estime; }

◆ findEtfData() [1/2]

void TofTrack::findEtfData ( std::vector< TofData * >  tofDataVec1,
std::vector< TofData * >  tofDataVec2,
std::vector< TofData * >  tofDataVec3,
double  zrhit,
unsigned int  iflag 
)

Definition at line 1431 of file TofTrack.cxx.

1431 {
1432
1433 TofData *tof1 = 0;
1434 TofData *tof2 = 0;
1435 TofData *tof3 = 0;
1436
1437 bool findSignal = false;
1438
1439 if( tofDataVec1.size()==0 && tofDataVec2.size()==0 && tofDataVec3.size()==0 ) {
1440 if( iflag == 1 ) {
1441 m_quality1 = ( m_quality1 | 0x300 );
1442 }
1443 else if( iflag == 2 ) {
1444 m_quality2 = ( m_quality2 | 0x300 );
1445 }
1446 }
1447 else {
1448 if( tofDataVec1.size()>0 ) {
1449 tof1 = chooseEtfData1( tofDataVec1, zrhit );
1450 if( ( tof1->quality() & 0xf ) == 0xf ) {
1451 getEtfData( tof1, iflag, 1 );
1452 findSignal = true;
1453 }
1454 }
1455 if( !findSignal && tofDataVec2.size() > 0 ) {
1456 tof2 = chooseEtfData1( tofDataVec2, zrhit );
1457 if( ( tof2->quality() & 0xf ) == 0xf ) {
1458 getEtfData( tof2, iflag, 2 );
1459 findSignal = true;
1460 }
1461 }
1462 if( !findSignal && tofDataVec3.size() > 0 ) {
1463 tof3 = chooseEtfData2( tofDataVec3, zrhit );
1464 if( ( tof3->quality() & 0xf ) == 0xf ) {
1465 getEtfData( tof3, iflag, 3 );
1466 findSignal = true;
1467 }
1468 }
1469 if( !findSignal && tofDataVec1.size()>0 ) {
1470 if( ( ( tof1->quality() & 0xf ) == 0xc ) || ( ( tof1->quality() & 0xf ) == 0x3 ) ) {
1471 getEtfData( tof1, iflag, 4 );
1472 findSignal = true;
1473 }
1474 }
1475 if( !findSignal && tofDataVec2.size() > 0 ) {
1476 if( ( ( tof2->quality() & 0xf ) == 0xc ) || ( ( tof2->quality() & 0xf ) == 0x3 ) ) {
1477 getEtfData( tof2, iflag, 5 );
1478 findSignal = true;
1479 }
1480 }
1481 if( !findSignal && tofDataVec3.size() > 0 ) {
1482 if( ( ( tof3->quality() & 0xf ) == 0xc ) || ( ( tof3->quality() & 0xf ) == 0x3 ) ) {
1483 getEtfData( tof3, iflag, 6 );
1484 findSignal = true;
1485 }
1486 }
1487 if( findSignal ) {
1488 if( iflag == 1 ) {
1489 m_quality1 = ( m_quality1 | 0x300 );
1490 }
1491 else if( iflag == 2 ) {
1492 m_quality2 = ( m_quality2 | 0x300 );
1493 }
1494 }
1495 }
1496
1497 return;
1498}
double tof2(unsigned int i) const
void getEtfData(TofData *tof, unsigned int iflag, unsigned int qual)
Definition: TofTrack.cxx:1828
TofData * chooseEtfData2(std::vector< TofData * > tofDataVec, double zrhit)
Definition: TofTrack.cxx:1549
double tof1(unsigned int i) const
TofData * chooseEtfData1(std::vector< TofData * > tofDataVec, double zrhit)
Definition: TofTrack.cxx:1503

Referenced by match().

◆ findEtfData() [2/2]

void TofTrack::findEtfData ( std::vector< TofData * >  tofDataVec1,
std::vector< TofData * >  tofDataVec2,
std::vector< TofData * >  tofDataVec3,
double  zrhit,
unsigned int  iflag 
)

◆ findTofDataBarrel() [1/2]

void TofTrack::findTofDataBarrel ( std::vector< TofData * >  tofDataVec1,
std::vector< TofData * >  tofDataVec2,
double  zrhit,
unsigned int  iflag,
std::vector< TofTrack * > *&  tofTrackVec 
)

Definition at line 1043 of file TofTrack.cxx.

1043 {
1044
1045 unsigned int qual = 0xf;
1046 TofData* tof = 0;
1047 if( tofDataVec2.size() == 0 ) {
1048 if( tofDataVec1.size() == 0 ) {
1049 qual = 0;
1050 }
1051 else if( tofDataVec1.size() == 1 ) {
1052 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
1053 tof = (*iter1);
1054 qual = 0x1;
1055 }
1056 else if( tofDataVec1.size() > 1 ) {
1057 tof= chooseTofData( tofDataVec1, zrhit );
1058 qual = 0x2;
1059 }
1060 else {
1061 cout << "TofRec::TofTrack::findTofDataBarrel: 1- Impossible!" << endl;
1062 }
1063 }
1064 else if( ( tofDataVec2.size() == 1 ) ) {
1065 if( tofDataVec1.size() == 0 ) {
1066 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
1067 tof = (*iter2);
1068 qual = 0x4;
1069 }
1070 else if( tofDataVec1.size() == 1 ) {
1071 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
1072 if( ((*iter1)->quality()&0x1ff)==0x01f && abs((*iter1)->ztdc()-zrhit)<ztdc_Cut ) {
1073 tof = (*iter1);
1074 }
1075 else {
1076 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
1077 tof = compareTofData( (*iter1), (*iter2), zrhit );
1078 }
1079 qual = 0x5;
1080 }
1081 else if( tofDataVec1.size() > 1 ) {
1082 TofData* tofData1 = chooseTofData( tofDataVec1, zrhit );
1083 if( (tofData1->quality()&0x1ff)==0x01f && abs(tofData1->ztdc()-zrhit)<ztdc_Cut ) {
1084 tof = tofData1;
1085 }
1086 else {
1087 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
1088 tof = compareTofData( tofData1, (*iter2), zrhit );
1089 }
1090 qual = 0x6;
1091 }
1092 else {
1093 cout << "TofRec::TofTrack::findTofDataBarrel: 2- Impossible!" << endl;
1094 }
1095 }
1096 else if( ( tofDataVec2.size() > 1 ) ) {
1097 if( tofDataVec1.size() == 0 ) {
1098 tof = chooseTofData( tofDataVec2, zrhit );
1099 qual = 0x8;
1100 }
1101 else if( tofDataVec1.size() == 1 ) {
1102 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
1103 if( ((*iter1)->quality()&0x1ff)==0x01f && abs((*iter1)->ztdc()-zrhit)<ztdc_Cut ) {
1104 tof = (*iter1);
1105 }
1106 else {
1107 TofData* tofData2 = chooseTofData( tofDataVec2, zrhit );
1108 tof = compareTofData( (*iter1), tofData2, zrhit );
1109 }
1110 qual = 0x9;
1111 }
1112 else if( tofDataVec1.size() > 1 ) {
1113 TofData* tofData1 = chooseTofData( tofDataVec1, zrhit );
1114 if( (tofData1->quality()&0x1ff)==0x01f && abs(tofData1->ztdc()-zrhit)<ztdc_Cut ) {
1115 tof = tofData1;
1116 }
1117 else {
1118 TofData* tofData2 = chooseTofData( tofDataVec2, zrhit );
1119 tof = compareTofData( tofData1, tofData2, zrhit );
1120 }
1121 qual = 0xa;
1122 }
1123 else {
1124 cout << "TofRec::TofTrack::findTofDataBarrel: 3- Impossible!" << endl;
1125 }
1126 }
1127
1128 if( qual != 0 ) {
1129 if( !(tof->used()) ) {
1130 getTofData( tof, iflag );
1131 }
1132 else {
1133 bool z1=false, z2=false;
1134 bool zc1=false, zc2=false;
1135 TofTrack* track=0;
1136 if( iflag==1 ) {
1137 z1 = ( abs( m_zrhit1 - tof->ztdc() ) < ztdc_Cut );
1138 zc1 = ( m_zrhit1 > tof->ztdc() );
1139 std::vector<TofTrack*>::iterator iter = tofTrackVec->begin();
1140 for( ; iter!=tofTrackVec->end(); iter++ ) {
1141 if( (*iter)->hitCase()!=InnerLayer && (*iter)->hitCase()!=DoubleLayer ) continue;
1142 if( tof->tofId()==(*iter)->tofId1() ) {
1143 track = (*iter);
1144 z2 = ( abs( (*iter)->zrhit1() - tof->ztdc() ) < ztdc_Cut );
1145 zc2 = ( (*iter)->zrhit1() > tof->ztdc() );
1146 }
1147 }
1148 }
1149 else if( iflag==2 ) {
1150 z1 = ( abs( m_zrhit2 - tof->ztdc() ) < ztdc_Cut );
1151 zc1 = ( m_zrhit2 > tof->ztdc() );
1152 std::vector<TofTrack*>::iterator iter = tofTrackVec->begin();
1153 for( ; iter!=tofTrackVec->end(); iter++ ) {
1154 if( (*iter)->hitCase()!=OuterLayer && (*iter)->hitCase()!=DoubleLayer ) continue;
1155 if( tof->tofId()==(*iter)->tofId2() ) {
1156 track = (*iter);
1157 z2 = ( abs( (*iter)->zrhit2() - tof->ztdc() ) < ztdc_Cut );
1158 zc2 = ( (*iter)->zrhit2() > tof->ztdc() );
1159 }
1160 }
1161 }
1162
1163 if( ( z1 && z2 )||( (!z1) && (!z2) ) ) {
1164 if( zc1 && !zc2 ) {
1165 getTofDataEast( tof, iflag );
1166 track->getTofDataWest( tof, iflag );
1167 }
1168 else if( !zc1 && zc2 ) {
1169 getTofDataWest( tof, iflag );
1170 track->getTofDataEast( tof, iflag );
1171 }
1172 }
1173 else if( z1 && !z2 ) {
1174 getTofData( tof, iflag );
1175 track->getTofDataNohit( iflag );
1176 }
1177 else if( !z1 && z2 ) {
1178 qual = 0;
1179 }
1180 }
1181 }
1182
1183 if( qual == 0 ) {
1184 if( ( iflag == 1 ) || ( iflag == 3 ) ) {
1185 m_quality1 = ( m_quality1 | 0x300 );
1186 }
1187 else if( iflag == 2 ) {
1188 m_quality2 = ( m_quality2 | 0x300 );
1189 }
1190 else {
1191 cout << "TofRec::TofTrack::findTofDataBarrel: the 1- IFLAG is Out of Range!" << endl;
1192 }
1193 }
1194 else {
1195 qual = ( qual << 12 );
1196 if( ( iflag == 1 ) || ( iflag == 3 ) ) {
1197 m_quality1 = ( m_quality1 | qual );
1198 }
1199 else if( iflag == 2 ) {
1200 m_quality2 = ( m_quality2 | qual );
1201 }
1202 else {
1203 cout << "TofRec::TofTrack::findTofDataBarrel: the 2- IFLAG is Out of Range!" << endl;
1204 }
1205 }
1206
1207 return;
1208}
void getTofData(TofData *tof, unsigned int iflag)
Definition: TofTrack.cxx:1582
TofData * compareTofData(TofData *tofData1, TofData *tofData2, double zrhit)
Definition: TofTrack.cxx:1272
void getTofDataNohit(unsigned int iflag)
Definition: TofTrack.cxx:1786
TofData * chooseTofData(std::vector< TofData * > tofDataVec, double zrhit)
Definition: TofTrack.cxx:1215
void getTofDataWest(TofData *tof, unsigned int iflag)
Definition: TofTrack.cxx:1726
void getTofDataEast(TofData *tof, unsigned int iflag)
Definition: TofTrack.cxx:1666

Referenced by match().

◆ findTofDataBarrel() [2/2]

void TofTrack::findTofDataBarrel ( std::vector< TofData * >  tofDataVec1,
std::vector< TofData * >  tofDataVec2,
double  zrhit,
unsigned int  iflag,
std::vector< TofTrack * > *&  tofTrackVec 
)

◆ findTofDataEndcap() [1/2]

void TofTrack::findTofDataEndcap ( std::vector< TofData * >  tofDataVec1,
std::vector< TofData * >  tofDataVec2,
double  zr1[5] 
)

Definition at line 1294 of file TofTrack.cxx.

1294 {
1295
1296 unsigned int iflag = 3;
1297 unsigned int qual = 0xf;
1298
1299 if( tofDataVec2.size() == 0 ) {
1300 if( tofDataVec1.size() == 0 ) {
1301 qual = 0;
1302 }
1303 else if( tofDataVec1.size() == 1 ) {
1304 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
1305 getTofData( (*iter1), iflag );
1306 qual = 0x1;
1307 }
1308 else if( tofDataVec1.size() > 1 ) {
1309 getTofData( chooseTofDataEndcap( tofDataVec1, zr1 ), iflag );
1310 qual = 0x2;
1311 }
1312 else {
1313 cout << "TofRec::TofTrack::findTofDataEndcap: 1- Impossible!" << endl;
1314 }
1315 }
1316 else if( ( tofDataVec2.size() == 1 ) ) {
1317 if( tofDataVec1.size() == 0 ) {
1318 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
1319 getTofData( (*iter2), iflag );
1320 qual = 0x4;
1321 }
1322 else if( tofDataVec1.size() == 1 ) {
1323 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
1324 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
1325 getTofData( compareTofDataEndcap( (*iter1), (*iter2) ), iflag );
1326 qual = 0x5;
1327 }
1328 else if( tofDataVec1.size() > 1 ) {
1329 TofData* tofData1 = chooseTofDataEndcap( tofDataVec1, zr1 );
1330 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
1331 getTofData( compareTofDataEndcap( tofData1, (*iter2) ), iflag );
1332 qual = 0x6;
1333 }
1334 else {
1335 cout << "TofRec::TofTrack::findTofDataBarrel: 2- Impossible!" << endl;
1336 }
1337 }
1338 else if( ( tofDataVec2.size() > 1 ) ) {
1339 if( tofDataVec1.size() == 0 ) {
1340 getTofData( chooseTofDataEndcap( tofDataVec2, zr1 ), iflag );
1341 qual = 0x8;
1342 }
1343 else if( tofDataVec1.size() == 1 ) {
1344 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
1345 TofData* tofData2 = chooseTofDataEndcap( tofDataVec2, zr1 );
1346 getTofData( compareTofDataEndcap( (*iter1), tofData2 ), iflag );
1347 qual = 0x9;
1348 }
1349 else if( tofDataVec1.size() > 1 ) {
1350 TofData* tofData1 = chooseTofDataEndcap( tofDataVec1, zr1 );
1351 TofData* tofData2 = chooseTofDataEndcap( tofDataVec2, zr1 );
1353 qual = 0xa;
1354 }
1355 else {
1356 cout << "TofRec::TofTrack::findTofDataBarrel: 3- Impossible!" << endl;
1357 }
1358 }
1359
1360 if( qual == 0 ) {
1361 m_quality1 = ( m_quality1 | 0x300 );
1362 }
1363 else {
1364 qual = ( qual << 12 );
1365 m_quality1 = ( m_quality1 | qual );
1366 }
1367
1368 return;
1369}
TofData * chooseTofDataEndcap(std::vector< TofData * > tofDataVec, double zr1[5])
Definition: TofTrack.cxx:1375
TofData * compareTofDataEndcap(TofData *tofData1, TofData *tofData2)
Definition: TofTrack.cxx:1418

Referenced by match().

◆ findTofDataEndcap() [2/2]

void TofTrack::findTofDataEndcap ( std::vector< TofData * >  tofDataVec1,
std::vector< TofData * >  tofDataVec2,
double  zr1[5] 
)

◆ flag() [1/2]

unsigned int TofTrack::flag ( ) const
inline

Definition at line 117 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

117{ return m_flag; }

Referenced by setFlag().

◆ flag() [2/2]

unsigned int TofTrack::flag ( ) const
inline

Definition at line 117 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

117{ return m_flag; }

◆ getEtfData() [1/2]

void TofTrack::getEtfData ( TofData tof,
unsigned int  iflag,
unsigned int  qual 
)

Definition at line 1828 of file TofTrack.cxx.

1828 {
1829
1830 if( iflag == 1 && tof->tofId() != m_id2 ) {
1831 m_tofId1 = tof->tofId();
1832 m_strip1 = tof->strip();
1833 m_qch1 = tof->adcChannelEast();
1834 m_adc1 = tof->adc1();
1835 m_tdc1 = tof->tdc1();
1836 m_qch2 = tof->adcChannelWest();
1837 m_adc2 = tof->adc2();
1838 m_tdc2 = tof->tdc2();
1839 m_ztdc1 = tof->ztdc();
1840 m_zadc1 = tof->zadc();
1841 m_quality1 = ( m_quality1 | ( 0x1f & tof->quality() ) );
1842 if( ( ( tof->quality() & 0x5 ) != 0x5 ) || ( ( ( tof->quality() & 0x5 ) == 0x5 ) && ( abs( tof->ztdc() - m_zrhit1 ) > ztdc_Cut ) ) ) {
1843 m_quality1 = ( m_quality1 | 0x100 );
1844 }
1845 if( ( ( tof->quality() & 0xa ) != 0xa ) || ( ( ( tof->quality() & 0xa ) == 0xa ) && ( abs( tof->zadc() - m_zrhit1 ) > zadc_Cut ) ) ) {
1846 m_quality1 = ( m_quality1 | 0x200 );
1847 }
1848 m_quality1 = ( m_quality1 | ( qual << 12 ) );
1849 tof->setUsed();
1850 if( abs(tof->tofId()-m_id1)== 1 || ( tof->tofId()==0 && m_id1==35 ) || ( tof->tofId()==35 && m_id1==0 ) || ( tof->tofId()==36 && m_id1==71 ) || ( tof->tofId()==71 && m_id1==36 ) ) {
1851 for( unsigned int i=0; i<5; i++ ) {
1852 m_texpInner[i] = m_texpOuter[i];
1853 }
1854 }
1855 }
1856 else if( iflag == 2 && tof->tofId() != m_id1 ) {
1857 m_tofId2 = tof->tofId();
1858 m_strip2 = tof->strip();
1859 m_qch3 = tof->adcChannelEast();
1860 m_adc3 = tof->adc1();
1861 m_tdc3 = tof->tdc1();
1862 m_qch4 = tof->adcChannelWest();
1863 m_adc4 = tof->adc2();
1864 m_tdc4 = tof->tdc2();
1865 m_ztdc2 = tof->ztdc();
1866 m_zadc2 = tof->zadc();
1867 m_quality2 = ( m_quality2 | ( 0x1f & tof->quality() ) );
1868 if( ( ( tof->quality() & 0x5 ) != 0x5 ) || ( ( ( tof->quality() & 0x5 ) == 0x5 ) && ( abs( tof->ztdc() - m_zrhit2 ) > ztdc_Cut ) ) ) {
1869 m_quality2 = ( m_quality2 | 0x100 );
1870 }
1871 if( ( ( tof->quality() & 0xa ) != 0xa ) || ( ( ( tof->quality() & 0xa ) == 0xa ) && ( abs( tof->zadc() - m_zrhit2 ) > zadc_Cut ) ) ) {
1872 m_quality2 = ( m_quality2 | 0x200 );
1873 }
1874 m_quality2 = ( m_quality2 | ( qual << 12 ) );
1875 tof->setUsed();
1876 if( abs(tof->tofId()-m_id2)== 1 || ( tof->tofId()==0 && m_id2==35 ) || ( tof->tofId()==35 && m_id2==0 ) || ( tof->tofId()==36 && m_id2==71 ) || ( tof->tofId()==71 && m_id2==36 ) ) {
1877 for( unsigned int i=0; i<5; i++ ) {
1878 m_texpOuter[i] = m_texpInner[i];
1879 }
1880 }
1881 }
1882
1883 return;
1884}

Referenced by findEtfData().

◆ getEtfData() [2/2]

void TofTrack::getEtfData ( TofData tof,
unsigned int  iflag,
unsigned int  qual 
)

◆ getMultiHit() [1/2]

void TofTrack::getMultiHit ( TofTrack *&  track)

Definition at line 426 of file TofTrack.cxx.

426 {
427 if( m_hitCase == InnerLayer || m_hitCase == OuterLayer || m_hitCase == DoubleLayer ) {
428
429 if( ( m_hitCase==InnerLayer || m_hitCase==DoubleLayer ) && ( track->hitCase()==InnerLayer || track->hitCase()==DoubleLayer ) ) {
430 if( ( abs(m_id1-track->id1())<=1 ) || ( m_id1==0 && track->id1()==87 ) || ( m_id1==87 && track->id1()==0 ) ) {
431 track->setQuality1( ( track->quality1() | 0x400 ) );
432 m_quality1 = ( m_quality1 | 0x400 );
433 }
434 }
435
436 if( ( m_hitCase==OuterLayer || m_hitCase==DoubleLayer ) && ( track->hitCase()==OuterLayer || track->hitCase()==DoubleLayer ) ) {
437 if( ( abs(m_id2-track->id2())<=1 ) || ( m_id2==88 && track->id2()==175 ) || ( m_id2==175 && track->id2()==88 ) ) {
438 track->setQuality2( ( track->quality2() | 0x400 ) );
439 m_quality2 = ( m_quality2 | 0x400 );
440 }
441 }
442
443 }
444 else if( m_hitCase == EastEndcap ) {
445 if( track->hitCase()==EastEndcap ) {
446 if( ( abs(m_id1-track->id1())<=1 ) || ( m_id1==0 && track->id1()==47 ) || ( m_id1==47 && track->id1()==0 ) ) {
447 track->setQuality1( ( track->quality1() | 0x400 ) );
448 m_quality1 = ( m_quality1 | 0x400 );
449 }
450 }
451 }
452 else if( m_hitCase == WestEndcap ) {
453 if( track->hitCase()==WestEndcap ) {
454 if( ( abs(m_id1-track->id1())<=1 ) || ( m_id1==48 && track->id1()==95 ) || ( m_id1==95 && track->id1()==48 ) ) {
455 track->setQuality1( ( track->quality1() | 0x400 ) );
456 m_quality1 = ( m_quality1 | 0x400 );
457 }
458 }
459 }
460 if( m_hitCase == EastEndcapMRPC || m_hitCase == WestEndcapMRPC ) {
461 if( ( m_hitCase==EastEndcapMRPC && track->hitCase()==EastEndcapMRPC ) || ( m_hitCase==WestEndcapMRPC && track->hitCase()==WestEndcapMRPC ) ) {
462 if( m_id1>=0 ) {
463 if( ( m_id1==track->id1() ) && abs(m_istrip1-track->strip1())<=1 ) {
464 track->setQuality1( ( track->quality1() | 0x400 ) );
465 m_quality1 = ( m_quality1 | 0x400 );
466 }
467 }
468 if( m_id2>=0 ) {
469 if( ( m_id2==track->id2() ) && abs(m_istrip2-track->strip2())<=1 ) {
470 track->setQuality1( ( track->quality1() | 0x400 ) );
471 m_quality1 = ( m_quality1 | 0x400 );
472 }
473 }
474 }
475 }
476
477 return;
478}

Referenced by TofRec::execute().

◆ getMultiHit() [2/2]

void TofTrack::getMultiHit ( TofTrack *&  )

◆ getTofData() [1/2]

void TofTrack::getTofData ( TofData tof,
unsigned int  iflag 
)

Definition at line 1582 of file TofTrack.cxx.

1582 {
1583
1584 if( iflag == 1 ) {
1585 m_tofId1 = tof->tofId();
1586 m_strip1 = tof->strip();
1587 if( tofCaliSvc->QElec() ) {
1588 m_qch1 = tof->qtc1();
1589 }
1590 else {
1591 m_qch1 = tof->adcChannelEast();
1592 }
1593 m_adc1 = tof->adc1();
1594 m_tdc1 = tof->tdc1();
1595 if( tofCaliSvc->QElec() ) {
1596 m_qch2 = tof->qtc2();
1597 }
1598 else {
1599 m_qch2 = tof->adcChannelWest();
1600 }
1601 m_adc2 = tof->adc2();
1602 m_tdc2 = tof->tdc2();
1603 m_ztdc1 = tof->ztdc();
1604 m_zadc1 = tof->zadc();
1605 m_quality1 = ( m_quality1 | ( 0x1f & tof->quality() ) );
1606 if( ( ( tof->quality() & 0x5 ) != 0x5 ) || ( ( ( tof->quality() & 0x5 ) == 0x5 ) && ( abs( tof->ztdc() - m_zrhit1 ) > ztdc_Cut ) ) ) {
1607 m_quality1 = ( m_quality1 | 0x100 );
1608 }
1609 if( ( ( tof->quality() & 0xa ) != 0xa ) || ( ( ( tof->quality() & 0xa ) == 0xa ) && ( abs( tof->zadc() - m_zrhit1 ) > zadc_Cut ) ) ) {
1610 m_quality1 = ( m_quality1 | 0x200 );
1611 }
1612 }
1613 else if( iflag == 2 ) {
1614 m_tofId2 = tof->tofId();
1615 m_strip2 = tof->strip();
1616 if( tofCaliSvc->QElec() ) {
1617 m_qch3 = tof->qtc1();
1618 }
1619 else {
1620 m_qch3 = tof->adcChannelEast();
1621 }
1622 m_adc3 = tof->adc1();
1623 m_tdc3 = tof->tdc1();
1624 if( tofCaliSvc->QElec() ) {
1625 m_qch4 = tof->qtc2();
1626 }
1627 else {
1628 m_qch4 = tof->adcChannelWest();
1629 }
1630 m_adc4 = tof->adc2();
1631 m_tdc4 = tof->tdc2();
1632 m_ztdc2 = tof->ztdc();
1633 m_zadc2 = tof->zadc();
1634 m_quality2 = ( m_quality2 | ( 0x1f & tof->quality() ) );
1635 if( ( ( tof->quality() & 0x5 ) != 0x5 ) || ( ( ( tof->quality() & 0x5 ) == 0x5 ) && ( abs( tof->ztdc() - m_zrhit2 ) > ztdc_Cut ) ) ) {
1636 m_quality2 = ( m_quality2 | 0x100 );
1637 }
1638 if( ( ( tof->quality() & 0xa ) != 0xa ) || ( ( ( tof->quality() & 0xa ) == 0xa ) && ( abs( tof->zadc() - m_zrhit2 ) > zadc_Cut ) ) ) {
1639 m_quality2 = ( m_quality2 | 0x200 );
1640 }
1641 }
1642 else if( iflag == 3 ) {
1643 m_tofId1 = tof->tofId();
1644 if( tofCaliSvc->QElec() ) {
1645 m_qch1 = tof->qtc();
1646 }
1647 else {
1648 m_qch1 = tof->adcChannel();
1649 }
1650 m_adc1 = tof->adc();
1651 m_tdc1 = tof->tdc();
1652 m_quality1 = ( m_quality1 | ( 0x1f & tof->quality() ) );
1653 m_quality1 = ( m_quality1 | 0x300 );
1654 }
1655 else {
1656 cout << "TofRec::TofTrack::getTofData: Flag which sign the Barrel/Endcap or Inner/Outer is wrong! Please check it!" << endl;
1657 }
1658 tof->setUsed();
1659 return;
1660}
virtual const int QElec()=0

Referenced by findTofDataBarrel(), and findTofDataEndcap().

◆ getTofData() [2/2]

void TofTrack::getTofData ( TofData tof,
unsigned int  iflag 
)

◆ getTofDataEast() [1/2]

void TofTrack::getTofDataEast ( TofData tof,
unsigned int  iflag 
)

Definition at line 1666 of file TofTrack.cxx.

1666 {
1667
1668 if( iflag == 1 ) {
1669 m_tofId1 = tof->tofId();
1670 m_strip1 = tof->strip();
1671 if( tofCaliSvc->QElec() ) {
1672 m_qch1 = tof->qtc1();
1673 }
1674 else {
1675 m_qch1 = tof->adcChannelEast();
1676 }
1677 m_adc1 = tof->adc1();
1678 m_tdc1 = tof->tdc1();
1679 m_qch2 = -999.0;
1680 m_adc2 = -999.0;
1681 m_tdc2 = -999.0;
1682 m_ztdc1 = tof->ztdc();
1683 m_zadc1 = tof->zadc();
1684 m_quality1 = ( ( m_quality1 & 0xfffffff0 ) | ( 0x1c & tof->quality() ) );
1685 if( ( ( tof->quality() & 0x5 ) != 0x5 ) || ( ( ( tof->quality() & 0x5 ) == 0x5 ) && ( abs( tof->ztdc() - m_zrhit1 ) > ztdc_Cut ) ) ) {
1686 m_quality1 = ( m_quality1 | 0x100 );
1687 }
1688 if( ( ( tof->quality() & 0xa ) != 0xa ) || ( ( ( tof->quality() & 0xa ) == 0xa ) && ( abs( tof->zadc() - m_zrhit1 ) > zadc_Cut ) ) ) {
1689 m_quality1 = ( m_quality1 | 0x200 );
1690 }
1691 }
1692 else if( iflag == 2 ) {
1693 m_tofId2 = tof->tofId();
1694 if( tofCaliSvc->QElec() ) {
1695 m_qch3 = tof->qtc1();
1696 }
1697 else {
1698 m_qch3 = tof->adcChannelEast();
1699 }
1700 m_adc3 = tof->adc1();
1701 m_tdc3 = tof->tdc1();
1702 m_qch4 = -999.0;
1703 m_adc4 = -999.0;
1704 m_tdc4 = -999.0;
1705 m_ztdc2 = tof->ztdc();
1706 m_zadc2 = tof->zadc();
1707 m_quality2 = ( ( m_quality2 & 0xfffffff0 ) | ( 0x1c & tof->quality() ) );
1708 if( ( ( tof->quality() & 0x5 ) != 0x5 ) || ( ( ( tof->quality() & 0x5 ) == 0x5 ) && ( abs( tof->ztdc() - m_zrhit2 ) > ztdc_Cut ) ) ) {
1709 m_quality2 = ( m_quality2 | 0x100 );
1710 }
1711 if( ( ( tof->quality() & 0xa ) != 0xa ) || ( ( ( tof->quality() & 0xa ) == 0xa ) && ( abs( tof->zadc() - m_zrhit2 ) > zadc_Cut ) ) ) {
1712 m_quality2 = ( m_quality2 | 0x200 );
1713 }
1714 }
1715 else {
1716 cout << "TofRec::TofTrack::getTofDataEast: Flag which sign the Barrel/Endcap or Inner/Outer is wrong! Please check it!" << endl;
1717 }
1718 tof->setUsed();
1719 return;
1720}

Referenced by findTofDataBarrel().

◆ getTofDataEast() [2/2]

void TofTrack::getTofDataEast ( TofData tof,
unsigned int  iflag 
)

◆ getTofDataNohit() [1/2]

void TofTrack::getTofDataNohit ( unsigned int  iflag)

Definition at line 1786 of file TofTrack.cxx.

1786 {
1787
1788 if( iflag == 1 ) {
1789 m_tofId1 = -99;
1790 m_strip1 = -99;
1791 m_qch1 = -999.0;
1792 m_adc1 = -999.0;
1793 m_tdc1 = -999.0;
1794 m_qch2 = -999.0;
1795 m_adc2 = -999.0;
1796 m_tdc2 = -999.0;
1797 m_ztdc1 = -999.0;
1798 m_zadc1 = -999.0;
1799 m_quality1 = ( m_quality1 & 0x700 );
1800 if( m_hitCase == InnerLayer ) { m_hitCase = NoHit; }
1801 else if( m_hitCase == DoubleLayer ) { m_hitCase = OuterLayer; }
1802 }
1803 else if( iflag == 2 ) {
1804 m_tofId2 = -99;
1805 m_qch3 = -999.0;
1806 m_adc3 = -999.0;
1807 m_tdc3 = -999.0;
1808 m_qch4 = -999.0;
1809 m_adc4 = -999.0;
1810 m_tdc4 = -999.0;
1811 m_ztdc2 = -999.0;
1812 m_zadc2 = -999.0;
1813 m_quality2 = ( m_quality2 & 0x700 );
1814 if( m_hitCase == OuterLayer ) { m_hitCase = NoHit; }
1815 else if( m_hitCase == DoubleLayer ) { m_hitCase = InnerLayer; }
1816 }
1817 else {
1818 cout << "TofRec::TofTrack::getTofData: Flag which sign the Barrel/Endcap or Inner/Outer is wrong! Please check it!" << endl;
1819 }
1820
1821 return;
1822}

Referenced by findTofDataBarrel().

◆ getTofDataNohit() [2/2]

void TofTrack::getTofDataNohit ( unsigned int  iflag)

◆ getTofDataWest() [1/2]

void TofTrack::getTofDataWest ( TofData tof,
unsigned int  iflag 
)

Definition at line 1726 of file TofTrack.cxx.

1726 {
1727
1728 if( iflag == 1 ) {
1729 m_tofId1 = tof->tofId();
1730 m_strip1 = tof->strip();
1731 m_qch1 = -999.0;
1732 m_adc1 = -999.0;
1733 m_tdc1 = -999.0;
1734 if( tofCaliSvc->QElec() ) {
1735 m_qch2 = tof->qtc2();
1736 }
1737 else {
1738 m_qch2 = tof->adcChannelWest();
1739 }
1740 m_adc2 = tof->adc2();
1741 m_tdc2 = tof->tdc2();
1742 m_ztdc1 = tof->ztdc();
1743 m_zadc1 = tof->zadc();
1744 m_quality1 = ( ( m_quality1 & 0xfffffff0 ) | ( 0x13 & tof->quality() ) );
1745 if( ( ( tof->quality() & 0x5 ) != 0x5 ) || ( ( ( tof->quality() & 0x5 ) == 0x5 ) && ( abs( tof->ztdc() - m_zrhit1 ) > ztdc_Cut ) ) ) {
1746 m_quality1 = ( m_quality1 | 0x100 );
1747 }
1748 if( ( ( tof->quality() & 0xa ) != 0xa ) || ( ( ( tof->quality() & 0xa ) == 0xa ) && ( abs( tof->zadc() - m_zrhit1 ) > zadc_Cut ) ) ) {
1749 m_quality1 = ( m_quality1 | 0x200 );
1750 }
1751 }
1752 else if( iflag == 2 ) {
1753 m_tofId2 = tof->tofId();
1754 m_qch3 = -999.0;
1755 m_adc3 = -999.0;
1756 m_tdc3 = -999.0;
1757 if( tofCaliSvc->QElec() ) {
1758 m_qch4 = tof->qtc2();
1759 }
1760 else {
1761 m_qch4 = tof->adcChannelWest();
1762 }
1763 m_adc4 = tof->adc2();
1764 m_tdc4 = tof->tdc2();
1765 m_ztdc2 = tof->ztdc();
1766 m_zadc2 = tof->zadc();
1767 m_quality2 = ( ( m_quality2 & 0xfffffff0 ) | ( 0x13 & tof->quality() ) );
1768 if( ( ( tof->quality() & 0x5 ) != 0x5 ) || ( ( ( tof->quality() & 0x5 ) == 0x5 ) && ( abs( tof->ztdc() - m_zrhit2 ) > ztdc_Cut ) ) ) {
1769 m_quality2 = ( m_quality2 | 0x100 );
1770 }
1771 if( ( ( tof->quality() & 0xa ) != 0xa ) || ( ( ( tof->quality() & 0xa ) == 0xa ) && ( abs( tof->zadc() - m_zrhit2 ) > zadc_Cut ) ) ) {
1772 m_quality2 = ( m_quality2 | 0x200 );
1773 }
1774 }
1775 else {
1776 cout << "TofRec::TofTrack::getTofDataWest: Flag which sign the Barrel/Endcap or Inner/Outer is wrong! Please check it!" << endl;
1777 }
1778 tof->setUsed();
1779 return;
1780}

Referenced by findTofDataBarrel().

◆ getTofDataWest() [2/2]

void TofTrack::getTofDataWest ( TofData tof,
unsigned int  iflag 
)

◆ hitCase() [1/2]

◆ hitCase() [2/2]

ExtTrackCase TofTrack::hitCase ( ) const
inline

Definition at line 36 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

36{ return m_hitCase; }

◆ id1() [1/2]

int TofTrack::id1 ( ) const
inline

Definition at line 29 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

29{ return m_id1; }

Referenced by TofCheckDigi::Fill_TofTrack(), and getMultiHit().

◆ id1() [2/2]

int TofTrack::id1 ( ) const
inline

Definition at line 29 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

29{ return m_id1; }

◆ id2() [1/2]

int TofTrack::id2 ( ) const
inline

Definition at line 30 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

30{ return m_id2; }

Referenced by TofCheckDigi::Fill_TofTrack(), and getMultiHit().

◆ id2() [2/2]

int TofTrack::id2 ( ) const
inline

Definition at line 30 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

30{ return m_id2; }

◆ isNoHit() [1/2]

bool TofTrack::isNoHit ( ) const
inline

Definition at line 120 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

120{ return m_hitCase==NoHit; }

◆ isNoHit() [2/2]

bool TofTrack::isNoHit ( ) const
inline

Definition at line 120 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

120{ return m_hitCase==NoHit; }

◆ istrip1() [1/2]

int TofTrack::istrip1 ( ) const
inline

Definition at line 31 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

31{ return m_istrip1; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ istrip1() [2/2]

int TofTrack::istrip1 ( ) const
inline

Definition at line 31 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

31{ return m_istrip1; }

◆ istrip2() [1/2]

int TofTrack::istrip2 ( ) const
inline

Definition at line 32 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

32{ return m_istrip2; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ istrip2() [2/2]

int TofTrack::istrip2 ( ) const
inline

Definition at line 32 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

32{ return m_istrip2; }

◆ kal() [1/2]

int TofTrack::kal ( unsigned int  i) const
inline

Definition at line 49 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

49{ return m_kal[i]; }

Referenced by TofCheckDigi::Fill_TofTrack(), and setExtTrack().

◆ kal() [2/2]

int TofTrack::kal ( unsigned int  i) const
inline

Definition at line 49 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

49{ return m_kal[i]; }

◆ match() [1/2]

void TofTrack::match ( bool  forCalibration,
std::vector< int >  deadId,
std::vector< TofTrack * > *&  tofTrackVec 
)

Definition at line 849 of file TofTrack.cxx.

849 {
850
851 if( m_hitCase == NoHit ) return;
852
853 if( m_hitCase == InnerLayer ) {
854 findTofDataBarrel( m_tofData1, m_tofData2, m_zrhit1, 1, tofTrackVec );
855 if( ( m_quality1 & 0x10 ) == 0 ) { m_hitCase = NoHit; }
856 }
857 else if( m_hitCase == OuterLayer ) {
858 findTofDataBarrel( m_tofData3, m_tofData4, m_zrhit2, 2, tofTrackVec );
859 if( ( m_quality2 & 0x10 ) == 0 ) { m_hitCase = NoHit; }
860 }
861 else if( m_hitCase == DoubleLayer ) {
862 findTofDataBarrel( m_tofData1, m_tofData2, m_zrhit1, 1, tofTrackVec );
863 if( ( m_quality1 & 0x10 ) == 0 ) { m_hitCase = OuterLayer; }
864 findTofDataBarrel( m_tofData3, m_tofData4, m_zrhit2, 2, tofTrackVec );
865 if( ( m_quality2 & 0x10 ) == 0 ) {
866 if( m_hitCase == DoubleLayer ) {
867 m_hitCase = InnerLayer;
868 }
869 else if( m_hitCase == OuterLayer ) {
870 m_hitCase = NoHit;
871 }
872 else {
873 cout << "TofRec::TofTrack::match: 2- Impossible!" << endl;
874 }
875 }
876 }
877 else if( ( m_hitCase == EastEndcap ) || ( m_hitCase == WestEndcap ) ) {
878 findTofDataEndcap( m_tofData1, m_tofData2, m_zr1 );
879 }
880 else if( ( m_hitCase == EastEndcapMRPC ) || ( m_hitCase == WestEndcapMRPC ) ) {
881 findEtfData( m_tofData1, m_tofData2, m_tofData3, m_zrhit1, 1 );
882 findEtfData( m_tofData4, m_tofData5, m_tofData6, m_zrhit2, 2 );
883 }
884 else {
885 cout << "TofRec::TofTrack::match: 1- Impossible!" << endl;
886 }
887
888 if( forCalibration ) {
889 // set Data Sample for Calibration, double layer, only one hit for counter, T and Q.
890 if( m_hitCase == DoubleLayer ) {
891 if( ( ( m_quality1 & 0xf ) == 0xf ) && ( ( m_quality2 & 0xf ) == 0xf ) ) {
892 m_quality1 = ( m_quality1 | 0x800 ); // Calibration Sample
893 m_quality2 = ( m_quality2 | 0x800 ); // Calibration Sample
894 }
895 else {
896 std::vector<int>::iterator iter = deadId.begin();
897 for( ; iter != deadId.end(); iter++ ) {
898 Identifier iden = Identifier(*iter);
899 int barrel = TofID::barrel_ec(iden);
900 int layer = TofID::layer(iden);
901 int tofId = TofID::phi_module(iden);
902 int east = TofID::end(iden);
903 if( barrel == 1 ) {
904 if( layer==0 ) {
905 if( m_tofId1 == tofId ) {
906 if( ( m_quality2 & 0xf ) == 0xf ) {
907 if( ( ( east == 0 ) && ( ( ( m_quality1 & 0xf ) == 0x3 ) || ( ( m_quality1 & 0xf ) == 0x7 ) || ( ( m_quality1 & 0xf ) == 0xb ) ) ) || ( ( east == 1 ) && ( ( ( m_quality1 & 0xf ) == 0xc ) || ( ( m_quality1 & 0xf ) == 0xd ) || ( ( m_quality1 & 0xf ) == 0xe ) ) ) ) {
908 m_quality1 = ( m_quality1 | 0x800 );
909 m_quality2 = ( m_quality2 | 0x800 );
910
911 }
912 }
913 }
914 }
915 else if( layer == 1 ) {
916 if( m_tofId2 == (tofId+88) ) {
917 if( ( m_quality1 & 0xf ) == 0xf ) {
918 if( ( ( east == 0 ) && ( ( ( m_quality2 & 0xf ) == 0x3 ) || ( ( m_quality2 & 0xf ) == 0x7 ) || ( ( m_quality2 & 0xf ) == 0xb ) ) ) || ( ( east == 1 ) && ( ( ( m_quality2 & 0xf ) == 0xc ) || ( ( m_quality2 & 0xf ) == 0xd ) || ( ( m_quality2 & 0xf ) == 0xe ) ) ) ) {
919 m_quality1 = ( m_quality1 | 0x800 );
920 m_quality2 = ( m_quality2 | 0x800 );
921 }
922 }
923 }
924 }
925 }
926 }
927 }
928 }
929 // set Data Sample for Calibration, only one hit for counter, T and Q.
930 else if( m_hitCase == InnerLayer ) {
931 if( ( m_quality1 & 0xf ) == 0xf ) {
932 m_quality1 = ( m_quality1 | 0x800 ); // Calibration Sample
933 }
934 else {
935 std::vector<int>::iterator iter = deadId.begin();
936 for( ; iter != deadId.end(); iter++ ) {
937 Identifier iden = Identifier(*iter);
938 int barrel = TofID::barrel_ec(iden);
939 int layer = TofID::layer(iden);
940 int tofId = TofID::phi_module(iden);
941 int east = TofID::end(iden);
942 if( barrel == 1 ) {
943 if( layer==0 ) {
944 if( m_tofId1 == tofId ) {
945 if( ( ( east == 0 ) && ( ( ( m_quality1 & 0xf ) == 0x3 ) || ( ( m_quality1 & 0xf ) == 0x7 ) || ( ( m_quality1 & 0xf ) == 0xb ) ) ) || ( ( east == 1 ) && ( ( ( m_quality1 & 0xf ) == 0xc ) || ( ( m_quality1 & 0xf ) == 0xd ) || ( ( m_quality1 & 0xf ) == 0xe ) ) ) ) {
946 m_quality1 = ( m_quality1 | 0x800 );
947 }
948 }
949 }
950 }
951 }
952 }
953 }
954
955 // set Data Sample for Calibration, only one hit for counter, T and Q.
956 if( ( ( m_hitCase == EastEndcap ) || ( m_hitCase == WestEndcap ) ) && ( ( m_quality1 & 0xf ) == 0xc ) ) {
957 m_quality1 = ( m_quality1 | 0x800 ); // Calibration Sample
958 }
959
960 // set Data Sample for Calibration.
961 if( ( m_hitCase == EastEndcapMRPC ) || ( m_hitCase == WestEndcapMRPC ) ) {
962 if( ( ( m_quality1 & 0xf000 ) == 0x1000 ) || ( ( m_quality1 & 0xf000 ) == 0x2000 ) ) {
963 if( ( m_quality1 & 0xf ) == 0xf ) {
964 m_quality1 = ( m_quality1 | 0x800 ); // Calibration Sample
965 }
966 }
967 else if( ( ( m_quality1 & 0xf000 ) == 0x4000 ) ) {
968 std::vector<int>::iterator iter = deadId.begin();
969 for( ; iter != deadId.end(); iter++ ) {
970 if( (*iter)==1 ) {
971 if( ( m_tofId1==3 && ( m_strip1==1 || m_strip1==3 || ( m_strip1>=5 && m_strip1<=11 ) ) ) || ( m_tofId1==13 && m_strip1==7 ) ) {
972 if( ( m_quality1 & 0xf ) == 0xc ) {
973 m_quality1 = ( m_quality1 | 0x800 );
974 }
975 }
976 if( m_tofId1==13 && m_strip1==5 ) {
977 if( ( m_quality1 & 0xf ) == 0x3 ) {
978 m_quality1 = ( m_quality1 | 0x800 );
979 }
980 }
981 }
982 else {
983 Identifier iden = Identifier(*iter);
984 int barrel = TofID::barrel_ec( iden );
985 if( barrel == 3 ) {
986 int endcap = TofID::endcap( iden );
987 int tofid = TofID::module( iden );
988 int strip = TofID::strip( iden );
989 int east = TofID::end( iden );
990 if( ( m_tofId1 == ( endcap*36 + tofid ) ) && ( m_strip1 == strip ) ) {
991 if( ( ( east == 0 ) && ( ( ( m_quality1 & 0xf ) == 0x3 ) || ( ( m_quality1 & 0xf ) == 0x7 ) || ( ( m_quality1 & 0xf ) == 0xb ) ) ) || ( ( east == 1 ) && ( ( ( m_quality1 & 0xf ) == 0xc ) || ( ( m_quality1 & 0xf ) == 0xd ) || ( ( m_quality1 & 0xf ) == 0xe ) ) ) ) {
992 m_quality1 = ( m_quality1 | 0x800 );
993 }
994 }
995 }
996 }
997 }
998 }
999
1000 if( ( ( m_quality2 & 0xf000 ) == 0x1000 ) || ( ( m_quality2 & 0xf000 ) == 0x2000 ) ) {
1001 if( ( m_quality2 & 0xf ) == 0xf ) {
1002 m_quality2 = ( m_quality2 | 0x800 ); // Calibration Sample
1003 }
1004 }
1005 else if( ( m_quality2 & 0xf000 ) == 0x4000 ) {
1006 std::vector<int>::iterator iter = deadId.begin();
1007 for( ; iter != deadId.end(); iter++ ) {
1008 if( (*iter)==2 ) {
1009 if( m_tofId2==34 && ( m_strip2>=0 && m_strip1<=5 ) ) {
1010 if( ( m_quality2 & 0xf ) == 0x3 ) {
1011 m_quality2 = ( m_quality2 | 0x800 );
1012 }
1013 }
1014 }
1015 else {
1016 Identifier iden = Identifier(*iter);
1017 int barrel = TofID::barrel_ec( iden );
1018 if( barrel == 3 ) {
1019 int endcap = TofID::endcap( iden );
1020 int tofid = TofID::module( iden );
1021 int strip = TofID::strip( iden );
1022 int east = TofID::end( iden );
1023 if( ( m_tofId2 == ( endcap*36 + tofid ) ) && ( m_strip2 == strip ) ) {
1024 if( ( ( east == 0 ) && ( ( ( m_quality2 & 0xf ) == 0x3 ) || ( ( m_quality2 & 0xf ) == 0x7 ) || ( ( m_quality2 & 0xf ) == 0xb ) ) ) || ( ( east == 1 ) && ( ( ( m_quality2 & 0xf ) == 0xc ) || ( ( m_quality2 & 0xf ) == 0xd ) || ( ( m_quality2 & 0xf ) == 0xe ) ) ) ) {
1025 m_quality2 = ( m_quality2 | 0x800 );
1026 }
1027 }
1028 }
1029 }
1030 }
1031 }
1032 }
1033 }
1034
1035 return;
1036}
static int endcap(const Identifier &id)
Definition: TofID.cxx:124
static int strip(const Identifier &id)
Definition: TofID.cxx:136
static int end(const Identifier &id)
Definition: TofID.cxx:79
static int phi_module(const Identifier &id)
Definition: TofID.cxx:73
static int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
Definition: TofID.cxx:61
static int layer(const Identifier &id)
Definition: TofID.cxx:66
static int module(const Identifier &id)
Definition: TofID.cxx:130
void findEtfData(std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, std::vector< TofData * > tofDataVec3, double zrhit, unsigned int iflag)
Definition: TofTrack.cxx:1431
void findTofDataEndcap(std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zr1[5])
Definition: TofTrack.cxx:1294
void findTofDataBarrel(std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zrhit, unsigned int iflag, std::vector< TofTrack * > *&tofTrackVec)
Definition: TofTrack.cxx:1043

◆ match() [2/2]

void TofTrack::match ( bool  forCalibration,
std::vector< int >  deadId,
std::vector< TofTrack * > *&  tofTrackVec 
)

◆ p() [1/2]

double TofTrack::p ( ) const
inline

Definition at line 37 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

37{ return m_momentum; }

Referenced by TofCheckDigi::Fill_TofTrack(), and setExtTrack().

◆ p() [2/2]

double TofTrack::p ( ) const
inline

Definition at line 37 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

37{ return m_momentum; }

◆ path() [1/2]

double TofTrack::path ( ) const
inline

Definition at line 38 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

38{ return m_path; }

◆ path() [2/2]

double TofTrack::path ( ) const
inline

Definition at line 38 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

38{ return m_path; }

◆ path1() [1/2]

double TofTrack::path1 ( ) const
inline

Definition at line 39 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

39{ return m_path1; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ path1() [2/2]

double TofTrack::path1 ( ) const
inline

Definition at line 39 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

39{ return m_path1; }

◆ path2() [1/2]

double TofTrack::path2 ( ) const
inline

Definition at line 40 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

40{ return m_path2; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ path2() [2/2]

double TofTrack::path2 ( ) const
inline

Definition at line 40 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

40{ return m_path2; }

◆ ph() [1/2]

double TofTrack::ph ( ) const
inline

Definition at line 79 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

79{ return m_ph; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ ph() [2/2]

double TofTrack::ph ( ) const
inline

Definition at line 79 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

79{ return m_ph; }

◆ ph1() [1/2]

double TofTrack::ph1 ( ) const
inline

Definition at line 77 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

77{ return m_ph1; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ ph1() [2/2]

double TofTrack::ph1 ( ) const
inline

Definition at line 77 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

77{ return m_ph1; }

◆ ph11() [1/2]

double TofTrack::ph11 ( ) const
inline

Definition at line 73 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

73{ return m_ph11; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ ph11() [2/2]

double TofTrack::ph11 ( ) const
inline

Definition at line 73 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

73{ return m_ph11; }

◆ ph12() [1/2]

double TofTrack::ph12 ( ) const
inline

Definition at line 74 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

74{ return m_ph12; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ ph12() [2/2]

double TofTrack::ph12 ( ) const
inline

Definition at line 74 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

74{ return m_ph12; }

◆ ph2() [1/2]

double TofTrack::ph2 ( ) const
inline

Definition at line 78 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

78{ return m_ph2; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ ph2() [2/2]

double TofTrack::ph2 ( ) const
inline

Definition at line 78 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

78{ return m_ph2; }

◆ ph21() [1/2]

double TofTrack::ph21 ( ) const
inline

Definition at line 75 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

75{ return m_ph21; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ ph21() [2/2]

double TofTrack::ph21 ( ) const
inline

Definition at line 75 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

75{ return m_ph21; }

◆ ph22() [1/2]

double TofTrack::ph22 ( ) const
inline

Definition at line 76 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

76{ return m_ph22; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ ph22() [2/2]

double TofTrack::ph22 ( ) const
inline

Definition at line 76 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

76{ return m_ph22; }

◆ phi1() [1/2]

double TofTrack::phi1 ( ) const
inline

Definition at line 62 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

62{ return m_phi1; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ phi1() [2/2]

double TofTrack::phi1 ( ) const
inline

Definition at line 62 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

62{ return m_phi1; }

◆ phi2() [1/2]

double TofTrack::phi2 ( ) const
inline

Definition at line 63 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

63{ return m_phi2; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ phi2() [2/2]

double TofTrack::phi2 ( ) const
inline

Definition at line 63 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

63{ return m_phi2; }

◆ qch1() [1/2]

double TofTrack::qch1 ( ) const
inline

Definition at line 89 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

89{ return m_qch1; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ qch1() [2/2]

double TofTrack::qch1 ( ) const
inline

Definition at line 89 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

89{ return m_qch1; }

◆ qch2() [1/2]

double TofTrack::qch2 ( ) const
inline

Definition at line 90 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

90{ return m_qch2; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ qch2() [2/2]

double TofTrack::qch2 ( ) const
inline

Definition at line 90 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

90{ return m_qch2; }

◆ qch3() [1/2]

double TofTrack::qch3 ( ) const
inline

Definition at line 91 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

91{ return m_qch3; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ qch3() [2/2]

double TofTrack::qch3 ( ) const
inline

Definition at line 91 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

91{ return m_qch3; }

◆ qch4() [1/2]

double TofTrack::qch4 ( ) const
inline

Definition at line 92 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

92{ return m_qch4; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ qch4() [2/2]

double TofTrack::qch4 ( ) const
inline

Definition at line 92 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

92{ return m_qch4; }

◆ quality() [1/2]

unsigned int TofTrack::quality ( ) const
inline

Definition at line 66 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

66{ return m_quality; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ quality() [2/2]

unsigned int TofTrack::quality ( ) const
inline

Definition at line 66 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

66{ return m_quality; }

◆ quality1() [1/2]

unsigned int TofTrack::quality1 ( ) const
inline

Definition at line 64 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

64{ return m_quality1; }

Referenced by TofCheckDigi::Fill_TofTrack(), and getMultiHit().

◆ quality1() [2/2]

unsigned int TofTrack::quality1 ( ) const
inline

Definition at line 64 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

64{ return m_quality1; }

◆ quality2() [1/2]

unsigned int TofTrack::quality2 ( ) const
inline

Definition at line 65 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

65{ return m_quality2; }

Referenced by TofCheckDigi::Fill_TofTrack(), and getMultiHit().

◆ quality2() [2/2]

unsigned int TofTrack::quality2 ( ) const
inline

Definition at line 65 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

65{ return m_quality2; }

◆ qualityAnalysis() [1/2]

void TofTrack::qualityAnalysis ( )

◆ qualityAnalysis() [2/2]

void TofTrack::qualityAnalysis ( )

◆ setCalibration() [1/2]

void TofTrack::setCalibration ( )

Definition at line 1892 of file TofTrack.cxx.

1892 {
1893
1894 bool barrel = ( ( m_hitCase == InnerLayer ) || ( m_hitCase == OuterLayer ) || ( m_hitCase == DoubleLayer ) );
1895 bool endcap = ( ( m_hitCase == EastEndcap ) || ( m_hitCase == WestEndcap ) );
1896 bool endcapMRPC = ( ( m_hitCase == EastEndcapMRPC ) || ( m_hitCase == WestEndcapMRPC ) );
1897
1898 bool innerEast = ( ( m_quality1 & 0xc ) == 0xc );
1899 bool innerWest = ( ( m_quality1 & 0x3 ) == 0x3 );
1900 bool outerEast = ( ( m_quality2 & 0xc ) == 0xc );
1901 bool outerWest = ( ( m_quality2 & 0x3 ) == 0x3 );
1902 bool innerLayer = ( ( m_quality1 & 0xf ) == 0xf );
1903 bool outerLayer = ( ( m_quality2 & 0xf ) == 0xf );
1904
1905 bool endcapData = ( ( m_quality1 & 0xc ) == 0xc );
1906
1907 if( m_hitCase == DoubleLayer ) {
1908 for( unsigned int i=0; i<5; i++ ) {
1909 m_texp[i] = tofCaliSvc->BTimeCluster( m_texpInner[i], m_texpOuter[i], m_zr1[i], m_zr2[i], m_tofId1, m_tofId2 );
1910 }
1911 m_path = tofCaliSvc->BTimeCluster( m_path1, m_path2, m_zrhit1, m_zrhit2, m_tofId1, m_tofId2 );
1912 }
1913
1914 if( barrel ) {
1915 if( innerEast ) {
1916 for( unsigned int i=0; i<5; i++ ) {
1917 m_tof11[i] = tofCaliSvc->BTime1( m_adc1, m_tdc1-m_estime, m_zr1[i], m_tofId1, m_estime );
1918 }
1919 m_sigma11 = tofCaliSvc->BSigma1( m_zrhit1, m_tofId1 );
1920 m_ph11 = m_adc1;
1921 }
1922
1923 if( innerWest ) {
1924 for( unsigned int i=0; i<5; i++ ) {
1925 m_tof12[i] = tofCaliSvc->BTime2( m_adc2, m_tdc2-m_estime, m_zr1[i], m_tofId1, m_estime );
1926 }
1927 m_sigma12 = tofCaliSvc->BSigma2( m_zrhit1, m_tofId1 );
1928 m_ph12 = m_adc2;
1929 }
1930
1931 if( innerLayer ) {
1932 for( unsigned int i=0; i<5; i++ ) {
1933 m_tof1[i] = tofCaliSvc->BTimeCounter( m_tof11[i], m_tof12[i], m_zr1[i], m_tofId1 );
1934 }
1935 m_sigma1 = tofCaliSvc->BSigmaCounter( m_zrhit1, m_tofId1 );
1936 m_ph1 = tofCaliSvc->BPulseHeight( m_adc1, m_adc2, m_zrhit1, m_theta1, m_tofId1 );
1937 }
1938
1939 if( outerEast ) {
1940 for( unsigned int i=0; i<5; i++ ) {
1941 m_tof21[i] = tofCaliSvc->BTime1( m_adc3, m_tdc3-m_estime, m_zr2[i], m_tofId2, m_estime );
1942 }
1943 m_sigma21 = tofCaliSvc->BSigma1( m_zrhit2, m_tofId2 );
1944 m_ph21 = m_adc3;
1945 }
1946
1947 if( outerWest ) {
1948 for( unsigned int i=0; i<5; i++ ) {
1949 m_tof22[i] = tofCaliSvc->BTime2( m_adc4, m_tdc4-m_estime, m_zr2[i], m_tofId2, m_estime );
1950 }
1951 m_sigma22 = tofCaliSvc->BSigma2( m_zrhit2, m_tofId2 );
1952 m_ph22 = m_adc4;
1953 }
1954
1955 if( outerLayer ) {
1956 for( unsigned int i=0; i<5; i++ ) {
1957 m_tof2[i] = tofCaliSvc->BTimeCounter( m_tof21[i], m_tof22[i], m_zr2[i], m_tofId2 );
1958 }
1959 m_sigma2 = tofCaliSvc->BSigmaCounter( m_zrhit2, m_tofId2 );
1960 m_ph2 = tofCaliSvc->BPulseHeight( m_adc3, m_adc4, m_zrhit2, m_theta2, m_tofId2 );
1961 }
1962
1963 if( innerLayer && outerLayer ) {
1964 for( unsigned int i=0; i<5; i++ ) {
1965 m_tof[i] = tofCaliSvc->BTimeCluster( m_tof1[i], m_tof2[i], m_zr1[i], m_zr2[i], m_tofId1, m_tofId2 );
1966 }
1967 m_sigma = tofCaliSvc->BSigmaCluster( m_zrhit1, m_zrhit2, m_tofId1, m_tofId2 );
1968 m_ph = tofCaliSvc->BTimeCluster( m_ph1, m_ph2, m_zrhit1, m_zrhit2, m_tofId1, m_tofId2 );
1969 }
1970 }
1971
1972 if( endcap ) {
1973 if( endcapData ) {
1974 for( unsigned int i=0; i<5; i++ ) {
1975 m_tof11[i] = tofCaliSvc->ETime( m_adc1, m_tdc1-m_estime, m_zr1[i], m_tofId1 );
1976 }
1977 m_sigma11 = tofCaliSvc->ESigma( m_zrhit1, m_tofId1 );
1978 m_ph11 = tofCaliSvc->EPulseHeight( m_adc1, m_zrhit1, m_theta1, m_tofId1 );
1979 m_quality = 1;
1980 if( (m_quality1&0xa000)!=0 ) { m_quality = 4; }
1981 }
1982 }
1983
1984 if( endcapMRPC ) {
1985 if( innerEast ) {
1986 if( m_tofId1>-1 ) {
1987 for( unsigned int i=0; i<5; i++ ) {
1988 if( m_run > 0 ) {
1989 m_tof11[i] = tofCaliSvc->EtfTime1( m_adc1, m_tdc1-m_estime, m_zr1[i], m_tofId1, m_strip1, m_estime );
1990 }
1991 else {
1992 m_tof11[i] = tofCaliSvc->EtfTimeMC1( m_adc1, m_tdc1-m_estime, m_zr1[i], m_tofId1, m_strip1, m_estime );
1993 }
1994 }
1995 m_ph11 = m_adc1;
1996 }
1997 }
1998 if( innerWest ) {
1999 if( m_tofId1>-1 ) {
2000 for( unsigned int i=0; i<5; i++ ) {
2001 if( m_run > 0 ) {
2002 m_tof12[i] = tofCaliSvc->EtfTime2( m_adc2, m_tdc2-m_estime, m_zr1[i], m_tofId1, m_strip1, m_estime );
2003 }
2004 else {
2005 m_tof12[i] = tofCaliSvc->EtfTimeMC2( m_adc2, m_tdc2-m_estime, m_zr1[i], m_tofId1, m_strip1, m_estime );
2006 }
2007 }
2008 m_ph12 = m_adc2;
2009 }
2010 }
2011 if( outerEast ) {
2012 if( m_tofId2>-1 ) {
2013 for( unsigned int i=0; i<5; i++ ) {
2014 if( m_run > 0 ) {
2015 m_tof21[i] = tofCaliSvc->EtfTime1( m_adc3, m_tdc3-m_estime, m_zr2[i], m_tofId2, m_strip2, m_estime );
2016 }
2017 else {
2018 m_tof21[i] = tofCaliSvc->EtfTimeMC1( m_adc3, m_tdc3-m_estime, m_zr2[i], m_tofId2, m_strip2, m_estime );
2019 }
2020 }
2021 m_ph21 = m_adc3;
2022 }
2023 }
2024 if( outerWest ) {
2025 if( m_tofId2>-1 ) {
2026 for( unsigned int i=0; i<5; i++ ) {
2027 if( m_run > 0 ) {
2028 m_tof22[i] = tofCaliSvc->EtfTime2( m_adc4, m_tdc4-m_estime, m_zr2[i], m_tofId2, m_strip2, m_estime );
2029 }
2030 else {
2031 m_tof22[i] = tofCaliSvc->EtfTimeMC2( m_adc4, m_tdc4-m_estime, m_zr2[i], m_tofId2, m_strip2, m_estime );
2032 }
2033 }
2034 m_ph22 = m_adc4;
2035 }
2036 }
2037 if( innerLayer ) {
2038 if( m_tofId1>-1 ) {
2039 m_tof1[0] = tofCaliSvc->EtfTime( m_tof11[0], m_tof12[0] );
2040 // if( m_run > 0 ) {
2041 // m_tof1[0] = tofCaliSvc->EtfTime( m_adc1, m_adc2, m_tdc1-m_estime, m_tdc2-m_estime, m_tofId1, m_strip1, m_estime );
2042 // }
2043 // else {
2044 // m_tof1[0] = tofCaliSvc->EtfTimeMC( m_adc1, m_adc2, m_tdc1-m_estime, m_tdc2-m_estime, m_tofId1, m_strip1, m_estime );
2045 // m_tof1[0] = tofCaliSvc->EtfTime( m_tof11[0], m_tof12[0] );
2046 // }
2047 for( unsigned int i=1; i<5; i++ ) {
2048 m_tof1[i] = m_tof1[0];
2049 }
2050 m_ph1 = ( m_adc1 + m_adc2 )/2.0;
2051 }
2052 }
2053 if( outerLayer ) {
2054 if( m_tofId2>-1 ) {
2055 m_tof2[0] = tofCaliSvc->EtfTime( m_tof21[0], m_tof22[0] );
2056 // if( m_run > 0 ) {
2057 // m_tof2[0] = tofCaliSvc->EtfTime( m_adc3, m_adc4, m_tdc3-m_estime, m_tdc4-m_estime, m_tofId2, m_strip2, m_estime );
2058 // }
2059 // else {
2060 // m_tof2[0] = tofCaliSvc->EtfTimeMC( m_adc3, m_adc4, m_tdc3-m_estime, m_tdc4-m_estime, m_tofId2, m_strip2, m_estime );
2061 // }
2062 for( unsigned int i=1; i<5; i++ ) {
2063 m_tof2[i] = m_tof2[0];
2064 }
2065 m_ph2 = ( m_adc3 + m_adc4 )/2.0;
2066 }
2067 }
2068 }
2069
2070 // set Quality of Barrel TOF
2071 if( barrel ) {
2072
2073 // double layer
2074 if( innerLayer && outerLayer ) {
2075 m_quality = 1;
2076 }
2077 else {
2078 // single layer
2079 if( innerLayer || outerLayer ) {
2080 m_quality = 2;
2081 }
2082 else {
2083 // single-end of one layer
2084 if( innerEast || innerWest || outerEast || outerWest ) {
2085 m_quality = 3;
2086 }
2087 }
2088 }
2089
2090 // multi-hit
2091 if( ( (m_quality1&0xa000)!=0 ) || ( (m_quality2&0xa000)!=0 ) ) {
2092 m_quality = m_quality + 3;
2093 }
2094
2095 // ztdc and extrapolated zhit is not matched
2096 if( ( (m_quality1&0x100)==0x100 ) || ( (m_quality2&0x100)==0x100 ) ) {
2097 if( ( m_quality == 1 ) || ( m_quality == 4 ) ) { m_quality = 7; }
2098 else if( ( m_quality == 2 ) || ( m_quality == 5 ) ) { m_quality = 8; }
2099 else if( ( m_quality == 3 ) || ( m_quality == 6 ) ) { m_quality = 9; }
2100 else {
2101 cout << "TofRec::TofTrack::setCalibration: Impossible!" << endl;
2102 }
2103 }
2104
2105 }
2106
2107 return;
2108}
virtual const double BSigmaCounter(double zHit, unsigned id)=0
virtual const double BSigma2(double zHit, unsigned id)=0
virtual const double BTimeCluster(double tlayer1, double tlayer2, double z1, double z2, unsigned id1, unsigned int id2)=0
virtual const double EPulseHeight(double ADC, double rHit, double cost, unsigned int id)=0
virtual const double BTime2(double ADC, double TDC, double zHit, unsigned id, double t0)=0
virtual const double BTime1(double ADC, double TDC, double zHit, unsigned id, double t0)=0
virtual const double EtfTime1(double ADC, double TDC, double zHit, unsigned id, unsigned strip, double t0)=0
virtual const double EtfTime2(double ADC, double TDC, double zHit, unsigned id, unsigned strip, double t0)=0
virtual const double BTimeCounter(double tleft, double tright, double z, unsigned id)=0
virtual const double EtfTimeMC2(double ADC, double TDC, double zHit, unsigned id, unsigned strip, double t0)=0
virtual const double BSigmaCluster(double zHit1, double zHit2, unsigned id1, unsigned id2)=0
virtual const double EtfTime(double ADC1, double ADC2, double TDC1, double TDC2, unsigned int id, unsigned int strip, double t0)=0
virtual const double BPulseHeight(double ADC1, double ADC2, double zHit, double sint, unsigned int id)=0
virtual const double BSigma1(double zHit, unsigned id)=0
virtual const double ESigma(double rHit, unsigned id)=0
virtual const double EtfTimeMC1(double ADC, double TDC, double zHit, unsigned id, unsigned strip, double t0)=0

◆ setCalibration() [2/2]

void TofTrack::setCalibration ( )

◆ setExtTrack() [1/2]

void TofTrack::setExtTrack ( RecExtTrack extTrack,
double  costheta,
double  p[5],
int  kal[5],
double  t0,
int  t0Stat 
)

Definition at line 157 of file TofTrack.cxx.

157 {
158
159 m_estime = t0;
160 m_t0Stat = t0Stat;
161
162 int tofId1 = extTrack->tof1VolumeNumber();
163 int tofId2 = extTrack->tof2VolumeNumber();
164
165 int iExist1 = -1;
166 int iExist2 = -1;
167 if( tofId1<0 ) {
168 if( extTrack->tof1VolumeNumber(3)>-1 ) {
169 iExist1 = 3;
170 }
171 else if( extTrack->tof1VolumeNumber(1)>-1 ) {
172 iExist1 = 1;
173 }
174 else if( extTrack->tof1VolumeNumber(4)>-1 ) {
175 iExist1 = 4;
176 }
177 else if( extTrack->tof1VolumeNumber(0)>-1 ) {
178 iExist1 = 0;
179 }
180 if( iExist1!=-1 ) {
181 tofId1 = extTrack->tof1VolumeNumber(iExist1);
182 }
183 }
184 if( tofId2<0 ) {
185 if( extTrack->tof2VolumeNumber(3)>-1 ) {
186 iExist2 = 3;
187 }
188 else if( extTrack->tof2VolumeNumber(1)>-1 ) {
189 iExist2 = 1;
190 }
191 else if( extTrack->tof2VolumeNumber(4)>-1 ) {
192 iExist2 = 4;
193 }
194 else if( extTrack->tof2VolumeNumber(0)>-1 ) {
195 iExist2 = 0;
196 }
197 if( iExist2!=-1 ) {
198 tofId2 = extTrack->tof2VolumeNumber(iExist2);
199 }
200 }
201 if( iExist1 == -1 ) { iExist1 = 2; }
202 if( iExist2 == -1 ) { iExist2 = 2; }
203
204 m_barrel = 3;
205 if( tofId1>=0 && tofId1<=87 ) {
206 m_id1 = tofId1;
207 m_barrel = 1;
208 m_hitCase = InnerLayer;
209 }
210 else if( tofId1>=176 && tofId1<=223 ) {
211 m_id1 = tofId1 - 176 + 48;
212 m_barrel = 2;
213 m_hitCase = WestEndcap;
214 if( costheta>0.0 ) {
215 m_id1 = -9;
216 m_barrel = 3;
217 m_hitCase = NoHit;
218 }
219 }
220 else if( tofId1>=224 && tofId1<=271 ) {
221 m_id1 = tofId1 - 176 - 48;
222 m_barrel = 0;
223 m_hitCase = EastEndcap;
224 if( costheta<0.0 ) {
225 m_id1 = -9;
226 m_barrel = 3;
227 m_hitCase = NoHit;
228 }
229 }
230 else if( tofId1>=272 && tofId1<=1135 ) {
231 m_id1 = tofId1 - 176 - 96;
232 m_istrip1 = m_id1%12;
233 m_id1 = m_id1/12;
234 if( tofId1>=272 && tofId1<=703 ) {
235 if( costheta>0.0 ) {
236 m_barrel = 4;
237 m_hitCase = EastEndcapMRPC;
238 }
239 else {
240 m_id1 = -9;
241 m_istrip1 = -9;
242 }
243 }
244 else if( tofId1>=704 && tofId1<=1135 ) {
245 if( costheta<0.0 ) {
246 m_barrel = 5;
247 m_hitCase = WestEndcapMRPC;
248 }
249 else {
250 m_id1 = -9;
251 m_istrip1 = -9;
252 }
253 }
254 }
255 else {
256 m_barrel = 3;
257 m_hitCase = NoHit;
258 }
259
260 if( tofId2>=88 && tofId2<=175 ) {
261 m_id2 = tofId2;
262 m_barrel = 1;
263 if( m_hitCase == InnerLayer ) {
264 m_hitCase = DoubleLayer;
265 }
266 else if( m_hitCase==NoHit ) {
267 m_hitCase = OuterLayer;
268 }
269 }
270 else if( tofId2>=272 && tofId2<=1135 ) {
271 m_id2 = tofId2 - 176 - 96;
272 m_istrip2 = m_id2%12;
273 m_id2 = m_id2/12;
274 if( m_hitCase==EastEndcapMRPC || m_hitCase==WestEndcapMRPC || m_hitCase==NoHit ) {
275 if( tofId2>=272 && tofId2<=703 ) {
276 if( costheta>0.0 ) {
277 m_barrel = 4;
278 m_hitCase = EastEndcapMRPC;
279 }
280 else {
281 m_id2 = -9;
282 m_istrip2 = -9;
283 }
284 }
285 else if( tofId2>=704 && tofId2<=1135 ) {
286 if( costheta<0.0 ) {
287 m_barrel = 5;
288 m_hitCase = WestEndcapMRPC;
289 }
290 else {
291 m_id2 = -9;
292 m_istrip2 = -9;
293 }
294 }
295 }
296 }
297
298 m_trackId = extTrack->trackId();
299
300 m_momentum = extTrack->tof1Momentum().r();
301 if( !( tofId1>=272 && tofId1<=1135 ) && ( m_hitCase == EastEndcapMRPC || m_hitCase == WestEndcapMRPC ) ){
302 m_momentum = extTrack->tof2Momentum().r();
303 }
304
305 if( m_hitCase == InnerLayer || m_hitCase == DoubleLayer || m_hitCase == EastEndcap || m_hitCase == WestEndcap || ( ( m_hitCase == EastEndcapMRPC || m_hitCase == WestEndcapMRPC ) && ( tofId1>=272 && tofId1<=1135 ) ) ) {
306 m_path1 = extTrack->tof1Path(iExist1);
307 m_theta1 = extTrack->tof1Momentum(iExist1).rho()/extTrack->tof1Momentum(iExist1).r();
308 m_phi1 = extTrack->tof1Position(iExist1).phi();
309 for( unsigned int i=0; i<5; i++ ) {
310 m_texpInner[i] = extTrack->tof1(i);
311 if( fabs(m_texpInner[i]+99.0)<1.0e-6 ) {
312 double beta = p[iExist1]/sqrt(p[iExist1]*p[iExist1]+mass[iExist1]*mass[iExist1]);
313 double betaNew = p[i]/sqrt(p[i]*p[i]+mass[i]*mass[i]);
314 m_texpInner[i] = beta*extTrack->tof1(iExist1)/betaNew;
315 }
316 }
317 if( m_hitCase == InnerLayer || m_hitCase == DoubleLayer ) {
318 m_xhit1 = extTrack->tof1Position(iExist1).x();
319 m_yhit1 = extTrack->tof1Position(iExist1).y();
320 m_zrhit1 = extTrack->tof1Position(iExist1).z();
321 m_errzr1 = extTrack->tof1PosSigmaAlongZ(iExist1);
322 for( unsigned int i=0; i<5; i++ ) {
323 m_zr1[i] = extTrack->tof1Position(i).z();
324 m_ezr1[i] = extTrack->tof1PosSigmaAlongZ(i);
325 if( fabs(m_zr1[i]+99.0)<1.0e-6 ) {
326 m_zr1[i] = m_zrhit1;
327 m_ezr1[i] = m_errzr1;
328 }
329 }
330 }
331 else if( m_hitCase == EastEndcap || m_hitCase == WestEndcap ) {
332 m_xhit1 = extTrack->tof1Position(iExist1).x();
333 m_yhit1 = extTrack->tof1Position(iExist1).y();
334 m_zrhit1 = extTrack->tof1Position(iExist1).rho();
335 m_errzr1 = sqrt( extTrack->tof1PosSigmaAlongX(iExist1)*extTrack->tof1PosSigmaAlongX(iExist1) + extTrack->tof1PosSigmaAlongY(iExist1)*extTrack->tof1PosSigmaAlongY(iExist1) );
336 for( unsigned int i=0; i<5; i++ ) {
337 m_zr1[i] = extTrack->tof1Position(i).rho();
338 m_ezr1[i] = sqrt( extTrack->tof1PosSigmaAlongX(i)*extTrack->tof1PosSigmaAlongX(i) + extTrack->tof1PosSigmaAlongY(i)*extTrack->tof1PosSigmaAlongY(i) );
339 if( fabs(m_zr1[i]+99.0)<1.0e-6 ) {
340 m_zr1[i] = m_zrhit1;
341 m_ezr1[i] = m_errzr1;
342 }
343 }
344 }
345 else if( ( m_hitCase == EastEndcapMRPC || m_hitCase == WestEndcapMRPC ) && ( tofId1>=272 && tofId1<=1135 ) ) {
346 m_xhit1 = extTrack->tof1Position(iExist1).x();
347 m_yhit1 = extTrack->tof1Position(iExist1).z();
348 m_zrhit1 = extTrack->tof1Position(iExist1).x();
349 m_errzr1 = extTrack->tof1PosSigmaAlongX(iExist1);
350 for( unsigned int i=0; i<5; i++ ) {
351 m_zr1[i] = extTrack->tof1Position(i).x();
352 m_ezr1[i] = extTrack->tof1PosSigmaAlongX(i);
353 if( fabs(m_zr1[i]+99.0)<1.0e-6 ) {
354 m_zr1[i] = m_zrhit1;
355 m_ezr1[i] = m_errzr1;
356 }
357 }
358 if( !( tofId2>=272 && tofId2<=1135 ) ) {
359 for( unsigned int i=0; i<5; i++ ) {
360 m_texpOuter[i] = m_texpInner[i] * 136.573/133.673;
361 }
362 }
363 }
364 }
365
366 if( m_hitCase == OuterLayer || m_hitCase == DoubleLayer || ( ( m_hitCase == EastEndcapMRPC || m_hitCase == WestEndcapMRPC ) && ( tofId2>=272 && tofId2<=1135 ) ) ) {
367 m_path2 = extTrack->tof2Path(iExist2);
368 m_theta2 = extTrack->tof2Momentum(iExist2).rho()/extTrack->tof2Momentum(iExist2).r();
369 m_phi2 = extTrack->tof2Position(iExist2).phi();
370 for( unsigned int i=0; i<5; i++ ) {
371 m_texpOuter[i] = extTrack->tof2(i);
372 if( fabs(m_texpOuter[i]+99.0)<1.0e-6 ) {
373 double beta = p[iExist2]/sqrt(p[iExist2]*p[iExist2]+mass[iExist2]*mass[iExist2]);
374 double betaNew = p[i]/sqrt(p[i]*p[i]+mass[i]*mass[i]);
375 m_texpOuter[i] = beta*extTrack->tof2(iExist2)/betaNew;
376 }
377 }
378 if( m_hitCase == OuterLayer || m_hitCase == DoubleLayer ) {
379 m_xhit2 = extTrack->tof2Position(iExist2).x();
380 m_yhit2 = extTrack->tof2Position(iExist2).y();
381 m_zrhit2 = extTrack->tof2Position(iExist2).z();
382 m_errzr2 = extTrack->tof2PosSigmaAlongZ(iExist2);
383 for( unsigned int i=0; i<5; i++ ) {
384 m_zr2[i] = extTrack->tof2Position(i).z();
385 m_ezr2[i] = extTrack->tof2PosSigmaAlongZ(i);
386 if( fabs(m_zr2[i]+99.0)<1.0e-6 ) {
387 m_zr2[i] = m_zrhit2;
388 m_ezr2[i] = m_errzr2;
389 }
390 }
391 }
392 else if( ( m_hitCase == EastEndcapMRPC || m_hitCase == WestEndcapMRPC ) && ( tofId2>=272 && tofId2<=1135 ) ) {
393 m_xhit2 = extTrack->tof2Position(iExist2).x();
394 m_yhit2 = extTrack->tof2Position(iExist2).z();
395 m_zrhit2 = extTrack->tof2Position(iExist2).x();
396 m_errzr2 = extTrack->tof2PosSigmaAlongX(iExist2);
397 for( unsigned int i=0; i<5; i++ ) {
398 m_zr2[i] = extTrack->tof2Position(i).x();
399 m_ezr2[i] = extTrack->tof2PosSigmaAlongX(i);
400 if( fabs(m_zr2[i]+99.0)<1.0e-6 ) {
401 m_zr2[i] = m_zrhit2;
402 m_ezr2[i] = m_errzr2;
403 }
404 }
405 if( !( tofId1>=272 && tofId1<=1135 ) ) {
406 for( unsigned int i=0; i<5; i++ ) {
407 m_texpInner[i] = m_texpOuter[i] * 133.673/136.573;
408 }
409 }
410 }
411 }
412
413 if( m_hitCase == NoHit ) { m_quality = 11; }
414
415 for( unsigned int i=0; i<5; i++ ) {
416 m_kal[i] = kal[i];
417 }
418
419 return;
420}
int kal(unsigned int i) const

Referenced by TofRec::execute().

◆ setExtTrack() [2/2]

void TofTrack::setExtTrack ( RecExtTrack extTrack,
double  costheta,
double  p[5],
int  kal[5],
double  t0,
int  t0Stat 
)

◆ setFlag() [1/2]

void TofTrack::setFlag ( unsigned int  flag)
inline

Definition at line 124 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

124{ m_flag = flag; }

◆ setFlag() [2/2]

void TofTrack::setFlag ( unsigned int  flag)
inline

Definition at line 124 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

124{ m_flag = flag; }

◆ setQuality() [1/2]

void TofTrack::setQuality ( int  qual)
inline

Definition at line 121 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

121{ m_quality = qual; }

◆ setQuality() [2/2]

void TofTrack::setQuality ( int  qual)
inline

Definition at line 121 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

121{ m_quality = qual; }

◆ setQuality1() [1/2]

void TofTrack::setQuality1 ( int  qual1)
inline

Definition at line 122 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

122{ m_quality1 = qual1; }

Referenced by getMultiHit().

◆ setQuality1() [2/2]

void TofTrack::setQuality1 ( int  qual1)
inline

Definition at line 122 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

122{ m_quality1 = qual1; }

◆ setQuality2() [1/2]

void TofTrack::setQuality2 ( int  qual2)
inline

Definition at line 123 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

123{ m_quality2 = qual2; }

Referenced by getMultiHit().

◆ setQuality2() [2/2]

void TofTrack::setQuality2 ( int  qual2)
inline

Definition at line 123 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

123{ m_quality2 = qual2; }

◆ setRecTofTrack() [1/2]

void TofTrack::setRecTofTrack ( RecTofTrack track,
int  layerorend 
)

Definition at line 2507 of file TofTrack.cxx.

2507 {
2508
2509 double toffset[6];
2510 for( unsigned int i=0; i<6; i++ ) {
2511 toffset[i] = 0.0;
2512 }
2513
2514 if( layerorend == 0 ) { // cluster or double layer hit
2515 track->setPh( m_ph );
2516 track->setTof( m_tof[0] );
2517 track->setSigmaElectron( m_sigma );
2518 for( unsigned int i=0; i<5; i++ ) {
2519 toffset[i] = m_tof[0] - m_tof[i];
2520 }
2521 track->setToffset( toffset );
2522 track->setBeta( m_path/m_tof[0]/30.0 );
2523 }
2524 else if( layerorend == 1 ) { // inner layer
2525 track->setPh( m_ph1 );
2526 track->setTof( m_tof1[0] );
2527 track->setSigmaElectron( m_sigma1 );
2528 for( unsigned int i=0; i<5; i++ ) {
2529 toffset[i] = m_tof1[0] - m_tof1[i];
2530 }
2531 track->setToffset( toffset );
2532 track->setBeta( m_path1/m_tof1[0]/30.0 );
2533 }
2534 else if( layerorend == 2 ) { // outer layer
2535 track->setPh( m_ph2 );
2536 track->setTof( m_tof2[0] );
2537 track->setSigmaElectron( m_sigma2 );
2538 for( unsigned int i=0; i<5; i++ ) {
2539 toffset[i] = m_tof2[0] - m_tof2[i];
2540 }
2541 track->setToffset( toffset );
2542 track->setBeta( m_path2/m_tof2[0]/30.0 );
2543 }
2544 else if( layerorend == 11 ) { // inner layer east end readout
2545 track->setPh( m_ph11 );
2546 track->setTof( m_tof11[0] );
2547 track->setSigmaElectron( m_sigma11 );
2548 for( unsigned int i=0; i<5; i++ ) {
2549 toffset[i] = m_tof11[0] - m_tof11[i];
2550 }
2551 track->setToffset( toffset );
2552 track->setBeta( m_path1/m_tof11[0]/30.0 );
2553 }
2554 else if( layerorend == 12 ) { // inner layer west end readout
2555 track->setPh( m_ph12 );
2556 track->setTof( m_tof12[0] );
2557 track->setSigmaElectron( m_sigma12 );
2558 for( unsigned int i=0; i<5; i++ ) {
2559 toffset[i] = m_tof12[0] - m_tof12[i];
2560 }
2561 track->setToffset( toffset );
2562 track->setBeta( m_path1/m_tof12[0]/30.0 );
2563 }
2564 else if( layerorend == 21 ) { // outer layer east end readout
2565 track->setPh( m_ph21 );
2566 track->setTof( m_tof21[0] );
2567 track->setSigmaElectron( m_sigma21 );
2568 for( unsigned int i=0; i<5; i++ ) {
2569 toffset[i] = m_tof21[0] - m_tof21[i];
2570 }
2571 track->setToffset( toffset );
2572 track->setBeta( m_path2/m_tof21[0]/30.0 );
2573 }
2574 else if( layerorend == 22 ) { // outer layer west end readout
2575 track->setPh( m_ph22 );
2576 track->setTof( m_tof22[0] );
2577 track->setSigmaElectron( m_sigma22 );
2578 for( unsigned int i=0; i<5; i++ ) {
2579 toffset[i] = m_tof22[0] - m_tof22[i];
2580 }
2581 track->setToffset( toffset );
2582 track->setBeta( m_path2/m_tof22[0]/30.0 );
2583 }
2584 else{
2585 cout << "TofRec TofTrack::SetRecTofTrack layerorend = " << layerorend << endl;
2586 }
2587 return;
2588}

Referenced by buildRecTofTrack().

◆ setRecTofTrack() [2/2]

void TofTrack::setRecTofTrack ( RecTofTrack track,
int  layerorend 
)

◆ setTofData() [1/2]

void TofTrack::setTofData ( TofDataMap  tofDataMap)

Definition at line 486 of file TofTrack.cxx.

486 {
487
488 if( m_hitCase == NoHit ) return;
489
490 unsigned int identify[11];
491 unsigned int count[11];
492 for( unsigned int i=0; i<11; i++ ) {
493 identify[i] = 0x0000c000;
494 count[i] = 0;
495 }
496 unsigned int countTot1 = 0;
497 unsigned int countTot2 = 0;
498
499 if( ( ( m_hitCase == InnerLayer ) || ( m_hitCase == DoubleLayer ) ) && ( m_id1 > -1 ) ) {
500 int tofid0 = m_id1;
501 identify[0] = TofID::getIntID( 1, 0, tofid0, 0 );
502 count[0] = tofDataMap.count( identify[0] );
503 int tofid1 = tofid0 - 1;
504 if( tofid1 == -1 ) { tofid1 = 87; }
505 identify[1] = TofID::getIntID( 1, 0, tofid1, 0 );
506 count[1] = tofDataMap.count( identify[1] );
507 int tofid2 = tofid0 + 1;
508 if( tofid2 == 88 ) { tofid2 = 0; }
509 identify[2] = TofID::getIntID( 1, 0, tofid2, 0 );
510 count[2] = tofDataMap.count( identify[2] );
511 }
512
513 if( ( ( m_hitCase == EastEndcap ) || ( m_hitCase == WestEndcap ) )&& ( m_id1 > -1 ) ) {
514 unsigned int whichEndcap = 0;
515 int tofid0 = m_id1;
516 if( m_hitCase == WestEndcap ) {
517 whichEndcap = 2;
518 tofid0 = m_id1 - 48;
519 }
520 identify[0] = TofID::getIntID( whichEndcap, 0, tofid0, 0 );
521 count[0] = tofDataMap.count( identify[0] );
522 int tofid1 = tofid0 - 1;
523 if( tofid1 == -1 ) { tofid1 = 47; }
524 identify[1] = TofID::getIntID( whichEndcap, 0, tofid1, 0 );
525 count[1] = tofDataMap.count( identify[1] );
526 int tofid2 = tofid0 + 1;
527 if( tofid2 == 48 ) { tofid2 = 0; }
528 identify[2] = TofID::getIntID( whichEndcap, 0, tofid2, 0 );
529 count[2] = tofDataMap.count( identify[2] );
530 }
531
532 if( ( ( m_hitCase == EastEndcapMRPC ) || ( m_hitCase == WestEndcapMRPC ) ) && ( ( m_id1 > -1 ) && ( m_istrip1 > -1 ) ) ) {
533 IterTofDataMap iter = tofDataMap.begin();
534 for( ; iter != tofDataMap.end(); iter++ ) {
535 Identifier iden = TofID::cell_id( (*iter).first );
536 if( TofID::is_mrpc( iden ) ) {
537 TofData* tof = (*iter).second;
538 if( m_id1 == tof->tofId() && abs( m_istrip1 - tof->strip() )<=abs(m_delStrip1) ) {
539 m_delStrip1 = m_istrip1 - tof->strip();
540 }
541 if( ( abs( m_id1 - tof->tofId() )==1 || ( m_id1==0 && tof->tofId()==35 ) || ( m_id1==35 && tof->tofId()==0 ) || ( m_id1==36 && tof->tofId()==71 ) || ( m_id1==71 && tof->tofId()==36 ) ) && abs( m_istrip1 - tof->strip() )<=abs(m_delStrip1) ) {
542 m_delStrip2 = m_istrip1 - tof->strip();
543 }
544 }
545 }
546
547 unsigned int whichEndcap = 0;
548 int tofid0 = m_id1;
549 if( m_hitCase == WestEndcapMRPC ) {
550 whichEndcap = 1;
551 tofid0 = m_id1 - 36;
552 }
553 int strip0 = m_istrip1;
554 int strip1 = strip0 - 1;
555 int strip2 = strip0 + 1;
556 int strip3 = strip0 - 2;
557 int strip4 = strip0 + 2;
558 int tofid1 = tofid0 - 1;
559 if( tofid1 == -1 ) { tofid1 = 35; }
560 int tofid2 = tofid0 + 1;
561 if( tofid2 == 36 ) { tofid2 = 0; }
562
563 identify[0] = TofID::getIntID( 3, whichEndcap, tofid0, strip0, 0 );
564 count[0] = tofDataMap.count( identify[0] );
565 identify[5] = TofID::getIntID( 3, whichEndcap, tofid1, strip0, 0 );
566 count[5] = tofDataMap.count( identify[5] );
567 identify[6] = TofID::getIntID( 3, whichEndcap, tofid2, strip0, 0 );
568 count[6] = tofDataMap.count( identify[6] );
569
570 if( strip1 == -1 ) {
571 count[1] = 0;
572 count[7] = 0;
573 count[9] = 0;
574 }
575 else {
576 identify[1] = TofID::getIntID( 3, whichEndcap, tofid0, strip1, 0 );
577 count[1] = tofDataMap.count( identify[1] );
578 identify[7] = TofID::getIntID( 3, whichEndcap, tofid1, strip1, 0 );
579 count[7] = tofDataMap.count( identify[7] );
580 identify[9] = TofID::getIntID( 3, whichEndcap, tofid2, strip1, 0 );
581 count[9] = tofDataMap.count( identify[9] );
582 }
583
584 if( strip2 == 12 ) {
585 count[2] = 0;
586 count[8] = 0;
587 count[10] = 0;
588 }
589 else {
590 identify[2] = TofID::getIntID( 3, whichEndcap, tofid0, strip2, 0 );
591 count[2] = tofDataMap.count( identify[2] );
592 identify[8] = TofID::getIntID( 3, whichEndcap, tofid1, strip2, 0 );
593 count[8] = tofDataMap.count( identify[8] );
594 identify[10] = TofID::getIntID( 3, whichEndcap, tofid2, strip2, 0 );
595 count[10] = tofDataMap.count( identify[10] );
596 }
597 if( strip3 == -1 || strip3 == -2 ) { count[3] = 0; }
598 else {
599 identify[3] = TofID::getIntID( 3, whichEndcap, tofid0, strip3, 0 );
600 count[3] = tofDataMap.count( identify[3] );
601 }
602 if( strip4 == 12 || strip4 == 13 ) { count[4] = 0; }
603 else {
604 identify[4] = TofID::getIntID( 3, whichEndcap, tofid0, strip4, 0 );
605 count[4] = tofDataMap.count( identify[4] );
606 }
607 }
608
609 for( unsigned int i=0; i<11; i++ ) {
610 if( count[i] > 0 ) {
611 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify[i] );
612 IterTofDataMap iter = range.first;
613 for( unsigned int j=0; j<count[i]; j++,iter++ ) {
614 if( i==0 ) {
615 tofDataAnalysis( (*iter).second, 1 );
616 }
617 else if( i==1 || i==2 ) {
618 tofDataAnalysis( (*iter).second, 2 );
619 }
620 else {
621 tofDataAnalysis( (*iter).second, 3 );
622 }
623 }
624 }
625 countTot1 = countTot1 + count[i];
626 }
627
628 if( countTot1 == 0 ) {
629 if( m_hitCase == DoubleLayer ) {
630 m_hitCase = OuterLayer;
631 }
632 else if( ( m_hitCase == EastEndcapMRPC ) || ( m_hitCase == WestEndcapMRPC ) ) {
633 }
634 else {
635 m_hitCase = NoHit;
636 m_quality = 12;
637 }
638 }
639
640
641 for( unsigned int i=0; i<11; i++ ) {
642 identify[i] = 0x0000c000;
643 count[i] = 0;
644 }
645 if( ( ( m_hitCase == OuterLayer ) || ( m_hitCase == DoubleLayer ) ) && ( m_id2 > 87 ) ) {
646 int tofid0 = m_id2 - 88;
647 identify[0] = TofID::getIntID( 1, 1, tofid0, 0 );
648 count[0] = tofDataMap.count( identify[0] );
649 int tofid1 = tofid0 - 1;
650 if( tofid1 == -1 ) { tofid1 = 87; }
651 identify[1] = TofID::getIntID( 1, 1, tofid1, 0 );
652 count[1] = tofDataMap.count( identify[1] );
653 int tofid2 = tofid0 + 1;
654 if( tofid2 == 88 ) { tofid2 = 0; }
655 identify[2] = TofID::getIntID( 1, 1, tofid2, 0 );
656 count[2] = tofDataMap.count( identify[2] );
657
658 for( unsigned int i=0; i<3; i++ ) {
659 if( count[i] > 0 ) {
660 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify[i] );
661 IterTofDataMap iter = range.first;
662 for( unsigned int j=0; j<count[i]; j++,iter++ ) {
663 if( i==0 ) {
664 tofDataAnalysis( (*iter).second, 3 );
665 }
666 else {
667 tofDataAnalysis( (*iter).second, 4 );
668 }
669 }
670 }
671 countTot2 = countTot2 + count[i];
672 }
673
674 if( countTot2 == 0 ) {
675 if( m_hitCase != DoubleLayer ) {
676 m_hitCase = NoHit;
677 m_quality = 12;
678 }
679 else {
680 m_hitCase = InnerLayer;
681 }
682 }
683 }
684
685 if( ( ( m_hitCase == EastEndcapMRPC ) || ( m_hitCase == WestEndcapMRPC ) ) && ( ( m_id2 > -1 ) && ( m_istrip2 > -1 ) ) ) {
686 IterTofDataMap iter = tofDataMap.begin();
687 for( ; iter != tofDataMap.end(); iter++ ) {
688 Identifier iden = TofID::cell_id( (*iter).first );
689 if( TofID::is_mrpc( iden ) ) {
690 TofData* tof = (*iter).second;
691 if( m_id2 == tof->tofId() && abs( m_istrip2 - tof->strip() )<=abs(m_delStrip1) ) {
692 m_delStrip1 = m_istrip2 - tof->strip();
693 }
694 if( ( abs( m_id2 - tof->tofId() )==1 || ( m_id2==0 && tof->tofId()==35 ) || ( m_id2==35 && tof->tofId()==0 ) || ( m_id2==36 && tof->tofId()==71 ) || ( m_id2==71 && tof->tofId()==36 ) ) && abs( m_istrip2 - tof->strip() )<=abs(m_delStrip2) ) {
695 m_delStrip2 = m_istrip2 - tof->strip();
696 }
697 }
698 }
699
700 unsigned int whichEndcap = 0;
701 int tofid0 = m_id2;
702 if( m_hitCase == WestEndcapMRPC ) {
703 whichEndcap = 1;
704 tofid0 = m_id2 - 36;
705 }
706 int strip0 = m_istrip2;
707 int strip1 = strip0 - 1;
708 int strip2 = strip0 + 1;
709 int strip3 = strip0 - 2;
710 int strip4 = strip0 + 2;
711 int tofid1 = tofid0 - 1;
712 if( tofid1 == -1 ) { tofid1 = 35; }
713 int tofid2 = tofid0 + 1;
714 if( tofid2 == 36 ) { tofid2 = 0; }
715
716 identify[0] = TofID::getIntID( 3, whichEndcap, tofid0, strip0, 0 );
717 count[0] = tofDataMap.count( identify[0] );
718 identify[5] = TofID::getIntID( 3, whichEndcap, tofid1, strip0, 0 );
719 count[5] = tofDataMap.count( identify[5] );
720 identify[6] = TofID::getIntID( 3, whichEndcap, tofid2, strip0, 0 );
721 count[6] = tofDataMap.count( identify[6] );
722
723 if( strip1 == -1 ) {
724 count[1] = 0;
725 count[7] = 0;
726 count[9] = 0;
727 }
728 else {
729 identify[1] = TofID::getIntID( 3, whichEndcap, tofid0, strip1, 0 );
730 count[1] = tofDataMap.count( identify[1] );
731 identify[7] = TofID::getIntID( 3, whichEndcap, tofid1, strip1, 0 );
732 count[7] = tofDataMap.count( identify[7] );
733 identify[9] = TofID::getIntID( 3, whichEndcap, tofid2, strip1, 0 );
734 count[9] = tofDataMap.count( identify[9] );
735 }
736
737 if( strip2 == 12 ) {
738 count[2] = 0;
739 count[8] = 0;
740 count[10] = 0;
741 }
742 else {
743 identify[2] = TofID::getIntID( 3, whichEndcap, tofid0, strip2, 0 );
744 count[2] = tofDataMap.count( identify[2] );
745 identify[8] = TofID::getIntID( 3, whichEndcap, tofid1, strip2, 0 );
746 count[8] = tofDataMap.count( identify[8] );
747 identify[10] = TofID::getIntID( 3, whichEndcap, tofid2, strip2, 0 );
748 count[10] = tofDataMap.count( identify[10] );
749 }
750 if( strip3 == -1 || strip3 == -2 ) { count[3] = 0; }
751 else {
752 identify[3] = TofID::getIntID( 3, whichEndcap, tofid0, strip3, 0 );
753 count[3] = tofDataMap.count( identify[3] );
754 }
755 if( strip4 == 12 || strip4 == 13 ) { count[4] = 0; }
756 else {
757 identify[4] = TofID::getIntID( 3, whichEndcap, tofid0, strip4, 0 );
758 count[4] = tofDataMap.count( identify[4] );
759 }
760
761 for( unsigned int i=0; i<11; i++ ) {
762 if( count[i] > 0 ) {
763 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify[i] );
764 IterTofDataMap iter = range.first;
765 for( unsigned int j=0; j<count[i]; j++,iter++ ) {
766 if( i==0 ) {
767 tofDataAnalysis( (*iter).second, 4 );
768 }
769 else if( i==1 || i==2 ) {
770 tofDataAnalysis( (*iter).second, 5 );
771 }
772 else {
773 tofDataAnalysis( (*iter).second, 6 );
774 }
775 }
776 }
777 countTot2 = countTot2 + count[i];
778 }
779 }
780
781 if( countTot1==0 && countTot2==0 ) {
782 m_hitCase = NoHit;
783 m_quality = 12;
784 }
785
786 return;
787}
std::multimap< unsignedint, TofData * >::iterator IterTofDataMap
DOUBLE_PRECISION count[3]
static Identifier cell_id(int barrel_ec, int layer, int phi_module, int end)
For a single crystal.
Definition: TofID.cxx:143
static bool is_mrpc(const Identifier &id)
Definition: TofID.cxx:113
static value_type getIntID(int barrel_ec, int layer, int phi_module, int end)
Definition: TofID.cxx:178
void tofDataAnalysis(TofData *tof, unsigned int iflag)
Definition: TofTrack.cxx:793

◆ setTofData() [2/2]

void TofTrack::setTofData ( TofDataMap  tofDataMap)

◆ size1() [1/2]

int TofTrack::size1 ( ) const
inline

Definition at line 56 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

56{ return m_tofData1.size(); }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ size1() [2/2]

int TofTrack::size1 ( ) const
inline

Definition at line 56 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

56{ return m_tofData1.size(); }

◆ size2() [1/2]

int TofTrack::size2 ( ) const
inline

Definition at line 57 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

57{ return m_tofData2.size(); }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ size2() [2/2]

int TofTrack::size2 ( ) const
inline

Definition at line 57 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

57{ return m_tofData2.size(); }

◆ size3() [1/2]

int TofTrack::size3 ( ) const
inline

Definition at line 58 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

58{ return m_tofData3.size(); }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ size3() [2/2]

int TofTrack::size3 ( ) const
inline

Definition at line 58 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

58{ return m_tofData3.size(); }

◆ size4() [1/2]

int TofTrack::size4 ( ) const
inline

Definition at line 59 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

59{ return m_tofData4.size(); }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ size4() [2/2]

int TofTrack::size4 ( ) const
inline

Definition at line 59 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

59{ return m_tofData4.size(); }

◆ strip1() [1/2]

int TofTrack::strip1 ( ) const
inline

Definition at line 70 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

70{ return m_strip1; }

Referenced by TofCheckDigi::Fill_TofTrack(), getMultiHit(), and setTofData().

◆ strip1() [2/2]

int TofTrack::strip1 ( ) const
inline

Definition at line 70 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

70{ return m_strip1; }

◆ strip2() [1/2]

int TofTrack::strip2 ( ) const
inline

Definition at line 71 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

71{ return m_strip2; }

Referenced by TofCheckDigi::Fill_TofTrack(), getMultiHit(), and setTofData().

◆ strip2() [2/2]

int TofTrack::strip2 ( ) const
inline

Definition at line 71 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

71{ return m_strip2; }

◆ t0Stat() [1/2]

int TofTrack::t0Stat ( ) const
inline

Definition at line 115 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

115{ return m_t0Stat; }

Referenced by setExtTrack().

◆ t0Stat() [2/2]

int TofTrack::t0Stat ( ) const
inline

Definition at line 115 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

115{ return m_t0Stat; }

◆ tdc1() [1/2]

double TofTrack::tdc1 ( ) const
inline

Definition at line 97 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

97{ return m_tdc1; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ tdc1() [2/2]

double TofTrack::tdc1 ( ) const
inline

Definition at line 97 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

97{ return m_tdc1; }

◆ tdc2() [1/2]

double TofTrack::tdc2 ( ) const
inline

Definition at line 98 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

98{ return m_tdc2; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ tdc2() [2/2]

double TofTrack::tdc2 ( ) const
inline

Definition at line 98 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

98{ return m_tdc2; }

◆ tdc3() [1/2]

double TofTrack::tdc3 ( ) const
inline

Definition at line 99 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

99{ return m_tdc3; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ tdc3() [2/2]

double TofTrack::tdc3 ( ) const
inline

Definition at line 99 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

99{ return m_tdc3; }

◆ tdc4() [1/2]

double TofTrack::tdc4 ( ) const
inline

Definition at line 100 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

100{ return m_tdc4; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ tdc4() [2/2]

double TofTrack::tdc4 ( ) const
inline

Definition at line 100 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

100{ return m_tdc4; }

◆ tdiff1() [1/2]

double TofTrack::tdiff1 ( ) const
inline

Definition at line 112 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

112{ return m_tdiff1; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ tdiff1() [2/2]

double TofTrack::tdiff1 ( ) const
inline

Definition at line 112 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

112{ return m_tdiff1; }

◆ tdiff2() [1/2]

double TofTrack::tdiff2 ( ) const
inline

Definition at line 113 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

113{ return m_tdiff2; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ tdiff2() [2/2]

double TofTrack::tdiff2 ( ) const
inline

Definition at line 113 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

113{ return m_tdiff2; }

◆ texp() [1/2]

double TofTrack::texp ( unsigned int  i) const
inline

Definition at line 104 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

104{ return m_texp[i]; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ texp() [2/2]

double TofTrack::texp ( unsigned int  i) const
inline

Definition at line 104 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

104{ return m_texp[i]; }

◆ texpInner() [1/2]

double TofTrack::texpInner ( unsigned int  i) const
inline

Definition at line 102 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

102{ return m_texpInner[i]; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ texpInner() [2/2]

double TofTrack::texpInner ( unsigned int  i) const
inline

Definition at line 102 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

102{ return m_texpInner[i]; }

◆ texpOuter() [1/2]

double TofTrack::texpOuter ( unsigned int  i) const
inline

Definition at line 103 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

103{ return m_texpOuter[i]; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ texpOuter() [2/2]

double TofTrack::texpOuter ( unsigned int  i) const
inline

Definition at line 103 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

103{ return m_texpOuter[i]; }

◆ theta1() [1/2]

double TofTrack::theta1 ( ) const
inline

Definition at line 60 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

60{ return m_theta1; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ theta1() [2/2]

double TofTrack::theta1 ( ) const
inline

Definition at line 60 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

60{ return m_theta1; }

◆ theta2() [1/2]

double TofTrack::theta2 ( ) const
inline

Definition at line 61 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

61{ return m_theta2; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ theta2() [2/2]

double TofTrack::theta2 ( ) const
inline

Definition at line 61 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

61{ return m_theta2; }

◆ tof() [1/2]

double TofTrack::tof ( unsigned int  i) const
inline

◆ tof() [2/2]

double TofTrack::tof ( unsigned int  i) const
inline

Definition at line 87 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

87{ return m_tof[i]; }

◆ tof1() [1/2]

double TofTrack::tof1 ( unsigned int  i) const
inline

Definition at line 85 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

85{ return m_tof1[i]; }

Referenced by TofCheckDigi::Fill_TofTrack(), and findEtfData().

◆ tof1() [2/2]

double TofTrack::tof1 ( unsigned int  i) const
inline

Definition at line 85 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

85{ return m_tof1[i]; }

◆ tof11() [1/2]

double TofTrack::tof11 ( unsigned int  i) const
inline

Definition at line 81 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

81{ return m_tof11[i]; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ tof11() [2/2]

double TofTrack::tof11 ( unsigned int  i) const
inline

Definition at line 81 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

81{ return m_tof11[i]; }

◆ tof12() [1/2]

double TofTrack::tof12 ( unsigned int  i) const
inline

Definition at line 82 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

82{ return m_tof12[i]; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ tof12() [2/2]

double TofTrack::tof12 ( unsigned int  i) const
inline

Definition at line 82 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

82{ return m_tof12[i]; }

◆ tof2() [1/2]

double TofTrack::tof2 ( unsigned int  i) const
inline

Definition at line 86 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

86{ return m_tof2[i]; }

Referenced by TofCheckDigi::Fill_TofTrack(), and findEtfData().

◆ tof2() [2/2]

double TofTrack::tof2 ( unsigned int  i) const
inline

Definition at line 86 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

86{ return m_tof2[i]; }

◆ tof21() [1/2]

double TofTrack::tof21 ( unsigned int  i) const
inline

Definition at line 83 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

83{ return m_tof21[i]; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ tof21() [2/2]

double TofTrack::tof21 ( unsigned int  i) const
inline

Definition at line 83 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

83{ return m_tof21[i]; }

◆ tof22() [1/2]

double TofTrack::tof22 ( unsigned int  i) const
inline

Definition at line 84 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

84{ return m_tof22[i]; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ tof22() [2/2]

double TofTrack::tof22 ( unsigned int  i) const
inline

Definition at line 84 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

84{ return m_tof22[i]; }

◆ tofData1() [1/2]

std::vector< TofData * > TofTrack::tofData1 ( ) const
inline

Definition at line 54 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

54{ return m_tofData1; }

Referenced by compareTofData(), compareTofDataEndcap(), findTofDataBarrel(), and findTofDataEndcap().

◆ tofData1() [2/2]

std::vector< TofData * > TofTrack::tofData1 ( ) const
inline

Definition at line 54 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

54{ return m_tofData1; }

◆ tofData2() [1/2]

std::vector< TofData * > TofTrack::tofData2 ( ) const
inline

Definition at line 55 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

55{ return m_tofData2; }

Referenced by compareTofData(), compareTofDataEndcap(), findTofDataBarrel(), and findTofDataEndcap().

◆ tofData2() [2/2]

std::vector< TofData * > TofTrack::tofData2 ( ) const
inline

Definition at line 55 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

55{ return m_tofData2; }

◆ tofDataAnalysis() [1/2]

void TofTrack::tofDataAnalysis ( TofData tof,
unsigned int  iflag 
)

Definition at line 793 of file TofTrack.cxx.

793 {
794
795 unsigned int qual = tof->quality();
796
797 if( ( qual & 0x10 ) == 0 ) {
798 qual = ( qual | 0x10 ); // zadc, ztdc unmatched, and track matched
799 if( tof->barrel() || tof->is_mrpc() ) { // Barrel, Endcap has been done
800 if( ( tof->quality() == 0x7 ) || ( tof->quality() == 0xd ) ) {
801 qual = ( qual | 0x20 ); // lost one Q
802 }
803
804 if( ( tof->quality() == 0xb ) || ( tof->quality() == 0xe ) ) {
805 qual = ( qual | 0x40 ); // lost one T
806 }
807
808 if( ( tof->quality() == 0x3 ) || ( tof->quality() == 0xc ) ) {
809 qual = ( qual | 0x80 ); // single end
810 }
811 }
812 if( tof->barrel() ) {
813 if( ( tof->quality() & 0x5 ) == 0x5 ) {
814 double ztdc = tofCaliSvc->ZTDC( tof->tdc1(), tof->tdc2(), tof->tofId() );
815 tof->setZTdc( ztdc );
816 }
817
818 if( ( tof->quality() & 0xa ) == 0xa ) {
819 double zadc = tofCaliSvc->ZADC( tof->adc1(), tof->adc2(), tof->tofId() );
820 tof->setZAdc( zadc );
821 }
822 }
823 if( tof->is_mrpc() ) {
824 if( ( tof->quality() & 0x5 ) == 0x5 ) {
825 double ztdc = tofCaliSvc->EtfZTDC( tof->tdc1(), tof->tdc2(), tof->tofId(), tof->strip() );
826 tof->setZTdc( ztdc );
827 }
828 }
829 tof->setQuality( qual );
830 }
831
832 if( iflag == 1 ) { m_tofData1.push_back( tof ); }
833 else if( iflag == 2 ) { m_tofData2.push_back( tof ); }
834 else if( iflag == 3 ) { m_tofData3.push_back( tof ); }
835 else if( iflag == 4 ) { m_tofData4.push_back( tof ); }
836 else if( iflag == 5 ) { m_tofData5.push_back( tof ); }
837 else if( iflag == 6 ) { m_tofData6.push_back( tof ); }
838 else {
839 cout << "TofRec::TofTrack::TofDataAnalylsis: the Flag should be 1-4, out of the Range!" << endl;
840 }
841
842 return;
843}
virtual const double ZTDC(double tleft, double tright, unsigned id)=0
virtual const double ZADC(double qleft, double qright, unsigned id)=0
virtual const double EtfZTDC(double tleft, double tright, unsigned int id, unsigned int strip)=0

Referenced by setTofData().

◆ tofDataAnalysis() [2/2]

void TofTrack::tofDataAnalysis ( TofData tof,
unsigned int  iflag 
)

◆ tofDataStudy() [1/2]

void TofTrack::tofDataStudy ( )

◆ tofDataStudy() [2/2]

void TofTrack::tofDataStudy ( )

◆ tofId1() [1/2]

int TofTrack::tofId1 ( ) const
inline

Definition at line 68 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

68{ return m_tofId1; }

Referenced by TofCheckDigi::Fill_TofTrack(), and setExtTrack().

◆ tofId1() [2/2]

int TofTrack::tofId1 ( ) const
inline

Definition at line 68 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

68{ return m_tofId1; }

◆ tofId2() [1/2]

int TofTrack::tofId2 ( ) const
inline

Definition at line 69 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

69{ return m_tofId2; }

Referenced by TofCheckDigi::Fill_TofTrack(), and setExtTrack().

◆ tofId2() [2/2]

int TofTrack::tofId2 ( ) const
inline

Definition at line 69 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

69{ return m_tofId2; }

◆ tofTrackId() [1/2]

int TofTrack::tofTrackId ( ) const
inline

Definition at line 28 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

28{ return m_tofTrackId; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ tofTrackId() [2/2]

int TofTrack::tofTrackId ( ) const
inline

Definition at line 28 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

28{ return m_tofTrackId; }

◆ trackId() [1/2]

int TofTrack::trackId ( ) const
inline

Definition at line 27 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

27{ return m_trackId; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ trackId() [2/2]

int TofTrack::trackId ( ) const
inline

Definition at line 27 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

27{ return m_trackId; }

◆ xhit1() [1/2]

double TofTrack::xhit1 ( ) const
inline

Definition at line 45 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

45{ return m_xhit1; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ xhit1() [2/2]

double TofTrack::xhit1 ( ) const
inline

Definition at line 45 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

45{ return m_xhit1; }

◆ xhit2() [1/2]

double TofTrack::xhit2 ( ) const
inline

Definition at line 47 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

47{ return m_xhit2; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ xhit2() [2/2]

double TofTrack::xhit2 ( ) const
inline

Definition at line 47 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

47{ return m_xhit2; }

◆ yhit1() [1/2]

double TofTrack::yhit1 ( ) const
inline

Definition at line 46 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

46{ return m_yhit1; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ yhit1() [2/2]

double TofTrack::yhit1 ( ) const
inline

Definition at line 46 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

46{ return m_yhit1; }

◆ yhit2() [1/2]

double TofTrack::yhit2 ( ) const
inline

Definition at line 48 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

48{ return m_yhit2; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ yhit2() [2/2]

double TofTrack::yhit2 ( ) const
inline

Definition at line 48 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

48{ return m_yhit2; }

◆ zadc1() [1/2]

double TofTrack::zadc1 ( ) const
inline

Definition at line 108 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

108{ return m_zadc1; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ zadc1() [2/2]

double TofTrack::zadc1 ( ) const
inline

Definition at line 108 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

108{ return m_zadc1; }

◆ zadc2() [1/2]

double TofTrack::zadc2 ( ) const
inline

Definition at line 109 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

109{ return m_zadc2; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ zadc2() [2/2]

double TofTrack::zadc2 ( ) const
inline

Definition at line 109 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

109{ return m_zadc2; }

◆ zr1() [1/2]

double TofTrack::zr1 ( unsigned int  i) const
inline

Definition at line 50 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

50{ return m_zr1[i]; }

Referenced by chooseTofDataEndcap(), TofCheckDigi::Fill_TofTrack(), and findTofDataEndcap().

◆ zr1() [2/2]

double TofTrack::zr1 ( unsigned int  i) const
inline

Definition at line 50 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

50{ return m_zr1[i]; }

◆ zr2() [1/2]

double TofTrack::zr2 ( unsigned int  i) const
inline

Definition at line 51 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

51{ return m_zr2[i]; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ zr2() [2/2]

double TofTrack::zr2 ( unsigned int  i) const
inline

Definition at line 51 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

51{ return m_zr2[i]; }

◆ zrhit1() [1/2]

double TofTrack::zrhit1 ( ) const
inline

Definition at line 41 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

41{ return m_zrhit1; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ zrhit1() [2/2]

double TofTrack::zrhit1 ( ) const
inline

Definition at line 41 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

41{ return m_zrhit1; }

◆ zrhit2() [1/2]

double TofTrack::zrhit2 ( ) const
inline

Definition at line 42 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

42{ return m_zrhit2; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ zrhit2() [2/2]

double TofTrack::zrhit2 ( ) const
inline

Definition at line 42 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

42{ return m_zrhit2; }

◆ ztdc1() [1/2]

double TofTrack::ztdc1 ( ) const
inline

Definition at line 106 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

106{ return m_ztdc1; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ ztdc1() [2/2]

double TofTrack::ztdc1 ( ) const
inline

Definition at line 106 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

106{ return m_ztdc1; }

◆ ztdc2() [1/2]

double TofTrack::ztdc2 ( ) const
inline

Definition at line 107 of file InstallArea/include/TofRec/TofRec/TofTrack.h.

107{ return m_ztdc2; }

Referenced by TofCheckDigi::Fill_TofTrack().

◆ ztdc2() [2/2]

double TofTrack::ztdc2 ( ) const
inline

Definition at line 107 of file Reconstruction/TofRec/TofRec-00-04-51/TofRec/TofTrack.h.

107{ return m_ztdc2; }

The documentation for this class was generated from the following files: