]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/totEt/AliAnalysisHadEtCorrections.cxx
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWGLF / totEt / AliAnalysisHadEtCorrections.cxx
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#include "AliAnalysisHadEtCorrections.h"
11#include "TMath.h"
12#include <iostream>
13#include "Rtypes.h"
226c54bf 14#include "TObjArray.h"
15#include "AliLog.h"
45e5a6ec 16#include "TH1D.h"
020abff0 17
18using namespace std;
19
20ClassImp(AliAnalysisHadEtCorrections);
21
22
23AliAnalysisHadEtCorrections::AliAnalysisHadEtCorrections() : TNamed(),
0e866ddc 24 fEtaCut(0)
25 ,fAcceptanceCorrectionFull(0)
26 ,fAcceptanceCorrectionEMCAL(0)
27 ,fAcceptanceCorrectionPHOS(0)
28 ,fNeutralCorrection(0)
29 ,fNotHadronicCorrection(0)
30 ,fpTcutCorrectionTPC(0)
31 ,fpTcutCorrectionITS(0)
32 ,fNotIDConstTPC(0)
33 ,fNotIDConstITS(0)
34 ,fNotIDConstTPCNoID(0)
35 ,fNotIDConstITSNoID(0)
36 ,fNeutralCorrectionLow(0)
37 ,fNotHadronicCorrectionLow(0)
38 ,ffpTcutCorrectionTPCLow(0)
39 ,ffpTcutCorrectionITSLow(0)
40 ,fNeutralCorrectionHigh(0)
41 ,fNotHadronicCorrectionHigh(0)
42 ,ffpTcutCorrectionTPCHigh(0)
43 ,ffpTcutCorrectionITSHigh(0)
44 ,fNotIDConstTPCLow(0)
45 ,fNotIDConstITSLow(0)
46 ,fNotIDConstTPCNoIDLow(0)
47 ,fNotIDConstITSNoIDLow(0)
48 ,fNotIDConstTPCHigh(0)
49 ,fNotIDConstITSHigh(0)
50 ,fNotIDConstTPCNoIDHigh(0)
51 ,fNotIDConstITSNoIDHigh(0)
52 ,fnotIDTPC(0)
53 ,fnotIDITS(0)
54 ,fnotIDNoID(0)
55 ,fEfficiencyPionTPC(0)
56 ,fEfficiencyKaonTPC(0)
57 ,fEfficiencyProtonTPC(0)
58 ,fEfficiencyHadronTPC(0)
59 ,fEfficiencyPionITS(0)
60 ,fEfficiencyKaonITS(0)
61 ,fEfficiencyProtonITS(0)
62 ,fEfficiencyHadronITS(0)
61e9e643 63 ,fEfficiencyTPC(0)
64 ,fEfficiencyITS(0)
45f9be5c 65 ,fEfficiencyErrorLow(0)
66 ,fEfficiencyErrorHigh(0)
67 ,fBackgroundErrorLow(0)
68 ,fBackgroundErrorHigh(0)
0e866ddc 69 ,fBackgroundTPC(0)
70 ,fBackgroundITS(0)
226c54bf 71 ,fIsEMCal(kTRUE)
72 ,fIsData(kFALSE)
73 ,fDataSet(2009)
74 ,fProduction("ProductionName")
75 ,fProductionDescription("Long production description")
020abff0 76{//default constructor
c32af3dd 77 Init();
78}
c32af3dd 79void AliAnalysisHadEtCorrections::Init()
80{ //This seems to solve a compiler error
45e5a6ec 81 cout<<"Creating new AliAnalysisHadEtCorrections"<<endl;
82 fEfficiencyTPC = new TObjArray();
83 fEfficiencyITS = new TObjArray();
020abff0 84}
c32af3dd 85
020abff0 86AliAnalysisHadEtCorrections::~AliAnalysisHadEtCorrections()
87{//destructor
88 //Clear();
951efd81 89 fnotIDTPC->Clear();
90 fnotIDITS->Clear();
91 fnotIDNoID->Clear();
92 fEfficiencyPionTPC->Clear();
93 fEfficiencyKaonTPC->Clear();
94 fEfficiencyProtonTPC->Clear();
95 fEfficiencyHadronTPC->Clear();
96 fEfficiencyPionITS->Clear();
97 fEfficiencyKaonITS->Clear();
98 fEfficiencyProtonITS->Clear();
99 fEfficiencyHadronITS->Clear();
100 fBackgroundTPC->Clear();
101 fBackgroundITS->Clear();
020abff0 102 delete fnotIDTPC;
103 delete fnotIDITS;
104 delete fnotIDNoID;
105 delete fEfficiencyPionTPC;
106 delete fEfficiencyKaonTPC;
107 delete fEfficiencyProtonTPC;
108 delete fEfficiencyHadronTPC;
109 delete fEfficiencyPionITS;
110 delete fEfficiencyKaonITS;
111 delete fEfficiencyProtonITS;
112 delete fEfficiencyHadronITS;
226c54bf 113 delete fEfficiencyTPC;
114 delete fEfficiencyITS;
020abff0 115 delete fBackgroundTPC;
116 delete fBackgroundITS;
020abff0 117}
118AliAnalysisHadEtCorrections::AliAnalysisHadEtCorrections(const AliAnalysisHadEtCorrections *g): TNamed(),
0e866ddc 119 fEtaCut(g->fEtaCut)
120 ,fAcceptanceCorrectionFull(g->fAcceptanceCorrectionFull)
121 ,fAcceptanceCorrectionEMCAL(g->fAcceptanceCorrectionEMCAL)
122 ,fAcceptanceCorrectionPHOS(g->fAcceptanceCorrectionPHOS)
123 ,fNeutralCorrection(g->fNeutralCorrection)
124 ,fNotHadronicCorrection(g->fNotHadronicCorrection)
125 ,fpTcutCorrectionTPC(g->fpTcutCorrectionTPC)
126 ,fpTcutCorrectionITS(g->fpTcutCorrectionITS)
127 ,fNotIDConstTPC(g->fNotIDConstTPC)
128 ,fNotIDConstITS(g->fNotIDConstITS)
129 ,fNotIDConstTPCNoID(g->fNotIDConstTPCNoID)
130 ,fNotIDConstITSNoID(g->fNotIDConstITSNoID)
131 ,fNeutralCorrectionLow(g->fNeutralCorrectionLow)
132 ,fNotHadronicCorrectionLow(g->fNotHadronicCorrectionLow)
133 ,ffpTcutCorrectionTPCLow(g->ffpTcutCorrectionTPCLow)
134 ,ffpTcutCorrectionITSLow(g->ffpTcutCorrectionITSLow)
135 ,fNeutralCorrectionHigh(g->fNeutralCorrectionHigh)
136 ,fNotHadronicCorrectionHigh(g->fNotHadronicCorrectionHigh)
137 ,ffpTcutCorrectionTPCHigh(g->ffpTcutCorrectionTPCHigh)
138 ,ffpTcutCorrectionITSHigh(g->ffpTcutCorrectionITSHigh)
139 ,fNotIDConstTPCLow(g->fNotIDConstTPCLow)
140 ,fNotIDConstITSLow(g->fNotIDConstITSLow)
141 ,fNotIDConstTPCNoIDLow(g->fNotIDConstTPCNoIDLow)
142 ,fNotIDConstITSNoIDLow(g->fNotIDConstITSNoIDLow)
143 ,fNotIDConstTPCHigh(g->fNotIDConstTPCHigh)
144 ,fNotIDConstITSHigh(g->fNotIDConstITSHigh)
145 ,fNotIDConstTPCNoIDHigh(g->fNotIDConstTPCNoIDHigh)
146 ,fNotIDConstITSNoIDHigh(g->fNotIDConstITSNoIDHigh)
147 ,fnotIDTPC(0)
148 ,fnotIDITS(0)
149 ,fnotIDNoID(0)
150 ,fEfficiencyPionTPC(0)
151 ,fEfficiencyKaonTPC(0)
152 ,fEfficiencyProtonTPC(0)
153 ,fEfficiencyHadronTPC(0)
154 ,fEfficiencyPionITS(0)
155 ,fEfficiencyKaonITS(0)
156 ,fEfficiencyProtonITS(0)
157 ,fEfficiencyHadronITS(0)
226c54bf 158 ,fEfficiencyTPC(0)
159 ,fEfficiencyITS(0)
45f9be5c 160 ,fEfficiencyErrorLow(g->fEfficiencyErrorLow)
161 ,fEfficiencyErrorHigh(g->fEfficiencyErrorHigh)
162 ,fBackgroundErrorLow(g->fBackgroundErrorLow)
163 ,fBackgroundErrorHigh(g->fBackgroundErrorHigh)
0e866ddc 164 ,fBackgroundTPC(0)
165 ,fBackgroundITS(0)
226c54bf 166 ,fIsEMCal(g->fIsEMCal)
167 ,fIsData(g->fIsData)
168 ,fDataSet(g->fDataSet)
169 ,fProduction(g->fProduction)
170 ,fProductionDescription(g->fProductionDescription)
020abff0 171{//copy constructor
172 //SetName(g->GetName());
173 fnotIDTPC = new TH1D(*(g->fnotIDTPC));
174 fnotIDITS = new TH1D(*(g->fnotIDITS));
175 fnotIDNoID = new TH1D(*(g->fnotIDNoID));
176 fEfficiencyPionTPC = new TH1D(*(g->fEfficiencyPionTPC));
177 fEfficiencyKaonTPC = new TH1D(*(g->fEfficiencyKaonTPC));
178 fEfficiencyProtonTPC = new TH1D(*(g->fEfficiencyProtonTPC));
179 fEfficiencyHadronTPC = new TH1D(*(g->fEfficiencyHadronTPC));
180 fEfficiencyPionITS = new TH1D(*(g->fEfficiencyPionITS));
181 fEfficiencyKaonITS = new TH1D(*(g->fEfficiencyKaonITS));
182 fEfficiencyProtonITS = new TH1D(*(g->fEfficiencyProtonITS));
183 fEfficiencyHadronITS = new TH1D(*(g->fEfficiencyHadronITS));
226c54bf 184 fEfficiencyTPC = new TObjArray(*(g->fEfficiencyTPC));
185 fEfficiencyITS = new TObjArray(*(g->fEfficiencyITS));
020abff0 186 fBackgroundTPC = new TH1D(*(g->fBackgroundTPC));
187 fBackgroundITS = new TH1D(*(g->fBackgroundITS));
188}
189
3ce6b879 190
464aa50c 191Float_t AliAnalysisHadEtCorrections::GetConstantCorrections(Bool_t totEt, Float_t ptcut, TString type) const {//Get the correction values that are not pt dependent
3ce6b879 192 Float_t acceptance = 0.0;
193 Float_t neutral = 0.0;
194 Float_t ptcorr = 0.0;
195 float correction = 0.0;
196
197 //TString *type = new TString(mytype);
198
3dd386ab 199 if(type.Contains("Full") || type.Contains("PiKP")) acceptance = fAcceptanceCorrectionFull;
3ce6b879 200 if(type.Contains("EMCAL")) acceptance = fAcceptanceCorrectionEMCAL;
201 if(type.Contains("PHOS")) acceptance = fAcceptanceCorrectionPHOS;
202
025a0bb1 203 if(totEt) neutral = fNotHadronicCorrection;
204 else{neutral = fNeutralCorrection;}
205 if(ptcut>0.12){ptcorr = fpTcutCorrectionTPC;}
206 else{ptcorr = fpTcutCorrectionITS;}
207
3dd386ab 208 if(type.Contains("PiKP")){
209 if(ptcut>0.12){ptcorr = fpTcutCorrectionTPC;}
210 else{ptcorr = fpTcutCorrectionITS;}
211 if(type.Contains("High")){
212 if(ptcut>0.12){ptcorr = ffpTcutCorrectionTPCHigh;}
213 else{ptcorr = ffpTcutCorrectionITSHigh;}
214 }
215 if(type.Contains("Low")){
216 if(ptcut>0.12){ptcorr = ffpTcutCorrectionTPCLow;}
217 else{ptcorr = ffpTcutCorrectionITSLow;}
218 }
025a0bb1 219 neutral = 1.0;
3dd386ab 220 }
221
3ce6b879 222 if(type.Contains("High")){//high bound
223 if(totEt) neutral = fNotHadronicCorrectionHigh;
224 else{neutral = fNeutralCorrectionHigh;}
225 if(ptcut>0.12){ptcorr = ffpTcutCorrectionTPCHigh;}
226 else{ptcorr = ffpTcutCorrectionITSHigh;}
227 cout<<"Setting correction factor to "<<correction<<endl;
228 return correction;
229 }
230 if(type.Contains("Low")){//high bound
231 if(totEt) neutral = fNotHadronicCorrectionLow;
232 else{neutral = fNeutralCorrectionLow;}
233 if(ptcut>0.12){ptcorr = ffpTcutCorrectionTPCLow;}
234 else{ptcorr = ffpTcutCorrectionITSLow;}
235 cout<<"Setting correction factor to "<<correction<<endl;
236 return correction;
237 }
025a0bb1 238
239
3ce6b879 240 correction = acceptance*neutral*ptcorr;
025a0bb1 241 cout<<"correction "<<correction<<" = "<<acceptance<<"*"<<neutral<<"*"<<ptcorr<<endl;
3ce6b879 242 cout<<"Setting correction factor for ";
243 if(totEt) cout<<"total et";
244 else{cout<<"hadronic et";}
245 cout<<" with the pt cut off "<<ptcut<<" for "<<type<<" acceptance to "<<correction<<endl;
45f9be5c 246 //cout<<" Acceptance "<<acceptance<<" neutral "<<neutral<<" ptcorr "<<ptcorr<<endl;
3ce6b879 247 return correction;
248
249}
d263b18f 250Float_t AliAnalysisHadEtCorrections::GetSystematicErrorBound(Float_t et,Bool_t isLowBound, Bool_t isHadronic, Bool_t isTPC) const{
45f9be5c 251 //we calculate factors for each value and then multiply them to get the overall bounds
252 //neutral corrections, pt cut, pid, efficiency, background
08b0a2a2 253
254// Float_t neutral = fNeutralCorrection;
255// if(!isHadronic) neutral = fNotHadronicCorrection;
256// Float_t ptcut = fpTcutCorrectionTPC;
257// if(!isTPC) ptcut = fpTcutCorrectionITS;
258// Float_t pid = fNotIDConstTPC;
259// Float_t efficiency = (fEfficiencyErrorHigh+fEfficiencyErrorLow)/2.0;
260// Float_t background = fBackground;
261
262 Float_t neutralFracErr = (fNeutralCorrection - fNeutralCorrectionLow)/fNeutralCorrection;
263 if(!isHadronic){
264 neutralFracErr = (fNotHadronicCorrection - fNotHadronicCorrectionLow)/fNotHadronicCorrection;
265 }
266 Float_t ptcutFracErr = (ffpTcutCorrectionTPCHigh-fpTcutCorrectionTPC)/fpTcutCorrectionTPC;
267 if(!isTPC){
268 ptcutFracErr = (ffpTcutCorrectionTPCHigh-fpTcutCorrectionTPC)/fpTcutCorrectionTPC;
45f9be5c 269 }
08b0a2a2 270 Float_t pidFracErr = (fNotIDConstTPCHigh-fNotIDConstTPC)/fNotIDConstTPC;
271 Float_t efficiencyFracErr = (fEfficiencyErrorHigh-fEfficiencyErrorLow)/2.0;
272 Float_t backgroundFracErr = (fBackgroundErrorHigh-fBackgroundErrorLow)/2.0;
273 Float_t fracerr = TMath::Sqrt(neutralFracErr*neutralFracErr+ptcutFracErr*ptcutFracErr+pidFracErr*pidFracErr+efficiencyFracErr*efficiencyFracErr+backgroundFracErr*backgroundFracErr);
274 //cout<<"fracerrs neutral "<<neutralFracErr<<" ptcut "<<ptcutFracErr<<" pid "<<pidFracErr<<" efficiency "<<efficiencyFracErr<<" bkgd "<<backgroundFracErr<<" total fracerr "<<fracerr<<endl;
275 if(isLowBound){
276 return et*(1.0-fracerr);
45f9be5c 277 }
08b0a2a2 278 else{
279 return et*(1.0+fracerr);
280 }
281
282// Float_t neutral = 1.0;
283// Float_t ptcut = 1.0;
284// Float_t pid = 1.0;
285// Float_t efficiency = 1.0;
286// Float_t background = 1.0;
287// if(isLowBound){//is lower bound
288// if(isHadronic) neutral= fNeutralCorrectionLow/fNeutralCorrection;
289// else{neutral = fNotHadronicCorrectionLow/fNotHadronicCorrection;}
290// if(isTPC) ptcut = ffpTcutCorrectionTPCLow/fpTcutCorrectionTPC;
291// else{ptcut = ffpTcutCorrectionITSLow/fpTcutCorrectionITS;}
292// pid = fNotIDConstTPCLow/fNotIDConstTPC;
293// efficiency = fEfficiencyErrorLow;
294// background = fBackgroundErrorLow;
295// }
296// else{//is higher bound
297// if(isHadronic) neutral= fNeutralCorrectionHigh/fNeutralCorrection;
298// else{neutral= fNotHadronicCorrectionHigh/fNotHadronicCorrection;}
299// if(isTPC) ptcut = ffpTcutCorrectionTPCHigh/fpTcutCorrectionTPC;
300// else{ptcut = ffpTcutCorrectionITSHigh/fpTcutCorrectionITS;}
301// pid = fNotIDConstTPCHigh/fNotIDConstTPC;
302// efficiency = fEfficiencyErrorHigh;
303// background = fBackgroundErrorHigh;
304// }
305// //cout<<"neutral "<<neutral<<" ptcut "<<ptcut<<" pid "<<pid<<" efficiency "<<efficiency<<" background "<<background<<" overall "<<neutral*ptcut*pid*efficiency*background<<endl;
306// return neutral*ptcut*pid*efficiency*background*et;
45f9be5c 307}
020abff0 308// AliAnalysisHadEtCorrections & operator = (const AliAnalysisHadEtCorrections & g) {
309
310// fEtaCut=g->fEtaCut;
311// fAcceptanceCorrectionFull=g->fAcceptanceCorrectionFull;
312// fAcceptanceCorrectionEMCAL=g->fAcceptanceCorrectionEMCAL;
313// fAcceptanceCorrectionPHOS=g->fAcceptanceCorrectionPHOS;
314// fNeutralCorrection=g->fNeutralCorrection;
315// fNotHadronicCorrection=g->fNotHadronicCorrection;
316// fpTcutCorrectionTPC=g->fpTcutCorrectionTPC;
317// fpTcutCorrectionITS=g->fpTcutCorrectionITS;
318// fNeutralCorrectionLow=g->fNeutralCorrectionLow;
319// fNotHadronicCorrectionLow=g->fNotHadronicCorrectionLow;
320// ffpTcutCorrectionTPCLow=g->ffpTcutCorrectionTPCLow;
321// ffpTcutCorrectionITSLow=g->ffpTcutCorrectionITSLow;
322// fNeutralCorrectionHigh=g->fNeutralCorrectionHigh;
323// fNotHadronicCorrectionHigh=g->fNotHadronicCorrectionHigh;
324// ffpTcutCorrectionTPCHigh=g->ffpTcutCorrectionTPCHigh;
325// ffpTcutCorrectionITSHigh=g->ffpTcutCorrectionITSHigh;
326
327// fnotIDTPC = g->fnotIDTPC;
328// fnotIDITS = g->fnotIDITS;
329// fnotIDNoID = g->fnotIDNoID;
330// fEfficiencyPionTPC = g->fEfficiencyPionTPC;
331// fEfficiencyKaonTPC = g->fEfficiencyKaonTPC;
332// fEfficiencyProtonTPC = g->fEfficiencyProtonTPC;
333// fEfficiencyHadronTPC = g->fEfficiencyHadronTPC;
334// fEfficiencyPionITS = g->fEfficiencyPionITS;
335// fEfficiencyKaonITS = g->fEfficiencyKaonITS;
336// fEfficiencyProtonITS = g->fEfficiencyProtonITS;
337// fEfficiencyHadronITS = g->fEfficiencyHadronITS;
338// fBackgroundTPC = g->fBackgroundTPC;
339// fBackgroundITS = g->fBackgroundITS;
340// }
45f9be5c 341TH1D *AliAnalysisHadEtCorrections::GetEfficiencyPionTPC(const int cb){//Get centrality dependent efficiency
342 if(cb==-1){return fEfficiencyPionTPC;}
343 else{return (TH1D*) fEfficiencyTPC->FindObject(Form("fEfficiencyPionTPC%i",cb));}
344}
345TH1D *AliAnalysisHadEtCorrections::GetEfficiencyKaonTPC(const int cb){//Get centrality dependent efficiency
346 if(cb==-1){return fEfficiencyKaonTPC;}
347 else{return (TH1D*) fEfficiencyTPC->FindObject(Form("fEfficiencyKaonTPC%i",cb));}
348}
349TH1D *AliAnalysisHadEtCorrections::GetEfficiencyProtonTPC(const int cb){//Get centrality dependent efficiency
350 if(cb==-1){return fEfficiencyProtonTPC;}
351 else{return (TH1D*) fEfficiencyTPC->FindObject(Form("fEfficiencyProtonTPC%i",cb));}
352}
353TH1D *AliAnalysisHadEtCorrections::GetEfficiencyHadronTPC(const int cb){//Get centrality dependent efficiency
354 if(cb==-1){return fEfficiencyHadronTPC;}
355 else{return (TH1D*) fEfficiencyTPC->FindObject(Form("fEfficiencyHadronTPC%i",cb));}
356}
357TH1D *AliAnalysisHadEtCorrections::GetEfficiencyPionITS(const int cb){//Get centrality dependent efficiency
358 if(cb==-1){return fEfficiencyPionITS;}
359 else{return (TH1D*) fEfficiencyITS->FindObject(Form("fEfficiencyPionITS%i",cb));}
360}
361TH1D *AliAnalysisHadEtCorrections::GetEfficiencyKaonITS(const int cb){//Get centrality dependent efficiency
362 if(cb==-1){return fEfficiencyKaonITS;}
363 else{return (TH1D*) fEfficiencyITS->FindObject(Form("fEfficiencyKaonITS%i",cb));}
364}
365TH1D *AliAnalysisHadEtCorrections::GetEfficiencyProtonITS(const int cb){//Get centrality dependent efficiency
366 if(cb==-1){return fEfficiencyProtonITS;}
367 else{return (TH1D*) fEfficiencyITS->FindObject(Form("fEfficiencyProtonITS%i",cb));}
368}//Proton
369TH1D *AliAnalysisHadEtCorrections::GetEfficiencyHadronITS(const int cb){//Get centrality dependent efficiency
370 if(cb==-1){return fEfficiencyHadronITS;}
371 else{return (TH1D*) fEfficiencyITS->FindObject(Form("fEfficiencyHadronITS%i",cb));}
372}
226c54bf 373Float_t AliAnalysisHadEtCorrections::GetTPCEfficiencyCorrectionPion(const float pT, const int cb){//Get the efficiency for reconstructing a pion in the TPC
374 float eff = -1.0;
375 if(cb ==-1){//pp
376 if(!fEfficiencyPionTPC){cerr<<"No histogram fEfficiencyPionTPC!"<<endl; return -1.0;}
377 eff = fEfficiencyPionTPC->GetBinContent(fEfficiencyPionTPC->FindBin(pT));
45e5a6ec 378 if(eff<=0.0){AliInfo("Efficiency is zero!"); return 0.0;}
226c54bf 379 }
380 else{
381 TH1D *fEfficiency = (TH1D*) fEfficiencyTPC->FindObject(Form("fEfficiencyPionTPC%i",cb));
382 if(!fEfficiency){cerr<<"No histogram "<<Form("fEfficiencyPionTPC%i",cb)<<endl; return -1.0;}
383 eff = fEfficiency->GetBinContent(fEfficiency->FindBin(pT));
45e5a6ec 384 if(eff<=0.0){AliInfo(Form("Pion efficiency is zero for centrality bin %i!",cb)); return 0.0;}
226c54bf 385 }
a02dfa56 386 return 1.0/eff;
387}
226c54bf 388Float_t AliAnalysisHadEtCorrections::GetTPCEfficiencyCorrectionKaon(const float pT, const int cb){//Get the efficiency for reconstructing a kaon in the TPC
389 float eff = -1.0;
390 if(cb ==-1){//pp
391 if(!fEfficiencyKaonTPC){cerr<<"No histogram fEfficiencyKaonTPC!"<<endl; return -1.0;}
392 eff = fEfficiencyKaonTPC->GetBinContent(fEfficiencyKaonTPC->FindBin(pT));
45e5a6ec 393 if(eff<=0.0){AliInfo("Efficiency is zero!"); return 0.0;}
226c54bf 394 }
395 else{
396 TH1D *fEfficiency = (TH1D*) fEfficiencyTPC->FindObject(Form("fEfficiencyKaonTPC%i",cb));
397 if(!fEfficiency){cerr<<"No histogram "<<Form("fEfficiencyKaonTPC%i",cb)<<endl; return -1.0;}
398 eff = fEfficiency->GetBinContent(fEfficiency->FindBin(pT));
45e5a6ec 399 if(eff<=0.0){AliInfo(Form("Pion efficiency is zero for centrality bin %i!",cb)); return 0.0;}
226c54bf 400 }
a02dfa56 401 return 1.0/eff;
402}
226c54bf 403Float_t AliAnalysisHadEtCorrections::GetTPCEfficiencyCorrectionProton(const float pT, const int cb){//Get the efficiency for reconstructing a proton in the TPC
404 float eff = -1.0;
405 if(cb ==-1){//pp
406 if(!fEfficiencyProtonTPC){cerr<<"No histogram fEfficiencyProtonTPC!"<<endl; return -1.0;}
407 eff = fEfficiencyProtonTPC->GetBinContent(fEfficiencyProtonTPC->FindBin(pT));
45e5a6ec 408 if(eff<=0.0){AliInfo("Efficiency is zero!"); return 0.0;}
226c54bf 409 }
410 else{
411 TH1D *fEfficiency = (TH1D*) fEfficiencyTPC->FindObject(Form("fEfficiencyProtonTPC%i",cb));
412 if(!fEfficiency){cerr<<"No histogram "<<Form("fEfficiencyProtonTPC%i",cb)<<endl; return -1.0;}
413 eff = fEfficiency->GetBinContent(fEfficiency->FindBin(pT));
45e5a6ec 414 if(eff<=0.0){AliInfo(Form("Pion efficiency is zero for centrality bin %i!",cb)); return 0.0;}
226c54bf 415 }
a02dfa56 416 return 1.0/eff;
417}
226c54bf 418Float_t AliAnalysisHadEtCorrections::GetTPCEfficiencyCorrectionHadron(const float pT, const int cb){//Get the efficiency for reconstructing a hadron in the TPC
419 float eff = -1.0;
420 if(cb ==-1){//pp
421 if(!fEfficiencyHadronTPC){cerr<<"No histogram fEfficiencyHadronTPC!"<<endl; return -1.0;}
422 eff = fEfficiencyHadronTPC->GetBinContent(fEfficiencyHadronTPC->FindBin(pT));
45e5a6ec 423 if(eff<=0.0){AliInfo("Efficiency is zero!"); return 0.0;}
226c54bf 424 }
425 else{
426 TH1D *fEfficiency = (TH1D*) fEfficiencyTPC->FindObject(Form("fEfficiencyHadronTPC%i",cb));
427 if(!fEfficiency){cerr<<"No histogram "<<Form("fEfficiencyHadronTPC%i",cb)<<endl; return -1.0;}
428 eff = fEfficiency->GetBinContent(fEfficiency->FindBin(pT));
45e5a6ec 429 if(eff<=0.0){AliInfo(Form("Pion efficiency is zero for centrality bin %i!",cb)); return 0.0;}
226c54bf 430 }
a02dfa56 431 return 1.0/eff;
432}
226c54bf 433Float_t AliAnalysisHadEtCorrections::GetITSEfficiencyCorrectionPion(const float pT, const int cb){//Get the efficiency for reconstructing a pion in the ITS
434 float eff = -1.0;
435 if(cb ==-1){//pp
436 if(!fEfficiencyPionITS){cerr<<"No histogram fEfficiencyPionITS!"<<endl; return -1.0;}
437 eff = fEfficiencyPionITS->GetBinContent(fEfficiencyPionITS->FindBin(pT));
45e5a6ec 438 if(eff<=0.0){AliInfo("Efficiency is zero!"); return 0.0;}
226c54bf 439 }
440 else{
441 TH1D *fEfficiency = (TH1D*) fEfficiencyITS->FindObject(Form("fEfficiencyPionITS%i",cb));
442 if(!fEfficiency){cerr<<"No histogram "<<Form("fEfficiencyPionITS%i",cb)<<endl; return -1.0;}
443 eff = fEfficiency->GetBinContent(fEfficiency->FindBin(pT));
45e5a6ec 444 if(eff<=0.0){AliInfo(Form("Pion efficiency is zero for centrality bin %i!",cb)); return 0.0;}
226c54bf 445 }
a02dfa56 446 return 1.0/eff;
447}
226c54bf 448Float_t AliAnalysisHadEtCorrections::GetITSEfficiencyCorrectionKaon(const float pT, const int cb){//Get the efficiency for reconstructing a kaon in the ITS
449 float eff = -1.0;
450 if(cb ==-1){//pp
451 if(!fEfficiencyKaonITS){cerr<<"No histogram fEfficiencyKaonITS!"<<endl; return -1.0;}
452 eff = fEfficiencyKaonITS->GetBinContent(fEfficiencyKaonITS->FindBin(pT));
45e5a6ec 453 if(eff<=0.0){AliInfo("Efficiency is zero!"); return 0.0;}
226c54bf 454 }
455 else{
456 TH1D *fEfficiency = (TH1D*) fEfficiencyITS->FindObject(Form("fEfficiencyKaonITS%i",cb));
457 if(!fEfficiency){cerr<<"No histogram "<<Form("fEfficiencyKaonITS%i",cb)<<endl; return -1.0;}
458 eff = fEfficiency->GetBinContent(fEfficiency->FindBin(pT));
45e5a6ec 459 if(eff<=0.0){AliInfo(Form("Pion efficiency is zero for centrality bin %i!",cb)); return 0.0;}
226c54bf 460 }
a02dfa56 461 return 1.0/eff;
462}
226c54bf 463Float_t AliAnalysisHadEtCorrections::GetITSEfficiencyCorrectionProton(const float pT, const int cb){//Get the efficiency for reconstructing a proton in the ITS
464 float eff = -1.0;
465 if(cb ==-1){//pp
466 if(!fEfficiencyProtonITS){cerr<<"No histogram fEfficiencyProtonITS!"<<endl; return -1.0;}
467 eff = fEfficiencyProtonITS->GetBinContent(fEfficiencyProtonITS->FindBin(pT));
45e5a6ec 468 if(eff<=0.0){AliInfo("Efficiency is zero!"); return 0.0;}
226c54bf 469 }
470 else{
471 TH1D *fEfficiency = (TH1D*) fEfficiencyITS->FindObject(Form("fEfficiencyProtonITS%i",cb));
472 if(!fEfficiency){cerr<<"No histogram "<<Form("fEfficiencyProtonITS%i",cb)<<endl; return -1.0;}
473 eff = fEfficiency->GetBinContent(fEfficiency->FindBin(pT));
45e5a6ec 474 if(eff<=0.0){AliInfo(Form("Pion efficiency is zero for centrality bin %i!",cb)); return 0.0;}
226c54bf 475 }
a02dfa56 476 return 1.0/eff;
477}
226c54bf 478Float_t AliAnalysisHadEtCorrections::GetITSEfficiencyCorrectionHadron(const float pT, const int cb){//Get the efficiency for reconstructing a hadron in the ITS
479 float eff = -1.0;
480 if(cb ==-1){//pp
481 if(!fEfficiencyHadronITS){cerr<<"No histogram fEfficiencyHadronITS!"<<endl; return -1.0;}
482 eff = fEfficiencyHadronITS->GetBinContent(fEfficiencyHadronITS->FindBin(pT));
45e5a6ec 483 if(eff<=0.0){AliInfo("Efficiency is zero!"); return 0.0;}
226c54bf 484 }
485 else{
486 TH1D *fEfficiency = (TH1D*) fEfficiencyITS->FindObject(Form("fEfficiencyHadronITS%i",cb));
487 if(!fEfficiency){cerr<<"No histogram "<<Form("fEfficiencyHadronITS%i",cb)<<endl; return -1.0;}
488 eff = fEfficiency->GetBinContent(fEfficiency->FindBin(pT));
45e5a6ec 489 if(eff<=0.0){AliInfo(Form("Pion efficiency is zero for centrality bin %i!",cb)); return 0.0;}
226c54bf 490 }
a02dfa56 491 return 1.0/eff;
492}
226c54bf 493void AliAnalysisHadEtCorrections::SetEfficiencyPionTPC(TH1D *histo, const int cb){//Set centrality dependent efficiency for centrality bin cb
494 if(histo){
495 //first check to see if the histogram exists already
496 TH1D *old = (TH1D*) fEfficiencyTPC->FindObject(Form("fEfficiencyPionTPC%i",cb));
497 if(old){
498 fEfficiencyTPC->Remove(old);
499 delete old;
500 }
501 //then if the new histogram exists, add it to the array
502 histo->SetName(Form("fEfficiencyPionTPC%i",cb));
503 fEfficiencyTPC->Add(histo);
504 }
505 else{cerr<<"Histogram does not exist!"<<endl;}
506}
507void AliAnalysisHadEtCorrections::SetEfficiencyKaonTPC(TH1D *histo, const int cb){//Set centrality dependent efficiency for centrality bin cb
508 if(histo){
509 //first check to see if the histogram exists already
510 TH1D *old = (TH1D*) fEfficiencyTPC->FindObject(Form("fEfficiencyKaonTPC%i",cb));
511 if(old){
512 fEfficiencyTPC->Remove(old);
513 delete old;
514 }
515 //then if the new histogram exists, add it to the array
516 histo->SetName(Form("fEfficiencyKaonTPC%i",cb));
517 fEfficiencyTPC->Add(histo);
518 }
519 else{cerr<<"Histogram does not exist!"<<endl;}
520}//Kaon
521void AliAnalysisHadEtCorrections::SetEfficiencyProtonTPC(TH1D *histo, const int cb){//Set centrality dependent efficiency for centrality bin cb
522 if(histo){
523 //first check to see if the histogram exists already
524 TH1D *old = (TH1D*) fEfficiencyTPC->FindObject(Form("fEfficiencyProtonTPC%i",cb));
525 if(old){
526 fEfficiencyTPC->Remove(old);
527 delete old;
528 }
529 //then if the new histogram exists, add it to the array
530 histo->SetName(Form("fEfficiencyProtonTPC%i",cb));
531 fEfficiencyTPC->Add(histo);
532 }
533 else{cerr<<"Histogram does not exist!"<<endl;}
534}//Proton
535void AliAnalysisHadEtCorrections::SetEfficiencyHadronTPC(TH1D *histo, const int cb){//Set centrality dependent efficiency for centrality bin cb
536 if(histo){
537 //first check to see if the histogram exists already
538 TH1D *old = (TH1D*) fEfficiencyTPC->FindObject(Form("fEfficiencyHadronTPC%i",cb));
539 if(old){
540 fEfficiencyTPC->Remove(old);
541 delete old;
542 }
543 //then if the new histogram exists, add it to the array
544 histo->SetName(Form("fEfficiencyHadronTPC%i",cb));
545 fEfficiencyTPC->Add(histo);
546 }
547 else{cerr<<"Histogram does not exist!"<<endl;}
548}
549void AliAnalysisHadEtCorrections::SetEfficiencyPionITS(TH1D *histo, const int cb){//Set centrality dependent efficiency for centrality bin cb
550 if(histo){
551 //first check to see if the histogram exists already
552 TH1D *old = (TH1D*) fEfficiencyITS->FindObject(Form("fEfficiencyPionITS%i",cb));
553 if(old){
554 fEfficiencyITS->Remove(old);
555 delete old;
556 }
557 //then if the new histogram exists, add it to the array
558 histo->SetName(Form("fEfficiencyPionITS%i",cb));
559 fEfficiencyITS->Add(histo);
560 }
561 else{cerr<<"Histogram does not exist!"<<endl;}
562}
563void AliAnalysisHadEtCorrections::SetEfficiencyKaonITS(TH1D *histo, const int cb){//Set centrality dependent efficiency for centrality bin cb
564 if(histo){
565 //first check to see if the histogram exists already
566 TH1D *old = (TH1D*) fEfficiencyITS->FindObject(Form("fEfficiencyKaonITS%i",cb));
567 if(old){
568 fEfficiencyITS->Remove(old);
569 delete old;
570 }
571 //then if the new histogram exists, add it to the array
572 histo->SetName(Form("fEfficiencyKaonITS%i",cb));
573 fEfficiencyITS->Add(histo);
574 }
575 else{cerr<<"Histogram does not exist!"<<endl;}
576}//Kaon
577void AliAnalysisHadEtCorrections::SetEfficiencyProtonITS(TH1D *histo, const int cb){//Set centrality dependent efficiency for centrality bin cb
578 if(histo){
579 //first check to see if the histogram exists already
580 TH1D *old = (TH1D*) fEfficiencyITS->FindObject(Form("fEfficiencyProtonITS%i",cb));
581 if(old){
582 fEfficiencyITS->Remove(old);
583 delete old;
584 }
585 //then if the new histogram exists, add it to the array
586 histo->SetName(Form("fEfficiencyProtonITS%i",cb));
587 fEfficiencyITS->Add(histo);
588 }
589 else{cerr<<"Histogram does not exist!"<<endl;}
590}//Proton
591void AliAnalysisHadEtCorrections::SetEfficiencyHadronITS(TH1D *histo, const int cb){//Set centrality dependent efficiency for centrality bin cb
592 if(histo){
593 //first check to see if the histogram exists already
594 TH1D *old = (TH1D*) fEfficiencyITS->FindObject(Form("fEfficiencyHadronITS%i",cb));
595 if(old){
596 fEfficiencyITS->Remove(old);
597 delete old;
598 }
599 //then if the new histogram exists, add it to the array
600 histo->SetName(Form("fEfficiencyHadronITS%i",cb));
601 fEfficiencyITS->Add(histo);
602 }
603 else{cerr<<"Histogram does not exist!"<<endl;}
604}
605
606
0e866ddc 607Float_t AliAnalysisHadEtCorrections::GetNotIDCorrectionTPC(const float pT){//get correction for unidentified particles in the TPC
608 Float_t val = fnotIDTPC->GetBinContent(fnotIDTPC->FindBin(pT));
609 if(val>0.0) return 1.0/(val);
610 else{return 0.0;}
611}
612Float_t AliAnalysisHadEtCorrections::GetNotIDCorrectionITS(const float pT){//Get correction for unidentified particles in the ITS
613 Float_t val = fnotIDITS->GetBinContent(fnotIDITS->FindBin(pT));
614 if(val>0.0) return 1.0/(val);
615 else{return 0.0;}
616}
617Float_t AliAnalysisHadEtCorrections::GetNotIDCorrectionNoPID(const float pT){//Get correction for particles in the case that there is no particle identification
618 Float_t val = fnotIDNoID->GetBinContent(fnotIDNoID->FindBin(pT));
619 if(val>0.0) return 1.0/(val);
620 else{return 0.0;}
621}
45e5a6ec 622Float_t AliAnalysisHadEtCorrections::GetBackgroundCorrectionTPC(const float pT){//Get background correction for TPC tracks
623 return (1.0-fBackgroundTPC->GetBinContent(fBackgroundTPC->FindBin(pT)));
624}
625Float_t AliAnalysisHadEtCorrections::GetBackgroundCorrectionITS(const float pT){//Get background correction for ITS tracks
626 return (1.0-fBackgroundITS->GetBinContent(fBackgroundITS->FindBin(pT)));
627}
226c54bf 628void AliAnalysisHadEtCorrections::Report(){//Gives a report on the status of all corrections
4cb06159 629 //This is primarily for cross checking that the results we get from the macro that fills this class, GetCorrections.C, are sane
226c54bf 630 cout<<"======================================================================="<<endl;
631 cout<<" Report from "<<GetName()<<endl;
632 cout<<"======================================================================="<<endl;
633 cout<<fProductionDescription<<" created from "<<fProduction<<endl;
634 cout<<"This for determination of EThad from ";
635 if(fIsData) cout<<"data of ";
636 else{cout<<"simulation of ";}
637 switch(fDataSet){
638 case 2009:
639 cout<<"p+p collisions at 900 GeV"<<endl;
640 break;
641 case 2010:
642 cout<<"p+p collisions at 7 TeV"<<endl;
643 break;
ae2636ae 644 case 2012:
645 cout<<"p+p collisions at 8 TeV"<<endl;
af0de7a4 646 break;
ae2636ae 647 case 2013:
648 cout<<"p+Pb collisions at 5 TeV"<<endl;
649 break;
4c202dd2 650 case 20111:
651 cout<<"p+p collisions at 2.76 TeV"<<endl;
652 break;
226c54bf 653 case 20100:
654 cout<<"Pb+Pb collisions at 2.76 TeV"<<endl;
655 break;
656 default:
657 cout<<"an undetermined collision system and energy"<<endl;
658 }
659 cout<<"This is initialized for the ";
660 if(fIsEMCal) cout<<"EMCal";
661 else{cout<<"PHOS";}
662 cout<<" acceptance"<<endl<<endl;
663
664 cout<<"The acceptance correction for the full "<<fAcceptanceCorrectionFull<<endl;
665 cout<<" EMCal "<<fAcceptanceCorrectionEMCAL<<endl;
666 cout<<" PHOS "<<fAcceptanceCorrectionPHOS<<endl<<endl;
667
668 cout<<Form("The neutral energy correction is %2.4f [%2.4f,%2.4f]",fNeutralCorrection,fNeutralCorrectionLow,fNeutralCorrectionHigh)<<endl;
669 cout<<Form(" total %2.4f [%2.4f,%2.4f]",fNotHadronicCorrection,fNotHadronicCorrectionLow,fNotHadronicCorrectionHigh)<<endl<<endl;
670
671 cout<<Form("The pT cut correction for 100 MeV is %2.4f [%2.4f,%2.4f]",fpTcutCorrectionITS,ffpTcutCorrectionITSLow,ffpTcutCorrectionITSHigh)<<endl;
672 cout<<Form(" 150 MeV %2.4f [%2.4f,%2.4f]",fpTcutCorrectionTPC,ffpTcutCorrectionTPCLow,ffpTcutCorrectionTPCHigh)<<endl<<endl;
673
0add53f6 674 cout<<Form("The correction for unidentified ITS tracks is %2.4f [%2.4f,%2.4f]",fNotIDConstITS,fNotIDConstITSLow,fNotIDConstITSHigh)<<endl;
675 cout<<Form(" TPC tracks %2.4f [%2.4f,%2.4f]",fNotIDConstTPC,fNotIDConstTPCLow,fNotIDConstTPCHigh)<<endl<<endl;
226c54bf 676
677 cout<<"Background correction histogram for ITS tracks is";
678 if(!fBackgroundITS)cout<<" not set"<<endl;
679 else{cout<<" set and has "<<fBackgroundITS->GetEntries()<<" entries"<<endl;}
680 cout<<" TPC ";
681 if(!fBackgroundTPC)cout<<" not set"<<endl;
682 else{cout<<" set and has "<<fBackgroundTPC->GetEntries()<<" entries"<<endl;}
683 cout<<endl;
684
685
686 cout<<"Efficiency histogram for ITS tracks for hadrons is";
687 if(!fEfficiencyHadronITS)cout<<" not set"<<endl;
688 else{cout<<" set and has "<<fEfficiencyHadronITS->GetEntries()<<" entries"<<endl;}
689 cout<<" TPC hadrons ";
690 if(!fEfficiencyHadronTPC)cout<<" not set"<<endl;
691 else{cout<<" set and has "<<fEfficiencyHadronTPC->GetEntries()<<" entries"<<endl;}
692 cout<<" ITS pions ";
693 if(!fEfficiencyPionITS)cout<<" not set"<<endl;
694 else{cout<<" set and has "<<fEfficiencyPionITS->GetEntries()<<" entries"<<endl;}
695 cout<<" TPC pions ";
696 if(!fEfficiencyPionTPC)cout<<" not set"<<endl;
697 else{cout<<" set and has "<<fEfficiencyPionTPC->GetEntries()<<" entries"<<endl;}
698 cout<<" ITS kaons ";
699 if(!fEfficiencyKaonITS)cout<<" not set"<<endl;
700 else{cout<<" set and has "<<fEfficiencyKaonITS->GetEntries()<<" entries"<<endl;}
701 cout<<" TPC kaons ";
702 if(!fEfficiencyKaonTPC)cout<<" not set"<<endl;
703 else{cout<<" set and has "<<fEfficiencyKaonTPC->GetEntries()<<" entries"<<endl;}
704 cout<<" ITS protons ";
705 if(!fEfficiencyProtonITS)cout<<" not set"<<endl;
706 else{cout<<" set and has "<<fEfficiencyProtonITS->GetEntries()<<" entries"<<endl;}
707 cout<<" TPC protons ";
708 if(!fEfficiencyProtonTPC)cout<<" not set"<<endl;
709 else{cout<<" set and has "<<fEfficiencyProtonTPC->GetEntries()<<" entries"<<endl;}
710 cout<<endl;
711
712 if(fDataSet==20100){//if Pb+Pb
713 cout<<"Efficiency histogram for TPC tracks for hadrons is set for centrality bins ";
45f9be5c 714 for(int i = 0;i<=21;i++){
226c54bf 715 TH1D *histo = (TH1D*) fEfficiencyTPC->FindObject(Form("fEfficiencyHadronTPC%i",i));
716 if(histo) cout<<i<<" ";
717 }
718 cout<<endl;
719 cout<<" pions ";
45f9be5c 720 for(int i = 0;i<=21;i++){
226c54bf 721 TH1D *histo = (TH1D*) fEfficiencyTPC->FindObject(Form("fEfficiencyPionTPC%i",i));
722 if(histo) cout<<i<<" ";
723 }
724 cout<<endl;
725 cout<<" kaons ";
45f9be5c 726 for(int i = 0;i<=21;i++){
226c54bf 727 TH1D *histo = (TH1D*) fEfficiencyTPC->FindObject(Form("fEfficiencyKaonTPC%i",i));
728 if(histo) cout<<i<<" ";
729 }
730 cout<<endl;
731 cout<<" protons ";
45f9be5c 732 for(int i = 0;i<=21;i++){
226c54bf 733 TH1D *histo = (TH1D*) fEfficiencyTPC->FindObject(Form("fEfficiencyProtonTPC%i",i));
734 if(histo) cout<<i<<" ";
735 }
736 cout<<endl;
737 cout<<" ITS hadrons ";
45f9be5c 738 for(int i = 0;i<=21;i++){
226c54bf 739 TH1D *histo = (TH1D*) fEfficiencyITS->FindObject(Form("fEfficiencyHadronITS%i",i));
740 if(histo) cout<<i<<" ";
741 }
742 cout<<endl;
743 cout<<" pions ";
45f9be5c 744 for(int i = 0;i<=21;i++){
226c54bf 745 TH1D *histo = (TH1D*) fEfficiencyITS->FindObject(Form("fEfficiencyPionITS%i",i));
746 if(histo) cout<<i<<" ";
747 }
748 cout<<endl;
749 cout<<" kaons ";
45f9be5c 750 for(int i = 0;i<=21;i++){
226c54bf 751 TH1D *histo = (TH1D*) fEfficiencyITS->FindObject(Form("fEfficiencyKaonITS%i",i));
752 if(histo) cout<<i<<" ";
753 }
754 cout<<endl;
755 cout<<" protons ";
45f9be5c 756 for(int i = 0;i<=21;i++){
226c54bf 757 TH1D *histo = (TH1D*) fEfficiencyITS->FindObject(Form("fEfficiencyProtonITS%i",i));
758 if(histo) cout<<i<<" ";
759 }
760 cout<<endl;
761
762
763 int nEntries = fEfficiencyTPC->GetEntries();
764 int nbadhistograms = 0;
765 for(int i=0;i<nEntries;i++){
766 TH1D *histo = (TH1D*) fEfficiencyTPC->At(i);
767 if(!histo){
768 cout<<"Warning: Histogram in fEfficiencyTPC at "<<i<<" is NULL!"<<endl;
769 nbadhistograms++;
770 }
771 else{
772 if(histo->GetEntries()<=1e-2){
773 cout<<"Warning: Histogram "<<histo->GetName()<<" in fEfficiencyTPC is empty!"<<endl;
774 nbadhistograms++;
775 }
776 }
777 }
778 cout<<nbadhistograms<<" bad histograms in fEfficiencyTPC"<<endl;
779
780 nEntries = fEfficiencyITS->GetEntries();
781 nbadhistograms = 0;
782 for(int i=0;i<nEntries;i++){
783 TH1D *histo = (TH1D*) fEfficiencyITS->At(i);
784 if(!histo){
785 cout<<"Warning: Histogram in fEfficiencyITS at "<<i<<" is NULL!"<<endl;
786 nbadhistograms++;
787 }
788 else{
789 if(histo->GetEntries()<=1e-2){
790 cout<<"Warning: Histogram "<<histo->GetName()<<" in fEfficiencyITS is empty!"<<endl;
791 nbadhistograms++;
792 }
793 }
794 }
795 cout<<nbadhistograms<<" bad histograms in fEfficiencyITS"<<endl;
796
797
798 }
799
800
801 cout<<endl;
802 cout<<"======================================================================="<<endl;
803 cout<<"======================================================================="<<endl;
804}
805