FairRoot/PandaRoot
PndMvdAdvancedPidAlgo.h
Go to the documentation of this file.
1 #ifndef PndMvdAdvancedPidAlgo_h
2 #define PndMvdAdvancedPidAlgo_h
3 
4 #include <math.h>
5 #include <map>
6 #include "Rtypes.h"
7 
8 class PndMvdPidCand;
9 class TRandom3;
10 
12 public:
13  //Local pid type (BABAR)
14  enum {kNPidType = 5};
15  enum PidType {
21  };
22 
23  //Write likelihoods to PndMvdPidCand
24  static void CalcLikelihood(PndMvdPidCand* cand);
25 
26  //Same as CalcLikelihood but create random energyloss first
27  static void CalcLikelihood(PidType particle, double momentum, PndMvdPidCand* cand);
28 
29  //Same as CalcLikelihood but write lhs to array instead
30  static void CalcLikelihood(PidType part, double momentum, double* lh);
31 
32  //Same with a pdtid switch
33  static void CalcLikelihood(int lundId, double momentum, double* lh);
34 
35  //Read last used energy loss and momentum
36  static double GetMomentum() {return fmomentum;};
37  static double GetEnergyLoss() {return fenergyloss;};
38 
39 private:
40  //private contructor/destructor to prohibit instantiation
43 
44  static void CalcLikelihood(double* lh);
45 
46  //Expected energy loss, as given by Bethe-Bloch formula
47  static double MeanEnergyLoss(PidType particle);
48 
49  //Integral algorithm that computes convolution of landau and gaus
50  //distribution; s_mpv is the difference between energy loss and
51  //most probable value of the landau distribution, width1 is its
52  //scaling, widht2 is the gaussian width.
53  static double LandauGaus(double s_mpv, double width1, double width2);
54 
55  //Obtained by TrkFitter
56  static double fmomentum;
57  static double fenergyloss;
58 
59  //Distribution parameters depending on track momentum and particle
60  static double mpv(PidType particle);
61  static double width1(PidType particle);
62  static double width2(PidType particle);
63 
64  //Test: random generator for likelihoods
65  static TRandom3* frand;
66 
67 //public:
69 
70 };
71 
72 #endif
static double MeanEnergyLoss(PidType particle)
static double mpv(PidType particle)
static void CalcLikelihood(PndMvdPidCand *cand)
ClassDef(PndMvdAdvancedPidAlgo, 1)
const int particle
static double width2(PidType particle)
static double LandauGaus(double s_mpv, double width1, double width2)
static double width1(PidType particle)