#include <TofCPID.h>
Inheritance diagram for TofCPID:
Public Member Functions | |
~TofCPID () | |
void | init () |
void | calculate () |
bool | IsPidInfoValid () const |
double | chi (int n) const |
double | prob (int n) const |
double | sigma (int n) const |
double | offset (int n) const |
int | ndof () const |
double | mass2 () const |
double | phc () const |
double | zhitc () const |
double | pathc () const |
double | tofc () const |
int | neuronPID () const |
EvtRecTrack * | PidTrk () const |
void | setRecTrack (EvtRecTrack *trk) |
double | chiMinCut () const |
void | setChiMinCut (const double chi=4) |
double | chiMaxCut () const |
void | setChiMaxCut (const double chi=6) |
double | pdfMinSigmaCut () const |
void | setPdfMinSigmaCut (const double pdf=4) |
double | getRunNo () const |
void | setRunNo (const double runh=8093) |
double | p () |
double | pt () |
double | charge () |
double | xmass (int n) |
double | velc () |
double | probCalculate (double chi2, int n) |
double | pdfCalculate (double offset, double sigma) |
double | interpolation (double *x, double *y, double x1) |
double | pol2 (double x, double *par) |
double | pol3 (double x, double *par) |
double | pol4 (double x, double *par) |
int | useDedx () const |
int | useTof () const |
int | useTof1 () const |
int | useTof2 () const |
int | useTofE () const |
int | useTofQ () const |
int | useTofC () const |
int | useTofCorr () const |
int | useEmc () const |
int | useMuc () const |
int | onlyPionKaon () const |
int | onlyPionKaonProton () const |
int | onlyPionKaonElectron () const |
int | all () const |
int | onlyElectron () const |
int | onlyMuon () const |
int | onlyPion () const |
int | onlyKaon () const |
int | onlyProton () const |
int | methodLikelihood () const |
int | methodProbability () const |
int | methodNeuronNetwork () const |
int | dedxValid () const |
int | tofValid () const |
int | tofeValid () const |
int | tofqValid () const |
int | tofcValid () const |
int | tofcorrValid () const |
int | emcValid () const |
int | mucValid () const |
void | set_path (const char *s_path=0) |
void | set_path (std::string s_path) |
Static Public Member Functions | |
static TofCPID * | instance () |
Protected Member Functions | |
int | neuronPIDCalculation () |
int | particleIDCalculation () |
int | LikelihoodCalculation () |
double | offsetTofC (int n, double ptrk, double cost) |
double | sigmaTofC (int n, double ptrk, double cost) |
double | sampleQ0 (double betagamma, double beta) |
double | mypol3 (double x, double par0, double par1, double par2, double par3) |
double | mypol5 (double x, double par0, double par1, double par2, double par3, double par4, double par5) |
Static Protected Attributes | |
static std::string | path = "" |
Private Member Functions | |
TofCPID () | |
Private Attributes | |
double | m_chi [5] |
double | m_prob [5] |
double | m_sigma [5] |
double | m_offset [5] |
double | m_chimin |
double | m_pdfmin |
int | m_ndof |
double | m_mass2 |
double | m_phc |
double | m_zhitc |
double | m_pathc |
double | m_tofc |
double | m_pars [15] |
double | m_momentpara [5][12] |
double | m_thetapara [5][8] |
double | m_endcappara [5][4] |
int | m_readstate |
Static Private Attributes | |
static TofCPID * | m_pointer = 0 |
Definition at line 13 of file TofCPID.h.
TofCPID::TofCPID | ( | ) | [private] |
Definition at line 24 of file TofCPID.cxx.
References m_pars, and m_readstate.
Referenced by instance().
00024 :ParticleIDBase() { 00025 m_pars[0]= -0.208289; 00026 m_pars[1]= 1.63092; 00027 m_pars[2]= -0.0733139; 00028 m_pars[3]= 1.02385; 00029 m_pars[4]= 0.00145052; 00030 m_pars[5]= -1.72471e-06; 00031 m_pars[6]= 5.92726e-10; 00032 m_pars[7]= -0.0645428; 00033 m_pars[8]= -0.00143637; 00034 m_pars[9]= -0.133817; 00035 m_pars[10]= 0.0101188; 00036 m_pars[11]= -5.07622; 00037 m_pars[12]= 5.31472; 00038 m_pars[13]= -0.443142; 00039 m_pars[14]= -12.1083; 00040 m_readstate=0; 00041 }
int ParticleIDBase::all | ( | ) | const [inline, inherited] |
Definition at line 79 of file ParticleIDBase.h.
References ParticleIDBase::IDENTIFY_ELECTRON, ParticleIDBase::IDENTIFY_KAON, ParticleIDBase::IDENTIFY_PION, and ParticleIDBase::IDENTIFY_PROTON.
00079 {return (IDENTIFY_ELECTRON | IDENTIFY_PION | IDENTIFY_KAON | IDENTIFY_PROTON);}
void TofCPID::calculate | ( | ) | [virtual] |
Implements ParticleIDBase.
Definition at line 55 of file TofCPID.cxx.
References ParticleIDBase::getRunNo(), genRecEmupikp::i, ganga-rec::j, m_endcappara, m_momentpara, m_ndof, m_readstate, m_thetapara, particleIDCalculation(), ParticleIDBase::path, and deljobs::string.
00055 { 00056 int runtof = getRunNo(); 00057 if(!m_readstate) { 00058 std::cout<<"read tofC"<<std::endl; 00059 std::string tofdata_mom_file = path + "/share/pidparatof/tofpdata.txt"; 00060 ifstream inputmomdata(tofdata_mom_file.c_str(),std::ios_base::in); 00061 if ( !inputmomdata ) { 00062 cout << " can not open: " << tofdata_mom_file << endl; 00063 exit(1); 00064 } 00065 00066 std::string tofdata_theta_file = path + "/share/pidparatof/tofthetadata.txt"; 00067 ifstream inputthetadata(tofdata_theta_file.c_str(),std::ios_base::in); 00068 if ( !inputthetadata ) { 00069 cout << " can not open: " << tofdata_theta_file << endl; 00070 exit(1); 00071 } 00072 00073 std::string tofdata_endcap_file = path + "/share/pidparatof/tofendcapdata.txt"; 00074 ifstream inputendcapdata(tofdata_endcap_file.c_str(),std::ios_base::in); 00075 if ( !inputendcapdata ) { 00076 cout << " can not open: " << tofdata_endcap_file << endl; 00077 exit(1); 00078 } 00079 00080 00081 std::string tofmc_mom_file = path + "/share/pidparatof/tofpmc.txt"; 00082 ifstream inputmommc(tofmc_mom_file.c_str(),std::ios_base::in); 00083 if ( !inputmommc ) { 00084 cout << " can not open: " << tofmc_mom_file << endl; 00085 exit(1); 00086 } 00087 00088 std::string tofmc_theta_file = path + "/share/pidparatof/tofthetamc.txt"; 00089 ifstream inputthetamc(tofmc_theta_file.c_str(),std::ios_base::in); 00090 if ( !inputthetamc ) { 00091 cout << " can not open: " << tofmc_theta_file << endl; 00092 exit(1); 00093 } 00094 00095 std::string tofmc_endcap_file = path + "/share/pidparatof/tofendcapmc.txt"; 00096 ifstream inputendcapmc(tofmc_endcap_file.c_str(),std::ios_base::in); 00097 if ( !inputendcapmc ) { 00098 cout << " can not open: " << tofmc_endcap_file << endl; 00099 exit(1); 00100 } 00101 00102 00103 if(runtof>0) 00104 { 00105 for(int i=0; i<5; i++) 00106 { 00107 for(int j=0; j<8; j++) 00108 { 00109 inputthetadata>>m_thetapara[i][j]; 00110 } 00111 } 00112 00113 for(int i=0; i<5; i++) 00114 { 00115 for(int j=0; j<12; j++) 00116 { 00117 inputmomdata>>m_momentpara[i][j]; 00118 } 00119 } 00120 00121 for(int i=0; i<5; i++) 00122 { 00123 for(int j=0; j<4; j++) 00124 { 00125 inputendcapdata>>m_endcappara[i][j]; 00126 } 00127 } 00128 00129 } else 00130 { 00131 for(int i=0; i<5; i++) 00132 { 00133 for(int j=0; j<8; j++) 00134 { 00135 inputthetamc>>m_thetapara[i][j]; 00136 } 00137 } 00138 00139 for(int i=0; i<5; i++) 00140 { 00141 for(int j=0; j<12; j++) 00142 { 00143 inputmommc>>m_momentpara[i][j]; 00144 } 00145 } 00146 00147 for(int i=0; i<5; i++) 00148 { 00149 for(int j=0; j<4; j++) 00150 { 00151 inputendcapmc>>m_endcappara[i][j]; 00152 } 00153 } 00154 00155 } 00156 m_readstate=1; 00157 } 00158 if(particleIDCalculation() == 0) m_ndof=1; 00159 }
double ParticleIDBase::charge | ( | ) | [inherited] |
Definition at line 116 of file ParticleIDBase.cxx.
References DstMdcTrack::charge(), EvtRecTrack::isMdcTrackValid(), ParticleIDBase::m_trk, and EvtRecTrack::mdcTrack().
Referenced by TofCorrPID::particleIDCalculation(), Tof2PID::particleIDCalculation(), Tof1PID::particleIDCalculation(), and DedxPID::particleIDCalculation().
00116 { 00117 double val = 999; 00118 if(!m_trk) return val; 00119 if(!m_trk->isMdcTrackValid()) return val; 00120 RecMdcTrack *mdcTrk = m_trk->mdcTrack(); 00121 val = mdcTrk->charge() + 0.0; 00122 return val; 00123 }
double TofCPID::chi | ( | int | n | ) | const [inline, virtual] |
Implements ParticleIDBase.
Definition at line 22 of file TofCPID.h.
References m_chi.
00022 {return m_chi[n];}
double ParticleIDBase::chiMaxCut | ( | ) | const [inline, inherited] |
Definition at line 40 of file ParticleIDBase.h.
References ParticleIDBase::m_chimax_cut.
Referenced by TofCorrPID::correlationCheck(), TofCorrPID::particleIDCalculation(), and ParticleID::particleIDCalculation().
00040 {return m_chimax_cut;}
double ParticleIDBase::chiMinCut | ( | ) | const [inline, inherited] |
Definition at line 38 of file ParticleIDBase.h.
References ParticleIDBase::m_chimin_cut.
Referenced by TofCorrPID::correlationCheck(), TofPID::particleIDCalculation(), particleIDCalculation(), TofCorrPID::particleIDCalculation(), Tof2PID::particleIDCalculation(), Tof1PID::particleIDCalculation(), ParticleID::particleIDCalculation(), and DedxPID::particleIDCalculation().
00038 {return m_chimin_cut;}
int ParticleIDBase::dedxValid | ( | ) | const [inline, inherited] |
Definition at line 91 of file ParticleIDBase.h.
References ParticleIDBase::DEDX_VALID.
00091 {return DEDX_VALID;}
int ParticleIDBase::emcValid | ( | ) | const [inline, inherited] |
Definition at line 97 of file ParticleIDBase.h.
References ParticleIDBase::EMC_VALID.
00097 {return EMC_VALID;}
double ParticleIDBase::getRunNo | ( | ) | const [inline, inherited] |
Definition at line 44 of file ParticleIDBase.h.
References ParticleIDBase::m_runno.
Referenced by calculate(), DedxPID::CorrDedx(), TofCorrPID::init(), offsetTofC(), TofCorrPID::sigmaTof(), and sigmaTofC().
00044 {return m_runno;}
void TofCPID::init | ( | ) | [virtual] |
Implements ParticleIDBase.
Definition at line 43 of file TofCPID.cxx.
References genRecEmupikp::i, m_chi, m_chimin, m_ndof, m_offset, m_pdfmin, m_prob, and m_sigma.
00043 { 00044 for(int i = 0; i < 5; i++) { 00045 m_chi[i] = 99.0; 00046 m_prob[i] = -1.0; 00047 m_offset[i] = 99.0; 00048 m_sigma[i] = 1.0; 00049 } 00050 m_chimin = 99.; 00051 m_pdfmin =99; 00052 m_ndof = 0; 00053 }
TofCPID * TofCPID::instance | ( | ) | [static] |
double ParticleIDBase::interpolation | ( | double * | x, | |
double * | y, | |||
double | x1 | |||
) | [inherited] |
Definition at line 125 of file ParticleIDBase.cxx.
00125 { 00126 double c1 = (y[0]-y[1])*(x[1]-x[2])-(x[0]-x[1])*(y[1]-y[2]); 00127 double c2 = (x[0]*x[0]-x[1]*x[1])*(x[1]-x[2])-(x[1]*x[1]-x[2]*x[2])*(x[0]-x[1]); 00128 double c = c1/c2; 00129 double b1 = (y[0]-y[1])*(x[1]*x[1]-x[2]*x[2])-(x[0]*x[0]-x[1]*x[1])*(y[1]-y[2]); 00130 double b2 = (x[0]-x[1])*(x[1]*x[1]-x[2]*x[2])-(x[1]-x[2])*(x[0]*x[0]-x[1]*x[1]); 00131 double b = b1/b2; 00132 double a = y[0] - b*x[0]-c*x[0]*x[0]; 00133 double y1 = a + b*x1 +c*x1*x1; 00134 return y1; 00135 }
bool TofCPID::IsPidInfoValid | ( | ) | const [inline, virtual] |
Implements ParticleIDBase.
Definition at line 21 of file TofCPID.h.
References m_ndof.
00021 {return (m_ndof > 0); }
int TofCPID::LikelihoodCalculation | ( | ) | [inline, protected, virtual] |
double TofCPID::mass2 | ( | ) | const [inline] |
int ParticleIDBase::methodLikelihood | ( | ) | const [inline, inherited] |
Definition at line 87 of file ParticleIDBase.h.
References ParticleIDBase::LIKELIHOOD_PID.
00087 {return LIKELIHOOD_PID;}
int ParticleIDBase::methodNeuronNetwork | ( | ) | const [inline, inherited] |
Definition at line 89 of file ParticleIDBase.h.
References ParticleIDBase::NEURONNETWORK_PID.
00089 {return NEURONNETWORK_PID;}
int ParticleIDBase::methodProbability | ( | ) | const [inline, inherited] |
Definition at line 88 of file ParticleIDBase.h.
References ParticleIDBase::PROBABILITY_PID.
00088 {return PROBABILITY_PID;}
int ParticleIDBase::mucValid | ( | ) | const [inline, inherited] |
Definition at line 98 of file ParticleIDBase.h.
References ParticleIDBase::MUC_VALID.
00098 {return MUC_VALID;}
double TofCPID::mypol3 | ( | double | x, | |
double | par0, | |||
double | par1, | |||
double | par2, | |||
double | par3 | |||
) | [protected] |
Definition at line 651 of file TofCPID.cxx.
Referenced by offsetTofC(), and sigmaTofC().
00652 { 00653 double y = x; 00654 return par0 + (par1 * y) +(par2 * y * y) + (par3 * y * y * y); 00655 00656 }
double TofCPID::mypol5 | ( | double | x, | |
double | par0, | |||
double | par1, | |||
double | par2, | |||
double | par3, | |||
double | par4, | |||
double | par5 | |||
) | [protected] |
Definition at line 658 of file TofCPID.cxx.
Referenced by offsetTofC(), and sigmaTofC().
00659 { 00660 double y = x; 00661 return par0 + (par1 * y) +(par2 * y * y) + (par3 * y * y * y) + (par4 * y * y * y *y)+ (par5 * y * y * y * y * y); 00662 00663 }
int TofCPID::ndof | ( | ) | const [inline, virtual] |
Implements ParticleIDBase.
Definition at line 26 of file TofCPID.h.
References m_ndof.
00026 {return m_ndof;}
int TofCPID::neuronPID | ( | ) | const [inline] |
int TofCPID::neuronPIDCalculation | ( | ) | [inline, protected] |
double TofCPID::offset | ( | int | n | ) | const [inline] |
Definition at line 25 of file TofCPID.h.
References m_offset.
Referenced by offsetTofC().
00025 {return m_offset[n];}
double TofCPID::offsetTofC | ( | int | n, | |
double | ptrk, | |||
double | cost | |||
) | [protected] |
Definition at line 262 of file TofCPID.cxx.
References cos(), ParticleIDBase::getRunNo(), m_endcappara, m_momentpara, m_thetapara, mypol3(), mypol5(), and offset().
Referenced by particleIDCalculation().
00262 { 00263 int rundedx2 = getRunNo(); 00264 double offset = 0.0; 00265 double offsetp = 0.0; 00266 double offsetc = 0.0; 00267 double sigcos = 0.0; 00268 double sigp = 0.0; 00269 // double gb = ptrk/xmass(n); 00270 00271 switch(n) { 00272 case 0: { // Electron 00273 double ptemp = ptrk; 00274 double costm = cost; 00275 00276 if(rundedx2>0) 00277 { if(ptrk < 0.3) ptemp = 0.3; 00278 if(ptrk > 1.3) ptemp = 1.3; 00279 } 00280 else 00281 { if(ptrk < 0.3) ptemp = 0.3; 00282 if(ptrk > 1.3) ptemp = 1.3; 00283 } 00284 00285 double plog = log(ptemp); 00286 double costcos = cos(costm); 00287 offsetp= mypol5(plog,m_momentpara[0][0],m_momentpara[0][1],m_momentpara[0][2],m_momentpara[0][3],m_momentpara[0][4],m_momentpara[0][5]); 00288 sigp=mypol5(plog,m_momentpara[0][6],m_momentpara[0][7],m_momentpara[0][8],m_momentpara[0][9],m_momentpara[0][10],m_momentpara[0][11]); 00289 00290 if(costm<-0.83) { 00291 offsetc=m_endcappara[0][0]; 00292 sigcos=m_endcappara[0][2]; 00293 } 00294 if(costm>0.83) { 00295 offsetc=m_endcappara[0][1]; 00296 sigcos=m_endcappara[0][3]; 00297 } 00298 if(fabs(costm)<=0.83) 00299 { 00300 offsetc=mypol3(costcos,m_thetapara[0][0],m_thetapara[0][1],m_thetapara[0][2],m_thetapara[0][3]); 00301 sigcos=mypol3(costcos,m_thetapara[0][4],m_thetapara[0][5],m_thetapara[0][6],m_thetapara[0][7]); 00302 } 00303 00304 00305 offset=offsetc+sigcos*offsetp; 00306 //offset=offsetc; 00307 offset=offsetp+sigp*offsetc; 00308 break; 00309 } 00310 00311 case 1: {// Muon 00312 double ptemp = ptrk; 00313 double costm = cost; 00314 if(rundedx2>0) 00315 { if(ptrk < 0.3) ptemp = 0.3; 00316 if(ptrk > 1.3) ptemp = 1.3; 00317 } 00318 else 00319 { if(ptrk < 0.3) ptemp = 0.3; 00320 if(ptrk > 1.3) ptemp = 1.3; 00321 } 00322 00323 double plog = log(ptemp); 00324 double costcos = cos(costm); 00325 offsetp= mypol5(plog,m_momentpara[1][0],m_momentpara[1][1],m_momentpara[1][2],m_momentpara[1][3],m_momentpara[1][4],m_momentpara[1][5]); 00326 sigp=mypol5(plog,m_momentpara[1][6],m_momentpara[1][7],m_momentpara[1][8],m_momentpara[1][9],m_momentpara[1][10],m_momentpara[1][11]); 00327 00328 if(costm<-0.83) { 00329 offsetc=m_endcappara[1][0]; 00330 sigcos=m_endcappara[1][2]; 00331 } 00332 if(costm>0.83) { 00333 offsetc=m_endcappara[1][1]; 00334 sigcos=m_endcappara[1][3]; 00335 } 00336 if(fabs(costm)<=0.83) 00337 { 00338 offsetc=mypol3(costcos,m_thetapara[1][0],m_thetapara[1][1],m_thetapara[1][2],m_thetapara[1][3]); 00339 sigcos=mypol3(costcos,m_thetapara[1][4],m_thetapara[1][5],m_thetapara[1][6],m_thetapara[1][7]); 00340 } 00341 00342 00343 offset=offsetc+sigcos*offsetp; 00344 //offset=offsetc; 00345 offset=offsetp+sigp*offsetc; 00346 break; 00347 } 00348 00349 case 2: {// Pion 00350 double ptemp = ptrk; 00351 double costm = cost; 00352 if(rundedx2>0) 00353 { if(ptrk < 0.3) ptemp = 0.3; 00354 if(ptrk > 1.6) ptemp = 1.6; 00355 } 00356 else 00357 { if(ptrk < 0.3) ptemp = 0.3; 00358 if(ptrk > 1.6) ptemp = 1.6; 00359 } 00360 00361 double plog = log(ptemp); 00362 double costcos = cos(costm); 00363 offsetp= mypol5(plog,m_momentpara[2][0],m_momentpara[2][1],m_momentpara[2][2],m_momentpara[2][3],m_momentpara[2][4],m_momentpara[2][5]); 00364 sigp=mypol5(plog,m_momentpara[2][6],m_momentpara[2][7],m_momentpara[2][8],m_momentpara[2][9],m_momentpara[2][10],m_momentpara[2][11]); 00365 00366 if(costm<-0.83) { 00367 offsetc=m_endcappara[2][0]; 00368 sigcos=m_endcappara[2][2]; 00369 } 00370 if(costm>0.83) { 00371 offsetc=m_endcappara[2][1]; 00372 sigcos=m_endcappara[2][3]; 00373 } 00374 if(fabs(costm)<=0.83) 00375 { 00376 offsetc=mypol3(costcos,m_thetapara[2][0],m_thetapara[2][1],m_thetapara[2][2],m_thetapara[2][3]); 00377 sigcos=mypol3(costcos,m_thetapara[2][4],m_thetapara[2][5],m_thetapara[2][6],m_thetapara[2][7]); 00378 } 00379 00380 00381 offset=offsetc+sigcos*offsetp; 00382 //offset=offsetc; 00383 offset=offsetp+sigp*offsetc; 00384 break; 00385 } 00386 00387 case 3: {// Kaon 00388 double ptemp = ptrk; 00389 double costm = cost; 00390 if(rundedx2>0) 00391 { if(ptrk < 0.4) ptemp = 0.4; 00392 if(ptrk > 1.3) ptemp = 1.3; 00393 } 00394 else 00395 { if(ptrk < 0.4) ptemp = 0.4; 00396 if(ptrk > 1.3) ptemp = 1.3; 00397 } 00398 double plog = log(ptemp); 00399 double costcos = cos(costm); 00400 offsetp= mypol5(plog,m_momentpara[3][0],m_momentpara[3][1],m_momentpara[3][2],m_momentpara[3][3],m_momentpara[3][4],m_momentpara[3][5]); 00401 sigp=mypol5(plog,m_momentpara[3][6],m_momentpara[3][7],m_momentpara[3][8],m_momentpara[3][9],m_momentpara[3][10],m_momentpara[3][11]); 00402 00403 if(costm<-0.83) { 00404 offsetc=m_endcappara[3][0]; 00405 sigcos=m_endcappara[3][2]; 00406 } 00407 if(costm>0.83) { 00408 offsetc=m_endcappara[3][1]; 00409 sigcos=m_endcappara[3][3]; 00410 } 00411 if(fabs(costm)<=0.83) 00412 { 00413 offsetc=mypol3(costcos,m_thetapara[3][0],m_thetapara[3][1],m_thetapara[3][2],m_thetapara[3][3]); 00414 sigcos=mypol3(costcos,m_thetapara[3][4],m_thetapara[3][5],m_thetapara[3][6],m_thetapara[3][7]); 00415 } 00416 00417 00418 offset=offsetc+sigcos*offsetp; 00419 //offset=offsetc; 00420 offset=offsetp+sigp*offsetc; 00421 break; 00422 } 00423 00424 case 4 : { // Proton 00425 double ptemp = ptrk; 00426 double costm = cost; 00427 if(rundedx2>0) 00428 { if(ptrk < 0.5) ptemp = 0.5; 00429 if(ptrk > 1.3) ptemp = 1.3; 00430 } 00431 else 00432 { if(ptrk < 0.5) ptemp = 0.5; 00433 if(ptrk > 1.3) ptemp = 1.3; 00434 } 00435 double plog = log(ptemp); 00436 double costcos = cos(costm); 00437 offsetp= mypol5(plog,m_momentpara[4][0],m_momentpara[4][1],m_momentpara[4][2],m_momentpara[4][3],m_momentpara[4][4],m_momentpara[4][5]); 00438 sigp=mypol5(plog,m_momentpara[4][6],m_momentpara[4][7],m_momentpara[4][8],m_momentpara[4][9],m_momentpara[4][10],m_momentpara[4][11]); 00439 00440 if(costm<-0.83) { 00441 offsetc=m_endcappara[4][0]; 00442 sigcos=m_endcappara[4][2]; 00443 } 00444 if(costm>0.83) { 00445 offsetc=m_endcappara[4][1]; 00446 sigcos=m_endcappara[4][3]; 00447 } 00448 if(fabs(costm)<=0.83) 00449 { 00450 offsetc=mypol3(costcos,m_thetapara[4][0],m_thetapara[4][1],m_thetapara[4][2],m_thetapara[4][3]); 00451 sigcos=mypol3(costcos,m_thetapara[4][4],m_thetapara[4][5],m_thetapara[4][6],m_thetapara[4][7]); 00452 } 00453 00454 offset=offsetc+sigcos*offsetp; 00455 //offset=offsetc; 00456 offset=offsetp+sigp*offsetc; 00457 break; 00458 } 00459 00460 default: 00461 offset = 0.0; 00462 break; 00463 } 00464 // offset = 0.0; 00465 return offset; 00466 }
int ParticleIDBase::onlyElectron | ( | ) | const [inline, inherited] |
Definition at line 80 of file ParticleIDBase.h.
References ParticleIDBase::IDENTIFY_ELECTRON.
Referenced by ParticleID::LikelihoodCalculation(), and ParticleID::particleIDCalculation().
00080 {return IDENTIFY_ELECTRON;}
int ParticleIDBase::onlyKaon | ( | ) | const [inline, inherited] |
Definition at line 83 of file ParticleIDBase.h.
References ParticleIDBase::IDENTIFY_KAON.
Referenced by ParticleID::LikelihoodCalculation(), and ParticleID::particleIDCalculation().
00083 {return IDENTIFY_KAON;}
int ParticleIDBase::onlyMuon | ( | ) | const [inline, inherited] |
Definition at line 81 of file ParticleIDBase.h.
References ParticleIDBase::IDENTIFY_MUON.
Referenced by ParticleID::LikelihoodCalculation(), and ParticleID::particleIDCalculation().
00081 {return IDENTIFY_MUON;}
int ParticleIDBase::onlyPion | ( | ) | const [inline, inherited] |
Definition at line 82 of file ParticleIDBase.h.
References ParticleIDBase::IDENTIFY_PION.
Referenced by ParticleID::LikelihoodCalculation(), and ParticleID::particleIDCalculation().
00082 {return IDENTIFY_PION;}
int ParticleIDBase::onlyPionKaon | ( | ) | const [inline, inherited] |
Definition at line 76 of file ParticleIDBase.h.
References ParticleIDBase::IDENTIFY_KAON, and ParticleIDBase::IDENTIFY_PION.
00076 {return (IDENTIFY_PION | IDENTIFY_KAON);}
int ParticleIDBase::onlyPionKaonElectron | ( | ) | const [inline, inherited] |
Definition at line 78 of file ParticleIDBase.h.
References ParticleIDBase::IDENTIFY_ELECTRON, ParticleIDBase::IDENTIFY_KAON, and ParticleIDBase::IDENTIFY_PION.
00078 {return (IDENTIFY_PION | IDENTIFY_KAON | IDENTIFY_ELECTRON);}
int ParticleIDBase::onlyPionKaonProton | ( | ) | const [inline, inherited] |
Definition at line 77 of file ParticleIDBase.h.
References ParticleIDBase::IDENTIFY_KAON, ParticleIDBase::IDENTIFY_PION, and ParticleIDBase::IDENTIFY_PROTON.
00077 {return (IDENTIFY_PION | IDENTIFY_KAON | IDENTIFY_PROTON);}
int ParticleIDBase::onlyProton | ( | ) | const [inline, inherited] |
Definition at line 84 of file ParticleIDBase.h.
References ParticleIDBase::IDENTIFY_PROTON.
Referenced by ParticleID::LikelihoodCalculation(), and ParticleID::particleIDCalculation().
00084 {return IDENTIFY_PROTON;}
double ParticleIDBase::p | ( | ) | [inherited] |
Definition at line 100 of file ParticleIDBase.cxx.
References EvtRecTrack::isMdcTrackValid(), ParticleIDBase::m_trk, EvtRecTrack::mdcTrack(), and DstMdcTrack::p().
Referenced by DedxPID::cal_par(), TofCorrPID::particleIDCalculation(), and ParticleIDBase::probCalculate().
00100 { 00101 double val = 999; 00102 if(!m_trk) return val; 00103 if(!m_trk->isMdcTrackValid()) return val; 00104 RecMdcTrack *mdcTrk = m_trk->mdcTrack(); 00105 val = mdcTrk->p(); 00106 return val; 00107 }
int TofCPID::particleIDCalculation | ( | ) | [protected, virtual] |
Implements ParticleIDBase.
Definition at line 161 of file TofCPID.cxx.
References ParticleIDBase::chiMinCut(), cos(), genRecEmupikp::i, TofHitStatus::is_cluster(), EvtRecTrack::isMdcTrackValid(), EvtRecTrack::isTofTrackValid(), m_chi, m_chimin, m_mass2, m_offset, m_pathc, m_pdfmin, m_phc, m_prob, m_sigma, m_tofc, m_zhitc, EvtRecTrack::mdcTrack(), offsetTofC(), DstMdcTrack::p(), ParticleIDBase::path, ParticleIDBase::pdfCalculate(), ParticleIDBase::pdfMinSigmaCut(), ParticleIDBase::PidTrk(), ParticleIDBase::probCalculate(), TofHitStatus::setStatus(), sigmaTofC(), DstMdcTrack::theta(), EvtRecTrack::tofTrack(), and ParticleIDBase::velc().
Referenced by calculate().
00161 { 00162 /* 00163 cout<<"m_momentpara[2][2]="<<m_momentpara[2][2]<<endl; 00164 cout<<"m_momentpara[2][3]="<<m_momentpara[2][3]<<endl; 00165 cout<<"m_momentpara[3][2]="<<m_momentpara[3][2]<<endl; 00166 cout<<"m_momentpara[3][3]="<<m_momentpara[3][3]<<endl; 00167 cout<<"m_thetapara[2][2]="<<m_thetapara[2][2]<<endl; 00168 cout<<"m_thetapara[2][3]="<<m_thetapara[2][3]<<endl; 00169 cout<<"m_thetapara[3][2]="<<m_thetapara[3][2]<<endl; 00170 cout<<"m_thetapara[3][3]="<<m_thetapara[3][3]<<endl; 00171 cout<<"m_endcappara[2][2]="<<m_endcappara[2][2]<<endl; 00172 cout<<"m_endcappara[2][3]="<<m_endcappara[2][3]<<endl; 00173 cout<<"m_endcappara[3][2]="<<m_endcappara[3][2]<<endl; 00174 cout<<"m_endcappara[3][3]="<<m_endcappara[3][3]<<endl; 00175 */ 00176 int irc = -1; 00177 00178 EvtRecTrack* recTrk = PidTrk(); 00179 if(!(recTrk->isMdcTrackValid())) return irc; 00180 RecMdcTrack* mdcTrk = recTrk->mdcTrack(); 00181 double ptrk = mdcTrk->p(); 00182 // double charge = mdcTrk->charge(); 00183 double cost = cos(mdcTrk->theta()); 00184 if(!(recTrk->isTofTrackValid())) return irc; 00185 00186 #ifndef BEAN 00187 SmartRefVector<RecTofTrack> tofTrk = recTrk->tofTrack(); 00188 SmartRefVector<RecTofTrack>::iterator it;//=tofTrk.begin(); 00189 #else 00190 const std::vector<TTofTrack* >& tofTrk = recTrk->tofTrack(); 00191 std::vector<TTofTrack* >::const_iterator it;//=tofTrk.begin(); 00192 #endif 00193 00194 TofHitStatus *hitst = new TofHitStatus; 00195 std::vector<int> tofccount; 00196 int goodtofctrk=0; 00197 for(it = tofTrk.begin(); it!=tofTrk.end(); it++,goodtofctrk++) { 00198 unsigned int st = (*it)->status(); 00199 hitst->setStatus(st); 00200 // if( !(hitst->is_barrel()) ) continue; 00201 // if( !(hitst->is_counter()) ) continue; 00202 // if( hitst->layer()==1 ) tofccount.push_back(goodtofctrk); 00203 if(hitst->is_cluster()) tofccount.push_back(goodtofctrk); 00204 } 00205 delete hitst; 00206 if(tofccount.size()!=1) return irc;//not tof2 track or more than 1 tracks 00207 it = tofTrk.begin()+tofccount[0]; 00208 double tof = (*it)->tof(); 00209 m_tofc = tof; 00210 // int qual = (*it)->quality(); 00211 // int cntr = (*it)->tofID(); 00212 double path = ((*it)->path())*10.0;//the unit from mm to cm 00213 m_pathc = path; 00214 m_phc = (*it)->ph(); //no change 00215 m_zhitc = ((*it)->zrhit())*10;//the unit from mm to cm 00216 double beta2 = path*path/velc()/velc()/tof/tof; 00217 m_mass2 = ptrk * ptrk * (1/beta2 -1); 00218 if ((m_mass2>20)||(m_mass2<-1)) return irc; 00219 if(tof <=0 ) return irc; 00220 double chitemp = 99.; 00221 double pdftemp = 0; 00222 // double sigma_tmp= (*it)->sigma(0); 00223 double testchi[5]; 00224 double testpdf[5]; 00225 for(int i = 0; i < 5; i++) { 00226 /* 00227 m_offset[i] = tof - (*it)->texp(i);//- offsetTofC(i, cntr, ptrk, m_zhit1, m_ph1,charge); 00228 if(sigma_tmp!=0) m_sigma[i] = 1.1*sigma_tmp/1000.; 00229 else 00230 m_sigma[i]=sigmaTofC(i, cntr,ptrk,m_zhitc, m_phc,charge); 00231 m_chi[i] = m_offset[i]/m_sigma[i]; 00232 */ 00233 double sep = tof - (*it)->texp(i)-(*it)->toffset(i); 00234 m_chi[i] = (sep - offsetTofC(i, ptrk, cost))/sigmaTofC(i, ptrk, cost); 00235 m_offset[i] = offsetTofC(i, ptrk, cost); 00236 m_sigma[i] = sigmaTofC(i, ptrk, cost); 00237 testchi[i]=sep; 00238 if(fabs(m_chi[i]) < chitemp) chitemp = fabs(m_chi[i]); 00239 double ppp = pdfCalculate(m_chi[i],1); 00240 testpdf[i]=ppp; 00241 if(fabs(ppp) > pdftemp) pdftemp = fabs(ppp); 00242 } 00243 m_chimin = chitemp; 00244 m_pdfmin = pdftemp; 00245 if(pdftemp < pdfCalculate(pdfMinSigmaCut(),1)) return irc; 00246 if(fabs(m_chimin) > chiMinCut()) return irc; 00247 for(int i = 0; i < 5; i++) { 00248 m_prob[i] = probCalculate(m_chi[i]*m_chi[i], 1); 00249 } 00250 00251 irc = 0; 00252 return irc; 00253 00254 00255 00256 }
double TofCPID::pathc | ( | ) | const [inline] |
double ParticleIDBase::pdfCalculate | ( | double | offset, | |
double | sigma | |||
) | [inherited] |
Definition at line 91 of file ParticleIDBase.cxx.
References exp(), M_PI, pi, and twoPi.
Referenced by TofCorrPID::correlationCheck(), ParticleID::LikelihoodCalculation(), TofPID::particleIDCalculation(), TofEPID::particleIDCalculation(), particleIDCalculation(), TofCorrPID::particleIDCalculation(), Tof2PID::particleIDCalculation(), Tof1PID::particleIDCalculation(), and DedxPID::particleIDCalculation().
00091 { 00092 // const double pi = 3.141592653589793238; 00093 const double pi = M_PI; 00094 const double twoPi = 2*pi; 00095 double chi2 = -0.5*offset*offset/(sigma*sigma); 00096 double pdf = exp(chi2)/(sigma*sqrt(twoPi)); 00097 return pdf; 00098 }
double ParticleIDBase::pdfMinSigmaCut | ( | ) | const [inline, inherited] |
Definition at line 42 of file ParticleIDBase.h.
References ParticleIDBase::m_pdfsigmamin_cut.
Referenced by TofCorrPID::correlationCheck(), ParticleID::LikelihoodCalculation(), TofPID::particleIDCalculation(), particleIDCalculation(), TofCorrPID::particleIDCalculation(), Tof2PID::particleIDCalculation(), Tof1PID::particleIDCalculation(), and DedxPID::particleIDCalculation().
00042 {return m_pdfsigmamin_cut;}
double TofCPID::phc | ( | ) | const [inline] |
EvtRecTrack* ParticleIDBase::PidTrk | ( | ) | const [inline, inherited] |
Definition at line 36 of file ParticleIDBase.h.
References ParticleIDBase::m_trk.
Referenced by TofQPID::particleIDCalculation(), TofPID::particleIDCalculation(), TofEPID::particleIDCalculation(), particleIDCalculation(), TofCorrPID::particleIDCalculation(), Tof2PID::particleIDCalculation(), Tof1PID::particleIDCalculation(), MucPID::particleIDCalculation(), EmcPID::particleIDCalculation(), and DedxPID::particleIDCalculation().
00036 {return m_trk;}
double ParticleIDBase::pol2 | ( | double | x, | |
double * | par | |||
) | [inherited] |
Definition at line 137 of file ParticleIDBase.cxx.
00137 { 00138 double y=x; 00139 // return par[0] + (par[1] * y) +(par[2] * y * y); 00140 return par[0] + y*(par[1] + y*(par[2])); 00141 }
double ParticleIDBase::pol3 | ( | double | x, | |
double * | par | |||
) | [inherited] |
Definition at line 143 of file ParticleIDBase.cxx.
00143 { 00144 double y=x; 00145 // return par[0] + (par[1] * y) +(par[2] * y * y)+(par[3] * y * y*y); 00146 return par[0] + y*(par[1] + y*(par[2] + y*(par[3]))); 00147 }
double ParticleIDBase::pol4 | ( | double | x, | |
double * | par | |||
) | [inherited] |
Definition at line 149 of file ParticleIDBase.cxx.
00149 { 00150 double y=x; 00151 // return par[0] + (par[1] * y) +(par[2] * y * y)+(par[3] * y * y*y) + (par[4] * y * y*y*y); 00152 return par[0] + y*(par[1] + y*(par[2] + y*(par[3] + y*(par[4])))); 00153 }
double TofCPID::prob | ( | int | n | ) | const [inline, virtual] |
Implements ParticleIDBase.
Definition at line 23 of file TofCPID.h.
References m_prob.
00023 {return m_prob[n];}
double ParticleIDBase::probCalculate | ( | double | chi2, | |
int | n | |||
) | [inherited] |
Definition at line 83 of file ParticleIDBase.cxx.
References ParticleIDBase::p().
Referenced by TofPID::particleIDCalculation(), TofEPID::particleIDCalculation(), particleIDCalculation(), TofCorrPID::particleIDCalculation(), Tof2PID::particleIDCalculation(), Tof1PID::particleIDCalculation(), ParticleID::particleIDCalculation(), and DedxPID::particleIDCalculation().
00083 { 00084 double p = -1.0; 00085 if(chi2 < 0) return p; 00086 p = TMath::Prob(chi2, ndof); 00087 return p; 00088 }
double ParticleIDBase::pt | ( | ) | [inherited] |
Definition at line 108 of file ParticleIDBase.cxx.
References EvtRecTrack::isMdcTrackValid(), ParticleIDBase::m_trk, EvtRecTrack::mdcTrack(), and DstMdcTrack::pxy().
00108 { 00109 double val = 999; 00110 if(!m_trk) return val; 00111 if(!m_trk->isMdcTrackValid()) return val; 00112 RecMdcTrack *mdcTrk = m_trk->mdcTrack(); 00113 val = mdcTrk->pxy(); 00114 return val; 00115 }
double TofCPID::sampleQ0 | ( | double | betagamma, | |
double | beta | |||
) | [protected] |
void ParticleIDBase::set_path | ( | std::string | s_path | ) | [inline, inherited] |
Definition at line 105 of file ParticleIDBase.h.
References ParticleIDBase::path.
00105 {path = s_path;}
void ParticleIDBase::set_path | ( | const char * | s_path = 0 |
) | [inherited] |
Definition at line 55 of file ParticleIDBase.cxx.
References ParticleIDBase::path, and deljobs::string.
Referenced by ParticleIDBase::ParticleIDBase().
00056 { 00057 if ( s_path ) { 00058 path = string(s_path); 00059 } else { 00060 char* env_path = getenv("PARTICLEIDROOT"); 00061 if ( !env_path ) { 00062 cout << " ParticleIDBase::set_path ERROR:" 00063 " the environment PARTICLEIDROOT not defined " << endl; 00064 exit(1); 00065 } 00066 path = string(env_path); 00067 } 00068 }
void ParticleIDBase::setChiMaxCut | ( | const double | chi = 6 |
) | [inline, inherited] |
Definition at line 41 of file ParticleIDBase.h.
References ParticleIDBase::chi(), and ParticleIDBase::m_chimax_cut.
Referenced by ParticleID::init().
00041 {m_chimax_cut = chi;}
void ParticleIDBase::setChiMinCut | ( | const double | chi = 4 |
) | [inline, inherited] |
Definition at line 39 of file ParticleIDBase.h.
References ParticleIDBase::chi(), and ParticleIDBase::m_chimin_cut.
Referenced by ParticleID::init(), and TofPID::particleIDCalculation().
00039 {m_chimin_cut = chi;}
void ParticleIDBase::setPdfMinSigmaCut | ( | const double | pdf = 4 |
) | [inline, inherited] |
Definition at line 43 of file ParticleIDBase.h.
References ParticleIDBase::m_pdfsigmamin_cut.
Referenced by TofPID::particleIDCalculation().
00043 {m_pdfsigmamin_cut= pdf;}
void ParticleIDBase::setRecTrack | ( | EvtRecTrack * | trk | ) | [inline, inherited] |
Definition at line 37 of file ParticleIDBase.h.
References ParticleIDBase::m_trk.
Referenced by TofPID::particleIDCalculation().
00037 {m_trk = trk;}
void ParticleIDBase::setRunNo | ( | const double | runh = 8093 |
) | [inline, inherited] |
Definition at line 45 of file ParticleIDBase.h.
References ParticleIDBase::m_runno.
00045 {m_runno = runh;}
double TofCPID::sigma | ( | int | n | ) | const [inline] |
Definition at line 24 of file TofCPID.h.
References m_sigma.
Referenced by sigmaTofC().
00024 {return m_sigma[n];}
double TofCPID::sigmaTofC | ( | int | n, | |
double | ptrk, | |||
double | cost | |||
) | [protected] |
Definition at line 470 of file TofCPID.cxx.
References cos(), ParticleIDBase::getRunNo(), m_endcappara, m_momentpara, m_thetapara, mypol3(), mypol5(), and sigma().
Referenced by particleIDCalculation().
00470 { 00471 int rundedx3 = getRunNo(); 00472 double sigma = 1.0; 00473 double sigmap = 1.0; 00474 double sigmac = 1.0; 00475 // double gb = ptrk/xmass(n); 00476 switch(n) { 00477 00478 case 0: {// Electron 00479 double ptemp = ptrk; 00480 double costm = cost; 00481 if(rundedx3>0) 00482 { if(ptrk < 0.3) ptemp = 0.3; 00483 if(ptrk > 1.3) ptemp = 1.3; 00484 } 00485 else 00486 { if(ptrk < 0.3) ptemp = 0.3; 00487 if(ptrk > 1.3) ptemp = 1.3; 00488 } 00489 00490 double plog = log(ptemp); 00491 double costcos = cos(costm); 00492 00493 sigmap=mypol5(plog,m_momentpara[0][6],m_momentpara[0][7],m_momentpara[0][8],m_momentpara[0][9],m_momentpara[0][10],m_momentpara[0][11]); 00494 00495 if(costm<-0.83) { 00496 sigmac=m_endcappara[0][2]; 00497 } 00498 if(costm>0.83) { 00499 sigmac=m_endcappara[0][3]; 00500 } 00501 if(fabs(costm)<0.83) 00502 { 00503 sigmac=mypol3(costcos,m_thetapara[0][4],m_thetapara[0][5],m_thetapara[0][6],m_thetapara[0][7]); 00504 } 00505 00506 sigma=sigmap*sigmac; 00507 //sigma=sigmac; 00508 break; 00509 } 00510 00511 case 1: {// Muon 00512 double ptemp = ptrk; 00513 double costm = cost; 00514 if(rundedx3>0) 00515 { if(ptrk < 0.3) ptemp = 0.3; 00516 if(ptrk > 1.3) ptemp = 1.3; 00517 } 00518 else 00519 { if(ptrk < 0.3) ptemp = 0.3; 00520 if(ptrk > 1.3) ptemp = 1.3; 00521 } 00522 00523 double plog = log(ptemp); 00524 double costcos = cos(costm); 00525 00526 sigmap=mypol5(plog,m_momentpara[1][6],m_momentpara[1][7],m_momentpara[1][8],m_momentpara[1][9],m_momentpara[1][10],m_momentpara[1][11]); 00527 00528 if(costm<-0.83) { 00529 sigmac=m_endcappara[1][2]; 00530 } 00531 if(costm>0.83) { 00532 sigmac=m_endcappara[1][3]; 00533 } 00534 if(fabs(costm)<0.83) 00535 { 00536 sigmac=mypol3(costcos,m_thetapara[1][4],m_thetapara[1][5],m_thetapara[1][6],m_thetapara[1][7]); 00537 } 00538 00539 00540 sigma=sigmap*sigmac; 00541 //sigma=sigmac; 00542 break; 00543 } 00544 00545 case 2: {// Pion 00546 double ptemp = ptrk; 00547 double costm = cost; 00548 if(rundedx3>0) 00549 { if(ptrk < 0.3) ptemp = 0.3; 00550 if(ptrk > 1.6) ptemp = 1.6; 00551 } 00552 else 00553 { if(ptrk < 0.3) ptemp = 0.3; 00554 if(ptrk > 1.6) ptemp = 1.6; 00555 } 00556 00557 double plog = log(ptemp); 00558 double costcos = cos(costm); 00559 sigmap=mypol5(plog,m_momentpara[2][6],m_momentpara[2][7],m_momentpara[2][8],m_momentpara[2][9],m_momentpara[2][10],m_momentpara[2][11]); 00560 00561 if(costm<-0.83) { 00562 sigmac=m_endcappara[2][2]; 00563 } 00564 if(costm>0.83) { 00565 sigmac=m_endcappara[2][3]; 00566 } 00567 if(fabs(costm)<0.83) 00568 { 00569 sigmac=mypol3(costcos,m_thetapara[2][4],m_thetapara[2][5],m_thetapara[2][6],m_thetapara[2][7]); 00570 } 00571 00572 sigma=sigmap*sigmac; 00573 //sigma=sigmac; 00574 00575 break; 00576 } 00577 00578 case 3: { // Kaon 00579 double ptemp = ptrk; 00580 double costm = cost; 00581 00582 if(rundedx3>0) 00583 { if(ptrk < 0.4) ptemp = 0.4; 00584 if(ptrk > 1.3) ptemp = 1.3; 00585 } 00586 else 00587 { if(ptrk < 0.4) ptemp = 0.4; 00588 if(ptrk > 1.3) ptemp = 1.3; 00589 } 00590 double plog = log(ptemp); 00591 double costcos = cos(costm); 00592 sigmap=mypol5(plog,m_momentpara[3][6],m_momentpara[3][7],m_momentpara[3][8],m_momentpara[3][9],m_momentpara[3][10],m_momentpara[3][11]); 00593 00594 if(costm<-0.83) { 00595 sigmac=m_endcappara[3][2]; 00596 } 00597 if(costm>0.83) { 00598 sigmac=m_endcappara[3][3]; 00599 } 00600 if(fabs(costm)<0.83) 00601 { 00602 sigmac=mypol3(costcos,m_thetapara[3][4],m_thetapara[3][5],m_thetapara[3][6],m_thetapara[3][7]); 00603 } 00604 00605 sigma=sigmap*sigmac; 00606 //sigma=sigmac; 00607 break; 00608 } 00609 00610 00611 case 4: {// Proton 00612 double ptemp = ptrk; 00613 double costm = cost; 00614 if(rundedx3>0) 00615 { if(ptrk < 0.5) ptemp = 0.5; 00616 if(ptrk > 1.3) ptemp = 1.3; 00617 } 00618 else 00619 { if(ptrk < 0.5) ptemp = 0.5; 00620 if(ptrk > 1.3) ptemp = 1.3; 00621 } 00622 double plog = log(ptemp); 00623 double costcos = cos(costm); 00624 sigmap=mypol5(plog,m_momentpara[4][6],m_momentpara[4][7],m_momentpara[4][8],m_momentpara[4][9],m_momentpara[4][10],m_momentpara[4][11]); 00625 00626 if(costm<-0.83) { 00627 sigmac=m_endcappara[4][2]; 00628 } 00629 if(costm>0.83) { 00630 sigmac=m_endcappara[4][3]; 00631 } 00632 if(fabs(costm)<0.83) 00633 { 00634 sigmac=mypol3(costcos,m_thetapara[4][4],m_thetapara[4][5],m_thetapara[4][6],m_thetapara[4][7]); 00635 } 00636 00637 sigma=sigmap*sigmac; 00638 //sigma=sigmac; 00639 break; 00640 } 00641 00642 default: 00643 sigma = 1.0; 00644 break; 00645 } 00646 00647 // sigma =1.0; 00648 return sigma; 00649 }
double TofCPID::tofc | ( | ) | const [inline] |
int ParticleIDBase::tofcorrValid | ( | ) | const [inline, inherited] |
Definition at line 96 of file ParticleIDBase.h.
References ParticleIDBase::TOFCorr_VALID.
00096 {return TOFCorr_VALID;}
int ParticleIDBase::tofcValid | ( | ) | const [inline, inherited] |
Definition at line 95 of file ParticleIDBase.h.
References ParticleIDBase::TOFC_VALID.
00095 {return TOFC_VALID;}
int ParticleIDBase::tofeValid | ( | ) | const [inline, inherited] |
Definition at line 93 of file ParticleIDBase.h.
References ParticleIDBase::TOFE_VALID.
00093 {return TOFE_VALID;}
int ParticleIDBase::tofqValid | ( | ) | const [inline, inherited] |
Definition at line 94 of file ParticleIDBase.h.
References ParticleIDBase::TOFQ_VALID.
00094 {return TOFQ_VALID;}
int ParticleIDBase::tofValid | ( | ) | const [inline, inherited] |
Definition at line 92 of file ParticleIDBase.h.
References ParticleIDBase::TOF_VALID.
00092 {return TOF_VALID;}
int ParticleIDBase::useDedx | ( | ) | const [inline, inherited] |
Definition at line 64 of file ParticleIDBase.h.
References ParticleIDBase::USE_DEDX.
Referenced by ParticleID::IsDedxInfoUsed().
00064 {return USE_DEDX;}
int ParticleIDBase::useEmc | ( | ) | const [inline, inherited] |
Definition at line 72 of file ParticleIDBase.h.
References ParticleIDBase::USE_EMC.
Referenced by ParticleID::IsEmcInfoUsed().
00072 {return USE_EMC;}
int ParticleIDBase::useMuc | ( | ) | const [inline, inherited] |
Definition at line 73 of file ParticleIDBase.h.
References ParticleIDBase::USE_MUC.
Referenced by ParticleID::IsMucInfoUsed().
00073 {return USE_MUC;}
int ParticleIDBase::useTof | ( | ) | const [inline, inherited] |
Definition at line 65 of file ParticleIDBase.h.
References ParticleIDBase::USE_TOF.
Referenced by ParticleID::IsTofInfoUsed().
00065 {return USE_TOF;}
int ParticleIDBase::useTof1 | ( | ) | const [inline, inherited] |
Definition at line 66 of file ParticleIDBase.h.
References ParticleIDBase::USE_TOF1.
Referenced by ParticleID::IsTof1InfoUsed().
00066 {return USE_TOF1;}
int ParticleIDBase::useTof2 | ( | ) | const [inline, inherited] |
Definition at line 67 of file ParticleIDBase.h.
References ParticleIDBase::USE_TOF2.
Referenced by ParticleID::IsTof2InfoUsed().
00067 {return USE_TOF2;}
int ParticleIDBase::useTofC | ( | ) | const [inline, inherited] |
Definition at line 70 of file ParticleIDBase.h.
References ParticleIDBase::USE_TOFC.
Referenced by ParticleID::IsTofCInfoUsed().
00070 {return USE_TOFC;}
int ParticleIDBase::useTofCorr | ( | ) | const [inline, inherited] |
Definition at line 71 of file ParticleIDBase.h.
References ParticleIDBase::USE_TOFCorr.
Referenced by ParticleID::IsTofCorrInfoUsed().
00071 {return USE_TOFCorr;}
int ParticleIDBase::useTofE | ( | ) | const [inline, inherited] |
Definition at line 68 of file ParticleIDBase.h.
References ParticleIDBase::USE_TOFE.
Referenced by ParticleID::IsTofEInfoUsed().
00068 {return USE_TOFE;}
int ParticleIDBase::useTofQ | ( | ) | const [inline, inherited] |
Definition at line 69 of file ParticleIDBase.h.
References ParticleIDBase::USE_TOFQ.
Referenced by ParticleID::IsTofQInfoUsed().
00069 {return USE_TOFQ;}
double ParticleIDBase::velc | ( | ) | [inherited] |
Definition at line 77 of file ParticleIDBase.cxx.
Referenced by TofEPID::particleIDCalculation(), particleIDCalculation(), Tof2PID::particleIDCalculation(), and Tof1PID::particleIDCalculation().
00077 { 00078 // double vel = 29.9792458; // tof_path unit in cm. 00079 double vel = 299.792458; // tof path unit in mm 00080 return vel; 00081 }
double ParticleIDBase::xmass | ( | int | n | ) | [inherited] |
Definition at line 71 of file ParticleIDBase.cxx.
References mass.
Referenced by TofCorrPID::offsetTof(), TofCorrPID::particleIDCalculation(), and TofCorrPID::sigmaTof().
00071 { 00072 double mass[5] = {0.000511, 0.105658, 0.139570,0.493677, 0.938272}; 00073 if(n < 0 || n >=5) return 0.0; 00074 return mass[n]; 00075 }
double TofCPID::zhitc | ( | ) | const [inline] |
double TofCPID::m_chi[5] [private] |
double TofCPID::m_chimin [private] |
double TofCPID::m_endcappara[5][4] [private] |
double TofCPID::m_mass2 [private] |
double TofCPID::m_momentpara[5][12] [private] |
int TofCPID::m_ndof [private] |
Definition at line 56 of file TofCPID.h.
Referenced by calculate(), init(), IsPidInfoValid(), and ndof().
double TofCPID::m_offset[5] [private] |
Definition at line 53 of file TofCPID.h.
Referenced by init(), offset(), and particleIDCalculation().
double TofCPID::m_pars[15] [private] |
double TofCPID::m_pathc [private] |
double TofCPID::m_pdfmin [private] |
double TofCPID::m_phc [private] |
TofCPID * TofCPID::m_pointer = 0 [static, private] |
double TofCPID::m_prob[5] [private] |
int TofCPID::m_readstate [private] |
double TofCPID::m_sigma[5] [private] |
Definition at line 52 of file TofCPID.h.
Referenced by init(), particleIDCalculation(), and sigma().
double TofCPID::m_thetapara[5][8] [private] |
double TofCPID::m_tofc [private] |
double TofCPID::m_zhitc [private] |
std::string ParticleIDBase::path = "" [static, protected, inherited] |
Definition at line 102 of file ParticleIDBase.h.
Referenced by calculate(), EmcPID::EmcPID(), MucPID::init(), DedxPID::inputpar(), TofCorrPID::inputParameter(), MucPID::MucPID(), ParticleIDBase::ParticleIDBase(), TofEPID::particleIDCalculation(), particleIDCalculation(), Tof2PID::particleIDCalculation(), Tof1PID::particleIDCalculation(), and ParticleIDBase::set_path().