1c5acb87 |
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 | |
7175a03a |
47 | enum mcTypes {kMCPrompt, kMCFragmentation, kMCISR, kMCPi0Decay, kMCEtaDecay, kMCOtherDecay, kMCPi0, kMCEta, kMCElectron, kMCConversion, kMCUnknown}; |
1c5acb87 |
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 | |
7175a03a |
104 | void SetMCGenerator(TString mcgen) {fMCGenerator=mcgen;} |
105 | TString GetMCGenerator() const {return fMCGenerator;} |
106 | |
1c5acb87 |
107 | private: |
108 | |
109 | Float_t fEMCALPhotonWeight; //Bayesian PID weight for photons in EMCAL |
110 | Float_t fEMCALPi0Weight; //Bayesian PID weight for pi0 in EMCAL |
111 | Float_t fEMCALElectronWeight; //Bayesian PID weight for electrons in EMCAL |
112 | Float_t fEMCALChargeWeight; //Bayesian PID weight for charged hadrons in EMCAL |
113 | Float_t fEMCALNeutralWeight; //Bayesian PID weight for neutral hadrons in EMCAL |
114 | Float_t fPHOSPhotonWeight; //Bayesian PID weight for photons in PHOS |
115 | Float_t fPHOSPi0Weight; //Bayesian PID weight for pi0 in PHOS |
116 | Float_t fPHOSElectronWeight; //Bayesian PID weight for electrons in PHOS |
117 | Float_t fPHOSChargeWeight; //Bayesian PID weight for charged hadrons in PHOS |
118 | Float_t fPHOSNeutralWeight; //Bayesian PID weight for neutral hadrons in PHOS |
119 | |
120 | Bool_t fPHOSWeightFormula ; //Use parametrized weight threshold, function of energy |
121 | TFormula * fPHOSPhotonWeightFormula ; //Formula for photon weight |
122 | TFormula * fPHOSPi0WeightFormula ; //Formula for pi0 weight |
123 | |
124 | Float_t fDispCut; //Cut on dispersion, used in PID evaluation |
125 | Float_t fTOFCut; //Cut on TOF, used in PID evaluation |
126 | |
127 | Int_t fDebug; //Debug level |
7175a03a |
128 | TString fMCGenerator; // MC geneator used to generate data in simulation |
129 | |
130 | ClassDef(AliCaloPID,3) |
1c5acb87 |
131 | } ; |
132 | |
133 | |
134 | #endif //ALICALOPID_H |
135 | |
136 | |
137 | |