]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/totEt/AliAnalysisHadEtCorrections.h
Updating the functionality of AliAnalysisHadEtCorrections to accomodate centrality...
[u/mrichter/AliRoot.git] / PWG4 / totEt / AliAnalysisHadEtCorrections.h
CommitLineData
cf6522d1 1//Created by Christine Nattrass, Rebecca Scott, Irakli Martashvili
020abff0 2//University of Tennessee at Knoxville
cf6522d1 3// This is a container class for the correction factors for the hadronic
4// component of transverse energy
5// It is filled by the output of AliAnalysisTaskHadEt from spinning over Monte
6// Carlo data (using AliAnalysisHadEtMonteCarlo)
7// It is used by AliAnalysisTaskHadEt while spinning over reconstructed data
8// (using AliAnalysisHadEtReconstructed)
020abff0 9//Please see https://twiki.cern.ch/twiki/bin/view/ALICE/ETCaloAnalysis
10#ifndef ALIANALYSISHADETCORRECTIONS_H
11#define ALIANALYSISHADETCORRECTIONS_H
12
020abff0 13#include "TString.h"
45e5a6ec 14#include "TNamed.h"
cf6522d1 15class Rtypes;
45e5a6ec 16class TH1D;
cf6522d1 17class TNamed;
226c54bf 18class TObjArray;
020abff0 19
20class AliAnalysisHadEtCorrections : public TNamed
21{
22public:
23
24 AliAnalysisHadEtCorrections();
25 virtual ~AliAnalysisHadEtCorrections();
45e5a6ec 26 virtual void Init();
27
020abff0 28
29 Float_t GetEtaCut() const {return fEtaCut;}
30 Float_t GetAcceptanceCorrectionFull() const {return fAcceptanceCorrectionFull;}
31 Float_t GetAcceptanceCorrectionEMCAL() const {return fAcceptanceCorrectionEMCAL;}
32 Float_t GetAcceptanceCorrectionPHOS() const {return fAcceptanceCorrectionPHOS;}
33 Float_t GetNeutralCorrection() const {return fNeutralCorrection;}
34 Float_t GetNotHadronicCorrection() const {return fNotHadronicCorrection;}
35 Float_t GetpTCutCorrectionTPC() const {return fpTcutCorrectionTPC;}
36 Float_t GetpTCutCorrectionITS() const {return fpTcutCorrectionITS;}
0e866ddc 37 Float_t GetNotIDConstCorrectionTPC() const {return fNotIDConstTPC;}
38 Float_t GetNotIDConstCorrectionITS() const {return fNotIDConstITS;}
39 Float_t GetNotIDConstCorrectionTPCNoID() const {return fNotIDConstTPCNoID;}
40 Float_t GetNotIDConstCorrectionITSNoID() const {return fNotIDConstITSNoID;}
020abff0 41 Float_t GetNeutralCorrectionLowBound() const {return fNeutralCorrectionLow;}
42 Float_t GetNotHadronicCorrectionLowBound() const {return fNotHadronicCorrectionLow;}
43 Float_t GetpTCutCorrectionTPCLowBound() const {return ffpTcutCorrectionTPCLow;}
44 Float_t GetpTCutCorrectionITSLowBound() const {return ffpTcutCorrectionITSLow;}
45 Float_t GetNeutralCorrectionHighBound() const {return fNeutralCorrectionHigh;}
46 Float_t GetNotHadronicCorrectionHighBound() const {return fNotHadronicCorrectionHigh;}
47 Float_t GetpTCutCorrectionTPCHighBound() const {return ffpTcutCorrectionTPCHigh;}
48 Float_t GetpTCutCorrectionITSHighBound() const {return ffpTcutCorrectionITSHigh;}
0e866ddc 49 Float_t GetNotIDConstCorrectionTPCLowBound() const {return fNotIDConstTPCLow;}
50 Float_t GetNotIDConstCorrectionITSLowBound() const {return fNotIDConstITSLow;}
51 Float_t GetNotIDConstCorrectionTPCNoIDLowBound() const {return fNotIDConstTPCNoIDLow;}
52 Float_t GetNotIDConstCorrectionITSNoIDLowBound() const {return fNotIDConstITSNoIDLow;}
020abff0 53 TH1D *GetNotIDCorrectionTPC() const {return fnotIDTPC;}
54 TH1D *GetNotIDCorrectionITS() const {return fnotIDITS;}
55 TH1D *GetNotIDCorrectionNoPID() const {return fnotIDNoID;}
45f9be5c 56 TH1D *GetEfficiencyPionTPC(const int cb = -1);// const {return fEfficiencyPionTPC;}
57 TH1D *GetEfficiencyKaonTPC(const int cb = -1);// const {return fEfficiencyKaonTPC;}
58 TH1D *GetEfficiencyProtonTPC(const int cb = -1);// const {return fEfficiencyProtonTPC;}
59 TH1D *GetEfficiencyHadronTPC(const int cb = -1);// const {return fEfficiencyHadronTPC;}
60 TH1D *GetEfficiencyPionITS(const int cb = -1);// const {return fEfficiencyPionITS;}
61 TH1D *GetEfficiencyKaonITS(const int cb = -1);// const {return fEfficiencyKaonITS;}
62 TH1D *GetEfficiencyProtonITS(const int cb = -1);// const {return fEfficiencyProtonITS;}
63 TH1D *GetEfficiencyHadronITS(const int cb = -1);// const {return fEfficiencyHadronITS;}
020abff0 64 TH1D *GetBackgroundCorrectionTPC() const {return fBackgroundTPC;}
65 TH1D *GetBackgroundCorrectionITS() const {return fBackgroundITS;}
66
67 //This is stored as the inverse of the correction
0e866ddc 68 Float_t GetNotIDCorrectionTPC(const float pT);//{return 1.0/(fnotIDTPC->GetBinContent(fnotIDTPC->FindBin(pT)));}
69 Float_t GetNotIDCorrectionITS(const float pT);//{return 1.0/(fnotIDITS->GetBinContent(fnotIDITS->FindBin(pT)));}
70 Float_t GetNotIDCorrectionNoPID(const float pT);//{return 1.0/(fnotIDNoID->GetBinContent(fnotIDNoID->FindBin(pT)));}
020abff0 71 //As is this...
226c54bf 72 Float_t GetTPCEfficiencyCorrectionPion(const float pT, const int cb = -1);
73 Float_t GetTPCEfficiencyCorrectionKaon(const float pT, const int cb = -1);
74 Float_t GetTPCEfficiencyCorrectionProton(const float pT, const int cb = -1);
75 Float_t GetTPCEfficiencyCorrectionHadron(const float pT, const int cb = -1);
76 Float_t GetITSEfficiencyCorrectionPion(const float pT, const int cb = -1);
77 Float_t GetITSEfficiencyCorrectionKaon(const float pT, const int cb = -1);
78 Float_t GetITSEfficiencyCorrectionProton(const float pT, const int cb = -1);
79 Float_t GetITSEfficiencyCorrectionHadron(const float pT, const int cb = -1);
020abff0 80 //...and these guys are too
45e5a6ec 81 Float_t GetBackgroundCorrectionTPC(const float pT);//{return (1.0-fBackgroundTPC->GetBinContent(fBackgroundTPC->FindBin(pT)));}
82 Float_t GetBackgroundCorrectionITS(const float pT);//{return (1.0-fBackgroundITS->GetBinContent(fBackgroundITS->FindBin(pT)));}
020abff0 83
84
cf6522d1 85 void SetEtaCut(const Float_t val){fEtaCut=val;}
86 void SetAcceptanceCorrectionFull(const Float_t val){fAcceptanceCorrectionFull=val;}
87 void SetAcceptanceCorrectionEMCAL(const Float_t val){fAcceptanceCorrectionEMCAL=val;}
88 void SetAcceptanceCorrectionPHOS(const Float_t val){fAcceptanceCorrectionPHOS=val;}
89 void SetNeutralCorrection(const Float_t val){fNeutralCorrection=val;}
90 void SetNotHadronicCorrection(const Float_t val){fNotHadronicCorrection=val;}
91 void SetpTCutCorrectionTPC(const Float_t val){fpTcutCorrectionTPC=val;}
92 void SetpTCutCorrectionITS(const Float_t val){fpTcutCorrectionITS=val;}
0e866ddc 93 void SetNotIDConstCorrectionTPC(const Float_t val){fNotIDConstTPC=val;}
94 void SetNotIDConstCorrectionITS(const Float_t val){fNotIDConstITS=val;}
95 void SetNotIDConstCorrectionTPCNoID(const Float_t val){fNotIDConstTPCNoID=val;}
96 void SetNotIDConstCorrectionITSNoID(const Float_t val){fNotIDConstITSNoID=val;}
cf6522d1 97 void SetNeutralCorrectionLowBound(const Float_t val){fNeutralCorrectionLow=val;}
98 void SetNotHadronicCorrectionLowBound(const Float_t val){fNotHadronicCorrectionLow=val;}
99 void SetpTCutCorrectionTPCLowBound(const Float_t val){ffpTcutCorrectionTPCLow=val;}
100 void SetpTCutCorrectionITSLowBound(const Float_t val){ffpTcutCorrectionITSLow=val;}
101 void SetNeutralCorrectionHighBound(const Float_t val){fNeutralCorrectionHigh=val;}
102 void SetNotHadronicCorrectionHighBound(const Float_t val){fNotHadronicCorrectionHigh=val;}
103 void SetpTCutCorrectionTPCHighBound(const Float_t val){ffpTcutCorrectionTPCHigh=val;}
104 void SetpTCutCorrectionITSHighBound(const Float_t val){ffpTcutCorrectionITSHigh=val;}
0e866ddc 105 void SetNotIDConstCorrectionTPCLowBound(const Float_t val){fNotIDConstTPCLow=val;}
106 void SetNotIDConstCorrectionITSLowBound(const Float_t val){fNotIDConstITSLow=val;}
107 void SetNotIDConstCorrectionTPCNoIDLowBound(const Float_t val){fNotIDConstTPCNoIDLow=val;}
108 void SetNotIDConstCorrectionITSNoIDLowBound(const Float_t val){fNotIDConstITSNoIDLow=val;}
109 void SetNotIDConstCorrectionTPCHighBound(const Float_t val){fNotIDConstTPCHigh=val;}
110 void SetNotIDConstCorrectionITSHighBound(const Float_t val){fNotIDConstITSHigh=val;}
111 void SetNotIDConstCorrectionTPCNoIDHighBound(const Float_t val){fNotIDConstTPCNoIDHigh=val;}
112 void SetNotIDConstCorrectionITSNoIDHighBound(const Float_t val){fNotIDConstITSNoIDHigh=val;}
cf6522d1 113 void SetNotIDCorrectionTPC(const TH1D *histo){fnotIDTPC=(TH1D*) histo;}
114 void SetNotIDCorrectionITS(const TH1D *histo){fnotIDITS=(TH1D*) histo;}
115 void SetNotIDCorrectionNoPID(const TH1D *histo){fnotIDNoID=(TH1D*) histo;}
116 void SetEfficiencyPionTPC(const TH1D *histo){fEfficiencyPionTPC=(TH1D*) histo;}
117 void SetEfficiencyKaonTPC(const TH1D *histo){fEfficiencyKaonTPC=(TH1D*) histo;}
118 void SetEfficiencyProtonTPC(const TH1D *histo){fEfficiencyProtonTPC=(TH1D*) histo;}
119 void SetEfficiencyHadronTPC(const TH1D *histo){fEfficiencyHadronTPC=(TH1D*) histo;}
120 void SetEfficiencyPionITS(const TH1D *histo){fEfficiencyPionITS=(TH1D*) histo;}
121 void SetEfficiencyKaonITS(const TH1D *histo){fEfficiencyKaonITS=(TH1D*) histo;}
122 void SetEfficiencyProtonITS(const TH1D *histo){fEfficiencyProtonITS=(TH1D*) histo;}
123 void SetEfficiencyHadronITS(const TH1D *histo){fEfficiencyHadronITS=(TH1D*) histo;}
226c54bf 124 void SetEfficiencyPionTPC(TH1D *histo, const int cb);
125 void SetEfficiencyKaonTPC(TH1D *histo, const int cb);
126 void SetEfficiencyProtonTPC(TH1D *histo, const int cb);
127 void SetEfficiencyHadronTPC(TH1D *histo, const int cb);
128 void SetEfficiencyPionITS(TH1D *histo, const int cb);
129 void SetEfficiencyKaonITS(TH1D *histo, const int cb);
130 void SetEfficiencyProtonITS(TH1D *histo, const int cb);
131 void SetEfficiencyHadronITS(TH1D *histo, const int cb);
cf6522d1 132 void SetBackgroundCorrectionTPC(const TH1D *histo){fBackgroundTPC=(TH1D*) histo;}
133 void SetBackgroundCorrectionITS(const TH1D *histo){fBackgroundITS=(TH1D*) histo;}
45f9be5c 134 void SetEfficiencyErrorLowBound(const Float_t val){fEfficiencyErrorLow=val;}
135 void SetEfficiencyErrorHighBound(const Float_t val){fEfficiencyErrorHigh=val;}
136 void SetBackgroundErrorLowBound(const Float_t val){fBackgroundErrorLow=val;}
137 void SetBackgroundErrorHighBound(const Float_t val){fBackgroundErrorHigh=val;}
226c54bf 138 void IsEMCal(Bool_t val){fIsEMCal=val;}
139 void IsData(Bool_t val){fIsData=val;}
140 void SetDataSet(Int_t val){fDataSet=val;}
141 void SetProduction(char *prod){fProduction = prod;}
142 void SetProductionDescription(char *prod){fProductionDescription = prod;}
143 void Report();//Gives a report on the status of all of the corrections
020abff0 144
3ce6b879 145 //Returns the factor one needs to multiply by to get the corrected et for all constant (not pt dependent) factors
464aa50c 146 Float_t GetConstantCorrections(Bool_t totEt, Float_t ptcut, TString type) const;
d263b18f 147 Float_t GetSystematicErrorBound(Float_t et,Bool_t isLowBound, Bool_t isHadronic, Bool_t isTPC) const;
3ce6b879 148
020abff0 149
150 AliAnalysisHadEtCorrections(const AliAnalysisHadEtCorrections *g) ; // cpy ctor
151 //AliAnalysisHadEtCorrections & operator = (const AliAnalysisHadEtCorrections & g) ;//cpy assignment
152
153protected:
154
155 Float_t fEtaCut;//the eta cut used for this analysis
156 Float_t fAcceptanceCorrectionFull;//the acceptance correction for full azimuthal acceptance
157 Float_t fAcceptanceCorrectionEMCAL;//the acceptance correction for the EMCal azimuthal acceptance
158 Float_t fAcceptanceCorrectionPHOS;//the acceptance correction for the PHOS azimuthal acceptance
159 //Systematic errors - low value, mean value, high value
160 Float_t fNeutralCorrection;//the correction for the fraction of energy from neutral particles (for using both the calorimeters and the tracking detectors)
161 Float_t fNotHadronicCorrection;//the correction for the fraction of energy which is not measured by the tracking detectors
162 Float_t fpTcutCorrectionTPC;//the correction for the momentum cut for the tpc (150 MeV/c)
163 Float_t fpTcutCorrectionITS;//the correction for the momentum cut for the ITS (100 MeV/c)
0e866ddc 164 Float_t fNotIDConstTPC;//the correction for the constant correction for unidentified particles with the TPC momentum cut
165 Float_t fNotIDConstITS;//the correction for the constant correction for unidentified particles with the ITS momentum cut
166 Float_t fNotIDConstTPCNoID;//the correction for the constant correction for unidentified particles with the TPC momentum cut if no PID was done
167 Float_t fNotIDConstITSNoID;//the correction for the constant correction for unidentified particles with the ITS momentum cut if no PID was done
020abff0 168 Float_t fNeutralCorrectionLow;//the low bound on the neutral energy fraction correction
169 Float_t fNotHadronicCorrectionLow;//the low bound on the hadronic energy fraction correction
170 Float_t ffpTcutCorrectionTPCLow;//the low bound on the TPC momentum cut correction
171 Float_t ffpTcutCorrectionITSLow;//the low bound on the ITS momentum cut correction
172 Float_t fNeutralCorrectionHigh;//the high bound on the neutral energy correcton
173 Float_t fNotHadronicCorrectionHigh;//the high bound on the hadronic energy correction
174 Float_t ffpTcutCorrectionTPCHigh;//the high bound on the TPC momentum cut correction
175 Float_t ffpTcutCorrectionITSHigh;//the high bound on the ITS momentum cut correction
0e866ddc 176 Float_t fNotIDConstTPCLow;//the correction for the constant correction for unidentified particles with the TPC momentum cut
177 Float_t fNotIDConstITSLow;//the correction for the constant correction for unidentified particles with the ITS momentum cut
178 Float_t fNotIDConstTPCNoIDLow;//the correction for the constant correction for unidentified particles with the TPC momentum cut if no PID was done
179 Float_t fNotIDConstITSNoIDLow;//the correction for the constant correction for unidentified particles with the ITS momentum cut if no PID was done
180 Float_t fNotIDConstTPCHigh;//the correction for the constant correction for unidentified particles with the TPC momentum cut
181 Float_t fNotIDConstITSHigh;//the correction for the constant correction for unidentified particles with the ITS momentum cut
182 Float_t fNotIDConstTPCNoIDHigh;//the correction for the constant correction for unidentified particles with the TPC momentum cut if no PID was done
183 Float_t fNotIDConstITSNoIDHigh;//the correction for the constant correction for unidentified particles with the ITS momentum cut if no PID was done
020abff0 184
464aa50c 185 //Histograms with the pT dependent fCorrections
020abff0 186 TH1D *fnotIDTPC;//correction for unidentified tracks in the TPC
187 TH1D *fnotIDITS;//correction for unidentified tracks in the ITS
188 TH1D *fnotIDNoID;//correction for unidentified tracks assuming no ID
189 TH1D *fEfficiencyPionTPC;//efficiency correction for pions in the TPC
190 TH1D *fEfficiencyKaonTPC;//efficiency correction for kaons in the TPC
191 TH1D *fEfficiencyProtonTPC;//efficiency correction for protons in the TPC
192 TH1D *fEfficiencyHadronTPC;//efficiency correction for unidentified hadrons in the TPC
193 TH1D *fEfficiencyPionITS;//efficiency correction for pions in the ITS
194 TH1D *fEfficiencyKaonITS;//efficiency correction for kaons in the ITS
195 TH1D *fEfficiencyProtonITS;//efficiency correction for protons in the ITS
196 TH1D *fEfficiencyHadronITS;//efficiency correction for unidentified hadrons in the ITS
226c54bf 197 TObjArray *fEfficiencyTPC;//TList containing efficiencies for ITS standalone tracks for different centrality bins
198 TObjArray *fEfficiencyITS;//TList containing efficiencies for ITS standalone tracks for different centrality bins
45f9be5c 199 Float_t fEfficiencyErrorLow;//Relative error on efficiency, lower bound
200 Float_t fEfficiencyErrorHigh;//Relative error on efficiency, upper bound
201 Float_t fBackgroundErrorLow;//Relative error on efficiency, lower bound
202 Float_t fBackgroundErrorHigh;//Relative error on efficiency, upper bound
020abff0 203 TH1D *fBackgroundTPC;//background correction for the TPC
204 TH1D *fBackgroundITS;//background correction for the ITS
226c54bf 205 Bool_t fIsEMCal;//boolean to keep track of whether this is for EMCal or PHOS acceptance
206 Bool_t fIsData;//boolean to keep track of whether this is for data or simulation acceptance
207 Int_t fDataSet;//integer to keep track of data set
208 TString fProduction;//Short version name of production
209 TString fProductionDescription;//Long description of production
020abff0 210
211
212
213private:
214 //Declare it private to avoid compilation warning
215 AliAnalysisHadEtCorrections & operator = (const AliAnalysisHadEtCorrections & g) ;//cpy assignment
216 AliAnalysisHadEtCorrections(const AliAnalysisHadEtCorrections & g) ; // cpy ctor
217
218 ClassDef(AliAnalysisHadEtCorrections, 1);
219};
220
221#endif // ALIANALYSISHADETCORRECTIONS_H