]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/PartCorrBase/AliCaloPID.h
b55c1a231c3505806b4aff492deeea012634d9b2
[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 AliLog ;
21 class AliAODCaloCluster;
22 class AliAODPWG4Particle;
23 #include "AliStack.h"
24
25 class AliCaloPID : public TObject {
26         
27 public: 
28         
29         AliCaloPID() ; // ctor
30         AliCaloPID(const AliCaloPID & g) ; // cpy ctor
31         AliCaloPID & operator = (const AliCaloPID & g) ;//cpy assignment
32         virtual ~AliCaloPID() ;//virtual dtor
33         
34         enum PidType {
35                 kPhoton = 22,
36                 kPi0 = 111,
37                 kEta = 221, 
38                 kElectron = 11, 
39                 kEleCon = -11, 
40                 kNeutralHadron = 2112, 
41                 kChargedHadron = 211, 
42                 kNeutralUnknown = 130, 
43                 kChargedUnknown=321
44         };
45         
46         
47         enum mcTypes {kMCPrompt, kMCFragmentation, kMCPi0Decay, kMCEtaDecay, kMCOtherDecay, kMCPi0, kMCEta, kMCElectron, kMCConversion, kMCUnknown};
48         
49         void InitParameters();
50         Int_t CheckOrigin(const Int_t label, AliStack *  stack) const ;
51         
52         Int_t GetPdg(const TString calo, const Double_t * pid, const Float_t energy) const ;
53         
54         Int_t GetPdg(const TString calo,const TLorentzVector mom, const AliAODCaloCluster * cluster) const ;
55         
56         TString GetPIDParametersList();
57                 
58         void SetPIDBits(const TString calo,  const AliAODCaloCluster * cluster, AliAODPWG4Particle *aodph);
59         
60         void Print(const Option_t * opt)const;
61         
62         //Weight getters
63         Float_t  GetEMCALPhotonWeight() const  { return  fEMCALPhotonWeight  ; }
64         Float_t  GetEMCALPi0Weight() const     {  return fEMCALPi0Weight  ; }
65         Float_t  GetEMCALElectronWeight() const  { return  fEMCALElectronWeight  ; }
66         Float_t  GetEMCALChargeWeight() const     {  return fEMCALChargeWeight  ; }
67         Float_t  GetEMCALNeutralWeight() const     {  return fEMCALNeutralWeight  ; }
68         Float_t  GetPHOSPhotonWeight() const   {  return fPHOSPhotonWeight  ; }
69         Float_t  GetPHOSPi0Weight() const   {  return fPHOSPi0Weight  ; }
70         Float_t  GetPHOSElectronWeight() const   {  return fPHOSElectronWeight  ; }
71         Float_t  GetPHOSChargeWeight() const   {  return fPHOSChargeWeight  ; }
72         Float_t  GetPHOSNeutralWeight() const   {  return fPHOSNeutralWeight  ; }
73         
74         Bool_t  IsPHOSPIDWeightFormulaOn() const   {  return fPHOSWeightFormula  ; } 
75         TFormula * GetPHOSPhotonWeightFormula() const     {  return fPHOSPhotonWeightFormula  ; } 
76         TFormula * GetPHOSPi0WeightFormula() const    {  return fPHOSPi0WeightFormula  ; }
77         
78         //Weight setters
79         void SetEMCALPhotonWeight(Float_t  w){  fEMCALPhotonWeight = w ; }
80         void SetEMCALPi0Weight(Float_t  w){  fEMCALPi0Weight = w ; }
81         void SetEMCALElectronWeight(Float_t  w){  fEMCALElectronWeight = w ; }
82         void SetEMCALChargeWeight(Float_t  w){  fEMCALChargeWeight = w ; }
83         void SetEMCALNeutralWeight(Float_t  w){  fEMCALNeutralWeight = w ; }
84         void SetPHOSPhotonWeight(Float_t  w){  fPHOSPhotonWeight = w ; }
85         void SetPHOSPi0Weight(Float_t  w){  fPHOSPi0Weight = w ; }
86         void SetPHOSElectronWeight(Float_t  w){  fPHOSElectronWeight = w ; }
87         void SetPHOSChargeWeight(Float_t  w){  fPHOSChargeWeight = w ; }
88         void SetPHOSNeutralWeight(Float_t  w){  fPHOSNeutralWeight = w ; }
89         
90         void UsePHOSPIDWeightFormula(Bool_t par)  { fPHOSWeightFormula  = par; } 
91         void SetPHOSPhotonWeightFormula(TFormula * photon)    {  fPHOSPhotonWeightFormula  = photon; } 
92         void SetPHOSPi0WeightFormula(TFormula * pi0)   {  fPHOSPi0WeightFormula  = pi0; }
93         
94         //PID bits setters and getters
95         void SetDispersionCut(Float_t dcut ) {fDispCut = dcut; }
96         Float_t GetDispersionCut() const {return fDispCut ;}   
97         
98         void SetTOFCut(Float_t tcut ) {fTOFCut = tcut; }
99         Float_t GetTOFCut() const {return fTOFCut ;}   
100         
101         void SetDebug(Int_t deb) {fDebug=deb;}
102         Int_t GetDebug() const {return fDebug;} 
103         
104 private:
105         
106         Float_t      fEMCALPhotonWeight; //Bayesian PID weight for photons in EMCAL 
107         Float_t      fEMCALPi0Weight;  //Bayesian PID weight for pi0 in EMCAL 
108         Float_t      fEMCALElectronWeight; //Bayesian PID weight for electrons in EMCAL 
109         Float_t      fEMCALChargeWeight;  //Bayesian PID weight for charged hadrons in EMCAL 
110         Float_t      fEMCALNeutralWeight;  //Bayesian PID weight for neutral hadrons in EMCAL 
111         Float_t      fPHOSPhotonWeight; //Bayesian PID weight for photons in PHOS 
112         Float_t      fPHOSPi0Weight; //Bayesian PID weight for pi0 in PHOS 
113         Float_t      fPHOSElectronWeight; //Bayesian PID weight for electrons in PHOS 
114         Float_t      fPHOSChargeWeight; //Bayesian PID weight for charged hadrons in PHOS 
115         Float_t      fPHOSNeutralWeight; //Bayesian PID weight for neutral hadrons in PHOS 
116         
117         Bool_t  fPHOSWeightFormula ; //Use parametrized weight threshold, function of energy
118         TFormula * fPHOSPhotonWeightFormula ; //Formula for photon weight
119         TFormula * fPHOSPi0WeightFormula ; //Formula for pi0 weight
120         
121         Float_t fDispCut;    //Cut on dispersion, used in PID evaluation
122         Float_t fTOFCut;     //Cut on TOF, used in PID evaluation
123         
124         Int_t    fDebug; //Debug level
125         
126         ClassDef(AliCaloPID,2)
127 } ;
128
129
130 #endif //ALICALOPID_H
131
132
133