]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnPID.h
Package upgrade.
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnPID.h
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * See cxx source for full Copyright notice                               *
4  **************************************************************************/
5
6 /* $Id: AliRsnPID.h,v 1.5 2007/02/21 14:33:25 pulvir Exp $ */
7
8 //-------------------------------------------------------------------------
9 //                      Class AliRsnPID
10 //  Simple collection of reconstructed tracks, selected from an ESD event
11 //
12 // author: A. Pulvirenti             (email: alberto.pulvirenti@ct.infn.it)
13 //-------------------------------------------------------------------------
14
15 #ifndef ALIRSNPID_H
16 #define ALIRSNPID_H
17
18 class AliRsnPIDProb;
19 class AliRsnDaughter;
20 class AliRsnEvent;
21
22 class AliRsnPID : public TObject
23 {
24 public:
25
26     AliRsnPID();
27     AliRsnPID(const AliRsnPID& copy);
28     AliRsnPID& operator=(const AliRsnPID& copy);
29     virtual ~AliRsnPID() {}
30
31     // types enum
32     enum EType {
33         kElectron = 0,
34         kMuon,
35         kPion,
36         kKaon,
37         kProton,
38         kUnknown,
39         kSpecies = 5
40     };
41
42     // identification method enum
43     enum EMethod {
44         kNone = 0,
45         kRealistic,
46         kPerfect,
47         kMethods
48     };
49
50     // conversions from PDG code to local type
51     static EType         InternalType(Int_t pdgCode);
52
53     // retrieve particle informations from internal type
54     static Int_t         PDGCode(EType pid);
55     static const char *  ParticleName(EType pid, Bool_t shortName = kTRUE);
56     static const char *  ParticleNameLatex(EType pid);
57     static Double_t      ParticleMass(EType pid);
58
59     // identification routines
60     Bool_t        Identify(AliRsnDaughter *d);
61     Bool_t        Identify(AliRsnEvent *e);
62     Bool_t        IdentifiedAs(AliRsnDaughter *d, EType type, Short_t charge = 0);
63
64     // setters
65     void SetMethod(EMethod method) {fMethod = method;}
66         void SetPriorProbability(EType type, Double_t p);
67         void SetMinProb(Double_t p) {fMinProb = p;}
68         void SetMaxPt(Double_t p) {fMaxPt = p;}
69
70         // getters
71         EMethod  GetMethod() {return fMethod;}
72
73 private:
74
75     // identification routines
76     Bool_t  IdentifyPerfect(AliRsnDaughter *d);
77     Bool_t  IdentifyRealistic(AliRsnDaughter *d);
78     Bool_t  Unidentify(AliRsnDaughter *d, Double_t value = 1.0);
79
80     EMethod    fMethod;          // PID method
81
82     Double_t   fPrior[kSpecies]; // prior probabilities
83     Double_t   fMaxPt;           // realistic PID is done for Pt < this parameter
84     Double_t   fMinProb;         // threshold on acceptable largest probability
85
86     static const char* fgkParticleNameShort[kSpecies+1];
87     static const char* fgkParticleNameLong[kSpecies+1];
88     static const char* fgkParticleNameLatex[kSpecies+1];
89     static const Int_t fgkParticlePDG[kSpecies+1];
90
91     ClassDef(AliRsnPID,1);
92 };
93
94 #endif