TofCorrPID Class Reference

#include <TofCorrPID.h>

Inheritance diagram for TofCorrPID:

ParticleIDBase List of all members.

Public Member Functions

 ~TofCorrPID ()
void init ()
void calculate ()
bool IsPidInfoValid () const
double chi (int n) const
double prob (int n) const
double offset (int n) const
double sigma (int n) const
int ndof () const
int ipmt () const
double dt (int ipar, int ipmt) const
double dtCorr (int ipar, int ipmt) const
double sigCorr (int ipar, int ipmt) const
double chiCorr (int ipar, int ipmt) const
EvtRecTrackPidTrk () 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 TofCorrPIDinstance ()

Protected Member Functions

int particleIDCalculation ()
int neuronPIDCalculation ()
int LikelihoodCalculation ()
void inputParameter (int run)
double offsetTof (unsigned int ispecies, bool barrel, unsigned int ipmt, double betaGamma, int charge, double zrhit, double dt)
double offsetTof (unsigned int ispecies, int tofid, double zrhit, double betaGamma, int charge, double dt)
double offsetTof (unsigned int ispecies, int tofid1, int tofid2, double zrhit1, double zrhit2, double betaGamma, int charge, double dt)
double sigmaTof (unsigned int ispecies, int charge, bool barrel, unsigned int ipmt, int tofid[2], double zrhit[2], double betaGamma)
double sigmaTof (unsigned int ispecies, int charge, bool barrel, unsigned int ipmt, double zrhit, double betaGamma)
double qCurveFunc (unsigned int layer, double betaGamma)
double bSigma (unsigned int end, int tofid, double zrhit)
double bSigma (int tofid[2], double zrhit[2])
double eSigma (int tofid, double zrhit)
bool correlationCheck (unsigned int ipmt)

Static Protected Attributes

static std::string path = ""

Private Member Functions

 TofCorrPID ()

Private Attributes

double m_chi [5]
double m_offset [5]
double m_sigma [5]
double m_prob [5]
double m_chimin
double m_chimax
double m_pdfmin
int m_ndof
int m_ipmt
double m_dt [5][7]
double m_dtCorr [5][7]
double m_sigCorr [5][7]
double m_chiCorr [5][7]
int m_runBegin
int m_runEnd
double m_p_weight [176][3][5]
double m_p_common
double m_ec_sigma [96][3]
double m_q0_bg [3][5]
double m_par_ab [5][2][5]
double m_par_pbar_ab [5][2][5]
double m_par_sigma [4][8][12]
double m_par_sig_mom [3][7][3]
double m_p_offset [2][4][10][20]
double m_p_sigma [2][7][10][20]
double m_p_offset_12 [2][7][20][46]
double m_p_sigma_12 [2][7][20][46]
double m_p_offset_ec12 [2][20][7]
double m_p_sigma_ec12 [2][20][7]
double m_par_ab_12 [2][5][2][2][11]

Static Private Attributes

static TofCorrPIDm_pointer = 0

Detailed Description

Definition at line 14 of file TofCorrPID.h.


Constructor & Destructor Documentation

TofCorrPID::~TofCorrPID (  )  [inline]

Definition at line 19 of file TofCorrPID.h.

00019 {;} 

TofCorrPID::TofCorrPID (  )  [private]

Definition at line 25 of file TofCorrPID.cxx.

References m_runBegin, and m_runEnd.

Referenced by instance().

00025                       :ParticleIDBase() {
00026    m_runBegin = 0;
00027    m_runEnd   = 0;
00028 }


Member Function Documentation

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.

double TofCorrPID::bSigma ( int  tofid[2],
double  zrhit[2] 
) [protected]

Definition at line 937 of file TofCorrPID.cxx.

References bSigma(), m_p_common, and sigma().

00937                                                          {
00938 
00939   double sigma1 = bSigma( 2, tofid[0], zrhit[0] );
00940   double sigma2 = bSigma( 2, tofid[1], zrhit[1] );
00941   double sigmaCorr2  = m_p_common*m_p_common;
00942   double sigma = ( sigma1*sigma1*sigma2*sigma2 - sigmaCorr2*sigmaCorr2 )/( sigma1*sigma1 + sigma2*sigma2 - 2.0*sigmaCorr2 );
00943   sigma = sqrt(fabs(sigma));
00944 
00945   return sigma;
00946 }

double TofCorrPID::bSigma ( unsigned int  end,
int  tofid,
double  zrhit 
) [protected]

Definition at line 919 of file TofCorrPID.cxx.

References genRecEmupikp::i, m_p_weight, and sigma().

Referenced by bSigma(), offsetTof(), and sigmaTof().

00919                                                                      {
00920 
00921   double func[5];
00922   func[0] = 1.0;
00923   func[1] = zrhit;
00924   func[2] = zrhit*zrhit;
00925   func[3] = zrhit*zrhit*zrhit;
00926   func[4] = zrhit*zrhit*zrhit*zrhit;
00927 
00928   double sigma = 0.0;
00929   for( unsigned int i=0; i<5; i++ ) {
00930     sigma += m_p_weight[tofid][end][i]*func[i];
00931   }
00932 
00933   return sigma;
00934 }

void TofCorrPID::calculate (  )  [virtual]

Implements ParticleIDBase.

Definition at line 62 of file TofCorrPID.cxx.

References m_ndof, and particleIDCalculation().

00062                            {
00063   if(particleIDCalculation() == 0) m_ndof=1;
00064 }

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 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 TofCorrPID::chi ( int  n  )  const [inline, virtual]

Implements ParticleIDBase.

Definition at line 24 of file TofCorrPID.h.

References m_chi.

00024 { return m_chi[n];               }

double TofCorrPID::chiCorr ( int  ipar,
int  ipmt 
) const [inline]

Definition at line 34 of file TofCorrPID.h.

References m_chiCorr.

Referenced by ParticleID::chiCorr().

00034 { return m_chiCorr[ipar][ipmt];  }

double ParticleIDBase::chiMaxCut (  )  const [inline, inherited]

Definition at line 40 of file ParticleIDBase.h.

References ParticleIDBase::m_chimax_cut.

Referenced by correlationCheck(), 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 correlationCheck(), TofPID::particleIDCalculation(), TofCPID::particleIDCalculation(), particleIDCalculation(), Tof2PID::particleIDCalculation(), Tof1PID::particleIDCalculation(), ParticleID::particleIDCalculation(), and DedxPID::particleIDCalculation().

00038 {return m_chimin_cut;}

bool TofCorrPID::correlationCheck ( unsigned int  ipmt  )  [protected]

Definition at line 965 of file TofCorrPID.cxx.

References ParticleIDBase::chiMaxCut(), ParticleIDBase::chiMinCut(), genRecEmupikp::i, m_chiCorr, m_pdfmin, ParticleIDBase::pdfCalculate(), and ParticleIDBase::pdfMinSigmaCut().

Referenced by particleIDCalculation().

00965                                                      {
00966   bool chiCut = false;
00967   bool good = false;
00968   double pdftemp = 0;
00969   for( unsigned int i=0; i<5; i++ ) {
00970     if( ( m_chiCorr[i][ipmt]>(0.0-chiMinCut()) && m_chiCorr[i][ipmt]<chiMaxCut() ) && !good ) { good=true; }
00971     double ppp = pdfCalculate(m_chiCorr[i][ipmt],1);
00972     if( fabs(ppp) > pdftemp) { pdftemp = fabs(ppp); }
00973   }
00974   m_pdfmin = pdftemp;
00975   if( pdftemp < pdfCalculate(pdfMinSigmaCut(),1) ) return chiCut;
00976   if( !good ) return chiCut;
00977   chiCut = true;
00978   return chiCut;
00979 }

int ParticleIDBase::dedxValid (  )  const [inline, inherited]

Definition at line 91 of file ParticleIDBase.h.

References ParticleIDBase::DEDX_VALID.

00091 {return DEDX_VALID;}

double TofCorrPID::dt ( int  ipar,
int  ipmt 
) const [inline]

Definition at line 31 of file TofCorrPID.h.

References m_dt.

Referenced by ParticleID::dt(), and particleIDCalculation().

00031 { return m_dt[ipar][ipmt];       }

double TofCorrPID::dtCorr ( int  ipar,
int  ipmt 
) const [inline]

Definition at line 32 of file TofCorrPID.h.

References m_dtCorr.

Referenced by ParticleID::dtCorr().

00032 { return m_dtCorr[ipar][ipmt];   }

int ParticleIDBase::emcValid (  )  const [inline, inherited]

Definition at line 97 of file ParticleIDBase.h.

References ParticleIDBase::EMC_VALID.

00097 {return EMC_VALID;}

double TofCorrPID::eSigma ( int  tofid,
double  zrhit 
) [protected]

Definition at line 949 of file TofCorrPID.cxx.

References genRecEmupikp::i, m_ec_sigma, and sigma().

Referenced by sigmaTof().

00949                                                    {
00950 
00951   double func[5];
00952   func[0] = 1.0;
00953   func[1] = zrhit;
00954   func[2] = zrhit*zrhit;
00955 
00956   double sigma = 0.0;
00957   for( unsigned int i=0; i<3; i++ ) {
00958     sigma += m_ec_sigma[tofid][i]*func[i];
00959   }
00960 
00961   return sigma;
00962 }

double ParticleIDBase::getRunNo (  )  const [inline, inherited]

Definition at line 44 of file ParticleIDBase.h.

References ParticleIDBase::m_runno.

Referenced by TofCPID::calculate(), DedxPID::CorrDedx(), init(), TofCPID::offsetTofC(), sigmaTof(), and TofCPID::sigmaTofC().

00044 {return m_runno;}

void TofCorrPID::init (  )  [virtual]

Implements ParticleIDBase.

Definition at line 30 of file TofCorrPID.cxx.

References abs, ParticleIDBase::getRunNo(), genRecEmupikp::i, inputParameter(), ganga-rec::j, m_chi, m_chiCorr, m_chimax, m_chimin, m_dt, m_dtCorr, m_ipmt, m_ndof, m_offset, m_pdfmin, m_prob, m_runBegin, m_runEnd, m_sigCorr, and m_sigma.

00030                       {
00031 
00032    for(int i = 0; i < 5; i++) {
00033       m_chi[i]    = -100.0;
00034       m_prob[i]   = -1.0;
00035       m_sigma[i]  = 10.0;
00036       m_offset[i] = -1000.0;
00037    }
00038    m_chimin = -99.0;
00039    m_chimax = 99.0;
00040    m_pdfmin = 99.;
00041    m_ndof = 0;
00042 
00043    m_ipmt   = -1;
00044    for( unsigned int i=0; i<5; i++ ) {
00045      for( unsigned int j=0; j<7; j++ ) {
00046        m_dt[i][j]      = -1000.0;
00047        m_dtCorr[i][j]  = -1000.0;
00048        m_sigCorr[i][j] = 10.0;
00049        m_chiCorr[i][j] = 100.0;
00050      }
00051    }
00052 
00053    int run = getRunNo();
00054    if( !( abs(run)>=m_runBegin && abs(run)<=m_runEnd ) ) {
00055      inputParameter( getRunNo() );
00056    }
00057 
00058    return;
00059 }

void TofCorrPID::inputParameter ( int  run  )  [protected]

Definition at line 304 of file TofCorrPID.cxx.

References ipmt(), m_ec_sigma, m_p_common, m_p_offset_12, m_p_offset_ec12, m_p_sigma_12, m_p_sigma_ec12, m_p_weight, m_par_ab_12, m_par_sigma, m_q0_bg, m_runBegin, m_runEnd, ParticleIDBase::path, and deljobs::string.

Referenced by init().

00304                                          {
00305 
00306   std::string filePath = path + "/share/TofCorrPID/";
00307 
00308   filePath = filePath + "jpsi2012";
00309   m_runBegin = 0;
00310   m_runEnd   = 80000;
00311 
00312   if( run>0 ) {
00313     filePath = filePath + "/data/";
00314   }
00315   else {
00316     filePath = filePath + "/mc/";
00317   }
00318 
00319 
00320   // weight from tof calibration
00321   std::string fileWeight = filePath + "calib_barrel_sigma.txt";
00322   ifstream inputWeight( fileWeight.c_str(), std::ios_base::in );
00323   if( !inputWeight ) {
00324     cout << "ParticleID::TofCorrPID: Can NOT open file: " << fileWeight << endl;
00325     exit(1);
00326   }
00327 
00328   for( unsigned int tofid=0; tofid<176; tofid++ ) {
00329     for( unsigned int readout=0; readout<3; readout++ ) {
00330       for( unsigned int p_i=0; p_i<5; p_i++ ) {
00331         inputWeight >> m_p_weight[tofid][readout][p_i];
00332       }
00333     }
00334   }
00335   //  cout << "finish read " << fileWeight << endl;
00336 
00337   // common item, from bunch size and bunch time
00338   std::string fileCommon = filePath + "calib_barrel_common.txt";
00339   ifstream inputCommon( fileCommon.c_str(), std::ios_base::in );
00340   if( !inputCommon ) {
00341     cout << "ParticleID::TofCorrPID: Can NOT open file: " << fileCommon << endl;
00342     exit(1);
00343   }
00344   inputCommon >> m_p_common;
00345   //  cout << "finish read " << fileCommon << endl;
00346 
00347   // endcap sigma
00348   std::string fileEcSigma = filePath + "calib_endcap_sigma.txt";
00349   ifstream inputEcSigma( fileEcSigma.c_str(), std::ios_base::in );
00350   if( !inputEcSigma ) {
00351     cout << "ParticleID::TofCorrPID: Can NOT open file: " << fileEcSigma << endl;
00352     exit(1);
00353   }
00354 
00355   for( unsigned int tofid=0; tofid<96; tofid++ ) {
00356     for( unsigned int p_i=0; p_i<3; p_i++ ) {
00357       inputEcSigma >> m_ec_sigma[tofid][p_i];
00358     }
00359   }
00360   //  cout << "finish read " << fileEcSigma << endl;
00361 
00362   // curve of betaGamma versus Q0
00363   std::string fileQ0BetaGamma = filePath + "curve_Q0_BetaGamma.txt";
00364   ifstream inputQ0BetaGamma( fileQ0BetaGamma.c_str(), std::ios_base::in );
00365   if( !inputQ0BetaGamma ) {
00366     cout << "ParticleID::TofCorrPID: Can NOT open file: " << fileQ0BetaGamma << endl;
00367     exit(1);
00368   }
00369   // barrel layer1 layer2 and endcap
00370   for( unsigned int layer=0; layer<3; layer++ ) {
00371     for( unsigned int ipar=0; ipar<5; ipar++ ) {
00372       inputQ0BetaGamma >> m_q0_bg[layer][ipar];
00373     }
00374   }
00375   //  cout << "finish read " << fileQ0BetaGamma << endl;
00376 
00377   // paramter of A and B
00378   std::string fileParAB = filePath + "parameter_A_B.txt";
00379   ifstream inputParAB( fileParAB.c_str(), std::ios_base::in );
00380   if( !inputParAB ) {
00381     cout << "ParticleID::TofCorrPID: Can NOT open file: " << fileParAB << endl;
00382     exit(1);
00383   }
00384 
00385   // Jpsi2012
00386   // 0: pion/kaon,  1: proton/anti-proton
00387   // 0: inner east, 1: inner west, 2: outer east, 3: outer west, 4: west endcap 
00388   // 0: plus,       1: minus
00389   // 0: parameter A, 1: parameter B
00390   for( unsigned int ispecies=0; ispecies<2; ispecies++ ) {
00391     for( unsigned int ipmt=0; ipmt<5; ipmt++ ) {
00392       for( unsigned int icharge=0; icharge<2; icharge++ ) {
00393         for( unsigned int iab=0; iab<2; iab++ ) {
00394           for( unsigned int ipar=0; ipar<11; ipar++ ) {
00395             inputParAB >> m_par_ab_12[ispecies][ipmt][icharge][iab][ipar];
00396           }
00397         }
00398       }
00399     }
00400   }
00401 
00402   // sigma for pion, kaon and proton
00403   std::string fileSigma = filePath + "parameter_sigma.txt";
00404   ifstream inputSigma( fileSigma.c_str(), std::ios_base::in );
00405   if( !inputSigma ) {
00406     cout << "ParticleID::TofCorrPID: Can NOT open file: " << fileSigma << endl;
00407     exit(1);
00408   }
00409   // Jpsi2009  &  Jpsi2012
00410   // 0: pion,  1: kaon,  2: proton,  3: anti-proton
00411   // 0: inner east, 1: inner west, 2: outer east, 3: outer west
00412   // 4: inner layer, 5: outer layer, 6: double layer
00413   // 7: west endcap
00414   for( unsigned int ispecies=0; ispecies<4; ispecies++ ) {
00415     for( unsigned int ipmt=0; ipmt<8; ipmt++ ) {
00416       for( unsigned int ipar=0; ipar<12; ipar++ ) {
00417         inputSigma >> m_par_sigma[ispecies][ipmt][ipar];
00418       }
00419     }
00420   }
00421 
00422   // offset for low momentum proton and anti-proton
00423   std::string fileProtonOffset = filePath + "parameter_offset_proton.txt";
00424   ifstream inputProtonOffset( fileProtonOffset.c_str(), std::ios_base::in );
00425   if( !inputProtonOffset ) {
00426     cout << "ParticleID::TofCorrPID: Can NOT open file: " << fileProtonOffset << endl;
00427     exit(1);
00428   }
00429 
00430   // Jpsi2012
00431   // 0: proton,  1: anti-proton
00432   // 0: inner east, 1: inner west, 2: outer east, 3: outer west
00433   // 4: inner layer, 5: outer layer, 6: double layer
00434   // 7: west endcap
00435   for( unsigned int ispecies=0; ispecies<2; ispecies++ ) {
00436     for( unsigned int ipmt=0; ipmt<8; ipmt++ ) {
00437       for( unsigned int ipar=0; ipar<20; ipar++ ) {
00438         if( ipmt!=7 ) {
00439           for( unsigned int jpar=0; jpar<46; jpar++ ) {
00440             inputProtonOffset >> m_p_offset_12[ispecies][ipmt][ipar][jpar];
00441           }
00442         }
00443         else {
00444           for( unsigned int jpar=0; jpar<7; jpar++ ) {
00445             inputProtonOffset >> m_p_offset_ec12[ispecies][ipar][jpar];
00446           }
00447         }
00448       }
00449     }
00450   }
00451   //  cout << "finish read " << fileProtonOffset << endl;
00452 
00453   // sigma for low momentum proton and anti-proton
00454   std::string fileProtonSigma = filePath + "parameter_sigma_proton.txt";
00455   ifstream inputProtonSigma( fileProtonSigma.c_str(), std::ios_base::in );
00456   if( !inputProtonSigma ) {
00457     cout << "ParticleID::TofCorrPID: Can NOT open file: " << fileProtonSigma << endl;
00458     exit(1);
00459   }
00460 
00461   // Jpsi2012
00462   // 0: proton,  1: anti-proton
00463   // 0: inner east, 1: inner west, 2: outer east, 3: outer west
00464   // 4: inner layer, 5: outer layer, 6: double layer
00465   // 7: west endcap
00466   for( unsigned int ispecies=0; ispecies<2; ispecies++ ) {
00467     for( unsigned int ipmt=0; ipmt<8; ipmt++ ) {
00468       for( unsigned int ipar=0; ipar<20; ipar++ ) {
00469         if( ipmt!=7 ) {
00470           for( unsigned int jpar=0; jpar<46; jpar++ ) {
00471             inputProtonSigma >> m_p_sigma_12[ispecies][ipmt][ipar][jpar];
00472           }
00473         }
00474         else {
00475           for( unsigned int jpar=0; jpar<7; jpar++ ) {
00476             inputProtonSigma >> m_p_sigma_ec12[ispecies][ipar][jpar];
00477           }
00478         }
00479       }
00480     }
00481   }
00482   //  cout << "finish read " << fileProtonSigma << endl;
00483 
00484   return;
00485 }

TofCorrPID * TofCorrPID::instance (  )  [static]

Definition at line 20 of file TofCorrPID.cxx.

References m_pointer, and TofCorrPID().

Referenced by ParticleID::init().

00020                                   {
00021    if(!m_pointer) m_pointer = new TofCorrPID();
00022    return m_pointer;
00023 }

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 }

int TofCorrPID::ipmt (  )  const [inline]

Definition at line 30 of file TofCorrPID.h.

References m_ipmt.

Referenced by inputParameter(), ParticleID::ipmt(), offsetTof(), and particleIDCalculation().

00030 { return m_ipmt;                 }

bool TofCorrPID::IsPidInfoValid (  )  const [inline, virtual]

Implements ParticleIDBase.

Definition at line 23 of file TofCorrPID.h.

References m_ndof.

00023 { return (m_ndof > 0);           }

int TofCorrPID::LikelihoodCalculation (  )  [inline, protected, virtual]

Implements ParticleIDBase.

Definition at line 40 of file TofCorrPID.h.

00040 {return -1;}

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 TofCorrPID::ndof (  )  const [inline, virtual]

Implements ParticleIDBase.

Definition at line 28 of file TofCorrPID.h.

References m_ndof.

00028 { return m_ndof;                 }

int TofCorrPID::neuronPIDCalculation (  )  [inline, protected]

Definition at line 39 of file TofCorrPID.h.

00039 { return -1;}

double TofCorrPID::offset ( int  n  )  const [inline]

Definition at line 26 of file TofCorrPID.h.

References m_offset.

Referenced by ParticleID::offset(), and particleIDCalculation().

00026 { return m_offset[n];            }

double TofCorrPID::offsetTof ( unsigned int  ispecies,
int  tofid1,
int  tofid2,
double  zrhit1,
double  zrhit2,
double  betaGamma,
int  charge,
double  dt 
) [protected]

Definition at line 678 of file TofCorrPID.cxx.

References bSigma(), m_dtCorr, m_p_common, m_p_offset_12, m_sigma, sigma(), ParticleIDBase::xmass(), zbegin, and zend.

00678                                                                                                                                                    {
00679   if( ispecies==0 || ispecies==1 ) { return dt; }
00680 
00681   double deltaT = -1000.0;
00682   if( tofid1<0 || tofid1>=88 || tofid2<88 || tofid2>=176 ) {
00683     cout << "Particle::TofCorrPID: offsetTof for double layer: the input parameter are NOT correct! Please check them!" << endl;
00684     exit(1);
00685   }
00686 
00687   double sigmaCorr2  = m_p_common*m_p_common;
00688   double sigmaInner  = bSigma( 2, tofid1, zrhit1 );
00689   double sigmaInner2 = sigmaInner*sigmaInner;
00690   double sigmaOuter  = bSigma( 2, tofid2, zrhit2 );
00691   double sigmaOuter2 = sigmaOuter*sigmaOuter;
00692   double sigma = sqrt( (sigmaInner2*sigmaOuter2-sigmaCorr2*sigmaCorr2)/(sigmaInner2+sigmaOuter2-2.0*sigmaCorr2) );
00693 
00694   m_sigma[0] = sigma;
00695   m_sigma[1] = sigma;
00696 
00697   double fraction = ( sigmaOuter2 - sigmaCorr2 )/( sigmaInner2 + sigmaOuter2 - 2.0*sigmaCorr2);
00698   deltaT = fraction*m_dtCorr[ispecies][4] + (1.0-fraction)*m_dtCorr[ispecies][5];
00699 
00700   // Jpsi2012
00701   double tcorr = 0.0;
00702   if( ispecies==4 && betaGamma*xmass(4)<0.8 ) {
00703     int    nzbin  = 46;
00704     double zbegin = -115.0;
00705     double zend   = 115.0;
00706     double zstep  = (zend-zbegin)/nzbin;
00707     
00708     double nbgbin  = 20.0;
00709     double bgbegin = 0.3;
00710     double bgend   = 0.8;
00711     double bgstep;
00712     bgstep = (bgend-bgbegin)/nbgbin;
00713     
00714     int izbin = static_cast<int>((zrhit1-zbegin)/zstep);
00715     if( izbin<0 )           { izbin=0;       }
00716     else if( izbin>=nzbin ) { izbin=nzbin-1; }
00717     int ibgbin = static_cast<int>((betaGamma*xmass(4)-bgbegin)/bgstep);
00718     if( ibgbin<0 )            { ibgbin=0;        }
00719     else if( ibgbin>=nbgbin ) { ibgbin=nbgbin-1; }
00720     
00721     if( charge==1 ) {
00722       tcorr = m_p_offset_12[0][6][ibgbin][izbin];
00723     }
00724     else {
00725       tcorr = m_p_offset_12[1][6][ibgbin][izbin];
00726     }
00727   }
00728   deltaT = deltaT - tcorr;
00729 
00730   return deltaT;
00731 }

double TofCorrPID::offsetTof ( unsigned int  ispecies,
int  tofid,
double  zrhit,
double  betaGamma,
int  charge,
double  dt 
) [protected]

Definition at line 613 of file TofCorrPID.cxx.

References bSigma(), ipmt(), m_dtCorr, m_p_common, m_p_offset_12, ParticleIDBase::xmass(), zbegin, and zend.

00613                                                                                                                       {
00614   if( ispecies==0 || ispecies==1 ) { return dt; }
00615 
00616   double deltaT = -1000.0;
00617   if( tofid<0 || tofid>=176 ) {
00618     cout << "Particle::TofCorrPID: offsetTof for single layer: the input parameter are NOT correct! Please check them!" << endl;
00619     exit(1);
00620   }
00621   int pmt[3] = { -9, -9, -9 };
00622   if( tofid>=0 && tofid<=87 ) {
00623     pmt[0] = 0;
00624     pmt[1] = 1;
00625     pmt[2] = 4;
00626   }
00627   else {
00628     pmt[0] = 2;
00629     pmt[1] = 3;
00630     pmt[2] = 5;
00631   }
00632 
00633   double sigmaCorr2  = m_p_common*m_p_common;
00634   double sigmaLeft   = bSigma( 0, tofid, zrhit );
00635   double sigmaLeft2  = sigmaLeft*sigmaLeft;
00636   double sigmaRight  = bSigma( 1, tofid, zrhit );
00637   double sigmaRight2 = sigmaRight*sigmaRight;
00638 
00639   double fraction = ( sigmaRight2 - sigmaCorr2 )/( sigmaLeft2 + sigmaRight2 - 2.0*sigmaCorr2);
00640   deltaT = fraction*m_dtCorr[ispecies][pmt[0]] + (1.0-fraction)*m_dtCorr[ispecies][pmt[1]];
00641 
00642   // Jpsi2012
00643   double tcorr = 0.0;
00644   unsigned int ipmt = 4;
00645   if( tofid>=88 && tofid<176 ) { ipmt = 5; }
00646   if( ispecies==4 && betaGamma*xmass(4)<0.8 ) {
00647     int    nzbin  = 46;
00648     double zbegin = -115.0;
00649     double zend   = 115.0;
00650     double zstep  = (zend-zbegin)/nzbin;
00651     
00652     double nbgbin  = 20.0;
00653     double bgbegin = 0.3;
00654     double bgend   = 0.8;
00655     double bgstep;
00656     bgstep = (bgend-bgbegin)/nbgbin;
00657     
00658     int izbin = static_cast<int>((zrhit-zbegin)/zstep);
00659     if( izbin<0 )           { izbin=0;       }
00660     else if( izbin>=nzbin ) { izbin=nzbin-1; }
00661     int ibgbin = static_cast<int>((betaGamma*xmass(4)-bgbegin)/bgstep);
00662     if( ibgbin<0 )            { ibgbin=0;        }
00663     else if( ibgbin>=nbgbin ) { ibgbin=nbgbin-1; }
00664     
00665     if( charge==1 ) {
00666       tcorr = m_p_offset_12[0][ipmt][ibgbin][izbin];
00667     }
00668     else {
00669       tcorr = m_p_offset_12[1][ipmt][ibgbin][izbin];
00670     }
00671   }
00672   deltaT = deltaT - tcorr;
00673 
00674   return deltaT;
00675 }

double TofCorrPID::offsetTof ( unsigned int  ispecies,
bool  barrel,
unsigned int  ipmt,
double  betaGamma,
int  charge,
double  zrhit,
double  dt 
) [protected]

Definition at line 488 of file TofCorrPID.cxx.

References abs, genRecEmupikp::i, m_p_offset_12, m_p_offset_ec12, m_par_ab_12, qCurveFunc(), rbegin, rend, ParticleIDBase::xmass(), zbegin, and zend.

Referenced by particleIDCalculation().

00488                                                                                                                                            {
00489   if( ispecies==0 || ispecies==1 ) { return dt; }
00490 
00491   double deltaT = -1000.0;
00492   if( ( ipmt>= 4 && barrel ) || ( ipmt!=7 && ipmt!=8 && !barrel ) || betaGamma<0.0 || abs(charge)!=1 || fabs(zrhit)>120.0 ) {
00493     cout << "Particle::TofCorrPID: offsetTof for single end: the input parameter are NOT correct! Please check them!" << endl;
00494     return deltaT;
00495   }
00496   unsigned int layer=0;
00497   if( barrel ) {
00498     if( ipmt==0 || ipmt==1 ) { layer=0; }
00499     else if( ipmt==2 || ipmt==3 ) { layer=1; }
00500   }
00501   else { layer=2; }
00502   double q0 = qCurveFunc( layer, betaGamma );
00503 
00504   unsigned int inumber=ipmt;
00505   if( !barrel ) { inumber=4; }
00506 
00507   double func[9];
00508   for( unsigned int i=0; i<9; i++ ) {
00509     func[i]=0.0;
00510   }
00511 
00512   double parA = 0.0;
00513   double parB = 0.0;
00514 
00515   // Jpsi2012
00516   func[0] = 1.0;
00517   for( unsigned int i=1; i<8; i++ ) {
00518     func[i] = func[i-1]*zrhit;
00519   }
00520   
00521   unsigned int iparticle=0;
00522   if( ispecies==2 || ispecies==3 ) { iparticle=0; }
00523   else if( ispecies==4 )           { iparticle=1; }
00524   unsigned int icharge=0;
00525   if( charge==1 )       { icharge=0; }
00526   else if( charge==-1 ) { icharge=1; }
00527   
00528   if( ispecies!=4 || betaGamma*xmass(4)>0.8 ) {
00529     for( unsigned int i=0; i<8; i++ ) {
00530       if( i<5 ) {
00531         parA += m_par_ab_12[iparticle][inumber][icharge][0][i]*func[i];
00532         parB += m_par_ab_12[iparticle][inumber][icharge][1][i]*func[i];
00533       }
00534       else if( i>=5 ) {
00535         parA += m_par_ab_12[iparticle][inumber][icharge][0][i+3]*func[i];
00536         parB += m_par_ab_12[iparticle][inumber][icharge][1][i+3]*func[i];
00537       }
00538     }
00539     for( unsigned int iab=0; iab<2; iab++ ) {
00540       func[8] = m_par_ab_12[iparticle][inumber][icharge][iab][5]*TMath::Gaus(zrhit,m_par_ab_12[iparticle][inumber][icharge][iab][6], m_par_ab_12[iparticle][inumber][icharge][iab][7]);
00541       if( iab==0 ) {
00542         parA += func[8];
00543       }
00544       else if( iab==1 ) {
00545         parB += func[8];
00546       }
00547     }  
00548   }
00549 
00550   double tcorr = parA + parB/sqrt(q0);
00551 
00552   // barrel TOF low momentum proton and anti-proton
00553   // Jpsi2012
00554   if( barrel && ispecies==4 && betaGamma*xmass(4)<0.8 ) {
00555     int    nzbin  = 46;
00556     double zbegin = -115.0;
00557     double zend   = 115.0;
00558     double zstep  = (zend-zbegin)/nzbin;
00559     
00560     double nbgbin  = 20.0;
00561     double bgbegin = 0.3;
00562     double bgend   = 0.8;
00563     double bgstep;
00564     bgstep = (bgend-bgbegin)/nbgbin;
00565     
00566     int izbin = static_cast<int>((zrhit-zbegin)/zstep);
00567     if( izbin<0 )           { izbin=0;       }
00568     else if( izbin>=nzbin ) { izbin=nzbin-1; }
00569     int ibgbin = static_cast<int>((betaGamma*xmass(4)-bgbegin)/bgstep);
00570     if( ibgbin<0 )            { ibgbin=0;        }
00571     else if( ibgbin>=nbgbin ) { ibgbin=nbgbin-1; }
00572     
00573     if( charge==1 ) {
00574       tcorr = m_p_offset_12[0][ipmt][ibgbin][izbin];
00575     }
00576     else {
00577       tcorr = m_p_offset_12[1][ipmt][ibgbin][izbin];
00578     }
00579   }
00580   else if( !barrel && ispecies==4 && betaGamma*xmass(4)<0.8 ) {
00581     int    nrbin  = 7;
00582     double rbegin = 55.0;
00583     double rend   = 83.0;
00584     double rstep  = (rend-rbegin)/nrbin;
00585     
00586     double nbgbin  = 20.0;
00587     double bgbegin = 0.3;
00588     double bgend   = 0.8;
00589     double bgstep;
00590     bgstep = (bgend-bgbegin)/nbgbin;
00591     
00592     int irbin = static_cast<int>((zrhit-rbegin)/rstep);
00593     if( irbin<0 )           { irbin=0;       }
00594     else if( irbin>=nrbin ) { irbin=nrbin-1; }
00595     int ibgbin = static_cast<int>((betaGamma*xmass(4)-bgbegin)/bgstep);
00596     if( ibgbin<0 )            { ibgbin=0;        }
00597     else if( ibgbin>=nbgbin ) { ibgbin=nbgbin-1; }
00598     
00599     if( charge==1 ) {
00600       tcorr = m_p_offset_ec12[0][ibgbin][irbin];
00601     }
00602     else {
00603       tcorr = m_p_offset_ec12[1][ibgbin][irbin];
00604     }
00605   }
00606 
00607   deltaT = dt - tcorr;
00608 
00609   return deltaT;
00610 }

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.

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.

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(), 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 TofCorrPID::particleIDCalculation (  )  [protected, virtual]

Implements ParticleIDBase.

Definition at line 67 of file TofCorrPID.cxx.

References DstMdcTrack::charge(), ParticleIDBase::charge(), ParticleIDBase::chiMaxCut(), ParticleIDBase::chiMinCut(), correlationCheck(), counter, dt(), DstMdcKalTrack::electron, EvtRecTrack::extTrack(), genRecEmupikp::i, ipmt(), TofHitStatus::is_barrel(), TofHitStatus::is_cluster(), TofHitStatus::is_counter(), TofHitStatus::is_east(), TofHitStatus::is_mrpc(), TofHitStatus::is_raw(), TofHitStatus::is_readout(), EvtRecTrack::isExtTrackValid(), EvtRecTrack::isMdcKalTrackValid(), EvtRecTrack::isMdcTrackValid(), EvtRecTrack::isTofTrackValid(), DstMdcKalTrack::kaon, TofHitStatus::layer(), m_chi, m_chiCorr, m_chimax, m_chimin, m_dt, m_dtCorr, m_ipmt, m_offset, m_pdfmin, m_prob, m_sigCorr, m_sigma, EvtRecTrack::mdcKalTrack(), EvtRecTrack::mdcTrack(), DstMdcKalTrack::muon, offset(), offsetTof(), ParticleIDBase::p(), DstMdcKalTrack::p4(), ParticleIDBase::pdfCalculate(), ParticleIDBase::pdfMinSigmaCut(), ParticleIDBase::PidTrk(), DstMdcKalTrack::pion, ParticleIDBase::probCalculate(), DstMdcKalTrack::proton, DstMdcKalTrack::setPidType(), TofHitStatus::setStatus(), sigmaTof(), DstExtTrack::tof1Position(), DstExtTrack::tof2Position(), EvtRecTrack::tofTrack(), and ParticleIDBase::xmass().

Referenced by calculate().

00067                                       {
00068    int irc=-1;
00069 
00070    EvtRecTrack* recTrk = PidTrk();
00071    if(!(recTrk->isMdcTrackValid())) return irc;
00072    if(!(recTrk->isMdcKalTrackValid())) return irc;
00073    if(!(recTrk->isExtTrackValid())) return irc;
00074    if(!(recTrk->isTofTrackValid())) return irc;
00075 
00076 #ifndef BEAN
00077    SmartRefVector<RecTofTrack> tofTrk = recTrk->tofTrack();
00078    SmartRefVector<RecTofTrack>::iterator it;
00079 #else
00080    const std::vector<TTofTrack* >& tofTrk = recTrk->tofTrack();
00081    std::vector<TTofTrack* >::const_iterator it;
00082 #endif
00083 
00084    RecMdcTrack* mdcTrk = recTrk->mdcTrack();
00085    int charge = mdcTrk->charge();
00086 
00087    double p[5], betaGamma[5];
00088    RecMdcKalTrack* kalTrk = recTrk->mdcKalTrack();
00089    for( int i=0; i<5; i++ ) {
00090      if( i==0 ) {
00091        kalTrk->setPidType(RecMdcKalTrack::electron);
00092      }
00093      else if( i==1 ) {
00094        kalTrk->setPidType(RecMdcKalTrack::muon);
00095      }
00096      else if( i==2 ) {
00097        kalTrk->setPidType(RecMdcKalTrack::pion);
00098      }
00099      else if( i==3 ) {
00100        kalTrk->setPidType(RecMdcKalTrack::kaon);
00101      }
00102      else if( i==4 ) {
00103        kalTrk->setPidType(RecMdcKalTrack::proton);
00104      }
00105 #ifndef BEAN
00106      HepLorentzVector ptrk = kalTrk->p4();
00107 #else
00108      HepLorentzVector ptrk = kalTrk->p4( xmass(i) );
00109 #endif
00110      p[i] = ptrk.rho();
00111      betaGamma[i] = p[i]/xmass(i);
00112    }
00113 
00114    double zrhit[2];
00115    RecExtTrack* extTrk = recTrk->extTrack();
00116    zrhit[0] = extTrk->tof1Position().z();
00117    zrhit[1] = extTrk->tof2Position().z();
00118 
00119    int tofid[2] = { -9, -9 };
00120 
00121    m_ipmt = -1;
00122    bool readFile = false;
00123    bool signal[2] = { false, false };
00124    TofHitStatus *hitst = new TofHitStatus;
00125    for( it = tofTrk.begin(); it!=tofTrk.end(); it++ ) {
00126      unsigned int st = (*it)->status();
00127      hitst->setStatus(st);
00128      if( hitst->is_raw() ) return irc;  // TOF no hit
00129      bool barrel  = hitst->is_barrel();
00130      bool ismrpc  = hitst->is_mrpc();
00131      if( !barrel && !ismrpc ) { zrhit[0] = extTrk->tof1Position().rho(); }
00132      bool readout = hitst->is_readout();
00133      bool counter = hitst->is_counter();
00134      bool cluster = hitst->is_cluster();
00135      int  layer   = hitst->layer();
00136      tofid[layer-1] = (*it)->tofID();
00137      bool east      = hitst->is_east();
00138      double tof     = (*it)->tof();
00139      unsigned int ipmt = 0;
00140      if( readout ) {
00141        // barrel: 0:inner east, 1:inner west, 2:outer east, 3: outer west
00142        // endcap: 7:east endcap, 8:west endcap
00143        if( barrel ) { ipmt = ( ( st & 0xC0 ) >> 5 ) + ( ( ( st ^ 0x20 ) & 0x20 ) >> 5 ) - 2; }
00144        else {
00145          if( !ismrpc ) {
00146            if( tofid[0]<=47 ) { ipmt = 7; }
00147            else { ipmt = 8; }
00148          }
00149          else {
00150            if( tofid[0]<=35 ) { ipmt = 7; }
00151            else { ipmt = 8; }
00152          }
00153        }
00154 
00155        for( unsigned int i=0; i<5; i++ ) {
00156          double offset = (*it)->toffset(i);
00157          double texp   = (*it)->texp(i);
00158          if( texp<0.0 ) continue;
00159          double dt = tof - offset - texp;
00160          if( barrel ) {
00161            m_dt[i][ipmt]      = dt;
00162            m_dtCorr[i][ipmt]  = offsetTof( i, barrel, ipmt, betaGamma[i], charge, zrhit[layer-1], dt );
00163            m_sigCorr[i][ipmt] = sigmaTof( i, charge, barrel, ipmt, &tofid[0], &zrhit[0], betaGamma[i] );
00164            m_chiCorr[i][ipmt] = m_dtCorr[i][ipmt]/m_sigCorr[i][ipmt];
00165          }
00166          else {
00167            if( !ismrpc ) {
00168              m_dt[i][0]      = dt;
00169              m_dtCorr[i][0]  = offsetTof( i, barrel, ipmt, betaGamma[i], charge, zrhit[layer-1], dt );
00170              m_sigCorr[i][0] = sigmaTof( i, charge, barrel, ipmt, &tofid[0], &zrhit[0], betaGamma[i] );
00171              m_chiCorr[i][0] = m_dtCorr[i][ipmt]/m_sigCorr[i][ipmt];
00172            }
00173            else {
00174              m_dt[i][0]      = dt;
00175              m_dtCorr[i][0]  = dt;
00176              m_sigCorr[i][0] = 0.065;
00177              m_chiCorr[i][0] = m_dtCorr[i][0]/m_sigCorr[i][0];
00178            }
00179          }
00180        }
00181        if( counter && cluster ) {
00182          m_ipmt = ipmt;
00183          for( unsigned int i=0; i<5; i++ ) {
00184            if( ((*it)->texp(i))>0.0 ) {
00185              if( barrel ) {
00186                m_offset[i] = m_dtCorr[i][ipmt];
00187                m_sigma[i]  = m_sigCorr[i][ipmt];
00188              }
00189              else {
00190                m_offset[i] = m_dtCorr[i][0];
00191                m_sigma[i]  = m_sigCorr[i][0];
00192              }
00193            }
00194          }
00195        }
00196      }
00197      else {
00198        if( counter ) {
00199          ipmt = layer+3;
00200          for( unsigned int i=0; i<5; i++ ) {
00201            double offset = (*it)->toffset(i);
00202            double texp   = (*it)->texp(i);
00203            if( texp<0.0 ) continue;
00204            double dt     = tof - offset - texp;
00205            if( barrel ) {
00206              m_dt[i][ipmt]      = dt;
00207              m_dtCorr[i][ipmt]  = offsetTof( i, tofid[layer-1], zrhit[layer-1], betaGamma[i], charge, dt );
00208              m_sigCorr[i][ipmt] = sigmaTof( i, charge, barrel, layer+3, &tofid[0], &zrhit[0], betaGamma[i] );
00209              m_chiCorr[i][ipmt] = m_dtCorr[i][ipmt]/m_sigCorr[i][ipmt];
00210            }
00211            else {
00212              if( ismrpc ) {
00213                m_dt[i][0]      = dt;
00214                m_dtCorr[i][0]  = dt;
00215                m_sigCorr[i][0] = 0.065;
00216                m_chiCorr[i][0] = m_dtCorr[i][0]/m_sigCorr[i][0];
00217              }
00218              else {
00219                cout << "ParticleID: TofCorr::particleIDCalculation: Endcap Scintillator TOF have more than one end!!!" << endl;
00220              }
00221            }
00222          }
00223          if( cluster ) {
00224            m_ipmt = ipmt;
00225            for( unsigned int i=0; i<5; i++ ) {
00226              if( ((*it)->texp(i))>0.0 ) {
00227                if( barrel ) {
00228                  m_offset[i] = m_dtCorr[i][ipmt];
00229                  m_sigma[i]  = m_sigCorr[i][ipmt];
00230                }
00231                else {
00232                  m_offset[i] = m_dtCorr[i][0];
00233                  m_sigma[i]  = m_sigCorr[i][0];
00234                }
00235              }
00236            }
00237          }
00238          else {
00239            signal[layer-1] = correlationCheck( ipmt );
00240          }
00241        }
00242        else {
00243          if( cluster ) {
00244            ipmt = 6;
00245            for( unsigned int i=0; i<5; i++ ) {
00246              double offset = (*it)->toffset(i);
00247              double texp   = (*it)->texp(i);
00248              if( texp<0.0 ) continue;
00249              double dt     = tof - offset - texp;
00250              m_dt[i][ipmt]      = dt;
00251              m_dtCorr[i][ipmt]  = offsetTof( i, tofid[0], tofid[1], zrhit[0], zrhit[1], betaGamma[i], charge, dt );
00252              m_sigCorr[i][ipmt] =  sigmaTof( i, charge, barrel, ipmt, &tofid[0], &zrhit[0], betaGamma[i] );
00253              m_chiCorr[i][ipmt] = m_dtCorr[i][ipmt]/m_sigCorr[i][ipmt];
00254            }
00255            if( signal[0] && signal[1] ) {
00256              m_ipmt = 6;
00257              for( unsigned int i=0; i<5; i++ ) {
00258                m_offset[i] = m_dtCorr[i][ipmt];
00259                m_sigma[i]  = m_sigCorr[i][ipmt];
00260              }
00261            }
00262            else if( signal[0] && !signal[1] ) {
00263              m_ipmt = 4;
00264              for( unsigned int i=0; i<5; i++ ) {
00265                m_offset[i] = m_dtCorr[i][4];
00266                m_sigma[i]  = m_sigCorr[i][4];
00267              }
00268            }
00269            else if( !signal[0] && signal[1] ) {
00270              m_ipmt = 5;
00271              for( unsigned int i=0; i<5; i++ ) {
00272                m_offset[i] = m_dtCorr[i][5];
00273                m_sigma[i]  = m_sigCorr[i][5];
00274              }
00275            }
00276            else return irc;
00277          }
00278        }
00279      }
00280    }
00281 
00282 
00283    double pdftemp = 0;
00284    for( unsigned int i=0; i<5; i++ ) {
00285      m_chi[i] = m_offset[i]/m_sigma[i];
00286      if( m_chi[i]<0. && m_chi[i]>m_chimin ) { m_chimin = m_chi[i]; }
00287      if( m_chi[i]>0. && m_chi[i]<m_chimax ) { m_chimax = m_chi[i]; }
00288      double ppp = pdfCalculate(m_chi[i],1);
00289      if( fabs(ppp) > pdftemp) { pdftemp = fabs(ppp); }
00290    }
00291 
00292    m_pdfmin = pdftemp;
00293    if( pdftemp < pdfCalculate(pdfMinSigmaCut(),1) ) return irc;
00294    if( ( m_chimin > -90.0 && (0-m_chimin)>chiMinCut() ) && ( m_chimax < 90.0 && m_chimax>chiMaxCut() ) ) return irc;
00295    for(int i = 0; i < 5; i++) {
00296       m_prob[i] = probCalculate(m_chi[i]*m_chi[i], 1);
00297    }
00298 
00299    irc = 0;
00300    return irc;
00301 }

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 correlationCheck(), ParticleID::LikelihoodCalculation(), TofPID::particleIDCalculation(), TofEPID::particleIDCalculation(), TofCPID::particleIDCalculation(), 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 correlationCheck(), ParticleID::LikelihoodCalculation(), TofPID::particleIDCalculation(), TofCPID::particleIDCalculation(), 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(), 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 TofCorrPID::prob ( int  n  )  const [inline, virtual]

Implements ParticleIDBase.

Definition at line 25 of file TofCorrPID.h.

References m_prob.

00025 { 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(), 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 TofCorrPID::qCurveFunc ( unsigned int  layer,
double  betaGamma 
) [protected]

Definition at line 904 of file TofCorrPID.cxx.

References m_q0_bg.

Referenced by offsetTof().

00904                                                                     {
00905   double q0 = -100.0;
00906   if( layer>=3 || betaGamma<0.0 ) {
00907     cout << "Particle::TofCorrPID::qCurveFunc: the input parameter are NOT correct! Please check them!" << endl;
00908     return q0;
00909   }
00910 
00911   double beta = betaGamma/sqrt(1.0+betaGamma*betaGamma);
00912   double logterm = log( m_q0_bg[layer][2]+pow((1.0/betaGamma), m_q0_bg[layer][4] ) );
00913   q0 = m_q0_bg[layer][0]*( m_q0_bg[layer][1]-pow( beta, m_q0_bg[layer][3] ) - logterm )/pow( beta, m_q0_bg[layer][3] );
00914 
00915   return q0;
00916 }

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 TofCorrPID::sigCorr ( int  ipar,
int  ipmt 
) const [inline]

Definition at line 33 of file TofCorrPID.h.

References m_sigCorr.

Referenced by ParticleID::sigCorr().

00033 { return m_sigCorr[ipar][ipmt];  }

double TofCorrPID::sigma ( int  n  )  const [inline]

Definition at line 27 of file TofCorrPID.h.

References m_sigma.

Referenced by bSigma(), eSigma(), offsetTof(), ParticleID::sigma(), and sigmaTof().

00027 { return m_sigma[n];             }

double TofCorrPID::sigmaTof ( unsigned int  ispecies,
int  charge,
bool  barrel,
unsigned int  ipmt,
double  zrhit,
double  betaGamma 
) [protected]

Definition at line 777 of file TofCorrPID.cxx.

References ParticleIDBase::getRunNo(), genRecEmupikp::i, m_p_sigma_12, m_p_sigma_ec12, m_par_sigma, sigma(), ParticleIDBase::xmass(), zbegin, and zend.

00777                                                                                                                                {
00778 
00779   int ibgbin = -1;
00780   int izbin = 0;
00781   // Jpsi2012
00782   if( ispecies==4 && (betaGamma*xmass(4))<0.8 ) {
00783     double nbgbin = 20.0;
00784     double bgbegin = 0.3;
00785     double bgend   = 0.8;
00786     double bgstep;
00787     bgstep = (bgend-bgbegin)/nbgbin;
00788     ibgbin = static_cast<int>((betaGamma*xmass(4)-bgbegin)/bgstep);
00789     
00790     if( ibgbin<0 )            { ibgbin=0;        }
00791     else if( ibgbin>=nbgbin ) { ibgbin=nbgbin-1; }
00792     
00793     if( barrel ) {
00794       int    nzbin  = 46;
00795       double zbegin = -115.0;
00796       double zend   = 115.0;
00797       double zstep  = (zend-zbegin)/nzbin;
00798       
00799       izbin = static_cast<int>((zrhit-zbegin)/zstep);
00800       if( izbin<0 )           { izbin=0;       }
00801       else if( izbin>=nzbin ) { izbin=nzbin-1; }
00802     }
00803     else {
00804       int    nzbin  = 7;
00805       double zbegin = 55.0;
00806       double zend   = 83.0;
00807       double zstep  = (zend-zbegin)/nzbin;
00808       
00809       izbin = static_cast<int>((zrhit-zbegin)/zstep);
00810       if( izbin<0 )           { izbin=0;       }
00811       else if( izbin>=nzbin ) { izbin=nzbin-1; }
00812     }
00813   }
00814 
00815   unsigned int numParam = 4;
00816   double func[12];
00817   for( unsigned int i=0; i<4; i++ ) {
00818     if( i==0 ) { func[i] = 1.0; }
00819     else {
00820       func[i] = func[i-1]*zrhit;
00821     }
00822   }
00823   for( unsigned int i=4; i<12; i++ ) {
00824     func[i] = 0.0;
00825   }
00826 
00827   // Jpsi2012
00828   if( barrel ) { // barrel
00829     if( ispecies==2 || ispecies==3 ) { // pion / kaon
00830       for( unsigned int i=4; i<10; i++ ) {
00831         func[i] = func[i-1]*zrhit;
00832       }
00833       func[10] = 1.0/(115.0-zrhit)/(115.0-zrhit);
00834       func[11] = 1.0/(115.0+zrhit)/(115.0+zrhit);
00835       numParam = 12;
00836     }
00837     else if( ispecies==4 ) {  // proton / anti-proton
00838       for( unsigned int i=4; i<12; i++ ) {
00839         func[i] = func[i-1]*zrhit;
00840       }
00841       numParam = 12;
00842     }
00843   }
00844   else { // endcap
00845     numParam = 4;
00846   }
00847 
00848   unsigned int inumber = ipmt;
00849   if( !barrel ) { inumber=7; }
00850 
00851   double sigma = 0.0;
00852   if( ispecies==2 || ispecies==3 ) { // pion / kaon
00853     for( unsigned int i=0; i<numParam; i++ ) {
00854       sigma += m_par_sigma[ispecies-2][inumber][i]*func[i];
00855     }
00856   }
00857   else if( ispecies==4 ) {
00858     if( ibgbin!=-1 ) {
00859       // Jpsi2012
00860       if( barrel ) {
00861         if( charge==1 ) {
00862           sigma = m_p_sigma_12[0][inumber][ibgbin][izbin];
00863         }
00864         else {
00865           sigma = m_p_sigma_12[1][inumber][ibgbin][izbin];
00866         }
00867       }
00868       else {
00869         if( charge==1 ) {
00870           sigma = m_p_sigma_ec12[0][ibgbin][izbin];
00871         }
00872         else {
00873           sigma = m_p_sigma_ec12[1][ibgbin][izbin];
00874         }
00875       }
00876       if( fabs(sigma+999.0)<1.0e-6 ) {
00877         sigma = 0.001;
00878       }
00879     }
00880     else {
00881       for( unsigned int i=0; i<numParam; i++ ) {
00882         if( charge==1 ) {
00883           sigma += m_par_sigma[2][inumber][i]*func[i];
00884         }
00885         else {
00886           sigma += m_par_sigma[3][inumber][i]*func[i];
00887         }
00888       }
00889     }
00890   }
00891 
00892   // Jpsi2012
00893   int run = getRunNo();
00894   if( run>0 ) {
00895     if( ispecies==2 ) {
00896       sigma = sigma*(TMath::Exp((betaGamma-0.356345)/(-0.767124))+0.994072);
00897     }
00898   }
00899 
00900   return sigma;
00901 }

double TofCorrPID::sigmaTof ( unsigned int  ispecies,
int  charge,
bool  barrel,
unsigned int  ipmt,
int  tofid[2],
double  zrhit[2],
double  betaGamma 
) [protected]

Definition at line 734 of file TofCorrPID.cxx.

References bSigma(), eSigma(), and sigma().

Referenced by particleIDCalculation().

00734                                                                                                                                                 {
00735 
00736   double sigma = 1.0e-6;
00737 
00738   if( ispecies==0 || ispecies==1 ) {
00739     if( barrel ) {
00740       if( ipmt==0 ) {
00741         sigma = bSigma( 0, tofid[0], zrhit[0] );
00742       }
00743       else if( ipmt==1 ) {
00744         sigma = bSigma( 1, tofid[0], zrhit[0] );
00745       }
00746       else if( ipmt==2 ) {
00747         sigma = bSigma( 0, tofid[1], zrhit[1] );
00748       }
00749       else if( ipmt==3 ) {
00750         sigma = bSigma( 1, tofid[1], zrhit[1] );
00751       }
00752       else if( ipmt==4 ) {
00753         sigma = bSigma( 2, tofid[0], zrhit[0] );
00754       }
00755       else if( ipmt==5 ) {
00756         sigma = bSigma( 2, tofid[1], zrhit[1] );
00757       }
00758       else if( ipmt==6 ) {
00759         sigma = bSigma( &tofid[0], &zrhit[0] );
00760       }
00761     }
00762     else {
00763       sigma = eSigma( tofid[0], zrhit[0] );
00764     }
00765   }
00766   else {
00767     unsigned int iz = 0;
00768     if( ipmt==2 || ipmt==3 || ipmt==5 ) { iz=1; }
00769 
00770     sigma = sigmaTof( ispecies, charge, barrel, ipmt, zrhit[iz], betaGamma );
00771   }
00772 
00773   return sigma;
00774 }

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(), 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 offsetTof(), particleIDCalculation(), and 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 }


Member Data Documentation

double TofCorrPID::m_chi[5] [private]

Definition at line 57 of file TofCorrPID.h.

Referenced by chi(), init(), and particleIDCalculation().

double TofCorrPID::m_chiCorr[5][7] [private]

Definition at line 66 of file TofCorrPID.h.

Referenced by chiCorr(), correlationCheck(), init(), and particleIDCalculation().

double TofCorrPID::m_chimax [private]

Definition at line 60 of file TofCorrPID.h.

Referenced by init(), and particleIDCalculation().

double TofCorrPID::m_chimin [private]

Definition at line 60 of file TofCorrPID.h.

Referenced by init(), and particleIDCalculation().

double TofCorrPID::m_dt[5][7] [private]

Definition at line 66 of file TofCorrPID.h.

Referenced by dt(), init(), and particleIDCalculation().

double TofCorrPID::m_dtCorr[5][7] [private]

Definition at line 66 of file TofCorrPID.h.

Referenced by dtCorr(), init(), offsetTof(), and particleIDCalculation().

double TofCorrPID::m_ec_sigma[96][3] [private]

Definition at line 70 of file TofCorrPID.h.

Referenced by eSigma(), and inputParameter().

int TofCorrPID::m_ipmt [private]

Definition at line 65 of file TofCorrPID.h.

Referenced by init(), ipmt(), and particleIDCalculation().

int TofCorrPID::m_ndof [private]

Definition at line 62 of file TofCorrPID.h.

Referenced by calculate(), init(), IsPidInfoValid(), and ndof().

double TofCorrPID::m_offset[5] [private]

Definition at line 58 of file TofCorrPID.h.

Referenced by init(), offset(), and particleIDCalculation().

double TofCorrPID::m_p_common [private]

Definition at line 70 of file TofCorrPID.h.

Referenced by bSigma(), inputParameter(), and offsetTof().

double TofCorrPID::m_p_offset[2][4][10][20] [private]

Definition at line 73 of file TofCorrPID.h.

double TofCorrPID::m_p_offset_12[2][7][20][46] [private]

Definition at line 74 of file TofCorrPID.h.

Referenced by inputParameter(), and offsetTof().

double TofCorrPID::m_p_offset_ec12[2][20][7] [private]

Definition at line 75 of file TofCorrPID.h.

Referenced by inputParameter(), and offsetTof().

double TofCorrPID::m_p_sigma[2][7][10][20] [private]

Definition at line 73 of file TofCorrPID.h.

double TofCorrPID::m_p_sigma_12[2][7][20][46] [private]

Definition at line 74 of file TofCorrPID.h.

Referenced by inputParameter(), and sigmaTof().

double TofCorrPID::m_p_sigma_ec12[2][20][7] [private]

Definition at line 75 of file TofCorrPID.h.

Referenced by inputParameter(), and sigmaTof().

double TofCorrPID::m_p_weight[176][3][5] [private]

Definition at line 70 of file TofCorrPID.h.

Referenced by bSigma(), and inputParameter().

double TofCorrPID::m_par_ab[5][2][5] [private]

Definition at line 71 of file TofCorrPID.h.

double TofCorrPID::m_par_ab_12[2][5][2][2][11] [private]

Definition at line 77 of file TofCorrPID.h.

Referenced by inputParameter(), and offsetTof().

double TofCorrPID::m_par_pbar_ab[5][2][5] [private]

Definition at line 71 of file TofCorrPID.h.

double TofCorrPID::m_par_sig_mom[3][7][3] [private]

Definition at line 72 of file TofCorrPID.h.

double TofCorrPID::m_par_sigma[4][8][12] [private]

Definition at line 72 of file TofCorrPID.h.

Referenced by inputParameter(), and sigmaTof().

double TofCorrPID::m_pdfmin [private]

Definition at line 61 of file TofCorrPID.h.

Referenced by correlationCheck(), init(), and particleIDCalculation().

TofCorrPID * TofCorrPID::m_pointer = 0 [static, private]

Definition at line 81 of file TofCorrPID.h.

Referenced by instance().

double TofCorrPID::m_prob[5] [private]

Definition at line 59 of file TofCorrPID.h.

Referenced by init(), particleIDCalculation(), and prob().

double TofCorrPID::m_q0_bg[3][5] [private]

Definition at line 71 of file TofCorrPID.h.

Referenced by inputParameter(), and qCurveFunc().

int TofCorrPID::m_runBegin [private]

Definition at line 69 of file TofCorrPID.h.

Referenced by init(), inputParameter(), and TofCorrPID().

int TofCorrPID::m_runEnd [private]

Definition at line 69 of file TofCorrPID.h.

Referenced by init(), inputParameter(), and TofCorrPID().

double TofCorrPID::m_sigCorr[5][7] [private]

Definition at line 66 of file TofCorrPID.h.

Referenced by init(), particleIDCalculation(), and sigCorr().

double TofCorrPID::m_sigma[5] [private]

Definition at line 58 of file TofCorrPID.h.

Referenced by init(), offsetTof(), particleIDCalculation(), and sigma().

std::string ParticleIDBase::path = "" [static, protected, inherited]

Definition at line 102 of file ParticleIDBase.h.

Referenced by TofCPID::calculate(), EmcPID::EmcPID(), MucPID::init(), DedxPID::inputpar(), inputParameter(), MucPID::MucPID(), ParticleIDBase::ParticleIDBase(), TofEPID::particleIDCalculation(), TofCPID::particleIDCalculation(), Tof2PID::particleIDCalculation(), Tof1PID::particleIDCalculation(), and ParticleIDBase::set_path().


Generated on Tue Nov 29 23:36:04 2016 for BOSS_7.0.2 by  doxygen 1.4.7