1 //_________________________________________________________________________
2 // Utility Class for transverse energy studies
3 // Base class for ESD analysis
4 // - reconstruction output
7 //*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
8 //_________________________________________________________________________
10 #include "AliAnalysisEtReconstructed.h"
11 #include "AliAnalysisEtCuts.h"
12 #include "AliESDtrack.h"
13 #include "AliEMCALTrack.h"
14 #include "AliESDCaloCluster.h"
16 #include "TGeoGlobalMagField.h"
18 #include "AliVEvent.h"
19 #include "AliESDEvent.h"
20 #include "AliESDtrackCuts.h"
21 #include "AliVParticle.h"
22 #include "TDatabasePDG.h"
24 #include "AliESDpid.h"
31 #include "AliAnalysisHadEtCorrections.h"
32 #include "AliAnalysisEtSelector.h"
34 #include "AliCentrality.h"
35 #include "AliPHOSGeoUtils.h"
36 #include "AliPHOSGeometry.h"
37 #include "AliAnalysisEtRecEffCorrection.h"
42 ClassImp(AliAnalysisEtReconstructed);
45 AliAnalysisEtReconstructed::AliAnalysisEtReconstructed() :
49 ,fHistChargedPionEnergyDeposit(0)
50 ,fHistProtonEnergyDeposit(0)
51 ,fHistAntiProtonEnergyDeposit(0)
52 ,fHistChargedKaonEnergyDeposit(0)
53 ,fHistMuonEnergyDeposit(0)
54 ,fHistRemovedEnergy(0)
56 ,fEMinCorrection(1.0/0.687)
57 ,fRecEffCorrection(1.0)
61 ,fHistChargedEnergyRemoved(0)
62 ,fHistNeutralEnergyRemoved(0)
63 ,fHistGammaEnergyAdded(0)
64 ,fHistMatchedTracksEvspTvsCent(0)
65 ,fHistMatchedTracksEvspTvsCentEffCorr(0)
66 ,fHistMatchedTracksEvspTvsCentEffTMCorr(0)
67 ,fHistFoundHadronsvsCent(0)
68 ,fHistNotFoundHadronsvsCent(0)
69 ,fHistFoundHadronsEtvsCent(0)
70 ,fHistNotFoundHadronsEtvsCent(0)
72 ,fHistNominalNonLinHighEt(0)
73 ,fHistNominalNonLinLowEt(0)
74 ,fHistNominalEffHighEt(0)
75 ,fHistNominalEffLowEt(0)
81 AliAnalysisEtReconstructed::~AliAnalysisEtReconstructed()
84 delete fHistChargedPionEnergyDeposit; /** Energy deposited in calorimeter by charged pions */
85 delete fHistProtonEnergyDeposit; /** Energy deposited in calorimeter by protons */
86 delete fHistAntiProtonEnergyDeposit; /** Energy deposited in calorimeter by anti-protons */
87 delete fHistChargedKaonEnergyDeposit; /** Energy deposited in calorimeter by charged kaons */
88 delete fHistMuonEnergyDeposit; /** Energy deposited in calorimeter by muons */
90 delete fHistRemovedEnergy; // removed energy
91 delete fClusterPosition;
92 delete fClusterEnergy;
94 delete fHistChargedEnergyRemoved;
95 delete fHistNeutralEnergyRemoved;
96 delete fHistGammaEnergyAdded;
97 delete fHistMatchedTracksEvspTvsCent;
98 delete fHistMatchedTracksEvspTvsCentEffCorr;
99 delete fHistMatchedTracksEvspTvsCentEffTMCorr;
100 delete fHistFoundHadronsvsCent;
101 delete fHistNotFoundHadronsvsCent;
102 delete fHistFoundHadronsEtvsCent;
103 delete fHistNotFoundHadronsEtvsCent;
104 delete fHistNominalRawEt;
105 delete fHistNominalNonLinHighEt;
106 delete fHistNominalNonLinLowEt;
107 delete fHistNominalEffHighEt;
108 delete fHistNominalEffLowEt;
109 delete fHistTotRawEt;
112 Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
115 //AliAnalysisEt::AnalyseEvent(ev);
119 AliFatal("ERROR: Event does not exist");
123 AliESDEvent *event = dynamic_cast<AliESDEvent*>(ev);
125 AliFatal("ERROR: ESD Event does not exist");
129 AliFatal("ERROR: fSelector does not exist");
132 fSelector->SetEvent(event);
135 fCentrality = event->GetCentrality();
136 if (fCentrality && cent)
138 cent = fCentrality->GetCentralityClass5("V0M");
139 fCentClass = fCentrality->GetCentralityClass5("V0M");
142 TRefArray *caloClusters = fSelector->GetClusters();
143 Float_t fClusterMult = caloClusters->GetEntries();
145 Float_t nominalRawEt = 0;
146 Float_t nonlinHighRawEt = 0;
147 Float_t nonlinLowRawEt = 0;
148 Float_t effHighRawEt = 0;
149 Float_t effLowRawEt = 0;
150 Float_t uncorrEt = 0;
152 Float_t nChargedHadronsMeasured = 0.0;
153 Float_t nChargedHadronsTotal = 0.0;
154 Float_t nChargedHadronsEtMeasured = 0.0;
155 Float_t nChargedHadronsEtTotal = 0.0;
158 for (Int_t iCluster = 0; iCluster < event->GetNumberOfCaloClusters(); iCluster++)
160 AliESDCaloCluster* cluster = event->GetCaloCluster(iCluster);
163 AliError(Form("ERROR: Could not get cluster %d", iCluster));
168 if(!fSelector->IsDetectorCluster(*cluster)) continue;
170 if(!fSelector->PassMinEnergyCut(*cluster)) continue;
172 if (!fSelector->PassDistanceToBadChannelCut(*cluster)) continue;
177 cluster->GetPosition(pos);
180 Bool_t matched = kTRUE;//default to no track matched
181 Int_t trackMatchedIndex = cluster->GetTrackMatchedIndex();//find the index of the matched track
182 matched = !(fSelector->PassTrackMatchingCut(*cluster));//PassTrackMatchingCut is false if there is a matched track
183 if(matched){//if the track match is good (, is the track good?
184 if(trackMatchedIndex < 0) matched=kFALSE;//If the index is bad, don't count it
186 AliESDtrack *track = event->GetTrack(trackMatchedIndex);
187 //if this is a good track, accept track will return true. The track matched is good, so not track matched is false
188 matched = fEsdtrackCutsTPC->AcceptTrack(track);//If the track is bad, don't count it
196 if (cluster->GetNTracksMatched() > 0 && trackMatchedIndex>=0)
198 AliVTrack *track = event->GetTrack(trackMatchedIndex);
200 AliError("Error: track does not exist");
203 float eff = fTmCorrections->TrackMatchingEfficiency(track->Pt(),fClusterMult);
204 if(TMath::Abs(eff)<1e-5) eff = 1.0;
205 //cout<<"pt "<<track->Pt()<<" eff "<<eff<<endl;
206 nChargedHadronsMeasured++;
207 nChargedHadronsTotal += 1/eff;
208 Double_t effCorrEt = CorrectForReconstructionEfficiency(*cluster,fClusterMult);
209 nChargedHadronsEtMeasured+= TMath::Sin(cp.Theta())*effCorrEt;
210 //One efficiency is the gamma efficiency and the other is the track matching efficiency.
211 nChargedHadronsEtTotal+= 1/eff *effCorrEt;
212 fHistMatchedTracksEvspTvsCent->Fill(track->P(),TMath::Sin(cp.Theta())*cluster->E(),cent);
213 fHistMatchedTracksEvspTvsCentEffCorr->Fill(track->P(),CorrectForReconstructionEfficiency(*cluster,fClusterMult),cent);
214 //Weighed by the number of tracks we didn't find
215 fHistMatchedTracksEvspTvsCentEffTMCorr->Fill(track->P(), effCorrEt,cent, (1/eff-1) );
216 const Double_t *pidWeights = track->PID();
218 Double_t maxpidweight = 0;
223 for (Int_t p =0; p < AliPID::kSPECIES; p++)
225 if (pidWeights[p] > maxpidweight)
227 maxpidweight = pidWeights[p];
231 if (fCuts->GetHistMakeTreeDeposit() && fDepositTree)
233 fEnergyDeposited = cluster->E();
234 fMomentumTPC = track->P();
235 fCharge = track->Charge();
236 fParticlePid = maxpid;
237 fPidProb = maxpidweight;
238 AliESDtrack *esdTrack = dynamic_cast<AliESDtrack*>(track);
240 AliError("Error: track does not exist");
243 if (esdTrack) fTrackPassedCut = fEsdtrackCutsTPC->AcceptTrack(esdTrack);
244 fDepositTree->Fill();
248 if (maxpidweight > fPidCut)
250 //Float_t dist = TMath::Sqrt(pos[0]*pos[0] + pos[1]*pos[1]);
252 //Float_t theta = TMath::ATan(pos[2]/dist)+TMath::Pi()/2;
254 //Float_t et = cluster->E() * TMath::Sin(theta);
255 if (maxpid == AliPID::kProton)
258 if (track->Charge() == 1)
260 fHistProtonEnergyDeposit->Fill(cluster->E(), track->E());
262 else if (track->Charge() == -1)
264 fHistAntiProtonEnergyDeposit->Fill(cluster->E(), track->E());
267 else if (maxpid == AliPID::kPion)
269 fHistChargedPionEnergyDeposit->Fill(cluster->E(), track->E());
271 else if (maxpid == AliPID::kKaon)
273 fHistChargedKaonEnergyDeposit->Fill(cluster->E(), track->E());
275 else if (maxpid == AliPID::kMuon)
277 fHistMuonEnergyDeposit->Fill(cluster->E(), track->E());
285 else{//these are clusters which were not track matched
287 //std::cout << x++ << std::endl;
289 //if (cluster->E() > fSingleCellEnergyCut && cluster->GetNCells() == fCuts->GetCommonSingleCell()) continue;
290 //if (cluster->E() < fClusterEnergyCut) continue;
291 cluster->GetPosition(pos);
295 fClusterPosition->Fill(p2.Phi(), p2.PseudoRapidity());
296 fClusterEnergy->Fill(cluster->E());
297 fClusterEt->Fill(TMath::Sin(p2.Theta())*cluster->E());
298 uncorrEt += TMath::Sin(p2.Theta())*cluster->E();
300 Double_t effCorrEt = CorrectForReconstructionEfficiency(*cluster,fClusterMult);
301 //cout<<"cluster energy "<<cluster->E()<<" eff corr Et "<<effCorrEt<<endl;
302 fTotNeutralEt += effCorrEt;
303 nominalRawEt += effCorrEt;
304 nonlinHighRawEt += effCorrEt*GetCorrectionModification(*cluster,1,0,fClusterMult);
305 nonlinLowRawEt += effCorrEt*GetCorrectionModification(*cluster,-1,0,fClusterMult);
306 effHighRawEt += effCorrEt*GetCorrectionModification(*cluster,0,1,fClusterMult);
307 effLowRawEt += effCorrEt*GetCorrectionModification(*cluster,0,-1,fClusterMult);
308 fNeutralMultiplicity++;
313 fChargedEnergyRemoved = GetChargedContribution(fNeutralMultiplicity);
314 fNeutralEnergyRemoved = GetNeutralContribution(fNeutralMultiplicity);
315 fHistChargedEnergyRemoved->Fill(fChargedEnergyRemoved, fNeutralMultiplicity);
316 fHistNeutralEnergyRemoved->Fill(fNeutralEnergyRemoved, fNeutralMultiplicity);
318 fGammaEnergyAdded = GetGammaContribution(fNeutralMultiplicity);
319 fHistGammaEnergyAdded->Fill(fGammaEnergyAdded, fNeutralMultiplicity);
321 Double_t removedEnergy = GetChargedContribution(fNeutralMultiplicity) + GetNeutralContribution(fNeutralMultiplicity) + GetGammaContribution(fNeutralMultiplicity) + GetSecondaryContribution(fNeutralMultiplicity);
322 fHistRemovedEnergy->Fill(removedEnergy);
324 fTotNeutralEtAcc = fTotNeutralEt;
325 fHistTotRawEt->Fill(fTotNeutralEt,cent);
326 //cout<<"uncorr "<<uncorrEt<<" raw "<<nominalRawEt<<" tot raw "<<fTotNeutralEt;
327 fTotNeutralEt = fGeomCorrection * fEMinCorrection * (fTotNeutralEt - removedEnergy);
328 //cout<<" tot corr "<<fTotNeutralEt<<endl;
329 fTotEt = fTotChargedEt + fTotNeutralEt;
330 // Fill the histograms...0
332 //std::cout << "fTotNeutralEt: " << fTotNeutralEt << ", Contribution from non-removed charged: " << GetChargedContribution(fNeutralMultiplicity) << ", neutral: " << GetNeutralContribution(fNeutralMultiplicity) << ", gammas: " << GetGammaContribution(fNeutralMultiplicity) << ", multiplicity: " << fNeutralMultiplicity<< std::endl;
333 //cout<<"cent "<<cent<<" cluster mult "<<fClusterMult<<" fTotNeutralEt "<<fTotNeutralEt<<" nominalRawEt "<<nominalRawEt<<endl;
334 fHistNominalRawEt->Fill(nominalRawEt,cent);
335 fHistNominalNonLinHighEt->Fill(nonlinHighRawEt,cent);
336 fHistNominalNonLinLowEt->Fill(nonlinLowRawEt,cent);
337 fHistNominalEffHighEt->Fill(effHighRawEt,cent);
338 fHistNominalEffLowEt->Fill(effLowRawEt,cent);
339 fHistFoundHadronsvsCent->Fill(nChargedHadronsMeasured,cent);
340 fHistNotFoundHadronsvsCent->Fill(nChargedHadronsTotal-nChargedHadronsMeasured,cent);
341 fHistFoundHadronsEtvsCent->Fill(nChargedHadronsEtMeasured,cent);
342 fHistNotFoundHadronsEtvsCent->Fill(nChargedHadronsEtTotal-nChargedHadronsEtMeasured,cent);
343 // cout<<"Number of hadrons measured: "<<nChargedHadronsMeasured<<" Estimated total number of hadrons "<<nChargedHadronsTotal<<" ET in track matched hadrons "<<
344 // nChargedHadronsEtMeasured;
345 // if(nChargedHadronsMeasured>0)cout<<" ("<<nChargedHadronsEtMeasured/nChargedHadronsMeasured<<") ";
346 // cout<<" ET in all hadrons ";
347 // cout<<nChargedHadronsEtTotal;
348 // if(nChargedHadronsTotal>0) cout<<" ("<<nChargedHadronsEtTotal/nChargedHadronsTotal<<") ";
353 bool AliAnalysisEtReconstructed::CheckGoodVertex(AliVParticle* track)
359 AliError("ERROR: no track");
362 AliESDtrack *esdTrack = dynamic_cast<AliESDtrack*>(track);
364 AliError("ERROR: no track");
367 esdTrack->GetImpactParametersTPC(bxy,bz);
370 bool status = (TMath::Abs(track->Xv()) < fCuts->GetReconstructedVertexXCut()) &&
371 (TMath::Abs(track->Yv()) < fCuts->GetReconstructedVertexYCut()) &&
372 (TMath::Abs(track->Zv()) < fCuts->GetReconstructedVertexZCut()) &&
373 (TMath::Abs(bxy) < fCuts->GetReconstructedIPxyCut()) &&
374 (TMath::Abs(bz) < fCuts->GetReconstructedIPzCut());
379 void AliAnalysisEtReconstructed::Init()
381 AliAnalysisEt::Init();
382 fPidCut = fCuts->GetReconstructedPidCut();
383 TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 1., 1., AliMagF::k5kG));
385 cout<<"Warning! You have not set corrections. Your code will crash. You have to set the corrections."<<endl;
389 bool AliAnalysisEtReconstructed::TrackHitsCalorimeter(AliVParticle* track, Double_t magField)
390 { // propagate track to detector radius
392 cout<<"Warning: track empty"<<endl;
395 AliESDtrack *esdTrack= dynamic_cast<AliESDtrack*>(track);
397 AliError("ERROR: no ESD track");
400 // Printf("Propagating track: eta: %f, phi: %f, pt: %f", esdTrack->Eta(), esdTrack->Phi(), esdTrack->Pt());
402 Bool_t prop = esdTrack->PropagateTo(fDetectorRadius, magField);
404 // if (prop) Printf("Track propagated, eta: %f, phi: %f, pt: %f", esdTrack->Eta(), esdTrack->Phi(), esdTrack->Pt());
405 return prop && fSelector->CutGeometricalAcceptance(*esdTrack);
408 void AliAnalysisEtReconstructed::FillOutputList(TList* list)
409 { // add some extra histograms to the ones from base class
410 AliAnalysisEt::FillOutputList(list);
412 list->Add(fHistChargedPionEnergyDeposit);
413 list->Add(fHistProtonEnergyDeposit);
414 list->Add(fHistAntiProtonEnergyDeposit);
415 list->Add(fHistChargedKaonEnergyDeposit);
416 list->Add(fHistMuonEnergyDeposit);
418 list->Add(fHistRemovedEnergy);
419 list->Add(fClusterPosition);
420 list->Add(fClusterEnergy);
421 list->Add(fClusterEt);
423 list->Add(fHistChargedEnergyRemoved);
424 list->Add(fHistNeutralEnergyRemoved);
425 list->Add(fHistGammaEnergyAdded);
426 list->Add(fHistMatchedTracksEvspTvsCent);
427 list->Add(fHistMatchedTracksEvspTvsCentEffCorr);
428 list->Add(fHistMatchedTracksEvspTvsCentEffTMCorr);
429 list->Add(fHistFoundHadronsvsCent);
430 list->Add(fHistNotFoundHadronsvsCent);
431 list->Add(fHistFoundHadronsEtvsCent);
432 list->Add(fHistNotFoundHadronsEtvsCent);
433 list->Add(fHistNominalRawEt);
434 list->Add(fHistNominalNonLinHighEt);
435 list->Add(fHistNominalNonLinLowEt);
436 list->Add(fHistNominalEffHighEt);
437 list->Add(fHistNominalEffLowEt);
438 list->Add(fHistTotRawEt);
441 void AliAnalysisEtReconstructed::CreateHistograms()
442 { // add some extra histograms to the ones from base class
443 AliAnalysisEt::CreateHistograms();
445 Int_t nbinsEt = 1000;
449 // possibly change histogram limits
451 // nbinsEt = fCuts->GetHistNbinsParticleEt();
452 // minEt = fCuts->GetHistMinParticleEt();
453 // maxEt = fCuts->GetHistMaxParticleEt();
457 histname = "fHistChargedPionEnergyDeposit" + fHistogramNameSuffix;
458 fHistChargedPionEnergyDeposit = new TH2F(histname.Data(), "Energy deposited by #pi^{+/-}", nbinsEt, minEt, maxEt, nbinsEt, minEt, maxEt);
459 fHistChargedPionEnergyDeposit->SetXTitle("Energy deposited in calorimeter");
460 fHistChargedPionEnergyDeposit->SetYTitle("Energy of track");
462 histname = "fHistProtonEnergyDeposit" + fHistogramNameSuffix;
463 fHistProtonEnergyDeposit = new TH2F(histname.Data(), "Energy deposited by protons", nbinsEt, minEt, maxEt, nbinsEt, minEt, maxEt);
464 fHistProtonEnergyDeposit->SetXTitle("Energy deposited in calorimeter");
465 fHistProtonEnergyDeposit->SetYTitle("Energy of track");
467 histname = "fHistAntiProtonEnergyDeposit" + fHistogramNameSuffix;
468 fHistAntiProtonEnergyDeposit = new TH2F(histname.Data(), "Energy deposited by anti-protons", nbinsEt, minEt, maxEt, nbinsEt, minEt, maxEt);
469 fHistAntiProtonEnergyDeposit->SetXTitle("Energy deposited in calorimeter");
470 fHistAntiProtonEnergyDeposit->SetYTitle("Energy of track");
472 histname = "fHistChargedKaonEnergyDeposit" + fHistogramNameSuffix;
473 fHistChargedKaonEnergyDeposit = new TH2F(histname.Data(), "Energy deposited by K^{+/-}", nbinsEt, minEt, maxEt, nbinsEt, minEt, maxEt);
474 fHistChargedKaonEnergyDeposit->SetXTitle("Energy deposited in calorimeter");
475 fHistChargedKaonEnergyDeposit->SetYTitle("Energy of track");
477 histname = "fHistMuonEnergyDeposit" + fHistogramNameSuffix;
478 fHistMuonEnergyDeposit = new TH2F(histname.Data(), "Energy deposited by #mu^{+/-}", nbinsEt, minEt, maxEt, nbinsEt, minEt, maxEt);
479 fHistMuonEnergyDeposit->SetXTitle("Energy deposited in calorimeter");
480 fHistMuonEnergyDeposit->SetYTitle("Energy of track");
482 histname = "fHistRemovedEnergy" + fHistogramNameSuffix;
483 fHistRemovedEnergy = new TH1F(histname.Data(), histname.Data(), 1000, 0, 20);
484 //fHistMuonEnergyDeposit->SetXTitle("Energy deposited in calorimeter");
485 //fHistMuonEnergyDeposit->SetYTitle("Energy of track");
487 histname = "fClusterPosition" + fHistogramNameSuffix;
488 fClusterPosition = new TH2D(histname.Data(), "Position of accepted neutral clusters",300, 0,2*TMath::Pi(), 100, -0.7 , 0.7);
489 fClusterPosition->SetXTitle("#phi");
490 fClusterPosition->SetYTitle("#eta");
492 histname = "fClusterEnergy" + fHistogramNameSuffix;
493 fClusterEnergy = new TH1F(histname.Data(), histname.Data(), 100, 0, 5);
494 fClusterEnergy->SetXTitle("Number of clusters");
495 fClusterEnergy->SetYTitle("Energy of cluster");
497 histname = "fClusterEt" + fHistogramNameSuffix;
498 fClusterEt = new TH1F(histname.Data(), histname.Data(), 100, 0, 5);
499 fClusterEt->SetXTitle("Number of clusters");
500 fClusterEt->SetYTitle("E_{T} of cluster");
502 histname = "fHistChargedEnergyRemoved" + fHistogramNameSuffix;
503 fHistChargedEnergyRemoved = new TH2D(histname.Data(), histname.Data(), 1000, .0, 30, 100, -0.5 , 99.5);
505 histname = "fHistNeutralEnergyRemoved" + fHistogramNameSuffix;
506 fHistNeutralEnergyRemoved = new TH2D(histname.Data(), histname.Data(), 1000, .0, 30, 100, -0.5 , 99.5);
508 histname = "fHistGammaEnergyAdded" + fHistogramNameSuffix;
509 fHistGammaEnergyAdded = new TH2D(histname.Data(), histname.Data(), 1000, .0, 30, 100, -0.5 , 99.5);
511 fHistMatchedTracksEvspTvsCent = new TH3F("fHistMatchedTracksEvspTvsCent", "fHistMatchedTracksEvspTvsCent",100, 0, 3,100,0,3,20,0,20);
512 fHistMatchedTracksEvspTvsCentEffCorr = new TH3F("fHistMatchedTracksEvspTvsCentEffCorr", "fHistMatchedTracksEvspTvsCentEffCorr",100, 0, 3,100,0,3,20,0,20);
513 fHistMatchedTracksEvspTvsCentEffTMCorr = new TH3F("fHistMatchedTracksEvspTvsCentEffTMCorr", "fHistMatchedTracksEvspTvsCentEffTMCorr",100, 0, 3,100,0,3,20,0,20);
514 fHistFoundHadronsvsCent = new TH2F("fHistFoundHadronsvsCent","fHistFoundHadronsvsCent",100,0,100,20,0,20);
515 fHistNotFoundHadronsvsCent = new TH2F("fHistNotFoundHadronsvsCent","fHistNotFoundHadronsvsCent",100,0,200,20,0,20);
516 fHistFoundHadronsEtvsCent = new TH2F("fHistFoundHadronsEtvsCent","fHistFoundHadronsEtvsCent",100,0,200,20,0,20);
517 fHistNotFoundHadronsEtvsCent = new TH2F("fHistNotFoundHadronsEtvsCent","fHistNotFoundHadronsEtvsCent",100,0,300,20,0,20);
519 fHistTotRawEt = new TH2F("fHistTotRawEt","fHistTotRawEt",200,0,400,20,0,20);
522 histname = "fHistNominalRawEt" + fHistogramNameSuffix;
523 fHistNominalRawEt = new TH2D(histname.Data(), histname.Data(),nbinsEt,minEt,maxEt,20,-0.5,19.5);
524 histname = "fHistNominalNonLinHighEt" + fHistogramNameSuffix;
525 fHistNominalNonLinHighEt = new TH2D(histname.Data(), histname.Data(),nbinsEt,minEt,maxEt,20,-0.5,19.5);
526 histname = "fHistNominalNonLinLowEt" + fHistogramNameSuffix;
527 fHistNominalNonLinLowEt = new TH2D(histname.Data(), histname.Data(),nbinsEt,minEt,maxEt,20,-0.5,19.5);
528 histname = "fHistNominalEffHighEt" + fHistogramNameSuffix;
529 fHistNominalEffHighEt = new TH2D(histname.Data(), histname.Data(),nbinsEt,minEt,maxEt,20,-0.5,19.5);
530 histname = "fHistNominalEffLowEt" + fHistogramNameSuffix;
531 fHistNominalEffLowEt = new TH2D(histname.Data(), histname.Data(),nbinsEt,minEt,maxEt,20,-0.5,19.5);
534 Double_t AliAnalysisEtReconstructed::ApplyModifiedCorrections(const AliESDCaloCluster& cluster,Int_t nonLinCorr, Int_t effCorr, Int_t mult)
537 cluster.GetPosition(pos);
539 Double_t corrEnergy = fReCorrections->CorrectedEnergy(cluster.E(),mult);
541 Double_t factorNonLin = GetCorrectionModification(cluster, nonLinCorr,effCorr,mult);
543 //std::cout << "Original energy: " << cluster.E() << ", corrected energy: " << corrEnergy << std::endl;
544 return TMath::Sin(cp.Theta())*corrEnergy*factorNonLin;
547 Double_t AliAnalysisEtReconstructed::GetCorrectionModification(const AliESDCaloCluster& cluster,Int_t nonLinCorr, Int_t effCorr, Int_t mult){//nonLinCorr 0 = nominal 1 = high -1 = low, effCorr 0 = nominal 1 = high -1 = low
549 cout<<"Warning: This function should not get called!"<<endl;//this statement is basically here to avoid a compilation warning
552 cout<<"Warning: This function should not get called!"<<endl;//this statement is basically here to avoid a compilation warning
554 return cluster.E()*mult;