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 
11  public:
12  // Local pid type (BABAR)
13  enum { kNPidType = 5 };
15 
16  // Write likelihoods to PndMvdPidCand
17  static void CalcLikelihood(PndMvdPidCand *cand);
18 
19  // Same as CalcLikelihood but create random energyloss first
20  static void CalcLikelihood(PidType particle, double momentum, PndMvdPidCand *cand);
21 
22  // Same as CalcLikelihood but write lhs to array instead
23  static void CalcLikelihood(PidType part, double momentum, double *lh);
24 
25  // Same with a pdtid switch
26  static void CalcLikelihood(int lundId, double momentum, double *lh);
27 
28  // Read last used energy loss and momentum
29  static double GetMomentum() { return fmomentum; };
30  static double GetEnergyLoss() { return fenergyloss; };
31 
32  private:
33  // private contructor/destructor to prohibit instantiation
35  virtual ~PndMvdAdvancedPidAlgo(){};
36 
37  static void CalcLikelihood(double *lh);
38 
39  // Expected energy loss, as given by Bethe-Bloch formula
40  static double MeanEnergyLoss(PidType particle);
41 
42  // Integral algorithm that computes convolution of landau and gaus
43  // distribution; s_mpv is the difference between energy loss and
44  // most probable value of the landau distribution, width1 is its
45  // scaling, widht2 is the gaussian width.
46  static double LandauGaus(double s_mpv, double width1, double width2);
47 
48  // Obtained by TrkFitter
49  static double fmomentum;
50  static double fenergyloss;
51 
52  // Distribution parameters depending on track momentum and particle
53  static double mpv(PidType particle);
54  static double width1(PidType particle);
55  static double width2(PidType particle);
56 
57  // public:
58  ClassDef(PndMvdAdvancedPidAlgo, 1);
59 };
60 
61 #endif
static void CalcLikelihood(PndMvdPidCand *cand)