1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 //_________________________________________________________________________
17 // Class for the analysis of particle - hadron correlations
18 // Particle (for example direct gamma) must be found
19 // in a previous analysis
21 //-- Author: Gustavo Conesa (LNF-INFN) (LPSC-IN2P3-CNRS)
22 // Yaxian Mao (LPSC-IN2P3-CNRS) and (CNWU) first usable implementation.
23 // Xiangrong Zhu (CNWU), implementtion of own mixing.
24 //////////////////////////////////////////////////////////////////////////////
27 // --- ROOT system ---
28 //#include "TClonesArray.h"
32 #include <TDatabasePDG.h>
34 //---- ANALYSIS system ----
35 #include "AliNeutralMesonSelection.h"
36 #include "AliAnaParticleHadronCorrelation.h"
37 #include "AliCaloTrackReader.h"
38 #include "AliAODPWG4ParticleCorrelation.h"
39 #include "AliFiducialCut.h"
40 #include "AliVTrack.h"
41 #include "AliVCluster.h"
42 #include "AliMCAnalysisUtils.h"
43 #include "TParticle.h"
45 #include "AliAODMCParticle.h"
46 #include "AliMixedEvent.h"
47 #include "AliAnalysisManager.h"
48 #include "AliInputEventHandler.h"
49 #include "AliEventplane.h"
51 ClassImp(AliAnaParticleHadronCorrelation)
54 //___________________________________________________________________
55 AliAnaParticleHadronCorrelation::AliAnaParticleHadronCorrelation():
56 AliAnaCaloTrackCorrBaseClass(),
57 fFillAODWithReferences(0), fCheckLeadingWithNeutralClusters(0),
58 fMaxAssocPt(1000.), fMinAssocPt(0.),
59 fDeltaPhiMaxCut(0.), fDeltaPhiMinCut(0.),
60 fSelectIsolated(0), fMakeSeveralUE(0),
61 fUeDeltaPhiMaxCut(0.), fUeDeltaPhiMinCut(0.),
62 fPi0AODBranchName(""), fNeutralCorr(0),
63 fPi0Trigger(0), fDecayTrigger(0),
64 fMakeAbsoluteLeading(0), fMakeNearSideLeading(0),
65 fLeadingTriggerIndex(-1), fHMPIDCorrelation(0), fFillBradHisto(0),
66 fNAssocPtBins(0), fAssocPtBinLimit(),
68 fListMixTrackEvents(), fListMixCaloEvents(),
69 fUseMixStoredInReader(0), fFillNeutralEventMixPool(0),
70 fM02MaxCut(0), fM02MinCut(0),
71 fFillPileUpHistograms(0),
72 fSelectLeadingHadronAngle(0),
73 fMinLeadHadPhi(0), fMaxLeadHadPhi(0),
74 fMinLeadHadPt(0), fMaxLeadHadPt(0),
75 fFillEtaGapsHisto(1), fFillMomImbalancePtAssocBinsHisto(0),
77 fhPtTriggerInput(0), fhPtTriggerSSCut(0),
78 fhPtTriggerIsoCut(0), fhPtTriggerFidCut(0),
79 fhPtTrigger(0), fhPtTriggerVtxBC0(0),
80 fhPtTriggerVzBin(0), fhPtTriggerBin(0),
81 fhPhiTrigger(0), fhEtaTrigger(0),
83 fhPtTriggerCentrality(0), fhPtTriggerEventPlane(0),
84 fhTriggerEventPlaneCentrality(0),
85 fhPtTriggerMixed(0), fhPtTriggerMixedVzBin(0), fhPtTriggerMixedBin(0),
86 fhPhiTriggerMixed(0), fhEtaTriggerMixed(0),
87 fhPtLeadingOppositeHadron(0), fhPtDiffPhiLeadingOppositeHadron(0), fhPtDiffEtaLeadingOppositeHadron(0),
88 fhDeltaPhiDeltaEtaCharged(0),
89 fhPhiCharged(0), fhEtaCharged(0),
90 fhDeltaPhiCharged(0), fhDeltaEtaCharged(0),
91 fhDeltaPhiChargedPt(0), fhDeltaPhiUeChargedPt(0),
93 fhXECharged(0), fhXECharged_Cone2(0), fhXEUeCharged(0),
94 fhXEPosCharged(0), fhXENegCharged(0),
95 fhPtHbpXECharged(0), fhPtHbpXECharged_Cone2(0), fhPtHbpXEUeCharged(0),
96 fhZTCharged(0), fhZTUeCharged(0),
97 fhZTPosCharged(0), fhZTNegCharged(0),
98 fhPtHbpZTCharged(0), fhPtHbpZTUeCharged(0),
99 fhXEChargedMC(), fhDeltaPhiChargedMC(),
100 fhDeltaPhiDeltaEtaChargedPtA3GeV(0),
101 fhDeltaPhiChargedPtA3GeV(0), fhDeltaEtaChargedPtA3GeV(0),
103 fhDeltaPhiChargedPileUp(), fhDeltaEtaChargedPileUp(),
104 fhDeltaPhiChargedPtA3GeVPileUp(), fhDeltaEtaChargedPtA3GeVPileUp(),
105 fhXEChargedPileUp(), fhXEUeChargedPileUp(),
106 fhZTChargedPileUp(), fhZTUeChargedPileUp(),
107 fhPtTrigChargedPileUp(),
108 fhDeltaPhiChargedOtherBC(), fhDeltaPhiChargedPtA3GeVOtherBC(),
109 fhXEChargedOtherBC(), fhXEUeChargedOtherBC(),
110 fhZTChargedOtherBC(), fhZTUeChargedOtherBC(),
111 fhPtTrigChargedOtherBC(),
112 fhDeltaPhiChargedBC0(), fhDeltaPhiChargedPtA3GeVBC0(),
113 fhXEChargedBC0(), fhXEUeChargedBC0(),
114 fhZTChargedBC0(), fhZTUeChargedBC0(),
115 fhPtTrigChargedBC0(),
116 fhDeltaPhiChargedVtxBC0(), fhDeltaPhiChargedPtA3GeVVtxBC0(),
117 fhXEChargedVtxBC0(), fhXEUeChargedVtxBC0(),
118 fhZTChargedVtxBC0(), fhZTUeChargedVtxBC0(),
119 fhPtTrigChargedVtxBC0(),
120 fhDeltaPhiUeLeftCharged(0),
121 fhDeltaPhiUeLeftUpCharged(0), fhDeltaPhiUeRightUpCharged(0),
122 fhDeltaPhiUeLeftDownCharged(0), fhDeltaPhiUeRightDownCharged(0),
123 fhXEUeLeftCharged(0),
124 fhXEUeLeftUpCharged(0), fhXEUeRightUpCharged(0),
125 fhXEUeLeftDownCharged(0), fhXEUeRightDownCharged(0),
126 fhPtHbpXEUeLeftCharged(0), fhZTUeLeftCharged(0),
127 fhPtHbpZTUeLeftCharged(0),
128 fhPtTrigPout(0), fhPtTrigCharged(0),
129 fhDeltaPhiChargedMult(0x0), fhDeltaEtaChargedMult(0x0),
130 fhXEMult(0x0), fhXEUeMult(0x0),
131 fhZTMult(0x0), fhZTUeMult(0x0),
132 fhAssocPtBkg(0), fhDeltaPhiDeltaEtaAssocPtBin(0),
133 fhDeltaPhiAssocPtBin(0),
134 fhDeltaPhiAssocPtBinDEta08(0), fhDeltaPhiAssocPtBinDEta0(0),
135 fhDeltaPhiAssocPtBinHMPID(0), fhDeltaPhiAssocPtBinHMPIDAcc(0),
136 fhDeltaPhiBradAssocPtBin(0), fhDeltaPhiBrad(0),
137 fhXEAssocPtBin(0), fhZTAssocPtBin(0),
138 fhXEVZ(0), fhZTVZ(0),
139 fhDeltaPhiDeltaEtaNeutral(0),
140 fhPhiNeutral(0), fhEtaNeutral(0),
141 fhDeltaPhiNeutral(0), fhDeltaEtaNeutral(0),
142 fhDeltaPhiNeutralPt(0), fhDeltaPhiUeNeutralPt(0),
143 fhXENeutral(0), fhXEUeNeutral(0),
144 fhPtHbpXENeutral(0), fhPtHbpXEUeNeutral(0),
145 fhZTNeutral(0), fhZTUeNeutral(0),
146 fhPtHbpZTNeutral(0), fhPtHbpZTUeNeutral(0),
147 fhDeltaPhiUeLeftNeutral(0), fhXEUeLeftNeutral(0),
148 fhPtHbpXEUeLeftNeutral(0), fhZTUeLeftNeutral(0),
149 fhPtHbpZTUeLeftNeutral(0), fhPtPi0DecayRatio(0),
150 fhDeltaPhiDecayCharged(0), fhXEDecayCharged(0), fhZTDecayCharged(0),
151 fhDeltaPhiDecayNeutral(0), fhXEDecayNeutral(0), fhZTDecayNeutral(0),
152 fhDeltaPhiDecayChargedAssocPtBin(0),
153 fh2phiTriggerParticle(0x0),
154 fhMCPtTrigger(0), fhMCPhiTrigger(0), fhMCEtaTrigger(0),
155 fhMCPtTriggerNotLeading(0), fhMCPhiTriggerNotLeading(0), fhMCEtaTriggerNotLeading(0),
156 fhMCEtaCharged(0), fhMCPhiCharged(0),
157 fhMCDeltaEtaCharged(0), fhMCDeltaPhiCharged(0x0),
158 fhMCDeltaPhiDeltaEtaCharged(0), fhMCDeltaPhiChargedPt(0),
159 fhMCPtXECharged(0), fhMCPtXEUeCharged(0),
160 fhMCPtXEUeLeftCharged(0),
161 fhMCPtHbpXECharged(0), fhMCPtHbpXEUeCharged(0),
162 fhMCPtHbpXEUeLeftCharged(0),
164 fhMCPtZTCharged(0), fhMCPtZTUeCharged(0),
165 fhMCPtZTUeLeftCharged(0),
166 fhMCPtHbpZTCharged(0), fhMCPtHbpZTUeCharged(0),
167 fhMCPtHbpZTUeLeftCharged(0),
168 fhMCPtTrigPout(0), fhMCPtAssocDeltaPhi(0),
170 fhNEventsTrigger(0), fhNtracksMB(0), fhNclustersMB(0),
171 fhMixDeltaPhiCharged(0), fhMixDeltaPhiDeltaEtaCharged(0),
172 fhMixXECharged(0), fhMixXEUeCharged(0), fhMixHbpXECharged(0),
173 fhMixDeltaPhiChargedAssocPtBin(),
174 fhMixDeltaPhiChargedAssocPtBinDEta08(),
175 fhMixDeltaPhiChargedAssocPtBinDEta0(),
176 fhMixDeltaPhiDeltaEtaChargedAssocPtBin(),
177 fhEventBin(0), fhEventMixBin(0), fhEventMBBin(0)
181 //Initialize parameters
184 for(Int_t i = 0; i < 7; i++)
186 fhPtTriggerMC[i] = 0;
187 fhXEChargedMC[i] = 0;
188 fhDeltaPhiChargedMC[i] = 0;
191 for(Int_t i = 0; i < 7; i++)
193 fhPtTriggerPileUp [i] = 0 ;
194 fhDeltaPhiChargedPileUp [i] = 0 ; fhDeltaEtaChargedPileUp [i] = 0 ;
195 fhXEChargedPileUp [i] = 0 ; fhXEUeChargedPileUp [i] = 0 ;
196 fhZTChargedPileUp [i] = 0 ; fhZTUeChargedPileUp [i] = 0 ;
197 fhPtTrigChargedPileUp [i] = 0 ;
198 fhDeltaPhiChargedPtA3GeVPileUp[i] = 0 ; fhDeltaEtaChargedPtA3GeVPileUp[i] = 0 ;
203 //_________________________________________________________________
204 AliAnaParticleHadronCorrelation::~AliAnaParticleHadronCorrelation()
206 // Remove event containers
210 if(fListMixTrackEvents)
212 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
214 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
216 for(Int_t irp=0; irp<GetNRPBin(); irp++)
218 Int_t bin = GetEventMixBin(ic, iz, irp);
219 fListMixTrackEvents[bin]->Delete() ;
220 delete fListMixTrackEvents[bin] ;
226 delete[] fListMixTrackEvents;
228 if(fListMixCaloEvents)
230 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
232 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
234 for(Int_t irp=0; irp<GetNRPBin(); irp++)
236 Int_t bin = GetEventMixBin(ic, iz, irp);
237 fListMixCaloEvents[bin]->Delete() ;
238 delete fListMixCaloEvents[bin] ;
244 delete[] fListMixCaloEvents;
249 //__________________________________________________________________________________________________________________________________________
250 void AliAnaParticleHadronCorrelation::FillChargedAngularCorrelationHistograms(Float_t ptAssoc, Float_t ptTrig, Int_t bin,
251 Float_t phiAssoc, Float_t phiTrig, Float_t deltaPhi,
252 Float_t etaAssoc, Float_t etaTrig,
253 Bool_t decay, Float_t hmpidSignal, Int_t outTOF,
254 Int_t cen, Int_t mcTag)
256 // Fill angular correlation related histograms
258 Float_t deltaEta = etaTrig-etaAssoc;
259 Float_t deltaPhiOrg = phiTrig-phiAssoc;
261 fhEtaCharged ->Fill(ptAssoc,etaAssoc);
262 fhPhiCharged ->Fill(ptAssoc,phiAssoc);
263 fhDeltaEtaCharged ->Fill(ptTrig ,deltaEta);
264 fhDeltaPhiCharged ->Fill(ptTrig ,deltaPhi);
265 fhDeltaPhiChargedPt->Fill(ptAssoc, deltaPhi);
266 fhDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
270 fhDeltaEtaChargedPtA3GeV ->Fill(ptTrig ,deltaEta);
271 fhDeltaPhiChargedPtA3GeV ->Fill(ptTrig ,deltaPhi);
272 fhDeltaPhiDeltaEtaChargedPtA3GeV->Fill(deltaPhi, deltaEta);
277 if(fFillPileUpHistograms)
281 fhDeltaPhiChargedOtherBC->Fill(ptTrig ,deltaPhi) ;
282 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVOtherBC->Fill(ptTrig ,deltaPhi) ;
286 fhDeltaPhiChargedBC0->Fill(ptTrig ,deltaPhi) ;
287 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVBC0->Fill(ptTrig ,deltaPhi) ;
290 Int_t vtxBC = GetReader()->GetVertexBC();
291 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
293 fhDeltaPhiChargedVtxBC0->Fill(ptTrig ,deltaPhi) ;
294 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVVtxBC0->Fill(ptTrig ,deltaPhi) ;
297 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
298 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
299 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
300 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
301 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
302 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
303 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
307 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
308 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
309 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
310 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
311 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
312 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
313 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
319 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
320 fhDeltaPhiChargedMC[mcIndex]->Fill(ptTrig , deltaPhi);
323 if(fDecayTrigger && decay) fhDeltaPhiDecayCharged ->Fill(ptTrig , deltaPhi);
325 Double_t dphiBrad = -100;
328 dphiBrad = atan2(sin(deltaPhiOrg), cos(deltaPhiOrg))/TMath::Pi();//-1 to 1
329 if(TMath::Abs(dphiBrad)>0.325 && TMath::Abs(dphiBrad)<0.475) //Hardcoded values, BAD, FIXME
331 fhAssocPtBkg->Fill(ptTrig, ptAssoc);
334 if(dphiBrad<-1./3) dphiBrad += 2;
335 fhDeltaPhiBrad->Fill(ptTrig, dphiBrad);
338 // Fill histograms in bins of associated particle pT
341 fhDeltaPhiDeltaEtaAssocPtBin [bin]->Fill(deltaPhi,deltaEta);
343 fhDeltaPhiAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
345 if(fFillEtaGapsHisto)
347 if(TMath::Abs(deltaEta)> 0.8)
348 fhDeltaPhiAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
350 if(TMath::Abs(deltaEta)< 0.01)
351 fhDeltaPhiAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
355 fhDeltaPhiBradAssocPtBin [bin]->Fill(ptTrig, dphiBrad);
357 if(fDecayTrigger && decay)
358 fhDeltaPhiDecayChargedAssocPtBin[bin]->Fill(ptTrig, deltaPhi);
360 if(fHMPIDCorrelation)
362 if( hmpidSignal > 0 )
364 //printf("Track pt %f with HMPID signal %f \n",pt,hmpidSignal);
365 fhDeltaPhiAssocPtBinHMPID[bin]->Fill(ptTrig, deltaPhi);
368 if(phiAssoc > 5*TMath::DegToRad() && phiAssoc < 20*TMath::DegToRad())
370 //printf("Track pt %f in HMPID acceptance phi %f \n ",pt,phi*TMath::RadToDeg() );
371 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->Fill(ptTrig, deltaPhi);
376 //fill different multiplicity/centrality histogram
377 if(fFillHighMultHistograms)
379 fhDeltaPhiChargedMult[cen]->Fill(ptTrig,deltaPhi);
380 fhDeltaEtaChargedMult[cen]->Fill(ptTrig,deltaEta);
384 //___________________________________________________________________________________________________________________________________
385 Bool_t AliAnaParticleHadronCorrelation::FillChargedMCCorrelationHistograms(Float_t mcAssocPt, Float_t mcAssocPhi, Float_t mcAssocEta,
386 Float_t mcTrigPt, Float_t mcTrigPhi, Float_t mcTrigEta)
388 // Fill MC histograms independently of AOD or ESD
392 // In case we requested the trigger to be a leading particle,
393 // check if this is true at the MC level.
394 // Not sure if it is correct to skip or not skip this.
396 if( fMakeAbsoluteLeading && mcAssocPt > mcTrigPt ) lead = kFALSE; // skip event
398 // Skip this event if near side associated particle pt larger than trigger
399 if( fMakeNearSideLeading && mcAssocPt > mcTrigPt &&
400 TMath::Abs(mcAssocPhi-mcTrigPhi)<TMath::PiOver2() ) lead = kFALSE; // skip event
403 // Select only hadrons in pt range
404 if ( mcAssocPt < fMinAssocPt || mcAssocPt > fMaxAssocPt ) return lead ; // exclude but continue
405 if ( mcAssocPt < GetReader()->GetCTSPtMin()) return lead ;
407 if( mcAssocPhi < 0 ) mcAssocPhi+=TMath::TwoPi();
410 // Remove trigger itself for correlation when use charged triggers
411 if(TMath::Abs(mcAssocPt -mcTrigPt ) < 1e-6 &&
412 TMath::Abs(mcAssocPhi-mcTrigPhi) < 1e-6 &&
413 TMath::Abs(mcAssocEta-mcTrigEta) < 1e-6) return lead ; // exclude but continue
415 Float_t mcdeltaPhi= mcTrigPhi-mcAssocPhi;
416 if(mcdeltaPhi <= -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
417 if(mcdeltaPhi > 3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
419 Float_t mcxE =-mcAssocPt/mcTrigPt*TMath::Cos(mcdeltaPhi);// -(mcAssocPx*pxprim+mcAssocPy*pyprim)/(mcTrigPt*mcTrigPt);
420 Float_t mchbpXE =-100 ;
421 if(mcxE > 0 ) mchbpXE = TMath::Log(1./mcxE);
423 Float_t mczT = mcAssocPt/mcTrigPt ;
424 Float_t mchbpZT =-100 ;
425 if(mczT > 0 ) mchbpZT = TMath::Log(1./mczT);
427 Double_t mcpout = mcAssocPt*TMath::Sin(mcdeltaPhi) ;
431 AliInfo(Form("Charged hadron: track Pt %f, track Phi %f, phi trigger %f. Cuts: delta phi %2.2f < %2.2f < %2.2f \n",
432 mcAssocPt,mcAssocPhi, mcTrigPhi,fDeltaPhiMinCut, mcdeltaPhi, fDeltaPhiMaxCut));
436 fhMCEtaCharged ->Fill(mcAssocPt, mcAssocEta);
437 fhMCPhiCharged ->Fill(mcAssocPt, mcAssocPhi);
438 fhMCDeltaEtaCharged->Fill(mcTrigPt , mcTrigEta-mcAssocEta);
439 fhMCDeltaPhiCharged->Fill(mcTrigPt , mcdeltaPhi);
440 fhMCPtAssocDeltaPhi->Fill(mcAssocPt, mcdeltaPhi);
442 fhMCDeltaPhiDeltaEtaCharged->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
444 //delta phi cut for correlation
445 if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
447 fhMCDeltaPhiChargedPt->Fill(mcAssocPt,mcdeltaPhi);
448 fhMCPtXECharged ->Fill(mcTrigPt, mcxE);
449 fhMCPtHbpXECharged ->Fill(mcTrigPt, mchbpXE);
450 fhMCPtZTCharged ->Fill(mcTrigPt, mczT);
451 fhMCPtHbpZTCharged ->Fill(mcTrigPt, mchbpZT);
452 fhMCPtTrigPout ->Fill(mcTrigPt, mcpout) ;
458 if ( (mcdeltaPhi > fUeDeltaPhiMinCut) && (mcdeltaPhi < fUeDeltaPhiMaxCut) )
460 //Double_t randomphi = gRandom->Uniform(TMath::Pi()/2,3*TMath::Pi()/2);
461 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
462 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
463 Double_t mcUezT = mcAssocPt/mcTrigPt;
465 if(mcUexE < 0.) mcUexE = -mcUexE;
467 fhMCPtXEUeCharged->Fill(mcTrigPt,mcUexE);
468 if(mcUexE > 0) fhMCPtHbpXEUeCharged->Fill(mcTrigPt,TMath::Log(1/mcUexE));
470 fhMCPtZTUeCharged->Fill(mcTrigPt,mcUezT);
471 if(mcUezT > 0) fhMCPtHbpZTUeCharged->Fill(mcTrigPt,TMath::Log(1/mcUezT));
473 fhMCUePart->Fill(mcTrigPt);
479 if((mcdeltaPhi<-fUeDeltaPhiMinCut) || (mcdeltaPhi >2*fUeDeltaPhiMaxCut))
481 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
482 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
483 Double_t mcUezT = mcAssocPt/mcTrigPt;
485 if(mcUexE < 0.) mcUexE = -mcUexE;
487 fhMCPtXEUeLeftCharged->Fill(mcTrigPt,mcUexE);
488 if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged->Fill(mcTrigPt,TMath::Log(1/mcUexE));
490 fhMCPtZTUeLeftCharged->Fill(mcTrigPt,mcUezT);
491 if(mcUexE > 0) fhMCPtHbpZTUeLeftCharged->Fill(mcTrigPt,TMath::Log(1/mcUezT));
498 //___________________________________________________________________________________________________________________
499 void AliAnaParticleHadronCorrelation::FillChargedMomentumImbalanceHistograms(Float_t ptTrig, Float_t ptAssoc,
501 Int_t cen, Int_t charge,
502 Int_t bin, Bool_t decay,
503 Int_t outTOF, Int_t mcTag)
506 // Fill mostly momentum imbalance related histograms
508 Float_t zT = ptAssoc/ptTrig ;
509 Float_t hbpZT = -100;
510 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
513 Float_t xE =-ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
514 Float_t hbpXE = -100;
516 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
519 Float_t pout = ptAssoc*TMath::Sin(deltaPhi) ;
521 fhXECharged ->Fill(ptTrig , xE);
522 fhPtHbpXECharged ->Fill(ptTrig , hbpXE);
523 fhZTCharged ->Fill(ptTrig , zT);
524 fhPtHbpZTCharged ->Fill(ptTrig , hbpZT);
525 fhPtTrigPout ->Fill(ptTrig , pout) ;
526 fhPtTrigCharged ->Fill(ptTrig , ptAssoc) ;
527 if((deltaPhi > 5*TMath::Pi()/6.) && (deltaPhi < 7*TMath::Pi()/6.))
529 fhXECharged_Cone2 ->Fill(ptTrig , xE);
530 fhPtHbpXECharged_Cone2 ->Fill(ptTrig , hbpXE);
534 if(fFillPileUpHistograms)
538 fhXEChargedOtherBC ->Fill(ptTrig,xE);
539 fhZTChargedOtherBC ->Fill(ptTrig,zT);
540 fhPtTrigChargedOtherBC->Fill(ptTrig,ptAssoc);
544 fhXEChargedBC0 ->Fill(ptTrig,xE);
545 fhZTChargedBC0 ->Fill(ptTrig,zT);
546 fhPtTrigChargedBC0->Fill(ptTrig,ptAssoc);
549 Int_t vtxBC = GetReader()->GetVertexBC();
550 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
552 fhXEChargedVtxBC0 ->Fill(ptTrig,xE);
553 fhZTChargedVtxBC0 ->Fill(ptTrig,zT);
554 fhPtTrigChargedVtxBC0->Fill(ptTrig,ptAssoc);
557 if(GetReader()->IsPileUpFromSPD()) { fhXEChargedPileUp[0]->Fill(ptTrig,xE); fhZTChargedPileUp[0]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[0]->Fill(ptTrig,ptAssoc); }
558 if(GetReader()->IsPileUpFromEMCal()) { fhXEChargedPileUp[1]->Fill(ptTrig,xE); fhZTChargedPileUp[1]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[1]->Fill(ptTrig,ptAssoc); }
559 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEChargedPileUp[2]->Fill(ptTrig,xE); fhZTChargedPileUp[2]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[2]->Fill(ptTrig,ptAssoc); }
560 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEChargedPileUp[3]->Fill(ptTrig,xE); fhZTChargedPileUp[3]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[3]->Fill(ptTrig,ptAssoc); }
561 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEChargedPileUp[4]->Fill(ptTrig,xE); fhZTChargedPileUp[4]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[4]->Fill(ptTrig,ptAssoc); }
562 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEChargedPileUp[5]->Fill(ptTrig,xE); fhZTChargedPileUp[5]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[5]->Fill(ptTrig,ptAssoc); }
563 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEChargedPileUp[6]->Fill(ptTrig,xE); fhZTChargedPileUp[6]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[6]->Fill(ptTrig,ptAssoc); }
568 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
569 fhXEChargedMC[mcIndex]->Fill(ptTrig , xE);
572 if(fDecayTrigger && decay)
574 fhXEDecayCharged->Fill(ptTrig,xE);
575 fhZTDecayCharged->Fill(ptTrig,zT);
576 } // photon decay pi0/eta trigger
578 if(bin >= 0 && fFillMomImbalancePtAssocBinsHisto)//away side
580 fhXEAssocPtBin[bin]->Fill(ptTrig, xE) ;
581 fhZTAssocPtBin[bin]->Fill(ptTrig, zT) ;
586 Int_t vz = GetEventVzBin();
587 fhXEVZ[vz]->Fill(ptTrig, xE) ;
588 fhZTVZ[vz]->Fill(ptTrig, zT) ;
593 fhXEPosCharged->Fill(ptTrig,xE) ;
594 fhZTPosCharged->Fill(ptTrig,zT) ;
598 fhXENegCharged->Fill(ptTrig,xE) ;
599 fhZTNegCharged->Fill(ptTrig,zT) ;
602 //fill different multiplicity/centrality histogram
603 if(fFillHighMultHistograms)
605 fhXEMult[cen]->Fill(ptTrig,xE);
606 fhZTMult[cen]->Fill(ptTrig,zT);
607 } //multiplicity/centrality events selection
610 //_______________________________________________________________________________________________________________________
611 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventHistograms(Float_t ptTrig, Float_t ptAssoc,
612 Float_t deltaPhi, Int_t cen, Int_t outTOF)
614 // Fill underlying event histograms
616 fhUePart->Fill(ptTrig);
618 fhDeltaPhiUeChargedPt->Fill(ptAssoc,deltaPhi);
620 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
621 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
622 Double_t uezT = ptAssoc/ptTrig;
624 if(uexE < 0.) uexE = -uexE;
626 fhXEUeCharged->Fill(ptTrig,uexE);
627 if(uexE > 0) fhPtHbpXEUeCharged->Fill(ptTrig,TMath::Log(1/uexE));
629 fhZTUeCharged->Fill(ptTrig,uezT);
630 if(uezT > 0) fhPtHbpZTUeCharged->Fill(ptTrig,TMath::Log(1/uezT));
634 if(fFillPileUpHistograms)
638 fhXEUeChargedOtherBC->Fill(ptTrig,uexE);
639 fhZTUeChargedOtherBC->Fill(ptTrig,uezT);
643 fhXEUeChargedBC0->Fill(ptTrig,uexE);
644 fhZTUeChargedBC0->Fill(ptTrig,uezT);
647 Int_t vtxBC = GetReader()->GetVertexBC();
648 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
650 fhXEUeChargedVtxBC0->Fill(ptTrig,uexE);
651 fhZTUeChargedVtxBC0->Fill(ptTrig,uezT);
654 if(GetReader()->IsPileUpFromSPD()) { fhXEUeChargedPileUp[0]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[0]->Fill(ptTrig,uezT);}
655 if(GetReader()->IsPileUpFromEMCal()) { fhXEUeChargedPileUp[1]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[1]->Fill(ptTrig,uezT);}
656 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEUeChargedPileUp[2]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[2]->Fill(ptTrig,uezT);}
657 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEUeChargedPileUp[3]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[3]->Fill(ptTrig,uezT);}
658 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEUeChargedPileUp[4]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[4]->Fill(ptTrig,uezT);}
659 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEUeChargedPileUp[5]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[5]->Fill(ptTrig,uezT);}
660 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEUeChargedPileUp[6]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[6]->Fill(ptTrig,uezT);}
663 //fill different multiplicity/centrality histogram
664 if(fFillHighMultHistograms)
666 fhXEUeMult[cen]->Fill(ptTrig,uexE);
667 fhZTUeMult[cen]->Fill(ptTrig,uezT);
671 //_____________________________________________________________________________________________________
672 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventSidesHistograms(Float_t ptTrig,
676 // Fill underlying event histograms to the left and right of trigger
677 // Right cone is the default UE.
679 if((deltaPhi<-fUeDeltaPhiMinCut) || (deltaPhi >2*fUeDeltaPhiMaxCut))
681 fhDeltaPhiUeLeftCharged->Fill(ptAssoc,deltaPhi);
682 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
683 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
684 Double_t uezT = ptAssoc/ptTrig;
686 if(uexE < 0.) uexE = -uexE;
688 fhXEUeLeftCharged->Fill(ptTrig,uexE);
689 if(uexE > 0) fhPtHbpXEUeLeftCharged->Fill(ptTrig,TMath::Log(1/uexE));
691 fhZTUeLeftCharged->Fill(ptTrig,uezT);
692 if(uexE > 0) fhPtHbpZTUeLeftCharged->Fill(ptTrig,TMath::Log(1/uezT));
693 fhDeltaPhiUeLeftCharged->Fill(ptAssoc, deltaPhi);
696 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-TMath::Pi()/2))
698 fhDeltaPhiUeLeftDownCharged->Fill(ptAssoc,deltaPhi);
699 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
700 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
702 if(uexE < 0.) uexE = -uexE;
704 fhXEUeLeftDownCharged->Fill(ptTrig,uexE);
707 if((deltaPhi>2*fUeDeltaPhiMaxCut) && (deltaPhi <3*TMath::Pi()/2))
709 fhDeltaPhiUeLeftUpCharged->Fill(ptAssoc,deltaPhi);
710 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
711 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
713 if(uexE < 0.) uexE = -uexE;
715 fhXEUeLeftUpCharged->Fill(ptTrig,uexE);
718 if((deltaPhi > TMath::Pi()/2) && (deltaPhi < fUeDeltaPhiMaxCut))
720 fhDeltaPhiUeRightUpCharged->Fill(ptAssoc,deltaPhi);
721 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
722 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
724 if(uexE < 0.) uexE = -uexE;
726 fhXEUeRightUpCharged->Fill(ptTrig,uexE);
729 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < TMath::Pi()/2))
731 fhDeltaPhiUeRightDownCharged->Fill(ptAssoc,deltaPhi);
732 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
733 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
735 if(uexE < 0.) uexE = -uexE;
737 fhXEUeRightDownCharged->Fill(ptTrig,uexE);
741 //______________________________________________________________________________________________________________________________
742 void AliAnaParticleHadronCorrelation::FillDecayPhotonCorrelationHistograms(Float_t ptAssoc, Float_t phiAssoc,
743 TLorentzVector mom1, TLorentzVector mom2,
744 Bool_t bChargedOrNeutral)
746 // Do correlation with decay photons of triggered pi0 or eta
748 // Calculate the correlation parameters
749 Float_t ptDecay1 = mom1.Pt();
750 Float_t ptDecay2 = mom2.Pt();
752 Float_t zTDecay1 = -100, zTDecay2 = -100;
753 if(ptDecay1 > 0) zTDecay1 = ptAssoc/ptDecay1 ;
754 if(ptDecay2 > 0) zTDecay2 = ptAssoc/ptDecay2 ;
756 Float_t deltaPhiDecay1 = mom1.Phi()-phiAssoc;
757 if(deltaPhiDecay1< -TMath::PiOver2()) deltaPhiDecay1+=TMath::TwoPi();
758 if(deltaPhiDecay1>3*TMath::PiOver2()) deltaPhiDecay1-=TMath::TwoPi();
760 Float_t deltaPhiDecay2 = mom2.Phi()-phiAssoc;
761 if(deltaPhiDecay2< -TMath::PiOver2()) deltaPhiDecay2+=TMath::TwoPi();
762 if(deltaPhiDecay2>3*TMath::PiOver2()) deltaPhiDecay2-=TMath::TwoPi();
764 Float_t xEDecay1 =-zTDecay1*TMath::Cos(deltaPhiDecay1); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
765 Float_t xEDecay2 =-zTDecay2*TMath::Cos(deltaPhiDecay2); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
767 if(bChargedOrNeutral) // correlate with charges
769 fhDeltaPhiDecayCharged->Fill(ptDecay1, deltaPhiDecay1);
770 fhDeltaPhiDecayCharged->Fill(ptDecay2, deltaPhiDecay2);
772 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms( Charged corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
774 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
776 fhZTDecayCharged->Fill(ptDecay1,zTDecay1);
777 fhXEDecayCharged->Fill(ptDecay1,xEDecay1);
779 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
781 fhZTDecayCharged->Fill(ptDecay2,zTDecay2);
782 fhXEDecayCharged->Fill(ptDecay2,xEDecay2);
785 else // correlate with neutrals
787 fhDeltaPhiDecayNeutral->Fill(ptDecay1, deltaPhiDecay1);
788 fhDeltaPhiDecayNeutral->Fill(ptDecay2, deltaPhiDecay2);
790 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms(Neutral corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
792 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
794 fhZTDecayNeutral->Fill(ptDecay1,zTDecay1);
795 fhXEDecayNeutral->Fill(ptDecay1,xEDecay1);
797 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
799 fhZTDecayNeutral->Fill(ptDecay2,zTDecay2);
800 fhXEDecayNeutral->Fill(ptDecay2,xEDecay2);
805 //_____________________________________________________________________________________________________________________________
806 void AliAnaParticleHadronCorrelation::FillNeutralUnderlyingEventSidesHistograms(Float_t ptTrig, Float_t ptAssoc,
807 Float_t zT, Float_t hbpZT,
810 // Fill underlying event histograms to the left of trigger
811 // Right is the default case
813 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
815 Float_t xE =-ptAssoc/ptTrig*TMath::Cos(randomphi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
816 Float_t hbpXE = -100;
817 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
819 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-fUeDeltaPhiMaxCut))
821 fhDeltaPhiUeLeftNeutral->Fill(ptAssoc, deltaPhi);
822 fhXEUeLeftNeutral ->Fill(ptTrig , xE);
823 fhPtHbpXEUeLeftNeutral ->Fill(ptTrig , hbpXE);
824 fhZTUeLeftNeutral ->Fill(ptTrig , zT);
825 fhPtHbpZTUeLeftNeutral ->Fill(ptTrig , hbpZT);
829 //______________________________________________________
830 void AliAnaParticleHadronCorrelation::FillEventMixPool()
832 // Fill the pool with tracks or clusters if requested
834 if ( !DoOwnMix() ) return;
836 FillChargedEventMixPool();
838 // Do the cluster pool filling only if requested
839 // or in case of isolation cut using clusters in the cone.
840 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
842 if( !fFillNeutralEventMixPool && !isoCase) return;
844 FillNeutralEventMixPool();
847 //_____________________________________________________________
848 void AliAnaParticleHadronCorrelation::FillChargedEventMixPool()
850 // Mixed event pool filling for tracks
852 if(fUseMixStoredInReader && GetReader()->GetLastTracksMixedEvent() == GetEventNumber())
854 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
855 return ; // pool filled previously for another trigger
858 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
859 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
861 if(!inputHandler) return ;
863 // Do mixing only with MB event (or the chosen mask), if not skip
864 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
866 Int_t eventBin = GetEventMixBin();
868 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
869 if(eventBin < 0) return;
871 fhEventMBBin->Fill(eventBin);
873 TObjArray * mixEventTracks = new TObjArray;
875 if(fUseMixStoredInReader)
877 fListMixTrackEvents[eventBin] = GetReader()->GetListWithMixedEventsForTracks(eventBin);
880 if(!fListMixTrackEvents[eventBin]) fListMixTrackEvents[eventBin] = new TList();
882 //printf("%s ***** Pool Event bin : %d - nTracks %d\n",GetInputAODName().Data(),eventBin, GetCTSTracks()->GetEntriesFast());
884 TList * pool = fListMixTrackEvents[eventBin];
887 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
889 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
891 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
892 p3.SetXYZ(mom[0],mom[1],mom[2]);
893 Float_t pt = p3.Pt();
895 //Select only hadrons in pt range
896 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
898 AliAODPWG4Particle * mixedTrack = new AliAODPWG4Particle(mom[0],mom[1],mom[2],0);
899 mixedTrack->SetDetector("CTS");
900 mixedTrack->SetChargedBit(track->Charge()>0);
901 mixEventTracks->Add(mixedTrack);
904 fhNtracksMB->Fill(mixEventTracks->GetEntriesFast(),eventBin);
906 //Set the event number where the last event was added, to avoid double pool filling
907 GetReader()->SetLastTracksMixedEvent(GetEventNumber());
909 //printf("Add event to pool with %d tracks \n ",mixEventTracks->GetEntries());
910 pool->AddFirst(mixEventTracks);
913 //printf("Pool size %d, max %d\n",pool->GetSize(), GetNMaxEvMix());
915 if(pool->GetSize() > GetNMaxEvMix())
917 TClonesArray * tmp = static_cast<TClonesArray*>(pool->Last()) ;
923 //_____________________________________________________________
924 void AliAnaParticleHadronCorrelation::FillNeutralEventMixPool()
926 // Mixed event pool filling for neutral clusters
927 // Right now only for EMCAL and in isolation case
929 //printf("FillNeutralEventMixPool for %s\n",GetInputAODName().Data());
931 if(fUseMixStoredInReader && GetReader()->GetLastCaloMixedEvent() == GetEventNumber())
933 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
934 return ; // pool filled previously for another trigger
937 TObjArray * pl = GetEMCALClusters();
938 //if (GetAODObjArrayName.Contains("PHOS") )pl = GetPHOSClusters();
939 //else pl = GetEMCALClusters();
941 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
942 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
944 if(!inputHandler) return ;
946 // Do mixing only with MB event (or the chosen mask), if not skip
947 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
949 Int_t eventBin = GetEventMixBin();
951 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
952 if(eventBin < 0) return;
954 TObjArray * mixEventCalo = new TObjArray;
956 if(fUseMixStoredInReader)
958 fListMixCaloEvents[eventBin] = GetReader()->GetListWithMixedEventsForCalo(eventBin);
961 if(!fListMixCaloEvents[eventBin]) fListMixCaloEvents[eventBin] = new TList();
963 TList * poolCalo = fListMixCaloEvents[eventBin];
967 for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ )
969 AliVCluster * calo = (AliVCluster *) (pl->At(ipr)) ;
971 // remove matched clusters
972 if( IsTrackMatched( calo, GetReader()->GetInputEvent() ) ) continue ;
974 //Cluster momentum calculation
975 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
977 calo->GetMomentum(mom,GetVertex(0)) ;
978 }//Assume that come from vertex in straight line
981 Double_t vertex[]={0,0,0};
982 calo->GetMomentum(mom,vertex) ;
985 Float_t pt = mom.Pt();
986 //Select only clusters in pt range
987 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
989 AliAODPWG4Particle * mixedCalo = new AliAODPWG4Particle(mom);
990 mixedCalo->SetDetector("EMCAL");
991 mixEventCalo->Add(mixedCalo);
994 fhNclustersMB->Fill(mixEventCalo->GetEntriesFast(),eventBin);
996 //Set the event number where the last event was added, to avoid double pool filling
997 GetReader()->SetLastCaloMixedEvent(GetEventNumber());
999 //printf("Add event to pool with %d clusters \n ",mixEventCalo->GetEntries());
1000 poolCalo->AddFirst(mixEventCalo);
1003 //printf("Pool size %d, max %d\n",poolCalo->GetSize(), GetNMaxEvMix());
1005 if(poolCalo->GetSize() > GetNMaxEvMix())
1006 {//Remove last event
1007 TClonesArray * tmp = static_cast<TClonesArray*>(poolCalo->Last()) ;
1008 poolCalo->RemoveLast() ;
1013 //_________________________________________________________________________________________________________________
1014 Bool_t AliAnaParticleHadronCorrelation::FindLeadingOppositeHadronInWindow(AliAODPWG4ParticleCorrelation * particle)
1016 // Select events where the leading charged particle in the opposite hemisphere
1017 // to the trigger particle is in a window centered at 180 from the trigger
1019 Float_t phiTrig = particle->Phi();
1020 Float_t etaTrig = particle->Eta();
1021 Float_t ptTrig = particle->Pt();
1022 Float_t ptLeadHad = -100 ;
1023 Float_t phiLeadHad = -100 ;
1024 Float_t etaLeadHad = -100 ;
1027 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
1029 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
1031 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
1032 p3.SetXYZ(mom[0],mom[1],mom[2]);
1034 Float_t pt = p3.Pt();
1035 Float_t phi = p3.Phi() ;
1036 if(phi < 0 ) phi+= TMath::TwoPi();
1038 if(pt > ptLeadHad && TMath::Abs(phi-phiTrig) > TMath::PiOver2()) // in opposite hemisphere
1042 etaLeadHad = p3.Eta();
1046 fhPtLeadingOppositeHadron ->Fill(ptTrig, ptLeadHad);
1047 fhPtDiffPhiLeadingOppositeHadron->Fill(ptTrig,phiLeadHad-phiTrig);
1048 fhPtDiffEtaLeadingOppositeHadron->Fill(ptTrig,etaLeadHad-etaTrig);
1052 printf("AliAnaParticleHadronCorrelation::FindLeadingOppositeHadronInWindow() pT %2.2f, phi %2.2f, eta %2.2f\n",
1053 ptLeadHad,phiLeadHad*TMath::RadToDeg(),etaLeadHad);
1055 printf("\t pT trig %2.2f, Dphi (trigger-hadron) %2.2f, Deta (trigger-hadron) %2.2f\n",
1056 ptTrig, (phiLeadHad-phiTrig)*TMath::RadToDeg(), etaLeadHad-etaTrig);
1057 printf("\t cuts pT: min %2.2f, max %2.2f; DPhi: min %2.2f, max %2.2f\n",fMinLeadHadPt,fMaxLeadHadPt,fMinLeadHadPhi*TMath::RadToDeg(),fMaxLeadHadPhi*TMath::RadToDeg());
1060 if( ptLeadHad < fMinLeadHadPt ||
1061 ptLeadHad > fMaxLeadHadPt ) return kFALSE;
1063 //printf("Accept leading hadron pT \n");
1065 if( TMath::Abs(phiLeadHad-phiTrig) < fMinLeadHadPhi ||
1066 TMath::Abs(phiLeadHad-phiTrig) > fMaxLeadHadPhi ) return kFALSE;
1068 //printf("Accept leading hadron phi \n");
1073 //____________________________________________________________
1074 TObjString* AliAnaParticleHadronCorrelation::GetAnalysisCuts()
1076 //Save parameters used for analysis
1077 TString parList ; //this will be list of parameters used for this analysis.
1078 const Int_t buffersize = 560;
1079 char onePar[buffersize] ;
1081 snprintf(onePar,buffersize,"--- AliAnaPaticleHadronCorrelation ---:") ;
1083 snprintf(onePar,buffersize," %3.2f < Pt associated < %3.2f; ", fMinAssocPt, fMaxAssocPt) ;
1085 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-Hadron < %3.2f; ", fDeltaPhiMinCut, fDeltaPhiMaxCut) ;
1087 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-UeHadron < %3.2f; ", fUeDeltaPhiMinCut, fUeDeltaPhiMaxCut) ;
1089 snprintf(onePar,buffersize,"Isolated Trigger? %d;", fSelectIsolated) ;
1091 snprintf(onePar,buffersize,"Several UE? %d;", fMakeSeveralUE) ;
1093 snprintf(onePar,buffersize,"Name of AOD Pi0 Branch %s;", fPi0AODBranchName.Data());
1095 snprintf(onePar,buffersize,"Do Decay-hadron correlation ? pi0 %d, decay %d;", fPi0Trigger, fDecayTrigger) ;
1097 snprintf(onePar,buffersize,"Select absolute leading for cluster triggers ? %d or Near Side Leading %d;",
1098 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
1100 snprintf(onePar,buffersize,"Associated particle pt bins %d: ", fNAssocPtBins) ;
1102 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
1103 snprintf(onePar,buffersize,"bin %d = [%2.1f,%2.1f];", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
1107 //Get parameters set in base class.
1108 parList += GetBaseParametersList() ;
1110 //Get parameters set in FiducialCut class (not available yet)
1111 //parlist += GetFidCut()->GetFidCutParametersList()
1113 return new TObjString(parList) ;
1117 //________________________________________________________________
1118 TList * AliAnaParticleHadronCorrelation::GetCreateOutputObjects()
1120 // Create histograms to be saved in output file and
1121 // store them in fOutputContainer
1123 TList * outputContainer = new TList() ;
1124 outputContainer->SetName("CorrelationHistos") ;
1126 Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Int_t netabins = GetHistogramRanges()->GetHistoEtaBins();
1127 Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax();
1128 Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin();
1130 Int_t ndeltaphibins = GetHistogramRanges()->GetHistoDeltaPhiBins(); Int_t ndeltaetabins = GetHistogramRanges()->GetHistoDeltaEtaBins();
1131 Float_t deltaphimax = GetHistogramRanges()->GetHistoDeltaPhiMax(); Float_t deltaetamax = GetHistogramRanges()->GetHistoDeltaEtaMax();
1132 Float_t deltaphimin = GetHistogramRanges()->GetHistoDeltaPhiMin(); Float_t deltaetamin = GetHistogramRanges()->GetHistoDeltaEtaMin();
1134 Int_t ntrbins = GetHistogramRanges()->GetHistoTrackMultiplicityBins(); Int_t nclbins = GetHistogramRanges()->GetHistoNClustersBins();
1135 Int_t trmax = GetHistogramRanges()->GetHistoTrackMultiplicityMax(); Int_t clmax = GetHistogramRanges()->GetHistoNClustersMax();
1136 Int_t trmin = GetHistogramRanges()->GetHistoTrackMultiplicityMin(); Int_t clmin = GetHistogramRanges()->GetHistoNClustersMin();
1138 Int_t nxeztbins = GetHistogramRanges()->GetHistoRatioBins(); Int_t nhbpbins = GetHistogramRanges()->GetHistoHBPBins();
1139 Float_t xeztmax = GetHistogramRanges()->GetHistoRatioMax(); Float_t hbpmax = GetHistogramRanges()->GetHistoHBPMax();
1140 Float_t xeztmin = GetHistogramRanges()->GetHistoRatioMin(); Float_t hbpmin = GetHistogramRanges()->GetHistoHBPMin();
1142 Int_t nMixBins = GetNCentrBin()*GetNZvertBin()*GetNRPBin();
1144 TString nameMC[] = {"Photon","Pi0","Pi0Decay","EtaDecay","OtherDecay","Electron","Hadron"};
1145 TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
1147 // For vz dependent histograms, if option ON
1149 if(fCorrelVzBin) nz = GetNZvertBin();
1153 // Fill histograms for neutral clusters in mixing?
1154 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
1155 Bool_t neutralMix = fFillNeutralEventMixPool || isoCase ;
1157 fhPtTriggerInput = new TH1F("hPtTriggerInput","Input trigger #it{p}_{T}", nptbins,ptmin,ptmax);
1158 fhPtTriggerInput->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1159 outputContainer->Add(fhPtTriggerInput);
1161 if( fM02MaxCut > 0 && fM02MinCut > 0 )
1163 fhPtTriggerSSCut = new TH1F("hPtTriggerSSCut","Trigger #it{p}_{T} after #lambda^{2}_{0} cut", nptbins,ptmin,ptmax);
1164 fhPtTriggerSSCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1165 outputContainer->Add(fhPtTriggerSSCut);
1168 if( OnlyIsolated() )
1170 fhPtTriggerIsoCut = new TH1F("hPtTriggerIsoCut","Trigger #it{p}_{T} after isolation (and #lambda^{2}_{0}) cut", nptbins,ptmin,ptmax);
1171 fhPtTriggerIsoCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1172 outputContainer->Add(fhPtTriggerIsoCut);
1175 fhPtTriggerFidCut = new TH1F("hPtTriggerFidCut","Trigger #it{p}_{T} after fiducial (isolation and #lambda^{2}_{0}) cut", nptbins,ptmin,ptmax);
1176 fhPtTriggerFidCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1177 outputContainer->Add(fhPtTriggerFidCut);
1179 fhPtTrigger = new TH1F("hPtTrigger","#it{p}_{T} distribution of trigger particles", nptbins,ptmin,ptmax);
1180 fhPtTrigger->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1181 outputContainer->Add(fhPtTrigger);
1185 for(Int_t i=0; i < 7; i++)
1187 fhPtTriggerMC[i] = new TH1F(Form("hPtTrigger_MC%s",nameMC[i].Data()),
1188 Form("#it{p}_{T} distribution of trigger particles, trigger origin is %s",nameMC[i].Data()),
1189 nptbins,ptmin,ptmax);
1190 fhPtTriggerMC[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1191 outputContainer->Add(fhPtTriggerMC[i]);
1197 fhPtTriggerVzBin = new TH2F("hPtTriggerVzBin","#it{p}_{T} distribution of trigger particles vs vz bin", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
1198 fhPtTriggerVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1199 fhPtTriggerVzBin->SetYTitle("#it{v}_{#it{z}} bin");
1200 outputContainer->Add(fhPtTriggerVzBin);
1203 fhPtTriggerBin = new TH2F ("hPtTriggerBin","#it{p}_{T} distribution of trigger particles", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
1204 fhPtTriggerBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1205 fhPtTriggerBin->SetYTitle("Bin");
1206 outputContainer->Add(fhPtTriggerBin);
1208 fhPhiTrigger = new TH2F ("hPhiTrigger","#phi distribution of trigger Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
1209 fhPhiTrigger->SetYTitle("#phi (rad)");
1210 outputContainer->Add(fhPhiTrigger);
1212 fhEtaTrigger = new TH2F ("hEtaTrigger","#eta distribution of trigger",nptbins,ptmin,ptmax, netabins,etamin,etamax);
1213 fhEtaTrigger->SetYTitle("#eta ");
1214 outputContainer->Add(fhEtaTrigger);
1216 if(fFillHighMultHistograms)
1218 fhPtTriggerCentrality = new TH2F("hPtTriggerCentrality","Trigger particle #it{p}_{T} vs centrality",nptbins,ptmin,ptmax,100,0.,100) ;
1219 fhPtTriggerCentrality->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1220 fhPtTriggerCentrality->SetYTitle("Centrality (%)");
1221 outputContainer->Add(fhPtTriggerCentrality) ;
1223 fhPtTriggerEventPlane = new TH2F("hPtTriggerEventPlane","Trigger particle #it{p}_{T} vs event plane angle",nptbins,ptmin,ptmax, 100,0.,TMath::Pi()) ;
1224 fhPtTriggerEventPlane->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1225 fhPtTriggerEventPlane->SetXTitle("EP angle (rad)");
1226 outputContainer->Add(fhPtTriggerEventPlane) ;
1228 fhTriggerEventPlaneCentrality = new TH2F("hTriggerEventPlaneCentrality","Trigger particle centrality vs event plane angle",100,0.,100,100,0.,TMath::Pi()) ;
1229 fhTriggerEventPlaneCentrality->SetXTitle("Centrality (%)");
1230 fhTriggerEventPlaneCentrality->SetYTitle("EP angle (rad)");
1231 outputContainer->Add(fhTriggerEventPlaneCentrality) ;
1234 // Leading hadron in oposite side
1235 if(fSelectLeadingHadronAngle)
1237 fhPtLeadingOppositeHadron = new TH2F("hPtTriggerPtLeadingOppositeHadron","Leading hadron opposite to trigger vs trigger #it{p}_{T}",
1238 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1239 fhPtLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1240 fhPtLeadingOppositeHadron->SetYTitle("#it{p}_{T}^{lead hadron} (GeV/#it{c})");
1241 outputContainer->Add(fhPtLeadingOppositeHadron);
1243 fhPtDiffPhiLeadingOppositeHadron = new TH2F("hPtTriggerDiffPhiTriggerLeadingOppositeHadron","#phi_{trigger}-#phi_{leading opposite hadron} vs #it{p}_{T}^{trig}",
1244 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
1245 fhPtDiffPhiLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1246 fhPtDiffPhiLeadingOppositeHadron->SetYTitle("#phi_{trigger}-#phi_{leading opposite hadron} (rad)");
1247 outputContainer->Add(fhPtDiffPhiLeadingOppositeHadron);
1249 fhPtDiffEtaLeadingOppositeHadron = new TH2F("hPtTriggerDiffEtaTriggerPhiLeadingOppositeHadron","#eta_{trigger}-#eta_{leading opposite hadron} vs #it{p}_{T}^{trig}",
1250 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1251 fhPtDiffEtaLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1252 fhPtDiffEtaLeadingOppositeHadron->SetYTitle("#eta_{trigger}-#eta_{leading opposite hadron}");
1253 outputContainer->Add(fhPtDiffEtaLeadingOppositeHadron);
1256 //Correlation with charged hadrons
1258 fhDeltaPhiDeltaEtaCharged = new TH2F
1259 ("hDeltaPhiDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}}",
1260 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1261 fhDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
1262 fhDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
1264 fhDeltaPhiDeltaEtaChargedPtA3GeV = new TH2F
1265 ("hDeltaPhiDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}, #it{p}_{TA}>3 GeV/#it{c}}",
1266 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1267 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetXTitle("#Delta #phi (rad)");
1268 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1270 fhPhiCharged = new TH2F
1271 ("hPhiCharged","#phi_{h^{#pm}} vs #it{p}_{T #pm}",
1272 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1273 fhPhiCharged->SetYTitle("#phi_{h^{#pm}} (rad)");
1274 fhPhiCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
1276 fhEtaCharged = new TH2F
1277 ("hEtaCharged","#eta_{h^{#pm}} vs #it{p}_{T #pm}",
1278 nptbins,ptmin,ptmax,netabins,etamin,etamax);
1279 fhEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
1280 fhEtaCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
1282 fhDeltaPhiCharged = new TH2F
1283 ("hDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
1284 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1285 fhDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
1286 fhDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1288 fhDeltaPhiChargedPtA3GeV = new TH2F
1289 ("hDeltaPhiChargedPtA3GeV","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}",
1290 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1291 fhDeltaPhiChargedPtA3GeV->SetYTitle("#Delta #phi (rad)");
1292 fhDeltaPhiChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1295 fhDeltaPhiChargedPt = new TH2F
1296 ("hDeltaPhiChargedPt","#phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}",
1297 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1298 fhDeltaPhiChargedPt->SetYTitle("#Delta #phi (rad)");
1299 fhDeltaPhiChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1301 fhDeltaEtaCharged = new TH2F
1302 ("hDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}",
1303 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1304 fhDeltaEtaCharged->SetYTitle("#Delta #eta");
1305 fhDeltaEtaCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1307 fhDeltaEtaChargedPtA3GeV = new TH2F
1308 ("hDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}",
1309 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1310 fhDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1311 fhDeltaEtaChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1314 new TH2F("hXECharged","#it{x}_{#it{E}} for charged tracks",
1315 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1316 fhXECharged->SetYTitle("#it{x}_{#it{E}}");
1317 fhXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1320 new TH2F("hXECharged_Cone2","#it{x}_{#it{E}} for charged tracks in cone 2 (5#pi/6-7#pi/6)",
1321 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1322 fhXECharged_Cone2->SetYTitle("#it{x}_{#it{E}}");
1323 fhXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1326 new TH2F("hXEPositiveCharged","#it{x}_{#it{E}} for positive charged tracks",
1327 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1328 fhXEPosCharged->SetYTitle("#it{x}_{#it{E}}");
1329 fhXEPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1332 new TH2F("hXENegativeCharged","#it{x}_{#it{E}} for negative charged tracks",
1333 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1334 fhXENegCharged->SetYTitle("#it{x}_{#it{E}}");
1335 fhXENegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1338 new TH2F("hHbpXECharged","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
1339 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1340 fhPtHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1341 fhPtHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1343 fhPtHbpXECharged_Cone2 =
1344 new TH2F("hHbpXECharged_Cone2","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons in cone 2 (5#pi/6-7#pi/6)",
1345 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1346 fhPtHbpXECharged_Cone2->SetYTitle("ln(1/#it{x}_{#it{E}})");
1347 fhPtHbpXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1350 new TH2F("hZTCharged","#it{z}_{T} for charged tracks",
1351 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1352 fhZTCharged->SetYTitle("#it{z}_{T}");
1353 fhZTCharged->SetXTitle("#it{p}_{T trigger}");
1356 new TH2F("hZTPositiveCharged","#it{z}_{T} for positive charged tracks",
1357 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1358 fhZTPosCharged->SetYTitle("#it{z}_{T}");
1359 fhZTPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1362 new TH2F("hZTNegativeCharged","#it{z}_{T} for negative charged tracks",
1363 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1364 fhZTNegCharged->SetYTitle("#it{z}_{T}");
1365 fhZTNegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1368 new TH2F("hHbpZTCharged","#xi = ln(1/#it{z}_{T}) with charged hadrons",
1369 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1370 fhPtHbpZTCharged->SetYTitle("ln(1/#it{z}_{T})");
1371 fhPtHbpZTCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1374 new TH2F("hPtTrigPout","Pout with triggers",
1375 nptbins,ptmin,ptmax,2*nptbins,-ptmax,ptmax);
1376 fhPtTrigPout->SetYTitle("#it{p}_{out} (GeV/#it{c})");
1377 fhPtTrigPout->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1380 new TH2F("hPtTrigCharged","trigger and charged tracks pt distribution",
1381 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1382 fhPtTrigCharged->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1383 fhPtTrigCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1385 outputContainer->Add(fhDeltaPhiDeltaEtaCharged);
1386 outputContainer->Add(fhDeltaPhiDeltaEtaChargedPtA3GeV);
1387 outputContainer->Add(fhPhiCharged) ;
1388 outputContainer->Add(fhEtaCharged) ;
1389 outputContainer->Add(fhDeltaPhiCharged) ;
1390 outputContainer->Add(fhDeltaPhiChargedPtA3GeV) ;
1391 outputContainer->Add(fhDeltaEtaCharged) ;
1392 outputContainer->Add(fhDeltaEtaChargedPtA3GeV) ;
1393 outputContainer->Add(fhDeltaPhiChargedPt) ;
1395 outputContainer->Add(fhXECharged) ;
1396 outputContainer->Add(fhXECharged_Cone2) ;
1400 for(Int_t i=0; i < 7; i++)
1403 fhDeltaPhiChargedMC[i] = new TH2F(Form("hDeltaPhiCharged_MC%s",nameMC[i].Data()),
1404 Form("#Delta #phi for charged tracks, trigger origin is %s",nameMC[i].Data()),
1405 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
1406 fhDeltaPhiChargedMC[i]->SetYTitle("#it{x}_{#it{E}}");
1407 fhDeltaPhiChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1408 outputContainer->Add(fhDeltaPhiChargedMC[i]) ;
1410 fhXEChargedMC[i] = new TH2F(Form("hXECharged_MC%s",nameMC[i].Data()),
1411 Form("#it{x}_{#it{E}} for charged tracks, trigger origin is %s",nameMC[i].Data()),
1412 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1413 fhXEChargedMC[i]->SetYTitle("#it{x}_{#it{E}}");
1414 fhXEChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1415 outputContainer->Add(fhXEChargedMC[i]) ;
1419 outputContainer->Add(fhXEPosCharged) ;
1420 outputContainer->Add(fhXENegCharged) ;
1421 outputContainer->Add(fhPtHbpXECharged) ;
1422 outputContainer->Add(fhPtHbpXECharged_Cone2) ;
1424 outputContainer->Add(fhZTCharged) ;
1425 outputContainer->Add(fhZTPosCharged) ;
1426 outputContainer->Add(fhZTNegCharged) ;
1427 outputContainer->Add(fhPtHbpZTCharged) ;
1429 outputContainer->Add(fhPtTrigPout) ;
1430 outputContainer->Add(fhPtTrigCharged) ;
1433 if(fMakeSeveralUE) right = "Right";
1435 fhUePart = new TH1F("hUePart","UE particles distribution vs pt trig",
1436 nptbins,ptmin,ptmax);
1437 fhUePart->SetYTitle("dNch");
1438 fhUePart->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1440 fhDeltaPhiUeChargedPt = new TH2F
1441 (Form("hDeltaPhiUe%sChargedPt",right.Data()),"#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}}",
1442 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1443 fhDeltaPhiUeChargedPt->SetYTitle("#Delta #phi (rad)");
1444 fhDeltaPhiUeChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1447 new TH2F(Form("hXEUeCharged%s",right.Data()),"#it{x}_{#it{E}} for Underlying Event",
1448 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1449 fhXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
1450 fhXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1452 fhPtHbpXEUeCharged =
1453 new TH2F(Form("hHbpXEUeCharged%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for Underlying Event",
1454 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1455 fhPtHbpXEUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1456 fhPtHbpXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1459 new TH2F(Form("hZTUeCharged%s",right.Data()),"#it{z}_{T} for Underlying Event",
1460 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1461 fhZTUeCharged->SetYTitle("#it{z}_{T}");
1462 fhZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1464 fhPtHbpZTUeCharged =
1465 new TH2F(Form("hHbpZTUeCharged%s",right.Data()),"#xi = ln(1/#it{z}_{T}) for Underlying Event",
1466 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1467 fhPtHbpZTUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1468 fhPtHbpZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1470 outputContainer->Add(fhUePart);
1471 outputContainer->Add(fhDeltaPhiUeChargedPt) ;
1472 outputContainer->Add(fhXEUeCharged) ;
1473 outputContainer->Add(fhPtHbpXEUeCharged) ;
1474 outputContainer->Add(fhZTUeCharged) ;
1475 outputContainer->Add(fhPtHbpZTUeCharged) ;
1479 fhDeltaPhiUeLeftCharged = new TH2F
1480 ("hDeltaPhiUeLeftChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left side range of trigger particles",
1481 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1482 fhDeltaPhiUeLeftCharged->SetYTitle("#Delta #phi (rad)");
1483 fhDeltaPhiUeLeftCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1484 outputContainer->Add(fhDeltaPhiUeLeftCharged) ;
1486 fhDeltaPhiUeLeftUpCharged = new TH2F
1487 ("hDeltaPhiUeLeftUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Up side range of trigger particles",
1488 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1489 fhDeltaPhiUeLeftUpCharged->SetYTitle("#Delta #phi (rad)");
1490 fhDeltaPhiUeLeftUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1491 outputContainer->Add(fhDeltaPhiUeLeftUpCharged) ;
1493 fhDeltaPhiUeRightUpCharged = new TH2F
1494 ("hDeltaPhiUeRightUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Up side range of trigger particles",
1495 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1496 fhDeltaPhiUeRightUpCharged->SetYTitle("#Delta #phi (rad)");
1497 fhDeltaPhiUeRightUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1498 outputContainer->Add(fhDeltaPhiUeRightUpCharged) ;
1500 fhDeltaPhiUeLeftDownCharged = new TH2F
1501 ("hDeltaPhiUeLeftDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Down side range of trigger particles",
1502 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1503 fhDeltaPhiUeLeftDownCharged->SetYTitle("#Delta #phi (rad)");
1504 fhDeltaPhiUeLeftDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1505 outputContainer->Add(fhDeltaPhiUeLeftDownCharged) ;
1507 fhDeltaPhiUeRightDownCharged = new TH2F
1508 ("hDeltaPhiUeRightDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Down side range of trigger particles",
1509 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1510 fhDeltaPhiUeRightDownCharged->SetYTitle("#Delta #phi (rad)");
1511 fhDeltaPhiUeRightDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1512 outputContainer->Add(fhDeltaPhiUeRightDownCharged) ;
1515 new TH2F("hXEUeChargedLeft","#it{x}_{#it{E}} with UE left side of trigger",
1516 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1517 fhXEUeLeftCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1518 fhXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1519 outputContainer->Add(fhXEUeLeftCharged) ;
1521 fhXEUeLeftUpCharged =
1522 new TH2F("hXEUeChargedLeftUp","#it{x}_{#it{E}} with UE left Up side of trigger",
1523 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1524 fhXEUeLeftUpCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1525 fhXEUeLeftUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1526 outputContainer->Add(fhXEUeLeftUpCharged) ;
1528 fhXEUeRightUpCharged =
1529 new TH2F("hXEUeChargedRightUp","#it{x}_{#it{E} h^{#pm}} with UE right Up side of trigger",
1530 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1531 fhXEUeRightUpCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1532 fhXEUeRightUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1533 outputContainer->Add(fhXEUeRightUpCharged) ;
1535 fhXEUeLeftDownCharged =
1536 new TH2F("hXEUeChargedLeftDown","#it{x}_{#it{E}} with UE left Down side of trigger",
1537 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1538 fhXEUeLeftDownCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1539 fhXEUeLeftDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1540 outputContainer->Add(fhXEUeLeftDownCharged) ;
1542 fhXEUeRightDownCharged =
1543 new TH2F("hXEUeChargedRightDown","#it{x}_{#it{E} h^{#pm}} with UE right Down side of trigger",
1544 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1545 fhXEUeRightDownCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1546 fhXEUeRightDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1547 outputContainer->Add(fhXEUeRightDownCharged) ;
1549 fhPtHbpXEUeLeftCharged =
1550 new TH2F("hHbpXEUeChargedLeft","#xi = ln(1/#it{x}_{#it{E}}) with charged UE left side of trigger",
1551 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1552 fhPtHbpXEUeLeftCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1553 fhPtHbpXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1554 outputContainer->Add(fhPtHbpXEUeLeftCharged) ;
1557 new TH2F("hZTUeChargedLeft","#it{z}_{trigger h^{#pm}} = #it{p}_{T Ueh^{#pm}} / #it{p}_{T trigger} with UE left side of trigger",
1558 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1559 fhZTUeLeftCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1560 fhZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1561 outputContainer->Add(fhZTUeLeftCharged) ;
1563 fhPtHbpZTUeLeftCharged =
1564 new TH2F("hHbpZTUeChargedLeft","#xi = ln(1/#it{z}_{T}) with charged UE left side of trigger",
1565 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1566 fhPtHbpZTUeLeftCharged->SetYTitle("ln(1/#it{z}_{T})");
1567 fhPtHbpZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1568 outputContainer->Add(fhPtHbpZTUeLeftCharged) ;
1571 if(fFillPileUpHistograms)
1573 fhDeltaPhiChargedOtherBC = new TH2F
1574 ("hDeltaPhiChargedOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC!=0",
1575 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1576 fhDeltaPhiChargedOtherBC->SetYTitle("#Delta #phi (rad)");
1577 fhDeltaPhiChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1579 fhDeltaPhiChargedPtA3GeVOtherBC = new TH2F
1580 ("hDeltaPhiChargedPtA3GeVOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC!=0",
1581 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1582 fhDeltaPhiChargedPtA3GeVOtherBC->SetYTitle("#Delta #phi (rad)");
1583 fhDeltaPhiChargedPtA3GeVOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1585 fhPtTrigChargedOtherBC =
1586 new TH2F("hPtTrigChargedOtherBC","trigger and charged tracks pt distribution, track BC!=0",
1587 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1588 fhPtTrigChargedOtherBC->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1589 fhPtTrigChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1591 fhXEChargedOtherBC =
1592 new TH2F("hXEChargedOtherBC","#it{x}_{#it{E}} for charged tracks, track BC!=0",
1593 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1594 fhXEChargedOtherBC->SetYTitle("#it{x}_{#it{E}}");
1595 fhXEChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1597 fhXEUeChargedOtherBC =
1598 new TH2F("hXEUeChargedOtherBC","#it{x}_{#it{E}} for Underlying Event, track BC!=0",
1599 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1600 fhXEUeChargedOtherBC->SetYTitle("#it{x}_{#it{E}}");
1601 fhXEUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1603 fhZTChargedOtherBC =
1604 new TH2F("hZTChargedOtherBC","#it{z}_{T} for charged tracks, track BC!=0",
1605 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1606 fhZTChargedOtherBC->SetYTitle("#it{z}_{T}");
1607 fhZTChargedOtherBC->SetXTitle("#it{p}_{T trigger}");
1609 fhZTUeChargedOtherBC =
1610 new TH2F("hZTUeChargedOtherBC","#it{z}_{T} for Underlying Event, track BC!=0",
1611 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1612 fhZTUeChargedOtherBC->SetYTitle("#it{z}_{T}");
1613 fhZTUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1615 outputContainer->Add(fhDeltaPhiChargedOtherBC) ;
1616 outputContainer->Add(fhDeltaPhiChargedPtA3GeVOtherBC) ;
1617 outputContainer->Add(fhXEChargedOtherBC) ;
1618 outputContainer->Add(fhXEUeChargedOtherBC) ;
1619 outputContainer->Add(fhZTChargedOtherBC) ;
1620 outputContainer->Add(fhZTUeChargedOtherBC) ;
1621 outputContainer->Add(fhPtTrigChargedOtherBC) ;
1623 fhDeltaPhiChargedBC0 = new TH2F
1624 ("hDeltaPhiChargedBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0",
1625 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1626 fhDeltaPhiChargedBC0->SetYTitle("#Delta #phi (rad)");
1627 fhDeltaPhiChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1629 fhDeltaPhiChargedPtA3GeVBC0 = new TH2F
1630 ("hDeltaPhiChargedPtA3GeVBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0",
1631 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1632 fhDeltaPhiChargedPtA3GeVBC0->SetYTitle("#Delta #phi (rad)");
1633 fhDeltaPhiChargedPtA3GeVBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1635 fhPtTrigChargedBC0 =
1636 new TH2F("hPtTrigChargedBC0","trigger and charged tracks pt distribution, track BC==0",
1637 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1638 fhPtTrigChargedBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1639 fhPtTrigChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1642 new TH2F("hXEChargedBC0","#it{x}_{#it{E}} for charged tracks, track BC==0",
1643 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1644 fhXEChargedBC0->SetYTitle("#it{x}_{#it{E}}");
1645 fhXEChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1648 new TH2F("hXEUeChargedBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0",
1649 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1650 fhXEUeChargedBC0->SetYTitle("#it{x}_{#it{E}}");
1651 fhXEUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1654 new TH2F("hZTChargedBC0","#it{z}_{T} for charged tracks, track BC==0",
1655 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1656 fhZTChargedBC0->SetYTitle("#it{z}_{T}");
1657 fhZTChargedBC0->SetXTitle("#it{p}_{T trigger}");
1660 new TH2F("hZTUeChargedBC0","#it{z}_{T} for Underlying Event, track BC==0",
1661 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1662 fhZTUeChargedBC0->SetYTitle("#it{z}_{T}");
1663 fhZTUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1665 outputContainer->Add(fhDeltaPhiChargedBC0) ;
1666 outputContainer->Add(fhDeltaPhiChargedPtA3GeVBC0) ;
1667 outputContainer->Add(fhXEChargedBC0) ;
1668 outputContainer->Add(fhXEUeChargedBC0) ;
1669 outputContainer->Add(fhZTChargedBC0) ;
1670 outputContainer->Add(fhZTUeChargedBC0) ;
1671 outputContainer->Add(fhPtTrigChargedBC0) ;
1673 fhPtTriggerVtxBC0 = new TH1F("hPtTriggerVtxBC0","#it{p}_{T} distribution of trigger particles", nptbins,ptmin,ptmax);
1674 fhPtTriggerVtxBC0->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1676 fhDeltaPhiChargedVtxBC0 = new TH2F
1677 ("hDeltaPhiChargedVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0",
1678 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1679 fhDeltaPhiChargedVtxBC0->SetYTitle("#Delta #phi (rad)");
1680 fhDeltaPhiChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1682 fhDeltaPhiChargedPtA3GeVVtxBC0 = new TH2F
1683 ("hDeltaPhiChargedPtA3GeVVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0",
1684 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1685 fhDeltaPhiChargedPtA3GeVVtxBC0->SetYTitle("#Delta #phi (rad)");
1686 fhDeltaPhiChargedPtA3GeVVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1688 fhPtTrigChargedVtxBC0 =
1689 new TH2F("hPtTrigChargedVtxBC0","trigger and charged tracks pt distribution, track BC==0",
1690 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1691 fhPtTrigChargedVtxBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1692 fhPtTrigChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1695 new TH2F("hXEChargedVtxBC0","#it{x}_{#it{E}} for charged tracks, track BC==0",
1696 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1697 fhXEChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}");
1698 fhXEChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1700 fhXEUeChargedVtxBC0 =
1701 new TH2F("hXEUeChargedVtxBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0",
1702 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1703 fhXEUeChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}");
1704 fhXEUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1707 new TH2F("hZTChargedVtxBC0","#it{z}_{T} for charged tracks, track BC==0",
1708 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1709 fhZTChargedVtxBC0->SetYTitle("#it{z}_{T}");
1710 fhZTChargedVtxBC0->SetXTitle("#it{p}_{T trigger}");
1712 fhZTUeChargedVtxBC0 =
1713 new TH2F("hZTUeChargedVtxBC0","#it{z}_{T} for Underlying Event, track BC==0",
1714 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1715 fhZTUeChargedVtxBC0->SetYTitle("#it{z}_{T}");
1716 fhZTUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1718 outputContainer->Add(fhPtTriggerVtxBC0);
1719 outputContainer->Add(fhDeltaPhiChargedVtxBC0) ;
1720 outputContainer->Add(fhDeltaPhiChargedPtA3GeVVtxBC0) ;
1721 outputContainer->Add(fhXEChargedVtxBC0) ;
1722 outputContainer->Add(fhXEUeChargedVtxBC0) ;
1723 outputContainer->Add(fhZTChargedVtxBC0) ;
1724 outputContainer->Add(fhZTUeChargedVtxBC0) ;
1725 outputContainer->Add(fhPtTrigChargedVtxBC0) ;
1727 for(Int_t i = 0 ; i < 7 ; i++)
1729 fhPtTriggerPileUp[i] = new TH1F(Form("hPtTriggerPileUp%s",pileUpName[i].Data()),
1730 Form("#it{p}_{T} distribution of trigger particles, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
1731 fhPtTriggerPileUp[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1732 outputContainer->Add(fhPtTriggerPileUp[i]);
1734 fhDeltaPhiChargedPileUp[i] = new TH2F(Form("hDeltaPhiChargedPileUp%s",pileUpName[i].Data()),
1735 Form("#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1736 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1737 fhDeltaPhiChargedPileUp[i]->SetYTitle("#Delta #phi (rad)");
1738 fhDeltaPhiChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1739 outputContainer->Add(fhDeltaPhiChargedPileUp[i]) ;
1741 fhDeltaPhiChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaPhiChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1742 Form("#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, %s Pile-Up event",pileUpName[i].Data()),
1743 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1744 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #phi (rad)");
1745 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1746 outputContainer->Add(fhDeltaPhiChargedPtA3GeVPileUp[i]) ;
1748 fhDeltaEtaChargedPileUp[i] = new TH2F(Form("hDeltaEtaChargedPileUp%s",pileUpName[i].Data()),
1749 Form("#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1750 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1751 fhDeltaEtaChargedPileUp[i]->SetYTitle("#Delta #eta");
1752 fhDeltaEtaChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1753 outputContainer->Add(fhDeltaEtaChargedPileUp[i]) ;
1755 fhDeltaEtaChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaEtaChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1756 Form("#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, %s Pile-Up event",pileUpName[i].Data()),
1757 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1758 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #eta");
1759 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1760 outputContainer->Add(fhDeltaEtaChargedPtA3GeVPileUp[i]) ;
1762 fhXEChargedPileUp[i] = new TH2F(Form("hXEChargedPileUp%s",pileUpName[i].Data()),
1763 Form("#it{x}_{#it{E}} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1764 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1765 fhXEChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}");
1766 fhXEChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1767 outputContainer->Add(fhXEChargedPileUp[i]) ;
1769 fhXEUeChargedPileUp[i] = new TH2F(Form("hXEUeChargedPileUp%s",pileUpName[i].Data()),
1770 Form("#it{x}_{#it{E}} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1771 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1772 fhXEUeChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}");
1773 fhXEUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1774 outputContainer->Add(fhXEUeChargedPileUp[i]) ;
1776 fhZTChargedPileUp[i] = new TH2F(Form("hZTChargedPileUp%s",pileUpName[i].Data()),
1777 Form("#it{z}_{T} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1778 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1779 fhZTChargedPileUp[i]->SetYTitle("#it{z}_{T}");
1780 fhZTChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1781 outputContainer->Add(fhZTChargedPileUp[i]) ;
1783 fhZTUeChargedPileUp[i] = new TH2F(Form("hZTUeChargedPileUp%s",pileUpName[i].Data()),
1784 Form("#it{z}_{T} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1785 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1786 fhZTUeChargedPileUp[i]->SetYTitle("#it{z}_{T}");
1787 fhZTUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1788 outputContainer->Add(fhZTUeChargedPileUp[i]) ;
1790 fhPtTrigChargedPileUp[i] = new TH2F(Form("hPtTrigChargedPileUp%s",pileUpName[i].Data()),
1791 Form("trigger and charged tracks pt distribution, %s Pile-Up event",pileUpName[i].Data()),
1792 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1793 fhPtTrigChargedPileUp[i]->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1794 fhPtTrigChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1795 outputContainer->Add(fhPtTrigChargedPileUp[i]) ;
1800 if(fFillHighMultHistograms)
1802 Int_t nMultiBins = GetNCentrBin();
1803 fhDeltaPhiChargedMult = new TH2F*[nMultiBins] ;
1804 fhDeltaEtaChargedMult = new TH2F*[nMultiBins] ;
1805 fhXEMult = new TH2F*[nMultiBins] ;
1806 fhXEUeMult = new TH2F*[nMultiBins] ;
1807 fhZTMult = new TH2F*[nMultiBins] ;
1808 fhZTUeMult = new TH2F*[nMultiBins] ;
1810 for(Int_t im=0; im<nMultiBins; im++)
1812 fhDeltaPhiChargedMult[im] = new TH2F
1813 (Form("hDeltaPhiCharged_Mult%d",im),Form("#Delta #phi charged Mult bin %d",im), nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1814 fhDeltaPhiChargedMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1815 fhDeltaPhiChargedMult[im]->SetYTitle("#Delta #phi (rad)");
1817 fhDeltaEtaChargedMult[im] = new TH2F
1818 (Form("hDeltaEtaCharged_Mult%d",im),Form("#Delta #eta charged Mult bin %d",im), nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
1819 fhDeltaEtaChargedMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1820 fhDeltaEtaChargedMult[im]->SetYTitle("#Delta #eta");
1822 fhXEMult[im] = new TH2F
1823 (Form("hXECharged_Mult%d",im),Form("#it{x}_{E} charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1824 fhXEMult[im]->SetYTitle("#it{x}_{E}");
1825 fhXEMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1827 fhXEUeMult[im] = new TH2F
1828 (Form("hXEUeCharged_Mult%d",im),Form("#it{x}_{E} UE charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1829 fhXEUeMult[im]->SetYTitle("#it{x}_{E}");
1830 fhXEUeMult[im]->SetXTitle("#it{p}_{T trigger}(GeV/#it{c})");
1832 fhZTMult[im] = new TH2F
1833 (Form("hZTCharged_Mult%d",im),Form("#it{z}_{T} charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1834 fhZTMult[im]->SetYTitle("#it{z}_{T}");
1835 fhZTMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1837 fhZTUeMult[im] = new TH2F
1838 (Form("hZTUeCharged_Mult%d",im),Form("#it{z}_{T} UE charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1839 fhZTUeMult[im]->SetYTitle("#it{z}_{T}");
1840 fhZTUeMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1842 outputContainer->Add(fhDeltaPhiChargedMult[im]) ;
1843 outputContainer->Add(fhDeltaEtaChargedMult[im]) ;
1844 outputContainer->Add(fhXEMult [im]);
1845 outputContainer->Add(fhXEUeMult[im]);
1846 outputContainer->Add(fhZTMult [im]);
1847 outputContainer->Add(fhZTUeMult[im]);
1853 fhAssocPtBkg = new TH2F("hAssocPtBkg", " Trigger #it{p}_{T} vs associated hadron #it{p}_{T} from background",
1854 nptbins, ptmin, ptmax,nptbins,ptmin,ptmax);
1855 fhAssocPtBkg->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1856 fhAssocPtBkg->SetYTitle("#it{p}_{T associated} (GeV/#it{c})");
1857 outputContainer->Add(fhAssocPtBkg) ;
1859 fhDeltaPhiBrad = new TH2F("hDeltaPhiBrad","atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs #it{p}_{T trigger} ",
1860 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
1861 fhDeltaPhiBrad->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1862 fhDeltaPhiBrad->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
1863 outputContainer->Add(fhDeltaPhiBrad) ;
1866 fhDeltaPhiDeltaEtaAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1867 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1868 fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
1869 fhDeltaPhiAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
1870 if(fFillMomImbalancePtAssocBinsHisto)
1872 fhXEAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1873 fhZTAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1878 fhXEVZ = new TH2F*[nz];
1879 fhZTVZ = new TH2F*[nz];
1883 fhDeltaPhiBradAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1885 if(fPi0Trigger || fDecayTrigger)
1887 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1888 fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
1889 fhDeltaPhiDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1892 if(fHMPIDCorrelation)
1894 fhDeltaPhiAssocPtBinHMPID = new TH2F*[fNAssocPtBins*nz];
1895 fhDeltaPhiAssocPtBinHMPIDAcc= new TH2F*[fNAssocPtBins*nz];
1898 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
1900 for(Int_t z = 0 ; z < nz ; z++)
1906 sz = Form("_vz%d",z);
1907 tz = Form(", #it{v}_{#it{z}} bin %d",z);
1910 //printf("iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
1912 fhDeltaPhiDeltaEtaAssocPtBin[bin] = new TH2F(Form("hDeltaPhiDeltaEtaPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1913 Form("#Delta #phi vs #Delta #eta for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1914 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1915 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
1916 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetYTitle("#Delta #eta");
1918 fhDeltaPhiAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1919 Form("#Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1920 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1921 fhDeltaPhiAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1922 fhDeltaPhiAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
1924 outputContainer->Add(fhDeltaPhiDeltaEtaAssocPtBin[bin]) ;
1925 outputContainer->Add(fhDeltaPhiAssocPtBin[bin]) ;
1927 if(fFillEtaGapsHisto)
1929 fhDeltaPhiAssocPtBinDEta08[bin] = new TH2F(Form("hDeltaPhiDeltaEta0.8PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1930 Form("#Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, for #Delta #eta > 0.8", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1931 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1932 fhDeltaPhiAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1933 fhDeltaPhiAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
1935 fhDeltaPhiAssocPtBinDEta0[bin] = new TH2F(Form("hDeltaPhiDeltaEta0PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1936 Form("#Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, for #Delta #eta = 0.", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1937 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1938 fhDeltaPhiAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1939 fhDeltaPhiAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
1941 outputContainer->Add(fhDeltaPhiAssocPtBinDEta08[bin]) ;
1942 outputContainer->Add(fhDeltaPhiAssocPtBinDEta0[bin]) ;
1945 if(fPi0Trigger || fDecayTrigger)
1947 fhDeltaPhiDecayChargedAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtDecayChargedAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1948 Form("#Delta #phi vs #it{p}_{T trigger} tagged as decay for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1949 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1950 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1951 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
1953 outputContainer->Add(fhDeltaPhiDecayChargedAssocPtBin[bin]) ;
1958 fhDeltaPhiBradAssocPtBin[bin] = new TH2F(Form("hDeltaPhiBradPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1959 Form("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1960 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
1961 fhDeltaPhiBradAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1962 fhDeltaPhiBradAssocPtBin[bin]->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
1963 outputContainer->Add(fhDeltaPhiBradAssocPtBin[bin]) ;
1966 if(fHMPIDCorrelation)
1968 fhDeltaPhiAssocPtBinHMPID[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPID", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1969 Form("#Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, with track having HMPID signal", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1970 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1971 fhDeltaPhiAssocPtBinHMPID[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})" );
1972 fhDeltaPhiAssocPtBinHMPID[bin]->SetYTitle("#Delta #phi (rad)");
1974 fhDeltaPhiAssocPtBinHMPIDAcc[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPIDAcc", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1975 Form("#Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, with track within 5<phi<20 deg", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1976 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1977 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1978 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetYTitle("#Delta #phi (rad)");
1980 outputContainer->Add(fhDeltaPhiAssocPtBinHMPID [bin]) ;
1981 outputContainer->Add(fhDeltaPhiAssocPtBinHMPIDAcc[bin]) ;
1986 if(fFillMomImbalancePtAssocBinsHisto)
1988 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
1990 fhXEAssocPtBin[i] = new TH2F(Form("hXEAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
1991 Form("#it{x}_{#it{E}} vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
1992 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
1993 fhXEAssocPtBin[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1994 fhXEAssocPtBin[i]->SetYTitle("#it{x}_{#it{E}}");
1996 fhZTAssocPtBin[i] = new TH2F(Form("hZTAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
1997 Form("#it{z}_{T} vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
1998 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
1999 fhZTAssocPtBin[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2000 fhZTAssocPtBin[i]->SetYTitle("#it{z}_{T}");
2003 outputContainer->Add(fhXEAssocPtBin[i]);
2004 outputContainer->Add(fhZTAssocPtBin[i]);
2010 for(Int_t z = 0 ; z < nz ; z++)
2012 sz = Form("_vz%d",z);
2013 tz = Form(", #it{v}_{#it{z}} bin %d",z);
2015 fhXEVZ[z] = new TH2F(Form("hXE%s", sz.Data()),
2016 Form("#it{x}_{#it{E}} vs #it{p}_{T trigger}%s", tz.Data()),
2017 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2018 fhXEVZ[z]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2019 fhXEVZ[z]->SetYTitle("#it{x}_{#it{E}}");
2021 fhZTVZ[z] = new TH2F(Form("hZT%s",sz.Data()),
2022 Form("#it{z}_{T} vs #it{p}_{T trigger}%s", tz.Data()),
2023 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2024 fhZTVZ[z]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2025 fhZTVZ[z]->SetYTitle("#it{z}_{T}");
2027 outputContainer->Add(fhXEVZ[z]);
2028 outputContainer->Add(fhZTVZ[z]);
2032 if(fPi0Trigger || fDecayTrigger)
2036 fhPtPi0DecayRatio = new TH2F
2037 ("hPtPi0DecayRatio","#it{p}_{T} of #pi^{0} and the ratio of pt for two decay",
2038 nptbins,ptmin,ptmax, 100,0.,2.);
2039 fhPtPi0DecayRatio->SetXTitle("#it{p}_{T}^{#pi^{0}} (GeV/#it{c})");
2040 fhPtPi0DecayRatio->SetYTitle("#it{p}_{T}^{Decay}/#it{p}_{T}^{#pi^{0}}");
2041 outputContainer->Add(fhPtPi0DecayRatio) ;
2044 fhDeltaPhiDecayCharged = new TH2F
2045 ("hDeltaPhiDecayCharged","#phi_{Decay} - #phi_{h^{#pm}} vs #it{p}_{T Decay}",
2046 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2047 fhDeltaPhiDecayCharged->SetYTitle("#Delta #phi (rad)");
2048 fhDeltaPhiDecayCharged->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
2051 new TH2F("hXEDecayCharged","#it{x}_{#it{E}} Decay",
2052 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2053 fhXEDecayCharged->SetYTitle("#it{x}_{#it{E}}");
2054 fhXEDecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2057 new TH2F("hZTDecayCharged","#it{z}_{trigger h^{#pm}} = #it{p}_{T h^{#pm}} / #it{p}_{T Decay}",
2058 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2059 fhZTDecayCharged->SetYTitle("#it{z}_{decay h^{#pm}}");
2060 fhZTDecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2062 outputContainer->Add(fhDeltaPhiDecayCharged) ;
2063 outputContainer->Add(fhXEDecayCharged) ;
2064 outputContainer->Add(fhZTDecayCharged) ;
2067 //Correlation with neutral hadrons
2070 fhDeltaPhiDeltaEtaNeutral = new TH2F
2071 ("hDeltaPhiDeltaEtaNeutral","#phi_{trigger} - #phi_{h^{0}} vs #eta_{trigger} - #eta_{h^{0}}",
2072 ndeltaphibins ,deltaphimin,deltaphimax, ndeltaetabins ,deltaetamin,deltaetamax);
2073 fhDeltaPhiDeltaEtaNeutral->SetXTitle("#Delta #phi (rad)");
2074 fhDeltaPhiDeltaEtaNeutral->SetYTitle("#Delta #eta");
2076 fhPhiNeutral = new TH2F
2077 ("hPhiNeutral","#phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}",
2078 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
2079 fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)");
2080 fhPhiNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})");
2082 fhEtaNeutral = new TH2F
2083 ("hEtaNeutral","#eta_{#pi^{0}} vs #it{p}_{T #pi^{0}}",
2084 nptbins,ptmin,ptmax,netabins,etamin,etamax);
2085 fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)");
2086 fhEtaNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})");
2088 fhDeltaPhiNeutral = new TH2F
2089 ("hDeltaPhiNeutral","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T trigger}",
2090 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
2091 fhDeltaPhiNeutral->SetYTitle("#Delta #phi (rad)");
2092 fhDeltaPhiNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2094 fhDeltaPhiNeutralPt = new TH2F
2095 ("hDeltaPhiNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}",
2096 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2097 fhDeltaPhiNeutralPt->SetYTitle("#Delta #phi (rad)");
2098 fhDeltaPhiNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2100 fhDeltaEtaNeutral = new TH2F
2101 ("hDeltaEtaNeutral","#eta_{trigger} - #eta_{#pi^{0}} vs #it{p}_{T trigger}",
2102 nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
2103 fhDeltaEtaNeutral->SetYTitle("#Delta #eta");
2104 fhDeltaEtaNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2107 new TH2F("hXENeutral","#it{x}_{#it{E}} for #pi^{0} associated",
2108 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2109 fhXENeutral->SetYTitle("#it{x}_{#it{E}}");
2110 fhXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2113 new TH2F("hHbpXENeutral","#xi = ln(1/#it{x}_{#it{E}})for #pi^{0} associated",
2114 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2115 fhPtHbpXENeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2116 fhPtHbpXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2119 new TH2F("hZTNeutral","#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated",
2120 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2121 fhZTNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}");
2122 fhZTNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2125 new TH2F("hHbpZTNeutral","#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2126 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2127 fhPtHbpZTNeutral->SetYTitle("ln(1/#it{z}_{T})");
2128 fhPtHbpZTNeutral->SetXTitle("#it{p}_{T trigger}");
2130 outputContainer->Add(fhDeltaPhiDeltaEtaNeutral);
2131 outputContainer->Add(fhPhiNeutral) ;
2132 outputContainer->Add(fhEtaNeutral) ;
2133 outputContainer->Add(fhDeltaPhiNeutral) ;
2134 outputContainer->Add(fhDeltaPhiNeutralPt) ;
2135 outputContainer->Add(fhDeltaEtaNeutral) ;
2136 outputContainer->Add(fhXENeutral) ;
2137 outputContainer->Add(fhPtHbpXENeutral) ;
2138 outputContainer->Add(fhZTNeutral) ;
2139 outputContainer->Add(fhPtHbpZTNeutral) ;
2141 fhDeltaPhiUeNeutralPt = new TH2F
2142 (Form("hDeltaPhiUe%sNeutralPt",right.Data()),"#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}",
2143 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2144 fhDeltaPhiUeNeutralPt->SetYTitle("#Delta #phi (rad)");
2145 fhDeltaPhiUeNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2148 new TH2F(Form("hXEUeNeutral%s",right.Data()),"#it{x}_{#it{E}} for #pi^{0} associated",
2149 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2150 fhXEUeNeutral->SetYTitle("#it{x}_{#it{E}}");
2151 fhXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2153 fhPtHbpXEUeNeutral =
2154 new TH2F(Form("hHbpXEUeNeutral%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2155 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2156 fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2157 fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2160 new TH2F(Form("hZTUeNeutral%s",right.Data()),"#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated",
2161 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2162 fhZTUeNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}");
2163 fhZTUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2165 fhPtHbpZTUeNeutral =
2166 new TH2F(Form("hHbpZTUeNeutral%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2167 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2168 fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{z}_{T})");
2169 fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2171 outputContainer->Add(fhDeltaPhiUeNeutralPt) ;
2172 outputContainer->Add(fhXEUeNeutral) ;
2173 outputContainer->Add(fhPtHbpXEUeNeutral) ;
2174 outputContainer->Add(fhZTUeNeutral) ;
2175 outputContainer->Add(fhPtHbpZTUeNeutral) ;
2179 fhDeltaPhiUeLeftNeutral = new TH2F
2180 ("hDeltaPhiUeLeftNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs #it{p}_{T h^{0}} with neutral UE left side range of trigger particles",
2181 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2182 fhDeltaPhiUeLeftNeutral->SetYTitle("#Delta #phi (rad)");
2183 fhDeltaPhiUeLeftNeutral->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2184 outputContainer->Add(fhDeltaPhiUeLeftNeutral) ;
2187 new TH2F("hXEUeNeutralLeft","#it{x}_{#it{E}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger",
2188 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2189 fhXEUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2190 fhXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2191 outputContainer->Add(fhXEUeLeftNeutral) ;
2193 fhPtHbpXEUeLeftNeutral =
2194 new TH2F("hHbpXEUeNeutralLeft","#xi = ln(1/#it{x}_{#it{E}}) with neutral UE left side of trigger",
2195 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2196 fhPtHbpXEUeLeftNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2197 fhPtHbpXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2198 outputContainer->Add(fhPtHbpXEUeLeftNeutral) ;
2201 new TH2F("hZTUeNeutralLeft","#it{z}_{trigger h^{0}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger",
2202 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2203 fhZTUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2204 fhZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2205 outputContainer->Add(fhZTUeLeftNeutral) ;
2207 fhPtHbpZTUeLeftNeutral =
2208 new TH2F("hHbpZTUeNeutralLeft","#xi = ln(1/#it{z}_{T}) with neutral UE left side of trigger",
2209 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2210 fhPtHbpZTUeLeftNeutral->SetYTitle("ln(1/#it{z}_{T})");
2211 fhPtHbpZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger}");
2212 outputContainer->Add(fhPtHbpZTUeLeftNeutral) ;
2215 if(fPi0Trigger || fDecayTrigger)
2217 fhDeltaPhiDecayNeutral = new TH2F
2218 ("hDeltaPhiDecayNeutral","#phi_{Decay} - #phi_{h^{0}} vs #it{p}_{T Decay}",
2219 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2220 fhDeltaPhiDecayNeutral->SetYTitle("#Delta #phi (rad)");
2221 fhDeltaPhiDecayNeutral->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
2224 new TH2F("hXEDecayNeutral","#it{x}_{#it{E}} for decay trigger",
2225 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2226 fhXEDecayNeutral->SetYTitle("#it{x}_{#it{E}}");
2227 fhXEDecayNeutral->SetXTitle("#it{p}_{T decay}");
2230 new TH2F("hZTDecayNeutral","#it{z}_{trigger h^{0}} = #it{p}_{T h^{0}} / #it{p}_{T Decay}",
2231 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2232 fhZTDecayNeutral->SetYTitle("#it{z}_{h^{0}}");
2233 fhZTDecayNeutral->SetXTitle("#it{p}_{T decay}");
2235 outputContainer->Add(fhDeltaPhiDecayNeutral) ;
2236 outputContainer->Add(fhXEDecayNeutral) ;
2237 outputContainer->Add(fhZTDecayNeutral) ;
2240 }//Correlation with neutral hadrons
2242 //if data is MC, fill more histograms
2245 fh2phiTriggerParticle = new TH2F("h2PhiTriggerParticle","#phi resolution for trigger particles",nptbins,ptmin,ptmax,100,-1,1);
2246 fh2phiTriggerParticle->GetXaxis()->SetTitle("#it{p}_{T gen Trigger} (GeV/#it{c})");
2247 fh2phiTriggerParticle->GetYaxis()->SetTitle("(#phi_{rec}-#phi_{gen})/#phi_{gen}");
2249 fhMCPtTrigger = new TH1F ("hMCPtTrigger","MC : trigger #it{p}_{T}", nptbins,ptmin,ptmax);
2250 fhMCPtTrigger->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2252 fhMCPhiTrigger = new TH2F ("hMCPhiTrigger","MC : trigger #phi",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2253 fhMCPhiTrigger->SetYTitle("#phi (rad)");
2254 fhMCPhiTrigger->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2256 fhMCEtaTrigger = new TH2F ("hMCEtaTrigger","MC : trigger #eta",nptbins,ptmin,ptmax, netabins,etamin,etamax);
2257 fhMCEtaTrigger->SetYTitle("#eta");
2258 fhMCEtaTrigger->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2260 if(fMakeAbsoluteLeading || fMakeNearSideLeading)
2262 fhMCPtTriggerNotLeading = new TH1F ("hMCPtTriggerNotLeading","MC : trigger #it{p}_{T}, when not leading of primaries",
2263 nptbins,ptmin,ptmax);
2264 fhMCPtTriggerNotLeading->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2266 fhMCPhiTriggerNotLeading = new TH2F ("hMCPhiTriggerNotLeading","MC : trigger #phi, when not leading of primaries",
2267 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2268 fhMCPhiTriggerNotLeading->SetYTitle("#phi (rad)");
2269 fhMCPhiTriggerNotLeading->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2272 fhMCEtaTriggerNotLeading = new TH2F ("hMCEtaTriggerNotLeading","MC : triogger #eta, when not leading of primaries",
2273 nptbins,ptmin,ptmax, netabins,etamin,etamax);
2274 fhMCEtaTriggerNotLeading->SetYTitle("#eta ");
2275 fhMCEtaTriggerNotLeading->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2278 fhMCEtaCharged = new TH2F
2279 ("hMCEtaCharged","MC #eta_{h^{#pm}} vs #it{p}_{T #pm}",
2280 nptbins,ptmin,ptmax,netabins,etamin,etamax);
2281 fhMCEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
2282 fhMCEtaCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
2284 fhMCPhiCharged = new TH2F
2285 ("hMCPhiCharged","#MC phi_{h^{#pm}} vs #it{p}_{T #pm}",
2286 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
2287 fhMCPhiCharged->SetYTitle("MC #phi_{h^{#pm}} (rad)");
2288 fhMCPhiCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
2290 fhMCDeltaPhiDeltaEtaCharged = new TH2F
2291 ("hMCDeltaPhiDeltaEtaCharged","#MC phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
2292 140,-2.,5.,200,-2,2);
2293 fhMCDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
2294 fhMCDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
2296 fhMCDeltaEtaCharged = new TH2F
2297 ("hMCDeltaEtaCharged","MC #eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger} and #it{p}_{T assoc}",
2298 nptbins,ptmin,ptmax,200,-2,2);
2299 fhMCDeltaEtaCharged->SetYTitle("#Delta #eta");
2300 fhMCDeltaEtaCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2302 fhMCDeltaPhiCharged = new TH2F
2303 ("hMCDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
2304 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2305 fhMCDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
2306 fhMCDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2308 fhMCDeltaPhiChargedPt = new TH2F
2309 ("hMCDeltaPhiChargedPt","MC #phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}",
2310 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2311 fhMCDeltaPhiChargedPt->SetYTitle("#Delta #phi (rad)");
2312 fhMCDeltaPhiChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
2315 new TH2F("hMCPtXECharged","#it{x}_{#it{E}} with charged hadrons",
2316 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2317 fhMCPtXECharged->SetYTitle("#it{x}_{#it{E}}");
2318 fhMCPtXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2320 fhMCPtHbpXECharged =
2321 new TH2F("hMCHbpXECharged","MC #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
2322 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2323 fhMCPtHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2324 fhMCPtHbpXECharged->SetXTitle("#it{p}_{T trigger}");
2327 new TH2F("hMCPtZTCharged","#it{z}_{T} with charged hadrons",
2328 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2329 fhMCPtZTCharged->SetYTitle("#it{z}_{T}");
2330 fhMCPtZTCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2332 fhMCPtHbpZTCharged =
2333 new TH2F("hMCHbpZTCharged","MC #xi = ln(1/#it{z}_{T}) with charged hadrons",
2334 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2335 fhMCPtHbpZTCharged->SetYTitle("ln(1/#it{z}_{T})");
2336 fhMCPtHbpZTCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2339 new TH2F("hMCPtTrigPout","AOD MC Pout with triggers",
2340 nptbins,ptmin,ptmax,2*nptbins,-ptmax,ptmax);
2341 fhMCPtTrigPout->SetYTitle("#it{p}_{out} (GeV/#it{c})");
2342 fhMCPtTrigPout->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2344 fhMCPtAssocDeltaPhi =
2345 new TH2F("hMCPtAssocDeltaPhi","AOD MC delta phi with associated charged hadrons",
2346 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2347 fhMCPtAssocDeltaPhi->SetYTitle("#Delta #phi (rad)");
2348 fhMCPtAssocDeltaPhi->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2350 outputContainer->Add(fh2phiTriggerParticle);
2351 outputContainer->Add(fhMCPtTrigger);
2352 outputContainer->Add(fhMCPhiTrigger);
2353 outputContainer->Add(fhMCEtaTrigger);
2355 if(fMakeAbsoluteLeading || fMakeNearSideLeading)
2357 outputContainer->Add(fhMCPtTriggerNotLeading);
2358 outputContainer->Add(fhMCPhiTriggerNotLeading);
2359 outputContainer->Add(fhMCEtaTriggerNotLeading);
2362 outputContainer->Add(fhMCDeltaPhiDeltaEtaCharged);
2363 outputContainer->Add(fhMCPhiCharged) ;
2364 outputContainer->Add(fhMCEtaCharged) ;
2365 outputContainer->Add(fhMCDeltaEtaCharged) ;
2366 outputContainer->Add(fhMCDeltaPhiCharged) ;
2368 outputContainer->Add(fhMCDeltaPhiChargedPt) ;
2369 outputContainer->Add(fhMCPtXECharged) ;
2370 outputContainer->Add(fhMCPtZTCharged) ;
2371 outputContainer->Add(fhMCPtHbpXECharged) ;
2372 outputContainer->Add(fhMCPtHbpZTCharged) ;
2373 outputContainer->Add(fhMCPtTrigPout) ;
2374 outputContainer->Add(fhMCPtAssocDeltaPhi) ;
2379 new TH1F("hMCUePart","MC UE particles distribution vs pt trig",
2380 nptbins,ptmin,ptmax);
2381 fhMCUePart->SetYTitle("#it{dN}^{ch}");
2382 fhMCUePart->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2385 new TH2F(Form("hMCPtXEUeCharged%s",right.Data()),"#it{x}_{#it{E}} with charged hadrons, Underlying Event",
2386 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2387 fhMCPtXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
2388 fhMCPtXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2390 fhMCPtHbpXEUeCharged =
2391 new TH2F(Form("hMCPtHbpXEUeCharged%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, Underlying Event",
2392 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2393 fhMCPtHbpXEUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2394 fhMCPtHbpXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2397 new TH2F(Form("hMCPtZTUeCharged%s",right.Data()),"#it{z}_{T} with charged hadrons, Underlying Event",
2398 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2399 fhMCPtZTUeCharged->SetYTitle("#it{z}_{T}");
2400 fhMCPtZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2402 fhMCPtHbpZTUeCharged =
2403 new TH2F(Form("hMCPtHbpZTUeCharged%s",right.Data()),"#xi = ln(1/#it{z}_{T}) with charged hadrons, Underlying Event",
2404 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2405 fhMCPtHbpZTUeCharged->SetYTitle("ln(1/#it{z}_{T})");
2406 fhMCPtHbpZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2408 outputContainer->Add(fhMCUePart);
2409 outputContainer->Add(fhMCPtXEUeCharged) ;
2410 outputContainer->Add(fhMCPtZTUeCharged) ;
2411 outputContainer->Add(fhMCPtHbpZTUeCharged);
2412 outputContainer->Add(fhMCPtHbpXEUeCharged);
2416 fhMCPtXEUeLeftCharged =
2417 new TH2F("hMCPtXEUeChargedLeft","#it{x}_{#it{E}} with charged hadrons, with UE left side range of trigger particles",
2418 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2419 fhMCPtXEUeLeftCharged->SetYTitle("#it{x}_{#it{E}}");
2420 fhMCPtXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2423 fhMCPtHbpXEUeLeftCharged =
2424 new TH2F("hMCPtHbpXEUeChargedLeft","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, with UE left side range of trigger particles",
2425 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2426 fhMCPtHbpXEUeLeftCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2427 fhMCPtHbpXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2429 fhMCPtZTUeLeftCharged =
2430 new TH2F("hMCPtZTUeChargedLeft","#it{z}_{T} with charged hadrons, with UE left side range of trigger particles",
2431 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2432 fhMCPtZTUeLeftCharged->SetYTitle("#it{z}_{T}");
2433 fhMCPtZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2435 fhMCPtHbpZTUeLeftCharged =
2436 new TH2F("hMCPtHbpZTUeChargedLeft","#xi = ln(1/#it{z}_{T}) with charged hadrons, with UE left side range of trigger particles",
2437 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2438 fhMCPtHbpZTUeLeftCharged->SetYTitle("ln(1/#it{z}_{T})");
2439 fhMCPtHbpZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2441 outputContainer->Add(fhMCPtXEUeLeftCharged) ;
2442 outputContainer->Add(fhMCPtZTUeLeftCharged) ;
2443 outputContainer->Add(fhMCPtHbpXEUeLeftCharged);
2444 outputContainer->Add(fhMCPtHbpZTUeLeftCharged) ;
2447 } //for MC histogram
2451 //create event containers
2453 if(!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForTracksExists()))
2455 Int_t nvz = GetNZvertBin();
2456 Int_t nrp = GetNRPBin();
2457 Int_t nce = GetNCentrBin();
2459 fListMixTrackEvents= new TList*[nvz*nrp*nce] ;
2461 for( Int_t ice = 0 ; ice < nce ; ice++ )
2463 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2465 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2467 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2469 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2470 // ic,iz, irp, bin);
2472 fListMixTrackEvents[bin] = new TList() ;
2473 fListMixTrackEvents[bin]->SetOwner(kFALSE);
2479 fhPtTriggerMixed = new TH1F ("hPtTriggerMixed","#it{p}_{T} distribution of trigger particles, used for mixing", nptbins,ptmin,ptmax);
2480 fhPtTriggerMixed->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2484 fhPtTriggerMixedVzBin = new TH2F ("hPtTriggerMixedVzBin","#it{p}_{T} distribution of trigger particles, used for mixing", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
2485 fhPtTriggerMixedVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2486 fhPtTriggerMixedVzBin->SetYTitle("#it{v}_{#it{z}} bin");
2487 outputContainer->Add(fhPtTriggerMixedVzBin);
2490 fhPtTriggerMixedBin = new TH2F ("hPtTriggerMixedBin","#it{p}_{T} distribution of trigger particles vs mixing bin", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
2491 fhPtTriggerMixedBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2492 fhPtTriggerMixedBin->SetYTitle("Bin");
2494 fhPhiTriggerMixed = new TH2F ("hPhiTriggerMixed","#phi distribution of trigger Particles, used for mixing",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2495 fhPhiTriggerMixed->SetYTitle("#phi (rad)");
2497 fhEtaTriggerMixed = new TH2F ("hEtaTriggerMixed","#eta distribution of trigger, used for mixing",nptbins,ptmin,ptmax, netabins,etamin,etamax);
2498 fhEtaTriggerMixed->SetYTitle("#eta ");
2500 outputContainer->Add(fhPtTriggerMixed);
2501 outputContainer->Add(fhPtTriggerMixedBin);
2502 outputContainer->Add(fhPhiTriggerMixed);
2503 outputContainer->Add(fhEtaTriggerMixed);
2505 // Fill the cluster pool only in isolation analysis or if requested
2506 if( neutralMix && (!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForCaloExists())))
2508 Int_t nvz = GetNZvertBin();
2509 Int_t nrp = GetNRPBin();
2510 Int_t nce = GetNCentrBin();
2512 fListMixCaloEvents= new TList*[nvz*nrp*nce] ;
2514 for( Int_t ice = 0 ; ice < nce ; ice++ )
2516 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2518 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2520 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2522 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2523 // ic,iz, irp, bin);
2525 fListMixCaloEvents[bin] = new TList() ;
2526 fListMixCaloEvents[bin]->SetOwner(kFALSE);
2532 //Init the list in the reader if not done previously
2533 if(fUseMixStoredInReader)
2535 if( !GetReader()->ListWithMixedEventsForTracksExists() )
2536 GetReader()->SetListWithMixedEventsForTracks(fListMixTrackEvents);
2538 if( !GetReader()->ListWithMixedEventsForCaloExists() )
2539 GetReader()->SetListWithMixedEventsForCalo (fListMixCaloEvents );
2542 fhEventBin=new TH1I("hEventBin","Number of triggers per bin(cen,vz,rp)",
2543 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2544 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2545 fhEventBin->SetXTitle("event bin");
2546 outputContainer->Add(fhEventBin) ;
2548 fhEventMixBin=new TH1I("hEventMixBin","Number of triggers mixed per event bin(cen,vz,rp)",
2549 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2550 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2551 fhEventMixBin->SetXTitle("event bin");
2552 outputContainer->Add(fhEventMixBin) ;
2554 fhEventMBBin=new TH1I("hEventMBBin","Number of min bias events per bin(cen,vz,rp)",
2555 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2556 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2557 fhEventMBBin->SetXTitle("event bin");
2558 outputContainer->Add(fhEventMBBin) ;
2560 fhNtracksMB=new TH2F("hNtracksMBEvent","Number of filtered tracks in MB event per event bin",ntrbins,trmin,trmax,
2561 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2562 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2563 fhNtracksMB->SetYTitle("event bin");
2564 fhNtracksMB->SetXTitle("#it{N}_{track}");
2565 outputContainer->Add(fhNtracksMB);
2569 fhNclustersMB=new TH2F("hNclustersMBEvent","Number of filtered clusters in MB events per event bin",nclbins,clmin,clmax,
2570 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2571 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2572 fhNclustersMB->SetYTitle("event bin");
2573 fhNclustersMB->SetXTitle("#it{N}_{cluster}");
2574 outputContainer->Add(fhNclustersMB);
2577 fhMixDeltaPhiCharged = new TH2F
2578 ("hMixDeltaPhiCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
2579 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2580 fhMixDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
2581 fhMixDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2582 outputContainer->Add(fhMixDeltaPhiCharged);
2584 fhMixDeltaPhiDeltaEtaCharged = new TH2F
2585 ("hMixDeltaPhiDeltaEtaCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
2586 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2587 fhMixDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
2588 fhMixDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
2589 outputContainer->Add(fhMixDeltaPhiDeltaEtaCharged);
2592 new TH2F("hMixXECharged","Mixed event : #it{x}_{#it{E}} for charged tracks",
2593 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2594 fhMixXECharged->SetYTitle("#it{x}_{#it{E}}");
2595 fhMixXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2596 outputContainer->Add(fhMixXECharged);
2599 new TH2F("hMixXEUeCharged","Mixed event : #it{x}_{#it{E}} for charged tracks in Ue region",
2600 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2601 fhMixXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
2602 fhMixXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2603 outputContainer->Add(fhMixXEUeCharged);
2606 new TH2F("hMixHbpXECharged","mixed event : #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
2607 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2608 fhMixHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2609 fhMixHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2610 outputContainer->Add(fhMixHbpXECharged);
2612 fhMixDeltaPhiChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2613 fhMixDeltaPhiChargedAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
2614 fhMixDeltaPhiChargedAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
2615 fhMixDeltaPhiDeltaEtaChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2617 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2619 for(Int_t z = 0 ; z < nz ; z++)
2625 sz = Form("_vz%d",z);
2626 tz = Form(", #it{v}_{#it{z}} bin %d",z);
2629 //printf("MIX : iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
2631 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiDeltaEtaChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2632 Form("Mixed event #Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2633 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2634 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
2635 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetYTitle("#Delta #eta");
2637 outputContainer->Add(fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]);
2639 fhMixDeltaPhiChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2640 Form("Mixed event #Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2641 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2642 fhMixDeltaPhiChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2643 fhMixDeltaPhiChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
2645 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBin[bin]);
2647 if(fFillEtaGapsHisto)
2649 fhMixDeltaPhiChargedAssocPtBinDEta08[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0.8ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2650 Form("Mixed event #Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, for #Delta #eta > 0.8", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2651 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2652 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2653 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
2655 fhMixDeltaPhiChargedAssocPtBinDEta0[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2656 Form("Mixed event #Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, for #Delta #eta = 0", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2657 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2658 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2659 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
2661 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta08[bin]);
2662 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta0[bin]);
2668 return outputContainer;
2672 //_________________________________________________________________________________________________
2673 Bool_t AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum(AliAODPWG4Particle* trigger,
2674 TLorentzVector & mom1,
2675 TLorentzVector & mom2)
2677 // Get the momentum of the pi0/eta assigned decay photons
2678 // In case of pi0/eta trigger, we may want to check their decay correlation,
2679 // get their decay children
2681 Int_t indexPhoton1 = trigger->GetCaloLabel(0);
2682 Int_t indexPhoton2 = trigger->GetCaloLabel(1);
2684 if(indexPhoton1!=-1 || indexPhoton2!=-1) return kFALSE;
2687 printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - indexPhoton1 = %d, indexPhoton2 = %d \n", indexPhoton1, indexPhoton2);
2689 TObjArray * clusters = 0x0 ;
2690 if(trigger->GetDetector()=="EMCAL") clusters = GetEMCALClusters() ;
2691 else clusters = GetPHOSClusters() ;
2693 for(Int_t iclus = 0; iclus < clusters->GetEntriesFast(); iclus++)
2695 AliVCluster * photon = (AliVCluster*) (clusters->At(iclus));
2697 if(photon->GetID()==indexPhoton1) photon->GetMomentum(mom1,GetVertex(0)) ;
2698 if(photon->GetID()==indexPhoton2) photon->GetMomentum(mom1,GetVertex(0)) ;
2700 if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - Photon1 = %f, Photon2 = %f \n", mom1.Pt(), mom2.Pt());
2708 //_____________________________________________________________
2709 Int_t AliAnaParticleHadronCorrelation::GetMCTagHistogramIndex(Int_t mcTag)
2711 // Index of MC histograms depending on MC origin
2713 if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPrompt) ||
2714 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCFragmentation)) return 0;
2715 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0)) return 1;
2716 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0Decay)) return 2;
2717 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEtaDecay)) return 3;
2718 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCOtherDecay)) return 4;
2719 else if(!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron)) return 5;
2724 //_________________________________________
2725 void AliAnaParticleHadronCorrelation::Init()
2730 if(!GetReader()->IsCTSSwitchedOn())
2731 AliFatal("STOP!: You want to use CTS tracks in analysis but not read!! \n!!Check the configuration file!!\n");
2734 //____________________________________________________
2735 void AliAnaParticleHadronCorrelation::InitParameters()
2738 //Initialize the parameters of the analysis.
2739 SetInputAODName("Particle");
2740 SetAODObjArrayName("Hadrons");
2741 AddToHistogramsName("AnaHadronCorr_");
2743 SetPtCutRange(0.,300);
2744 fDeltaPhiMinCut = TMath::DegToRad()*120.;
2745 fDeltaPhiMaxCut = TMath::DegToRad()*240. ;
2746 fSelectIsolated = kFALSE;
2747 fMakeSeveralUE = kFALSE;
2748 fUeDeltaPhiMinCut = TMath::DegToRad()*60.;
2749 fUeDeltaPhiMaxCut = TMath::DegToRad()*120 ;
2751 fNeutralCorr = kFALSE ;
2752 fPi0Trigger = kFALSE ;
2753 fDecayTrigger = kFALSE ;
2754 fHMPIDCorrelation = kFALSE ;
2756 fMakeAbsoluteLeading = kTRUE;
2757 fMakeNearSideLeading = kFALSE;
2760 fAssocPtBinLimit[0] = 0.2 ;
2761 fAssocPtBinLimit[1] = 0.5 ;
2762 fAssocPtBinLimit[2] = 1.0 ;
2763 fAssocPtBinLimit[3] = 2.0 ;
2764 fAssocPtBinLimit[4] = 3.0 ;
2765 fAssocPtBinLimit[5] = 4.0 ;
2766 fAssocPtBinLimit[6] = 5.0 ;
2767 fAssocPtBinLimit[7] = 6.0 ;
2768 fAssocPtBinLimit[8] = 7.0 ;
2769 fAssocPtBinLimit[9] = 8.0 ;
2770 fAssocPtBinLimit[10] = 9.0 ;
2771 fAssocPtBinLimit[11] = 10.0 ;
2772 fAssocPtBinLimit[12] = 12.0 ;
2773 fAssocPtBinLimit[13] = 14.0 ;
2774 fAssocPtBinLimit[14] = 16.0 ;
2775 fAssocPtBinLimit[15] = 20.0 ;
2776 fAssocPtBinLimit[16] = 30.0 ;
2777 fAssocPtBinLimit[17] = 40.0 ;
2778 fAssocPtBinLimit[18] = 50.0 ;
2779 fAssocPtBinLimit[19] = 200.0 ;
2781 fUseMixStoredInReader = kTRUE;
2786 fSelectLeadingHadronAngle = kFALSE;
2787 fMinLeadHadPhi = 150*TMath::DegToRad();
2788 fMaxLeadHadPhi = 210*TMath::DegToRad();
2791 fMaxLeadHadPt = 100;
2795 //_________________________________________________________________________
2796 Bool_t AliAnaParticleHadronCorrelation::IsTriggerTheEventLeadingParticle()
2798 // Check if the what of the selected triggers is leading particle comparing
2799 // with all the triggers, all the tracks or all the clusters (if requested for the clusters).
2801 Double_t ptTrig = GetMinPt();
2802 Double_t phiTrig = 0 ;
2803 fLeadingTriggerIndex =-1 ;
2805 AliAODPWG4ParticleCorrelation* pLeading = 0;
2807 // Loop on stored AOD particles, find leading trigger on the selected list, with at least min pT.
2809 for(Int_t iaod = 0; iaod < GetInputAODBranch()->GetEntriesFast() ; iaod++)
2811 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
2812 particle->SetLeadingParticle(kFALSE); // set it later
2814 // Vertex cut in case of mixing
2815 Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0));
2816 if(check == 0) continue;
2817 if(check == -1) return kFALSE; // not sure if it is correct.
2819 // find the leading particles with highest momentum
2820 if (particle->Pt() > ptTrig)
2822 ptTrig = particle->Pt() ;
2823 phiTrig = particle->Phi();
2825 pLeading = particle ;
2827 }// finish search of leading trigger particle on the AOD branch.
2829 if(index < 0) return kFALSE;
2831 //printf("AOD leading pT %2.2f, ID %d\n", pLeading->Pt(),pLeading->GetCaloLabel(0));
2833 if(phiTrig < 0 ) phiTrig += TMath::TwoPi();
2835 // Compare if it is the leading of all tracks
2838 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
2840 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
2842 if(track->GetID() == pLeading->GetTrackLabel(0) || track->GetID() == pLeading->GetTrackLabel(1) ||
2843 track->GetID() == pLeading->GetTrackLabel(2) || track->GetID() == pLeading->GetTrackLabel(3) ) continue ;
2845 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
2846 p3.SetXYZ(mom[0],mom[1],mom[2]);
2847 Float_t pt = p3.Pt();
2848 Float_t phi = p3.Phi() ;
2849 if(phi < 0) phi+=TMath::TwoPi();
2851 //jump out this event if near side associated particle pt larger than trigger
2852 if (fMakeNearSideLeading)
2854 if(pt > ptTrig && TMath::Abs(phi-phiTrig) < TMath::PiOver2()) return kFALSE;
2856 //jump out this event if there is any other particle with pt larger than trigger
2859 if(pt > ptTrig) return kFALSE ;
2863 // Compare if it is leading of all calorimeter clusters
2865 if(fCheckLeadingWithNeutralClusters)
2867 // Select the calorimeter cluster list
2868 TObjArray * nePl = 0x0;
2869 if (pLeading->GetDetector() == "PHOS" )
2870 nePl = GetPHOSClusters();
2872 nePl = GetEMCALClusters();
2874 if(!nePl) return kTRUE; // Do the selection just with the tracks if no calorimeter is available.
2877 for(Int_t ipr = 0;ipr < nePl->GetEntriesFast() ; ipr ++ )
2879 AliVCluster * cluster = (AliVCluster *) (nePl->At(ipr)) ;
2881 if(cluster->GetID() == pLeading->GetCaloLabel(0) || cluster->GetID() == pLeading->GetCaloLabel(1) ) continue ;
2883 cluster->GetMomentum(lv,GetVertex(0));
2885 Float_t pt = lv.Pt();
2886 Float_t phi = lv.Phi() ;
2887 if(phi < 0) phi+=TMath::TwoPi();
2889 if(IsTrackMatched(cluster,GetReader()->GetInputEvent())) continue ; // avoid charged clusters, already covered by tracks, or cluster merging with track.
2891 //jump out this event if near side associated particle pt larger than trigger
2892 // not really needed for calorimeter, unless DCal is included
2893 if (fMakeNearSideLeading)
2895 if(pt > ptTrig && TMath::Abs(phi-phiTrig) < TMath::PiOver2()) return kFALSE ;
2897 //jump out this event if there is any other particle with pt larger than trigger
2900 if(pt > ptTrig) return kFALSE ;
2903 } // check neutral clusters
2905 fLeadingTriggerIndex = index ;
2906 pLeading->SetLeadingParticle(kTRUE);
2908 if( GetDebug() > 1 ) printf("\t particle AOD with index %d is leading with pT %2.2f\n", fLeadingTriggerIndex, pLeading->Pt());
2914 //_________________________________________________________________
2915 void AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms()
2917 //Particle-Hadron Correlation Analysis, fill histograms
2919 if(!GetInputAODBranch())
2921 AliFatal(Form("No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data()));
2922 return ; // coverity
2925 Int_t naod = GetInputAODBranch()->GetEntriesFast();
2929 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - No particle AOD found! \n");
2931 return ; // no trigger particles found.
2936 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Begin hadron correlation analysis, fill histograms \n");
2937 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In particle branch aod entries %d\n", naod);
2938 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In CTS aod entries %d\n", GetCTSTracks()->GetEntriesFast());
2941 //------------------------------------------------------
2942 // Find leading trigger if analysis request only leading,
2943 // if there is no leading trigger, then skip the event
2946 if( fMakeAbsoluteLeading || fMakeNearSideLeading )
2948 Bool_t leading = IsTriggerTheEventLeadingParticle();
2951 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - AOD Leading trigger? %d, with index %d\n",leading,fLeadingTriggerIndex);
2955 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Leading was requested and not found\n");
2960 // Select only the leading in the trigger AOD loop
2962 iaod = fLeadingTriggerIndex;
2966 //------------------------------------------------------
2967 // Get event multiplicity and bins
2969 Float_t cen = GetEventCentrality();
2970 Float_t ep = GetEventPlaneAngle();
2971 if(fFillHighMultHistograms) fhTriggerEventPlaneCentrality->Fill(cen,ep);
2973 Int_t mixEventBin = GetEventMixBin();
2974 Int_t vzbin = GetEventVzBin();
2976 //------------------------------------------------------
2977 // Loop on trigger AOD
2979 for( iaod = 0; iaod < naod; iaod++ )
2981 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
2984 // Trigger particle selection criteria:
2986 Float_t pt = particle->Pt();
2988 if(pt < GetMinPt() || pt > GetMaxPt() ) continue ;
2990 fhPtTriggerInput->Fill(pt);
2993 // check if it was a calorimeter cluster
2994 // and if the shower shape cut was requested apply it.
2995 // Not needed if already done at the particle identification level,
2996 // but for isolation studies, it is preferred not to remove so we do it here
2998 Int_t clID1 = particle->GetCaloLabel(0) ;
2999 Int_t clID2 = particle->GetCaloLabel(1) ; // for photon clusters should not be set.
3000 if( GetDebug() > 1 ) printf("%s Trigger : id1 %d, id2 %d, min %f, max %f, det %s\n",
3001 GetInputAODName().Data(),clID1,clID2,fM02MinCut,fM02MaxCut,(particle->GetDetector()).Data());
3003 if(clID1 > 0 && clID2 < 0 && fM02MaxCut > 0 && fM02MinCut > 0)
3006 TObjArray* clusters = 0x0;
3007 if (particle->GetDetector() == "EMCAL") clusters = GetEMCALClusters();
3008 else if(particle->GetDetector() == "PHOS" ) clusters = GetPHOSClusters();
3012 AliVCluster *cluster = FindCluster(clusters,clID1,iclus);
3013 Float_t m02 = cluster->GetM02();
3014 if(m02 > fM02MaxCut || m02 < fM02MinCut) continue ;
3017 fhPtTriggerSSCut->Fill(pt);
3021 // Check if the particle is isolated or if we want to take the isolation into account
3022 // This bool is set in AliAnaParticleIsolation
3026 if( !particle->IsIsolated() ) continue;
3027 fhPtTriggerIsoCut->Fill(pt);
3031 // Check if trigger is in fiducial region
3033 if(IsFiducialCutOn())
3035 Bool_t in = GetFiducialCut()->IsInFiducialCut(*particle->Momentum(),particle->GetDetector()) ;
3036 if(! in ) continue ;
3039 fhPtTriggerFidCut->Fill(pt);
3041 //---------------------------------------
3044 // Find the leading hadron in the opposite hemisphere to the triggeer
3045 // and accept the trigger if leading is in defined window.
3046 Bool_t okLeadHad = kTRUE;
3047 if(fSelectLeadingHadronAngle)
3048 okLeadHad = FindLeadingOppositeHadronInWindow(particle);
3049 if(!okLeadHad) continue;
3052 // Charged particles correlation
3054 MakeChargedCorrelation(particle);
3058 MakeMCChargedCorrelation(particle->GetLabel());
3060 // Do own mixed event with charged,
3061 // add event and remove previous or fill the mixed histograms
3063 MakeChargedMixCorrelation(particle);
3066 // Neutral particles correlation
3069 MakeNeutralCorrelation(particle);
3071 //----------------------------------------------------------------
3072 // Fill trigger pT related histograms if not absolute leading
3075 // pT of the trigger, vs trigger origin if MC
3077 fhPtTrigger->Fill(pt);
3080 Int_t mcIndex = GetMCTagHistogramIndex(particle->GetTag());
3081 fhPtTriggerMC[mcIndex]->Fill(pt);
3085 // Acceptance of the trigger
3087 Float_t phi = particle->Phi();
3088 if( phi<0 ) phi+=TMath::TwoPi();
3089 fhPhiTrigger->Fill(pt, phi);
3091 fhEtaTrigger->Fill(pt, particle->Eta());
3092 //printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Trigger particle : pt %f, eta %f, phi %f\n",particle->Pt(),particle->Eta(),phi);
3094 //----------------------------------
3095 // Trigger particle pT vs event bins
3097 fhPtTriggerBin->Fill(pt,mixEventBin);
3099 fhPtTriggerVzBin->Fill(pt,vzbin);
3101 if(fFillHighMultHistograms)
3103 fhPtTriggerCentrality->Fill(pt,cen);
3104 fhPtTriggerEventPlane->Fill(pt,ep);
3107 //----------------------------------
3108 // Trigger particle pT vs pile-up
3110 if(fFillPileUpHistograms)
3112 Int_t vtxBC = GetReader()->GetVertexBC();
3113 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA) fhPtTriggerVtxBC0->Fill(pt);
3115 if(GetReader()->IsPileUpFromSPD()) fhPtTriggerPileUp[0]->Fill(pt);
3116 if(GetReader()->IsPileUpFromEMCal()) fhPtTriggerPileUp[1]->Fill(pt);
3117 if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtTriggerPileUp[2]->Fill(pt);
3118 if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtTriggerPileUp[3]->Fill(pt);
3119 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtTriggerPileUp[4]->Fill(pt);
3120 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtTriggerPileUp[5]->Fill(pt);
3121 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtTriggerPileUp[6]->Fill(pt);
3123 } // AOD trigger loop
3125 //Reinit for next event
3126 fLeadingTriggerIndex = -1;
3128 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - End fill histograms \n");
3131 //_______________________________________________________________________________________________________
3132 void AliAnaParticleHadronCorrelation::MakeChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
3134 // Charged Hadron Correlation Analysis
3136 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Make trigger particle - charged hadron correlation \n");
3138 Float_t phiTrig = aodParticle->Phi();
3139 Float_t etaTrig = aodParticle->Eta();
3140 Float_t ptTrig = aodParticle->Pt();
3141 Bool_t decay = aodParticle->IsTagged();
3142 Int_t mcTag = aodParticle->GetTag();
3143 Double_t bz = GetReader()->GetInputEvent()->GetMagneticField();
3145 Float_t pt = -100. ;
3146 Float_t phi = -100. ;
3147 Float_t eta = -100. ;
3148 Float_t deltaPhi = -100. ;
3151 TLorentzVector photonMom ;
3152 TObjArray * reftracks = 0x0;
3155 // Mixed event settings
3156 Int_t evtIndex11 = -1 ; // cluster trigger or pi0 trigger
3157 Int_t evtIndex12 = -1 ; // pi0 trigger
3158 Int_t evtIndex13 = -1 ; // charged trigger
3160 if (GetMixedEvent())
3162 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
3163 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
3164 evtIndex13 = GetMixedEvent()->EventIndex(aodParticle->GetTrackLabel(0)) ;
3168 // In case of pi0/eta trigger, we may want to check their decay correlation,
3169 // get their decay children
3171 TLorentzVector decayMom1;
3172 TLorentzVector decayMom2;
3173 Bool_t decayFound = kFALSE;
3176 decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
3179 fhPtPi0DecayRatio->Fill(ptTrig, decayMom1.Pt()/ptTrig);
3180 fhPtPi0DecayRatio->Fill(ptTrig, decayMom2.Pt()/ptTrig);
3184 //-----------------------------------------------------------------------
3185 // Track loop, select tracks with good pt, phi and fill AODs or histograms
3186 //-----------------------------------------------------------------------
3188 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
3190 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
3192 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
3193 p3.SetXYZ(mom[0],mom[1],mom[2]);
3197 if(phi < 0) phi+=TMath::TwoPi();
3199 //Select only hadrons in pt range
3200 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
3202 //remove trigger itself for correlation when use charged triggers
3203 if( track->GetID() == aodParticle->GetTrackLabel(0) || track->GetID() == aodParticle->GetTrackLabel(1) ||
3204 track->GetID() == aodParticle->GetTrackLabel(2) || track->GetID() == aodParticle->GetTrackLabel(3) )
3207 //Only for mixed event frame
3208 Int_t evtIndex2 = 0 ;
3209 if (GetMixedEvent())
3211 evtIndex2 = GetMixedEvent()->EventIndex(track->GetID()) ;
3212 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 || evtIndex13 == evtIndex2 ) // photon and track from different events
3215 if (TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut())
3220 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
3222 // ------------------------------
3223 // Track type bin or bits setting
3227 // * Set the pt associated bin for the defined bins *
3229 Int_t assocBin = -1;
3230 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3232 if(pt > fAssocPtBinLimit[i] && pt < fAssocPtBinLimit[i+1]) assocBin= i;
3236 // * Assign to the histogram array a bin corresponding
3237 // to a combination of pTa and vz bins *
3244 nz = GetNZvertBin();
3245 vz = GetEventVzBin();
3248 Int_t bin = assocBin*nz+vz;
3250 //printf("assoc Bin = %d, vZ bin = %d, bin = %d \n", assocBin,GetEventVzBin(),bin);
3253 // * Get the status of the TOF bit *
3255 ULong_t status = track->GetStatus();
3256 Bool_t okTOF = ( (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ) ;
3257 //Double32_t tof = track->GetTOFsignal()*1e-3;
3258 Int_t trackBC = track->GetTOFBunchCrossing(bz);
3261 if (okTOF && trackBC!=0) outTOF = 1;
3262 else if(okTOF && trackBC==0) outTOF = 0;
3264 // Track multiplicity or cent bin
3265 Int_t cenbin = GetEventCentralityBin(); // combine with vz assoc bin???
3271 // Azimuthal Angle histograms
3273 // Calculate deltaPhi shift
3274 deltaPhi = phiTrig-phi;
3275 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3276 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3278 FillChargedAngularCorrelationHistograms(pt, ptTrig, bin, phi, phiTrig, deltaPhi,
3279 eta, etaTrig, decay, track->GetHMPIDsignal(),
3280 outTOF, cenbin, mcTag);
3282 // Imbalance zT/xE/pOut histograms
3286 // Delta phi cut for momentum imbalance correlation
3288 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
3289 FillChargedMomentumImbalanceHistograms(ptTrig, pt, deltaPhi, cenbin, track->Charge(),
3290 assocBin, decay, outTOF, mcTag);
3293 // Underlying event, right side, default case
3295 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3296 FillChargedUnderlyingEventHistograms(ptTrig, pt, deltaPhi, cenbin, outTOF);
3299 // Several UE calculation, in different perpendicular regions, up to 6:
3300 // left, right, upper-left, lower left, upper-right, lower-right
3303 FillChargedUnderlyingEventSidesHistograms(ptTrig,pt,deltaPhi);
3306 if(fPi0Trigger && decayFound)
3307 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2, kTRUE) ;
3310 // Add track reference to array
3312 if(fFillAODWithReferences)
3317 reftracks = new TObjArray(0);
3318 TString trackname = Form("%sTracks", GetAODObjArrayName().Data());
3319 reftracks->SetName(trackname.Data());
3320 reftracks->SetOwner(kFALSE);
3323 reftracks->Add(track);
3324 }// reference track to AOD
3327 //Fill AOD with reference tracks, if not filling histograms
3328 if(fFillAODWithReferences && reftracks)
3330 aodParticle->AddObjArray(reftracks);
3335 //_________________________________________________________________________________________________________
3336 void AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
3338 // Mix current trigger with tracks in another MB event
3340 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Make trigger particle - charged hadron mixed event correlation \n");
3342 if(GetMixedEvent()) return; // This is not the mixed event from general mixing frame
3344 // Get the event with similar caracteristics
3345 //printf("MakeChargedMixCorrelation for %s\n",GetInputAODName().Data());
3347 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
3349 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
3351 if(!inputHandler) return;
3353 if(!(inputHandler->IsEventSelected( ) & GetReader()->GetEventTriggerMask())) return;
3355 // Get the pool, check if it exits
3356 Int_t eventBin = GetEventMixBin();
3358 //Check that the bin exists, if not (bad determination of RP, ntrality or vz bin) do nothing
3359 if(eventBin < 0) return;
3361 fhEventBin->Fill(eventBin);
3363 // get neutral clusters pool?
3364 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
3365 Bool_t neutralMix = fFillNeutralEventMixPool || isoCase ;
3368 TList * poolCalo = 0;
3369 if(fUseMixStoredInReader)
3371 pool = GetReader()->GetListWithMixedEventsForTracks(eventBin);
3372 if(neutralMix) poolCalo = GetReader()->GetListWithMixedEventsForCalo (eventBin);
3376 pool = fListMixTrackEvents[eventBin];
3377 if(neutralMix) poolCalo = fListMixCaloEvents [eventBin];
3382 if( neutralMix && !poolCalo )
3383 printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Careful, cluster pool not available\n");
3385 Double_t ptTrig = aodParticle->Pt();
3386 Double_t etaTrig = aodParticle->Eta();
3387 Double_t phiTrig = aodParticle->Phi();
3388 if(phiTrig < 0.) phiTrig+=TMath::TwoPi();
3391 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Pool bin %d size %d, trigger trigger pt=%f, phi=%f, eta=%f\n",
3392 eventBin,pool->GetSize(), ptTrig,phiTrig,etaTrig);
3394 Double_t ptAssoc = -999.;
3395 Double_t phiAssoc = -999.;
3396 Double_t etaAssoc = -999.;
3397 Double_t deltaPhi = -999.;
3398 Double_t deltaEta = -999.;
3399 Double_t xE = -999.;
3400 Double_t hbpXE = -999.;
3402 // Start from first event in pool except if in this same event the pool was filled
3404 if(GetReader()->GetLastTracksMixedEvent() == GetEventNumber()) ev0 = 1;
3406 for(Int_t ev=ev0; ev < pool->GetSize(); ev++)
3409 // Recover the lists of tracks or clusters
3411 TObjArray* bgTracks = static_cast<TObjArray*>(pool->At(ev));
3412 TObjArray* bgCalo = 0;
3414 // Recover the clusters list if requested
3415 if( neutralMix && poolCalo )
3417 if(pool->GetSize()!=poolCalo->GetSize())
3418 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Different size of calo and track pools\n");
3420 bgCalo = static_cast<TObjArray*>(poolCalo->At(ev));
3423 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Event %d in calo pool not available?\n",ev);
3427 // Isolate the trigger in the mixed event with mixed tracks and clusters
3429 if( OnlyIsolated() )
3431 Int_t n=0; Int_t nfrac = 0; Bool_t isolated = kFALSE; Float_t coneptsum = 0;
3432 GetIsolationCut()->MakeIsolationCut(bgTracks,bgCalo,
3433 GetReader(), GetCaloPID(),
3434 kFALSE, aodParticle, "",
3435 n,nfrac,coneptsum, isolated);
3437 //printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Isolated? %d - cone %f, ptthres %f",
3438 // isolated,GetIsolationCut()->GetConeSize(),GetIsolationCut()->GetPtThreshold());
3439 //if(bgTracks)printf(" - n track %d", bgTracks->GetEntriesFast());
3442 if(!isolated) continue ;
3446 // Check if the trigger is leading of mixed event
3448 Int_t nTracks=bgTracks->GetEntriesFast();
3450 if(fMakeNearSideLeading || fMakeAbsoluteLeading)
3452 Bool_t leading = kTRUE;
3453 for(Int_t jlead = 0;jlead < nTracks; jlead++ )
3455 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(jlead) ;
3457 ptAssoc = track->Pt();
3458 phiAssoc = track->Phi() ;
3459 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3461 if (fMakeNearSideLeading)
3463 if(ptAssoc > ptTrig && TMath::Abs(phiAssoc-phiTrig) < TMath::PiOver2())
3469 //jump out this event if there is any other particle with pt larger than trigger
3470 else if(fMakeAbsoluteLeading)
3472 if(ptAssoc > ptTrig)
3480 if( !neutralMix && fCheckLeadingWithNeutralClusters )
3481 printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Leading of clusters requested but no clusters in mixed event\n");
3483 if(neutralMix && fCheckLeadingWithNeutralClusters && bgCalo)
3485 Int_t nClusters=bgCalo->GetEntriesFast();
3486 TLorentzVector mom ;
3487 for(Int_t jlead = 0;jlead <nClusters; jlead++ )
3489 AliAODPWG4Particle *cluster= (AliAODPWG4Particle*) bgCalo->At(jlead) ;
3491 ptAssoc = cluster->Pt();
3492 phiAssoc = cluster->Phi() ;
3493 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3495 if (fMakeNearSideLeading)
3497 if(ptAssoc > ptTrig && TMath::Abs(phiAssoc-phiTrig) < TMath::PiOver2())
3503 //jump out this event if there is any other particle with pt larger than trigger
3504 else if(fMakeAbsoluteLeading)
3506 if(ptAssoc > ptTrig)
3515 if(!leading) continue; // not leading, check the next event in pool
3519 // Fill histograms for selected triggers
3522 fhEventMixBin->Fill(eventBin);
3524 //printf("\t Read Pool event %d, nTracks %d\n",ev,nTracks);
3526 fhPtTriggerMixed ->Fill(ptTrig);
3527 fhPhiTriggerMixed ->Fill(ptTrig, phiTrig);
3528 fhEtaTriggerMixed ->Fill(ptTrig, etaTrig);
3529 fhPtTriggerMixedBin->Fill(ptTrig,eventBin);
3530 if(fCorrelVzBin)fhPtTriggerMixedVzBin->Fill(ptTrig, GetEventVzBin());
3533 // Correlation histograms
3535 for(Int_t j1 = 0;j1 <nTracks; j1++ )
3537 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(j1) ;
3539 if(!track) continue;
3541 ptAssoc = track->Pt();
3542 etaAssoc = track->Eta();
3543 phiAssoc = track->Phi() ;
3544 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3546 deltaPhi = phiTrig-phiAssoc;
3547 if(deltaPhi < -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3548 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3549 deltaEta = etaTrig-etaAssoc;
3552 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation(): deltaPhi= %f, deltaEta=%f\n",deltaPhi, deltaEta);
3554 // Angular correlation
3555 fhMixDeltaPhiCharged ->Fill(ptTrig, deltaPhi);
3556 fhMixDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
3558 // Momentum imbalance
3559 xE = -ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3560 //if(xE <0.)xE =-xE;
3561 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3563 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
3565 fhMixXECharged->Fill(ptTrig,xE);
3566 if(xE > 0 ) fhMixHbpXECharged->Fill(ptTrig,hbpXE);
3570 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3572 //Underlying event region
3573 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
3574 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
3576 if(uexE < 0.) uexE = -uexE;
3578 fhMixXEUeCharged->Fill(ptTrig,uexE);
3581 // Set the pt associated bin for the defined bins
3582 Int_t assocBin = -1;
3583 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3585 if(ptAssoc > fAssocPtBinLimit[i] && ptAssoc < fAssocPtBinLimit[i+1]) assocBin= i;
3589 // Assign to the histogram array a bin corresponding to a combination of pTa and vz bins
3596 nz = GetNZvertBin();
3597 vz = GetEventVzBin();
3600 Int_t bin = assocBin*nz+vz;
3602 if(bin < 0) continue ; // this pt bin was not considered
3604 fhMixDeltaPhiChargedAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
3605 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->Fill(deltaPhi, deltaEta);
3607 if(fFillEtaGapsHisto)
3609 if(TMath::Abs(deltaEta) > 0.8)
3610 fhMixDeltaPhiChargedAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
3611 if(TMath::Abs(deltaEta) < 0.01)
3612 fhMixDeltaPhiChargedAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
3616 } // mixed event loop
3620 //_______________________________________________________________________________________________________
3621 void AliAnaParticleHadronCorrelation::MakeNeutralCorrelation(AliAODPWG4ParticleCorrelation * aodParticle)
3623 // Neutral Pion Correlation Analysis
3625 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); // For the future, foresee more possible pi0 lists
3626 if(!pi0list) return ;
3628 Int_t npi0 = pi0list->GetEntriesFast();
3629 if(npi0 == 0) return ;
3632 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Particle - pi0 correlation, %d pi0's\n",npi0);
3634 Int_t evtIndex11 = 0 ;
3635 Int_t evtIndex12 = 0 ;
3636 if (GetMixedEvent())
3638 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
3639 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
3642 Float_t pt = -100. ;
3643 Float_t zT = -100. ;
3644 Float_t phi = -100. ;
3645 Float_t eta = -100. ;
3646 Float_t xE = -100. ;
3647 Float_t hbpXE= -100. ;
3648 Float_t hbpZT= -100. ;
3650 Float_t ptTrig = aodParticle->Pt();
3651 Float_t phiTrig = aodParticle->Phi();
3652 Float_t etaTrig = aodParticle->Eta();
3653 Float_t deltaPhi= -100. ;
3654 Float_t deltaEta= -100. ;
3656 TLorentzVector photonMom ;
3658 // In case of pi0/eta trigger, we may want to check their decay correlation,
3659 // get their decay children
3660 TLorentzVector decayMom1;
3661 TLorentzVector decayMom2;
3662 Bool_t decayFound = kFALSE;
3663 if(fPi0Trigger) decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
3665 TObjArray * refpi0 = 0x0;
3668 //Loop on stored AOD pi0
3670 for(Int_t iaod = 0; iaod < npi0 ; iaod++)
3672 AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (pi0list->At(iaod));
3674 Int_t evtIndex2 = 0 ;
3675 Int_t evtIndex3 = 0 ;
3676 if (GetMixedEvent())
3678 evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(0)) ;
3679 evtIndex3 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(1)) ;
3681 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 ||
3682 evtIndex11 == evtIndex3 || evtIndex12 == evtIndex3) // trigger and pi0 are not from different events
3688 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
3690 //remove trigger itself for correlation when use charged triggers
3691 if(aodParticle->GetCaloLabel(0) >= 0 &&
3692 (pi0->GetCaloLabel(0) == aodParticle->GetCaloLabel(0) || pi0->GetCaloLabel(1) == aodParticle->GetCaloLabel(0))) continue ;
3694 if( aodParticle->GetCaloLabel(1) >= 0 &&
3695 (pi0->GetCaloLabel(0) == aodParticle->GetCaloLabel(1) || pi0->GetCaloLabel(1) == aodParticle->GetCaloLabel(1))) continue ;
3698 // Angular correlations
3702 deltaEta = etaTrig-eta;
3703 deltaPhi = phiTrig-phi;
3704 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3705 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3707 fhEtaNeutral ->Fill(pt , eta );
3708 fhPhiNeutral ->Fill(pt , phi );
3709 fhDeltaEtaNeutral->Fill(ptTrig, deltaEta);
3710 fhDeltaPhiNeutral->Fill(ptTrig, deltaPhi);
3712 if(pt > 2 ) fhDeltaPhiDeltaEtaNeutral->Fill(deltaPhi, deltaEta);
3715 // Momentum imbalance
3722 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
3724 //delta phi cut for correlation
3725 if( (deltaPhi > fDeltaPhiMinCut) && ( deltaPhi < fDeltaPhiMaxCut) )
3727 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3728 //if(xE <0.)xE =-xE;
3729 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3731 fhDeltaPhiNeutralPt->Fill(pt,deltaPhi);
3732 fhXENeutral ->Fill(ptTrig,xE);
3733 fhPtHbpXENeutral ->Fill(ptTrig,hbpXE);
3734 fhZTNeutral ->Fill(ptTrig,zT);
3735 fhPtHbpZTNeutral ->Fill(ptTrig,hbpZT);
3737 else if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3739 // Randomize angle for xE calculation
3740 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
3742 xE = -(pt/ptTrig)*TMath::Cos(randomphi);
3743 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3745 fhDeltaPhiUeNeutralPt->Fill(pt,deltaPhi);
3746 fhZTUeNeutral ->Fill(ptTrig,zT);
3747 fhPtHbpZTUeNeutral ->Fill(ptTrig,hbpZT);
3748 fhXEUeNeutral ->Fill(ptTrig,xE);
3749 fhPtHbpXEUeNeutral ->Fill(ptTrig,hbpXE);
3752 // Several UE calculation, not sure it is useful
3753 // with partical calorimter acceptance
3754 if(fMakeSeveralUE) FillNeutralUnderlyingEventSidesHistograms(ptTrig,pt,zT,hbpZT,deltaPhi);
3757 // Decay photon correlations
3759 if(fPi0Trigger && decayFound)
3760 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2,kFALSE) ;
3762 if(fFillAODWithReferences)
3767 refpi0 = new TObjArray(0);
3768 refpi0->SetName(GetAODObjArrayName()+"Pi0s");
3769 refpi0->SetOwner(kFALSE);
3772 }//put references in trigger AOD
3775 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Selected pi0: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
3779 //Fill AOD with reference tracks, if not filling histograms
3780 if(fFillAODWithReferences && refpi0)
3782 aodParticle->AddObjArray(refpi0);
3786 //__________________________________________________________________________
3787 void AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(Int_t label)
3789 // Charged Hadron Correlation Analysis with MC information
3791 if ( GetDebug() > 1 )
3792 AliInfo("Make trigger particle - charged hadron correlation in AOD MC level");
3796 if( GetDebug() > 0 ) AliInfo(Form(" *** bad label ***: label %d", label));
3800 AliStack * stack = 0x0 ;
3801 TParticle * primary = 0x0 ;
3802 TClonesArray * mcparticles = 0x0 ;
3803 AliAODMCParticle * aodprimary = 0x0 ;
3805 Double_t eprim = 0 ;
3806 Double_t ptprim = 0 ;
3807 Double_t phiprim = 0 ;
3808 Double_t etaprim = 0 ;
3810 Int_t iParticle = 0 ;
3812 Bool_t leadTrig = kTRUE;
3814 if( GetReader()->ReadStack() )
3816 stack = GetMCStack() ;
3819 AliFatal("Stack not available, is the MC handler called? STOP");
3823 //nTracks = stack->GetNtrack() ;
3824 nTracks = stack->GetNprimary();
3825 if( label >= stack->GetNtrack() )
3828 AliInfo(Form("*** large label ***: label %d, n tracks %d", label, stack->GetNtrack()));
3832 primary = stack->Particle(label);
3835 AliInfo(Form(" *** no primary ***: label %d", label));
3839 eprim = primary->Energy();
3840 ptprim = primary->Pt();
3841 etaprim = primary->Eta();
3842 phiprim = primary->Phi();
3843 if(phiprim < 0) phiprim+=TMath::TwoPi();
3845 if(ptprim < 0.01 || eprim < 0.01) return ;
3847 for (iParticle = 0 ; iParticle < nTracks ; iParticle++)
3849 TParticle * particle = stack->Particle(iParticle);
3850 TLorentzVector momentum;
3852 //keep only final state particles
3853 if( particle->GetStatusCode() != 1 ) continue ;
3855 //---------- Charged particles ----------------------
3856 Int_t pdg = particle->GetPdgCode();
3857 Int_t charge = (Int_t) TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
3858 if(charge == 0) continue;
3860 particle->Momentum(momentum);
3862 //Particles in CTS acceptance, make sure to use the same selection as in the reader
3863 Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
3864 //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,momentum.Pt(),momentum.Eta(),momentum.Phi()*TMath::RadToDeg());
3865 if( !inCTS ) continue;
3867 // Remove conversions
3868 if ( TMath::Abs(pdg) == 11 && stack->Particle(particle->GetFirstMother())->GetPdgCode() == 22 ) continue ;
3870 if ( label == iParticle ) continue; // avoid trigger particle
3872 Float_t phi = particle->Phi();
3873 if(phi < 0) phi+=TMath::TwoPi();
3875 Bool_t lead = FillChargedMCCorrelationHistograms(particle->Pt(),phi,particle->Eta(),ptprim,phiprim,etaprim);
3876 if(!lead) leadTrig = kFALSE;
3877 //if ( !lead && (fMakeAbsoluteLeading || fMakeNearSideLeading) ) return;
3883 else if( GetReader()->ReadAODMCParticles() )
3885 //Get the list of MC particles
3886 mcparticles = GetReader()->GetAODMCParticles();
3887 if( !mcparticles ) return;
3889 nTracks = mcparticles->GetEntriesFast() ;
3891 if( label >= nTracks )
3894 AliInfo(Form(" *** large label ***: label %d, n tracks %d", label,nTracks));
3899 aodprimary = (AliAODMCParticle*) mcparticles->At(label);
3902 AliInfo(Form(" *** no AOD primary ***: label %d", label));
3906 eprim = aodprimary->E();
3907 ptprim = aodprimary->Pt();
3908 etaprim = aodprimary->Eta();
3909 phiprim = aodprimary->Phi();
3910 if(phiprim < 0) phiprim+=TMath::TwoPi();
3912 if(ptprim < 0.01 || eprim < 0.01) return ;
3914 for (iParticle = 0; iParticle < nTracks; iParticle++)
3916 AliAODMCParticle *part = (AliAODMCParticle*) mcparticles->At(iParticle);
3918 if (!part->IsPhysicalPrimary() ) continue; // same as part->GetStatus() !=1
3920 if ( part->Charge() == 0 ) continue;
3922 TLorentzVector momentum(part->Px(),part->Py(),part->Pz(),part->E());
3924 //Particles in CTS acceptance, make sure to use the same selection as in the reader
3925 Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
3926 //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,momentum.Pt(),momentum.Eta(),momentum.Phi()*TMath::RadToDeg());
3927 if( !inCTS ) continue;
3929 // Remove conversions
3930 Int_t indexmother = part->GetMother();
3931 if ( indexmother > -1 )
3933 Int_t pdg = part->GetPdgCode();
3934 Int_t mPdg = ((AliAODMCParticle*) mcparticles->At(indexmother)) ->GetPdgCode();
3935 if (TMath::Abs(pdg) == 11 && mPdg == 22) continue;
3938 if ( label == iParticle ) continue; // avoid trigger particle
3940 Float_t phi = part->Phi();
3941 if(phi < 0) phi+=TMath::TwoPi();
3943 Bool_t lead = FillChargedMCCorrelationHistograms(part->Pt(),phi,part->Eta(),ptprim,phiprim,etaprim);
3944 if(!lead) leadTrig = kFALSE;
3945 //if ( !lead && (fMakeAbsoluteLeading || fMakeNearSideLeading)) return;
3947 } //MC particle loop
3950 // Trigger MC particle histograms
3951 //if (!lead && (fMakeAbsoluteLeading || fMakeNearSideLeading)) return;
3953 fhMCPtTrigger ->Fill(ptprim);
3954 fhMCPhiTrigger->Fill(ptprim,phiprim);
3955 fhMCEtaTrigger->Fill(ptprim,etaprim);
3957 if(!leadTrig && (fMakeAbsoluteLeading || fMakeNearSideLeading) )
3960 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(): Not leading primary trigger: pT %2.2f, phi %2.2f, eta %2.2f\n",
3961 ptprim,phiprim*TMath::RadToDeg(),etaprim);
3963 fhMCPtTriggerNotLeading ->Fill(ptprim);
3964 fhMCPhiTriggerNotLeading->Fill(ptprim,phiprim);
3965 fhMCEtaTriggerNotLeading->Fill(ptprim,etaprim);
3969 //_____________________________________________________________________
3970 void AliAnaParticleHadronCorrelation::Print(const Option_t * opt) const
3973 //Print some relevant parameters set for the analysis
3977 printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
3978 AliAnaCaloTrackCorrBaseClass::Print(" ");
3979 printf("Pt trigger > %2.2f; < %2.2f\n", GetMinPt() , GetMaxPt()) ;
3980 printf("Pt associa > %2.2f; < %2.2f\n", fMinAssocPt, fMaxAssocPt) ;
3981 printf("Phi trigger particle-Hadron < %3.2f\n", fDeltaPhiMaxCut) ;
3982 printf("Phi trigger particle-Hadron > %3.2f\n", fDeltaPhiMinCut) ;
3983 printf("Phi trigger particle-UeHadron < %3.2f\n", fUeDeltaPhiMaxCut) ;
3984 printf("Phi trigger particle-UeHadron > %3.2f\n", fUeDeltaPhiMinCut) ;
3985 printf("Isolated Trigger? %d\n" , fSelectIsolated) ;
3986 printf("Several UE? %d\n" , fMakeSeveralUE) ;
3987 printf("Name of AOD Pi0 Branch %s \n", fPi0AODBranchName.Data());
3988 printf("Do Decay-hadron correlation ? %d\n", fPi0Trigger) ;
3989 printf("Select absolute leading for cluster triggers ? %d or Near Side %d\n",
3990 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
3991 printf("Trigger pt bins %d\n", fNAssocPtBins) ;
3992 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
3993 printf("\t bin %d = [%2.1f,%2.1f]\n", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
3998 //____________________________________________________________
3999 void AliAnaParticleHadronCorrelation::SetNAssocPtBins(Int_t n)
4001 // Set number of bins
4011 printf("n = larger than 19 or too small, set to 19 \n");
4016 //______________________________________________________________________________
4017 void AliAnaParticleHadronCorrelation::SetAssocPtBinLimit(Int_t ibin, Float_t pt)
4019 // Set the list of limits for the trigger pt bins
4021 if(ibin <= fNAssocPtBins || ibin >= 0)
4023 fAssocPtBinLimit[ibin] = pt ;
4027 printf("AliAnaParticleHadronCorrelation::SetAssocPtBinLimit() - bin number too large %d > %d or small, nothing done\n", ibin, fNAssocPtBins) ;