CGEM BOSS 6.6.5.g
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 ()
 

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

◆ 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 if((east1+west1+mrpc_east1_1+mrpc_east2_1+mrpc_west1_1+mrpc_west2_1)!=0) 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 if((mrpc_extrapolation_good_3+mrpc_extrapolation_false_3)!=0)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().

◆ 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}

◆ 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:20
@ westendcap_2
Definition: MrpcTrack.h:20
@ OuterLayer
Definition: MrpcTrack.h:20
@ westendcap_1
Definition: MrpcTrack.h:20
@ InnerLayer
Definition: MrpcTrack.h:20
@ eastendcap_2
Definition: MrpcTrack.h:20
@ EastEndcap
Definition: MrpcTrack.h:20
@ DoubleLayer
Definition: MrpcTrack.h:20
@ eastendcap_1
Definition: MrpcTrack.h:20
ExtTrackCase hitCase() const
Definition: MrpcTrack.h:33

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:110

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: