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