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