Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TofEPID Class Reference

#include <TofEPID.h>

Inheritance diagram for TofEPID:

ParticleIDBase ParticleIDBase List of all members.

Public Member Functions

int all () const
int all () const
void calculate ()
void calculate ()
double charge ()
double charge ()
double chi (int n) const
double chi (int n) const
double chiMinCut () const
double chiMinCut () const
int dedxValid () const
int dedxValid () const
int emcValid () const
int emcValid () const
double getRunNo () const
double getRunNo () const
void init ()
void init ()
double interpolation (double *x, double *y, double x1)
double interpolation (double *x, double *y, double x1)
bool IsPidInfoValid () const
bool IsPidInfoValid () const
double mass2 () const
double mass2 () const
int methodLikelihood () const
int methodLikelihood () const
int methodNeuronNetwork () const
int methodNeuronNetwork () const
int methodProbability () const
int methodProbability () const
int mucValid () const
int mucValid () const
int ndof () const
int ndof () const
int neuronPID () const
int neuronPID () const
double offset (int n) const
double offset (int n) const
int onlyElectron () const
int onlyElectron () const
int onlyKaon () const
int onlyKaon () const
int onlyMuon () const
int onlyMuon () const
int onlyPion () const
int onlyPion () const
int onlyPionKaon () const
int onlyPionKaon () const
int onlyPionKaonElectron () const
int onlyPionKaonElectron () const
int onlyPionKaonProton () const
int onlyPionKaonProton () const
int onlyProton () const
int onlyProton () const
double p ()
double p ()
int part () const
int part () const
double pdfCalculate (double offset, double sigma)
double pdfCalculate (double offset, double sigma)
double pdfMinSigmaCut () const
double pdfMinSigmaCut () const
EvtRecTrackPidTrk () const
EvtRecTrackPidTrk () const
double pol2 (double x, double *par)
double pol2 (double x, double *par)
double pol3 (double x, double *par)
double pol3 (double x, double *par)
double pol4 (double x, double *par)
double pol4 (double x, double *par)
double prob (int n) const
double prob (int n) const
double probCalculate (double chi2, int n)
double probCalculate (double chi2, int n)
double pt ()
double pt ()
double rhit () const
double rhit () const
void setChiMinCut (const double chi=4)
void setChiMinCut (const double chi=4)
void setPdfMinSigmaCut (const double pdf=4)
void setPdfMinSigmaCut (const double pdf=4)
void setRecTrack (EvtRecTrack *trk)
void setRecTrack (EvtRecTrack *trk)
void setRunNo (const double runh=8093)
void setRunNo (const double runh=8093)
double sigma (int n) const
double sigma (int n) const
int tofcValid () const
int tofcValid () const
int tofeValid () const
int tofeValid () const
int tofqValid () const
int tofqValid () const
int tofValid () const
int tofValid () const
int useDedx () const
int useDedx () const
int useEmc () const
int useEmc () const
int useMuc () const
int useMuc () const
int useTof () const
int useTof () const
int useTof1 () const
int useTof1 () const
int useTof2 () const
int useTof2 () const
int useTofC () const
int useTofC () const
int useTofE () const
int useTofE () const
int useTofQ () const
int useTofQ () const
double velc ()
double velc ()
double xmass (int n)
double xmass (int n)
 ~TofEPID ()
 ~TofEPID ()

Static Public Member Functions

TofEPIDinstance ()
TofEPIDinstance ()

Protected Member Functions

int LikelihoodCalculation ()
int LikelihoodCalculation ()
int neuronPIDCalculation ()
int neuronPIDCalculation ()
double offsetTofE (int n, int cntr, double ptrk, double rtof, double ph, double charge)
double offsetTofE (int n, int cntr, double ptrk, double rtof, double ph, double charge)
int particleIDCalculation ()
int particleIDCalculation ()
double sigmaTofE (int n, int cntr, double ptrk, double rtof, double ph, double charge)
double sigmaTofE (int n, int cntr, double ptrk, double rtof, double ph, double charge)

Private Member Functions

 TofEPID ()
 TofEPID ()

Private Attributes

double m_chi [5]
double m_chimin
double m_mass2
int m_ndof
double m_offset [5]
int m_part
double m_pdfmin
double m_prob [5]
double m_rhit
double m_sigma [5]

Static Private Attributes

TofEPIDm_pointer
TofEPIDm_pointer = 0

Constructor & Destructor Documentation

TofEPID::~TofEPID  )  [inline]
 

00018 {;} 

TofEPID::TofEPID  )  [private]
 

00015                 :ParticleIDBase() {
00016  //readSigPar();
00017 }

TofEPID::~TofEPID  )  [inline]
 

00018 {;} 

TofEPID::TofEPID  )  [private]
 


Member Function Documentation

int ParticleIDBase::all  )  const [inline, inherited]
 

00091 {return (IDENTIFY_ELECTRON | IDENTIFY_PION | IDENTIFY_KAON | IDENTIFY_PROTON);}

int ParticleIDBase::all  )  const [inline, inherited]
 

00091 {return (IDENTIFY_ELECTRON | IDENTIFY_PION | IDENTIFY_KAON | IDENTIFY_PROTON);}

void TofEPID::calculate  )  [virtual]
 

Implements ParticleIDBase.

void TofEPID::calculate  )  [virtual]
 

Implements ParticleIDBase.

00033                         {
00034   if(particleIDCalculation()==0) m_ndof=1;
00035 }

double ParticleIDBase::charge  )  [inherited]
 

double ParticleIDBase::charge  )  [inherited]
 

00077                               {
00078   double val = 999;
00079   if(!m_trk) return val;
00080   if(!m_trk->isMdcTrackValid()) return val;
00081   RecMdcTrack *mdcTrk = m_trk->mdcTrack();
00082   val = mdcTrk->charge() + 0.0;
00083 }

double TofEPID::chi int  n  )  const [inline, virtual]
 

Implements ParticleIDBase.

00023 {return m_chi[n];}

double TofEPID::chi int  n  )  const [inline, virtual]
 

Implements ParticleIDBase.

00023 {return m_chi[n];}

double ParticleIDBase::chiMinCut  )  const [inline, inherited]
 

00052 {return m_chimin_cut;}

double ParticleIDBase::chiMinCut  )  const [inline, inherited]
 

00052 {return m_chimin_cut;}

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

00103 {return DEDX_VALID;}

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

00103 {return DEDX_VALID;}

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

00108 {return EMC_VALID;}

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

00108 {return EMC_VALID;}

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

00056 {return m_runno;}

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

00056 {return m_runno;}

void TofEPID::init  )  [virtual]
 

Implements ParticleIDBase.

void TofEPID::init  )  [virtual]
 

Implements ParticleIDBase.

00019                    {
00020   for(int i = 0; i < 5; i++) {
00021     m_chi[i] = 99.0;
00022     m_prob[i] = -1.0;
00023     m_offset[i] = 99.0;
00024     m_sigma[i] = 1.0;
00025   }
00026   m_chimin = 99.;
00027   m_pdfmin =99.;
00028   m_ndof = 0;
00029   m_mass2 = -999;
00030   m_rhit = -99;
00031 }

TofEPID* TofEPID::instance  )  [static]
 

TofEPID * TofEPID::instance  )  [static]
 

00010                             {
00011   if(!m_pointer) m_pointer = new TofEPID();
00012   return m_pointer;
00013 }

double ParticleIDBase::interpolation double *  x,
double *  y,
double  x1
[inherited]
 

double ParticleIDBase::interpolation double *  x,
double *  y,
double  x1
[inherited]
 

00085                                                                   {
00086   double c1 = (y[0]-y[1])*(x[1]-x[2])-(x[0]-x[1])*(y[1]-y[2]);
00087   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]);
00088   double c = c1/c2;
00089   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]);
00090   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]);
00091   double b = b1/b2;
00092   double a = y[0] - b*x[0]-c*x[0]*x[0];
00093   double y1 = a + b*x1 +c*x1*x1;
00094   return y1;
00095 }

bool TofEPID::IsPidInfoValid  )  const [inline, virtual]
 

Implements ParticleIDBase.

00022 {return (m_ndof > 0); }

bool TofEPID::IsPidInfoValid  )  const [inline, virtual]
 

Implements ParticleIDBase.

00022 {return (m_ndof > 0); }

int TofEPID::LikelihoodCalculation  )  [inline, protected, virtual]
 

Implements ParticleIDBase.

00036 {return -1;}

int TofEPID::LikelihoodCalculation  )  [inline, protected, virtual]
 

Implements ParticleIDBase.

00036 {return -1;}

double TofEPID::mass2  )  const [inline]
 

00028 {return m_mass2;}

double TofEPID::mass2  )  const [inline]
 

00028 {return m_mass2;}

int ParticleIDBase::methodLikelihood  )  const [inline, inherited]
 

00099 {return LIKELIHOOD_PID;}

int ParticleIDBase::methodLikelihood  )  const [inline, inherited]
 

00099 {return LIKELIHOOD_PID;}

int ParticleIDBase::methodNeuronNetwork  )  const [inline, inherited]
 

00101 {return NEURONNETWORK_PID;}

int ParticleIDBase::methodNeuronNetwork  )  const [inline, inherited]
 

00101 {return NEURONNETWORK_PID;}

int ParticleIDBase::methodProbability  )  const [inline, inherited]
 

00100 {return PROBABILITY_PID;}

int ParticleIDBase::methodProbability  )  const [inline, inherited]
 

00100 {return PROBABILITY_PID;}

int ParticleIDBase::mucValid  )  const [inline, inherited]
 

00109 {return MUC_VALID;}

int ParticleIDBase::mucValid  )  const [inline, inherited]
 

00109 {return MUC_VALID;}

int TofEPID::ndof  )  const [inline, virtual]
 

Implements ParticleIDBase.

00027 {return m_ndof;}

int TofEPID::ndof  )  const [inline, virtual]
 

Implements ParticleIDBase.

00027 {return m_ndof;}

int TofEPID::neuronPID  )  const [inline]
 

00031 {return -1;}

int TofEPID::neuronPID  )  const [inline]
 

00031 {return -1;}

int TofEPID::neuronPIDCalculation  )  [inline, protected]
 

00034 { return -1;}

int TofEPID::neuronPIDCalculation  )  [inline, protected]
 

00034 { return -1;}

double TofEPID::offset int  n  )  const [inline]
 

00026 {return m_offset[n];}

double TofEPID::offset int  n  )  const [inline]
 

00026 {return m_offset[n];}

double TofEPID::offsetTofE int  n,
int  cntr,
double  ptrk,
double  rtof,
double  ph,
double  charge
[protected]
 

double TofEPID::offsetTofE int  n,
int  cntr,
double  ptrk,
double  rtof,
double  ph,
double  charge
[protected]
 

00128                                                                                              {
00129   double offset; 
00130   double gb = ptrk/xmass(n);
00131   switch(n) {
00132   case 0: {  // Electron
00133     double ptemp = ptrk;
00134     if(ptrk<0.2) ptemp = 0.2;
00135     if(ptrk > 2.1) ptemp = 2.1;
00136     double plog = log(ptemp);
00137     offset = 0.001*(-28.8481+138.159*plog-249.334*plog*plog);
00138     break;
00139   }
00140 
00141   case 1: { // Muon
00142     double ptemp = ptrk;
00143     if(ptrk<0.2) ptemp = 0.2;
00144     if(ptrk > 2.1) ptemp = 2.1;
00145     double plog = log(ptemp);
00146     offset = 0.001*(-33.6966+1.91915*plog-0.592320*plog*plog);
00147     break;
00148   }
00149 case 2: { // Pion
00150     double ptemp = ptrk;
00151     if(ptrk<0.2) ptemp = 0.2;
00152     if(ptrk > 2.1) ptemp = 2.1;
00153     double plog = log(ptemp);
00154     offset = 0.001*(-27.9965 + 1.213 * plog - 2.02740 * plog * plog);
00155     break;
00156   }
00157   case 3: { // Kaon
00158     double ptemp = ptrk;
00159     if(ptrk<0.3) ptemp = 0.3;
00160     if(ptrk > 2.1) ptemp = 2.1;
00161     double plog = log(ptemp);
00162     offset = 0.001*(-23.4842 -28.7569 * plog + 78.21* plog *plog);
00163     break;
00164   }
00165 
00166   case 4: { // Proton
00167     double ptemp = ptrk;
00168     if(ptrk<0.4) ptemp = 0.4;
00169     if(ptrk > 2.1) ptemp = 2.1;
00170     double plog = log(ptemp);
00171     if(charge>0)
00172     offset = 0.001*(-4.854-110.540*plog+99.8732*plog*plog);
00173    if(charge<0)
00174     offset = 0.001*(27.047-145.120*plog+167.014*plog*plog);
00175     break;
00176   }
00177 
00178   default:
00179     offset = 0.0;
00180     break;
00181   }
00182 //  offset = 0.0;
00183   return offset;
00184 }

int ParticleIDBase::onlyElectron  )  const [inline, inherited]
 

00092 {return IDENTIFY_ELECTRON;}

int ParticleIDBase::onlyElectron  )  const [inline, inherited]
 

00092 {return IDENTIFY_ELECTRON;}

int ParticleIDBase::onlyKaon  )  const [inline, inherited]
 

00095 {return IDENTIFY_KAON;}

int ParticleIDBase::onlyKaon  )  const [inline, inherited]
 

00095 {return IDENTIFY_KAON;}

int ParticleIDBase::onlyMuon  )  const [inline, inherited]
 

00093 {return IDENTIFY_MUON;}

int ParticleIDBase::onlyMuon  )  const [inline, inherited]
 

00093 {return IDENTIFY_MUON;}

int ParticleIDBase::onlyPion  )  const [inline, inherited]
 

00094 {return IDENTIFY_PION;}

int ParticleIDBase::onlyPion  )  const [inline, inherited]
 

00094 {return IDENTIFY_PION;}

int ParticleIDBase::onlyPionKaon  )  const [inline, inherited]
 

00088 {return (IDENTIFY_PION | IDENTIFY_KAON);}

int ParticleIDBase::onlyPionKaon  )  const [inline, inherited]
 

00088 {return (IDENTIFY_PION | IDENTIFY_KAON);}

int ParticleIDBase::onlyPionKaonElectron  )  const [inline, inherited]
 

00090 {return (IDENTIFY_PION | IDENTIFY_KAON | IDENTIFY_ELECTRON);}

int ParticleIDBase::onlyPionKaonElectron  )  const [inline, inherited]
 

00090 {return (IDENTIFY_PION | IDENTIFY_KAON | IDENTIFY_ELECTRON);}

int ParticleIDBase::onlyPionKaonProton  )  const [inline, inherited]
 

00089 {return (IDENTIFY_PION | IDENTIFY_KAON | IDENTIFY_PROTON);}

int ParticleIDBase::onlyPionKaonProton  )  const [inline, inherited]
 

00089 {return (IDENTIFY_PION | IDENTIFY_KAON | IDENTIFY_PROTON);}

int ParticleIDBase::onlyProton  )  const [inline, inherited]
 

00096 {return IDENTIFY_PROTON;}

int ParticleIDBase::onlyProton  )  const [inline, inherited]
 

00096 {return IDENTIFY_PROTON;}

double ParticleIDBase::p  )  [inherited]
 

double ParticleIDBase::p  )  [inherited]
 

00063                          {
00064   double val = 999;
00065   if(!m_trk) return val;
00066   if(!m_trk->isMdcTrackValid()) return val;
00067   RecMdcTrack *mdcTrk = m_trk->mdcTrack();
00068   val = mdcTrk->p();
00069 }

int TofEPID::part  )  const [inline]
 

00029 {return m_part;}

int TofEPID::part  )  const [inline]
 

00029 {return m_part;}

int TofEPID::particleIDCalculation  )  [protected, virtual]
 

Implements ParticleIDBase.

int TofEPID::particleIDCalculation  )  [protected, virtual]
 

Implements ParticleIDBase.

00037                                    {
00038   int irc = -1;
00039   EvtRecTrack* recTrk = PidTrk();
00040   if(!(recTrk->isMdcTrackValid())) return irc;
00041   RecMdcTrack* mdcTrk = recTrk->mdcTrack();
00042 
00043   double ptrk = mdcTrk->p();
00044   double cost = cos(mdcTrk->theta());
00045   double charge = mdcTrk->charge();
00046 
00047   if(!(recTrk->isTofTrackValid())) return irc;
00048   SmartRefVector<RecTofTrack> tofTrk = recTrk->tofTrack();
00049   SmartRefVector<RecTofTrack>::iterator it;//=tofTrk.begin();
00050   TofHitStatus *hitst = new TofHitStatus;
00051   std::vector<int> tofecount;
00052   int goodtofetrk=0;
00053   for(it = tofTrk.begin();it!=tofTrk.end();it++,goodtofetrk++){
00054       unsigned int st = (*it)->status();
00055       hitst->setStatus(st);
00056       if(  (hitst->is_barrel()) ) continue;
00057       if( !(hitst->is_counter()) ) continue;
00058       if( hitst->layer()==1 )  tofecount.push_back(goodtofetrk);
00059    }
00060    delete hitst;
00061   if(tofecount.size()!=1) return irc;//not tof2 track or more than 1 tracks
00062   it = tofTrk.begin()+tofecount[0];
00063                   
00064   
00065   int qual = (*it)->quality();
00066   //  if(qual != 1) return irc;
00067   int cntr = (*it)->tofID();
00068   double tof  = (*it)->tof();
00069   if(tof <=0 ) return irc;
00070   double path = (*it)->path();
00071   double m_ph   = (*it)->ph();
00072   m_rhit = (*it)->zrhit();
00073  // m_part = tofTrk->getPart();
00074   
00075   double beta2 = path*path/velc()/velc()/tof/tof;
00076   m_mass2 = ptrk * ptrk * (1/beta2 -1);
00077 // if ((m_mass2>20)||(m_mass2<-1)) return irc;
00078 
00079 
00080   double chitemp = 99.;
00081   double pdftemp = 0;
00082   for(int i = 0; i < 5; i++) {
00083     double gb = ptrk/xmass(i);
00084     double beta = gb/sqrt(1+gb*gb);
00085     double texp = (*it)->texp(i);
00086  //      path /beta/velc();
00087     m_offset[i] = tof - texp-(*it)->toffset(i);// - offsetTofE(i, cntr, ptrk, m_rhit, m_ph,charge); 
00088     double sigma_tmp= (*it)->sigma(0);
00089    /* if(fabs(sigma_tmp/1000.)>0.3) {
00090         int tofid=(*it)->tofID();
00091  //       sigma_tmp=getSigbyRun(tofid)*0.1;
00092      }*/
00093 
00094   if(sigma_tmp!=0) {
00095        m_sigma[i] = 1.2*sigma_tmp;
00096        if(i<2) m_sigma[i]=sigma_tmp;
00097     }
00098   else m_sigma[i]=0.12;
00099 //    m_chi[i] = m_offset[i]/m_sigma[i];
00100 
00101 //    m_sigma[i]=sigma_tmp;
00102  //   if(i!=0) m_sigma[i] = sigma_tmp*1.1;
00103 //    m_sigma[i] = sigmaTofE(i, cntr,ptrk,m_rhit, m_ph,charge);
00104     m_chi[i] = m_offset[i]/m_sigma[i];
00105     if(fabs(m_chi[i]) < chitemp) chitemp = fabs(m_chi[i]);
00106     double ppp = pdfCalculate(m_chi[i],1); 
00107     if(fabs(ppp) > pdftemp) pdftemp = fabs(ppp);
00108   }
00109   m_chimin = chitemp;
00110  // if(m_chimin > chiMinCut() ) return irc;
00111  // if(pdftemp < pdfCalculate(pdfMinSigmaCut(),1.0)) return irc;
00112 
00113   // calculate prob
00114   
00115   for(int i = 0; i < 5; i++)
00116     m_prob[i] = probCalculate(m_chi[i]*m_chi[i], 1);
00117 
00118   m_ndof = 1;
00119   irc = 0;
00120   return irc;
00121 }

double ParticleIDBase::pdfCalculate double  offset,
double  sigma
[inherited]
 

double ParticleIDBase::pdfCalculate double  offset,
double  sigma
[inherited]
 

00055                                                               {
00056  const double pi =  3.141592653589793238;
00057  const double twoPi = 2*pi;
00058  double chi2 = -0.5*offset*offset/(sigma*sigma);
00059  double pdf = exp(chi2)/(sigma*sqrt(twoPi));
00060   return pdf;
00061 }

double ParticleIDBase::pdfMinSigmaCut  )  const [inline, inherited]
 

00054 {return m_pdfsigmamin_cut;} 

double ParticleIDBase::pdfMinSigmaCut  )  const [inline, inherited]
 

00054 {return m_pdfsigmamin_cut;} 

EvtRecTrack* ParticleIDBase::PidTrk  )  const [inline, inherited]
 

00050 {return m_trk;}

EvtRecTrack* ParticleIDBase::PidTrk  )  const [inline, inherited]
 

00050 {return m_trk;}

double ParticleIDBase::pol2 double  x,
double *  par
[inherited]
 

double ParticleIDBase::pol2 double  x,
double *  par
[inherited]
 

00097                                                 {
00098    double y=x;
00099    return par[0] + (par[1] * y) +(par[2] * y * y);
00100 }

double ParticleIDBase::pol3 double  x,
double *  par
[inherited]
 

double ParticleIDBase::pol3 double  x,
double *  par
[inherited]
 

00102                                                 {
00103    double y=x;
00104    return par[0] + (par[1] * y) +(par[2] * y * y)+(par[3] * y * y*y);
00105 }

double ParticleIDBase::pol4 double  x,
double *  par
[inherited]
 

double ParticleIDBase::pol4 double  x,
double *  par
[inherited]
 

00107                                                 {
00108    double y=x;
00109    return par[0] + (par[1] * y) +(par[2] * y * y)+(par[3] * y * y*y) + (par[4] * y * y*y*y);
00110 }

double TofEPID::prob int  n  )  const [inline, virtual]
 

Implements ParticleIDBase.

00024 {return m_prob[n];}

double TofEPID::prob int  n  )  const [inline, virtual]
 

Implements ParticleIDBase.

00024 {return m_prob[n];}

double ParticleIDBase::probCalculate double  chi2,
int  n
[inherited]
 

double ParticleIDBase::probCalculate double  chi2,
int  n
[inherited]
 

00047                                                           {
00048   double p = -1.0;
00049   if(chi2 < 0) return p;
00050   p = TMath::Prob(chi2, ndof);
00051   return p;
00052 }

double ParticleIDBase::pt  )  [inherited]
 

double ParticleIDBase::pt  )  [inherited]
 

00070                           {
00071   double val = 999;
00072   if(!m_trk) return val;
00073   if(!m_trk->isMdcTrackValid()) return val;
00074   RecMdcTrack *mdcTrk = m_trk->mdcTrack();
00075   val = mdcTrk->pxy();
00076 }

double TofEPID::rhit  )  const [inline]
 

00030 {return m_rhit;}

double TofEPID::rhit  )  const [inline]
 

00030 {return m_rhit;}

void ParticleIDBase::setChiMinCut const double  chi = 4  )  [inline, inherited]
 

00053 {m_chimin_cut = chi;}

void ParticleIDBase::setChiMinCut const double  chi = 4  )  [inline, inherited]
 

00053 {m_chimin_cut = chi;}

void ParticleIDBase::setPdfMinSigmaCut const double  pdf = 4  )  [inline, inherited]
 

00055 {m_pdfsigmamin_cut= pdf;}  

void ParticleIDBase::setPdfMinSigmaCut const double  pdf = 4  )  [inline, inherited]
 

00055 {m_pdfsigmamin_cut= pdf;}  

void ParticleIDBase::setRecTrack EvtRecTrack trk  )  [inline, inherited]
 

00051 {m_trk = trk;} 

void ParticleIDBase::setRecTrack EvtRecTrack trk  )  [inline, inherited]
 

00051 {m_trk = trk;} 

void ParticleIDBase::setRunNo const double  runh = 8093  )  [inline, inherited]
 

00057 {m_runno = runh;}

void ParticleIDBase::setRunNo const double  runh = 8093  )  [inline, inherited]
 

00057 {m_runno = runh;}

double TofEPID::sigma int  n  )  const [inline]
 

00025 {return m_sigma[n];}

double TofEPID::sigma int  n  )  const [inline]
 

00025 {return m_sigma[n];}

double TofEPID::sigmaTofE int  n,
int  cntr,
double  ptrk,
double  rtof,
double  ph,
double  charge
[protected]
 

double TofEPID::sigmaTofE int  n,
int  cntr,
double  ptrk,
double  rtof,
double  ph,
double  charge
[protected]
 

00186                                                                                              {
00187 
00188   double sigma; 
00189   double gb = ptrk/xmass(n);
00190   switch(n) {
00191 
00192   case 0: { // Electron
00193     double ptemp = ptrk;
00194     if(ptrk < 0.2) ptemp = 0.2;
00195     if(ptrk > 2.1) ptemp = 2.1;
00196     double plog = log(ptemp);
00197     sigma = 0.001 * (109.974 +15.2457 * plog + 36.8139 * plog * plog);
00198     
00199     break;
00200   }
00201 
00202   case 1: { // Muon
00203     double ptemp = ptrk;
00204     if(ptrk < 0.2) ptemp = 0.2;
00205     if(ptrk > 2.1) ptemp = 2.1;
00206     double plog = log(ptemp);
00207     sigma = 0.001 * (96.5077 -2.96232 * plog + 3.12910 * plog * plog);
00208     break;
00209   }
00210 
00211   case 2: { // pion
00212     double ptemp = ptrk;
00213     if(ptrk < 0.2) ptemp = 0.2;
00214     if(ptrk > 2.1) ptemp = 2.1;
00215     double plog = log(ptemp);
00216     sigma = 0.001 * (105.447 - 2.08044 * plog + 3.44846 * plog * plog);
00217     break;
00218   }
00219 
00220   case 3: { // Kaon
00221     double ptemp = ptrk;
00222     if(ptrk < 0.3) ptemp = 0.3;
00223     if(ptrk > 2.1) ptemp = 2.1;
00224     double plog = log(ptemp);
00225     sigma = 0.001*(88.8806 - 26.8464 * plog + 113.672 * plog * plog);
00226     break;
00227   }
00228   case 4: { // Proton
00229   double ptemp = ptrk;
00230     if(ptrk < 0.5) ptemp = 0.5;
00231     if(ptrk > 2.1) ptemp = 2.1;
00232     double plog = log(ptemp);
00233     if(charge>0)
00234     sigma = 0.001 * (96.3534 -44.1139 * plog + 53.9805 * plog * plog);
00235     if(charge<0)
00236     sigma = 0.001 * (157.345 -98.7357 * plog + 55.1145 * plog * plog);
00237     break;
00238   }
00239 
00240   default:
00241     sigma = 0.100;
00242 
00243     break;
00244   }
00245  // sigma =1;
00246   return sigma;
00247 }

int ParticleIDBase::tofcValid  )  const [inline, inherited]
 

00107 {return TOFC_VALID;}

int ParticleIDBase::tofcValid  )  const [inline, inherited]
 

00107 {return TOFC_VALID;}

int ParticleIDBase::tofeValid  )  const [inline, inherited]
 

00105 {return TOFE_VALID;}

int ParticleIDBase::tofeValid  )  const [inline, inherited]
 

00105 {return TOFE_VALID;}

int ParticleIDBase::tofqValid  )  const [inline, inherited]
 

00106 {return TOFQ_VALID;}

int ParticleIDBase::tofqValid  )  const [inline, inherited]
 

00106 {return TOFQ_VALID;}

int ParticleIDBase::tofValid  )  const [inline, inherited]
 

00104 {return TOF_VALID;}

int ParticleIDBase::tofValid  )  const [inline, inherited]
 

00104 {return TOF_VALID;}

int ParticleIDBase::useDedx  )  const [inline, inherited]
 

00077 {return USE_DEDX;}

int ParticleIDBase::useDedx  )  const [inline, inherited]
 

00077 {return USE_DEDX;}

int ParticleIDBase::useEmc  )  const [inline, inherited]
 

00084 {return USE_EMC;}

int ParticleIDBase::useEmc  )  const [inline, inherited]
 

00084 {return USE_EMC;}

int ParticleIDBase::useMuc  )  const [inline, inherited]
 

00085 {return USE_MUC;}

int ParticleIDBase::useMuc  )  const [inline, inherited]
 

00085 {return USE_MUC;}

int ParticleIDBase::useTof  )  const [inline, inherited]
 

00078 {return USE_TOF;}

int ParticleIDBase::useTof  )  const [inline, inherited]
 

00078 {return USE_TOF;}

int ParticleIDBase::useTof1  )  const [inline, inherited]
 

00079 {return USE_TOF1;}

int ParticleIDBase::useTof1  )  const [inline, inherited]
 

00079 {return USE_TOF1;}

int ParticleIDBase::useTof2  )  const [inline, inherited]
 

00080 {return USE_TOF2;}

int ParticleIDBase::useTof2  )  const [inline, inherited]
 

00080 {return USE_TOF2;}

int ParticleIDBase::useTofC  )  const [inline, inherited]
 

00083 {return USE_TOFC;}

int ParticleIDBase::useTofC  )  const [inline, inherited]
 

00083 {return USE_TOFC;}

int ParticleIDBase::useTofE  )  const [inline, inherited]
 

00081 {return USE_TOFE;}

int ParticleIDBase::useTofE  )  const [inline, inherited]
 

00081 {return USE_TOFE;}

int ParticleIDBase::useTofQ  )  const [inline, inherited]
 

00082 {return USE_TOFQ;}

int ParticleIDBase::useTofQ  )  const [inline, inherited]
 

00082 {return USE_TOFQ;}

double ParticleIDBase::velc  )  [inherited]
 

double ParticleIDBase::velc  )  [inherited]
 

00041                             {
00042   //  double vel = 29.9792458;  // tof_path unit in cm.
00043   double vel = 299.792458;   // tof path unit in mm
00044   return vel;
00045 }

double ParticleIDBase::xmass int  n  )  [inherited]
 

double ParticleIDBase::xmass int  n  )  [inherited]
 

00035                                   {
00036   double mass[5] = {0.000511, 0.105658, 0.139570,0.493677, 0.938272};
00037   if(n < 0 || n >=5) return 0.0;
00038   return mass[n];
00039 }


Member Data Documentation

double TofEPID::m_chi [private]
 

double TofEPID::m_chimin [private]
 

double TofEPID::m_mass2 [private]
 

int TofEPID::m_ndof [private]
 

double TofEPID::m_offset [private]
 

int TofEPID::m_part [private]
 

double TofEPID::m_pdfmin [private]
 

TofEPID* TofEPID::m_pointer [static, private]
 

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

double TofEPID::m_prob [private]
 

double TofEPID::m_rhit [private]
 

double TofEPID::m_sigma [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 18:58:42 2011 for BOSS6.5.5 by  doxygen 1.3.9.1