BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TofCount Class Reference

#include <TofCount.h>

Public Member Functions

 TofCount ()
 ~TofCount ()
void init ()
void setExtTrackNum (unsigned int ntrk)
void setTrack1 (TofTrack *&tof)
void setTrack1Col (std::vector< TofTrack * > *&tofTrackVec)
void setTrack2 (TofTrack *&tof)
void setTrack3 (TofTrack *&tof)
void setTrack4 (TofTrack *&tof)
void final ()
void initBhabha ()
void addNumber (unsigned int i)
void finalBhabha (std::string calibData)

Detailed Description

Definition at line 9 of file TofCount.h.

Constructor & Destructor Documentation

◆ TofCount()

TofCount::TofCount ( )

Definition at line 6 of file TofCount.cxx.

6 {
7 extTrkNum = 0;
8 barrelTrk = 0;
9 endcapTrk = 0;
10 inner1 = 0;
11 outer1 = 0;
12 double1 = 0;
13 east1 = 0;
14 west1 = 0;
15 nohit1 = 0;
16 unchanged1 = 0;
17 changed1 = 0;
18 inner2 = 0;
19 outer2 = 0;
20 double2 = 0;
21 east2 = 0;
22 west2 = 0;
23 nohit2 = 0;
24 unchanged2 = 0;
25 changed2 = 0;
26 inner3 = 0;
27 outer3 = 0;
28 double3 = 0;
29 east3 = 0;
30 west3 = 0;
31 nohit3 = 0;
32 unchanged3 = 0;
33 changed3 = 0;
34 inner4 = 0;
35 outer4 = 0;
36 double4 = 0;
37 east4 = 0;
38 west4 = 0;
39 nohit4 = 0;
40 unchanged4 = 0;
41 changed4 = 0;
42
43 for ( unsigned int i = 0; i < nParBhabha; i++ ) { nbb[i] = 0; }
44
45 return;
46}
const unsigned int nParBhabha
Definition TofCount.h:6

◆ ~TofCount()

TofCount::~TofCount ( )
inline

Definition at line 12 of file TofCount.h.

12{}

Member Function Documentation

◆ addNumber()

void TofCount::addNumber ( unsigned int i)

Definition at line 214 of file TofCount.cxx.

214 {
215 if ( i < nParBhabha ) { nbb[i]++; }
216 return;
217}

◆ final()

void TofCount::final ( )

Definition at line 176 of file TofCount.cxx.

176 {
177 std::cout
178 << "############################# TofRec Summary #####################################"
179 << std::endl;
180 std::cout << " ===> Number of Extrapolated tracks: " << extTrkNum << std::endl;
181 std::cout << " ===> Number of valid Extraploated tracks: "
182 << ( inner1 + outer1 + double1 + east1 + west1 )
183 << " Barrel: " << ( inner1 + outer1 + double1 )
184 << " Endcap: " << ( east1 + west1 ) << std::endl;
185 std::cout << " ===> TofRec: number of barrel tracks: " << ( inner3 + outer3 + double3 )
186 << " Efficiency: " << setprecision( 4 )
187 << ( inner3 + outer3 + double3 ) * 100.0 / ( ( inner1 + outer1 + double1 ) * 1.0 )
188 << "%" << std::endl;
189 std::cout << " ===> Inner Layer hit only in total: " << inner1 << " \t" << inner2
190 << " \t" << inner3 << " \t" << inner4 << std::endl;
191 std::cout << " ===> Outer Layer hit only in total: " << outer1 << "\t" << outer2
192 << " \t" << outer3 << " \t" << outer4 << std::endl;
193 std::cout << " ===> Double Layer hit in total: " << double1 << " \t" << double2
194 << " \t" << double3 << " \t" << double4 << std::endl;
195 std::cout << " ===> TofRec: number of endcap tracks: " << ( east3 + west3 )
196 << " Efficiency: " << setprecision( 4 )
197 << ( east3 + west3 ) * 100.0 / ( ( east1 + west1 ) * 1.0 ) << "%" << std::endl;
198 std::cout << " ===> East endcap tracks in total: " << east1 << " \t" << east2 << " \t"
199 << east3 << " \t" << east4 << std::endl;
200 std::cout << " ===> West endcap tracks in total: " << west1 << " \t" << west2 << " \t"
201 << west3 << " \t" << west4 << std::endl;
202 std::cout << " ===> The invalid Extend tracks in total: " << nohit1 << " \t" << nohit2
203 << " \t" << nohit3 << " \t" << nohit4 << std::endl;
204 std::cout
205 << "############################# End Summary #######################################"
206 << std::endl;
207}

◆ finalBhabha()

void TofCount::finalBhabha ( std::string calibData)

Definition at line 219 of file TofCount.cxx.

219 {
220 std::cout << "$$$$$$$ Summary of Bhabha Selection Criteria $$$$$$$$$$$$$$$$$$$$$"
221 << std::endl;
222 std::cout << "0 Total umber of events: " << nbb[0] << "\t"
223 << "Ratio1: " << setprecision( 4 ) << double( nbb[0] ) * 100.0 / double( nbb[0] )
224 << "%"
225 << "\t"
226 << "Ratio2: " << setprecision( 4 ) << double( nbb[0] ) * 100.0 / double( nbb[0] )
227 << "%" << std::endl;
228 std::cout << "1 Event Start Time: " << nbb[1] << "\t"
229 << "Ratio1: " << setprecision( 4 ) << double( nbb[1] ) * 100.0 / double( nbb[0] )
230 << "%"
231 << "\t"
232 << "Ratio2: " << setprecision( 4 ) << double( nbb[1] ) * 100.0 / double( nbb[0] )
233 << "%" << std::endl;
234 std::cout << "2 N_ext_track = 2: " << nbb[2] << "\t"
235 << "Ratio1: " << setprecision( 4 ) << double( nbb[2] ) * 100.0 / double( nbb[1] )
236 << "%"
237 << "\t"
238 << "Ratio2: " << setprecision( 4 ) << double( nbb[2] ) * 100.0 / double( nbb[0] )
239 << "%" << std::endl;
240 std::cout << "3 N_mdc_track = 2: " << nbb[3] << "\t"
241 << "Ratio1: " << setprecision( 4 ) << double( nbb[3] ) * 100.0 / double( nbb[2] )
242 << "%"
243 << "\t"
244 << "Ratio2: " << setprecision( 4 ) << double( nbb[3] ) * 100.0 / double( nbb[0] )
245 << "%" << std::endl;
246 std::cout << "4 EMC reconstructed: " << nbb[4] << "\t"
247 << "Ratio1: " << setprecision( 4 ) << double( nbb[4] ) * 100.0 / double( nbb[3] )
248 << "%"
249 << "\t"
250 << "Ratio2: " << setprecision( 4 ) << double( nbb[4] ) * 100.0 / double( nbb[0] )
251 << "%" << std::endl;
252 std::cout << "5 N_shower >= 2: " << nbb[5] << "\t"
253 << "Ratio1: " << setprecision( 4 ) << double( nbb[5] ) * 100.0 / double( nbb[4] )
254 << "%"
255 << "\t"
256 << "Ratio2: " << setprecision( 4 ) << double( nbb[5] ) * 100.0 / double( nbb[0] )
257 << "%" << std::endl;
258 std::cout << "6 Total charge = 0: " << nbb[6] << "\t"
259 << "Ratio1: " << setprecision( 4 ) << double( nbb[6] ) * 100.0 / double( nbb[5] )
260 << "%"
261 << "\t"
262 << "Ratio2: " << setprecision( 4 ) << double( nbb[6] ) * 100.0 / double( nbb[0] )
263 << "%" << std::endl;
264 std::cout << "7 Back to back: " << nbb[7] << "\t"
265 << "Ratio1: " << setprecision( 4 ) << double( nbb[7] ) * 100.0 / double( nbb[6] )
266 << "%"
267 << "\t"
268 << "Ratio2: " << setprecision( 4 ) << double( nbb[7] ) * 100.0 / double( nbb[0] )
269 << "%" << std::endl;
270 std::cout << "8 Kalman Filter: " << nbb[8] << "\t"
271 << "Ratio1: " << setprecision( 4 ) << double( nbb[8] ) * 100.0 / double( nbb[7] )
272 << "%"
273 << "\t"
274 << "Ratio2: " << setprecision( 4 ) << double( nbb[8] ) * 100.0 / double( nbb[0] )
275 << "%" << std::endl;
276 std::cout << "9 Distance of ext-shower: " << nbb[9] << "\t"
277 << "Ratio1: " << setprecision( 4 ) << double( nbb[9] ) * 100.0 / double( nbb[8] )
278 << "%"
279 << "\t"
280 << "Ratio2: " << setprecision( 4 ) << double( nbb[9] ) * 100.0 / double( nbb[0] )
281 << "%" << std::endl;
282 std::cout << "10 Vertex cut of 1st trk: " << nbb[10] << "\t"
283 << "Ratio1: " << setprecision( 4 ) << double( nbb[10] ) * 100.0 / double( nbb[9] )
284 << "%"
285 << "\t"
286 << "Ratio2: " << setprecision( 4 ) << double( nbb[10] ) * 100.0 / double( nbb[0] )
287 << "%" << std::endl;
288 std::cout << "11 Vertex cut of 2nd trk: " << nbb[11] << "\t"
289 << "Ratio1: " << setprecision( 4 ) << double( nbb[11] ) * 100.0 / double( nbb[10] )
290 << "%"
291 << "\t"
292 << "Ratio2: " << setprecision( 4 ) << double( nbb[11] ) * 100.0 / double( nbb[0] )
293 << "%" << std::endl;
294 std::cout << "12 Delta phi: " << nbb[12] << "\t"
295 << "Ratio1: " << setprecision( 4 ) << double( nbb[12] ) * 100.0 / double( nbb[11] )
296 << "%"
297 << "\t"
298 << "Ratio2: " << setprecision( 4 ) << double( nbb[12] ) * 100.0 / double( nbb[0] )
299 << "%" << std::endl;
300 std::cout << "13 Energy of Shower: " << nbb[13] << "\t"
301 << "Ratio1: " << setprecision( 4 ) << double( nbb[13] ) * 100.0 / double( nbb[12] )
302 << "%"
303 << "\t"
304 << "Ratio2: " << setprecision( 4 ) << double( nbb[13] ) * 100.0 / double( nbb[0] )
305 << "%" << std::endl;
306 if ( calibData == "Bhabha" )
307 {
308 std::cout << "14 Energy of others: " << nbb[14] << "\t"
309 << "Ratio1: " << setprecision( 4 )
310 << double( nbb[14] ) * 100.0 / double( nbb[13] ) << "%"
311 << "\t"
312 << "Ratio2: " << setprecision( 4 )
313 << double( nbb[14] ) * 100.0 / double( nbb[0] ) << "%" << std::endl;
314 }
315 else if ( calibData == "Dimu" ) {}
316 std::cout << "$$$$$$$ End of Summary $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
317 << std::endl;
318 return;
319}

◆ init()

void TofCount::init ( )

Definition at line 48 of file TofCount.cxx.

48 {
49 extTrkNum = 0;
50 barrelTrk = 0;
51 endcapTrk = 0;
52 inner1 = 0;
53 outer1 = 0;
54 double1 = 0;
55 east1 = 0;
56 west1 = 0;
57 nohit1 = 0;
58 unchanged1 = 0;
59 changed1 = 0;
60 inner2 = 0;
61 outer2 = 0;
62 double2 = 0;
63 east2 = 0;
64 west2 = 0;
65 nohit2 = 0;
66 unchanged2 = 0;
67 changed2 = 0;
68 inner3 = 0;
69 outer3 = 0;
70 double3 = 0;
71 east3 = 0;
72 west3 = 0;
73 nohit3 = 0;
74 unchanged3 = 0;
75 changed3 = 0;
76 inner4 = 0;
77 outer4 = 0;
78 double4 = 0;
79 east4 = 0;
80 west4 = 0;
81 nohit4 = 0;
82 unchanged4 = 0;
83 changed4 = 0;
84
85 return;
86}

◆ initBhabha()

void TofCount::initBhabha ( )

Definition at line 209 of file TofCount.cxx.

209 {
210 for ( unsigned int i = 0; i < nParBhabha; i++ ) { nbb[i] = 0; }
211 return;
212}

◆ setExtTrackNum()

void TofCount::setExtTrackNum ( unsigned int ntrk)

Definition at line 88 of file TofCount.cxx.

88 {
89 extTrkNum = extTrkNum + ntrk;
90 return;
91}

◆ setTrack1()

void TofCount::setTrack1 ( TofTrack *& tof)

Definition at line 93 of file TofCount.cxx.

93 {
94 if ( tof->hitCase() == InnerLayer ) inner1++;
95 else if ( tof->hitCase() == OuterLayer ) outer1++;
96 else if ( tof->hitCase() == DoubleLayer ) double1++;
97 else if ( tof->hitCase() == EastEndcap ) east1++;
98 else if ( tof->hitCase() == WestEndcap ) west1++;
99 else if ( tof->hitCase() == EastEndcapMRPC ) east1++;
100 else if ( tof->hitCase() == WestEndcapMRPC ) west1++;
101 else nohit1++;
102 return;
103}
@ WestEndcap
Definition TofTrack.h:26
@ OuterLayer
Definition TofTrack.h:23
@ EastEndcapMRPC
Definition TofTrack.h:27
@ InnerLayer
Definition TofTrack.h:22
@ EastEndcap
Definition TofTrack.h:25
@ DoubleLayer
Definition TofTrack.h:24
@ WestEndcapMRPC
Definition TofTrack.h:28
ExtTrackCase hitCase() const
Definition TofTrack.h:46

Referenced by setTrack1Col().

◆ setTrack1Col()

void TofCount::setTrack1Col ( std::vector< TofTrack * > *& tofTrackVec)

Definition at line 105 of file TofCount.cxx.

105 {
106 TofTrackVec::iterator iter_tof = tofTrackVec->begin();
107 for ( ; iter_tof != tofTrackVec->end(); iter_tof++ ) { setTrack1( *iter_tof ); }
108 return;
109}
void setTrack1(TofTrack *&tof)
Definition TofCount.cxx:93

◆ setTrack2()

void TofCount::setTrack2 ( TofTrack *& tof)

Definition at line 111 of file TofCount.cxx.

111 {
112 if ( tof->hitCase() == InnerLayer ) inner2++;
113 else if ( tof->hitCase() == OuterLayer ) outer2++;
114 else if ( tof->hitCase() == DoubleLayer ) double2++;
115 else if ( tof->hitCase() == EastEndcap ) east2++;
116 else if ( tof->hitCase() == WestEndcap ) west2++;
117 else if ( tof->hitCase() == EastEndcapMRPC ) east2++;
118 else if ( tof->hitCase() == WestEndcapMRPC ) west2++;
119 else nohit2++;
120 // if( tof->changed() ) changed2++;
121 // else unchanged2++;
122 return;
123}

◆ setTrack3()

void TofCount::setTrack3 ( TofTrack *& tof)

Definition at line 125 of file TofCount.cxx.

125 {
126 if ( tof->hitCase() == InnerLayer ) inner3++;
127 else if ( tof->hitCase() == OuterLayer ) outer3++;
128 else if ( tof->hitCase() == DoubleLayer ) double3++;
129 else if ( tof->hitCase() == EastEndcap ) east3++;
130 else if ( tof->hitCase() == WestEndcap ) west3++;
131 else if ( tof->hitCase() == EastEndcapMRPC ) east3++;
132 else if ( tof->hitCase() == WestEndcapMRPC ) west3++;
133 else nohit3++;
134 // if( tof->changed() ) changed3++;
135 // else unchanged3++;
136 return;
137}

◆ setTrack4()

void TofCount::setTrack4 ( TofTrack *& tof)

Definition at line 139 of file TofCount.cxx.

139 {
140 if ( tof->hitCase() == InnerLayer ) inner4++;
141 else if ( tof->hitCase() == OuterLayer ) outer4++;
142 else if ( tof->hitCase() == DoubleLayer ) double4++;
143 else if ( tof->hitCase() == EastEndcap ) east4++;
144 else if ( tof->hitCase() == WestEndcap ) west4++;
145 else if ( tof->hitCase() == EastEndcapMRPC ) east4++;
146 else if ( tof->hitCase() == WestEndcapMRPC ) west4++;
147 else nohit4++;
148 // if( tof->changed() ) changed4++;
149 // else unchanged4++;
150 return;
151}

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