45 #ifndef BetheBlochFunction_hh
46 #define BetheBlochFunction_hh
48 double BetheBlochFunction(
double *rig,
double *par) {
51 double charge=double(fabs(par[3]));
52 double m=double(par[4]);
56 double prefactor=par[0];
57 double postfactor=par[1];
58 double mFactor=par[2];
68 gb2=(rig[0]*charge/m)*(rig[0]*charge/m);
70 if (gb2 > 0.0) b2=1.0/(1.0 + 1.0/gb2);
72 if (myValue*gb2<=1.)
return 0;
73 myDedx=calib*charge*charge*(1.0/TMath::Power(b2,prefactor))*(TMath::Power(TMath::Log(myValue*gb2),0.7) - postfactor*b2 )- mFactor;
74 if (myDedx > satura) myDedx=satura;