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 
11  public:
12  // Local pid type (BABAR)
13  enum { kNPidType = 5 };
15 
16  // Write likelihoods to PndHypPidCand
17  static void CalcLikelihood(PndHypPidCand *cand);
18 
19  // Same as CalcLikelihood but create random energyloss first
20  static void CalcLikelihood(PidType particle, double momentum, PndHypPidCand *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:
34  virtual ~PndHypAdvancedPidAlgo(){};
35  static void CalcLikelihood(double *lh);
36 
37  // Expected energy loss, as given by Bethe-Bloch formula
38  static double MeanEnergyLoss(PidType particle);
39 
40  // Integral algorithm that computes convolution of landau and gaus
41  // distribution; s_mpv is the difference between energy loss and
42  // most probable value of the landau distribution, width1 is its
43  // scaling, widht2 is the gaussian width.
44  static double LandauGaus(double s_mpv, double width1, double width2);
45 
46  // Obtained by TrkFitter
47  static double fmomentum;
48  static double fenergyloss;
49 
50  // Distribution parameters depending on track momentum and particle
51  static double mpv(PidType particle);
52  static double width1(PidType particle);
53  static double width2(PidType particle);
54 
55  // public:
56  ClassDef(PndHypAdvancedPidAlgo, 1);
57 };
58 
59 #endif
static void CalcLikelihood(PndHypPidCand *cand)