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