#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) |
Private Attributes | |
int | extTrkNum |
int | barrelTrk |
int | endcapTrk |
int | inner1 |
int | outer1 |
int | double1 |
int | east1 |
int | west1 |
int | nohit1 |
int | unchanged1 |
int | changed1 |
int | inner2 |
int | outer2 |
int | double2 |
int | east2 |
int | west2 |
int | nohit2 |
int | unchanged2 |
int | changed2 |
int | inner3 |
int | outer3 |
int | double3 |
int | east3 |
int | west3 |
int | nohit3 |
int | unchanged3 |
int | changed3 |
int | inner4 |
int | outer4 |
int | double4 |
int | east4 |
int | west4 |
int | nohit4 |
int | unchanged4 |
int | changed4 |
int | bNCounter1 |
int | eNCounter1 |
int | bNCounter2 |
int | eNCounter2 |
int | nbb [nParBhabha] |
Definition at line 9 of file TofCount.h.
TofCount::TofCount | ( | ) |
Definition at line 6 of file TofCount.cxx.
References barrelTrk, changed1, changed2, changed3, changed4, double1, double2, double3, double4, east1, east2, east3, east4, endcapTrk, extTrkNum, genRecEmupikp::i, inner1, inner2, inner3, inner4, nbb, nohit1, nohit2, nohit3, nohit4, nParBhabha, outer1, outer2, outer3, outer4, unchanged1, unchanged2, unchanged3, unchanged4, west1, west2, west3, and west4.
00006 { 00007 extTrkNum = 0; 00008 barrelTrk = 0; 00009 endcapTrk = 0; 00010 inner1 = 0; 00011 outer1 = 0; 00012 double1 = 0; 00013 east1 = 0; 00014 west1 = 0; 00015 nohit1 = 0; 00016 unchanged1 = 0; 00017 changed1 = 0; 00018 inner2 = 0; 00019 outer2 = 0; 00020 double2 = 0; 00021 east2 = 0; 00022 west2 = 0; 00023 nohit2 = 0; 00024 unchanged2 = 0; 00025 changed2 = 0; 00026 inner3 = 0; 00027 outer3 = 0; 00028 double3 = 0; 00029 east3 = 0; 00030 west3 = 0; 00031 nohit3 = 0; 00032 unchanged3 = 0; 00033 changed3 = 0; 00034 inner4 = 0; 00035 outer4 = 0; 00036 double4 = 0; 00037 east4 = 0; 00038 west4 = 0; 00039 nohit4 = 0; 00040 unchanged4 = 0; 00041 changed4 = 0; 00042 00043 for( unsigned int i=0; i<nParBhabha; i++ ) { 00044 nbb[i] = 0; 00045 } 00046 00047 return; 00048 }
TofCount::~TofCount | ( | ) | [inline] |
void TofCount::addNumber | ( | unsigned int | i | ) |
Definition at line 207 of file TofCount.cxx.
References nbb, and nParBhabha.
Referenced by TofRec::execute().
00207 { 00208 if( i<nParBhabha ) { 00209 nbb[i]++; 00210 } 00211 return; 00212 }
void TofCount::final | ( | ) |
Definition at line 182 of file TofCount.cxx.
References double1, double2, double3, double4, east1, east2, east3, east4, extTrkNum, inner1, inner2, inner3, inner4, nohit1, nohit2, nohit3, nohit4, outer1, outer2, outer3, outer4, west1, west2, west3, and west4.
Referenced by TofRec::finalize().
00182 { 00183 std::cout<<"############################# TofRec Summary #####################################" << std::endl; 00184 std::cout<<" ===> Number of Extrapolated tracks: " << extTrkNum <<std::endl; 00185 std::cout<<" ===> Number of valid Extraploated tracks: " << (inner1+outer1+double1+east1+west1) << " Barrel: " << (inner1+outer1+double1) << " Endcap: " << (east1+west1) << std::endl; 00186 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; 00187 std::cout<<" ===> Inner Layer hit only in total: " << inner1 << " \t" << inner2 << " \t" << inner3 << " \t" << inner4 << std::endl; 00188 std::cout<<" ===> Outer Layer hit only in total: " << outer1 << "\t" << outer2 << " \t" << outer3 << " \t" << outer4 << std::endl; 00189 std::cout<<" ===> Double Layer hit in total: " << double1 << " \t" << double2 << " \t" << double3 << " \t" << double4 << std::endl; 00190 std::cout<<" ===> TofRec: number of endcap tracks: " << (east3+west3) << " Efficiency: " << setprecision(4) << (east3+west3)*100.0/((east1+west1)*1.0) << "%" << std::endl; 00191 std::cout<<" ===> East endcap tracks in total: " << east1 << " \t" << east2 << " \t" << east3 << " \t" << east4 << std::endl; 00192 std::cout<<" ===> West endcap tracks in total: " << west1 << " \t" << west2 << " \t" << west3 << " \t" << west4 << std::endl; 00193 std::cout<<" ===> The invalid Extend tracks in total: "<< nohit1 << " \t" << nohit2 << " \t" << nohit3 << " \t" << nohit4 <<std::endl; 00194 std::cout<<"############################# End Summary #######################################" <<std::endl; 00195 00196 }
void TofCount::finalBhabha | ( | std::string | calibData | ) |
Definition at line 215 of file TofCount.cxx.
References nbb.
Referenced by TofRec::finalize().
00215 { 00216 std::cout<<"$$$$$$$ Summary of Bhabha Selection Criteria $$$$$$$$$$$$$$$$$$$$$"<<std::endl; 00217 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; 00218 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; 00219 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; 00220 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; 00221 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; 00222 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; 00223 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; 00224 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; 00225 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; 00226 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; 00227 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; 00228 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; 00229 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; 00230 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; 00231 if( calibData=="Bhabha" ) { 00232 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; 00233 } 00234 else if( calibData=="Dimu") { 00235 } 00236 std::cout<<"$$$$$$$ End of Summary $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"<<std::endl; 00237 return; 00238 }
void TofCount::init | ( | ) |
Definition at line 51 of file TofCount.cxx.
References barrelTrk, changed1, changed2, changed3, changed4, double1, double2, double3, double4, east1, east2, east3, east4, endcapTrk, extTrkNum, inner1, inner2, inner3, inner4, nohit1, nohit2, nohit3, nohit4, outer1, outer2, outer3, outer4, unchanged1, unchanged2, unchanged3, unchanged4, west1, west2, west3, and west4.
00051 { 00052 extTrkNum = 0; 00053 barrelTrk = 0; 00054 endcapTrk = 0; 00055 inner1 = 0; 00056 outer1 = 0; 00057 double1 = 0; 00058 east1 = 0; 00059 west1 = 0; 00060 nohit1 = 0; 00061 unchanged1 = 0; 00062 changed1 = 0; 00063 inner2 = 0; 00064 outer2 = 0; 00065 double2 = 0; 00066 east2 = 0; 00067 west2 = 0; 00068 nohit2 = 0; 00069 unchanged2 = 0; 00070 changed2 = 0; 00071 inner3 = 0; 00072 outer3 = 0; 00073 double3 = 0; 00074 east3 = 0; 00075 west3 = 0; 00076 nohit3 = 0; 00077 unchanged3 = 0; 00078 changed3 = 0; 00079 inner4 = 0; 00080 outer4 = 0; 00081 double4 = 0; 00082 east4 = 0; 00083 west4 = 0; 00084 nohit4 = 0; 00085 unchanged4 = 0; 00086 changed4 = 0; 00087 00088 return; 00089 }
void TofCount::initBhabha | ( | ) |
Definition at line 199 of file TofCount.cxx.
References genRecEmupikp::i, nbb, and nParBhabha.
00199 { 00200 for( unsigned int i=0; i<nParBhabha; i++ ) { 00201 nbb[i] = 0; 00202 } 00203 return; 00204 }
void TofCount::setExtTrackNum | ( | unsigned int | ntrk | ) |
void TofCount::setTrack1 | ( | TofTrack *& | tof | ) |
Definition at line 98 of file TofCount.cxx.
References double1, DoubleLayer, east1, EastEndcap, EastEndcapMRPC, TofTrack::hitCase(), inner1, InnerLayer, nohit1, outer1, OuterLayer, west1, WestEndcap, and WestEndcapMRPC.
Referenced by setTrack1Col().
00098 { 00099 if( tof->hitCase() == InnerLayer ) inner1++; 00100 else if( tof->hitCase() == OuterLayer ) outer1++; 00101 else if( tof->hitCase() == DoubleLayer ) double1++; 00102 else if( tof->hitCase() == EastEndcap ) east1++; 00103 else if( tof->hitCase() == WestEndcap ) west1++; 00104 else if( tof->hitCase() == EastEndcapMRPC ) east1++; 00105 else if( tof->hitCase() == WestEndcapMRPC ) west1++; 00106 else nohit1++; 00107 return; 00108 }
void TofCount::setTrack1Col | ( | std::vector< TofTrack * > *& | tofTrackVec | ) |
Definition at line 111 of file TofCount.cxx.
References setTrack1().
Referenced by TofRec::execute().
00111 { 00112 TofTrackVec::iterator iter_tof = tofTrackVec->begin(); 00113 for( ; iter_tof!=tofTrackVec->end(); iter_tof++ ) { 00114 setTrack1( *iter_tof ); 00115 } 00116 return; 00117 }
void TofCount::setTrack2 | ( | TofTrack *& | tof | ) |
Definition at line 120 of file TofCount.cxx.
References double2, DoubleLayer, east2, EastEndcap, EastEndcapMRPC, TofTrack::hitCase(), inner2, InnerLayer, nohit2, outer2, OuterLayer, west2, WestEndcap, and WestEndcapMRPC.
Referenced by TofRec::execute().
00120 { 00121 if( tof->hitCase() == InnerLayer ) inner2++; 00122 else if( tof->hitCase() == OuterLayer ) outer2++; 00123 else if( tof->hitCase() == DoubleLayer ) double2++; 00124 else if( tof->hitCase() == EastEndcap ) east2++; 00125 else if( tof->hitCase() == WestEndcap ) west2++; 00126 else if( tof->hitCase() == EastEndcapMRPC ) east2++; 00127 else if( tof->hitCase() == WestEndcapMRPC ) west2++; 00128 else nohit2++; 00129 // if( tof->changed() ) changed2++; 00130 // else unchanged2++; 00131 return; 00132 }
void TofCount::setTrack3 | ( | TofTrack *& | tof | ) |
Definition at line 135 of file TofCount.cxx.
References double3, DoubleLayer, east3, EastEndcap, EastEndcapMRPC, TofTrack::hitCase(), inner3, InnerLayer, nohit3, outer3, OuterLayer, west3, WestEndcap, and WestEndcapMRPC.
Referenced by TofRec::execute().
00135 { 00136 if( tof->hitCase() == InnerLayer ) inner3++; 00137 else if( tof->hitCase() == OuterLayer ) outer3++; 00138 else if( tof->hitCase() == DoubleLayer ) double3++; 00139 else if( tof->hitCase() == EastEndcap ) east3++; 00140 else if( tof->hitCase() == WestEndcap ) west3++; 00141 else if( tof->hitCase() == EastEndcapMRPC ) east3++; 00142 else if( tof->hitCase() == WestEndcapMRPC ) west3++; 00143 else nohit3++; 00144 // if( tof->changed() ) changed3++; 00145 // else unchanged3++; 00146 return; 00147 }
void TofCount::setTrack4 | ( | TofTrack *& | tof | ) |
Definition at line 150 of file TofCount.cxx.
References double4, DoubleLayer, east4, EastEndcap, EastEndcapMRPC, TofTrack::hitCase(), inner4, InnerLayer, nohit4, outer4, OuterLayer, west4, WestEndcap, and WestEndcapMRPC.
00150 { 00151 if( tof->hitCase() == InnerLayer ) inner4++; 00152 else if( tof->hitCase() == OuterLayer ) outer4++; 00153 else if( tof->hitCase() == DoubleLayer ) double4++; 00154 else if( tof->hitCase() == EastEndcap ) east4++; 00155 else if( tof->hitCase() == WestEndcap ) west4++; 00156 else if( tof->hitCase() == EastEndcapMRPC ) east4++; 00157 else if( tof->hitCase() == WestEndcapMRPC ) west4++; 00158 else nohit4++; 00159 // if( tof->changed() ) changed4++; 00160 // else unchanged4++; 00161 return; 00162 }
int TofCount::barrelTrk [private] |
int TofCount::bNCounter1 [private] |
Definition at line 36 of file TofCount.h.
int TofCount::bNCounter2 [private] |
Definition at line 36 of file TofCount.h.
int TofCount::changed1 [private] |
int TofCount::changed2 [private] |
int TofCount::changed3 [private] |
int TofCount::changed4 [private] |
int TofCount::double1 [private] |
Definition at line 32 of file TofCount.h.
Referenced by final(), init(), setTrack1(), and TofCount().
int TofCount::double2 [private] |
Definition at line 33 of file TofCount.h.
Referenced by final(), init(), setTrack2(), and TofCount().
int TofCount::double3 [private] |
Definition at line 34 of file TofCount.h.
Referenced by final(), init(), setTrack3(), and TofCount().
int TofCount::double4 [private] |
Definition at line 35 of file TofCount.h.
Referenced by final(), init(), setTrack4(), and TofCount().
int TofCount::east1 [private] |
Definition at line 32 of file TofCount.h.
Referenced by final(), init(), setTrack1(), and TofCount().
int TofCount::east2 [private] |
Definition at line 33 of file TofCount.h.
Referenced by final(), init(), setTrack2(), and TofCount().
int TofCount::east3 [private] |
Definition at line 34 of file TofCount.h.
Referenced by final(), init(), setTrack3(), and TofCount().
int TofCount::east4 [private] |
Definition at line 35 of file TofCount.h.
Referenced by final(), init(), setTrack4(), and TofCount().
int TofCount::eNCounter1 [private] |
Definition at line 36 of file TofCount.h.
int TofCount::eNCounter2 [private] |
Definition at line 36 of file TofCount.h.
int TofCount::endcapTrk [private] |
int TofCount::extTrkNum [private] |
Definition at line 30 of file TofCount.h.
Referenced by final(), init(), setExtTrackNum(), and TofCount().
int TofCount::inner1 [private] |
Definition at line 32 of file TofCount.h.
Referenced by final(), init(), setTrack1(), and TofCount().
int TofCount::inner2 [private] |
Definition at line 33 of file TofCount.h.
Referenced by final(), init(), setTrack2(), and TofCount().
int TofCount::inner3 [private] |
Definition at line 34 of file TofCount.h.
Referenced by final(), init(), setTrack3(), and TofCount().
int TofCount::inner4 [private] |
Definition at line 35 of file TofCount.h.
Referenced by final(), init(), setTrack4(), and TofCount().
int TofCount::nbb[nParBhabha] [private] |
Definition at line 38 of file TofCount.h.
Referenced by addNumber(), finalBhabha(), initBhabha(), and TofCount().
int TofCount::nohit1 [private] |
Definition at line 32 of file TofCount.h.
Referenced by final(), init(), setTrack1(), and TofCount().
int TofCount::nohit2 [private] |
Definition at line 33 of file TofCount.h.
Referenced by final(), init(), setTrack2(), and TofCount().
int TofCount::nohit3 [private] |
Definition at line 34 of file TofCount.h.
Referenced by final(), init(), setTrack3(), and TofCount().
int TofCount::nohit4 [private] |
Definition at line 35 of file TofCount.h.
Referenced by final(), init(), setTrack4(), and TofCount().
int TofCount::outer1 [private] |
Definition at line 32 of file TofCount.h.
Referenced by final(), init(), setTrack1(), and TofCount().
int TofCount::outer2 [private] |
Definition at line 33 of file TofCount.h.
Referenced by final(), init(), setTrack2(), and TofCount().
int TofCount::outer3 [private] |
Definition at line 34 of file TofCount.h.
Referenced by final(), init(), setTrack3(), and TofCount().
int TofCount::outer4 [private] |
Definition at line 35 of file TofCount.h.
Referenced by final(), init(), setTrack4(), and TofCount().
int TofCount::unchanged1 [private] |
int TofCount::unchanged2 [private] |
int TofCount::unchanged3 [private] |
int TofCount::unchanged4 [private] |
int TofCount::west1 [private] |
Definition at line 32 of file TofCount.h.
Referenced by final(), init(), setTrack1(), and TofCount().
int TofCount::west2 [private] |
Definition at line 33 of file TofCount.h.
Referenced by final(), init(), setTrack2(), and TofCount().
int TofCount::west3 [private] |
Definition at line 34 of file TofCount.h.
Referenced by final(), init(), setTrack3(), and TofCount().
int TofCount::west4 [private] |
Definition at line 35 of file TofCount.h.
Referenced by final(), init(), setTrack4(), and TofCount().