CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
TofTrack.h
Go to the documentation of this file.
1#ifndef TOFTRACK_H
2#define TOFTRACK_H
3
9
10const double adc_Cut = 10000.0;
11const double tdc_Cut = 100000.0;
12const double ztdc_Cut = 15.0;
13const double ztdc_Cut1 = 1.65*4.0;
14const double ztdc_Cut2 = 1.73*4.0;
15const double zadc_Cut = 25.0;
16const double mass[5] = { 0.00051100, 0.10566, 0.13957, 0.49368, 0.93827 };
17
19
21 public:
22 TofTrack();
23 ~TofTrack();
24
25 int trackId() const { return m_trackId; }
26 int tofTrackId() const { return m_tofTrackId; }
27 int id1() const { return m_id1; }
28 int id2() const { return m_id2; }
29 unsigned int barrel() const { return m_barrel; }
30 ExtTrackCase hitCase() const { return m_hitCase; }
31 double p() const { return m_momentum; }
32 double path() const { return m_path; }
33 double path1() const { return m_path1; }
34 double path2() const { return m_path2; }
35 double zrhit1() const { return m_zrhit1; }
36 double zrhit2() const { return m_zrhit2; }
37 double errzr1() const { return m_errzr1; }
38 double errzr2() const { return m_errzr2; }
39 int kal(unsigned int i) const { return m_kal[i]; }
40 double zrhit1(unsigned int i) const { return m_zr1[i]; }
41 double zrhit2(unsigned int i) const { return m_zr2[i]; }
42 double errzr1(unsigned int i) const { return m_ezr1[i]; }
43 double errzr2(unsigned int i) const { return m_ezr2[i]; }
44 std::vector<TofData*> tofData1() const { return m_tofData1; }
45 std::vector<TofData*> tofData2() const { return m_tofData2; }
46 int size1() const { return m_tofData1.size(); }
47 int size2() const { return m_tofData2.size(); }
48 int size3() const { return m_tofData3.size(); }
49 int size4() const { return m_tofData4.size(); }
50 double theta1() const { return m_theta1; }
51 double theta2() const { return m_theta2; }
52 double phi1() const { return m_phi1; }
53 double phi2() const { return m_phi2; }
54 unsigned int quality1() const { return m_quality1; }
55 unsigned int quality2() const { return m_quality2; }
56 unsigned int quality() const { return m_quality; }
57
58 int tofId1() const { return m_tofId1; }
59 int tofId2() const { return m_tofId2; }
60
61 double ph11() const { return m_ph11; }
62 double ph12() const { return m_ph12; }
63 double ph21() const { return m_ph21; }
64 double ph22() const { return m_ph22; }
65 double ph1() const { return m_ph1; }
66 double ph2() const { return m_ph2; }
67 double ph() const { return m_ph; }
68
69 double tof11(unsigned int i) const { return m_tof11[i]; }
70 double tof12(unsigned int i) const { return m_tof12[i]; }
71 double tof21(unsigned int i) const { return m_tof21[i]; }
72 double tof22(unsigned int i) const { return m_tof22[i]; }
73 double tof1(unsigned int i) const { return m_tof1[i]; }
74 double tof2(unsigned int i) const { return m_tof2[i]; }
75 double tof(unsigned int i) const { return m_tof[i]; }
76
77 double qch1() const { return m_qch1; }
78 double qch2() const { return m_qch2; }
79 double qch3() const { return m_qch3; }
80 double qch4() const { return m_qch4; }
81 double adc1() const { return m_adc1; }
82 double adc2() const { return m_adc2; }
83 double adc3() const { return m_adc3; }
84 double adc4() const { return m_adc4; }
85 double tdc1() const { return m_tdc1; }
86 double tdc2() const { return m_tdc2; }
87 double tdc3() const { return m_tdc3; }
88 double tdc4() const { return m_tdc4; }
89
90 double texpInner(unsigned int i) const { return m_texpInner[i]; }
91 double texpOuter(unsigned int i) const { return m_texpOuter[i]; }
92 double texp(unsigned int i) const { return m_texp[i]; }
93
94 double ztdc1() const { return m_ztdc1; }
95 double ztdc2() const { return m_ztdc2; }
96 double zadc1() const { return m_zadc1; }
97 double zadc2() const { return m_zadc2; }
98
99 double estime() const { return m_estime; }
100 double tdiff1() const { return m_tdiff1; }
101 double tdiff2() const { return m_tdiff2; }
102
103 int t0Stat() const { return m_t0Stat; }
104
105 unsigned int flag() const { return m_flag; }
106
107 public:
108 bool isNoHit() const { return m_hitCase==NoHit; }
109 void setQuality( int qual ) { m_quality = qual; }
110 void setQuality1( int qual1 ) { m_quality1 = qual1; }
111 void setQuality2( int qual2 ) { m_quality2 = qual2; }
112 void setFlag( unsigned int flag ) { m_flag = flag; }
113
114 void setExtTrack( RecExtTrack* extTrack, int kal[5], double t0, int t0Stat );
115 void getMultiHit( TofTrack*& );
116 void setTofData( TofDataMap tofDataMap );
117 void tofDataAnalysis( TofData* tof, unsigned int iflag );
118 void getTofData( TofData* tof, unsigned int iflag );
119 void getTofDataEast( TofData* tof, unsigned int iflag );
120 void getTofDataWest( TofData* tof, unsigned int iflag );
121 void getTofDataNohit( unsigned int iflag );
122 void match( bool forCalibration, std::vector<int> deadId, std::vector<TofTrack*>*& tofTrackVec );
123 void findTofDataBarrel( std::vector<TofData*> tofDataVec1, std::vector<TofData*> tofDataVec2, double zrhit, unsigned int iflag, std::vector<TofTrack*>*& tofTrackVec );
124 TofData* chooseTofData( std::vector<TofData*> tofDataVec, double zrhit );
126 void findTofDataEndcap( std::vector<TofData*> tofDataVec1, std::vector<TofData*> tofDataVec2, double zr1[5] );
127 TofData* chooseTofDataEndcap( std::vector<TofData*> tofDataVec, double zr1[5] );
129
131
132 void setCalibration();
133
134 void convert2RecTofTrackCol( RecTofTrackCol* recTofTrackCol );
135 void buildRecTofTrack( RecTofTrack* track, int layerorend );
136 void setRecTofTrack( RecTofTrack* track, int layerorend );
137
138 void convert2RecBTofCalHitCol( int runNumber, int eventNumber, RecBTofCalHitCol* btofCalHitCol, std::string calibData );
139 void convert2RecETofCalHitCol( int runNumber, int eventNumber, RecETofCalHitCol* etofCalHitCol, std::string calibData );
140
142
143 private:
144 int m_trackId;
145 int m_tofTrackId;
146 int m_id1, m_id2;
147 int m_tofId1, m_tofId2;
148 unsigned int m_barrel;
149 ExtTrackCase m_hitCase;
150 double m_momentum;
151 double m_path, m_path1, m_path2;
152 double m_zrhit1, m_errzr1, m_zrhit2, m_errzr2;
153 int m_kal[5];
154 double m_zr1[5], m_ezr1[5], m_zr2[5], m_ezr2[5];
155 std::vector<TofData*> m_tofData1;
156 std::vector<TofData*> m_tofData2;
157 std::vector<TofData*> m_tofData3;
158 std::vector<TofData*> m_tofData4;
159 unsigned int m_quality1, m_quality2;
160 unsigned int m_quality;
161 // quality introduction
162 // 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
163 // neighbor>1 single end
164 // neighbor==1 lost TDC
165 // hit counter>1 lost ADC
166 // hit counter==1 Raw data
167 // calibration q t q t
168 // zAdc not match East West
169 // zTdc not match
170
171 double m_theta1, m_theta2, m_phi1, m_phi2;
172
173 double m_ph11, m_ph12, m_tof11[5], m_tof12[5];
174 double m_ph21, m_ph22, m_tof21[5], m_tof22[5];
175 double m_ph1, m_ph2, m_ph;
176 double m_tof1[5], m_tof2[5], m_tof[5];
177
178 double m_texp[5], m_texpInner[5], m_texpOuter[5];
179
180 double m_sigma11, m_sigma12, m_sigma21, m_sigma22;
181 double m_sigma1, m_sigma2, m_sigma;
182
183 double m_qch1, m_qch2, m_qch3, m_qch4;
184 double m_adc1, m_adc2, m_adc3, m_adc4;
185 double m_tdc1, m_tdc2, m_tdc3, m_tdc4;
186
187 double m_ztdc1, m_ztdc2, m_zadc1, m_zadc2;
188
189 double m_estime, m_tdiff1, m_tdiff2;
190
191 int m_t0Stat;
192
193 unsigned m_flag;
194
195};
196
197typedef std::vector<TofTrack*> TofTrackVec;
198
199#endif // TOFTRACK_H
ExtTrackCase
Definition: MrpcTrack.h:20
ObjectVector< RecBTofCalHit > RecBTofCalHitCol
Definition: RecBTofCalHit.h:94
ObjectVector< RecETofCalHit > RecETofCalHitCol
Definition: RecETofCalHit.h:82
ObjectVector< RecTofTrack > RecTofTrackCol
Definition: RecTofTrack.h:33
std::multimap< unsigned int, TofData * > TofDataMap
Definition: TofData.h:244
std::vector< TofTrack * > TofTrackVec
Definition: TofTrack.h:197
const double tdc_Cut
Definition: TofTrack.h:11
const double ztdc_Cut2
Definition: TofTrack.h:14
const double zadc_Cut
Definition: TofTrack.h:15
const double ztdc_Cut1
Definition: TofTrack.h:13
const double mass[5]
Definition: TofTrack.h:16
ExtTrackCase
Definition: TofTrack.h:18
@ WestEndcap
Definition: TofTrack.h:18
@ OuterLayer
Definition: TofTrack.h:18
@ InnerLayer
Definition: TofTrack.h:18
@ EastEndcap
Definition: TofTrack.h:18
@ DoubleLayer
Definition: TofTrack.h:18
@ NoHit
Definition: TofTrack.h:18
const double adc_Cut
Definition: TofTrack.h:10
const double ztdc_Cut
Definition: TofTrack.h:12
void setTofData(TofDataMap tofDataMap)
Definition: TofTrack.cxx:288
double zrhit1(unsigned int i) const
Definition: TofTrack.h:40
double tof2(unsigned int i) const
Definition: TofTrack.h:74
double ph11() const
Definition: TofTrack.h:61
double phi2() const
Definition: TofTrack.h:53
double theta1() const
Definition: TofTrack.h:50
double errzr1(unsigned int i) const
Definition: TofTrack.h:42
std::vector< TofData * > tofData1() const
Definition: TofTrack.h:44
double tof11(unsigned int i) const
Definition: TofTrack.h:69
void setExtTrack(RecExtTrack *extTrack, int kal[5], double t0, int t0Stat)
Definition: TofTrack.cxx:144
double tof12(unsigned int i) const
Definition: TofTrack.h:70
double phi1() const
Definition: TofTrack.h:52
double tdiff2() const
Definition: TofTrack.h:101
TofData * chooseTofDataEndcap(std::vector< TofData * > tofDataVec, double zr1[5])
Definition: TofTrack.cxx:940
TofTrack()
Definition: TofTrack.cxx:14
ExtTrackCase hitCase() const
Definition: TofTrack.h:30
double theta2() const
Definition: TofTrack.h:51
double tdiff1() const
Definition: TofTrack.h:100
double qch3() const
Definition: TofTrack.h:79
double adc4() const
Definition: TofTrack.h:84
double tdc4() const
Definition: TofTrack.h:88
double tdc2() const
Definition: TofTrack.h:86
int t0Stat() const
Definition: TofTrack.h:103
int kal(unsigned int i) const
Definition: TofTrack.h:39
int tofTrackId() const
Definition: TofTrack.h:26
unsigned int quality1() const
Definition: TofTrack.h:54
double tof(unsigned int i) const
Definition: TofTrack.h:75
int size2() const
Definition: TofTrack.h:47
void convert2RecTofTrackCol(RecTofTrackCol *recTofTrackCol)
Definition: TofTrack.cxx:1344
int id2() const
Definition: TofTrack.h:28
double ph12() const
Definition: TofTrack.h:62
double path2() const
Definition: TofTrack.h:34
void tofDataAnalysis(TofData *tof, unsigned int iflag)
Definition: TofTrack.cxx:426
double errzr2() const
Definition: TofTrack.h:38
void buildRecTofTrack(RecTofTrack *track, int layerorend)
Definition: TofTrack.cxx:1558
void tofDataStudy()
double ph22() const
Definition: TofTrack.h:64
void getTofData(TofData *tof, unsigned int iflag)
Definition: TofTrack.cxx:995
void match(bool forCalibration, std::vector< int > deadId, std::vector< TofTrack * > *&tofTrackVec)
Definition: TofTrack.cxx:493
double texpInner(unsigned int i) const
Definition: TofTrack.h:90
void findTofDataEndcap(std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zr1[5])
Definition: TofTrack.cxx:859
double zadc2() const
Definition: TofTrack.h:97
double ztdc1() const
Definition: TofTrack.h:94
int trackId() const
Definition: TofTrack.h:25
void qualityAnalysis()
int tofId1() const
Definition: TofTrack.h:58
bool isNoHit() const
Definition: TofTrack.h:108
double tof21(unsigned int i) const
Definition: TofTrack.h:71
double tof1(unsigned int i) const
Definition: TofTrack.h:73
void setQuality1(int qual1)
Definition: TofTrack.h:110
double p() const
Definition: TofTrack.h:31
double tdc3() const
Definition: TofTrack.h:87
double path() const
Definition: TofTrack.h:32
double zrhit2() const
Definition: TofTrack.h:36
void setCalibration()
Definition: TofTrack.cxx:1193
unsigned int flag() const
Definition: TofTrack.h:105
double errzr2(unsigned int i) const
Definition: TofTrack.h:43
double texpOuter(unsigned int i) const
Definition: TofTrack.h:91
double path1() const
Definition: TofTrack.h:33
void setRecTofTrack(RecTofTrack *track, int layerorend)
Definition: TofTrack.cxx:1621
double estime() const
Definition: TofTrack.h:99
void convert2RecETofCalHitCol(int runNumber, int eventNumber, RecETofCalHitCol *etofCalHitCol, std::string calibData)
Definition: TofTrack.cxx:1788
double qch4() const
Definition: TofTrack.h:80
void convert2RecBTofCalHitCol(int runNumber, int eventNumber, RecBTofCalHitCol *btofCalHitCol, std::string calibData)
Definition: TofTrack.cxx:1705
double zrhit2(unsigned int i) const
Definition: TofTrack.h:41
double ph() const
Definition: TofTrack.h:67
double texp(unsigned int i) const
Definition: TofTrack.h:92
double adc3() const
Definition: TofTrack.h:83
TofData * compareTofData(TofData *tofData1, TofData *tofData2, double zrhit)
Definition: TofTrack.cxx:837
double errzr1() const
Definition: TofTrack.h:37
double tof22(unsigned int i) const
Definition: TofTrack.h:72
double ztdc2() const
Definition: TofTrack.h:95
void getTofDataNohit(unsigned int iflag)
Definition: TofTrack.cxx:1150
void setFlag(unsigned int flag)
Definition: TofTrack.h:112
unsigned int quality() const
Definition: TofTrack.h:56
TofData * chooseTofData(std::vector< TofData * > tofDataVec, double zrhit)
Definition: TofTrack.cxx:780
void getTofDataWest(TofData *tof, unsigned int iflag)
Definition: TofTrack.cxx:1101
int size3() const
Definition: TofTrack.h:48
void getMultiHit(TofTrack *&)
Definition: TofTrack.cxx:244
double adc1() const
Definition: TofTrack.h:81
int tofId2() const
Definition: TofTrack.h:59
void setQuality2(int qual2)
Definition: TofTrack.h:111
TofData * compareTofDataEndcap(TofData *tofData1, TofData *tofData2)
Definition: TofTrack.cxx:983
double zrhit1() const
Definition: TofTrack.h:35
double ph2() const
Definition: TofTrack.h:66
double ph21() const
Definition: TofTrack.h:63
double qch1() const
Definition: TofTrack.h:77
std::vector< TofData * > tofData2() const
Definition: TofTrack.h:45
unsigned int barrel() const
Definition: TofTrack.h:29
double tdc1() const
Definition: TofTrack.h:85
double ph1() const
Definition: TofTrack.h:65
void getTofDataEast(TofData *tof, unsigned int iflag)
Definition: TofTrack.cxx:1052
double qch2() const
Definition: TofTrack.h:78
void findTofDataBarrel(std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zrhit, unsigned int iflag, std::vector< TofTrack * > *&tofTrackVec)
Definition: TofTrack.cxx:609
unsigned int quality2() const
Definition: TofTrack.h:55
double adc2() const
Definition: TofTrack.h:82
int size4() const
Definition: TofTrack.h:49
double zadc1() const
Definition: TofTrack.h:96
void setQuality(int qual)
Definition: TofTrack.h:109
int id1() const
Definition: TofTrack.h:27
int size1() const
Definition: TofTrack.h:46