8const int ParticleIDBase::USE_DEDX = 1;
9const int ParticleIDBase::USE_TOF1 = 2;
10const int ParticleIDBase::USE_TOF2 = 4;
11const int ParticleIDBase::USE_TOFE = 8;
12const int ParticleIDBase::USE_TOFQ = 16;
13const int ParticleIDBase::USE_EMC = 32;
14const int ParticleIDBase::USE_MUC = 64;
15const int ParticleIDBase::USE_TOF = 128;
16const int ParticleIDBase::USE_TOFC = 256;
17const int ParticleIDBase::USE_TOFCorr = 512;
18const int ParticleIDBase::USE_MRPC = 1024;
20const int ParticleIDBase::IDENTIFY_ELECTRON = 1;
21const int ParticleIDBase::IDENTIFY_MUON = 2;
22const int ParticleIDBase::IDENTIFY_PION = 4;
23const int ParticleIDBase::IDENTIFY_KAON = 8;
24const int ParticleIDBase::IDENTIFY_PROTON = 16;
26const int ParticleIDBase::PROBABILITY_PID = 1;
27const int ParticleIDBase::LIKELIHOOD_PID = 2;
28const int ParticleIDBase::NEURONNETWORK_PID = 4;
30const int ParticleIDBase::DEDX_VALID = 1;
31const int ParticleIDBase::TOF1_VALID = 2;
32const int ParticleIDBase::TOF2_VALID = 4;
33const int ParticleIDBase::TOFE_VALID = 8;
34const int ParticleIDBase::TOFQ_VALID = 16;
35const int ParticleIDBase::EMC_VALID = 32;
36const int ParticleIDBase::MUC_VALID = 64;
37const int ParticleIDBase::TOF_VALID = 128;
38const int ParticleIDBase::TOFC_VALID = 256;
39const int ParticleIDBase::TOFCorr_VALID = 512;
40const int ParticleIDBase::MRPC_VALID = 1024;
59 path = string(s_path);
61 char* env_path = getenv(
"PARTICLEIDROOT");
63 cout <<
" ParticleIDBase::set_path ERROR:"
64 " the environment PARTICLEIDROOT not defined " << endl;
67 path = string(env_path);
73 double mass[5] = {0.000511, 0.105658, 0.139570,0.493677, 0.938272};
80 double vel = 299.792458;
86 if(chi2 < 0)
return p;
87 p = TMath::Prob(chi2,
ndof);
96 double chi2 = -0.5*offset*offset/(sigma*sigma);
97 double pdf =
exp(chi2)/(sigma*sqrt(
twoPi));
103 if(!m_trk)
return val;
111 if(!m_trk)
return val;
119 if(!m_trk)
return val;
122 val = mdcTrk->
charge() + 0.0;
127 double c1 = (y[0]-y[1])*(
x[1]-
x[2])-(
x[0]-
x[1])*(y[1]-y[2]);
128 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]);
130 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]);
131 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]);
133 double a = y[0] - b*
x[0]-c*
x[0]*
x[0];
134 double y1 = a + b*x1 +c*x1*x1;
141 return par[0] + y*(par[1] + y*(par[2]));
147 return par[0] + y*(par[1] + y*(par[2] + y*(par[3])));
153 return par[0] + y*(par[1] + y*(par[2] + y*(par[3] + y*(par[4]))));
EvtComplex exp(const EvtComplex &c)
double pol2(double x, double *par)
virtual int ndof() const =0
double interpolation(double *x, double *y, double x1)
double probCalculate(double chi2, int n)
double pol4(double x, double *par)
double pol3(double x, double *par)
double pdfCalculate(double offset, double sigma)
void set_path(const char *s_path=0)