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"
38 #include "AliESDpid.h"
43 ClassImp(AliAnalysisEtReconstructed);
46 AliAnalysisEtReconstructed::AliAnalysisEtReconstructed() :
50 ,nChargedHadronsMeasured(0)
51 ,nChargedHadronsTotal(0)
52 ,fHistChargedPionEnergyDeposit(0)
53 ,fHistProtonEnergyDeposit(0)
54 ,fHistAntiProtonEnergyDeposit(0)
55 ,fHistChargedKaonEnergyDeposit(0)
56 ,fHistMuonEnergyDeposit(0)
57 ,fHistRemovedEnergy(0)
59 ,fEMinCorrection(1.0/0.687)
60 ,fRecEffCorrection(1.0)
61 ,fClusterPositionAccepted(0)
62 ,fClusterPositionAll(0)
63 ,fClusterPositionAcceptedEnergy(0)
64 ,fClusterPositionAllEnergy(0)
66 ,fClusterEnergyCent(0)
67 ,fClusterEnergyCentMatched(0)
68 ,fClusterEnergyCentNotMatched(0)
70 ,fHistChargedEnergyRemoved(0)
71 ,fHistNeutralEnergyRemoved(0)
72 ,fHistGammaEnergyAdded(0)
73 ,fHistMatchedTracksEvspTvsCent(0)
74 ,fHistMatchedTracksEvspTvsCentEffCorr(0)
75 ,fHistMatchedTracksEvspTvsCentEffTMCorr(0)
76 ,fHistPeripheralMatchedTracksEvspTvsCentEffTMCorr(0)
77 ,fHistMatchedTracksEvspTvsCentEffTMCorr500MeV(0)
78 ,fHistFoundHadronsvsCent(0)
79 ,fHistNotFoundHadronsvsCent(0)
80 ,fHistFoundHadronsEtvsCent(0)
81 ,fHistNotFoundHadronsEtvsCent(0)
82 ,fHistFoundHadronsvsCent500MeV(0)
83 ,fHistNotFoundHadronsvsCent500MeV(0)
84 ,fHistFoundHadronsEtvsCent500MeV(0)
85 ,fHistNotFoundHadronsEtvsCent500MeV(0)
87 ,fHistNominalNonLinHighEt(0)
88 ,fHistNominalNonLinLowEt(0)
89 ,fHistNominalEffHighEt(0)
90 ,fHistNominalEffLowEt(0)
91 ,fHistTotRawEtEffCorr(0)
93 ,fHistTotRawEtEffCorr500MeV(0)
95 ,fHistTotAllRawEtEffCorr(0)
96 ,fHistNClustersPhosVsEmcal(0)
97 ,fHistClusterSizeVsCent(0)
98 ,fHistMatchedClusterSizeVsCent(0)
99 ,fHistTotAllRawEtVsTotalPt(0)
100 ,fHistTotAllRawEtVsTotalPtVsCent(0)
101 ,fHistTotMatchedRawEtVsTotalPtVsCent(0)
102 ,fHistPIDProtonsTrackMatchedDepositedVsNch(0)
103 ,fHistPIDAntiProtonsTrackMatchedDepositedVsNch(0)
104 ,fHistPIDProtonsTrackMatchedDepositedVsNcl(0)
105 ,fHistPIDAntiProtonsTrackMatchedDepositedVsNcl(0)
106 ,fHistPiKPTrackMatchedDepositedVsNch(0)
108 ,fHistPIDProtonsTrackMatchedDepositedVsNchNoEff(0)
109 ,fHistPIDAntiProtonsTrackMatchedDepositedVsNchNoEff(0)
110 ,fHistPIDProtonsTrackMatchedDepositedVsNclNoEff(0)
111 ,fHistPIDAntiProtonsTrackMatchedDepositedVsNclNoEff(0)
112 ,fHistPiKPTrackMatchedDepositedVsNchNoEff(0)
113 ,fHistCentVsNchVsNclReco(0)
114 ,fHistRawSignalReco(0)
115 ,fHistEffCorrSignalReco(0)
120 AliAnalysisEtReconstructed::~AliAnalysisEtReconstructed()
123 delete fHistChargedPionEnergyDeposit; /** Energy deposited in calorimeter by charged pions */
124 delete fHistProtonEnergyDeposit; /** Energy deposited in calorimeter by protons */
125 delete fHistAntiProtonEnergyDeposit; /** Energy deposited in calorimeter by anti-protons */
126 delete fHistChargedKaonEnergyDeposit; /** Energy deposited in calorimeter by charged kaons */
127 delete fHistMuonEnergyDeposit; /** Energy deposited in calorimeter by muons */
129 delete fHistRemovedEnergy; // removed energy
130 delete fClusterPositionAccepted;
131 delete fClusterPositionAll;
132 delete fClusterPositionAcceptedEnergy;
133 delete fClusterPositionAllEnergy;
134 delete fClusterEnergy;
135 delete fClusterEnergyCent;
136 delete fClusterEnergyCentMatched;
137 delete fClusterEnergyCentNotMatched;
139 delete fHistChargedEnergyRemoved;
140 delete fHistNeutralEnergyRemoved;
141 delete fHistGammaEnergyAdded;
142 delete fHistMatchedTracksEvspTvsCent;
143 delete fHistMatchedTracksEvspTvsCentEffCorr;
144 delete fHistMatchedTracksEvspTvsCentEffTMCorr;
145 delete fHistPeripheralMatchedTracksEvspTvsCentEffTMCorr;
146 delete fHistMatchedTracksEvspTvsCentEffTMCorr500MeV;
147 delete fHistFoundHadronsvsCent;
148 delete fHistNotFoundHadronsvsCent;
149 delete fHistFoundHadronsEtvsCent;
150 delete fHistNotFoundHadronsEtvsCent;
151 delete fHistFoundHadronsvsCent500MeV;
152 delete fHistNotFoundHadronsvsCent500MeV;
153 delete fHistFoundHadronsEtvsCent500MeV;
154 delete fHistNotFoundHadronsEtvsCent500MeV;
155 delete fHistNominalRawEt;
156 delete fHistNominalNonLinHighEt;
157 delete fHistNominalNonLinLowEt;
158 delete fHistNominalEffHighEt;
159 delete fHistNominalEffLowEt;
160 delete fHistTotRawEtEffCorr;
161 delete fHistTotRawEt;
162 delete fHistTotAllRawEt;
163 delete fHistTotAllRawEtEffCorr;
164 delete fHistTotRawEtEffCorr500MeV;
165 delete fHistNClustersPhosVsEmcal;
166 delete fHistClusterSizeVsCent;
167 delete fHistMatchedClusterSizeVsCent;
168 delete fHistTotAllRawEtVsTotalPt;
169 delete fHistTotAllRawEtVsTotalPtVsCent;
170 delete fHistTotMatchedRawEtVsTotalPtVsCent;
171 delete fHistPIDProtonsTrackMatchedDepositedVsNch;
172 delete fHistPIDAntiProtonsTrackMatchedDepositedVsNch;
173 delete fHistPIDProtonsTrackMatchedDepositedVsNcl;
174 delete fHistPIDAntiProtonsTrackMatchedDepositedVsNcl;
175 delete fHistPiKPTrackMatchedDepositedVsNch;
176 delete fHistPIDProtonsTrackMatchedDepositedVsNchNoEff;
177 delete fHistPIDAntiProtonsTrackMatchedDepositedVsNchNoEff;
178 delete fHistPIDProtonsTrackMatchedDepositedVsNclNoEff;
179 delete fHistPIDAntiProtonsTrackMatchedDepositedVsNclNoEff;
180 delete fHistPiKPTrackMatchedDepositedVsNchNoEff;
181 delete fHistCentVsNchVsNclReco;
182 delete fHistRawSignalReco;
183 delete fHistEffCorrSignalReco;
186 Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
189 //AliAnalysisEt::AnalyseEvent(ev);
193 AliFatal("ERROR: Event does not exist");
197 AliESDEvent *event = dynamic_cast<AliESDEvent*>(ev);
199 AliFatal("ERROR: ESD Event does not exist");
203 AliFatal("ERROR: fSelector does not exist");
206 fSelector->SetEvent(event);
209 fCentrality = event->GetCentrality();
210 if (fCentrality && cent)
212 cent = fCentrality->GetCentralityClass5("V0M");
213 fCentClass = fCentrality->GetCentralityClass5("V0M");
218 //AliESDpid *pID = new AliESDpid();
219 //pID->MakePID(event);
220 Float_t etPIDProtons = 0.0;
221 Float_t etPIDAntiProtons = 0.0;
222 Float_t etPiKPMatched = 0.0;
223 Float_t etPIDProtonsNoEff = 0.0;
224 Float_t etPIDAntiProtonsNoEff = 0.0;
225 Float_t etPiKPMatchedNoEff = 0.0;
226 Float_t multiplicity = fEsdtrackCutsTPC->GetReferenceMultiplicity(event,kTRUE);
229 Float_t totalMatchedPt = 0.0;
230 Float_t totalPt = 0.0;
231 TObjArray* list = fEsdtrackCutsTPC->GetAcceptedTracks(event);
232 Int_t nGoodTracks = list->GetEntries();
233 for (Int_t iTrack = 0; iTrack < nGoodTracks; iTrack++){
234 AliESDtrack *track = dynamic_cast<AliESDtrack*> (list->At(iTrack));
237 Printf("ERROR: Could not get track %d", iTrack);
241 totalPt +=track->Pt();
242 //pID->MakeITSPID(track);
248 //TRefArray *caloClusters = fSelector->GetClusters();//just gets the correct set of clusters - does not apply any cuts
249 //Float_t fClusterMult = caloClusters->GetEntries();
251 Float_t nominalRawEt = 0;
252 Float_t totEt500MeV = 0;
253 Float_t nonlinHighRawEt = 0;
254 Float_t nonlinLowRawEt = 0;
255 Float_t effHighRawEt = 0;
256 Float_t effLowRawEt = 0;
257 Float_t uncorrEt = 0;
258 Float_t rawSignal = 0;
259 Float_t effCorrSignal = 0;
261 nChargedHadronsMeasured = 0.0;
262 nChargedHadronsTotal = 0.0;
263 Float_t nChargedHadronsEtMeasured = 0.0;
264 Float_t nChargedHadronsEtTotal = 0.0;
265 Float_t nChargedHadronsMeasured500MeV = 0.0;
266 Float_t nChargedHadronsTotal500MeV = 0.0;
267 Float_t nChargedHadronsEtMeasured500MeV = 0.0;
268 Float_t nChargedHadronsEtTotal500MeV = 0.0;
269 Float_t fTotAllRawEt = 0.0;
270 Float_t fTotRawEt = 0.0;
271 Float_t fTotRawEtEffCorr = 0.0;
272 Float_t fTotAllRawEtEffCorr = 0.0;
273 Int_t nPhosClusters = 0;
274 Int_t nEmcalClusters = 0;
277 TRefArray *caloClusters = fSelector->GetClusters();
278 Int_t nCluster = caloClusters->GetEntries();
280 for (int iCluster = 0; iCluster < nCluster; iCluster++ )
282 AliESDCaloCluster* cluster = ( AliESDCaloCluster* )caloClusters->At( iCluster );
285 AliError(Form("ERROR: Could not get cluster %d", iCluster));
290 if(cluster->IsEMCAL()) nEmcalClusters++;
291 else nPhosClusters++;
292 if(!fSelector->IsDetectorCluster(*cluster)) continue;
294 if(!fSelector->PassMinEnergyCut(*cluster)) continue;
296 if (!fSelector->PassDistanceToBadChannelCut(*cluster)) continue;
298 if (!fSelector->CutGeometricalAcceptance(*cluster)) continue;
299 //fCutFlow->Fill(x++);
302 cluster->GetPosition(pos);
304 fClusterPositionAll->Fill(cp.Phi(), cp.PseudoRapidity());
305 fClusterPositionAllEnergy->Fill(cp.Phi(), cp.PseudoRapidity(),cluster->E());
307 //if(TMath::Abs(cp.Eta())> fCuts->fCuts->GetGeometryEmcalEtaAccCut() || cp.Phi() > fCuts->GetGeometryEmcalPhiAccMaxCut()*TMath::Pi()/180. || cp.Phi() > fCuts->GetGeometryEmcalPhiAccMinCut()*TMath::Pi()/180.) continue;//Do not accept if cluster is not in the acceptance
308 fTotAllRawEt += TMath::Sin(cp.Theta())*cluster->E();
309 fTotAllRawEtEffCorr += CorrectForReconstructionEfficiency(*cluster,cent);
311 fClusterEnergyCent->Fill(cluster->E(),cent);
313 Bool_t matched = kTRUE;//default to no track matched
314 Int_t trackMatchedIndex = cluster->GetTrackMatchedIndex();//find the index of the matched track
315 matched = !(fSelector->PassTrackMatchingCut(*cluster));//PassTrackMatchingCut is false if there is a matched track
316 if(matched){//if the track match is good (, is the track good?
317 if(trackMatchedIndex < 0) matched=kFALSE;//If the index is bad, don't count it
319 AliESDtrack *track = event->GetTrack(trackMatchedIndex);
320 //if this is a good track, accept track will return true. The track matched is good, so not track matched is false
321 matched = fEsdtrackCutsTPC->AcceptTrack(track);//If the track is bad, don't count it
329 if (cluster->GetNTracksMatched() > 0 && trackMatchedIndex>=0)
331 AliVTrack *track = event->GetTrack(trackMatchedIndex);
333 AliError("Error: track does not exist");
336 totalMatchedPt +=track->Pt();
337 fClusterEnergyCentMatched->Fill(cluster->E(),cent);
338 fHistMatchedClusterSizeVsCent->Fill(cluster->GetNCells(),cent);
340 float eff = fTmCorrections->TrackMatchingEfficiency(track->Pt(),cent);
341 if(TMath::Abs(eff)<1e-5) eff = 1.0;
342 //cout<<"pt "<<track->Pt()<<" eff "<<eff<<" total "<<nChargedHadronsTotal<<endl;
343 nChargedHadronsMeasured++;
344 nChargedHadronsTotal += 1/eff;
345 Double_t effCorrEt = CorrectForReconstructionEfficiency(*cluster,cent);
346 nChargedHadronsEtMeasured+= TMath::Sin(cp.Theta())*cluster->E();
347 //One efficiency is the gamma efficiency and the other is the track matching efficiency.
348 nChargedHadronsEtTotal+= 1/eff *TMath::Sin(cp.Theta())*cluster->E();
349 //cout<<"nFound "<<1<<" nFoundTotal "<<1/eff<<" etMeas "<<TMath::Sin(cp.Theta())*cluster->E()<<" ET total "<< 1/eff *TMath::Sin(cp.Theta())*cluster->E()<<endl;
351 Float_t nSigmaPion = fPIDResponse->NumberOfSigmasTPC(track, AliPID::kPion);
352 Float_t nSigmaProton = fPIDResponse->NumberOfSigmasTPC(track, AliPID::kProton);
353 bool isProton = (nSigmaPion>3.0 && nSigmaProton<3.0 && track->Pt()<0.9);
354 //cout<<"NSigmaProton "<<nSigmaProton<<endl;
355 etPiKPMatched += effCorrEt;
356 etPiKPMatchedNoEff +=TMath::Sin(cp.Theta())*cluster->E();
358 if(track->Charge()>0){
359 etPIDProtons += effCorrEt;
360 etPIDProtonsNoEff +=TMath::Sin(cp.Theta())*cluster->E();
363 etPIDAntiProtonsNoEff +=TMath::Sin(cp.Theta())*cluster->E();
364 etPIDAntiProtons += effCorrEt;
367 if(TMath::Sin(cp.Theta())*cluster->E()>0.5){
368 nChargedHadronsMeasured500MeV++;
369 nChargedHadronsTotal500MeV += 1/eff;
370 nChargedHadronsEtMeasured500MeV+= TMath::Sin(cp.Theta())*cluster->E();
371 nChargedHadronsEtTotal500MeV+= 1/eff *TMath::Sin(cp.Theta())*cluster->E();
373 fHistMatchedTracksEvspTvsCent->Fill(track->P(),TMath::Sin(cp.Theta())*cluster->E(),cent);
374 fHistMatchedTracksEvspTvsCentEffCorr->Fill(track->P(),effCorrEt,cent);
375 //Weighed by the number of tracks we didn't find
376 fHistMatchedTracksEvspTvsCentEffTMCorr->Fill(track->P(), effCorrEt,cent, (1/eff-1) );
377 if(cent<16 && cent>11){//centralities 60-80% where false track matches are low
378 for(int cbtest = 0; cbtest<20; cbtest++){//then we calculate the deposit matched to hadrons with different centrality bins' efficiencies
379 float efftest = fTmCorrections->TrackMatchingEfficiency(track->Pt(),cbtest);
380 if(TMath::Abs(efftest)<1e-5) efftest = 1.0;
381 Double_t effCorrEttest = CorrectForReconstructionEfficiency(*cluster,cbtest);
382 fHistPeripheralMatchedTracksEvspTvsCentEffTMCorr->Fill(track->P(), effCorrEttest,cbtest, (1/efftest-1) );
385 cluster->GetPosition(pos);
387 uncorrEt += TMath::Sin(p2.Theta())*cluster->E();
388 if(uncorrEt>=0.5) fHistMatchedTracksEvspTvsCentEffTMCorr500MeV->Fill(track->P(), effCorrEt,cent, (1/eff-1) );
389 const Double_t *pidWeights = track->PID();
391 Double_t maxpidweight = 0;
396 for (Int_t p =0; p < AliPID::kSPECIES; p++)
398 if (pidWeights[p] > maxpidweight)
400 maxpidweight = pidWeights[p];
404 if (fCuts->GetHistMakeTreeDeposit() && fDepositTree)
406 fEnergyDeposited = cluster->E();
407 fMomentumTPC = track->P();
408 fCharge = track->Charge();
409 fParticlePid = maxpid;
410 fPidProb = maxpidweight;
411 AliESDtrack *esdTrack = dynamic_cast<AliESDtrack*>(track);
413 AliError("Error: track does not exist");
416 if (esdTrack) fTrackPassedCut = fEsdtrackCutsTPC->AcceptTrack(esdTrack);
417 fDepositTree->Fill();
421 if (maxpidweight > fPidCut)
423 //Float_t dist = TMath::Sqrt(pos[0]*pos[0] + pos[1]*pos[1]);
425 //Float_t theta = TMath::ATan(pos[2]/dist)+TMath::Pi()/2;
427 //Float_t et = cluster->E() * TMath::Sin(theta);
428 if (maxpid == AliPID::kProton)
431 if (track->Charge() == 1)
433 fHistProtonEnergyDeposit->Fill(cluster->E(), track->E());
435 else if (track->Charge() == -1)
437 fHistAntiProtonEnergyDeposit->Fill(cluster->E(), track->E());
440 else if (maxpid == AliPID::kPion)
442 fHistChargedPionEnergyDeposit->Fill(cluster->E(), track->E());
444 else if (maxpid == AliPID::kKaon)
446 fHistChargedKaonEnergyDeposit->Fill(cluster->E(), track->E());
448 else if (maxpid == AliPID::kMuon)
450 fHistMuonEnergyDeposit->Fill(cluster->E(), track->E());
458 else{//these are clusters which were not track matched
460 //std::cout << x++ << std::endl;
462 //if (cluster->E() > fSingleCellEnergyCut && cluster->GetNCells() == fCuts->GetCommonSingleCell()) continue;
463 //if (cluster->E() < fClusterEnergyCut) continue;
464 cluster->GetPosition(pos);
468 fClusterPositionAccepted->Fill(p2.Phi(), p2.PseudoRapidity());
469 fClusterPositionAcceptedEnergy->Fill(p2.Phi(), p2.PseudoRapidity(),cluster->E());
470 fClusterEnergy->Fill(cluster->E());
471 fClusterEnergyCentNotMatched->Fill(cluster->E(),cent);
472 fHistClusterSizeVsCent->Fill(cluster->GetNCells(),cent);
473 fClusterEt->Fill(TMath::Sin(p2.Theta())*cluster->E());
474 uncorrEt += TMath::Sin(p2.Theta())*cluster->E();
475 float myuncorrEt = TMath::Sin(p2.Theta())*cluster->E();
476 fTotRawEt += myuncorrEt;
478 Double_t effCorrEt = CorrectForReconstructionEfficiency(*cluster,cent);
479 rawSignal += myuncorrEt;
480 effCorrSignal +=effCorrEt;
481 //cout<<"cluster energy "<<cluster->E()<<" eff corr Et "<<effCorrEt<<endl;
482 fTotRawEtEffCorr += effCorrEt;
483 fTotNeutralEt += effCorrEt;
484 nominalRawEt += effCorrEt;
486 totEt500MeV += effCorrEt;
487 //cout<<"test "<<myuncorrEt<<"> 0.5"<<endl;
490 //cout<<"test "<<myuncorrEt<<"< 0.5"<<endl;
492 nonlinHighRawEt += effCorrEt*GetCorrectionModification(*cluster,1,0,cent);
493 nonlinLowRawEt += effCorrEt*GetCorrectionModification(*cluster,-1,0,cent);
494 effHighRawEt += effCorrEt*GetCorrectionModification(*cluster,0,1,cent);
495 effLowRawEt += effCorrEt*GetCorrectionModification(*cluster,0,-1,cent);
496 fNeutralMultiplicity++;
502 fHistRawSignalReco->Fill(rawSignal);
503 fHistEffCorrSignalReco->Fill(effCorrSignal);
505 fHistNClustersPhosVsEmcal->Fill(nPhosClusters,nEmcalClusters,cent);
506 fChargedEnergyRemoved = GetChargedContribution(fNeutralMultiplicity);
507 fNeutralEnergyRemoved = GetNeutralContribution(fNeutralMultiplicity);
508 fHistChargedEnergyRemoved->Fill(fChargedEnergyRemoved, fNeutralMultiplicity);
509 fHistNeutralEnergyRemoved->Fill(fNeutralEnergyRemoved, fNeutralMultiplicity);
511 fGammaEnergyAdded = GetGammaContribution(fNeutralMultiplicity);
512 fHistGammaEnergyAdded->Fill(fGammaEnergyAdded, fNeutralMultiplicity);
514 Double_t removedEnergy = GetChargedContribution(fNeutralMultiplicity) + GetNeutralContribution(fNeutralMultiplicity) + GetGammaContribution(fNeutralMultiplicity) + GetSecondaryContribution(fNeutralMultiplicity);
515 fHistRemovedEnergy->Fill(removedEnergy);
517 fTotNeutralEtAcc = fTotNeutralEt;
518 //fHistTotRawEtEffCorr->Fill(fTotNeutralEt,cent);
519 fHistTotRawEtEffCorr->Fill(fTotRawEtEffCorr,cent);
520 fHistTotRawEt->Fill(fTotRawEt,cent);
521 fHistTotAllRawEt->Fill(fTotAllRawEt,cent);
522 fHistTotAllRawEtVsTotalPt->Fill(fTotAllRawEt,totalPt);
523 fHistTotAllRawEtVsTotalPtVsCent->Fill(fTotAllRawEt,totalPt,cent);
524 fHistTotMatchedRawEtVsTotalPtVsCent->Fill(fTotAllRawEt,totalMatchedPt,cent);
525 fHistTotAllRawEtEffCorr->Fill(fTotAllRawEtEffCorr,cent);
526 //cout<<"fTotAllRawEtEffCorr "<<fTotAllRawEtEffCorr<<" fTotAllRawEt "<<fTotAllRawEt<<" fTotRawEtEffCorr "<<fTotRawEtEffCorr<<"("<<fTotNeutralEt<<")"<<" fTotRawEt "<<fTotRawEt<<endl;
527 //cout<<"uncorr "<<uncorrEt<<" raw "<<nominalRawEt<<" tot raw "<<fTotNeutralEt;
528 fTotNeutralEt = fGeomCorrection * fEMinCorrection * (fTotNeutralEt - removedEnergy);
529 //cout<<" tot corr "<<fTotNeutralEt<<endl;
530 fTotEt = fTotChargedEt + fTotNeutralEt;
531 // Fill the histograms...0
533 //std::cout << "fTotNeutralEt: " << fTotNeutralEt << ", Contribution from non-removed charged: " << GetChargedContribution(fNeutralMultiplicity) << ", neutral: " << GetNeutralContribution(fNeutralMultiplicity) << ", gammas: " << GetGammaContribution(fNeutralMultiplicity) << ", multiplicity: " << fNeutralMultiplicity<< std::endl;
534 //cout<<"cent "<<cent<<" cluster mult "<<fClusterMult<<" fTotNeutralEt "<<fTotNeutralEt<<" nominalRawEt "<<nominalRawEt<<endl;
535 fHistNominalRawEt->Fill(nominalRawEt,cent);
536 fHistTotRawEtEffCorr500MeV->Fill(totEt500MeV,cent);
537 fHistNominalNonLinHighEt->Fill(nonlinHighRawEt,cent);
538 fHistNominalNonLinLowEt->Fill(nonlinLowRawEt,cent);
539 fHistNominalEffHighEt->Fill(effHighRawEt,cent);
540 fHistNominalEffLowEt->Fill(effLowRawEt,cent);
541 fHistFoundHadronsvsCent->Fill(nChargedHadronsMeasured,cent);
542 fHistNotFoundHadronsvsCent->Fill(nChargedHadronsTotal-nChargedHadronsMeasured,cent);
543 fHistFoundHadronsEtvsCent->Fill(nChargedHadronsEtMeasured,cent);
544 fHistNotFoundHadronsEtvsCent->Fill(nChargedHadronsEtTotal-nChargedHadronsEtMeasured,cent);
545 //cout<<"found "<<nChargedHadronsMeasured<<" total "<<nChargedHadronsTotal<<" not found "<<nChargedHadronsTotal-nChargedHadronsMeasured<<" found "<< nChargedHadronsMeasured500MeV<<" not found "<< nChargedHadronsTotal500MeV-nChargedHadronsMeasured500MeV <<" total "<<nChargedHadronsTotal500MeV<<endl;
546 fHistFoundHadronsvsCent500MeV->Fill(nChargedHadronsMeasured500MeV,cent);
547 fHistNotFoundHadronsvsCent500MeV->Fill(nChargedHadronsTotal500MeV-nChargedHadronsMeasured500MeV,cent);
548 fHistFoundHadronsEtvsCent500MeV->Fill(nChargedHadronsEtMeasured500MeV,cent);
549 fHistNotFoundHadronsEtvsCent500MeV->Fill(nChargedHadronsEtTotal500MeV-nChargedHadronsEtMeasured500MeV,cent);
550 // cout<<"Number of hadrons measured: "<<nChargedHadronsMeasured<<" Estimated total number of hadrons "<<nChargedHadronsTotal<<" ET in track matched hadrons "<<
551 // nChargedHadronsEtMeasured;
552 // if(nChargedHadronsMeasured>0)cout<<" ("<<nChargedHadronsEtMeasured/nChargedHadronsMeasured<<") ";
553 // cout<<" ET in all hadrons ";
554 // cout<<nChargedHadronsEtTotal;
555 // if(nChargedHadronsTotal>0) cout<<" ("<<nChargedHadronsEtTotal/nChargedHadronsTotal<<") ";
557 fHistPIDProtonsTrackMatchedDepositedVsNch->Fill(etPIDProtons,multiplicity);
558 fHistPIDAntiProtonsTrackMatchedDepositedVsNch->Fill(etPIDAntiProtons,multiplicity);
559 fHistPIDProtonsTrackMatchedDepositedVsNcl->Fill(etPIDProtons,nCluster);
560 fHistPIDAntiProtonsTrackMatchedDepositedVsNcl->Fill(etPIDAntiProtons,nCluster);
561 fHistPIDProtonsTrackMatchedDepositedVsNchNoEff->Fill(etPIDProtonsNoEff,multiplicity);
562 fHistPIDAntiProtonsTrackMatchedDepositedVsNchNoEff->Fill(etPIDAntiProtonsNoEff,multiplicity);
563 fHistPIDProtonsTrackMatchedDepositedVsNclNoEff->Fill(etPIDProtonsNoEff,nCluster);
564 fHistPIDAntiProtonsTrackMatchedDepositedVsNclNoEff->Fill(etPIDAntiProtonsNoEff,nCluster);
565 fHistCentVsNchVsNclReco->Fill(cent,multiplicity,nCluster);
566 fHistPiKPTrackMatchedDepositedVsNch->Fill(etPiKPMatched,multiplicity);
567 fHistPiKPTrackMatchedDepositedVsNchNoEff->Fill(etPiKPMatchedNoEff,multiplicity);
572 bool AliAnalysisEtReconstructed::CheckGoodVertex(AliVParticle* track)
578 AliError("ERROR: no track");
581 AliESDtrack *esdTrack = dynamic_cast<AliESDtrack*>(track);
583 AliError("ERROR: no track");
586 esdTrack->GetImpactParametersTPC(bxy,bz);
589 bool status = (TMath::Abs(track->Xv()) < fCuts->GetReconstructedVertexXCut()) &&
590 (TMath::Abs(track->Yv()) < fCuts->GetReconstructedVertexYCut()) &&
591 (TMath::Abs(track->Zv()) < fCuts->GetReconstructedVertexZCut()) &&
592 (TMath::Abs(bxy) < fCuts->GetReconstructedIPxyCut()) &&
593 (TMath::Abs(bz) < fCuts->GetReconstructedIPzCut());
598 void AliAnalysisEtReconstructed::Init()
600 AliAnalysisEt::Init();
601 fPidCut = fCuts->GetReconstructedPidCut();
602 TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 1., 1., AliMagF::k5kG));
604 cout<<"Warning! You have not set corrections. Your code will crash. You have to set the corrections."<<endl;
608 bool AliAnalysisEtReconstructed::TrackHitsCalorimeter(AliVParticle* track, Double_t magField)
609 { // propagate track to detector radius
611 cout<<"Warning: track empty"<<endl;
614 AliESDtrack *esdTrack= dynamic_cast<AliESDtrack*>(track);
616 AliError("ERROR: no ESD track");
619 // Printf("Propagating track: eta: %f, phi: %f, pt: %f", esdTrack->Eta(), esdTrack->Phi(), esdTrack->Pt());
621 Bool_t prop = esdTrack->PropagateTo(fDetectorRadius, magField);
623 // if (prop) Printf("Track propagated, eta: %f, phi: %f, pt: %f", esdTrack->Eta(), esdTrack->Phi(), esdTrack->Pt());
624 return prop && fSelector->CutGeometricalAcceptance(*esdTrack);
627 void AliAnalysisEtReconstructed::FillOutputList(TList* list)
628 { // add some extra histograms to the ones from base class
629 AliAnalysisEt::FillOutputList(list);
631 list->Add(fHistChargedPionEnergyDeposit);
632 list->Add(fHistProtonEnergyDeposit);
633 list->Add(fHistAntiProtonEnergyDeposit);
634 list->Add(fHistChargedKaonEnergyDeposit);
635 list->Add(fHistMuonEnergyDeposit);
637 list->Add(fHistRemovedEnergy);
638 list->Add(fClusterPositionAccepted);
639 list->Add(fClusterPositionAll);
640 list->Add(fClusterPositionAcceptedEnergy);
641 list->Add(fClusterPositionAllEnergy);
642 list->Add(fClusterEnergy);
643 list->Add(fClusterEnergyCent);
644 list->Add(fClusterEnergyCentMatched);
645 list->Add(fClusterEnergyCentNotMatched);
646 list->Add(fClusterEt);
648 list->Add(fHistChargedEnergyRemoved);
649 list->Add(fHistNeutralEnergyRemoved);
650 list->Add(fHistGammaEnergyAdded);
651 list->Add(fHistMatchedTracksEvspTvsCent);
652 list->Add(fHistMatchedTracksEvspTvsCentEffCorr);
653 list->Add(fHistMatchedTracksEvspTvsCentEffTMCorr);
654 list->Add(fHistPeripheralMatchedTracksEvspTvsCentEffTMCorr);
655 list->Add(fHistMatchedTracksEvspTvsCentEffTMCorr500MeV);
656 list->Add(fHistFoundHadronsvsCent);
657 list->Add(fHistNotFoundHadronsvsCent);
658 list->Add(fHistFoundHadronsEtvsCent);
659 list->Add(fHistNotFoundHadronsEtvsCent);
660 list->Add(fHistFoundHadronsvsCent500MeV);
661 list->Add(fHistNotFoundHadronsvsCent500MeV);
662 list->Add(fHistFoundHadronsEtvsCent500MeV);
663 list->Add(fHistNotFoundHadronsEtvsCent500MeV);
664 list->Add(fHistNominalRawEt);
665 list->Add(fHistNominalNonLinHighEt);
666 list->Add(fHistNominalNonLinLowEt);
667 list->Add(fHistNominalEffHighEt);
668 list->Add(fHistNominalEffLowEt);
669 list->Add(fHistTotRawEtEffCorr);
670 list->Add(fHistTotRawEtEffCorr500MeV);
671 list->Add(fHistTotAllRawEtEffCorr);
672 list->Add(fHistTotRawEt);
673 list->Add(fHistTotAllRawEt);
674 list->Add(fHistNClustersPhosVsEmcal);
675 list->Add(fHistClusterSizeVsCent);
676 list->Add(fHistMatchedClusterSizeVsCent);
677 list->Add(fHistTotAllRawEtVsTotalPt);
678 list->Add(fHistTotAllRawEtVsTotalPtVsCent);
679 list->Add(fHistTotMatchedRawEtVsTotalPtVsCent);
680 list->Add(fHistPIDProtonsTrackMatchedDepositedVsNch);
681 list->Add(fHistPIDAntiProtonsTrackMatchedDepositedVsNch);
682 list->Add(fHistPIDProtonsTrackMatchedDepositedVsNcl);
683 list->Add(fHistPIDAntiProtonsTrackMatchedDepositedVsNcl);
684 list->Add(fHistPiKPTrackMatchedDepositedVsNch);
685 list->Add(fHistPIDProtonsTrackMatchedDepositedVsNchNoEff);
686 list->Add(fHistPIDAntiProtonsTrackMatchedDepositedVsNchNoEff);
687 list->Add(fHistPIDProtonsTrackMatchedDepositedVsNclNoEff);
688 list->Add(fHistPIDAntiProtonsTrackMatchedDepositedVsNclNoEff);
689 list->Add(fHistPiKPTrackMatchedDepositedVsNchNoEff);
690 list->Add(fHistCentVsNchVsNclReco);
691 list->Add(fHistRawSignalReco);
692 list->Add(fHistEffCorrSignalReco);
695 void AliAnalysisEtReconstructed::CreateHistograms()
696 { // add some extra histograms to the ones from base class
697 AliAnalysisEt::CreateHistograms();
699 Int_t nbinsEt = 1000;
703 // possibly change histogram limits
705 // nbinsEt = fCuts->GetHistNbinsParticleEt();
706 // minEt = fCuts->GetHistMinParticleEt();
707 // maxEt = fCuts->GetHistMaxParticleEt();
711 histname = "fHistChargedPionEnergyDeposit" + fHistogramNameSuffix;
712 fHistChargedPionEnergyDeposit = new TH2F(histname.Data(), "Energy deposited by #pi^{+/-}", nbinsEt, minEt, maxEt, nbinsEt, minEt, maxEt);
713 fHistChargedPionEnergyDeposit->SetXTitle("Energy deposited in calorimeter");
714 fHistChargedPionEnergyDeposit->SetYTitle("Energy of track");
716 histname = "fHistProtonEnergyDeposit" + fHistogramNameSuffix;
717 fHistProtonEnergyDeposit = new TH2F(histname.Data(), "Energy deposited by protons", nbinsEt, minEt, maxEt, nbinsEt, minEt, maxEt);
718 fHistProtonEnergyDeposit->SetXTitle("Energy deposited in calorimeter");
719 fHistProtonEnergyDeposit->SetYTitle("Energy of track");
721 histname = "fHistAntiProtonEnergyDeposit" + fHistogramNameSuffix;
722 fHistAntiProtonEnergyDeposit = new TH2F(histname.Data(), "Energy deposited by anti-protons", nbinsEt, minEt, maxEt, nbinsEt, minEt, maxEt);
723 fHistAntiProtonEnergyDeposit->SetXTitle("Energy deposited in calorimeter");
724 fHistAntiProtonEnergyDeposit->SetYTitle("Energy of track");
726 histname = "fHistChargedKaonEnergyDeposit" + fHistogramNameSuffix;
727 fHistChargedKaonEnergyDeposit = new TH2F(histname.Data(), "Energy deposited by K^{+/-}", nbinsEt, minEt, maxEt, nbinsEt, minEt, maxEt);
728 fHistChargedKaonEnergyDeposit->SetXTitle("Energy deposited in calorimeter");
729 fHistChargedKaonEnergyDeposit->SetYTitle("Energy of track");
731 histname = "fHistMuonEnergyDeposit" + fHistogramNameSuffix;
732 fHistMuonEnergyDeposit = new TH2F(histname.Data(), "Energy deposited by #mu^{+/-}", nbinsEt, minEt, maxEt, nbinsEt, minEt, maxEt);
733 fHistMuonEnergyDeposit->SetXTitle("Energy deposited in calorimeter");
734 fHistMuonEnergyDeposit->SetYTitle("Energy of track");
736 histname = "fHistRemovedEnergy" + fHistogramNameSuffix;
737 fHistRemovedEnergy = new TH1F(histname.Data(), histname.Data(), 1000, 0, 20);
738 //fHistMuonEnergyDeposit->SetXTitle("Energy deposited in calorimeter");
739 //fHistMuonEnergyDeposit->SetYTitle("Energy of track");
741 histname = "fClusterPositionAccepted" + fHistogramNameSuffix;
742 fClusterPositionAccepted = new TH2D(histname.Data(), "Position of accepted neutral clusters",300, -TMath::Pi(),TMath::Pi(), 100, -0.7 , 0.7);
743 fClusterPositionAccepted->SetXTitle("#phi");
744 fClusterPositionAccepted->SetYTitle("#eta");
746 histname = "fClusterPositionAll" + fHistogramNameSuffix;
747 fClusterPositionAll = new TH2D(histname.Data(), "Position of accepted neutral clusters",300, -TMath::Pi(),TMath::Pi(), 100, -0.7 , 0.7);
748 fClusterPositionAll->SetXTitle("#phi");
749 fClusterPositionAll->SetYTitle("#eta");
751 histname = "fClusterPositionAcceptedEnergy" + fHistogramNameSuffix;
752 fClusterPositionAcceptedEnergy = new TH2D(histname.Data(), "Position of accepted neutral clusters",300, -TMath::Pi(),TMath::Pi(), 100, -0.7 , 0.7);
753 fClusterPositionAcceptedEnergy->SetXTitle("#phi");
754 fClusterPositionAcceptedEnergy->SetYTitle("#eta");
756 histname = "fClusterPositionAllEnergy" + fHistogramNameSuffix;
757 fClusterPositionAllEnergy = new TH2D(histname.Data(), "Position of accepted neutral clusters",300, -TMath::Pi(),TMath::Pi(), 100, -0.7 , 0.7);
758 fClusterPositionAllEnergy->SetXTitle("#phi");
759 fClusterPositionAllEnergy->SetYTitle("#eta");
761 histname = "fClusterEnergy" + fHistogramNameSuffix;
762 fClusterEnergy = new TH1F(histname.Data(), histname.Data(), 100, 0, 5);
763 fClusterEnergy->SetYTitle("Number of clusters");
764 fClusterEnergy->SetXTitle("Energy of cluster");
766 histname = "fClusterEnergyCent" + fHistogramNameSuffix;
767 fClusterEnergyCent = new TH2F(histname.Data(), histname.Data(), 100, 0, 5,20,-0.5,19.5);
768 fClusterEnergyCent->SetXTitle("Energy of cluster");
769 fClusterEnergyCent->SetYTitle("Centrality Bin");
770 fClusterEnergyCent->SetZTitle("Number of clusters");
772 histname = "fClusterEnergyCentMatched" + fHistogramNameSuffix;
773 fClusterEnergyCentMatched = new TH2F(histname.Data(), histname.Data(), 100, 0, 5,20,-0.5,19.5);
774 fClusterEnergyCentMatched->SetXTitle("Energy of cluster");
775 fClusterEnergyCentMatched->SetYTitle("Centrality Bin");
776 fClusterEnergyCentMatched->SetZTitle("Number of Clusters");
778 histname = "fClusterEnergyCentNotMatched" + fHistogramNameSuffix;
779 fClusterEnergyCentNotMatched = new TH2F(histname.Data(), histname.Data(), 100, 0, 5,20,-0.5,19.5);
780 fClusterEnergyCentNotMatched->SetXTitle("Energy of cluster");
781 fClusterEnergyCentNotMatched->SetYTitle("Centrality Bin");
782 fClusterEnergyCentNotMatched->SetZTitle("Number of clusters");
784 histname = "fClusterEt" + fHistogramNameSuffix;
785 fClusterEt = new TH1F(histname.Data(), histname.Data(), 100, 0, 5);
786 fClusterEt->SetXTitle("Number of clusters");
787 fClusterEt->SetYTitle("E_{T} of cluster");
789 histname = "fHistChargedEnergyRemoved" + fHistogramNameSuffix;
790 fHistChargedEnergyRemoved = new TH2D(histname.Data(), histname.Data(), 1000, .0, 30, 100, -0.5 , 99.5);
792 histname = "fHistNeutralEnergyRemoved" + fHistogramNameSuffix;
793 fHistNeutralEnergyRemoved = new TH2D(histname.Data(), histname.Data(), 1000, .0, 30, 100, -0.5 , 99.5);
795 histname = "fHistGammaEnergyAdded" + fHistogramNameSuffix;
796 fHistGammaEnergyAdded = new TH2D(histname.Data(), histname.Data(), 1000, .0, 30, 100, -0.5 , 99.5);
798 fHistMatchedTracksEvspTvsCent = new TH3F("fHistMatchedTracksEvspTvsCent", "fHistMatchedTracksEvspTvsCent",100, 0, 3,100,0,3,20,-0.5,19.5);
799 fHistMatchedTracksEvspTvsCentEffCorr = new TH3F("fHistMatchedTracksEvspTvsCentEffCorr", "fHistMatchedTracksEvspTvsCentEffCorr",100, 0, 3,100,0,3,20,-0.5,19.5);
800 fHistMatchedTracksEvspTvsCentEffTMCorr = new TH3F("fHistMatchedTracksEvspTvsCentEffTMCorr", "fHistMatchedTracksEvspTvsCentEffTMCorr",100, 0, 3,100,0,3,20,-0.5,19.5);
801 fHistPeripheralMatchedTracksEvspTvsCentEffTMCorr = new TH3F("fHistPeripheralMatchedTracksEvspTvsCentEffTMCorr", "fHistPeripheralMatchedTracksEvspTvsCentEffTMCorr",100, 0, 3,100,0,3,20,-0.5,19.5);
802 fHistMatchedTracksEvspTvsCentEffTMCorr500MeV = new TH3F("fHistMatchedTracksEvspTvsCentEffTMCorr500MeV", "fHistMatchedTracksEvspTvsCentEffTMCorr500MeV",100, 0, 3,100,0,3,20,-0.5,19.5);
805 if(fHistogramNameSuffix.Contains("P")){max = 100;}
806 fHistFoundHadronsvsCent = new TH2F("fHistFoundHadronsvsCent","fHistFoundHadronsvsCent",100,0,max,20,-0.5,19.5);
807 fHistNotFoundHadronsvsCent = new TH2F("fHistNotFoundHadronsvsCent","fHistNotFoundHadronsvsCent",100,0,max,20,-0.5,19.5);
808 fHistFoundHadronsEtvsCent = new TH2F("fHistFoundHadronsEtvsCent","fHistFoundHadronsEtvsCent",100,0,max,20,-0.5,19.5);
809 fHistNotFoundHadronsEtvsCent = new TH2F("fHistNotFoundHadronsEtvsCent","fHistNotFoundHadronsEtvsCent",100,0,max,20,-0.5,19.5);
810 fHistFoundHadronsvsCent500MeV = new TH2F("fHistFoundHadronsvsCent500MeV","fHistFoundHadronsvsCent500MeV",100,0,max,20,-0.5,19.5);
811 fHistNotFoundHadronsvsCent500MeV = new TH2F("fHistNotFoundHadronsvsCent500MeV","fHistNotFoundHadronsvsCent500MeV",100,0,max,20,-0.5,19.5);
812 fHistFoundHadronsEtvsCent500MeV = new TH2F("fHistFoundHadronsEtvsCent500MeV","fHistFoundHadronsEtvsCent500MeV",100,0,max,20,-0.5,19.5);
813 fHistNotFoundHadronsEtvsCent500MeV = new TH2F("fHistNotFoundHadronsEtvsCent500MeV","fHistNotFoundHadronsEtvsCent500MeV",100,0,max,20,-0.5,19.5);
815 fHistTotRawEtEffCorr = new TH2F("fHistTotRawEtEffCorr","fHistTotRawEtEffCorr",250,0,250,20,-0.5,19.5);
816 fHistTotRawEt = new TH2F("fHistTotRawEt","fHistTotRawEt",250,0,250,20,-0.5,19.5);
817 fHistTotRawEtEffCorr500MeV = new TH2F("fHistTotRawEtEffCorr500MeV","fHistTotRawEtEffCorr500MeV",250,0,250,20,-0.5,19.5);
818 fHistTotAllRawEt = new TH2F("fHistTotAllRawEt","fHistTotAllRawEt",250,0,250,20,-0.5,19.5);
819 fHistTotAllRawEtEffCorr = new TH2F("fHistTotAllRawEtEffCorr","fHistTotAllRawEtEffCorr",250,0,250,20,-0.5,19.5);
820 fHistNClustersPhosVsEmcal = new TH3F("fHistNClustersPhosVsEmcal","fHistNClustersPhosVsEmcal",50,0,50,250,0,250,20,-0.5,19);
821 fHistClusterSizeVsCent = new TH2F("fHistClusterSizeVsCent","fHistClusterSizeVsCent",10,0.5,10.5,20,-0.5,19.5);
822 fHistMatchedClusterSizeVsCent = new TH2F("fHistMatchedClusterSizeVsCent","fHistMatchedClusterSizeVsCent",10,0.5,10.5,20,-0.5,19.5);
823 fHistTotAllRawEtVsTotalPt = new TH2F("fHistTotAllRawEtVsTotalPt","fHistTotAllRawEtVsTotalPt",125,0,250,200,0,2000);
824 fHistTotAllRawEtVsTotalPtVsCent = new TH3F("fHistTotAllRawEtVsTotalPtVsCent","fHistTotAllRawEtVsTotalPtVsCent",125,0,250,200,0,2000,20,-0.5,19.5);
825 fHistTotMatchedRawEtVsTotalPtVsCent = new TH3F("fHistTotMatchedRawEtVsTotalPtVsCent","fHistTotMatchedRawEtVsTotalPtVsCent",250,0,250,100,0,200,20,-0.5,19.5);
828 histname = "fHistNominalRawEt" + fHistogramNameSuffix;
829 fHistNominalRawEt = new TH2D(histname.Data(), histname.Data(),nbinsEt,minEt,maxEt,20,-0.5,19.5);
830 histname = "fHistNominalNonLinHighEt" + fHistogramNameSuffix;
831 fHistNominalNonLinHighEt = new TH2D(histname.Data(), histname.Data(),nbinsEt,minEt,maxEt,20,-0.5,19.5);
832 histname = "fHistNominalNonLinLowEt" + fHistogramNameSuffix;
833 fHistNominalNonLinLowEt = new TH2D(histname.Data(), histname.Data(),nbinsEt,minEt,maxEt,20,-0.5,19.5);
834 histname = "fHistNominalEffHighEt" + fHistogramNameSuffix;
835 fHistNominalEffHighEt = new TH2D(histname.Data(), histname.Data(),nbinsEt,minEt,maxEt,20,-0.5,19.5);
836 histname = "fHistNominalEffLowEt" + fHistogramNameSuffix;
837 fHistNominalEffLowEt = new TH2D(histname.Data(), histname.Data(),nbinsEt,minEt,maxEt,20,-0.5,19.5);
839 Float_t maxEtRange = 25;
840 Float_t maxEtRangeHigh = 125;
841 Float_t minEtRange = 0;
842 Int_t nbinsMult = 100;
843 Float_t maxMult = 3000;
848 fHistPIDProtonsTrackMatchedDepositedVsNch = new TH2F("fHistPIDProtonsTrackMatchedDepositedVsNch","PID'd protons deposited in calorimeter vs multiplicity",nbinsEt,minEtRange,maxEtRange,nbinsMult,minMult,maxMult);
849 fHistPIDAntiProtonsTrackMatchedDepositedVsNch = new TH2F("fHistPIDAntiProtonsTrackMatchedDepositedVsNch","PID'd #bar{p} E_{T} deposited in calorimeter vs multiplicity",nbinsEt,minEtRange,maxEtRange,nbinsMult,minMult,maxMult);
850 fHistPIDProtonsTrackMatchedDepositedVsNcl = new TH2F("fHistPIDProtonsTrackMatchedDepositedVsNcl","PID'd protons deposited in calorimeter vs cluster multiplicity",nbinsEt,minEtRange,maxEtRange,nbinsCl,minCl,maxCl);
851 fHistPIDAntiProtonsTrackMatchedDepositedVsNcl = new TH2F("fHistPIDAntiProtonsTrackMatchedDepositedVsNcl","PID'd #bar{p} E_{T} deposited in calorimeter vs cluster multiplicity",nbinsEt,minEtRange,maxEtRange,nbinsCl,minCl,maxCl);
852 fHistPiKPTrackMatchedDepositedVsNch = new TH2F("fHistPiKPTrackMatchedDepositedVsNch","PiKP track matched",nbinsEt,minEtRange,maxEtRangeHigh,nbinsMult,minMult,maxMult);
854 fHistPIDProtonsTrackMatchedDepositedVsNchNoEff = new TH2F("fHistPIDProtonsTrackMatchedDepositedVsNchNoEff","PID'd protons deposited in calorimeter vs multiplicity",nbinsEt,minEtRange,maxEtRange,nbinsMult,minMult,maxMult);
855 fHistPIDAntiProtonsTrackMatchedDepositedVsNchNoEff = new TH2F("fHistPIDAntiProtonsTrackMatchedDepositedVsNchNoEff","PID'd #bar{p} E_{T} deposited in calorimeter vs multiplicity",nbinsEt,minEtRange,maxEtRange,nbinsMult,minMult,maxMult);
856 fHistPIDProtonsTrackMatchedDepositedVsNclNoEff = new TH2F("fHistPIDProtonsTrackMatchedDepositedVsNclNoEff","PID'd protons deposited in calorimeter vs cluster multiplicity",nbinsEt,minEtRange,maxEtRange,nbinsCl,minCl,maxCl);
857 fHistPIDAntiProtonsTrackMatchedDepositedVsNclNoEff = new TH2F("fHistPIDAntiProtonsTrackMatchedDepositedVsNclNoEff","PID'd #bar{p} E_{T} deposited in calorimeter vs cluster multiplicity",nbinsEt,minEtRange,maxEtRange,nbinsCl,minCl,maxCl);
858 fHistPiKPTrackMatchedDepositedVsNchNoEff = new TH2F("fHistPiKPTrackMatchedDepositedVsNchNoEff","PiKP track matched",nbinsEt,minEtRange,maxEtRangeHigh,nbinsMult,minMult,maxMult);
861 fHistCentVsNchVsNclReco = new TH3F("fHistCentVsNchVsNclReco","Cent bin vs Nch Vs NCl",20,-0.5,19.5,nbinsMult,minMult,maxMult,nbinsCl,minCl,maxCl);
863 fHistRawSignalReco = new TH1F("fHistRawSignalReco","fHistRawSignalReco",20,-0.5,19.5);
864 fHistEffCorrSignalReco = new TH1F("fHistEffCorrSignalReco","fHistEffCorrSignalReco",20,-0.5,19.5);
867 Double_t AliAnalysisEtReconstructed::ApplyModifiedCorrections(const AliESDCaloCluster& cluster,Int_t nonLinCorr, Int_t effCorr, Int_t cent)
870 cluster.GetPosition(pos);
872 Double_t corrEnergy = fReCorrections->CorrectedEnergy(cluster.E(),cent);
874 Double_t factorNonLin = GetCorrectionModification(cluster, nonLinCorr,effCorr,cent);
876 cout<<"Warning: This function should not get called!"<<endl;
877 //std::cout << "Original energy: " << cluster.E() << ", corrected energy: " << corrEnergy << std::endl;
878 return TMath::Sin(cp.Theta())*corrEnergy*factorNonLin;
881 Double_t AliAnalysisEtReconstructed::GetCorrectionModification(const AliESDCaloCluster& cluster,Int_t nonLinCorr, Int_t effCorr, Int_t cent){//nonLinCorr 0 = nominal 1 = high -1 = low, effCorr 0 = nominal 1 = high -1 = low
883 cout<<"Warning: This function should not get called!"<<endl;//this statement is basically here to avoid a compilation warning
886 cout<<"Warning: This function should not get called!"<<endl;//this statement is basically here to avoid a compilation warning
888 return cluster.E()*cent;