#ifndef PndMvdPidLikelihood_HH #define PndMvdPidLikelihood_HH #include #include #include "Rtypes.h" class PndMvdPidCand; class PndMvdPidLikelihood { public: //Returns map of likelihood values where the map key is used as the pdg id static void CalcLikelihood(Double_t momentum, Double_t energyloss, std::map &likelihood); //Write likelihoods directly to PndMvdPidCand static void CalcLikelihood(PndMvdPidCand* cand); private: //Lower boundary of energy loss distribution, as given by Bethe-Bloch formula static Double_t LowerBoundary(Double_t p, Double_t m); //These functions represent the lower boundary of the energy loss distribution //at a given momentum. The offset numbers in both momentum and energy loss //axis are adjusted that at least 99% of all events have are gathered. static Double_t LowerProtonBoundary(Double_t momentum); static Double_t LowerKaonBoundary(Double_t momentum); static Double_t LowerPionBoundary(Double_t momentum); //Naive approximation of the Landau distribution, integrated from -inf to x static Double_t LandauIntegral(Double_t x); static Double_t EvalPolynom(Double_t momentum, Double_t* coefficient); //Constants static float piMass; static float kMass; static float pMass; static float eMass; static float c; static float eb; //Landau distribution parameters static Double_t kShift; static Double_t kScale; static Double_t piShift; static Double_t piScale; static Double_t muShift; static Double_t muScale; //Integral remainders static Double_t pRemainder; static Double_t kRemainder; static Double_t piRemainder; }; #endif