CGEM BOSS 6.6.5.f
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)
 
 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 InstallArea/include/TofRec/TofRec/TofCount.h.

Constructor & Destructor Documentation

◆ TofCount() [1/2]

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}

◆ ~TofCount() [1/2]

TofCount::~TofCount ( )
inline

Definition at line 12 of file InstallArea/include/TofRec/TofRec/TofCount.h.

12{}

◆ TofCount() [2/2]

TofCount::TofCount ( )

◆ ~TofCount() [2/2]

TofCount::~TofCount ( )
inline

Member Function Documentation

◆ addNumber() [1/2]

void TofCount::addNumber ( unsigned int  i)

Definition at line 199 of file TofCount.cxx.

199 {
200 if( i<nParBhabha ) {
201 nbb[i]++;
202 }
203 return;
204}

Referenced by TofRec::execute().

◆ addNumber() [2/2]

void TofCount::addNumber ( unsigned int  i)

◆ final() [1/2]

void TofCount::final ( )

Definition at line 174 of file TofCount.cxx.

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

Referenced by TofRec::finalize().

◆ final() [2/2]

void TofCount::final ( )

◆ finalBhabha() [1/2]

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

Definition at line 207 of file TofCount.cxx.

207 {
208 std::cout<<"$$$$$$$ Summary of Bhabha Selection Criteria $$$$$$$$$$$$$$$$$$$$$"<<std::endl;
209 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;
210 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;
211 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;
212 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;
213 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;
214 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;
215 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;
216 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;
217 if( calibData=="Bhabha" ) {
218 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;
219 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;
220 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;
221 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;
222 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;
223 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;
224 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;
225 }
226 else if( calibData=="Dimu") {
227 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;
228 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;
229 }
230 std::cout<<"$$$$$$$ End of Summary $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"<<std::endl;
231 return;
232}

Referenced by TofRec::finalize().

◆ finalBhabha() [2/2]

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

◆ init() [1/2]

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}

◆ init() [2/2]

void TofCount::init ( )

◆ initBhabha() [1/2]

void TofCount::initBhabha ( )

Definition at line 191 of file TofCount.cxx.

191 {
192 for( unsigned int i=0; i<nParBhabha; i++ ) {
193 nbb[i] = 0;
194 }
195 return;
196}

◆ initBhabha() [2/2]

void TofCount::initBhabha ( )

◆ setExtTrackNum() [1/2]

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().

◆ setExtTrackNum() [2/2]

void TofCount::setExtTrackNum ( unsigned int  ntrk)

◆ setTrack1() [1/2]

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 nohit1++;
105 return;
106}

Referenced by setTrack1Col().

◆ setTrack1() [2/2]

void TofCount::setTrack1 ( TofTrack *&  tof)

◆ setTrack1Col() [1/2]

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

Definition at line 109 of file TofCount.cxx.

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

Referenced by TofRec::execute().

◆ setTrack1Col() [2/2]

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

◆ setTrack2() [1/2]

void TofCount::setTrack2 ( TofTrack *&  tof)

Definition at line 118 of file TofCount.cxx.

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

Referenced by TofRec::execute().

◆ setTrack2() [2/2]

void TofCount::setTrack2 ( TofTrack *&  tof)

◆ setTrack3() [1/2]

void TofCount::setTrack3 ( TofTrack *&  tof)

Definition at line 131 of file TofCount.cxx.

131 {
132 if( tof->hitCase() == InnerLayer ) inner3++;
133 else if( tof->hitCase() == OuterLayer ) outer3++;
134 else if( tof->hitCase() == DoubleLayer ) double3++;
135 else if( tof->hitCase() == EastEndcap ) east3++;
136 else if( tof->hitCase() == WestEndcap ) west3++;
137 else nohit3++;
138 // if( tof->changed() ) changed3++;
139 // else unchanged3++;
140 return;
141}

Referenced by TofRec::execute().

◆ setTrack3() [2/2]

void TofCount::setTrack3 ( TofTrack *&  tof)

◆ setTrack4() [1/2]

void TofCount::setTrack4 ( TofTrack *&  tof)

Definition at line 144 of file TofCount.cxx.

144 {
145 if( tof->hitCase() == InnerLayer ) inner4++;
146 else if( tof->hitCase() == OuterLayer ) outer4++;
147 else if( tof->hitCase() == DoubleLayer ) double4++;
148 else if( tof->hitCase() == EastEndcap ) east4++;
149 else if( tof->hitCase() == WestEndcap ) west4++;
150 else nohit4++;
151 // if( tof->changed() ) changed4++;
152 // else unchanged4++;
153 return;
154}

◆ setTrack4() [2/2]

void TofCount::setTrack4 ( TofTrack *&  tof)

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