105 switch(abs(t->
pdt())) {
106 case 2212:part=
proton;
break;
107 case 321: part=
kaon;
break;
108 case 211: part=
pion;
break;
109 case 13: part=
muon;
break;
151 double theta = t->
p4().Theta();
152 double p=t->
p4().Vect().Mag();
153 double charge=t->
charge();
161 double p=t->
p4().Vect().Mag();
169 double Dphi=
_phiRes*M_PI/180.0;
183 o <<
"Parameters for detector <"<<
detName()<<
">"<<endl;
184 o <<
" _thtMin = "<<
_thtMin<<endl;
185 o <<
" _thtMax = "<<
_thtMax<<endl;
187 o <<
" _pmin = "<<
_pmin<<endl;
188 o <<
" _pRes = "<<100*
_pRes<<
"\%" << endl;
190 o <<
" _vtxRes = "<<
_vtxRes*1e5<<
"um "<<endl;
191 o <<
" _phiRes = "<<
_phiRes <<
" degree" << endl;
192 o <<
" _thetaRes = "<<
_thetaRes <<
" degree" << endl;
221 if (name ==
"thtMin")
224 if (name ==
"thtMax")
227 if (name ==
"radiationLength")
233 if (name ==
"vtxRes")
239 if (name ==
"dEdxResMulti")
242 if (name ==
"thetaRes")
245 if (name ==
"phiRes")
248 if (name ==
"efficiency")
260 static float eb=0.14e-6;
262 static float c=2.99792458e8;
264 static float Mass[
nPidType]={ 0.511e-3, 0.1058, 0.1396, 0.4937, 0.9383 };
266 double sqrBeta=1/(1+pow(Mass[part]/
_momentum,2));
267 return 4.9312e-05 * (
log(2*Mass[
electron]*c*c/eb*sqrBeta/(1-sqrBeta))-sqrBeta)/sqrBeta;
276 return TMath::Gaus(s_mpv, 0, widthtwo,
true);
277 else if (widthtwo<=0)
278 return TMath::Landau(s_mpv, 0, widthone,
true);
280 static double x[12] = { 0.96028985649753623, 0.79666647741362674,
281 0.52553240991632899, 0.18343464249564980,
282 0.98940093499164993, 0.94457502307323258,
283 0.86563120238783174, 0.75540440835500303,
284 0.61787624440264375, 0.45801677765722739,
285 0.28160355077925891, 0.09501250983763744};
287 static double w[12] = { 0.10122853629037626, 0.22238103445337447,
288 0.31370664587788729, 0.36268378337836198,
289 0.02715245941175409, 0.06225352393864789,
290 0.09515851168249278, 0.12462897125553387,
291 0.14959598881657673, 0.16915651939500254,
292 0.18260341504492359, 0.18945061045506850};
294 double h, bb, aa,
c1,
c2, u, s8, s16,
f1,
f2;
311 f1 = TMath::Landau(s_mpv+xx, 0, widthone,
true)*TMath::Gaus(xx, 0, widthtwo,
true);
313 f2 = TMath::Landau(s_mpv+xx, 0, widthone,
true)*TMath::Gaus(xx, 0, widthtwo,
true);
320 f1 = TMath::Landau(s_mpv+xx, 0, widthone,
true)*TMath::Gaus(xx, 0, widthtwo,
true);
322 f2 = TMath::Landau(s_mpv+xx, 0, widthone,
true)*TMath::Gaus(xx, 0, widthtwo,
true);
323 s16+= w[
i]*(f1 +
f2);
326 if (
TMath::Abs(s16-c2*s8) <= 1e-12*(s16+1) ) {
329 if (bb>=5*widthtwo) {
402 return c0+c1*(x1-
x0)+d1*(x-x1);
406 return c0+c1*(x-
x0)+pow(x0-x,3)*(a3+(x0-
x)*(a4+(x0-x)*a5));
414 return +3.81174e-04+x*(-2.25108e-04+x*+5.45154e-05);
416 return -5.28145e-05+x*(+8.29883e-04+x*-5.35972e-04);
420 return +2.61134e-04+x*(-1.30818e-04+x*+3.44165e-05);
422 return +3.41858e-04+x*(-3.21115e-04+x*+1.37459e-04);
426 return +1.88718e-04+x*(-6.38948e-05+x*+1.78590e-05);
428 return +1.82872e-04+x*(-1.28373e-04+x*+8.01459e-05);
432 return +1.06142e-04+x*(+3.68777e-05+x*-1.00190e-05);
434 return +1.89374e-04+x*(-1.46441e-04+x*+9.10813e-05);
439 return +1.27955e-04+x*(-3.15732e-06+x*+9.64736e-06);
450 return +6.41067e-04+x*(-3.82507e-04+x*+9.03732e-05);
452 return +6.40328e-04-3.21725e-04*x+3.17708e-05*pow(x,-3);
456 return +2.22504e-04+x*(-6.40051e-06+x*+2.14434e-06);
458 return +3.86684e-04-1.61873e-04*x+7.76586e-06*pow(x,-3);
462 return +1.32999e-04+x*(+1.19714e-04+x*-3.53302e-05);
464 return +2.21603e-04-3.21357e-06*x+4.64793e-06*pow(x,-2);
468 return +7.84582e-05+x*(+1.88988e-04+x*-5.49637e-05);
470 return +1.67388e-04+5.67991e-05*x+3.42702e-06*pow(x,-2);
475 return +4.08849e-04-3.56548e-05*x+1.84825e-08*pow(x,-3);
double dtheta(PndFsmTrack *t) const
virtual PndFsmResponse * respond(PndFsmTrack *t)
void setLHElectron(double val)
double MeanEnergyLoss(PidType particle)
double width1(PidType particle)
double width2(PidType particle)
void setLHProton(double val)
std::list< std::string > ArgList
void setLHMuon(double val)
bool hitMapResponse(unsigned int)
void print(std::ostream &o)
friend F32vec4 log(const F32vec4 &a)
void parseParameterList(ArgList &par)
double dp(PndFsmTrack *t) const
double dphi(PndFsmTrack *t) const
static const std::string & name(unsigned int t)
double LandauGaus(double s_mpv, double width1, double width2)
basic_ostream< char, char_traits< char > > ostream
void setDetector(PndFsmAbsDet *detector)
const std::string & detName()
void setLHKaon(double val)
friend F32vec4 fabs(const F32vec4 &a)
bool setParameter(std::string &name, double value)
bool detected(PndFsmTrack *t) const
void setDetected(bool isdet)
void setdtheta(double val)
double Likelihood(PidType particle)
void setMvddEdx(double val, double err=0)
double mpv(PidType particle)
void setLHPion(double val)