PandaRoot
PndMvdAdvancedPidAlgo.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef PndMvdAdvancedPidAlgo_h
14 #define PndMvdAdvancedPidAlgo_h
15 
16 #include <math.h>
17 #include <map>
18 #include "Rtypes.h"
19 
20 class PndMvdPidCand;
21 
23  public:
24  // Local pid type (BABAR)
25  enum { kNPidType = 5 };
27 
28  // Write likelihoods to PndMvdPidCand
29  static void CalcLikelihood(PndMvdPidCand *cand);
30 
31  // Same as CalcLikelihood but create random energyloss first
32  static void CalcLikelihood(PidType particle, double momentum, PndMvdPidCand *cand);
33 
34  // Same as CalcLikelihood but write lhs to array instead
35  static void CalcLikelihood(PidType part, double momentum, double *lh);
36 
37  // Same with a pdtid switch
38  static void CalcLikelihood(int lundId, double momentum, double *lh);
39 
40  // Read last used energy loss and momentum
41  static double GetMomentum() { return fmomentum; };
42  static double GetEnergyLoss() { return fenergyloss; };
43 
44  private:
45  // private contructor/destructor to prohibit instantiation
47  virtual ~PndMvdAdvancedPidAlgo(){};
48 
49  static void CalcLikelihood(double *lh);
50 
51  // Expected energy loss, as given by Bethe-Bloch formula
52  static double MeanEnergyLoss(PidType particle);
53 
54  // Integral algorithm that computes convolution of landau and gaus
55  // distribution; s_mpv is the difference between energy loss and
56  // most probable value of the landau distribution, width1 is its
57  // scaling, widht2 is the gaussian width.
58  static double LandauGaus(double s_mpv, double width1, double width2);
59 
60  // Obtained by TrkFitter
61  static double fmomentum;
62  static double fenergyloss;
63 
64  // Distribution parameters depending on track momentum and particle
65  static double mpv(PidType particle);
66  static double width1(PidType particle);
67  static double width2(PidType particle);
68 
69  // public:
70  ClassDef(PndMvdAdvancedPidAlgo, 1);
71 };
72 
73 #endif
static void CalcLikelihood(PndMvdPidCand *cand)