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