]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnPID.h
Several updates from the validation phase of the Fast Or DA (A. Mastroserio)
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnPID.h
1 //
2 // Class AliRsnPID
3 //
4 // Processes the tracks to compute PID probabilities,
5 // by combining the prior probabilities with the PID weights
6 // stored in each AliRsnDaughter
7 //
8 // authors: A. Pulvirenti (alberto.pulvirenti@ct.infn.it)
9 //          M. Vala (martin.vala@cern.ch)
10 //
11
12 #ifndef ALIRSNPID_H
13 #define ALIRSNPID_H
14
15 #include <TNamed.h>
16
17 class AliRsnDaughter;
18 class AliRsnEvent;
19
20 class AliRsnPID : public TNamed
21 {
22   public:
23
24     // types enum
25     enum EType
26     {
27       kElectron = 0,
28       kMuon,
29       kPion,
30       kKaon,
31       kProton,
32       kUnknown,
33       kSpecies = 5,
34       kPhi = 6,
35       kJPsi,
36       kSpeciesAll = 8
37     };
38
39     AliRsnPID();
40     virtual ~AliRsnPID() {}
41
42     // conversions from PDG code to local type
43     static EType        InternalType(Int_t pdgCode);
44
45     // retrieve particle informations from internal type
46     static Int_t        PDGCode(EType pid);
47     static const char*  ParticleName(EType pid, Bool_t shortName = kTRUE);
48     static const char*  ParticleNameLatex(EType pid);
49     static Double_t     ParticleMass(EType pid);
50
51     // identification routines
52     Bool_t Process(AliRsnEvent *e);
53     Bool_t ComputeProbs(AliRsnDaughter *d);
54     Bool_t IdentifiedAs(AliRsnDaughter *d, EType type, Short_t charge = 0);
55     EType  TrackType(AliRsnDaughter *d);
56
57     // data members
58     void     SetPriorProbability(EType type, Double_t p);
59     void     SetMinProb(Double_t p) {fMinProb = p;}
60     void     SetMaxPt(Double_t p) {fMaxPt = p;}
61     Double_t GetPriorProbability(EType type) {return fPrior[(Int_t)type];}
62     Double_t GetMinProb() {return fMinProb;}
63     Double_t GetMaxPt() {return fMaxPt;}
64
65     // other
66     void DumpPriors();
67     void SetPIDArraysSize(Int_t size) {fPIDArraysSize = size;}
68
69   private:
70
71     Double_t  fPrior[kSpecies]; // prior probabilities
72     Double_t  fMaxPt;           // pt threshold for realistic PID
73     Double_t  fMinProb;         // threshold on acceptable largest probability
74     Int_t     fPIDArraysSize;   // size of PID arrays filled during processing
75
76     static const Double_t  fgkParticleMass[kSpeciesAll + 1];      // PDG particle mass
77     static const char*     fgkParticleNameShort[kSpeciesAll + 1]; // short particle name
78     static const char*     fgkParticleNameLong[kSpeciesAll + 1];  // long particle name
79     static const char*     fgkParticleNameLatex[kSpeciesAll + 1]; // latex particle name
80     static const Int_t     fgkParticlePDG[kSpeciesAll + 1];       // PDG code of particle
81
82     ClassDef(AliRsnPID,1);
83 };
84
85 #endif