#include <MucPID.h>
Inheritance diagram for MucPID:
Public Member Functions | |
void | init () |
void | calculate () |
bool | IsPidInfoValid () const |
double | chi (int n) const |
double | prob (int n) const |
int | ndof () const |
double | hits () const |
double | depth () const |
double | chi2 () const |
double | distance () const |
double | delta_phi () const |
double | val_muc1 () 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 MucPID * | instance () |
Protected Member Functions | |
int | particleIDCalculation () |
int | neuronPIDCalculation () |
int | LikelihoodCalculation () |
Static Protected Attributes | |
static std::string | path = "" |
Private Member Functions | |
MucPID () | |
Private Attributes | |
double | m_chi [5] |
double | m_prob [5] |
double | m_chimin |
int | m_ndof |
double | m_hits |
double | m_depth |
double | m_chi2 |
double | m_distance |
double | m_muc_delta_phi |
double | m_val_muc |
double | params_muc1 [8] |
double | m_p_h [13][400] |
double | m_m_h [13][400] |
TFile * | m_trainFile_muc |
TTree * | m_trainTree_muc |
TMultiLayerPerceptron * | m_mlp_muc |
TMLPAnalyzer * | m_mlpa_muc |
Static Private Attributes | |
static MucPID * | m_pointer = 0 |
Definition at line 20 of file MucPID.h.
MucPID::MucPID | ( | ) | [private] |
Definition at line 28 of file MucPID.cxx.
References genRecEmupikp::i, ganga-rec::j, m_m_h, m_mlp_muc, m_mlpa_muc, m_p_h, m_trainFile_muc, m_trainTree_muc, ParticleIDBase::path, and deljobs::string.
Referenced by instance().
00028 :ParticleIDBase() { 00029 m_trainFile_muc = 0; 00030 m_trainTree_muc = 0; 00031 m_mlp_muc = 0; 00032 m_mlpa_muc = 0; 00033 //std::string pi_muc_file = "$PARTICLEIDROOT/share/pion_muc_hist.txt"; 00034 // std::string pi_muc_file = "/ihepbatch/bes/huangb/boss610/Analysis/ParticleID/ParticleID-00-02-03/share/pion_muc_hist.txt"; 00035 std::string pi_muc_file = path + "/share/pion_muc_hist.txt"; 00036 00037 ifstream input1(pi_muc_file.c_str(),std::ios_base::in); 00038 if ( !input1 ) { 00039 cout << " can not open: " << pi_muc_file << endl; 00040 exit(1); 00041 } 00042 for(int i=0; i<13; i++) { 00043 for(int j=0; j<300; j++) { 00044 input1>>m_p_h[i][j]; 00045 } 00046 } 00047 00048 std::string mu_muc_file = path + "/share/muon_muc_hist.txt"; 00049 //std::string mu_muc_file = "$PARTICLEIDROOT/share/muon_muc_hist.txt"; 00050 // std::string mu_muc_file = "/ihepbatch/bes/huangb/boss610/Analysis/ParticleID/ParticleID-00-02-03/share/muon_muc_hist.txt"; 00051 ifstream input2(mu_muc_file.c_str(),std::ios_base::in); 00052 if ( !input2 ) { 00053 cout << " can not open: " << mu_muc_file << endl; 00054 exit(1); 00055 } 00056 for(int i=0; i<13; i++) { 00057 for(int j=0; j<300; j++) { 00058 input2>>m_m_h[i][j]; 00059 } 00060 } 00061 00062 00063 00064 00065 }
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 MucPID::calculate | ( | ) | [virtual] |
Implements ParticleIDBase.
Definition at line 101 of file MucPID.cxx.
References m_ndof, and particleIDCalculation().
00101 { 00102 if(particleIDCalculation() == 0) m_ndof = 1; 00103 }
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 MucPID::chi | ( | int | n | ) | const [inline, virtual] |
Implements ParticleIDBase.
Definition at line 29 of file MucPID.h.
References m_chi.
00029 {return m_chi[n];}
double MucPID::chi2 | ( | ) | const [inline] |
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(), TofCPID::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;}
double MucPID::delta_phi | ( | ) | const [inline] |
double MucPID::depth | ( | ) | const [inline] |
double MucPID::distance | ( | ) | const [inline] |
Definition at line 35 of file MucPID.h.
References m_distance.
Referenced by init().
00035 {return m_distance;}
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 TofCPID::calculate(), DedxPID::CorrDedx(), TofCorrPID::init(), TofCPID::offsetTofC(), TofCorrPID::sigmaTof(), and TofCPID::sigmaTofC().
00044 {return m_runno;}
double MucPID::hits | ( | ) | const [inline] |
void MucPID::init | ( | ) | [virtual] |
Implements ParticleIDBase.
Definition at line 67 of file MucPID.cxx.
References chi2(), depth(), distance(), hits(), genRecEmupikp::i, m_chi, m_chimin, m_depth, m_hits, m_mlp_muc, m_ndof, m_prob, m_trainTree_muc, m_val_muc, ParticleIDBase::path, deljobs::string, and type.
Referenced by ParticleID::init().
00067 { 00068 for(int i = 0; i < 5; i++) { 00069 m_chi[i] = 99.0; 00070 m_prob[i] = -1.0; 00071 } 00072 m_chimin = 99.; 00073 m_ndof = 0; 00074 m_hits = -99; 00075 m_depth = -999; 00076 m_val_muc=-99; 00077 00078 std::string neural = path + "/share/neural.root"; 00079 std::string muc = path + "/share/muc.txt"; 00080 double ptrk,phi,theta,depth,hits,chi2,distance,muc_delta_phi; 00081 int type; 00082 if(!m_trainTree_muc) { 00083 m_trainTree_muc = new TTree("m_trainTree_muc","m_trainTree_muc"); 00084 m_trainTree_muc->Branch("ptrk",&ptrk,"ptrk/D"); 00085 m_trainTree_muc->Branch("phi",&phi,"phi/D"); 00086 m_trainTree_muc->Branch("theta",&theta,"theta/D"); 00087 m_trainTree_muc->Branch("depth",&depth,"depth/D"); 00088 m_trainTree_muc->Branch("hits",&hits,"hits/D"); 00089 m_trainTree_muc->Branch("chi2",&chi2,"chi2/D"); 00090 m_trainTree_muc->Branch("distance",&distance,"distance/D"); 00091 m_trainTree_muc->Branch("muc_delta_phi",&muc_delta_phi,"muc_delta_phi/D"); 00092 m_trainTree_muc->Branch("type",&type,"type/I"); 00093 } 00094 if(!m_mlp_muc) { 00095 m_mlp_muc = new TMultiLayerPerceptron("@ptrk,@phi,@theta,@depth,@hits,@chi2,@distance,@muc_delta_phi:16:type",m_trainTree_muc); 00096 m_mlp_muc->LoadWeights(muc.c_str()); 00097 } 00098 }
MucPID * MucPID::instance | ( | ) | [static] |
Definition at line 22 of file MucPID.cxx.
References m_pointer, and MucPID().
Referenced by ParticleID::init().
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 MucPID::IsPidInfoValid | ( | ) | const [inline, virtual] |
Implements ParticleIDBase.
Definition at line 28 of file MucPID.h.
References m_ndof.
00028 {return (m_ndof> 0);}
int MucPID::LikelihoodCalculation | ( | ) | [inline, protected, virtual] |
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;}
int MucPID::ndof | ( | ) | const [inline, virtual] |
Implements ParticleIDBase.
Definition at line 31 of file MucPID.h.
References m_ndof.
00031 {return m_ndof;}
int MucPID::neuronPIDCalculation | ( | ) | [inline, protected] |
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 MucPID::particleIDCalculation | ( | ) | [protected, virtual] |
Implements ParticleIDBase.
Definition at line 105 of file MucPID.cxx.
References CALG(), DstMucTrack::chi2(), cos(), DstMucTrack::deltaPhi(), DstMucTrack::depth(), DstMucTrack::distance(), EvtRecTrack::extTrack(), genRecEmupikp::i, EvtRecTrack::isExtTrackValid(), EvtRecTrack::isMdcTrackValid(), EvtRecTrack::isMucTrackValid(), ganga-rec::j, m_chi, m_chi2, m_depth, m_distance, m_hits, m_m_h, m_mlp_muc, m_muc_delta_phi, m_ndof, m_p_h, m_prob, m_pt, m_val_muc, DstMucTrack::maxHitsInLayer(), EvtRecTrack::mdcTrack(), EvtRecTrack::mucTrack(), DstExtTrack::mucVolumeNumber(), DstMdcTrack::p(), params_muc1, DstMdcTrack::phi(), ParticleIDBase::PidTrk(), DstMdcTrack::pxy(), and DstMdcTrack::theta().
Referenced by calculate().
00105 { 00106 int irc = -1; 00107 EvtRecTrack* recTrk = PidTrk(); 00108 if(!(recTrk->isMdcTrackValid())) return irc; 00109 RecMdcTrack* mdcTrk = recTrk->mdcTrack(); 00110 00111 m_depth = -99; 00112 m_hits = -99; 00113 m_chi2 =-99; 00114 m_distance =-99; 00115 m_muc_delta_phi =-99; 00116 00117 double ptrk = mdcTrk->p(); 00118 double m_ptrk = ptrk; 00119 double m_pt = mdcTrk->pxy(); 00120 double phi = mdcTrk->phi(); 00121 double theta = mdcTrk->theta(); 00122 double cost = cos(mdcTrk->theta()); 00123 if(ptrk<0.5) return irc; 00124 if(fabs(cost)>0.83) return irc; 00125 if(!(recTrk->isExtTrackValid())) return irc; 00126 RecExtTrack* extTrk = recTrk->extTrack(); 00127 if(extTrk->mucVolumeNumber() == -1) return irc; 00128 if (!(recTrk->isMucTrackValid())) return irc; 00129 RecMucTrack* mucTrk = recTrk->mucTrack(); 00130 00131 // if(mucTrk->maxHitsInLayer()< 0) return irc; 00132 if(mucTrk->depth()>100000) return irc; 00133 00134 m_hits = mucTrk->maxHitsInLayer(); 00135 m_depth = mucTrk->depth(); 00136 m_distance = mucTrk->distance(); 00137 m_chi2 = mucTrk->chi2(); 00138 /* Hep3Vector phi_muc; 00139 phi_muc.set(mucTrk->xPos(),mucTrk->yPos(),0); 00140 Hep3Vector phi_mdc; 00141 phi_mdc.set(mdcTrk->px(),mdcTrk->py(),0); 00142 m_muc_delta_phi = phi_muc.angle(phi_mdc); 00143 if(m_muc_delta_phi<0) m_muc_delta_phi = -m_muc_delta_phi; */ 00144 m_muc_delta_phi= mucTrk->deltaPhi(); 00145 m_muc_delta_phi=3.14159-m_muc_delta_phi; 00146 theta = cos(theta); 00147 params_muc1[0] = m_ptrk; 00148 params_muc1[1] = phi; 00149 params_muc1[2] = theta; 00150 params_muc1[3] = m_depth; 00151 params_muc1[4] = m_hits; 00152 params_muc1[5] = m_chi2; 00153 params_muc1[6] = m_distance; 00154 params_muc1[7] = m_muc_delta_phi; 00155 00156 m_val_muc = m_mlp_muc->Evaluate(0,params_muc1); 00157 if(m_pt<0) m_pt = -m_pt; 00158 int pindex = int((m_ptrk-0.5)/0.1); 00159 int bindex = int((m_val_muc-0.5)/0.01); 00160 if(bindex>300||bindex<0) return irc; 00161 if(pindex>11) pindex=11; 00162 if(pindex<0) pindex=0; 00163 m_prob[0] = m_p_h[pindex][bindex];; 00164 m_prob[1] = m_m_h[pindex][bindex]; 00165 m_prob[2] = m_p_h[pindex][bindex]; 00166 m_prob[3] = m_p_h[pindex][bindex]; 00167 m_prob[4] = m_p_h[pindex][bindex]; 00168 for(int i =0; i<5; i++) { 00169 if(m_prob[i]==0) m_prob[i] = 0.001; 00170 } 00171 float ppp[5]; 00172 for(int i =0; i<5; i++) { 00173 ppp[i] = 0.0; 00174 } 00175 00176 for(int j=0; j<bindex; j++) { 00177 ppp[1]+= m_m_h[pindex][j]*0.01; 00178 ppp[2]+= m_p_h[pindex][j]*0.01; 00179 } 00180 if(ppp[1]>0&&ppp[1]<1) 00181 CALG(ppp[1],m_chi[1]); 00182 if(ppp[2]>0&&ppp[2]<1) 00183 CALG(ppp[2],m_chi[2]); 00184 if(ppp[1]<=0||ppp[1]>=1) 00185 m_chi[1]=-99; 00186 if(ppp[2]<=0||ppp[2]>=1) 00187 m_chi[2]=-99; 00188 00189 m_chi[3]=m_chi[2]; 00190 m_chi[4]=m_chi[2]; 00191 m_chi[0] =m_chi[2]; 00192 m_ndof = 1; 00193 irc = 0; 00194 return irc; 00195 }
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(), TofCPID::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(), TofCPID::particleIDCalculation(), TofCorrPID::particleIDCalculation(), Tof2PID::particleIDCalculation(), Tof1PID::particleIDCalculation(), and DedxPID::particleIDCalculation().
00042 {return m_pdfsigmamin_cut;}
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(), TofCPID::particleIDCalculation(), TofCorrPID::particleIDCalculation(), Tof2PID::particleIDCalculation(), Tof1PID::particleIDCalculation(), 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 MucPID::prob | ( | int | n | ) | const [inline, virtual] |
Implements ParticleIDBase.
Definition at line 30 of file MucPID.h.
References m_prob.
00030 {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(), TofCPID::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 }
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;}
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 MucPID::val_muc1 | ( | ) | const [inline] |
double ParticleIDBase::velc | ( | ) | [inherited] |
Definition at line 77 of file ParticleIDBase.cxx.
Referenced by TofEPID::particleIDCalculation(), TofCPID::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 MucPID::m_chi[5] [private] |
double MucPID::m_chi2 [private] |
double MucPID::m_chimin [private] |
double MucPID::m_depth [private] |
double MucPID::m_distance [private] |
double MucPID::m_hits [private] |
double MucPID::m_m_h[13][400] [private] |
TMultiLayerPerceptron* MucPID::m_mlp_muc [private] |
Definition at line 66 of file MucPID.h.
Referenced by init(), MucPID(), and particleIDCalculation().
TMLPAnalyzer* MucPID::m_mlpa_muc [private] |
double MucPID::m_muc_delta_phi [private] |
int MucPID::m_ndof [private] |
Definition at line 52 of file MucPID.h.
Referenced by calculate(), init(), IsPidInfoValid(), ndof(), and particleIDCalculation().
double MucPID::m_p_h[13][400] [private] |
MucPID * MucPID::m_pointer = 0 [static, private] |
double MucPID::m_prob[5] [private] |
TFile* MucPID::m_trainFile_muc [private] |
TTree* MucPID::m_trainTree_muc [private] |
double MucPID::m_val_muc [private] |
Definition at line 58 of file MucPID.h.
Referenced by init(), particleIDCalculation(), and val_muc1().
double MucPID::params_muc1[8] [private] |
std::string ParticleIDBase::path = "" [static, protected, inherited] |
Definition at line 102 of file ParticleIDBase.h.
Referenced by TofCPID::calculate(), EmcPID::EmcPID(), init(), DedxPID::inputpar(), TofCorrPID::inputParameter(), MucPID(), ParticleIDBase::ParticleIDBase(), TofEPID::particleIDCalculation(), TofCPID::particleIDCalculation(), Tof2PID::particleIDCalculation(), Tof1PID::particleIDCalculation(), and ParticleIDBase::set_path().