]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/PartCorrBase/AliCaloPID.h
Fixing a compilation warning
[u/mrichter/AliRoot.git] / PWG4 / PartCorrBase / AliCaloPID.h
1 #ifndef ALICALOPID_H
2 #define ALICALOPID_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5 /* $Id:  $ */
6
7 //_________________________________________________________________________
8 // Class for track/cluster acceptance selection
9 // Selection in Central barrel, EMCAL and PHOS
10 //
11 //*-- Author: Gustavo Conesa (INFN-LNF)
12
13 // --- ROOT system ---
14 #include <TObject.h> 
15 class TString ;
16 class TLorentzVector ;
17 class TFormula ;
18
19 //--- AliRoot system ---
20 class AliAODCaloCluster;
21 class AliAODPWG4Particle;
22
23 class AliCaloPID : public TObject {
24         
25  public: 
26   
27   AliCaloPID() ; // ctor
28   AliCaloPID(const AliCaloPID & g) ; // cpy ctor
29   AliCaloPID & operator = (const AliCaloPID & g) ;//cpy assignment
30   virtual ~AliCaloPID() ;//virtual dtor
31   
32   enum PidType {
33     kPhoton = 22,
34     kPi0 = 111,
35     kEta = 221, 
36     kElectron = 11, 
37     kEleCon = -11, 
38     kNeutralHadron = 2112, 
39     kChargedHadron = 211, 
40     kNeutralUnknown = 130, 
41     kChargedUnknown=321
42   };
43   
44   enum TagType {kPi0Decay, kEtaDecay, kOtherDecay, kConversion, kNoTag = -1};
45   
46   void InitParameters();
47   
48   Int_t GetPdg(const TString calo, const Double_t * pid, const Float_t energy) const ;
49   
50   Int_t GetPdg(const TString calo,const TLorentzVector mom, const AliAODCaloCluster * cluster) const ;
51   
52   TString       GetPIDParametersList();
53   
54   void SetPIDBits(const TString calo,  const AliAODCaloCluster * cluster, AliAODPWG4Particle *aodph);
55   
56   void Print(const Option_t * opt)const;
57   
58   //Weight getters
59   Float_t  GetEMCALPhotonWeight() const  { return  fEMCALPhotonWeight  ; }
60   Float_t  GetEMCALPi0Weight() const     {  return fEMCALPi0Weight  ; }
61   Float_t  GetEMCALElectronWeight() const  { return  fEMCALElectronWeight  ; }
62   Float_t  GetEMCALChargeWeight() const     {  return fEMCALChargeWeight  ; }
63   Float_t  GetEMCALNeutralWeight() const     {  return fEMCALNeutralWeight  ; }
64   Float_t  GetPHOSPhotonWeight() const   {  return fPHOSPhotonWeight  ; }
65   Float_t  GetPHOSPi0Weight() const   {  return fPHOSPi0Weight  ; }
66   Float_t  GetPHOSElectronWeight() const   {  return fPHOSElectronWeight  ; }
67   Float_t  GetPHOSChargeWeight() const   {  return fPHOSChargeWeight  ; }
68   Float_t  GetPHOSNeutralWeight() const   {  return fPHOSNeutralWeight  ; }
69   
70   Bool_t  IsPHOSPIDWeightFormulaOn() const   {  return fPHOSWeightFormula  ; } 
71   TFormula * GetPHOSPhotonWeightFormula() const     {  return fPHOSPhotonWeightFormula  ; } 
72   TFormula * GetPHOSPi0WeightFormula() const    {  return fPHOSPi0WeightFormula  ; }
73   
74   //Weight setters
75   void SetEMCALPhotonWeight(Float_t  w){  fEMCALPhotonWeight = w ; }
76   void SetEMCALPi0Weight(Float_t  w){  fEMCALPi0Weight = w ; }
77   void SetEMCALElectronWeight(Float_t  w){  fEMCALElectronWeight = w ; }
78   void SetEMCALChargeWeight(Float_t  w){  fEMCALChargeWeight = w ; }
79   void SetEMCALNeutralWeight(Float_t  w){  fEMCALNeutralWeight = w ; }
80   void SetPHOSPhotonWeight(Float_t  w){  fPHOSPhotonWeight = w ; }
81   void SetPHOSPi0Weight(Float_t  w){  fPHOSPi0Weight = w ; }
82   void SetPHOSElectronWeight(Float_t  w){  fPHOSElectronWeight = w ; }
83   void SetPHOSChargeWeight(Float_t  w){  fPHOSChargeWeight = w ; }
84   void SetPHOSNeutralWeight(Float_t  w){  fPHOSNeutralWeight = w ; }
85   
86   void UsePHOSPIDWeightFormula(Bool_t par)  { fPHOSWeightFormula  = par; } 
87   void SetPHOSPhotonWeightFormula(TFormula * photon)    {  fPHOSPhotonWeightFormula  = photon; } 
88   void SetPHOSPi0WeightFormula(TFormula * pi0)   {  fPHOSPi0WeightFormula  = pi0; }
89   
90   //PID bits setters and getters
91   void SetDispersionCut(Float_t dcut ) {fDispCut = dcut; }
92   Float_t GetDispersionCut() const {return fDispCut ;}   
93   
94   void SetTOFCut(Float_t tcut ) {fTOFCut = tcut; }
95   Float_t GetTOFCut() const {return fTOFCut ;}   
96   
97   void SetDebug(Int_t deb) {fDebug=deb;}
98   Int_t GetDebug() const {return fDebug;}       
99   
100  private:
101   
102   Float_t      fEMCALPhotonWeight; //Bayesian PID weight for photons in EMCAL 
103   Float_t      fEMCALPi0Weight;  //Bayesian PID weight for pi0 in EMCAL 
104   Float_t      fEMCALElectronWeight; //Bayesian PID weight for electrons in EMCAL 
105   Float_t      fEMCALChargeWeight;  //Bayesian PID weight for charged hadrons in EMCAL 
106   Float_t      fEMCALNeutralWeight;  //Bayesian PID weight for neutral hadrons in EMCAL 
107   Float_t      fPHOSPhotonWeight; //Bayesian PID weight for photons in PHOS 
108   Float_t      fPHOSPi0Weight; //Bayesian PID weight for pi0 in PHOS 
109   Float_t      fPHOSElectronWeight; //Bayesian PID weight for electrons in PHOS 
110   Float_t      fPHOSChargeWeight; //Bayesian PID weight for charged hadrons in PHOS 
111   Float_t      fPHOSNeutralWeight; //Bayesian PID weight for neutral hadrons in PHOS 
112   
113   Bool_t  fPHOSWeightFormula ; //Use parametrized weight threshold, function of energy
114   TFormula * fPHOSPhotonWeightFormula ; //Formula for photon weight
115   TFormula * fPHOSPi0WeightFormula ; //Formula for pi0 weight
116   
117   Float_t fDispCut;    //Cut on dispersion, used in PID evaluation
118   Float_t fTOFCut;     //Cut on TOF, used in PID evaluation
119   
120   Int_t  fDebug; //Debug level
121   
122   ClassDef(AliCaloPID,3)
123     } ;
124
125
126 #endif //ALICALOPID_H
127
128
129