BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
MrpcTrack.h
Go to the documentation of this file.
1#ifndef MRPCTRACK_H
2#define MRPCTRACK_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
18
20
21
23 public:
24 MrpcTrack();
25 ~MrpcTrack();
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 unsigned int barrel() const { return m_barrel; }
32 ExtTrackCase hitCase() const { return m_hitCase; }
33 double p() const { return m_momentum; }
34 double path() const { return m_path; }
35 double path1() const { return m_path1; }
36 double path2() const { return m_path2; }
37 double zrhit1() const { return m_zrhit1; }
38 double zrhit2() const { return m_zrhit2; }
39 double errzr1() const { return m_errzr1; }
40 double errzr2() const { return m_errzr2; }
41 int kal(unsigned int i) const { return m_kal[i]; }
42 double zrhit1(unsigned int i) const { return m_zr1[i]; }
43 double zrhit2(unsigned int i) const { return m_zr2[i]; }
44 double errzr1(unsigned int i) const { return m_ezr1[i]; }
45 double errzr2(unsigned int i) const { return m_ezr2[i]; }
46 std::vector<TofData*> tofData1() const { return m_tofData1; }
47 std::vector<TofData*> tofData2() const { return m_tofData2; }
48 int size1() const { return m_tofData1.size(); }
49 int size2() const { return m_tofData2.size(); }
50 int size3() const { return m_tofData3.size(); }
51 int size4() const { return m_tofData4.size(); }
52 double theta1() const { return m_theta1; }
53 double theta2() const { return m_theta2; }
54 double phi1() const { return m_phi1; }
55 double phi2() const { return m_phi2; }
56 unsigned int quality1() const { return m_quality1; }
57 unsigned int quality2() const { return m_quality2; }
58 unsigned int quality() const { return m_quality; }
59
60 int tofId1() const { return m_tofId1; }
61 int tofId2() const { return m_tofId2; }
62
63 double ph11() const { return m_ph11; }
64 double ph12() const { return m_ph12; }
65 double ph21() const { return m_ph21; }
66 double ph22() const { return m_ph22; }
67 double ph1() const { return m_ph1; }
68 double ph2() const { return m_ph2; }
69 double ph() const { return m_ph; }
70
71 double tof11(unsigned int i) const { return m_tof11[i]; }
72 double tof12(unsigned int i) const { return m_tof12[i]; }
73 double tof21(unsigned int i) const { return m_tof21[i]; }
74 double tof22(unsigned int i) const { return m_tof22[i]; }
75 double tof1(unsigned int i) const { return m_tof1[i]; }
76 double tof2(unsigned int i) const { return m_tof2[i]; }
77 double tof(unsigned int i) const { return m_tof[i]; }
78
79 double qch1() const { return m_qch1; }
80 double qch2() const { return m_qch2; }
81 double qch3() const { return m_qch3; }
82 double qch4() const { return m_qch4; }
83 double adc1() const { return m_adc1; }
84 double adc2() const { return m_adc2; }
85 double adc3() const { return m_adc3; }
86 double adc4() const { return m_adc4; }
87 double tdc1() const { return m_tdc1; }
88 double tdc2() const { return m_tdc2; }
89 double tdc3() const { return m_tdc3; }
90 double tdc4() const { return m_tdc4; }
91
92 double texpInner(unsigned int i) const { return m_texpInner[i]; }
93 double texpOuter(unsigned int i) const { return m_texpOuter[i]; }
94 double texp(unsigned int i) const { return m_texp[i]; }
95
96 double ztdc1() const { return m_ztdc1; }
97 double ztdc2() const { return m_ztdc2; }
98 double zadc1() const { return m_zadc1; }
99 double zadc2() const { return m_zadc2; }
100
101 double estime() const { return m_estime; }
102 double tdiff1() const { return m_tdiff1; }
103 double tdiff2() const { return m_tdiff2; }
104
105 int t0Stat() const { return m_t0Stat; }
106
107 unsigned int flag() const { return m_flag; }
108
109 bool is_mrpc_extrapolation_good() {return mrpc_extrapolation_good;}
110
111
112 public:
113 bool isNoHit() const { return m_hitCase==NoHit; }
114 void setQuality( int qual ) { m_quality = qual; }
115 void setQuality1( int qual1 ) { m_quality1 = qual1; }
116 void setQuality2( int qual2 ) { m_quality2 = qual2; }
117 void setFlag( unsigned int flag ) { m_flag = flag; }
118
119 void setExtTrack( RecExtTrack* extTrack, int kal[5], double t0, int t0Stat );
120 void getMultiHit( MrpcTrack*& );
121 void setTofData( TofDataMap tofDataMap, int );
122 void tofDataAnalysis( TofData* tof, unsigned int iflag );
123 void getTofData( TofData* tof, unsigned int iflag );
124 void getTofDataEast( TofData* tof, unsigned int iflag );
125 void getTofDataWest( TofData* tof, unsigned int iflag );
126 void getTofDataNohit( unsigned int iflag );
127 void match( bool forCalibration, std::vector<int> deadId, std::vector<MrpcTrack*>*& tofTrackVec );
128 void findTofDataMRPC( std::vector<TofData*> tofDataVec1, std::vector<TofData*> tofDataVec2, double zrhit, unsigned int iflag);
129 TofData* chooseTofDataMRPC(std::vector<TofData*, std::allocator<TofData*> >, double);
130 void getTofDataMRPC(TofData*, unsigned int);
132
133
134 void findTofDataBarrel( std::vector<TofData*> tofDataVec1, std::vector<TofData*> tofDataVec2, double zrhit, unsigned int iflag, std::vector<MrpcTrack*>*& tofTrackVec );
135 TofData* chooseTofData( std::vector<TofData*> tofDataVec, double zrhit );
137 void findTofDataEndcap( std::vector<TofData*> tofDataVec1, std::vector<TofData*> tofDataVec2, double zr1[5] );
138 TofData* chooseTofDataEndcap( std::vector<TofData*> tofDataVec, double zr1[5] );
140
141
142
144
145 void setCalibration();
146
147 void convert2RecTofTrackCol( RecTofTrackCol* recTofTrackCol );
148 void buildRecTofTrack( RecTofTrack* track, int layerorend );
149 void setRecTofTrack( RecTofTrack* track, int layerorend );
150
151 void convert2RecBTofCalHitCol( int runNumber, int eventNumber, RecBTofCalHitCol* btofCalHitCol, std::string calibData );
152 void convert2RecETofCalHitCol( int runNumber, int eventNumber, RecETofCalHitCol* etofCalHitCol, std::string calibData );
153
155
156
157
158 int get_mrpc_stripid_neighbour(std::string, int, int);
159 int get_mrpc_partid_neighbour(std::string,int,int );
160
161
162 private:
163 int m_trackId;
164 int m_tofTrackId;
165 int m_id1, m_id2;
166 int m_tofId1, m_tofId2;
167 unsigned int m_barrel;
168 ExtTrackCase m_hitCase;
169 double m_momentum;
170 double m_path, m_path1, m_path2;
171 double m_zrhit1, m_errzr1, m_zrhit2, m_errzr2;
172 int m_kal[5];
173 double m_zr1[5], m_ezr1[5], m_zr2[5], m_ezr2[5];
174 std::vector<TofData*> m_tofData1;
175 std::vector<TofData*> m_tofData2;
176 std::vector<TofData*> m_tofData3;
177 std::vector<TofData*> m_tofData4;
178 unsigned int m_quality1, m_quality2;
179 unsigned int m_quality;
180 // quality introduction
181 // 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
182 // neighbor>1 single end
183 // neighbor==1 lost TDC
184 // hit counter>1 lost ADC
185 // hit counter==1 Raw data
186 // calibration q t q t
187 // zAdc not match East West
188 // zTdc not match
189
190 double m_theta1, m_theta2, m_phi1, m_phi2;
191
192 double m_ph11, m_ph12, m_tof11[5], m_tof12[5];
193 double m_ph21, m_ph22, m_tof21[5], m_tof22[5];
194 double m_ph1, m_ph2, m_ph;
195 double m_tof1[5], m_tof2[5], m_tof[5];
196
197 double m_texp[5], m_texpInner[5], m_texpOuter[5];
198
199 double m_sigma11, m_sigma12, m_sigma21, m_sigma22;
200 double m_sigma1, m_sigma2, m_sigma;
201
202 double m_qch1, m_qch2, m_qch3, m_qch4;
203 double m_adc1, m_adc2, m_adc3, m_adc4;
204 double m_tdc1, m_tdc2, m_tdc3, m_tdc4;
205
206 double m_ztdc1, m_ztdc2, m_zadc1, m_zadc2;
207
208 double m_estime, m_tdiff1, m_tdiff2;
209
210 int m_t0Stat;
211
212 unsigned m_flag;
213 bool mrpc_extrapolation_good;
214
215
216};
217
218typedef std::vector<MrpcTrack*> TofTrackVec;
219
220#endif
const double tdc_Cut
Definition: MrpcTrack.h:11
const double ztdc_Cut2
Definition: MrpcTrack.h:14
std::vector< MrpcTrack * > TofTrackVec
Definition: MrpcTrack.h:218
const double zadc_Cut
Definition: MrpcTrack.h:15
const double ztdc_Cut1
Definition: MrpcTrack.h:13
const double mass[5]
Definition: MrpcTrack.h:16
ExtTrackCase
Definition: MrpcTrack.h:19
@ WestEndcap
Definition: MrpcTrack.h:19
@ westendcap_2
Definition: MrpcTrack.h:19
@ OuterLayer
Definition: MrpcTrack.h:19
@ westendcap_1
Definition: MrpcTrack.h:19
@ InnerLayer
Definition: MrpcTrack.h:19
@ eastendcap_2
Definition: MrpcTrack.h:19
@ EastEndcap
Definition: MrpcTrack.h:19
@ DoubleLayer
Definition: MrpcTrack.h:19
@ eastendcap_1
Definition: MrpcTrack.h:19
@ NoHit
Definition: MrpcTrack.h:19
const double adc_Cut
Definition: MrpcTrack.h:10
const double ztdc_Cut
Definition: MrpcTrack.h:12
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
double tof2(unsigned int i) const
Definition: MrpcTrack.h:76
double adc2() const
Definition: MrpcTrack.h:84
double zrhit1() const
Definition: MrpcTrack.h:37
void qualityAnalysis()
double qch4() const
Definition: MrpcTrack.h:82
int size2() const
Definition: MrpcTrack.h:49
void getMultiHit(MrpcTrack *&)
Definition: MrpcTrack.cxx:344
void convert2RecBTofCalHitCol(int runNumber, int eventNumber, RecBTofCalHitCol *btofCalHitCol, std::string calibData)
Definition: MrpcTrack.cxx:7052
void buildRecTofTrack(RecTofTrack *track, int layerorend)
Definition: MrpcTrack.cxx:6862
TofData * chooseTofData(std::vector< TofData * > tofDataVec, double zrhit)
Definition: MrpcTrack.cxx:6001
TofData * compareTofDataEndcap(TofData *tofData1, TofData *tofData2)
Definition: MrpcTrack.cxx:6208
ExtTrackCase hitCase() const
Definition: MrpcTrack.h:32
TofData * chooseTofDataMRPC(std::vector< TofData *, std::allocator< TofData * > >, double)
Definition: MrpcTrack.cxx:5955
void getTofDataMRPC(TofData *, unsigned int)
Definition: MrpcTrack.cxx:6277
double tdc4() const
Definition: MrpcTrack.h:90
int id2() const
Definition: MrpcTrack.h:30
double tdiff2() const
Definition: MrpcTrack.h:103
void setTofData(TofDataMap tofDataMap, int)
Definition: MrpcTrack.cxx:395
unsigned int quality() const
Definition: MrpcTrack.h:58
double phi2() const
Definition: MrpcTrack.h:55
double tof22(unsigned int i) const
Definition: MrpcTrack.h:74
int get_mrpc_partid_neighbour(std::string, int, int)
Definition: MrpcTrack.cxx:7287
void getTofData(TofData *tof, unsigned int iflag)
Definition: MrpcTrack.cxx:6220
double zadc2() const
Definition: MrpcTrack.h:99
double zrhit2(unsigned int i) const
Definition: MrpcTrack.h:43
double ph12() const
Definition: MrpcTrack.h:64
double qch3() const
Definition: MrpcTrack.h:81
double zrhit1(unsigned int i) const
Definition: MrpcTrack.h:42
double qch1() const
Definition: MrpcTrack.h:79
void setQuality1(int qual1)
Definition: MrpcTrack.h:115
int id1() const
Definition: MrpcTrack.h:29
int t0Stat() const
Definition: MrpcTrack.h:105
std::vector< TofData * > tofData1() const
Definition: MrpcTrack.h:46
double zrhit2() const
Definition: MrpcTrack.h:38
void getTofDataEast(TofData *tof, unsigned int iflag)
Definition: MrpcTrack.cxx:6307
unsigned int barrel() const
Definition: MrpcTrack.h:31
TofData * compareTofDataMRPC(TofData *tofData1, TofData *tofData2)
Definition: MrpcTrack.cxx:5984
void match(bool forCalibration, std::vector< int > deadId, std::vector< MrpcTrack * > *&tofTrackVec)
Definition: MrpcTrack.cxx:5575
double ztdc1() const
Definition: MrpcTrack.h:96
double errzr1(unsigned int i) const
Definition: MrpcTrack.h:44
double errzr1() const
Definition: MrpcTrack.h:39
double errzr2(unsigned int i) const
Definition: MrpcTrack.h:45
void setCalibration()
Definition: MrpcTrack.cxx:6448
void getTofDataWest(TofData *tof, unsigned int iflag)
Definition: MrpcTrack.cxx:6356
double tof1(unsigned int i) const
Definition: MrpcTrack.h:75
bool isNoHit() const
Definition: MrpcTrack.h:113
double texp(unsigned int i) const
Definition: MrpcTrack.h:94
double path2() const
Definition: MrpcTrack.h:36
double ph() const
Definition: MrpcTrack.h:69
bool is_mrpc_extrapolation_good()
Definition: MrpcTrack.h:109
double tof11(unsigned int i) const
Definition: MrpcTrack.h:71
double tof(unsigned int i) const
Definition: MrpcTrack.h:77
double tdc2() const
Definition: MrpcTrack.h:88
int size3() const
Definition: MrpcTrack.h:50
void setQuality(int qual)
Definition: MrpcTrack.h:114
int trackId() const
Definition: MrpcTrack.h:27
void setQuality2(int qual2)
Definition: MrpcTrack.h:116
unsigned int quality2() const
Definition: MrpcTrack.h:57
void convert2RecETofCalHitCol(int runNumber, int eventNumber, RecETofCalHitCol *etofCalHitCol, std::string calibData)
Definition: MrpcTrack.cxx:7135
void getTofDataNohit(unsigned int iflag)
Definition: MrpcTrack.cxx:6405
double qch2() const
Definition: MrpcTrack.h:80
double adc3() const
Definition: MrpcTrack.h:85
TofData * compareTofData(TofData *tofData1, TofData *tofData2, double zrhit)
Definition: MrpcTrack.cxx:6061
double errzr2() const
Definition: MrpcTrack.h:40
double texpOuter(unsigned int i) const
Definition: MrpcTrack.h:93
unsigned int quality1() const
Definition: MrpcTrack.h:56
double theta2() const
Definition: MrpcTrack.h:53
void findTofDataMRPC(std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zrhit, unsigned int iflag)
Definition: MrpcTrack.cxx:5864
double texpInner(unsigned int i) const
Definition: MrpcTrack.h:92
double ph21() const
Definition: MrpcTrack.h:65
double ph2() const
Definition: MrpcTrack.h:68
double path1() const
Definition: MrpcTrack.h:35
int kal(unsigned int i) const
Definition: MrpcTrack.h:41
double estime() const
Definition: MrpcTrack.h:101
void convert2RecTofTrackCol(RecTofTrackCol *recTofTrackCol)
Definition: MrpcTrack.cxx:6642
double tof21(unsigned int i) const
Definition: MrpcTrack.h:73
double ph22() const
Definition: MrpcTrack.h:66
double tdc1() const
Definition: MrpcTrack.h:87
double path() const
Definition: MrpcTrack.h:34
double adc1() const
Definition: MrpcTrack.h:83
double tdiff1() const
Definition: MrpcTrack.h:102
double zadc1() const
Definition: MrpcTrack.h:98
void setRecTofTrack(RecTofTrack *track, int layerorend)
Definition: MrpcTrack.cxx:6960
double phi1() const
Definition: MrpcTrack.h:54
int size1() const
Definition: MrpcTrack.h:48
TofData * chooseTofDataEndcap(std::vector< TofData * > tofDataVec, double zr1[5])
Definition: MrpcTrack.cxx:6164
void tofDataAnalysis(TofData *tof, unsigned int iflag)
Definition: MrpcTrack.cxx:5508
double theta1() const
Definition: MrpcTrack.h:52
int tofTrackId() const
Definition: MrpcTrack.h:28
void setFlag(unsigned int flag)
Definition: MrpcTrack.h:117
double tof12(unsigned int i) const
Definition: MrpcTrack.h:72
double ph11() const
Definition: MrpcTrack.h:63
double ph1() const
Definition: MrpcTrack.h:67
double p() const
Definition: MrpcTrack.h:33
double adc4() const
Definition: MrpcTrack.h:86
void setExtTrack(RecExtTrack *extTrack, int kal[5], double t0, int t0Stat)
Definition: MrpcTrack.cxx:155
void findTofDataBarrel(std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zrhit, unsigned int iflag, std::vector< MrpcTrack * > *&tofTrackVec)
Definition: MrpcTrack.cxx:5696
int size4() const
Definition: MrpcTrack.h:51
double ztdc2() const
Definition: MrpcTrack.h:97
double tdc3() const
Definition: MrpcTrack.h:89
void findTofDataEndcap(std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zr1[5])
Definition: MrpcTrack.cxx:6083
void tofDataStudy()
int tofId2() const
Definition: MrpcTrack.h:61
int tofId1() const
Definition: MrpcTrack.h:60
int get_mrpc_stripid_neighbour(std::string, int, int)
Definition: MrpcTrack.cxx:7184
std::vector< TofData * > tofData2() const
Definition: MrpcTrack.h:47
unsigned int flag() const
Definition: MrpcTrack.h:107