2 #include "StdEdxModel.h"
3 #include "StdEdxPull.h"
5 Double_t StdEdxPull::EvalPred(Double_t betagamma, UChar_t fit, Int_t charge, Double_t mass) {
6 Double_t dedx_expected = 0;
9 if (TMath::Abs(charge) > 1) dx2 = TMath::Log2(5.);
10 dedx_expected = 1.e-6*charge*charge*Bichsel::Instance()->GetI70M(TMath::Log10(betagamma),dx2);
11 }
else if ( fit == 1) {
13 Double_t par[4] = {TMath::Log10(betagamma), 1., (Double_t) charge, mass};
14 dedx_expected = 1.e-6*TMath::Exp(StdEdxModel::instance()->zMP(par,&par[1]));
17 dedx_expected = StdEdxModel::instance()->dNdxEff(betagamma,charge, mass);
22 Double_t StdEdxPull::EvalDeV(Double_t dEdx, Double_t betagamma, UChar_t fit, Int_t charge, Double_t mass) {
23 return TMath::Log(dEdx/EvalPred(betagamma, fit, charge, mass));
26 Double_t StdEdxPull::Eval(Double_t dEdx, Double_t dEdxError, Double_t betagamma, UChar_t fit, Int_t charge, Double_t mass) {
27 return (dEdxError > 0) ? EvalDeV(dEdx, betagamma, fit, charge, mass)/dEdxError : -999;
30 Double_t StdEdxPull::EvalPred2(Double_t betagamma, Double_t dx2, UChar_t fit, Int_t charge) {
31 Double_t dedx_expected = 0;
33 if (TMath::Abs(charge) > 1) dx2 = TMath::Log2(5.);
34 dedx_expected = 1.e-6*charge*charge*Bichsel::Instance()->GetI70M(TMath::Log10(betagamma),dx2);
35 }
else if ( fit == 1) {
36 dedx_expected = 1.e-6*charge*charge*TMath::Exp(Bichsel::Instance()->GetMostProbableZ(TMath::Log10(betagamma),dx2));
38 dedx_expected = StdEdxModel::instance()->dNdx(betagamma,charge);
43 Double_t StdEdxPull::EvalDeV2(Double_t dEdx, Double_t betagamma, Double_t dx2, UChar_t fit, Int_t charge) {
44 return TMath::Log(dEdx/EvalPred2(betagamma, dx2, fit, charge));
47 Double_t StdEdxPull::Eval2(Double_t dEdx, Double_t dEdxError, Double_t betagamma, Double_t dx2, UChar_t fit, Int_t charge) {
48 return (dEdxError > 0) ? EvalDeV2(dEdx, betagamma, dx2, fit, charge)/dEdxError : -999;