BOSS 7.0.6
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++ ) {
44 nbb[i] = 0;
45 }
46
47 return;
48}
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 207 of file TofCount.cxx.

207 {
208 if( i<nParBhabha ) {
209 nbb[i]++;
210 }
211 return;
212}

Referenced by TofRec::execute().

◆ final()

void TofCount::final ( )

Definition at line 182 of file TofCount.cxx.

182 {
183 std::cout<<"############################# TofRec Summary #####################################" << std::endl;
184 std::cout<<" ===> Number of Extrapolated tracks: " << extTrkNum <<std::endl;
185 std::cout<<" ===> Number of valid Extraploated tracks: " << (inner1+outer1+double1+east1+west1) << " Barrel: " << (inner1+outer1+double1) << " Endcap: " << (east1+west1) << std::endl;
186 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;
187 std::cout<<" ===> Inner Layer hit only in total: " << inner1 << " \t" << inner2 << " \t" << inner3 << " \t" << inner4 << std::endl;
188 std::cout<<" ===> Outer Layer hit only in total: " << outer1 << "\t" << outer2 << " \t" << outer3 << " \t" << outer4 << std::endl;
189 std::cout<<" ===> Double Layer hit in total: " << double1 << " \t" << double2 << " \t" << double3 << " \t" << double4 << std::endl;
190 std::cout<<" ===> TofRec: number of endcap tracks: " << (east3+west3) << " Efficiency: " << setprecision(4) << (east3+west3)*100.0/((east1+west1)*1.0) << "%" << std::endl;
191 std::cout<<" ===> East endcap tracks in total: " << east1 << " \t" << east2 << " \t" << east3 << " \t" << east4 << std::endl;
192 std::cout<<" ===> West endcap tracks in total: " << west1 << " \t" << west2 << " \t" << west3 << " \t" << west4 << std::endl;
193 std::cout<<" ===> The invalid Extend tracks in total: "<< nohit1 << " \t" << nohit2 << " \t" << nohit3 << " \t" << nohit4 <<std::endl;
194 std::cout<<"############################# End Summary #######################################" <<std::endl;
195
196}

Referenced by TofRec::finalize().

◆ finalBhabha()

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

Definition at line 215 of file TofCount.cxx.

215 {
216 std::cout<<"$$$$$$$ Summary of Bhabha Selection Criteria $$$$$$$$$$$$$$$$$$$$$"<<std::endl;
217 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;
218 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;
219 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;
220 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;
221 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;
222 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;
223 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;
224 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;
225 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;
226 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;
227 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;
228 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;
229 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;
230 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;
231 if( calibData=="Bhabha" ) {
232 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;
233 }
234 else if( calibData=="Dimu") {
235 }
236 std::cout<<"$$$$$$$ End of Summary $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"<<std::endl;
237 return;
238}

Referenced by TofRec::finalize().

◆ init()

void TofCount::init ( )

Definition at line 51 of file TofCount.cxx.

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

◆ initBhabha()

void TofCount::initBhabha ( )

Definition at line 199 of file TofCount.cxx.

199 {
200 for( unsigned int i=0; i<nParBhabha; i++ ) {
201 nbb[i] = 0;
202 }
203 return;
204}

◆ setExtTrackNum()

void TofCount::setExtTrackNum ( unsigned int  ntrk)

Definition at line 92 of file TofCount.cxx.

92 {
93 extTrkNum = extTrkNum + ntrk;
94 return;
95}

Referenced by TofRec::execute().

◆ setTrack1()

void TofCount::setTrack1 ( TofTrack *&  tof)

Definition at line 98 of file TofCount.cxx.

98 {
99 if( tof->hitCase() == InnerLayer ) inner1++;
100 else if( tof->hitCase() == OuterLayer ) outer1++;
101 else if( tof->hitCase() == DoubleLayer ) double1++;
102 else if( tof->hitCase() == EastEndcap ) east1++;
103 else if( tof->hitCase() == WestEndcap ) west1++;
104 else if( tof->hitCase() == EastEndcapMRPC ) east1++;
105 else if( tof->hitCase() == WestEndcapMRPC ) west1++;
106 else nohit1++;
107 return;
108}
@ WestEndcap
Definition: TofTrack.h:20
@ OuterLayer
Definition: TofTrack.h:20
@ EastEndcapMRPC
Definition: TofTrack.h:20
@ InnerLayer
Definition: TofTrack.h:20
@ EastEndcap
Definition: TofTrack.h:20
@ DoubleLayer
Definition: TofTrack.h:20
@ WestEndcapMRPC
Definition: TofTrack.h:20
ExtTrackCase hitCase() const
Definition: TofTrack.h:36

Referenced by setTrack1Col().

◆ setTrack1Col()

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

Definition at line 111 of file TofCount.cxx.

111 {
112 TofTrackVec::iterator iter_tof = tofTrackVec->begin();
113 for( ; iter_tof!=tofTrackVec->end(); iter_tof++ ) {
114 setTrack1( *iter_tof );
115 }
116 return;
117}
void setTrack1(TofTrack *&tof)
Definition: TofCount.cxx:98

Referenced by TofRec::execute().

◆ setTrack2()

void TofCount::setTrack2 ( TofTrack *&  tof)

Definition at line 120 of file TofCount.cxx.

120 {
121 if( tof->hitCase() == InnerLayer ) inner2++;
122 else if( tof->hitCase() == OuterLayer ) outer2++;
123 else if( tof->hitCase() == DoubleLayer ) double2++;
124 else if( tof->hitCase() == EastEndcap ) east2++;
125 else if( tof->hitCase() == WestEndcap ) west2++;
126 else if( tof->hitCase() == EastEndcapMRPC ) east2++;
127 else if( tof->hitCase() == WestEndcapMRPC ) west2++;
128 else nohit2++;
129 // if( tof->changed() ) changed2++;
130 // else unchanged2++;
131 return;
132}

Referenced by TofRec::execute().

◆ setTrack3()

void TofCount::setTrack3 ( TofTrack *&  tof)

Definition at line 135 of file TofCount.cxx.

135 {
136 if( tof->hitCase() == InnerLayer ) inner3++;
137 else if( tof->hitCase() == OuterLayer ) outer3++;
138 else if( tof->hitCase() == DoubleLayer ) double3++;
139 else if( tof->hitCase() == EastEndcap ) east3++;
140 else if( tof->hitCase() == WestEndcap ) west3++;
141 else if( tof->hitCase() == EastEndcapMRPC ) east3++;
142 else if( tof->hitCase() == WestEndcapMRPC ) west3++;
143 else nohit3++;
144 // if( tof->changed() ) changed3++;
145 // else unchanged3++;
146 return;
147}

Referenced by TofRec::execute().

◆ setTrack4()

void TofCount::setTrack4 ( TofTrack *&  tof)

Definition at line 150 of file TofCount.cxx.

150 {
151 if( tof->hitCase() == InnerLayer ) inner4++;
152 else if( tof->hitCase() == OuterLayer ) outer4++;
153 else if( tof->hitCase() == DoubleLayer ) double4++;
154 else if( tof->hitCase() == EastEndcap ) east4++;
155 else if( tof->hitCase() == WestEndcap ) west4++;
156 else if( tof->hitCase() == EastEndcapMRPC ) east4++;
157 else if( tof->hitCase() == WestEndcapMRPC ) west4++;
158 else nohit4++;
159 // if( tof->changed() ) changed4++;
160 // else unchanged4++;
161 return;
162}

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