BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
MrpcCount Class Reference

#include <MrpcCount.h>

Public Member Functions

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

Detailed Description

Definition at line 9 of file MrpcCount.h.

Constructor & Destructor Documentation

◆ MrpcCount()

MrpcCount::MrpcCount ( )

Definition at line 6 of file MrpcCount.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 mrpc_east1_1=0;
43 mrpc_east1_2=0;
44 mrpc_east1_3=0;
45 mrpc_east1_4=0;
46 mrpc_east2_1=0;
47 mrpc_east2_2=0;
48 mrpc_east2_3=0;
49 mrpc_east2_4=0;
50 mrpc_west1_1=0;
51 mrpc_west1_2=0;
52 mrpc_west1_3=0;
53 mrpc_west1_4=0;
54 mrpc_west2_1=0;
55 mrpc_west2_2=0;
56 mrpc_west2_3=0;
57 mrpc_west2_4=0;
58 mrpc_extrapolation_good_3=0;
59 mrpc_extrapolation_false_3=0;
60 return;
61}

◆ ~MrpcCount()

MrpcCount::~MrpcCount ( )
inline

Definition at line 12 of file MrpcCount.h.

12{}

Member Function Documentation

◆ addNumber()

void MrpcCount::addNumber ( unsigned int  i)

Definition at line 263 of file MrpcCount.cxx.

263 {
264 if( i<nParBhabha ) {
265 nbb[i]++;
266 }
267 return;
268}
const unsigned int nParBhabha
Definition: MrpcCount.h:6

Referenced by MrpcRec::execute().

◆ final()

void MrpcCount::final ( )

Definition at line 229 of file MrpcCount.cxx.

229 {
230 std::cout<<"############################# TofRec Summary #####################################" << std::endl;
231 std::cout<<" ===> Number of Extrapolated tracks: " << extTrkNum <<std::endl;
232 std::cout<<" ===> Number of valid Extraploated tracks: " << (inner1+outer1+double1+east1+west1+mrpc_east1_1+mrpc_east2_1+mrpc_west1_1+mrpc_west2_1) << " Barrel: " << (inner1+outer1+double1) << " Endcap: " << (east1+west1+mrpc_east1_1+mrpc_east2_1+mrpc_west1_1+mrpc_west2_1) << std::endl;
233 std::cout<<" ===> TofRec: number of barrel tracks: " << (inner3+outer3+double3) << " Efficiency: " << setprecision(4) << (inner3+outer3+double3)*100.0/((inner1+outer1+double1)*1.0) << "%" << std::endl;
234 std::cout<<" ===> Inner Layer hit only in total: " << inner1 << " \t" << inner2 << " \t" << inner3 << " \t" << inner4 << std::endl;
235 std::cout<<" ===> Outer Layer hit only in total: " << outer1 << "\t" << outer2 << " \t" << outer3 << " \t" << outer4 << std::endl;
236 std::cout<<" ===> Double Layer hit in total: " << double1 << " \t" << double2 << " \t" << double3 << " \t" << double4 << std::endl;
237 std::cout<<" ===> TofRec: number of endcap tracks: " << (east3+west3+mrpc_east1_3+mrpc_east2_3+mrpc_west1_3+mrpc_west2_3) << " Efficiency: " << setprecision(4) << (east3+west3+mrpc_east1_3+mrpc_east2_3+mrpc_west1_3+mrpc_west2_3)*100.0/((east1+west1+mrpc_east1_1+mrpc_east2_1+mrpc_west1_1+mrpc_west2_1)*1.0) << "%" << std::endl;
238 std::cout<<" ===> East endcap tracks in total: " << east1 << " \t" << east2 << " \t" << east3 << " \t" << east4 << std::endl;
239 std::cout<<" ===> West endcap tracks in total: " << west1 << " \t" << west2 << " \t" << west3 << " \t" << west4 << std::endl;
240 std::cout<<" ===> East 1 mrpc tracks in total: " << mrpc_east1_1 << " \t" << mrpc_east1_2 << " \t" << mrpc_east1_3 << " \t" << mrpc_east1_4 << std::endl;
241 std::cout<<" ===> West 1 mrpc tracks in total: " << mrpc_west1_1 << " \t" << mrpc_west1_2 << " \t" << mrpc_west1_3 << " \t" << mrpc_west1_4 << std::endl;
242 std::cout<<" ===> East 2 mrpc tracks in total: " << mrpc_east2_1 << " \t" << mrpc_east2_2 << " \t" << mrpc_east2_3 << " \t" << mrpc_east2_4 << std::endl;
243 std::cout<<" ===> West 2 mrpc tracks in total: " << mrpc_west2_1 << " \t" << mrpc_west2_2 << " \t" << mrpc_west2_3 << " \t" << mrpc_west2_4 << std::endl;
244
245 std::cout<<" ===> The invalid Extend tracks in total: "<< nohit1 << " \t" << nohit2 << " \t" << nohit3 << " \t" << nohit4 <<std::endl;
246
247 std::cout<<" ==> Correct MRPC extrapolation: " << (mrpc_extrapolation_good_3*100.0)/((mrpc_extrapolation_good_3+mrpc_extrapolation_false_3)*1.0)<< "%" << std::endl;
248
249 std::cout<<"############################# End Summary #######################################" <<std::endl;
250
251}

Referenced by MrpcRec::finalize().

◆ finalBhabha()

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

Definition at line 271 of file MrpcCount.cxx.

271 {
272 std::cout<<"$$$$$$$ Summary of Bhabha Selection Criteria $$$$$$$$$$$$$$$$$$$$$"<<std::endl;
273 std::cout <<"0 Total umber of events: "<<nbb[0]<<"\t"<<"Ratio1: "<<setprecision(4)<<double(nbb[0])*100.0/double(nbb[0])<<"%"<<"\t"<<"Ratio2: "<<setprecision(4)<<double(nbb[0])*100.0/double(nbb[0])<<"%"<<std::endl;
274 std::cout <<"1 Event Start Time: "<<nbb[1]<<"\t"<<"Ratio1: "<<setprecision(4)<<double(nbb[1])*100.0/double(nbb[0])<<"%"<<"\t"<<"Ratio2: "<<setprecision(4)<<double(nbb[1])*100.0/double(nbb[0])<<"%"<<std::endl;
275 std::cout <<"2 N_ext_track = 2: "<<nbb[2]<<"\t"<<"Ratio1: "<<setprecision(4)<<double(nbb[2])*100.0/double(nbb[1])<<"%"<<"\t"<<"Ratio2: "<<setprecision(4)<<double(nbb[2])*100.0/double(nbb[0])<<"%"<<std::endl;
276 std::cout <<"3 N_mdc_track = 2: "<<nbb[3]<<"\t"<<"Ratio1: "<<setprecision(4)<<double(nbb[3])*100.0/double(nbb[2])<<"%"<<"\t"<<"Ratio2: "<<setprecision(4)<<double(nbb[3])*100.0/double(nbb[0])<<"%"<<std::endl;
277 std::cout <<"4 EMC reconstructed: "<<nbb[4]<<"\t"<<"Ratio1: "<<setprecision(4)<<double(nbb[4])*100.0/double(nbb[3])<<"%"<<"\t"<<"Ratio2: "<<setprecision(4)<<double(nbb[4])*100.0/double(nbb[0])<<"%"<<std::endl;
278 std::cout <<"5 N_shower >= 2: "<<nbb[5]<<"\t"<<"Ratio1: "<<setprecision(4)<<double(nbb[5])*100.0/double(nbb[4])<<"%"<<"\t"<<"Ratio2: "<<setprecision(4)<<double(nbb[5])*100.0/double(nbb[0])<<"%"<<std::endl;
279 std::cout <<"6 Total charge = 0: "<<nbb[6]<<"\t"<<"Ratio1: "<<setprecision(4)<<double(nbb[6])*100.0/double(nbb[5])<<"%"<<"\t"<<"Ratio2: "<<setprecision(4)<<double(nbb[6])*100.0/double(nbb[0])<<"%"<<std::endl;
280 std::cout <<"7 Back to back: "<<nbb[7]<<"\t"<<"Ratio1: "<<setprecision(4)<<double(nbb[7])*100.0/double(nbb[6])<<"%"<<"\t"<<"Ratio2: "<<setprecision(4)<<double(nbb[7])*100.0/double(nbb[0])<<"%"<<std::endl;
281 if( calibData=="Bhabha" ) {
282 std::cout <<"8 Kalman Filter: "<<nbb[8]<<"\t"<<"Ratio1: "<<setprecision(4)<<double(nbb[8])*100.0/double(nbb[7])<<"%"<<"\t"<<"Ratio2: "<<setprecision(4)<<double(nbb[8])*100.0/double(nbb[0])<<"%"<<std::endl;
283 std::cout <<"9 Distance of ext-shower: "<<nbb[9]<<"\t"<<"Ratio1: "<<setprecision(4)<<double(nbb[9])*100.0/double(nbb[8])<<"%"<<"\t"<<"Ratio2: "<<setprecision(4)<<double(nbb[9])*100.0/double(nbb[0])<<"%"<<std::endl;
284 std::cout <<"10 Vertex cut of 1st trk: "<<nbb[10]<<"\t"<<"Ratio1: "<<setprecision(4)<<double(nbb[10])*100.0/double(nbb[9])<<"%"<<"\t"<<"Ratio2: "<<setprecision(4)<<double(nbb[10])*100.0/double(nbb[0])<<"%"<<std::endl;
285 std::cout <<"11 Vertex cut of 2nd trk: "<<nbb[11]<<"\t"<<"Ratio1: "<<setprecision(4)<<double(nbb[11])*100.0/double(nbb[10])<<"%"<<"\t"<<"Ratio2: "<<setprecision(4)<<double(nbb[11])*100.0/double(nbb[0])<<"%"<<std::endl;
286 std::cout <<"12 Delta phi: "<<nbb[12]<<"\t"<<"Ratio1: "<<setprecision(4)<<double(nbb[12])*100.0/double(nbb[11])<<"%"<<"\t"<<"Ratio2: "<<setprecision(4)<<double(nbb[12])*100.0/double(nbb[0])<<"%"<<std::endl;
287 std::cout <<"13 Energy of Shower: "<<nbb[13]<<"\t"<<"Ratio1: "<<setprecision(4)<<double(nbb[13])*100.0/double(nbb[12])<<"%"<<"\t"<<"Ratio2: "<<setprecision(4)<<double(nbb[13])*100.0/double(nbb[0])<<"%"<<std::endl;
288 std::cout <<"14 Energy of others: "<<nbb[14]<<"\t"<<"Ratio1: "<<setprecision(4)<<double(nbb[14])*100.0/double(nbb[13])<<"%"<<"\t"<<"Ratio2: "<<setprecision(4)<<double(nbb[14])*100.0/double(nbb[0])<<"%"<<std::endl;
289 }
290 else if( calibData=="Dimu") {
291 std::cout <<"8 Kalman Filter: "<<nbb[8]<<"\t"<<"Ratio1: "<<setprecision(4)<<double(nbb[8])*100.0/double(nbb[7])<<"%"<<"\t"<<"Ratio2: "<<setprecision(4)<<double(nbb[8])*100.0/double(nbb[0])<<"%"<<std::endl;
292 std::cout <<"9 Energy of Showers: "<<nbb[9]<<"\t"<<"Ratio1: "<<setprecision(4)<<double(nbb[9])*100.0/double(nbb[8])<<"%"<<"\t"<<"Ratio2: "<<setprecision(4)<<double(nbb[9])*100.0/double(nbb[0])<<"%"<<std::endl;
293 }
294 std::cout<<"$$$$$$$ End of Summary $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"<<std::endl;
295 return;
296}

Referenced by MrpcRec::finalize().

◆ init()

void MrpcCount::init ( )

Definition at line 64 of file MrpcCount.cxx.

64 {
65 extTrkNum = 0;
66 barrelTrk = 0;
67 endcapTrk = 0;
68 inner1 = 0;
69 outer1 = 0;
70 double1 = 0;
71 east1 = 0;
72 west1 = 0;
73 nohit1 = 0;
74 unchanged1 = 0;
75 changed1 = 0;
76 inner2 = 0;
77 outer2 = 0;
78 double2 = 0;
79 east2 = 0;
80 west2 = 0;
81 nohit2 = 0;
82 unchanged2 = 0;
83 changed2 = 0;
84 inner3 = 0;
85 outer3 = 0;
86 double3 = 0;
87 east3 = 0;
88 west3 = 0;
89 nohit3 = 0;
90 unchanged3 = 0;
91 changed3 = 0;
92 inner4 = 0;
93 outer4 = 0;
94 double4 = 0;
95 east4 = 0;
96 west4 = 0;
97 nohit4 = 0;
98 unchanged4 = 0;
99 changed4 = 0;
100 mrpc_east1_1=0;
101 mrpc_east1_2=0;
102 mrpc_east1_3=0;
103 mrpc_east1_4=0;
104 mrpc_east2_1=0;
105 mrpc_east2_2=0;
106 mrpc_east2_3=0;
107 mrpc_east2_4=0;
108 mrpc_west1_1=0;
109 mrpc_west1_2=0;
110 mrpc_west1_3=0;
111 mrpc_west1_4=0;
112 mrpc_west2_1=0;
113 mrpc_west2_2=0;
114 mrpc_west2_3=0;
115 mrpc_west2_4=0;
116 mrpc_extrapolation_good_3=0;
117 mrpc_extrapolation_false_3=0;
118 return;
119}

◆ initBhabha()

void MrpcCount::initBhabha ( )

Definition at line 255 of file MrpcCount.cxx.

255 {
256 for( unsigned int i=0; i<nParBhabha; i++ ) {
257 nbb[i] = 0;
258 }
259 return;
260}

◆ setExtTrackNum()

void MrpcCount::setExtTrackNum ( unsigned int  ntrk)

Definition at line 122 of file MrpcCount.cxx.

122 {
123 extTrkNum = extTrkNum + ntrk;
124 return;
125}

Referenced by MrpcRec::execute().

◆ setTrack1()

void MrpcCount::setTrack1 ( MrpcTrack *&  tof)

Definition at line 128 of file MrpcCount.cxx.

128 {
129 if( tof->hitCase() == InnerLayer ) inner1++;
130 else if( tof->hitCase() == OuterLayer ) outer1++;
131 else if( tof->hitCase() == DoubleLayer ) double1++;
132 else if( tof->hitCase() == EastEndcap ) east1++;
133 else if( tof->hitCase() == WestEndcap ) west1++;
134 else if( tof->hitCase() == eastendcap_1 ) mrpc_east1_1++;
135 else if( tof->hitCase() == eastendcap_2 ) mrpc_east2_1++;
136 else if( tof->hitCase() == westendcap_1 ) mrpc_west1_1++;
137 else if( tof->hitCase() == westendcap_2 ) mrpc_west2_1++;
138 else nohit1++;
139 return;
140}
@ 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
ExtTrackCase hitCase() const
Definition: MrpcTrack.h:32

Referenced by setTrack1Col().

◆ setTrack1Col()

void MrpcCount::setTrack1Col ( std::vector< MrpcTrack * > *&  tofTrackVec)

Definition at line 143 of file MrpcCount.cxx.

143 {
144 TofTrackVec::iterator iter_tof = tofTrackVec->begin();
145 for( ; iter_tof!=tofTrackVec->end(); iter_tof++ ) {
146 setTrack1( *iter_tof );
147 }
148 return;
149}
void setTrack1(MrpcTrack *&tof)
Definition: MrpcCount.cxx:128

Referenced by MrpcRec::execute().

◆ setTrack2()

void MrpcCount::setTrack2 ( MrpcTrack *&  tof)

Definition at line 152 of file MrpcCount.cxx.

152 {
153 if( tof->hitCase() == InnerLayer ) inner2++;
154 else if( tof->hitCase() == OuterLayer ) outer2++;
155 else if( tof->hitCase() == DoubleLayer ) double2++;
156 else if( tof->hitCase() == EastEndcap ) east2++;
157 else if( tof->hitCase() == WestEndcap ) west2++;
158 else if( tof->hitCase() == eastendcap_1 ) mrpc_east1_2++;
159 else if( tof->hitCase() == eastendcap_2 ) mrpc_east2_2++;
160 else if( tof->hitCase() == westendcap_1 ) mrpc_west1_2++;
161 else if( tof->hitCase() == westendcap_2 ) mrpc_west2_2++;
162 else nohit2++;
163 // if( tof->changed() ) changed2++;
164 // else unchanged2++;
165 return;
166}

Referenced by MrpcRec::execute().

◆ setTrack3()

void MrpcCount::setTrack3 ( MrpcTrack *&  tof)

Definition at line 169 of file MrpcCount.cxx.

169 {
170 if( tof->hitCase() == InnerLayer ) inner3++;
171 else if( tof->hitCase() == OuterLayer ) outer3++;
172 else if( tof->hitCase() == DoubleLayer ) double3++;
173 else if( tof->hitCase() == EastEndcap ) east3++;
174 else if( tof->hitCase() == WestEndcap ) west3++;
175 else if( tof->hitCase() == eastendcap_1 ) mrpc_east1_3++;
176 else if( tof->hitCase() == eastendcap_2 ) mrpc_east2_3++;
177 else if( tof->hitCase() == westendcap_1 ) mrpc_west1_3++;
178 else if( tof->hitCase() == westendcap_2 ) mrpc_west2_3++;
179 else nohit3++;
180 // if( tof->changed() ) changed3++;
181 // else unchanged3++;
182
183
184
185 if( ( tof->hitCase() == eastendcap_1 ) || ( tof->hitCase() == eastendcap_2 ) || ( tof->hitCase() == westendcap_1 ) || ( tof->hitCase() == westendcap_2 ))
186 {
187 if(tof->is_mrpc_extrapolation_good()==true) mrpc_extrapolation_good_3++;
188 else mrpc_extrapolation_false_3++;
189 }
190
191 return;
192}
bool is_mrpc_extrapolation_good()
Definition: MrpcTrack.h:109

Referenced by MrpcRec::execute().

◆ setTrack4()

void MrpcCount::setTrack4 ( MrpcTrack *&  tof)

Definition at line 195 of file MrpcCount.cxx.

195 {
196 if( tof->hitCase() == InnerLayer ) inner4++;
197 else if( tof->hitCase() == OuterLayer ) outer4++;
198 else if( tof->hitCase() == DoubleLayer ) double4++;
199 else if( tof->hitCase() == EastEndcap ) east4++;
200 else if( tof->hitCase() == WestEndcap ) west4++;
201 else if( tof->hitCase() == eastendcap_1 ) mrpc_east1_4++;
202 else if( tof->hitCase() == eastendcap_2 ) mrpc_east2_4++;
203 else if( tof->hitCase() == westendcap_1 ) mrpc_west1_4++;
204 else if( tof->hitCase() == westendcap_2 ) mrpc_west2_4++;
205 else nohit4++;
206 // if( tof->changed() ) changed4++;
207 // else unchanged4++;
208 return;
209}

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