BOSS 7.0.6
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 ztdc_EtfCut = 15.0;
17const double mass[5] = { 0.00051100, 0.10566, 0.13957, 0.49368, 0.93827 };
18const double stripLength[12] = { 8.6, 9.1, 9.6, 10.1, 10.6, 11.1, 11.6, 12.1, 12.6, 13.1, 13.6, 14.1};
19
21
23 public:
24 TofTrack( int run, int event );
25 ~TofTrack();
26
27 int trackId() const { return m_trackId; }
28 int tofTrackId() const { return m_tofTrackId; }
29 int id1() const { return m_id1; }
30 int id2() const { return m_id2; }
31 int istrip1() const { return m_istrip1; }
32 int istrip2() const { return m_istrip2; }
33 int dstrip1() const { return m_delStrip1; }
34 int dstrip2() const { return m_delStrip2; }
35 unsigned int barrel() const { return m_barrel; }
36 ExtTrackCase hitCase() const { return m_hitCase; }
37 double p() const { return m_momentum; }
38 double path() const { return m_path; }
39 double path1() const { return m_path1; }
40 double path2() const { return m_path2; }
41 double zrhit1() const { return m_zrhit1; }
42 double zrhit2() const { return m_zrhit2; }
43 double errzrhit1() const { return m_errzr1; }
44 double errzrhit2() const { return m_errzr2; }
45 double xhit1() const { return m_xhit1; }
46 double yhit1() const { return m_yhit1; }
47 double xhit2() const { return m_xhit2; }
48 double yhit2() const { return m_yhit2; }
49 int kal(unsigned int i) const { return m_kal[i]; }
50 double zr1(unsigned int i) const { return m_zr1[i]; }
51 double zr2(unsigned int i) const { return m_zr2[i]; }
52 double errzr1(unsigned int i) const { return m_ezr1[i]; }
53 double errzr2(unsigned int i) const { return m_ezr2[i]; }
54 std::vector<TofData*> tofData1() const { return m_tofData1; }
55 std::vector<TofData*> tofData2() const { return m_tofData2; }
56 int size1() const { return m_tofData1.size(); }
57 int size2() const { return m_tofData2.size(); }
58 int size3() const { return m_tofData3.size(); }
59 int size4() const { return m_tofData4.size(); }
60 double theta1() const { return m_theta1; }
61 double theta2() const { return m_theta2; }
62 double phi1() const { return m_phi1; }
63 double phi2() const { return m_phi2; }
64 unsigned int quality1() const { return m_quality1; }
65 unsigned int quality2() const { return m_quality2; }
66 unsigned int quality() const { return m_quality; }
67
68 int tofId1() const { return m_tofId1; }
69 int tofId2() const { return m_tofId2; }
70 int strip1() const { return m_strip1; }
71 int strip2() const { return m_strip2; }
72
73 double ph11() const { return m_ph11; }
74 double ph12() const { return m_ph12; }
75 double ph21() const { return m_ph21; }
76 double ph22() const { return m_ph22; }
77 double ph1() const { return m_ph1; }
78 double ph2() const { return m_ph2; }
79 double ph() const { return m_ph; }
80
81 double tof11(unsigned int i) const { return m_tof11[i]; }
82 double tof12(unsigned int i) const { return m_tof12[i]; }
83 double tof21(unsigned int i) const { return m_tof21[i]; }
84 double tof22(unsigned int i) const { return m_tof22[i]; }
85 double tof1(unsigned int i) const { return m_tof1[i]; }
86 double tof2(unsigned int i) const { return m_tof2[i]; }
87 double tof(unsigned int i) const { return m_tof[i]; }
88
89 double qch1() const { return m_qch1; }
90 double qch2() const { return m_qch2; }
91 double qch3() const { return m_qch3; }
92 double qch4() const { return m_qch4; }
93 double adc1() const { return m_adc1; }
94 double adc2() const { return m_adc2; }
95 double adc3() const { return m_adc3; }
96 double adc4() const { return m_adc4; }
97 double tdc1() const { return m_tdc1; }
98 double tdc2() const { return m_tdc2; }
99 double tdc3() const { return m_tdc3; }
100 double tdc4() const { return m_tdc4; }
101
102 double texpInner(unsigned int i) const { return m_texpInner[i]; }
103 double texpOuter(unsigned int i) const { return m_texpOuter[i]; }
104 double texp(unsigned int i) const { return m_texp[i]; }
105
106 double ztdc1() const { return m_ztdc1; }
107 double ztdc2() const { return m_ztdc2; }
108 double zadc1() const { return m_zadc1; }
109 double zadc2() const { return m_zadc2; }
110
111 double estime() const { return m_estime; }
112 double tdiff1() const { return m_tdiff1; }
113 double tdiff2() const { return m_tdiff2; }
114
115 int t0Stat() const { return m_t0Stat; }
116
117 unsigned int flag() const { return m_flag; }
118
119 public:
120 bool isNoHit() const { return m_hitCase==NoHit; }
121 void setQuality( int qual ) { m_quality = qual; }
122 void setQuality1( int qual1 ) { m_quality1 = qual1; }
123 void setQuality2( int qual2 ) { m_quality2 = qual2; }
124 void setFlag( unsigned int flag ) { m_flag = flag; }
125
126 void setExtTrack( RecExtTrack* extTrack, double costheta, double p[5], int kal[5], double t0, int t0Stat );
127 void getMultiHit( TofTrack*& );
128 void setTofData( TofDataMap tofDataMap );
129 void tofDataAnalysis( TofData* tof, unsigned int iflag );
130 void getTofData( TofData* tof, unsigned int iflag );
131 void getTofDataEast( TofData* tof, unsigned int iflag );
132 void getTofDataWest( TofData* tof, unsigned int iflag );
133 void getTofDataNohit( unsigned int iflag );
134 void getEtfData( TofData* tof, unsigned int iflag, unsigned int qual );
135 void match( bool forCalibration, std::vector<int> deadId, std::vector<TofTrack*>*& tofTrackVec );
136 void findTofDataBarrel( std::vector<TofData*> tofDataVec1, std::vector<TofData*> tofDataVec2, double zrhit, unsigned int iflag, std::vector<TofTrack*>*& tofTrackVec );
137 TofData* chooseTofData( std::vector<TofData*> tofDataVec, double zrhit );
139 void findTofDataEndcap( std::vector<TofData*> tofDataVec1, std::vector<TofData*> tofDataVec2, double zr1[5] );
140 TofData* chooseTofDataEndcap( std::vector<TofData*> tofDataVec, double zr1[5] );
142 void findEtfData( std::vector<TofData*> tofDataVec1, std::vector<TofData*> tofDataVec2, std::vector<TofData*> tofDataVec3, double zrhit, unsigned int iflag );
143 TofData* chooseEtfData1( std::vector<TofData*> tofDataVec, double zrhit );
144 TofData* chooseEtfData2( std::vector<TofData*> tofDataVec, double zrhit );
145 // TofData* compareEtfData( TofData* tofData1, TofData* tofData2, double zrhit );
146
148
149 void setCalibration();
150
151 void convert2RecTofTrackCol( RecTofTrackCol* recTofTrackCol );
152 void buildRecTofTrack( RecTofTrack* track, int layerorend );
153 void setRecTofTrack( RecTofTrack* track, int layerorend );
154
155 void convert2RecBTofCalHitColBarrel( int runNumber, int eventNumber, RecBTofCalHitCol* btofCalHitCol, std::string calibData );
156 void convert2RecETofCalHitCol( int runNumber, int eventNumber, RecETofCalHitCol* etofCalHitCol, std::string calibData );
157 void convert2RecBTofCalHitColETF( int runNumber, int eventNumber, RecBTofCalHitCol* btofCalHitCol, std::string calibData );
158
160
161 private:
162 int m_run, m_event;
163 int m_trackId;
164 int m_tofTrackId;
165 int m_id1, m_id2, m_istrip1, m_istrip2;
166 int m_tofId1, m_tofId2, m_strip1, m_strip2;
167 int m_delStrip1, m_delStrip2;
168 unsigned int m_barrel;
169 ExtTrackCase m_hitCase;
170 double m_momentum;
171 double m_path, m_path1, m_path2;
172 double m_zrhit1, m_errzr1, m_zrhit2, m_errzr2;
173 double m_xhit1, m_yhit1, m_xhit2, m_yhit2;
174 int m_kal[5];
175 double m_zr1[5], m_ezr1[5], m_zr2[5], m_ezr2[5];
176 std::vector<TofData*> m_tofData1;
177 std::vector<TofData*> m_tofData2;
178 std::vector<TofData*> m_tofData3;
179 std::vector<TofData*> m_tofData4;
180 std::vector<TofData*> m_tofData5;
181 std::vector<TofData*> m_tofData6;
182 unsigned int m_quality1, m_quality2;
183 unsigned int m_quality;
184 // quality introduction
185 // 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
186 // neighbor>1 single end
187 // neighbor==1 lost TDC
188 // hit counter>1 lost ADC
189 // hit counter==1 Raw data
190 // calibration q t q t
191 // zAdc not match East West
192 // zTdc not match
193
194 double m_theta1, m_theta2, m_phi1, m_phi2;
195
196 double m_ph11, m_ph12, m_tof11[5], m_tof12[5];
197 double m_ph21, m_ph22, m_tof21[5], m_tof22[5];
198 double m_ph1, m_ph2, m_ph;
199 double m_tof1[5], m_tof2[5], m_tof[5];
200
201 double m_texp[5], m_texpInner[5], m_texpOuter[5];
202
203 double m_sigma11, m_sigma12, m_sigma21, m_sigma22;
204 double m_sigma1, m_sigma2, m_sigma;
205
206 double m_qch1, m_qch2, m_qch3, m_qch4;
207 double m_adc1, m_adc2, m_adc3, m_adc4;
208 double m_tdc1, m_tdc2, m_tdc3, m_tdc4;
209
210 double m_ztdc1, m_ztdc2, m_zadc1, m_zadc2;
211
212 double m_estime, m_tdiff1, m_tdiff2;
213
214 int m_t0Stat;
215
216 unsigned m_flag;
217
218};
219
220typedef std::vector<TofTrack*> TofTrackVec;
221
222#endif // TOFTRACK_H
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:220
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:17
ExtTrackCase
Definition: TofTrack.h:20
@ WestEndcap
Definition: TofTrack.h:20
@ OuterLayer
Definition: TofTrack.h:20
@ EastEndcapMRPC
Definition: TofTrack.h:20
@ InnerLayer
Definition: TofTrack.h:20
@ EastEndcap
Definition: TofTrack.h:20
@ DoubleLayer
Definition: TofTrack.h:20
@ WestEndcapMRPC
Definition: TofTrack.h:20
@ NoHit
Definition: TofTrack.h:20
const double ztdc_EtfCut
Definition: TofTrack.h:16
const double stripLength[12]
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:486
int istrip2() const
Definition: TofTrack.h:32
double tof2(unsigned int i) const
Definition: TofTrack.h:86
double ph11() const
Definition: TofTrack.h:73
double phi2() const
Definition: TofTrack.h:63
int dstrip1() const
Definition: TofTrack.h:33
double theta1() const
Definition: TofTrack.h:60
double errzr1(unsigned int i) const
Definition: TofTrack.h:52
std::vector< TofData * > tofData1() const
Definition: TofTrack.h:54
double tof11(unsigned int i) const
Definition: TofTrack.h:81
double tof12(unsigned int i) const
Definition: TofTrack.h:82
double phi1() const
Definition: TofTrack.h:62
double tdiff2() const
Definition: TofTrack.h:113
TofData * chooseTofDataEndcap(std::vector< TofData * > tofDataVec, double zr1[5])
Definition: TofTrack.cxx:1375
double xhit1() const
Definition: TofTrack.h:45
double yhit2() const
Definition: TofTrack.h:48
double xhit2() const
Definition: TofTrack.h:47
ExtTrackCase hitCase() const
Definition: TofTrack.h:36
int strip1() const
Definition: TofTrack.h:70
double zr1(unsigned int i) const
Definition: TofTrack.h:50
double theta2() const
Definition: TofTrack.h:61
double tdiff1() const
Definition: TofTrack.h:112
double qch3() const
Definition: TofTrack.h:91
double adc4() const
Definition: TofTrack.h:96
double tdc4() const
Definition: TofTrack.h:100
double tdc2() const
Definition: TofTrack.h:98
int t0Stat() const
Definition: TofTrack.h:115
int kal(unsigned int i) const
Definition: TofTrack.h:49
int tofTrackId() const
Definition: TofTrack.h:28
void getEtfData(TofData *tof, unsigned int iflag, unsigned int qual)
Definition: TofTrack.cxx:1828
unsigned int quality1() const
Definition: TofTrack.h:64
double tof(unsigned int i) const
Definition: TofTrack.h:87
int size2() const
Definition: TofTrack.h:57
void convert2RecTofTrackCol(RecTofTrackCol *recTofTrackCol)
Definition: TofTrack.cxx:2114
int id2() const
Definition: TofTrack.h:30
double ph12() const
Definition: TofTrack.h:74
double path2() const
Definition: TofTrack.h:40
void tofDataAnalysis(TofData *tof, unsigned int iflag)
Definition: TofTrack.cxx:793
void findEtfData(std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, std::vector< TofData * > tofDataVec3, double zrhit, unsigned int iflag)
Definition: TofTrack.cxx:1431
void buildRecTofTrack(RecTofTrack *track, int layerorend)
Definition: TofTrack.cxx:2429
void tofDataStudy()
double ph22() const
Definition: TofTrack.h:76
void getTofData(TofData *tof, unsigned int iflag)
Definition: TofTrack.cxx:1582
void match(bool forCalibration, std::vector< int > deadId, std::vector< TofTrack * > *&tofTrackVec)
Definition: TofTrack.cxx:849
double texpInner(unsigned int i) const
Definition: TofTrack.h:102
void findTofDataEndcap(std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zr1[5])
Definition: TofTrack.cxx:1294
double zadc2() const
Definition: TofTrack.h:109
double ztdc1() const
Definition: TofTrack.h:106
int strip2() const
Definition: TofTrack.h:71
TofData * chooseEtfData2(std::vector< TofData * > tofDataVec, double zrhit)
Definition: TofTrack.cxx:1549
int trackId() const
Definition: TofTrack.h:27
void qualityAnalysis()
double errzrhit1() const
Definition: TofTrack.h:43
int tofId1() const
Definition: TofTrack.h:68
bool isNoHit() const
Definition: TofTrack.h:120
double tof21(unsigned int i) const
Definition: TofTrack.h:83
double tof1(unsigned int i) const
Definition: TofTrack.h:85
void setQuality1(int qual1)
Definition: TofTrack.h:122
double p() const
Definition: TofTrack.h:37
double tdc3() const
Definition: TofTrack.h:99
double path() const
Definition: TofTrack.h:38
double zrhit2() const
Definition: TofTrack.h:42
void setCalibration()
Definition: TofTrack.cxx:1892
unsigned int flag() const
Definition: TofTrack.h:117
double errzr2(unsigned int i) const
Definition: TofTrack.h:53
double texpOuter(unsigned int i) const
Definition: TofTrack.h:103
double path1() const
Definition: TofTrack.h:39
void setRecTofTrack(RecTofTrack *track, int layerorend)
Definition: TofTrack.cxx:2507
void convert2RecBTofCalHitColBarrel(int runNumber, int eventNumber, RecBTofCalHitCol *btofCalHitCol, std::string calibData)
Definition: TofTrack.cxx:2591
double estime() const
Definition: TofTrack.h:111
double errzrhit2() const
Definition: TofTrack.h:44
void convert2RecETofCalHitCol(int runNumber, int eventNumber, RecETofCalHitCol *etofCalHitCol, std::string calibData)
Definition: TofTrack.cxx:2676
double qch4() const
Definition: TofTrack.h:92
int istrip1() const
Definition: TofTrack.h:31
double ph() const
Definition: TofTrack.h:79
void convert2RecBTofCalHitColETF(int runNumber, int eventNumber, RecBTofCalHitCol *btofCalHitCol, std::string calibData)
Definition: TofTrack.cxx:2716
double yhit1() const
Definition: TofTrack.h:46
double texp(unsigned int i) const
Definition: TofTrack.h:104
double adc3() const
Definition: TofTrack.h:95
TofData * compareTofData(TofData *tofData1, TofData *tofData2, double zrhit)
Definition: TofTrack.cxx:1272
double tof22(unsigned int i) const
Definition: TofTrack.h:84
double ztdc2() const
Definition: TofTrack.h:107
void getTofDataNohit(unsigned int iflag)
Definition: TofTrack.cxx:1786
void setFlag(unsigned int flag)
Definition: TofTrack.h:124
unsigned int quality() const
Definition: TofTrack.h:66
double zr2(unsigned int i) const
Definition: TofTrack.h:51
TofData * chooseTofData(std::vector< TofData * > tofDataVec, double zrhit)
Definition: TofTrack.cxx:1215
void getTofDataWest(TofData *tof, unsigned int iflag)
Definition: TofTrack.cxx:1726
int size3() const
Definition: TofTrack.h:58
TofData * chooseEtfData1(std::vector< TofData * > tofDataVec, double zrhit)
Definition: TofTrack.cxx:1503
void getMultiHit(TofTrack *&)
Definition: TofTrack.cxx:426
double adc1() const
Definition: TofTrack.h:93
int tofId2() const
Definition: TofTrack.h:69
void setQuality2(int qual2)
Definition: TofTrack.h:123
TofData * compareTofDataEndcap(TofData *tofData1, TofData *tofData2)
Definition: TofTrack.cxx:1418
double zrhit1() const
Definition: TofTrack.h:41
double ph2() const
Definition: TofTrack.h:78
double ph21() const
Definition: TofTrack.h:75
double qch1() const
Definition: TofTrack.h:89
std::vector< TofData * > tofData2() const
Definition: TofTrack.h:55
unsigned int barrel() const
Definition: TofTrack.h:35
int dstrip2() const
Definition: TofTrack.h:34
double tdc1() const
Definition: TofTrack.h:97
void setExtTrack(RecExtTrack *extTrack, double costheta, double p[5], int kal[5], double t0, int t0Stat)
Definition: TofTrack.cxx:157
double ph1() const
Definition: TofTrack.h:77
void getTofDataEast(TofData *tof, unsigned int iflag)
Definition: TofTrack.cxx:1666
double qch2() const
Definition: TofTrack.h:90
void findTofDataBarrel(std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zrhit, unsigned int iflag, std::vector< TofTrack * > *&tofTrackVec)
Definition: TofTrack.cxx:1043
unsigned int quality2() const
Definition: TofTrack.h:65
double adc2() const
Definition: TofTrack.h:94
int size4() const
Definition: TofTrack.h:59
double zadc1() const
Definition: TofTrack.h:108
void setQuality(int qual)
Definition: TofTrack.h:121
int id1() const
Definition: TofTrack.h:29
int size1() const
Definition: TofTrack.h:56
float costheta