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

Tof2PID Class Reference

#include <Tof2PID.h>

Inheritance diagram for Tof2PID:

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 ()
double path2 () const
double path2 () const
double pdfCalculate (double offset, double sigma)
double pdfCalculate (double offset, double sigma)
double pdfMinSigmaCut () const
double pdfMinSigmaCut () const
double ph2 () const
double ph2 () 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 ()
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
double tof2 () const
double tof2 () 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)
double zhit2 () const
double zhit2 () const
 ~Tof2PID ()
 ~Tof2PID ()

Static Public Member Functions

Tof2PIDinstance ()
Tof2PIDinstance ()

Protected Member Functions

int LikelihoodCalculation ()
int LikelihoodCalculation ()
int neuronPIDCalculation ()
int neuronPIDCalculation ()
double offsetTof2 (int n, int cntr, double ptrk, double ztof, double m_ph2, double charge)
double offsetTof2 (int n, int cntr, double ptrk, double ztof, double m_ph2, double charge)
int particleIDCalculation ()
int particleIDCalculation ()
double sampleQ0 (double betagamma, double beta)
double sampleQ0 (double betagamma, double beta)
double sigmaTof2 (int n, int cntr, double ptrk, double ztof, double m_ph2, double charge)
double sigmaTof2 (int n, int cntr, double ptrk, double ztof, double m_ph2, double charge)

Private Member Functions

 Tof2PID ()
 Tof2PID ()

Private Attributes

double m_chi [5]
double m_chimin
double m_mass2
int m_ndof
double m_offset [5]
double m_pars [15]
double m_path2
double m_pdfmin
double m_ph2
double m_prob [5]
double m_sigma [5]
double m_tof2
double m_zhit2

Static Private Attributes

Tof2PIDm_pointer
Tof2PIDm_pointer = 0

Constructor & Destructor Documentation

Tof2PID::~Tof2PID  )  [inline]
 

00019 {;} 

Tof2PID::Tof2PID  )  [private]
 

00016                 :ParticleIDBase() {
00017   m_pars[0]=-0.237207;
00018   m_pars[1]= 1.90436;
00019     m_pars[2]= -0.210625;
00020     m_pars[3]= 0.664667;
00021     m_pars[4]= 0.00165226;
00022     m_pars[5]= -1.86503e-06;
00023     m_pars[6]= 6.07045e-10;
00024     m_pars[7]=-0.0882228;
00025     m_pars[8]= 0.0125708;
00026     m_pars[9]= -0.117157;
00027     m_pars[10]= 0.00252878;
00028     m_pars[11]= 0.254343;
00029     m_pars[12]= -5.74886;
00030     m_pars[13]= 5.20507;
00031     m_pars[14]= 1.86515;
00032                                                                     
00033 }

Tof2PID::~Tof2PID  )  [inline]
 

00019 {;} 

Tof2PID::Tof2PID  )  [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 Tof2PID::calculate  )  [virtual]
 

Implements ParticleIDBase.

void Tof2PID::calculate  )  [virtual]
 

Implements ParticleIDBase.

00051                         {
00052   if(particleIDCalculation() == 0) m_ndof=1;
00053 }

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

Implements ParticleIDBase.

00024 {return m_chi[n];}

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

Implements ParticleIDBase.

00024 {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 Tof2PID::init  )  [virtual]
 

Implements ParticleIDBase.

void Tof2PID::init  )  [virtual]
 

Implements ParticleIDBase.

00035                    {
00036   
00037   for(int i = 0; i < 5; i++) {
00038     m_chi[i] = 99.0;
00039     m_prob[i] = -1.0;
00040     m_sigma[i] = 1.0;
00041     m_offset[i] =99.0;
00042   }
00043   m_chimin = 99.;
00044   m_pdfmin =99.;
00045   m_ndof = 0;
00046   m_mass2 = -999;
00047   m_ph2 = -99;
00048   m_zhit2 = -99;
00049 }

Tof2PID* Tof2PID::instance  )  [static]
 

Tof2PID * Tof2PID::instance  )  [static]
 

00010                             {
00011   if(!m_pointer) m_pointer = new Tof2PID();
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 Tof2PID::IsPidInfoValid  )  const [inline, virtual]
 

Implements ParticleIDBase.

00023 {return (m_ndof > 0); }

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

Implements ParticleIDBase.

00023 {return (m_ndof > 0); }

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

Implements ParticleIDBase.

00039 {return -1;}

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

Implements ParticleIDBase.

00039 {return -1;}

double Tof2PID::mass2  )  const [inline]
 

00029 {return m_mass2;}

double Tof2PID::mass2  )  const [inline]
 

00029 {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 Tof2PID::ndof  )  const [inline, virtual]
 

Implements ParticleIDBase.

00028 {return m_ndof;}

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

Implements ParticleIDBase.

00028 {return m_ndof;}

int Tof2PID::neuronPID  )  const [inline]
 

00034 {return -1;}

int Tof2PID::neuronPID  )  const [inline]
 

00034 {return -1;}

int Tof2PID::neuronPIDCalculation  )  [inline, protected]
 

00038 {return -1;}

int Tof2PID::neuronPIDCalculation  )  [inline, protected]
 

00038 {return -1;}

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

00026 {return m_offset[n];}

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

00026 {return m_offset[n];}

double Tof2PID::offsetTof2 int  n,
int  cntr,
double  ptrk,
double  ztof,
double  m_ph2,
double  charge
[protected]
 

double Tof2PID::offsetTof2 int  n,
int  cntr,
double  ptrk,
double  ztof,
double  m_ph2,
double  charge
[protected]
 

00139                                                                                           {
00140   double offset;
00141   double gb = ptrk/xmass(n);
00142   double betagamma;
00143    switch(n) {
00144 
00145    case 0: {  // Electron
00146      offset = 0.0;
00147            return offset;
00148            }
00149 
00150    case 1: { // Muon
00151     offset = 0.0;
00152           return offset;
00153            }
00154 
00155    case 2: { // Pion
00156      betagamma=ptrk/139.57;
00157      break;
00158       }
00159    case 3: { // Kaon
00160       betagamma=ptrk/493.68;
00161       break;
00162         }
00163 
00164     case 4: { // Proton
00165             betagamma=ptrk/938.27;
00166        break;
00167            }
00168 
00169    default:{
00170       offset = 0.0;
00171       return offset;}
00172         break;
00173    }
00174     z=z/1000.0;
00175     double Q = ph;
00176     double beta = betagamma / TMath::Sqrt(1 + betagamma*betagamma);
00177     double Q0 = sampleQ0(betagamma,beta);
00178     double func[15]={0.};
00179     func[0]=1.;func[1]=1./sqrt(Q);func[2]=z/sqrt(Q);
00180     func[3]=z*z/sqrt(Q);func[4]=Q;func[5]=Q*Q;
00181     func[6]=Q*Q*Q;func[7]=1./(0.89*0.89+z*z);func[8]=z;
00182     func[9]=z*z;func[10]=z*z*z;func[11]=1./sqrt(Q0);
00183     func[12]=z/sqrt(Q0);func[13]=z*z/sqrt(Q0);func[14]=z*z*z/sqrt(Q0);
00184     offset=0.;
00185     for(int i=0;i<15;i++){
00186       offset+= m_pars[i]*func[i];
00187                   }
00188         
00189     return offset;
00190 }

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

Implements ParticleIDBase.

int Tof2PID::particleIDCalculation  )  [protected, virtual]
 

Implements ParticleIDBase.

00055                                    {
00056   int irc = -1;
00057   EvtRecTrack* recTrk = PidTrk();
00058   if(!(recTrk->isMdcTrackValid())) return irc;
00059   RecMdcTrack* mdcTrk = recTrk->mdcTrack();
00060   
00061   double ptrk = mdcTrk->p();
00062   double cost = cos(mdcTrk->theta());
00063   double charge = mdcTrk->charge();
00064 
00065   if(!(recTrk->isTofTrackValid())) return irc;
00066    SmartRefVector<RecTofTrack> tofTrk = recTrk->tofTrack();
00067    SmartRefVector<RecTofTrack>::iterator it;//=tofTrk.begin();
00068    TofHitStatus *hitst = new TofHitStatus;
00069    std::vector<int> tof2count;
00070    int goodtof2trk=0;
00071    for(it = tofTrk.begin();it!=tofTrk.end();it++,goodtof2trk++){     
00072      unsigned int st = (*it)->status();
00073      hitst->setStatus(st);
00074           
00075      if( !(hitst->is_barrel()) ) continue;
00076      if( !(hitst->is_counter()) ) continue;
00077      if( hitst->layer()==2 ) tof2count.push_back(goodtof2trk);
00078     }
00079    delete hitst;
00080    
00081    if(tof2count.size()!=1) return irc;//not tof2 track or more than 1 tracks
00082   it = tofTrk.begin()+tof2count[0];
00083    double tof  = (*it)->tof();
00084   m_tof2 = tof;
00085   
00086   if(tof <=0 ) return irc;
00087   int qual = (*it)->quality();
00088  //  if(qual != 1) return irc;
00089   int cntr = (*it)->tofID();
00090   double path = ((*it)->path())*10.0;//the unit from mm to cm 
00091   
00092   m_path2 = path;   
00093 //   m_path2 = path; 
00094  // fix the bugs the 6.0.0, He K.L.
00095  // double path = tofTrk->getPath1();
00096   // 
00097   m_ph2   = (*it)->ph();
00098   m_zhit2 = ((*it)->zrhit())*10; //the unit from mm to cm
00099   
00100   double beta2 = path*path/velc()/velc()/tof/tof;
00101   m_mass2 = ptrk * ptrk * (1/beta2 -1);
00102  if ((m_mass2>20)||(m_mass2<-1)) return irc;
00103 
00104   double chitemp = 99.;
00105   double pdftemp = 0;
00106   double sig_tmp = (*it)->sigma(0);
00107   for(int i = 0; i < 5; i++) {
00108     m_offset[i] = tof - (*it)->texp(i)-(*it)->toffset(i);//- offsetTof1(i, cntr, ptrk, m_zhit1, m_ph1,charge); 
00109     if(sig_tmp!=0)  {
00110        m_sigma[i] = 1.2*sig_tmp;
00111        if(i<2) m_sigma[i]=sig_tmp;
00112     }
00113     else m_sigma[i]= sigmaTof2(i, cntr,ptrk,m_zhit2, m_ph2,charge);
00114     m_chi[i] = m_offset[i]/m_sigma[i];
00115     if(fabs(m_chi[i]) < chitemp) chitemp = fabs(m_chi[i]);
00116     double ppp = pdfCalculate(m_chi[i],1);
00117     if(fabs(ppp) > pdftemp) pdftemp = fabs(ppp);
00118   }
00119 //  if(ptrk<0.65) m_chi[2]=m_chi[3];
00120   m_chimin = chitemp;
00121   m_pdfmin = pdftemp;
00122   if(pdftemp < pdfCalculate(pdfMinSigmaCut(),1)) return irc;
00123   if(fabs(m_chimin) > chiMinCut()) return irc;
00124 
00125   // calculate prob
00126   
00127   for(int i = 0; i < 5; i++){
00128     m_prob[i] = probCalculate(m_chi[i]*m_chi[i], 1);
00129   }
00130   irc = 0;
00131   return irc;
00132 }

double Tof2PID::path2  )  const [inline]
 

00032 {return m_path2;}

double Tof2PID::path2  )  const [inline]
 

00032 {return m_path2;}

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;} 

double Tof2PID::ph2  )  const [inline]
 

00030 {return m_ph2;}

double Tof2PID::ph2  )  const [inline]
 

00030 {return m_ph2;}

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 Tof2PID::prob int  n  )  const [inline, virtual]
 

Implements ParticleIDBase.

00027 {return m_prob[n];}

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

Implements ParticleIDBase.

00027 {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 Tof2PID::sampleQ0 double  betagamma,
double  beta
[protected]
 

double Tof2PID::sampleQ0 double  betagamma,
double  beta
[protected]
 

00233                                                     {
00234   double p1 = 0.261;
00235     double p2 = 5.43;
00236       double p3 = 1.12;
00237         double p4 = 1.96;
00238           double p5 = 0.386;
00239               double val = p1 / TMath::Power(beta, p4) *
00240                     ( p2- TMath::Power(beta, p4) -
00241                             TMath::Log(p3 + TMath::Power(1/betagamma, p5)));
00242 
00243               return val*100.;
00244 }

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 Tof2PID::sigma int  n  )  const [inline]
 

00025 {return m_sigma[n];}

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

00025 {return m_sigma[n];}

double Tof2PID::sigmaTof2 int  n,
int  cntr,
double  ptrk,
double  ztof,
double  m_ph2,
double  charge
[protected]
 

double Tof2PID::sigmaTof2 int  n,
int  cntr,
double  ptrk,
double  ztof,
double  m_ph2,
double  charge
[protected]
 

00192                                                                                              {
00193   double sigma;
00194   double gb = ptrk/xmass(n);
00195   double cosz = cos(ztof/1000.0);
00196 //  double phtemp=ph;
00197   switch(n) {
00198 
00199   case 0: { // Electron
00200    sigma = 0.115816 -0.0933215*cosz+ 0.0788252*cosz*cosz;
00201    break;
00202   }
00203 
00204   case 1: { // Muon
00205     sigma = 0.121536 -0.0935898*cosz+0.0748771*cosz*cosz;       
00206     break;
00207   }
00208 
00209   case 2: { // Pion
00210     sigma =  0.106882-0.0147375*cosz+0.027491*cosz*cosz;
00211     break;
00212   }
00213   case 3: { // Kaon
00214    sigma =0.106882 -0.0147375*cosz +0.027491 *cosz*cosz;
00215    break;
00216   }
00217 
00218   case 4: { // Proton
00219     sigma = 0.168489 -0.131762*cosz+ 0.105708*cosz*cosz;
00220     break;
00221   }
00222 
00223   default:
00224     sigma = 0.100;
00225     break;
00226   }
00227      sigma = 0.110;
00228   //sigma = 1.0;
00229   return sigma;
00230 }

double Tof2PID::tof2  )  const [inline]
 

00033 {return m_tof2;}

double Tof2PID::tof2  )  const [inline]
 

00033 {return m_tof2;}

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 }

double Tof2PID::zhit2  )  const [inline]
 

00031 {return m_zhit2;}

double Tof2PID::zhit2  )  const [inline]
 

00031 {return m_zhit2;}


Member Data Documentation

double Tof2PID::m_chi [private]
 

double Tof2PID::m_chimin [private]
 

double Tof2PID::m_mass2 [private]
 

int Tof2PID::m_ndof [private]
 

double Tof2PID::m_offset [private]
 

double Tof2PID::m_pars [private]
 

double Tof2PID::m_path2 [private]
 

double Tof2PID::m_pdfmin [private]
 

double Tof2PID::m_ph2 [private]
 

Tof2PID* Tof2PID::m_pointer [static, private]
 

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

double Tof2PID::m_prob [private]
 

double Tof2PID::m_sigma [private]
 

double Tof2PID::m_tof2 [private]
 

double Tof2PID::m_zhit2 [private]
 


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