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 fNDecayBits(0), fDecayBits(),
65 fMakeAbsoluteLeading(0), fMakeNearSideLeading(0),
66 fLeadingTriggerIndex(-1), fHMPIDCorrelation(0), fFillBradHisto(0),
67 fNAssocPtBins(0), fAssocPtBinLimit(),
69 fListMixTrackEvents(), fListMixCaloEvents(),
70 fUseMixStoredInReader(0), fFillNeutralEventMixPool(0),
71 fM02MaxCut(0), fM02MinCut(0),
72 fFillPileUpHistograms(0), fFillHighMultHistograms(0),
73 fSelectLeadingHadronAngle(0), fFillLeadHadOppositeHisto(0),
74 fMinLeadHadPhi(0), fMaxLeadHadPhi(0),
75 fMinLeadHadPt(0), fMaxLeadHadPt(0),
76 fFillEtaGapsHisto(1), fFillMomImbalancePtAssocBinsHisto(0),
77 fMCGenTypeMin(0), fMCGenTypeMax(0),
79 fhPtTriggerInput(0), fhPtTriggerSSCut(0),
80 fhPtTriggerIsoCut(0), fhPtTriggerFidCut(0),
81 fhPtTrigger(0), fhPtTriggerVtxBC0(0),
82 fhPtTriggerVzBin(0), fhPtTriggerBin(0),
83 fhPhiTrigger(0), fhEtaTrigger(0),
85 fhPtDecayTrigger(), fhPtDecayTriggerMC(),
86 fhPtTriggerCentrality(0), fhPtTriggerEventPlane(0),
87 fhTriggerEventPlaneCentrality(0),
88 fhPtTriggerMixed(0), fhPtTriggerMixedVzBin(0), fhPtTriggerMixedBin(0),
89 fhPhiTriggerMixed(0), fhEtaTriggerMixed(0),
90 fhPtLeadingOppositeHadron(0), fhPtDiffPhiLeadingOppositeHadron(0), fhPtDiffEtaLeadingOppositeHadron(0),
91 fhPtNoLeadingOppositeHadron(0), fhEtaPhiNoLeadingOppositeHadron(0),
92 fhDeltaPhiDeltaEtaCharged(0),
93 fhPhiCharged(0), fhEtaCharged(0),
94 fhDeltaPhiCharged(0), fhDeltaEtaCharged(0),
95 fhDeltaPhiChargedPt(0), fhDeltaPhiUeChargedPt(0),
97 fhXECharged(0), fhXECharged_Cone2(0), fhXEUeCharged(0),
98 fhXEPosCharged(0), fhXENegCharged(0),
99 fhPtHbpXECharged(0), fhPtHbpXECharged_Cone2(0), fhPtHbpXEUeCharged(0),
100 fhZTCharged(0), fhZTUeCharged(0),
101 fhZTPosCharged(0), fhZTNegCharged(0),
102 fhPtHbpZTCharged(0), fhPtHbpZTUeCharged(0),
103 fhXEChargedMC(), fhDeltaPhiChargedMC(),
104 fhDeltaPhiDeltaEtaChargedPtA3GeV(0),
105 fhDeltaPhiChargedPtA3GeV(0), fhDeltaEtaChargedPtA3GeV(0),
107 fhDeltaPhiChargedPileUp(), fhDeltaEtaChargedPileUp(),
108 fhDeltaPhiChargedPtA3GeVPileUp(), fhDeltaEtaChargedPtA3GeVPileUp(),
109 fhXEChargedPileUp(), fhXEUeChargedPileUp(),
110 fhZTChargedPileUp(), fhZTUeChargedPileUp(),
111 fhPtTrigChargedPileUp(),
112 fhDeltaPhiChargedOtherBC(), fhDeltaPhiChargedPtA3GeVOtherBC(),
113 fhXEChargedOtherBC(), fhXEUeChargedOtherBC(),
114 fhZTChargedOtherBC(), fhZTUeChargedOtherBC(),
115 fhPtTrigChargedOtherBC(),
116 fhDeltaPhiChargedBC0(), fhDeltaPhiChargedPtA3GeVBC0(),
117 fhXEChargedBC0(), fhXEUeChargedBC0(),
118 fhZTChargedBC0(), fhZTUeChargedBC0(),
119 fhPtTrigChargedBC0(),
120 fhDeltaPhiChargedVtxBC0(), fhDeltaPhiChargedPtA3GeVVtxBC0(),
121 fhXEChargedVtxBC0(), fhXEUeChargedVtxBC0(),
122 fhZTChargedVtxBC0(), fhZTUeChargedVtxBC0(),
123 fhPtTrigChargedVtxBC0(),
124 fhDeltaPhiUeLeftCharged(0),
125 fhDeltaPhiUeLeftUpCharged(0), fhDeltaPhiUeRightUpCharged(0),
126 fhDeltaPhiUeLeftDownCharged(0), fhDeltaPhiUeRightDownCharged(0),
127 fhXEUeLeftCharged(0),
128 fhXEUeLeftUpCharged(0), fhXEUeRightUpCharged(0),
129 fhXEUeLeftDownCharged(0), fhXEUeRightDownCharged(0),
130 fhPtHbpXEUeLeftCharged(0), fhZTUeLeftCharged(0),
131 fhPtHbpZTUeLeftCharged(0),
132 fhPtTrigPout(0), fhPtTrigCharged(0),
133 fhDeltaPhiChargedMult(0x0), fhDeltaEtaChargedMult(0x0),
134 fhXEMult(0x0), fhXEUeMult(0x0),
135 fhZTMult(0x0), fhZTUeMult(0x0),
136 fhAssocPtBkg(0), fhDeltaPhiDeltaEtaAssocPtBin(0),
137 fhDeltaPhiAssocPtBin(0),
138 fhDeltaPhiAssocPtBinDEta08(0), fhDeltaPhiAssocPtBinDEta0(0),
139 fhDeltaPhiAssocPtBinHMPID(0), fhDeltaPhiAssocPtBinHMPIDAcc(0),
140 fhDeltaPhiBradAssocPtBin(0), fhDeltaPhiBrad(0),
141 fhXEAssocPtBin(0), fhZTAssocPtBin(0),
142 fhXEVZ(0), fhZTVZ(0),
143 fhDeltaPhiDeltaEtaNeutral(0),
144 fhPhiNeutral(0), fhEtaNeutral(0),
145 fhDeltaPhiNeutral(0), fhDeltaEtaNeutral(0),
146 fhDeltaPhiNeutralPt(0), fhDeltaPhiUeNeutralPt(0),
147 fhXENeutral(0), fhXEUeNeutral(0),
148 fhPtHbpXENeutral(0), fhPtHbpXEUeNeutral(0),
149 fhZTNeutral(0), fhZTUeNeutral(0),
150 fhPtHbpZTNeutral(0), fhPtHbpZTUeNeutral(0),
151 fhDeltaPhiUeLeftNeutral(0), fhXEUeLeftNeutral(0),
152 fhPtHbpXEUeLeftNeutral(0), fhZTUeLeftNeutral(0),
153 fhPtHbpZTUeLeftNeutral(0), fhPtPi0DecayRatio(0),
154 fhDeltaPhiPi0DecayCharged(0), fhXEPi0DecayCharged(0), fhZTPi0DecayCharged(0),
155 fhDeltaPhiPi0DecayNeutral(0), fhXEPi0DecayNeutral(0), fhZTPi0DecayNeutral(0),
156 fhDeltaPhiDecayCharged(), fhXEDecayCharged(), fhZTDecayCharged(),
157 fhDeltaPhiDecayChargedAssocPtBin(),
158 fhMCPtTrigger(), fhMCPhiTrigger(), fhMCEtaTrigger(),
159 fhMCPtTriggerNotLeading(), fhMCPhiTriggerNotLeading(), fhMCEtaTriggerNotLeading(),
160 fhMCEtaCharged(), fhMCPhiCharged(),
161 fhMCDeltaEtaCharged(), fhMCDeltaPhiCharged(),
162 fhMCDeltaPhiDeltaEtaCharged(), fhMCDeltaPhiChargedPt(),
163 fhMCPtXECharged(), fhMCPtXEUeCharged(),
164 fhMCPtXEUeLeftCharged(),
165 fhMCPtHbpXECharged(), fhMCPtHbpXEUeCharged(),
166 fhMCPtHbpXEUeLeftCharged(),
168 fhMCPtZTCharged(), fhMCPtZTUeCharged(),
169 fhMCPtZTUeLeftCharged(),
170 fhMCPtHbpZTCharged(), fhMCPtHbpZTUeCharged(),
171 fhMCPtHbpZTUeLeftCharged(),
172 fhMCPtTrigPout(), fhMCPtAssocDeltaPhi(),
174 fhNEventsTrigger(0), fhNtracksMB(0), fhNclustersMB(0),
175 fhMixDeltaPhiCharged(0), fhMixDeltaPhiDeltaEtaCharged(0),
176 fhMixXECharged(0), fhMixXEUeCharged(0), fhMixHbpXECharged(0),
177 fhMixDeltaPhiChargedAssocPtBin(),
178 fhMixDeltaPhiChargedAssocPtBinDEta08(),
179 fhMixDeltaPhiChargedAssocPtBinDEta0(),
180 fhMixDeltaPhiDeltaEtaChargedAssocPtBin(),
181 fhEventBin(0), fhEventMixBin(0), fhEventMBBin(0)
185 //Initialize parameters
188 for(Int_t i = 0; i < fgkNmcTypes; i++)
190 fhPtTriggerMC[i] = 0;
191 fhXEChargedMC[i] = 0;
192 fhDeltaPhiChargedMC[i] = 0;
193 for(Int_t ib = 0; ib < 4; ib++) fhPtDecayTriggerMC[ib][i] = 0;
196 for(Int_t ib = 0; ib < 4; ib++) fhPtDecayTrigger[ib] = 0;
198 for(Int_t i = 0; i < 7; i++)
200 fhPtTriggerPileUp [i] = 0 ;
201 fhDeltaPhiChargedPileUp [i] = 0 ; fhDeltaEtaChargedPileUp [i] = 0 ;
202 fhXEChargedPileUp [i] = 0 ; fhXEUeChargedPileUp [i] = 0 ;
203 fhZTChargedPileUp [i] = 0 ; fhZTUeChargedPileUp [i] = 0 ;
204 fhPtTrigChargedPileUp [i] = 0 ;
205 fhDeltaPhiChargedPtA3GeVPileUp[i] = 0 ; fhDeltaEtaChargedPtA3GeVPileUp[i] = 0 ;
210 //_________________________________________________________________
211 AliAnaParticleHadronCorrelation::~AliAnaParticleHadronCorrelation()
213 // Remove event containers
217 if(fListMixTrackEvents)
219 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
221 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
223 for(Int_t irp=0; irp<GetNRPBin(); irp++)
225 Int_t bin = GetEventMixBin(ic, iz, irp);
226 fListMixTrackEvents[bin]->Delete() ;
227 delete fListMixTrackEvents[bin] ;
233 delete[] fListMixTrackEvents;
235 if(fListMixCaloEvents)
237 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
239 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
241 for(Int_t irp=0; irp<GetNRPBin(); irp++)
243 Int_t bin = GetEventMixBin(ic, iz, irp);
244 fListMixCaloEvents[bin]->Delete() ;
245 delete fListMixCaloEvents[bin] ;
251 delete[] fListMixCaloEvents;
256 //__________________________________________________________________________________________________________________________________________
257 void AliAnaParticleHadronCorrelation::FillChargedAngularCorrelationHistograms(Float_t ptAssoc, Float_t ptTrig, Int_t bin,
258 Float_t phiAssoc, Float_t phiTrig, Float_t deltaPhi,
259 Float_t etaAssoc, Float_t etaTrig,
260 Int_t decayTag, Float_t hmpidSignal, Int_t outTOF,
261 Int_t cen, Int_t mcTag)
263 // Fill angular correlation related histograms
265 Float_t deltaEta = etaTrig-etaAssoc;
266 Float_t deltaPhiOrg = phiTrig-phiAssoc;
268 fhEtaCharged ->Fill(ptAssoc,etaAssoc);
269 fhPhiCharged ->Fill(ptAssoc,phiAssoc);
270 fhDeltaEtaCharged ->Fill(ptTrig ,deltaEta);
271 fhDeltaPhiCharged ->Fill(ptTrig ,deltaPhi);
272 fhDeltaPhiChargedPt->Fill(ptAssoc, deltaPhi);
273 fhDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
277 fhDeltaEtaChargedPtA3GeV ->Fill(ptTrig ,deltaEta);
278 fhDeltaPhiChargedPtA3GeV ->Fill(ptTrig ,deltaPhi);
279 fhDeltaPhiDeltaEtaChargedPtA3GeV->Fill(deltaPhi, deltaEta);
284 if(fFillPileUpHistograms)
288 fhDeltaPhiChargedOtherBC->Fill(ptTrig ,deltaPhi) ;
289 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVOtherBC->Fill(ptTrig ,deltaPhi) ;
293 fhDeltaPhiChargedBC0->Fill(ptTrig ,deltaPhi) ;
294 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVBC0->Fill(ptTrig ,deltaPhi) ;
297 Int_t vtxBC = GetReader()->GetVertexBC();
298 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
300 fhDeltaPhiChargedVtxBC0->Fill(ptTrig ,deltaPhi) ;
301 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVVtxBC0->Fill(ptTrig ,deltaPhi) ;
304 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
305 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
306 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
307 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
308 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
309 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
310 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
314 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
315 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
316 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
317 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
318 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
319 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
320 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
326 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
327 fhDeltaPhiChargedMC[mcIndex]->Fill(ptTrig , deltaPhi);
328 if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairInCalo) && mcIndex==2 )
329 fhDeltaPhiChargedMC[7]->Fill(ptTrig , deltaPhi);
332 if(fDecayTrigger && decayTag > 0)
334 for(Int_t ibit = 0; ibit<fNDecayBits; ibit++)
336 if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit])) fhDeltaPhiDecayCharged[ibit]->Fill(ptTrig,deltaPhi);
340 Double_t dphiBrad = -100;
343 dphiBrad = atan2(sin(deltaPhiOrg), cos(deltaPhiOrg))/TMath::Pi();//-1 to 1
344 if( TMath::Abs(dphiBrad) > 0.325 && TMath::Abs(dphiBrad) < 0.475 ) //Hardcoded values, BAD, FIXME
346 fhAssocPtBkg->Fill(ptTrig, ptAssoc);
349 if( dphiBrad < -1./3 ) dphiBrad += 2;
350 fhDeltaPhiBrad->Fill(ptTrig, dphiBrad);
353 // Fill histograms in bins of associated particle pT
356 fhDeltaPhiDeltaEtaAssocPtBin [bin]->Fill(deltaPhi,deltaEta);
358 fhDeltaPhiAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
360 if(fFillEtaGapsHisto)
362 if(TMath::Abs(deltaEta)> 0.8)
363 fhDeltaPhiAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
365 if(TMath::Abs(deltaEta)< 0.01)
366 fhDeltaPhiAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
370 fhDeltaPhiBradAssocPtBin [bin]->Fill(ptTrig, dphiBrad);
372 if(fDecayTrigger && decayTag > 0 && fNDecayBits > 0 &&
373 GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[0]))
374 fhDeltaPhiDecayChargedAssocPtBin[bin]->Fill(ptTrig, deltaPhi);
376 if(fHMPIDCorrelation)
378 if( hmpidSignal > 0 )
380 //printf("Track pt %f with HMPID signal %f \n",pt,hmpidSignal);
381 fhDeltaPhiAssocPtBinHMPID[bin]->Fill(ptTrig, deltaPhi);
384 if(phiAssoc > 5*TMath::DegToRad() && phiAssoc < 20*TMath::DegToRad())
386 //printf("Track pt %f in HMPID acceptance phi %f \n ",pt,phi*TMath::RadToDeg() );
387 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->Fill(ptTrig, deltaPhi);
392 //fill different multiplicity/centrality histogram
393 if(fFillHighMultHistograms && cen >= 0 && cen < GetNCentrBin())
395 fhDeltaPhiChargedMult[cen]->Fill(ptTrig,deltaPhi);
396 fhDeltaEtaChargedMult[cen]->Fill(ptTrig,deltaEta);
400 //___________________________________________________________________________________________________________________________________
401 Bool_t AliAnaParticleHadronCorrelation::FillChargedMCCorrelationHistograms(Float_t mcAssocPt, Float_t mcAssocPhi, Float_t mcAssocEta,
402 Float_t mcTrigPt, Float_t mcTrigPhi, Float_t mcTrigEta,
403 Int_t histoIndex, Bool_t lostDecayPair)
405 // Fill MC histograms independently of AOD or ESD
409 // In case we requested the trigger to be a leading particle,
410 // check if this is true at the MC level.
411 // Not sure if it is correct to skip or not skip this.
413 if( fMakeAbsoluteLeading && mcAssocPt > mcTrigPt ) lead = kFALSE; // skip event
415 // Skip this event if near side associated particle pt larger than trigger
416 if( mcAssocPhi < 0 ) mcAssocPhi+=TMath::TwoPi();
418 Float_t mcdeltaPhi= mcTrigPhi-mcAssocPhi;
419 if(mcdeltaPhi <= -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
420 if(mcdeltaPhi > 3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
422 if( fMakeNearSideLeading)
424 if( mcAssocPt > mcTrigPt && mcdeltaPhi < TMath::PiOver2() ) lead = kFALSE; // skip event
428 // Select only hadrons in pt range
429 if ( mcAssocPt < fMinAssocPt || mcAssocPt > fMaxAssocPt ) return lead ; // exclude but continue
430 if ( mcAssocPt < GetReader()->GetCTSPtMin()) return lead ;
434 // Remove trigger itself for correlation when use charged triggers
435 if(TMath::Abs(mcAssocPt -mcTrigPt ) < 1e-6 &&
437 TMath::Abs(mcAssocEta-mcTrigEta) < 1e-6) return lead ; // exclude but continue
439 Float_t mcxE =-mcAssocPt/mcTrigPt*TMath::Cos(mcdeltaPhi);// -(mcAssocPx*pxprim+mcAssocPy*pyprim)/(mcTrigPt*mcTrigPt);
440 Float_t mchbpXE =-100 ;
441 if(mcxE > 0 ) mchbpXE = TMath::Log(1./mcxE);
443 Float_t mczT = mcAssocPt/mcTrigPt ;
444 Float_t mchbpZT =-100 ;
445 if(mczT > 0 ) mchbpZT = TMath::Log(1./mczT);
447 Double_t mcpout = mcAssocPt*TMath::Sin(mcdeltaPhi) ;
451 AliInfo(Form("Charged hadron: track Pt %f, track Phi %f, phi trigger %f. Cuts: delta phi %2.2f < %2.2f < %2.2f \n",
452 mcAssocPt,mcAssocPhi, mcTrigPhi,fDeltaPhiMinCut, mcdeltaPhi, fDeltaPhiMaxCut));
456 fhMCEtaCharged [histoIndex]->Fill(mcAssocPt, mcAssocEta);
457 fhMCPhiCharged [histoIndex]->Fill(mcAssocPt, mcAssocPhi);
458 fhMCDeltaEtaCharged[histoIndex]->Fill(mcTrigPt , mcTrigEta-mcAssocEta);
459 fhMCDeltaPhiCharged[histoIndex]->Fill(mcTrigPt , mcdeltaPhi);
460 fhMCPtAssocDeltaPhi[histoIndex]->Fill(mcAssocPt, mcdeltaPhi);
462 fhMCDeltaPhiDeltaEtaCharged[histoIndex]->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
464 //delta phi cut for correlation
465 if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
467 fhMCDeltaPhiChargedPt[histoIndex]->Fill(mcAssocPt,mcdeltaPhi);
468 fhMCPtXECharged [histoIndex]->Fill(mcTrigPt, mcxE);
469 fhMCPtHbpXECharged [histoIndex]->Fill(mcTrigPt, mchbpXE);
470 fhMCPtZTCharged [histoIndex]->Fill(mcTrigPt, mczT);
471 fhMCPtHbpZTCharged [histoIndex]->Fill(mcTrigPt, mchbpZT);
472 fhMCPtTrigPout [histoIndex]->Fill(mcTrigPt, mcpout) ;
475 if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
477 fhMCEtaCharged [7]->Fill(mcAssocPt, mcAssocEta);
478 fhMCPhiCharged [7]->Fill(mcAssocPt, mcAssocPhi);
479 fhMCDeltaEtaCharged[7]->Fill(mcTrigPt , mcTrigEta-mcAssocEta);
480 fhMCDeltaPhiCharged[7]->Fill(mcTrigPt , mcdeltaPhi);
481 fhMCPtAssocDeltaPhi[7]->Fill(mcAssocPt, mcdeltaPhi);
483 fhMCDeltaPhiDeltaEtaCharged[7]->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
485 //delta phi cut for correlation
486 if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
488 fhMCDeltaPhiChargedPt[7]->Fill(mcAssocPt,mcdeltaPhi);
489 fhMCPtXECharged [7]->Fill(mcTrigPt, mcxE);
490 fhMCPtHbpXECharged [7]->Fill(mcTrigPt, mchbpXE);
491 fhMCPtZTCharged [7]->Fill(mcTrigPt, mczT);
492 fhMCPtHbpZTCharged [7]->Fill(mcTrigPt, mchbpZT);
493 fhMCPtTrigPout [7]->Fill(mcTrigPt, mcpout) ;
500 if ( (mcdeltaPhi > fUeDeltaPhiMinCut) && (mcdeltaPhi < fUeDeltaPhiMaxCut) )
502 //Double_t randomphi = gRandom->Uniform(TMath::Pi()/2,3*TMath::Pi()/2);
503 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
504 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
505 Double_t mcUezT = mcAssocPt/mcTrigPt;
508 printf("FillChargedMCCorrelationHistograms(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
509 mcUexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
511 fhMCPtXEUeCharged[histoIndex]->Fill(mcTrigPt,mcUexE);
512 if(mcUexE > 0) fhMCPtHbpXEUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
514 fhMCPtZTUeCharged[histoIndex]->Fill(mcTrigPt,mcUezT);
515 if(mcUezT > 0) fhMCPtHbpZTUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
517 fhMCUePart[histoIndex]->Fill(mcTrigPt);
519 if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
521 fhMCPtXEUeCharged[7]->Fill(mcTrigPt,mcUexE);
522 if(mcUexE > 0) fhMCPtHbpXEUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
524 fhMCPtZTUeCharged[7]->Fill(mcTrigPt,mcUezT);
525 if(mcUezT > 0) fhMCPtHbpZTUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
527 fhMCUePart[7]->Fill(mcTrigPt);
534 if((mcdeltaPhi<-fUeDeltaPhiMinCut) || (mcdeltaPhi >2*fUeDeltaPhiMaxCut))
536 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
537 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
538 Double_t mcUezT = mcAssocPt/mcTrigPt;
541 printf("FillChargedMCCorrelationHistograms(): Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
542 mcUexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
544 fhMCPtXEUeLeftCharged[histoIndex]->Fill(mcTrigPt,mcUexE);
545 if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
547 fhMCPtZTUeLeftCharged[histoIndex]->Fill(mcTrigPt,mcUezT);
548 if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
550 if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
552 fhMCPtXEUeLeftCharged[7]->Fill(mcTrigPt,mcUexE);
553 if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged[7]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
555 fhMCPtZTUeLeftCharged[7]->Fill(mcTrigPt,mcUezT);
556 if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[7]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
564 //___________________________________________________________________________________________________________________
565 void AliAnaParticleHadronCorrelation::FillChargedMomentumImbalanceHistograms(Float_t ptTrig, Float_t ptAssoc,
567 Int_t cen, Int_t charge,
568 Int_t bin, Int_t decayTag,
569 Int_t outTOF, Int_t mcTag)
572 // Fill mostly momentum imbalance related histograms
574 Float_t zT = ptAssoc/ptTrig ;
575 Float_t xE =-ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
576 Float_t pout = ptAssoc*TMath::Sin(deltaPhi) ;
579 printf("FillChargedMomentumImbalanceHistograms(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
580 xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
582 Float_t hbpXE = -100;
583 Float_t hbpZT = -100;
585 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
586 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
588 fhXECharged ->Fill(ptTrig , xE);
589 fhPtHbpXECharged ->Fill(ptTrig , hbpXE);
590 fhZTCharged ->Fill(ptTrig , zT);
591 fhPtHbpZTCharged ->Fill(ptTrig , hbpZT);
592 fhPtTrigPout ->Fill(ptTrig , pout) ;
593 fhPtTrigCharged ->Fill(ptTrig , ptAssoc) ;
594 if((deltaPhi > 5*TMath::Pi()/6.) && (deltaPhi < 7*TMath::Pi()/6.))
596 fhXECharged_Cone2 ->Fill(ptTrig , xE);
597 fhPtHbpXECharged_Cone2 ->Fill(ptTrig , hbpXE);
603 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
604 fhXEChargedMC[mcIndex]->Fill(ptTrig , xE);
605 if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairInCalo) && mcIndex==2 )
606 fhXEChargedMC[7]->Fill(ptTrig , xE);
610 if(fFillPileUpHistograms)
614 fhXEChargedOtherBC ->Fill(ptTrig,xE);
615 fhZTChargedOtherBC ->Fill(ptTrig,zT);
616 fhPtTrigChargedOtherBC->Fill(ptTrig,ptAssoc);
620 fhXEChargedBC0 ->Fill(ptTrig,xE);
621 fhZTChargedBC0 ->Fill(ptTrig,zT);
622 fhPtTrigChargedBC0->Fill(ptTrig,ptAssoc);
625 Int_t vtxBC = GetReader()->GetVertexBC();
626 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
628 fhXEChargedVtxBC0 ->Fill(ptTrig,xE);
629 fhZTChargedVtxBC0 ->Fill(ptTrig,zT);
630 fhPtTrigChargedVtxBC0->Fill(ptTrig,ptAssoc);
633 if(GetReader()->IsPileUpFromSPD()) { fhXEChargedPileUp[0]->Fill(ptTrig,xE); fhZTChargedPileUp[0]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[0]->Fill(ptTrig,ptAssoc); }
634 if(GetReader()->IsPileUpFromEMCal()) { fhXEChargedPileUp[1]->Fill(ptTrig,xE); fhZTChargedPileUp[1]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[1]->Fill(ptTrig,ptAssoc); }
635 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEChargedPileUp[2]->Fill(ptTrig,xE); fhZTChargedPileUp[2]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[2]->Fill(ptTrig,ptAssoc); }
636 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEChargedPileUp[3]->Fill(ptTrig,xE); fhZTChargedPileUp[3]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[3]->Fill(ptTrig,ptAssoc); }
637 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEChargedPileUp[4]->Fill(ptTrig,xE); fhZTChargedPileUp[4]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[4]->Fill(ptTrig,ptAssoc); }
638 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEChargedPileUp[5]->Fill(ptTrig,xE); fhZTChargedPileUp[5]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[5]->Fill(ptTrig,ptAssoc); }
639 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEChargedPileUp[6]->Fill(ptTrig,xE); fhZTChargedPileUp[6]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[6]->Fill(ptTrig,ptAssoc); }
642 if(fDecayTrigger && decayTag > 0)
644 for(Int_t ibit = 0; ibit<fNDecayBits; ibit++)
646 if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit]))
648 fhXEDecayCharged[ibit]->Fill(ptTrig,xE);
649 fhZTDecayCharged[ibit]->Fill(ptTrig,zT);
652 } // photon decay pi0/eta trigger
654 if(bin >= 0 && fFillMomImbalancePtAssocBinsHisto)//away side
656 fhXEAssocPtBin[bin]->Fill(ptTrig, xE) ;
657 fhZTAssocPtBin[bin]->Fill(ptTrig, zT) ;
662 Int_t vz = GetEventVzBin();
663 fhXEVZ[vz]->Fill(ptTrig, xE) ;
664 fhZTVZ[vz]->Fill(ptTrig, zT) ;
669 fhXEPosCharged->Fill(ptTrig,xE) ;
670 fhZTPosCharged->Fill(ptTrig,zT) ;
674 fhXENegCharged->Fill(ptTrig,xE) ;
675 fhZTNegCharged->Fill(ptTrig,zT) ;
678 //fill different multiplicity/centrality histogram
679 if(fFillHighMultHistograms && cen >= 0 && cen < GetNCentrBin())
681 fhXEMult[cen]->Fill(ptTrig,xE);
682 fhZTMult[cen]->Fill(ptTrig,zT);
683 } //multiplicity/centrality events selection
686 //_______________________________________________________________________________________________________________________
687 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventHistograms(Float_t ptTrig, Float_t ptAssoc,
688 Float_t deltaPhi, Int_t cen, Int_t outTOF)
690 // Fill underlying event histograms
692 fhUePart->Fill(ptTrig);
694 fhDeltaPhiUeChargedPt->Fill(ptAssoc,deltaPhi);
696 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
697 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
698 Double_t uezT = ptAssoc/ptTrig;
701 printf("FillChargedUnderlyingEventHistograms(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
702 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
704 fhXEUeCharged->Fill(ptTrig,uexE);
705 if(uexE > 0) fhPtHbpXEUeCharged->Fill(ptTrig,TMath::Log(1/uexE));
707 fhZTUeCharged->Fill(ptTrig,uezT);
708 if(uezT > 0) fhPtHbpZTUeCharged->Fill(ptTrig,TMath::Log(1/uezT));
712 if(fFillPileUpHistograms)
716 fhXEUeChargedOtherBC->Fill(ptTrig,uexE);
717 fhZTUeChargedOtherBC->Fill(ptTrig,uezT);
721 fhXEUeChargedBC0->Fill(ptTrig,uexE);
722 fhZTUeChargedBC0->Fill(ptTrig,uezT);
725 Int_t vtxBC = GetReader()->GetVertexBC();
726 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
728 fhXEUeChargedVtxBC0->Fill(ptTrig,uexE);
729 fhZTUeChargedVtxBC0->Fill(ptTrig,uezT);
732 if(GetReader()->IsPileUpFromSPD()) { fhXEUeChargedPileUp[0]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[0]->Fill(ptTrig,uezT);}
733 if(GetReader()->IsPileUpFromEMCal()) { fhXEUeChargedPileUp[1]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[1]->Fill(ptTrig,uezT);}
734 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEUeChargedPileUp[2]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[2]->Fill(ptTrig,uezT);}
735 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEUeChargedPileUp[3]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[3]->Fill(ptTrig,uezT);}
736 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEUeChargedPileUp[4]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[4]->Fill(ptTrig,uezT);}
737 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEUeChargedPileUp[5]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[5]->Fill(ptTrig,uezT);}
738 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEUeChargedPileUp[6]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[6]->Fill(ptTrig,uezT);}
741 //fill different multiplicity/centrality histogram
742 if(fFillHighMultHistograms && cen >= 0 && cen < GetNCentrBin())
744 fhXEUeMult[cen]->Fill(ptTrig,uexE);
745 fhZTUeMult[cen]->Fill(ptTrig,uezT);
749 //_____________________________________________________________________________________________________
750 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventSidesHistograms(Float_t ptTrig,
754 // Fill underlying event histograms to the left and right of trigger
755 // Right cone is the default UE.
757 if((deltaPhi<-fUeDeltaPhiMinCut) || (deltaPhi >2*fUeDeltaPhiMaxCut))
759 fhDeltaPhiUeLeftCharged->Fill(ptAssoc,deltaPhi);
760 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
761 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
762 Double_t uezT = ptAssoc/ptTrig;
765 printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
766 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
768 fhXEUeLeftCharged->Fill(ptTrig,uexE);
769 if(uexE > 0) fhPtHbpXEUeLeftCharged->Fill(ptTrig,TMath::Log(1/uexE));
771 fhZTUeLeftCharged->Fill(ptTrig,uezT);
772 if(uezT > 0) fhPtHbpZTUeLeftCharged->Fill(ptTrig,TMath::Log(1/uezT));
774 fhDeltaPhiUeLeftCharged->Fill(ptAssoc, deltaPhi);
777 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-TMath::Pi()/2))
779 fhDeltaPhiUeLeftDownCharged->Fill(ptAssoc,deltaPhi);
780 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
781 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
784 printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for left-down UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
785 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
787 fhXEUeLeftDownCharged->Fill(ptTrig,uexE);
790 if((deltaPhi>2*fUeDeltaPhiMaxCut) && (deltaPhi <3*TMath::Pi()/2))
792 fhDeltaPhiUeLeftUpCharged->Fill(ptAssoc,deltaPhi);
793 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
794 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
797 printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for left-up UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
798 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
800 fhXEUeLeftUpCharged->Fill(ptTrig,uexE);
803 if((deltaPhi > TMath::Pi()/2) && (deltaPhi < fUeDeltaPhiMaxCut))
805 fhDeltaPhiUeRightUpCharged->Fill(ptAssoc,deltaPhi);
806 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
807 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
810 printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for right-up UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
811 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
813 fhXEUeRightUpCharged->Fill(ptTrig,uexE);
816 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < TMath::Pi()/2))
818 fhDeltaPhiUeRightDownCharged->Fill(ptAssoc,deltaPhi);
819 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
820 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
823 printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for right-down UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
824 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
826 fhXEUeRightDownCharged->Fill(ptTrig,uexE);
830 //______________________________________________________________________________________________________________________________
831 void AliAnaParticleHadronCorrelation::FillDecayPhotonCorrelationHistograms(Float_t ptAssoc, Float_t phiAssoc,
832 TLorentzVector mom1, TLorentzVector mom2,
833 Bool_t bChargedOrNeutral)
835 // Do correlation with decay photons of triggered pi0 or eta
837 // Calculate the correlation parameters
838 Float_t ptDecay1 = mom1.Pt();
839 Float_t ptDecay2 = mom2.Pt();
841 Float_t zTDecay1 = -100, zTDecay2 = -100;
842 if(ptDecay1 > 0) zTDecay1 = ptAssoc/ptDecay1 ;
843 if(ptDecay2 > 0) zTDecay2 = ptAssoc/ptDecay2 ;
845 Float_t deltaPhiDecay1 = mom1.Phi()-phiAssoc;
846 if(deltaPhiDecay1< -TMath::PiOver2()) deltaPhiDecay1+=TMath::TwoPi();
847 if(deltaPhiDecay1>3*TMath::PiOver2()) deltaPhiDecay1-=TMath::TwoPi();
849 Float_t deltaPhiDecay2 = mom2.Phi()-phiAssoc;
850 if(deltaPhiDecay2< -TMath::PiOver2()) deltaPhiDecay2+=TMath::TwoPi();
851 if(deltaPhiDecay2>3*TMath::PiOver2()) deltaPhiDecay2-=TMath::TwoPi();
853 Float_t xEDecay1 =-zTDecay1*TMath::Cos(deltaPhiDecay1); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
854 Float_t xEDecay2 =-zTDecay2*TMath::Cos(deltaPhiDecay2); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
856 if(bChargedOrNeutral) // correlate with charges
858 fhDeltaPhiPi0DecayCharged->Fill(ptDecay1, deltaPhiDecay1);
859 fhDeltaPhiPi0DecayCharged->Fill(ptDecay2, deltaPhiDecay2);
861 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms( Charged corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
863 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
865 fhZTPi0DecayCharged->Fill(ptDecay1,zTDecay1);
866 fhXEPi0DecayCharged->Fill(ptDecay1,xEDecay1);
868 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
870 fhZTPi0DecayCharged->Fill(ptDecay2,zTDecay2);
871 fhXEPi0DecayCharged->Fill(ptDecay2,xEDecay2);
874 else // correlate with neutrals
876 fhDeltaPhiPi0DecayNeutral->Fill(ptDecay1, deltaPhiDecay1);
877 fhDeltaPhiPi0DecayNeutral->Fill(ptDecay2, deltaPhiDecay2);
879 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms(Neutral corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
881 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
883 fhZTPi0DecayNeutral->Fill(ptDecay1,zTDecay1);
884 fhXEPi0DecayNeutral->Fill(ptDecay1,xEDecay1);
886 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
888 fhZTPi0DecayNeutral->Fill(ptDecay2,zTDecay2);
889 fhXEPi0DecayNeutral->Fill(ptDecay2,xEDecay2);
894 //_____________________________________________________________________________________________________________________________
895 void AliAnaParticleHadronCorrelation::FillNeutralUnderlyingEventSidesHistograms(Float_t ptTrig, Float_t ptAssoc,
896 Float_t zT, Float_t hbpZT,
899 // Fill underlying event histograms to the left of trigger
900 // Right is the default case
902 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
904 Float_t xE =-ptAssoc/ptTrig*TMath::Cos(randomphi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
905 Float_t hbpXE = -100;
906 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
908 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-fUeDeltaPhiMaxCut))
910 fhDeltaPhiUeLeftNeutral->Fill(ptAssoc, deltaPhi);
911 fhXEUeLeftNeutral ->Fill(ptTrig , xE);
912 fhPtHbpXEUeLeftNeutral ->Fill(ptTrig , hbpXE);
913 fhZTUeLeftNeutral ->Fill(ptTrig , zT);
914 fhPtHbpZTUeLeftNeutral ->Fill(ptTrig , hbpZT);
918 //______________________________________________________
919 void AliAnaParticleHadronCorrelation::FillEventMixPool()
921 // Fill the pool with tracks or clusters if requested
923 if ( !DoOwnMix() ) return;
925 FillChargedEventMixPool();
927 // Do the cluster pool filling only if requested
928 // or in case of isolation cut using clusters in the cone.
929 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
931 if( !fFillNeutralEventMixPool && !isoCase) return;
933 FillNeutralEventMixPool();
936 //_____________________________________________________________
937 void AliAnaParticleHadronCorrelation::FillChargedEventMixPool()
939 // Mixed event pool filling for tracks
941 if(fUseMixStoredInReader && GetReader()->GetLastTracksMixedEvent() == GetEventNumber())
943 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
944 return ; // pool filled previously for another trigger
947 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
948 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
950 if(!inputHandler) return ;
952 // Do mixing only with MB event (or the chosen mask), if not skip
953 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
955 Int_t eventBin = GetEventMixBin();
957 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
958 if(eventBin < 0) return;
960 fhEventMBBin->Fill(eventBin);
962 TObjArray * mixEventTracks = new TObjArray;
964 if(fUseMixStoredInReader)
966 fListMixTrackEvents[eventBin] = GetReader()->GetListWithMixedEventsForTracks(eventBin);
969 if(!fListMixTrackEvents[eventBin]) fListMixTrackEvents[eventBin] = new TList();
971 //printf("%s ***** Pool Event bin : %d - nTracks %d\n",GetInputAODName().Data(),eventBin, GetCTSTracks()->GetEntriesFast());
973 TList * pool = fListMixTrackEvents[eventBin];
976 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
978 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
980 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
981 p3.SetXYZ(mom[0],mom[1],mom[2]);
982 Float_t pt = p3.Pt();
984 //Select only hadrons in pt range
985 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
987 AliAODPWG4Particle * mixedTrack = new AliAODPWG4Particle(mom[0],mom[1],mom[2],0);
988 mixedTrack->SetDetector("CTS");
989 mixedTrack->SetChargedBit(track->Charge()>0);
990 mixEventTracks->Add(mixedTrack);
993 fhNtracksMB->Fill(mixEventTracks->GetEntriesFast(),eventBin);
995 //Set the event number where the last event was added, to avoid double pool filling
996 GetReader()->SetLastTracksMixedEvent(GetEventNumber());
998 //printf("Add event to pool with %d tracks \n ",mixEventTracks->GetEntries());
999 pool->AddFirst(mixEventTracks);
1002 //printf("Pool size %d, max %d\n",pool->GetSize(), GetNMaxEvMix());
1004 if(pool->GetSize() > GetNMaxEvMix())
1005 {//Remove last event
1006 TClonesArray * tmp = static_cast<TClonesArray*>(pool->Last()) ;
1007 pool->RemoveLast() ;
1012 //_____________________________________________________________
1013 void AliAnaParticleHadronCorrelation::FillNeutralEventMixPool()
1015 // Mixed event pool filling for neutral clusters
1016 // Right now only for EMCAL and in isolation case
1018 //printf("FillNeutralEventMixPool for %s\n",GetInputAODName().Data());
1020 if(fUseMixStoredInReader && GetReader()->GetLastCaloMixedEvent() == GetEventNumber())
1022 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
1023 return ; // pool filled previously for another trigger
1026 TObjArray * pl = GetEMCALClusters();
1027 //if (GetAODObjArrayName.Contains("PHOS") )pl = GetPHOSClusters();
1028 //else pl = GetEMCALClusters();
1030 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
1031 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
1033 if(!inputHandler) return ;
1035 // Do mixing only with MB event (or the chosen mask), if not skip
1036 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
1038 Int_t eventBin = GetEventMixBin();
1040 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
1041 if(eventBin < 0) return;
1043 TObjArray * mixEventCalo = new TObjArray;
1045 if(fUseMixStoredInReader)
1047 fListMixCaloEvents[eventBin] = GetReader()->GetListWithMixedEventsForCalo(eventBin);
1050 if(!fListMixCaloEvents[eventBin]) fListMixCaloEvents[eventBin] = new TList();
1052 TList * poolCalo = fListMixCaloEvents[eventBin];
1056 for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ )
1058 AliVCluster * calo = (AliVCluster *) (pl->At(ipr)) ;
1060 // remove matched clusters
1061 if( IsTrackMatched( calo, GetReader()->GetInputEvent() ) ) continue ;
1063 //Cluster momentum calculation
1064 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
1066 calo->GetMomentum(mom,GetVertex(0)) ;
1067 }//Assume that come from vertex in straight line
1070 Double_t vertex[]={0,0,0};
1071 calo->GetMomentum(mom,vertex) ;
1074 Float_t pt = mom.Pt();
1075 //Select only clusters in pt range
1076 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
1078 AliAODPWG4Particle * mixedCalo = new AliAODPWG4Particle(mom);
1079 mixedCalo->SetDetector("EMCAL");
1080 mixEventCalo->Add(mixedCalo);
1083 fhNclustersMB->Fill(mixEventCalo->GetEntriesFast(),eventBin);
1085 //Set the event number where the last event was added, to avoid double pool filling
1086 GetReader()->SetLastCaloMixedEvent(GetEventNumber());
1088 //printf("Add event to pool with %d clusters \n ",mixEventCalo->GetEntries());
1089 poolCalo->AddFirst(mixEventCalo);
1092 //printf("Pool size %d, max %d\n",poolCalo->GetSize(), GetNMaxEvMix());
1094 if(poolCalo->GetSize() > GetNMaxEvMix())
1095 {//Remove last event
1096 TClonesArray * tmp = static_cast<TClonesArray*>(poolCalo->Last()) ;
1097 poolCalo->RemoveLast() ;
1102 //_________________________________________________________________________________________________________________
1103 Bool_t AliAnaParticleHadronCorrelation::FindLeadingOppositeHadronInWindow(AliAODPWG4ParticleCorrelation * particle)
1105 // Select events where the leading charged particle in the opposite hemisphere
1106 // to the trigger particle is in a window centered at 180 from the trigger
1108 Float_t etaTrig = particle->Eta();
1109 Float_t ptTrig = particle->Pt();
1110 Float_t phiTrig = particle->Phi();
1111 if(phiTrig < 0 ) phiTrig+= TMath::TwoPi();
1113 Float_t ptLeadHad = 0 ;
1114 Float_t dphiLeadHad= -100 ;
1115 Float_t phiLeadHad = -100 ;
1116 Float_t etaLeadHad = -100 ;
1120 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
1122 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
1124 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
1125 p3.SetXYZ(mom[0],mom[1],mom[2]);
1127 Float_t pt = p3.Pt();
1128 Float_t phi = p3.Phi() ;
1129 if(phi < 0 ) phi+= TMath::TwoPi();
1131 Float_t deltaPhi = phiTrig-phi;
1133 // Calculate deltaPhi shift so that for the particles on the opposite side
1134 // it is defined between 90 and 270 degrees
1135 // Shift [-360,-90] to [0, 270]
1136 // and [270,360] to [-90,0]
1137 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
1138 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
1140 if(pt > ptLeadHad && deltaPhi > TMath::PiOver2()) // in opposite hemisphere
1144 dphiLeadHad= deltaPhi;
1145 etaLeadHad = p3.Eta();
1150 if(fFillLeadHadOppositeHisto)
1154 fhPtNoLeadingOppositeHadron ->Fill(ptTrig);
1155 fhEtaPhiNoLeadingOppositeHadron->Fill(etaTrig,phiTrig);
1159 fhPtLeadingOppositeHadron ->Fill(ptTrig, ptLeadHad);
1160 fhPtDiffPhiLeadingOppositeHadron->Fill(ptTrig,dphiLeadHad);
1161 fhPtDiffEtaLeadingOppositeHadron->Fill(ptTrig, etaLeadHad-etaTrig);
1167 printf("AliAnaParticleHadronCorrelation::FindLeadingOppositeHadronInWindow() pT %2.2f, phi %2.2f, eta %2.2f, nTracks away %d, total tracks %d\n",
1168 ptLeadHad,phiLeadHad*TMath::RadToDeg(),etaLeadHad,nTrack, GetTrackMultiplicity());
1170 printf("\t pT trig %2.2f, Dphi (trigger-hadron) %2.2f, Deta (trigger-hadron) %2.2f\n",
1171 ptTrig, dphiLeadHad*TMath::RadToDeg(), etaLeadHad-etaTrig);
1172 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());
1175 // reject the trigger if the leading hadron is not in the requested pt or phi window and
1177 if( nTrack == 0 ) return kFALSE; // No track found in opposite hemisphere
1179 if( ptLeadHad < fMinLeadHadPt || ptLeadHad > fMaxLeadHadPt ) return kFALSE;
1181 //printf("Accept leading hadron pT \n");
1183 if( dphiLeadHad < fMinLeadHadPhi || dphiLeadHad > fMaxLeadHadPhi ) return kFALSE;
1185 //printf("Accept leading hadron phi \n");
1191 //____________________________________________________________
1192 TObjString* AliAnaParticleHadronCorrelation::GetAnalysisCuts()
1194 //Save parameters used for analysis
1195 TString parList ; //this will be list of parameters used for this analysis.
1196 const Int_t buffersize = 560;
1197 char onePar[buffersize] ;
1199 snprintf(onePar,buffersize,"--- AliAnaPaticleHadronCorrelation ---:") ;
1201 snprintf(onePar,buffersize," %3.2f < Pt associated < %3.2f; ", fMinAssocPt, fMaxAssocPt) ;
1203 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-Hadron < %3.2f; ", fDeltaPhiMinCut, fDeltaPhiMaxCut) ;
1205 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-UeHadron < %3.2f; ", fUeDeltaPhiMinCut, fUeDeltaPhiMaxCut) ;
1207 snprintf(onePar,buffersize,"Isolated Trigger? %d;", fSelectIsolated) ;
1209 snprintf(onePar,buffersize,"Several UE? %d;", fMakeSeveralUE) ;
1211 snprintf(onePar,buffersize,"Name of AOD Pi0 Branch %s;", fPi0AODBranchName.Data());
1213 snprintf(onePar,buffersize,"Do Decay-hadron correlation ? pi0 %d, decay %d;", fPi0Trigger, fDecayTrigger) ;
1215 snprintf(onePar,buffersize,"Select absolute leading for cluster triggers ? %d or Near Side Leading %d;",
1216 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
1218 snprintf(onePar,buffersize,"Associated particle pt bins %d: ", fNAssocPtBins) ;
1220 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
1221 snprintf(onePar,buffersize,"bin %d = [%2.1f,%2.1f];", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
1225 //Get parameters set in base class.
1226 parList += GetBaseParametersList() ;
1228 //Get parameters set in FiducialCut class (not available yet)
1229 //parlist += GetFidCut()->GetFidCutParametersList()
1231 return new TObjString(parList) ;
1235 //________________________________________________________________
1236 TList * AliAnaParticleHadronCorrelation::GetCreateOutputObjects()
1238 // Create histograms to be saved in output file and
1239 // store them in fOutputContainer
1241 TList * outputContainer = new TList() ;
1242 outputContainer->SetName("CorrelationHistos") ;
1244 Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Int_t netabins = GetHistogramRanges()->GetHistoEtaBins();
1245 Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax();
1246 Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin();
1248 Int_t ndeltaphibins = GetHistogramRanges()->GetHistoDeltaPhiBins(); Int_t ndeltaetabins = GetHistogramRanges()->GetHistoDeltaEtaBins();
1249 Float_t deltaphimax = GetHistogramRanges()->GetHistoDeltaPhiMax(); Float_t deltaetamax = GetHistogramRanges()->GetHistoDeltaEtaMax();
1250 Float_t deltaphimin = GetHistogramRanges()->GetHistoDeltaPhiMin(); Float_t deltaetamin = GetHistogramRanges()->GetHistoDeltaEtaMin();
1252 Int_t ntrbins = GetHistogramRanges()->GetHistoTrackMultiplicityBins(); Int_t nclbins = GetHistogramRanges()->GetHistoNClustersBins();
1253 Int_t trmax = GetHistogramRanges()->GetHistoTrackMultiplicityMax(); Int_t clmax = GetHistogramRanges()->GetHistoNClustersMax();
1254 Int_t trmin = GetHistogramRanges()->GetHistoTrackMultiplicityMin(); Int_t clmin = GetHistogramRanges()->GetHistoNClustersMin();
1256 Int_t nxeztbins = GetHistogramRanges()->GetHistoRatioBins(); Int_t nhbpbins = GetHistogramRanges()->GetHistoHBPBins();
1257 Float_t xeztmax = GetHistogramRanges()->GetHistoRatioMax(); Float_t hbpmax = GetHistogramRanges()->GetHistoHBPMax();
1258 Float_t xeztmin = GetHistogramRanges()->GetHistoRatioMin(); Float_t hbpmin = GetHistogramRanges()->GetHistoHBPMin();
1260 Int_t nMixBins = GetNCentrBin()*GetNZvertBin()*GetNRPBin();
1262 TString nameMC[] = {"Photon","Pi0","Pi0Decay","EtaDecay","OtherDecay","Electron","Hadron","Pi0DecayLostPair"};
1263 TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
1265 // For vz dependent histograms, if option ON
1267 if(fCorrelVzBin) nz = GetNZvertBin();
1271 // Fill histograms for neutral clusters in mixing?
1272 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
1273 Bool_t neutralMix = fFillNeutralEventMixPool || isoCase ;
1275 fhPtTriggerInput = new TH1F("hPtTriggerInput","Input trigger #it{p}_{T}", nptbins,ptmin,ptmax);
1276 fhPtTriggerInput->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1277 outputContainer->Add(fhPtTriggerInput);
1279 if( fM02MaxCut > 0 && fM02MinCut > 0 )
1281 fhPtTriggerSSCut = new TH1F("hPtTriggerSSCut","Trigger #it{p}_{T} after #lambda^{2}_{0} cut", nptbins,ptmin,ptmax);
1282 fhPtTriggerSSCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1283 outputContainer->Add(fhPtTriggerSSCut);
1286 if( OnlyIsolated() )
1288 fhPtTriggerIsoCut = new TH1F("hPtTriggerIsoCut","Trigger #it{p}_{T} after isolation (and #lambda^{2}_{0} cut)", nptbins,ptmin,ptmax);
1289 fhPtTriggerIsoCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1290 outputContainer->Add(fhPtTriggerIsoCut);
1293 fhPtTriggerFidCut = new TH1F("hPtTriggerFidCut","Trigger #it{p}_{T} after fiducial (isolation and #lambda^{2}_{0}) cut", nptbins,ptmin,ptmax);
1294 fhPtTriggerFidCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1295 outputContainer->Add(fhPtTriggerFidCut);
1297 fhPtTrigger = new TH1F("hPtTrigger","#it{p}_{T} distribution of trigger particles (after opposite hadron leading cut and rest)", nptbins,ptmin,ptmax);
1298 fhPtTrigger->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1299 outputContainer->Add(fhPtTrigger);
1303 for(Int_t i=0; i < fgkNmcTypes; i++)
1305 fhPtTriggerMC[i] = new TH1F(Form("hPtTrigger_MC%s",nameMC[i].Data()),
1306 Form("#it{p}_{T} distribution of trigger particles, trigger origin is %s",nameMC[i].Data()),
1307 nptbins,ptmin,ptmax);
1308 fhPtTriggerMC[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1309 outputContainer->Add(fhPtTriggerMC[i]);
1315 for(Int_t ibit = 0; ibit < fNDecayBits; ibit++)
1317 fhPtDecayTrigger[ibit] = new TH1F(Form("hPtDecayTrigger_bit%d",fDecayBits[ibit]),
1318 Form("#it{p}_{T} distribution of trigger particles, decay Bit %d",fDecayBits[ibit]),
1319 nptbins,ptmin,ptmax);
1320 fhPtDecayTrigger[ibit]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1321 outputContainer->Add(fhPtDecayTrigger[ibit]);
1325 for(Int_t i=0; i < fgkNmcTypes; i++)
1327 fhPtDecayTriggerMC[ibit][i] = new TH1F(Form("hPtDecayTrigger_bit%d_MC%s",fDecayBits[ibit], nameMC[i].Data()),
1328 Form("#it{p}_{T} distribution of trigger particles, decay Bit %d, trigger origin is %s",fDecayBits[ibit], nameMC[i].Data()),
1329 nptbins,ptmin,ptmax);
1330 fhPtDecayTriggerMC[ibit][i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1331 outputContainer->Add(fhPtDecayTriggerMC[ibit][i]);
1339 fhPtTriggerVzBin = new TH2F("hPtTriggerVzBin","#it{p}_{T} distribution of trigger particles vs vz bin", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
1340 fhPtTriggerVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1341 fhPtTriggerVzBin->SetYTitle("#it{v}_{#it{z}} bin");
1342 outputContainer->Add(fhPtTriggerVzBin);
1345 fhPtTriggerBin = new TH2F ("hPtTriggerBin","#it{p}_{T} distribution of trigger particles", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
1346 fhPtTriggerBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1347 fhPtTriggerBin->SetYTitle("Bin");
1348 outputContainer->Add(fhPtTriggerBin);
1350 fhPhiTrigger = new TH2F ("hPhiTrigger","#phi distribution of trigger Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
1351 fhPhiTrigger->SetYTitle("#phi (rad)");
1352 outputContainer->Add(fhPhiTrigger);
1354 fhEtaTrigger = new TH2F ("hEtaTrigger","#eta distribution of trigger",nptbins,ptmin,ptmax, netabins,etamin,etamax);
1355 fhEtaTrigger->SetYTitle("#eta ");
1356 outputContainer->Add(fhEtaTrigger);
1358 if(fFillHighMultHistograms)
1360 fhPtTriggerCentrality = new TH2F("hPtTriggerCentrality","Trigger particle #it{p}_{T} vs centrality",nptbins,ptmin,ptmax,100,0.,100) ;
1361 fhPtTriggerCentrality->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1362 fhPtTriggerCentrality->SetYTitle("Centrality (%)");
1363 outputContainer->Add(fhPtTriggerCentrality) ;
1365 fhPtTriggerEventPlane = new TH2F("hPtTriggerEventPlane","Trigger particle #it{p}_{T} vs event plane angle",nptbins,ptmin,ptmax, 100,0.,TMath::Pi()) ;
1366 fhPtTriggerEventPlane->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1367 fhPtTriggerEventPlane->SetXTitle("EP angle (rad)");
1368 outputContainer->Add(fhPtTriggerEventPlane) ;
1370 fhTriggerEventPlaneCentrality = new TH2F("hTriggerEventPlaneCentrality","Trigger particle centrality vs event plane angle",100,0.,100,100,0.,TMath::Pi()) ;
1371 fhTriggerEventPlaneCentrality->SetXTitle("Centrality (%)");
1372 fhTriggerEventPlaneCentrality->SetYTitle("EP angle (rad)");
1373 outputContainer->Add(fhTriggerEventPlaneCentrality) ;
1376 // Leading hadron in oposite side
1377 if(fFillLeadHadOppositeHisto)
1379 fhPtLeadingOppositeHadron = new TH2F("hPtTriggerPtLeadingOppositeHadron","Leading hadron opposite to trigger vs trigger #it{p}_{T}",
1380 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1381 fhPtLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1382 fhPtLeadingOppositeHadron->SetYTitle("#it{p}_{T}^{lead hadron} (GeV/#it{c})");
1383 outputContainer->Add(fhPtLeadingOppositeHadron);
1385 fhPtNoLeadingOppositeHadron = new TH1F("hPtTriggerNoLeadingOppositeHadron","No Leading hadron opposite to trigger #it{p}_{T}",
1386 nptbins,ptmin,ptmax);
1387 fhPtNoLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1388 outputContainer->Add(fhPtNoLeadingOppositeHadron);
1390 fhEtaPhiNoLeadingOppositeHadron = new TH2F("hEtaPhiTriggerNoLeadingOppositeHadron","No Leading hadron opposite to trigger #eta:#phi",
1391 netabins,etamin,etamax,nphibins,phimin,phimax);
1392 fhEtaPhiNoLeadingOppositeHadron->SetXTitle("#eta");
1393 fhEtaPhiNoLeadingOppositeHadron->SetYTitle("#phi");
1394 outputContainer->Add(fhEtaPhiNoLeadingOppositeHadron);
1397 fhPtDiffPhiLeadingOppositeHadron = new TH2F("hPtTriggerDiffPhiTriggerLeadingOppositeHadron","#phi_{trigger}-#phi_{leading opposite hadron} vs #it{p}_{T}^{trig}",
1398 nptbins,ptmin,ptmax,ndeltaphibins,deltaphimin,deltaphimax);
1399 fhPtDiffPhiLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1400 fhPtDiffPhiLeadingOppositeHadron->SetYTitle("#phi_{trigger}-#phi_{leading opposite hadron} (rad)");
1401 outputContainer->Add(fhPtDiffPhiLeadingOppositeHadron);
1403 fhPtDiffEtaLeadingOppositeHadron = new TH2F("hPtTriggerDiffEtaTriggerPhiLeadingOppositeHadron","#eta_{trigger}-#eta_{leading opposite hadron} vs #it{p}_{T}^{trig}",
1404 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1405 fhPtDiffEtaLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1406 fhPtDiffEtaLeadingOppositeHadron->SetYTitle("#eta_{trigger}-#eta_{leading opposite hadron}");
1407 outputContainer->Add(fhPtDiffEtaLeadingOppositeHadron);
1410 //Correlation with charged hadrons
1412 fhDeltaPhiDeltaEtaCharged = new TH2F
1413 ("hDeltaPhiDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}}",
1414 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1415 fhDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
1416 fhDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
1418 fhDeltaPhiDeltaEtaChargedPtA3GeV = new TH2F
1419 ("hDeltaPhiDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}, #it{p}_{TA}>3 GeV/#it{c}}",
1420 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1421 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetXTitle("#Delta #phi (rad)");
1422 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1424 fhPhiCharged = new TH2F
1425 ("hPhiCharged","#phi_{h^{#pm}} vs #it{p}_{T #pm}",
1426 nptbins,ptmin,ptmax,180,0,TMath::TwoPi());
1427 fhPhiCharged->SetYTitle("#phi_{h^{#pm}} (rad)");
1428 fhPhiCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
1430 fhEtaCharged = new TH2F
1431 ("hEtaCharged","#eta_{h^{#pm}} vs #it{p}_{T #pm}",
1432 nptbins,ptmin,ptmax,100,-1.,1.);
1433 fhEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
1434 fhEtaCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
1436 fhDeltaPhiCharged = new TH2F
1437 ("hDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
1438 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1439 fhDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
1440 fhDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1442 fhDeltaPhiChargedPtA3GeV = new TH2F
1443 ("hDeltaPhiChargedPtA3GeV","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}",
1444 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1445 fhDeltaPhiChargedPtA3GeV->SetYTitle("#Delta #phi (rad)");
1446 fhDeltaPhiChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1449 fhDeltaPhiChargedPt = new TH2F
1450 ("hDeltaPhiChargedPt","#phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}",
1451 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1452 fhDeltaPhiChargedPt->SetYTitle("#Delta #phi (rad)");
1453 fhDeltaPhiChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1455 fhDeltaEtaCharged = new TH2F
1456 ("hDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}",
1457 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1458 fhDeltaEtaCharged->SetYTitle("#Delta #eta");
1459 fhDeltaEtaCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1461 fhDeltaEtaChargedPtA3GeV = new TH2F
1462 ("hDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}",
1463 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1464 fhDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1465 fhDeltaEtaChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1468 new TH2F("hXECharged","#it{x}_{#it{E}} for charged tracks",
1469 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1470 fhXECharged->SetYTitle("#it{x}_{#it{E}}");
1471 fhXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1474 new TH2F("hXECharged_Cone2","#it{x}_{#it{E}} for charged tracks in cone 2 (5#pi/6-7#pi/6)",
1475 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1476 fhXECharged_Cone2->SetYTitle("#it{x}_{#it{E}}");
1477 fhXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1480 new TH2F("hXEPositiveCharged","#it{x}_{#it{E}} for positive charged tracks",
1481 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1482 fhXEPosCharged->SetYTitle("#it{x}_{#it{E}}");
1483 fhXEPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1486 new TH2F("hXENegativeCharged","#it{x}_{#it{E}} for negative charged tracks",
1487 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1488 fhXENegCharged->SetYTitle("#it{x}_{#it{E}}");
1489 fhXENegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1492 new TH2F("hHbpXECharged","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
1493 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1494 fhPtHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1495 fhPtHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1497 fhPtHbpXECharged_Cone2 =
1498 new TH2F("hHbpXECharged_Cone2","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons in cone 2 (5#pi/6-7#pi/6)",
1499 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1500 fhPtHbpXECharged_Cone2->SetYTitle("ln(1/#it{x}_{#it{E}})");
1501 fhPtHbpXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1504 new TH2F("hZTCharged","#it{z}_{T} for charged tracks",
1505 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1506 fhZTCharged->SetYTitle("#it{z}_{T}");
1507 fhZTCharged->SetXTitle("#it{p}_{T trigger}");
1510 new TH2F("hZTPositiveCharged","#it{z}_{T} for positive charged tracks",
1511 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1512 fhZTPosCharged->SetYTitle("#it{z}_{T}");
1513 fhZTPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1516 new TH2F("hZTNegativeCharged","#it{z}_{T} for negative charged tracks",
1517 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1518 fhZTNegCharged->SetYTitle("#it{z}_{T}");
1519 fhZTNegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1522 new TH2F("hHbpZTCharged","#xi = ln(1/#it{z}_{T}) with charged hadrons",
1523 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1524 fhPtHbpZTCharged->SetYTitle("ln(1/#it{z}_{T})");
1525 fhPtHbpZTCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1528 new TH2F("hPtTrigPout","Pout with triggers",
1529 nptbins,ptmin,ptmax,nptbins,-1.*ptmax/2.,ptmax/2.);
1530 fhPtTrigPout->SetYTitle("#it{p}_{out} (GeV/#it{c})");
1531 fhPtTrigPout->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1534 new TH2F("hPtTrigCharged","trigger and charged tracks pt distribution",
1535 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1536 fhPtTrigCharged->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1537 fhPtTrigCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1539 outputContainer->Add(fhDeltaPhiDeltaEtaCharged);
1540 outputContainer->Add(fhDeltaPhiDeltaEtaChargedPtA3GeV);
1541 outputContainer->Add(fhPhiCharged) ;
1542 outputContainer->Add(fhEtaCharged) ;
1543 outputContainer->Add(fhDeltaPhiCharged) ;
1544 outputContainer->Add(fhDeltaPhiChargedPtA3GeV) ;
1545 outputContainer->Add(fhDeltaEtaCharged) ;
1546 outputContainer->Add(fhDeltaEtaChargedPtA3GeV) ;
1547 outputContainer->Add(fhDeltaPhiChargedPt) ;
1549 outputContainer->Add(fhXECharged) ;
1550 outputContainer->Add(fhXECharged_Cone2) ;
1554 for(Int_t i=0; i < fgkNmcTypes; i++)
1557 fhDeltaPhiChargedMC[i] = new TH2F(Form("hDeltaPhiCharged_MC%s",nameMC[i].Data()),
1558 Form("#Delta #phi for charged tracks, trigger origin is %s",nameMC[i].Data()),
1559 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
1560 fhDeltaPhiChargedMC[i]->SetYTitle("#it{x}_{#it{E}}");
1561 fhDeltaPhiChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1562 outputContainer->Add(fhDeltaPhiChargedMC[i]) ;
1564 fhXEChargedMC[i] = new TH2F(Form("hXECharged_MC%s",nameMC[i].Data()),
1565 Form("#it{x}_{#it{E}} for charged tracks, trigger origin is %s",nameMC[i].Data()),
1566 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1567 fhXEChargedMC[i]->SetYTitle("#it{x}_{#it{E}}");
1568 fhXEChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1569 outputContainer->Add(fhXEChargedMC[i]) ;
1573 outputContainer->Add(fhXEPosCharged) ;
1574 outputContainer->Add(fhXENegCharged) ;
1575 outputContainer->Add(fhPtHbpXECharged) ;
1576 outputContainer->Add(fhPtHbpXECharged_Cone2) ;
1578 outputContainer->Add(fhZTCharged) ;
1579 outputContainer->Add(fhZTPosCharged) ;
1580 outputContainer->Add(fhZTNegCharged) ;
1581 outputContainer->Add(fhPtHbpZTCharged) ;
1583 outputContainer->Add(fhPtTrigPout) ;
1584 outputContainer->Add(fhPtTrigCharged) ;
1587 if(fMakeSeveralUE) right = "Right";
1589 fhUePart = new TH1F("hUePart","UE particles distribution vs pt trig",
1590 nptbins,ptmin,ptmax);
1591 fhUePart->SetYTitle("dNch");
1592 fhUePart->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1594 fhDeltaPhiUeChargedPt = new TH2F
1595 (Form("hDeltaPhiUe%sChargedPt",right.Data()),"#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}}",
1596 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1597 fhDeltaPhiUeChargedPt->SetYTitle("#Delta #phi (rad)");
1598 fhDeltaPhiUeChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1601 new TH2F(Form("hXEUeCharged%s",right.Data()),"#it{x}_{#it{E}} for Underlying Event",
1602 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1603 fhXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
1604 fhXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1606 fhPtHbpXEUeCharged =
1607 new TH2F(Form("hHbpXEUeCharged%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for Underlying Event",
1608 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1609 fhPtHbpXEUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1610 fhPtHbpXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1613 new TH2F(Form("hZTUeCharged%s",right.Data()),"#it{z}_{T} for Underlying Event",
1614 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1615 fhZTUeCharged->SetYTitle("#it{z}_{T}");
1616 fhZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1618 fhPtHbpZTUeCharged =
1619 new TH2F(Form("hHbpZTUeCharged%s",right.Data()),"#xi = ln(1/#it{z}_{T}) for Underlying Event",
1620 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1621 fhPtHbpZTUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1622 fhPtHbpZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1624 outputContainer->Add(fhUePart);
1625 outputContainer->Add(fhDeltaPhiUeChargedPt) ;
1626 outputContainer->Add(fhXEUeCharged) ;
1627 outputContainer->Add(fhPtHbpXEUeCharged) ;
1628 outputContainer->Add(fhZTUeCharged) ;
1629 outputContainer->Add(fhPtHbpZTUeCharged) ;
1633 fhDeltaPhiUeLeftCharged = new TH2F
1634 ("hDeltaPhiUeLeftChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left side range of trigger particles",
1635 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1636 fhDeltaPhiUeLeftCharged->SetYTitle("#Delta #phi (rad)");
1637 fhDeltaPhiUeLeftCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1638 outputContainer->Add(fhDeltaPhiUeLeftCharged) ;
1640 fhDeltaPhiUeLeftUpCharged = new TH2F
1641 ("hDeltaPhiUeLeftUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Up side range of trigger particles",
1642 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1643 fhDeltaPhiUeLeftUpCharged->SetYTitle("#Delta #phi (rad)");
1644 fhDeltaPhiUeLeftUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1645 outputContainer->Add(fhDeltaPhiUeLeftUpCharged) ;
1647 fhDeltaPhiUeRightUpCharged = new TH2F
1648 ("hDeltaPhiUeRightUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Up side range of trigger particles",
1649 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1650 fhDeltaPhiUeRightUpCharged->SetYTitle("#Delta #phi (rad)");
1651 fhDeltaPhiUeRightUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1652 outputContainer->Add(fhDeltaPhiUeRightUpCharged) ;
1654 fhDeltaPhiUeLeftDownCharged = new TH2F
1655 ("hDeltaPhiUeLeftDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Down side range of trigger particles",
1656 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1657 fhDeltaPhiUeLeftDownCharged->SetYTitle("#Delta #phi (rad)");
1658 fhDeltaPhiUeLeftDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1659 outputContainer->Add(fhDeltaPhiUeLeftDownCharged) ;
1661 fhDeltaPhiUeRightDownCharged = new TH2F
1662 ("hDeltaPhiUeRightDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Down side range of trigger particles",
1663 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1664 fhDeltaPhiUeRightDownCharged->SetYTitle("#Delta #phi (rad)");
1665 fhDeltaPhiUeRightDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1666 outputContainer->Add(fhDeltaPhiUeRightDownCharged) ;
1669 new TH2F("hXEUeChargedLeft","#it{x}_{#it{E}} with UE left side of trigger",
1670 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1671 fhXEUeLeftCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1672 fhXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1673 outputContainer->Add(fhXEUeLeftCharged) ;
1675 fhXEUeLeftUpCharged =
1676 new TH2F("hXEUeChargedLeftUp","#it{x}_{#it{E}} with UE left Up side of trigger",
1677 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1678 fhXEUeLeftUpCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1679 fhXEUeLeftUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1680 outputContainer->Add(fhXEUeLeftUpCharged) ;
1682 fhXEUeRightUpCharged =
1683 new TH2F("hXEUeChargedRightUp","#it{x}_{#it{E} h^{#pm}} with UE right Up side of trigger",
1684 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1685 fhXEUeRightUpCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1686 fhXEUeRightUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1687 outputContainer->Add(fhXEUeRightUpCharged) ;
1689 fhXEUeLeftDownCharged =
1690 new TH2F("hXEUeChargedLeftDown","#it{x}_{#it{E}} with UE left Down side of trigger",
1691 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1692 fhXEUeLeftDownCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1693 fhXEUeLeftDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1694 outputContainer->Add(fhXEUeLeftDownCharged) ;
1696 fhXEUeRightDownCharged =
1697 new TH2F("hXEUeChargedRightDown","#it{x}_{#it{E} h^{#pm}} with UE right Down side of trigger",
1698 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1699 fhXEUeRightDownCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1700 fhXEUeRightDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1701 outputContainer->Add(fhXEUeRightDownCharged) ;
1703 fhPtHbpXEUeLeftCharged =
1704 new TH2F("hHbpXEUeChargedLeft","#xi = ln(1/#it{x}_{#it{E}}) with charged UE left side of trigger",
1705 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1706 fhPtHbpXEUeLeftCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1707 fhPtHbpXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1708 outputContainer->Add(fhPtHbpXEUeLeftCharged) ;
1711 new TH2F("hZTUeChargedLeft","#it{z}_{trigger h^{#pm}} = #it{p}_{T Ueh^{#pm}} / #it{p}_{T trigger} with UE left side of trigger",
1712 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1713 fhZTUeLeftCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1714 fhZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1715 outputContainer->Add(fhZTUeLeftCharged) ;
1717 fhPtHbpZTUeLeftCharged =
1718 new TH2F("hHbpZTUeChargedLeft","#xi = ln(1/#it{z}_{T}) with charged UE left side of trigger",
1719 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1720 fhPtHbpZTUeLeftCharged->SetYTitle("ln(1/#it{z}_{T})");
1721 fhPtHbpZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1722 outputContainer->Add(fhPtHbpZTUeLeftCharged) ;
1725 if(fFillPileUpHistograms)
1727 fhDeltaPhiChargedOtherBC = new TH2F
1728 ("hDeltaPhiChargedOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC!=0",
1729 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1730 fhDeltaPhiChargedOtherBC->SetYTitle("#Delta #phi (rad)");
1731 fhDeltaPhiChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1733 fhDeltaPhiChargedPtA3GeVOtherBC = new TH2F
1734 ("hDeltaPhiChargedPtA3GeVOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC!=0",
1735 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1736 fhDeltaPhiChargedPtA3GeVOtherBC->SetYTitle("#Delta #phi (rad)");
1737 fhDeltaPhiChargedPtA3GeVOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1739 fhPtTrigChargedOtherBC =
1740 new TH2F("hPtTrigChargedOtherBC","trigger and charged tracks pt distribution, track BC!=0",
1741 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1742 fhPtTrigChargedOtherBC->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1743 fhPtTrigChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1745 fhXEChargedOtherBC =
1746 new TH2F("hXEChargedOtherBC","#it{x}_{#it{E}} for charged tracks, track BC!=0",
1747 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1748 fhXEChargedOtherBC->SetYTitle("#it{x}_{#it{E}}");
1749 fhXEChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1751 fhXEUeChargedOtherBC =
1752 new TH2F("hXEUeChargedOtherBC","#it{x}_{#it{E}} for Underlying Event, track BC!=0",
1753 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1754 fhXEUeChargedOtherBC->SetYTitle("#it{x}_{#it{E}}");
1755 fhXEUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1757 fhZTChargedOtherBC =
1758 new TH2F("hZTChargedOtherBC","#it{z}_{T} for charged tracks, track BC!=0",
1759 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1760 fhZTChargedOtherBC->SetYTitle("#it{z}_{T}");
1761 fhZTChargedOtherBC->SetXTitle("#it{p}_{T trigger}");
1763 fhZTUeChargedOtherBC =
1764 new TH2F("hZTUeChargedOtherBC","#it{z}_{T} for Underlying Event, track BC!=0",
1765 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1766 fhZTUeChargedOtherBC->SetYTitle("#it{z}_{T}");
1767 fhZTUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1769 outputContainer->Add(fhDeltaPhiChargedOtherBC) ;
1770 outputContainer->Add(fhDeltaPhiChargedPtA3GeVOtherBC) ;
1771 outputContainer->Add(fhXEChargedOtherBC) ;
1772 outputContainer->Add(fhXEUeChargedOtherBC) ;
1773 outputContainer->Add(fhZTChargedOtherBC) ;
1774 outputContainer->Add(fhZTUeChargedOtherBC) ;
1775 outputContainer->Add(fhPtTrigChargedOtherBC) ;
1777 fhDeltaPhiChargedBC0 = new TH2F
1778 ("hDeltaPhiChargedBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0",
1779 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1780 fhDeltaPhiChargedBC0->SetYTitle("#Delta #phi (rad)");
1781 fhDeltaPhiChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1783 fhDeltaPhiChargedPtA3GeVBC0 = new TH2F
1784 ("hDeltaPhiChargedPtA3GeVBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0",
1785 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1786 fhDeltaPhiChargedPtA3GeVBC0->SetYTitle("#Delta #phi (rad)");
1787 fhDeltaPhiChargedPtA3GeVBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1789 fhPtTrigChargedBC0 =
1790 new TH2F("hPtTrigChargedBC0","trigger and charged tracks pt distribution, track BC==0",
1791 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1792 fhPtTrigChargedBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1793 fhPtTrigChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1796 new TH2F("hXEChargedBC0","#it{x}_{#it{E}} for charged tracks, track BC==0",
1797 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1798 fhXEChargedBC0->SetYTitle("#it{x}_{#it{E}}");
1799 fhXEChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1802 new TH2F("hXEUeChargedBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0",
1803 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1804 fhXEUeChargedBC0->SetYTitle("#it{x}_{#it{E}}");
1805 fhXEUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1808 new TH2F("hZTChargedBC0","#it{z}_{T} for charged tracks, track BC==0",
1809 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1810 fhZTChargedBC0->SetYTitle("#it{z}_{T}");
1811 fhZTChargedBC0->SetXTitle("#it{p}_{T trigger}");
1814 new TH2F("hZTUeChargedBC0","#it{z}_{T} for Underlying Event, track BC==0",
1815 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1816 fhZTUeChargedBC0->SetYTitle("#it{z}_{T}");
1817 fhZTUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1819 outputContainer->Add(fhDeltaPhiChargedBC0) ;
1820 outputContainer->Add(fhDeltaPhiChargedPtA3GeVBC0) ;
1821 outputContainer->Add(fhXEChargedBC0) ;
1822 outputContainer->Add(fhXEUeChargedBC0) ;
1823 outputContainer->Add(fhZTChargedBC0) ;
1824 outputContainer->Add(fhZTUeChargedBC0) ;
1825 outputContainer->Add(fhPtTrigChargedBC0) ;
1827 fhPtTriggerVtxBC0 = new TH1F("hPtTriggerVtxBC0","#it{p}_{T} distribution of trigger particles", nptbins,ptmin,ptmax);
1828 fhPtTriggerVtxBC0->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1830 fhDeltaPhiChargedVtxBC0 = new TH2F
1831 ("hDeltaPhiChargedVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0",
1832 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1833 fhDeltaPhiChargedVtxBC0->SetYTitle("#Delta #phi (rad)");
1834 fhDeltaPhiChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1836 fhDeltaPhiChargedPtA3GeVVtxBC0 = new TH2F
1837 ("hDeltaPhiChargedPtA3GeVVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0",
1838 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1839 fhDeltaPhiChargedPtA3GeVVtxBC0->SetYTitle("#Delta #phi (rad)");
1840 fhDeltaPhiChargedPtA3GeVVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1842 fhPtTrigChargedVtxBC0 =
1843 new TH2F("hPtTrigChargedVtxBC0","trigger and charged tracks pt distribution, track BC==0",
1844 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1845 fhPtTrigChargedVtxBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1846 fhPtTrigChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1849 new TH2F("hXEChargedVtxBC0","#it{x}_{#it{E}} for charged tracks, track BC==0",
1850 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1851 fhXEChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}");
1852 fhXEChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1854 fhXEUeChargedVtxBC0 =
1855 new TH2F("hXEUeChargedVtxBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0",
1856 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1857 fhXEUeChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}");
1858 fhXEUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1861 new TH2F("hZTChargedVtxBC0","#it{z}_{T} for charged tracks, track BC==0",
1862 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1863 fhZTChargedVtxBC0->SetYTitle("#it{z}_{T}");
1864 fhZTChargedVtxBC0->SetXTitle("#it{p}_{T trigger}");
1866 fhZTUeChargedVtxBC0 =
1867 new TH2F("hZTUeChargedVtxBC0","#it{z}_{T} for Underlying Event, track BC==0",
1868 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1869 fhZTUeChargedVtxBC0->SetYTitle("#it{z}_{T}");
1870 fhZTUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1872 outputContainer->Add(fhPtTriggerVtxBC0);
1873 outputContainer->Add(fhDeltaPhiChargedVtxBC0) ;
1874 outputContainer->Add(fhDeltaPhiChargedPtA3GeVVtxBC0) ;
1875 outputContainer->Add(fhXEChargedVtxBC0) ;
1876 outputContainer->Add(fhXEUeChargedVtxBC0) ;
1877 outputContainer->Add(fhZTChargedVtxBC0) ;
1878 outputContainer->Add(fhZTUeChargedVtxBC0) ;
1879 outputContainer->Add(fhPtTrigChargedVtxBC0) ;
1881 for(Int_t i = 0 ; i < 7 ; i++)
1883 fhPtTriggerPileUp[i] = new TH1F(Form("hPtTriggerPileUp%s",pileUpName[i].Data()),
1884 Form("#it{p}_{T} distribution of trigger particles, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
1885 fhPtTriggerPileUp[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1886 outputContainer->Add(fhPtTriggerPileUp[i]);
1888 fhDeltaPhiChargedPileUp[i] = new TH2F(Form("hDeltaPhiChargedPileUp%s",pileUpName[i].Data()),
1889 Form("#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1890 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1891 fhDeltaPhiChargedPileUp[i]->SetYTitle("#Delta #phi (rad)");
1892 fhDeltaPhiChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1893 outputContainer->Add(fhDeltaPhiChargedPileUp[i]) ;
1895 fhDeltaPhiChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaPhiChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1896 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()),
1897 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1898 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #phi (rad)");
1899 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1900 outputContainer->Add(fhDeltaPhiChargedPtA3GeVPileUp[i]) ;
1902 fhDeltaEtaChargedPileUp[i] = new TH2F(Form("hDeltaEtaChargedPileUp%s",pileUpName[i].Data()),
1903 Form("#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1904 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1905 fhDeltaEtaChargedPileUp[i]->SetYTitle("#Delta #eta");
1906 fhDeltaEtaChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1907 outputContainer->Add(fhDeltaEtaChargedPileUp[i]) ;
1909 fhDeltaEtaChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaEtaChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1910 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()),
1911 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1912 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #eta");
1913 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1914 outputContainer->Add(fhDeltaEtaChargedPtA3GeVPileUp[i]) ;
1916 fhXEChargedPileUp[i] = new TH2F(Form("hXEChargedPileUp%s",pileUpName[i].Data()),
1917 Form("#it{x}_{#it{E}} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1918 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1919 fhXEChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}");
1920 fhXEChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1921 outputContainer->Add(fhXEChargedPileUp[i]) ;
1923 fhXEUeChargedPileUp[i] = new TH2F(Form("hXEUeChargedPileUp%s",pileUpName[i].Data()),
1924 Form("#it{x}_{#it{E}} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1925 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1926 fhXEUeChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}");
1927 fhXEUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1928 outputContainer->Add(fhXEUeChargedPileUp[i]) ;
1930 fhZTChargedPileUp[i] = new TH2F(Form("hZTChargedPileUp%s",pileUpName[i].Data()),
1931 Form("#it{z}_{T} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1932 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1933 fhZTChargedPileUp[i]->SetYTitle("#it{z}_{T}");
1934 fhZTChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1935 outputContainer->Add(fhZTChargedPileUp[i]) ;
1937 fhZTUeChargedPileUp[i] = new TH2F(Form("hZTUeChargedPileUp%s",pileUpName[i].Data()),
1938 Form("#it{z}_{T} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1939 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1940 fhZTUeChargedPileUp[i]->SetYTitle("#it{z}_{T}");
1941 fhZTUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1942 outputContainer->Add(fhZTUeChargedPileUp[i]) ;
1944 fhPtTrigChargedPileUp[i] = new TH2F(Form("hPtTrigChargedPileUp%s",pileUpName[i].Data()),
1945 Form("trigger and charged tracks pt distribution, %s Pile-Up event",pileUpName[i].Data()),
1946 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1947 fhPtTrigChargedPileUp[i]->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1948 fhPtTrigChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1949 outputContainer->Add(fhPtTrigChargedPileUp[i]) ;
1954 if(fFillHighMultHistograms)
1956 Int_t nMultiBins = GetNCentrBin();
1957 fhDeltaPhiChargedMult = new TH2F*[nMultiBins] ;
1958 fhDeltaEtaChargedMult = new TH2F*[nMultiBins] ;
1959 fhXEMult = new TH2F*[nMultiBins] ;
1960 fhXEUeMult = new TH2F*[nMultiBins] ;
1961 fhZTMult = new TH2F*[nMultiBins] ;
1962 fhZTUeMult = new TH2F*[nMultiBins] ;
1964 for(Int_t im=0; im<nMultiBins; im++)
1966 fhDeltaPhiChargedMult[im] = new TH2F
1967 (Form("hDeltaPhiCharged_Mult%d",im),Form("#Delta #phi charged Mult bin %d",im), nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1968 fhDeltaPhiChargedMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1969 fhDeltaPhiChargedMult[im]->SetYTitle("#Delta #phi (rad)");
1971 fhDeltaEtaChargedMult[im] = new TH2F
1972 (Form("hDeltaEtaCharged_Mult%d",im),Form("#Delta #eta charged Mult bin %d",im), nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
1973 fhDeltaEtaChargedMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1974 fhDeltaEtaChargedMult[im]->SetYTitle("#Delta #eta");
1976 fhXEMult[im] = new TH2F
1977 (Form("hXECharged_Mult%d",im),Form("#it{x}_{E} charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1978 fhXEMult[im]->SetYTitle("#it{x}_{E}");
1979 fhXEMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1981 fhXEUeMult[im] = new TH2F
1982 (Form("hXEUeCharged_Mult%d",im),Form("#it{x}_{E} UE charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1983 fhXEUeMult[im]->SetYTitle("#it{x}_{E}");
1984 fhXEUeMult[im]->SetXTitle("#it{p}_{T trigger}(GeV/#it{c})");
1986 fhZTMult[im] = new TH2F
1987 (Form("hZTCharged_Mult%d",im),Form("#it{z}_{T} charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1988 fhZTMult[im]->SetYTitle("#it{z}_{T}");
1989 fhZTMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1991 fhZTUeMult[im] = new TH2F
1992 (Form("hZTUeCharged_Mult%d",im),Form("#it{z}_{T} UE charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1993 fhZTUeMult[im]->SetYTitle("#it{z}_{T}");
1994 fhZTUeMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1996 outputContainer->Add(fhDeltaPhiChargedMult[im]) ;
1997 outputContainer->Add(fhDeltaEtaChargedMult[im]) ;
1998 outputContainer->Add(fhXEMult [im]);
1999 outputContainer->Add(fhXEUeMult[im]);
2000 outputContainer->Add(fhZTMult [im]);
2001 outputContainer->Add(fhZTUeMult[im]);
2007 fhAssocPtBkg = new TH2F("hAssocPtBkg", " Trigger #it{p}_{T} vs associated hadron #it{p}_{T} from background",
2008 nptbins, ptmin, ptmax,nptbins,ptmin,ptmax);
2009 fhAssocPtBkg->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2010 fhAssocPtBkg->SetYTitle("#it{p}_{T associated} (GeV/#it{c})");
2011 outputContainer->Add(fhAssocPtBkg) ;
2013 fhDeltaPhiBrad = new TH2F("hDeltaPhiBrad","atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs #it{p}_{T trigger} ",
2014 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
2015 fhDeltaPhiBrad->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2016 fhDeltaPhiBrad->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
2017 outputContainer->Add(fhDeltaPhiBrad) ;
2020 fhDeltaPhiDeltaEtaAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2021 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2022 fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
2023 fhDeltaPhiAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
2024 if(fFillMomImbalancePtAssocBinsHisto)
2026 fhXEAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2027 fhZTAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2032 fhXEVZ = new TH2F*[nz];
2033 fhZTVZ = new TH2F*[nz];
2037 fhDeltaPhiBradAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2040 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2041 if(fFillEtaGapsHisto)fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
2042 if(fDecayTrigger) fhDeltaPhiDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2045 if(fHMPIDCorrelation)
2047 fhDeltaPhiAssocPtBinHMPID = new TH2F*[fNAssocPtBins*nz];
2048 fhDeltaPhiAssocPtBinHMPIDAcc= new TH2F*[fNAssocPtBins*nz];
2051 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2053 for(Int_t z = 0 ; z < nz ; z++)
2059 sz = Form("_vz%d",z);
2060 tz = Form(", #it{v}_{#it{z}} bin %d",z);
2063 //printf("iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
2065 fhDeltaPhiDeltaEtaAssocPtBin[bin] = new TH2F(Form("hDeltaPhiDeltaEtaPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2066 Form("#Delta #phi vs #Delta #eta for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2067 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
2068 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
2069 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetYTitle("#Delta #eta");
2071 fhDeltaPhiAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2072 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()),
2073 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2074 fhDeltaPhiAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2075 fhDeltaPhiAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
2077 outputContainer->Add(fhDeltaPhiDeltaEtaAssocPtBin[bin]) ;
2078 outputContainer->Add(fhDeltaPhiAssocPtBin[bin]) ;
2080 if(fFillEtaGapsHisto)
2082 fhDeltaPhiAssocPtBinDEta08[bin] = new TH2F(Form("hDeltaPhiDeltaEta0.8PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2083 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()),
2084 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2085 fhDeltaPhiAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2086 fhDeltaPhiAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
2088 fhDeltaPhiAssocPtBinDEta0[bin] = new TH2F(Form("hDeltaPhiDeltaEta0PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2089 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()),
2090 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2091 fhDeltaPhiAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2092 fhDeltaPhiAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
2094 outputContainer->Add(fhDeltaPhiAssocPtBinDEta08[bin]) ;
2095 outputContainer->Add(fhDeltaPhiAssocPtBinDEta0[bin]) ;
2100 fhDeltaPhiDecayChargedAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtDecayChargedAssocPt%2.1f_%2.1f%s_bit%d", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data(),fDecayBits[0]),
2101 Form("#Delta #phi vs #it{p}_{T trigger} tagged as decay for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, Bit %d", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data(),fDecayBits[0]),
2102 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2103 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2104 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
2106 outputContainer->Add(fhDeltaPhiDecayChargedAssocPtBin[bin]) ;
2111 fhDeltaPhiBradAssocPtBin[bin] = new TH2F(Form("hDeltaPhiBradPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2112 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()),
2113 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
2114 fhDeltaPhiBradAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2115 fhDeltaPhiBradAssocPtBin[bin]->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
2116 outputContainer->Add(fhDeltaPhiBradAssocPtBin[bin]) ;
2119 if(fHMPIDCorrelation)
2121 fhDeltaPhiAssocPtBinHMPID[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPID", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2122 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()),
2123 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2124 fhDeltaPhiAssocPtBinHMPID[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})" );
2125 fhDeltaPhiAssocPtBinHMPID[bin]->SetYTitle("#Delta #phi (rad)");
2127 fhDeltaPhiAssocPtBinHMPIDAcc[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPIDAcc", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2128 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()),
2129 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2130 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2131 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetYTitle("#Delta #phi (rad)");
2133 outputContainer->Add(fhDeltaPhiAssocPtBinHMPID [bin]) ;
2134 outputContainer->Add(fhDeltaPhiAssocPtBinHMPIDAcc[bin]) ;
2139 if(fFillMomImbalancePtAssocBinsHisto)
2141 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2143 fhXEAssocPtBin[i] = new TH2F(Form("hXEAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
2144 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]),
2145 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2146 fhXEAssocPtBin[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2147 fhXEAssocPtBin[i]->SetYTitle("#it{x}_{#it{E}}");
2149 fhZTAssocPtBin[i] = new TH2F(Form("hZTAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
2150 Form("#it{z}_{T} vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
2151 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2152 fhZTAssocPtBin[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2153 fhZTAssocPtBin[i]->SetYTitle("#it{z}_{T}");
2156 outputContainer->Add(fhXEAssocPtBin[i]);
2157 outputContainer->Add(fhZTAssocPtBin[i]);
2163 for(Int_t z = 0 ; z < nz ; z++)
2165 sz = Form("_vz%d",z);
2166 tz = Form(", #it{v}_{#it{z}} bin %d",z);
2168 fhXEVZ[z] = new TH2F(Form("hXE%s", sz.Data()),
2169 Form("#it{x}_{#it{E}} vs #it{p}_{T trigger}%s", tz.Data()),
2170 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2171 fhXEVZ[z]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2172 fhXEVZ[z]->SetYTitle("#it{x}_{#it{E}}");
2174 fhZTVZ[z] = new TH2F(Form("hZT%s",sz.Data()),
2175 Form("#it{z}_{T} vs #it{p}_{T trigger}%s", tz.Data()),
2176 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2177 fhZTVZ[z]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2178 fhZTVZ[z]->SetYTitle("#it{z}_{T}");
2180 outputContainer->Add(fhXEVZ[z]);
2181 outputContainer->Add(fhZTVZ[z]);
2188 fhPtPi0DecayRatio = new TH2F
2189 ("hPtPi0DecayRatio","#it{p}_{T} of #pi^{0} and the ratio of pt for two decay",
2190 nptbins,ptmin,ptmax, 100,0.,2.);
2191 fhPtPi0DecayRatio->SetXTitle("#it{p}_{T}^{#pi^{0}} (GeV/#it{c})");
2192 fhPtPi0DecayRatio->SetYTitle("#it{p}_{T}^{Decay}/#it{p}_{T}^{#pi^{0}}");
2193 outputContainer->Add(fhPtPi0DecayRatio) ;
2195 fhDeltaPhiPi0DecayCharged = new TH2F
2196 ("hDeltaPhiPi0DecayCharged","#phi_{Decay} - #phi_{h^{#pm}} vs #it{p}_{T Decay}",
2197 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2198 fhDeltaPhiPi0DecayCharged->SetYTitle("#Delta #phi (rad)");
2199 fhDeltaPhiPi0DecayCharged->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
2201 fhXEPi0DecayCharged =
2202 new TH2F("hXEPi0DecayCharged","#it{x}_{#it{E}} Decay",
2203 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2204 fhXEPi0DecayCharged->SetYTitle("#it{x}_{#it{E}}");
2205 fhXEPi0DecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2207 fhZTPi0DecayCharged =
2208 new TH2F("hZTPi0DecayCharged","#it{z}_{trigger h^{#pm}} = #it{p}_{T h^{#pm}} / #it{p}_{T Decay}",
2209 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2210 fhZTPi0DecayCharged->SetYTitle("#it{z}_{decay h^{#pm}}");
2211 fhZTPi0DecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2213 outputContainer->Add(fhDeltaPhiPi0DecayCharged) ;
2214 outputContainer->Add(fhXEPi0DecayCharged) ;
2215 outputContainer->Add(fhZTPi0DecayCharged) ;
2220 for(Int_t ibit = 0; ibit< fNDecayBits; ibit++)
2222 fhDeltaPhiDecayCharged[ibit] = new TH2F
2223 (Form("hDeltaPhiDecayCharged_bit%d",fDecayBits[ibit]),
2224 Form("#phi_{Decay} - #phi_{h^{#pm}} vs #it{p}_{T Decay}, Bit %d",fDecayBits[ibit]),
2225 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2226 fhDeltaPhiDecayCharged[ibit]->SetYTitle("#Delta #phi (rad)");
2227 fhDeltaPhiDecayCharged[ibit]->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
2229 fhXEDecayCharged[ibit] =
2230 new TH2F(Form("hXEDecayCharged_bit%d",fDecayBits[ibit]),
2231 Form("#it{x}_{#it{E}} Decay, Bit %d",fDecayBits[ibit]),
2232 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2233 fhXEDecayCharged[ibit]->SetYTitle("#it{x}_{#it{E}}");
2234 fhXEDecayCharged[ibit]->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2236 fhZTDecayCharged[ibit] =
2237 new TH2F(Form("hZTDecayCharged_bit%d",fDecayBits[ibit]),
2238 Form("#it{z}_{trigger h^{#pm}} = #it{p}_{T h^{#pm}} / #it{p}_{T Decay}, Bit %d",fDecayBits[ibit]),
2239 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2240 fhZTDecayCharged[ibit]->SetYTitle("#it{z}_{decay h^{#pm}}");
2241 fhZTDecayCharged[ibit]->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2243 outputContainer->Add(fhDeltaPhiDecayCharged[ibit]) ;
2244 outputContainer->Add(fhXEDecayCharged[ibit]) ;
2245 outputContainer->Add(fhZTDecayCharged[ibit]) ;
2249 //Correlation with neutral hadrons
2252 fhDeltaPhiDeltaEtaNeutral = new TH2F
2253 ("hDeltaPhiDeltaEtaNeutral","#phi_{trigger} - #phi_{h^{0}} vs #eta_{trigger} - #eta_{h^{0}}",
2254 ndeltaphibins ,deltaphimin,deltaphimax, ndeltaetabins ,deltaetamin,deltaetamax);
2255 fhDeltaPhiDeltaEtaNeutral->SetXTitle("#Delta #phi (rad)");
2256 fhDeltaPhiDeltaEtaNeutral->SetYTitle("#Delta #eta");
2258 fhPhiNeutral = new TH2F
2259 ("hPhiNeutral","#phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}",
2260 nptbins,ptmin,ptmax,180,0,TMath::TwoPi());
2261 fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)");
2262 fhPhiNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})");
2264 fhEtaNeutral = new TH2F
2265 ("hEtaNeutral","#eta_{#pi^{0}} vs #it{p}_{T #pi^{0}}",
2266 nptbins,ptmin,ptmax,200,-1.,1.);
2267 fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)");
2268 fhEtaNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})");
2270 fhDeltaPhiNeutral = new TH2F
2271 ("hDeltaPhiNeutral","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T trigger}",
2272 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2273 fhDeltaPhiNeutral->SetYTitle("#Delta #phi (rad)");
2274 fhDeltaPhiNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2276 fhDeltaPhiNeutralPt = new TH2F
2277 ("hDeltaPhiNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}",
2278 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2279 fhDeltaPhiNeutralPt->SetYTitle("#Delta #phi (rad)");
2280 fhDeltaPhiNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2282 fhDeltaEtaNeutral = new TH2F
2283 ("hDeltaEtaNeutral","#eta_{trigger} - #eta_{#pi^{0}} vs #it{p}_{T trigger}",
2284 nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
2285 fhDeltaEtaNeutral->SetYTitle("#Delta #eta");
2286 fhDeltaEtaNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2289 new TH2F("hXENeutral","#it{x}_{#it{E}} for #pi^{0} associated",
2290 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2291 fhXENeutral->SetYTitle("#it{x}_{#it{E}}");
2292 fhXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2295 new TH2F("hHbpXENeutral","#xi = ln(1/#it{x}_{#it{E}})for #pi^{0} associated",
2296 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2297 fhPtHbpXENeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2298 fhPtHbpXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2301 new TH2F("hZTNeutral","#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated",
2302 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2303 fhZTNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}");
2304 fhZTNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2307 new TH2F("hHbpZTNeutral","#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2308 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2309 fhPtHbpZTNeutral->SetYTitle("ln(1/#it{z}_{T})");
2310 fhPtHbpZTNeutral->SetXTitle("#it{p}_{T trigger}");
2312 outputContainer->Add(fhDeltaPhiDeltaEtaNeutral);
2313 outputContainer->Add(fhPhiNeutral) ;
2314 outputContainer->Add(fhEtaNeutral) ;
2315 outputContainer->Add(fhDeltaPhiNeutral) ;
2316 outputContainer->Add(fhDeltaPhiNeutralPt) ;
2317 outputContainer->Add(fhDeltaEtaNeutral) ;
2318 outputContainer->Add(fhXENeutral) ;
2319 outputContainer->Add(fhPtHbpXENeutral) ;
2320 outputContainer->Add(fhZTNeutral) ;
2321 outputContainer->Add(fhPtHbpZTNeutral) ;
2323 fhDeltaPhiUeNeutralPt = new TH2F
2324 (Form("hDeltaPhiUe%sNeutralPt",right.Data()),"#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}",
2325 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2326 fhDeltaPhiUeNeutralPt->SetYTitle("#Delta #phi (rad)");
2327 fhDeltaPhiUeNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2330 new TH2F(Form("hXEUeNeutral%s",right.Data()),"#it{x}_{#it{E}} for #pi^{0} associated",
2331 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2332 fhXEUeNeutral->SetYTitle("#it{x}_{#it{E}}");
2333 fhXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2335 fhPtHbpXEUeNeutral =
2336 new TH2F(Form("hHbpXEUeNeutral%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2337 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2338 fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2339 fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2342 new TH2F(Form("hZTUeNeutral%s",right.Data()),"#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated",
2343 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2344 fhZTUeNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}");
2345 fhZTUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2347 fhPtHbpZTUeNeutral =
2348 new TH2F(Form("hHbpZTUeNeutral%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2349 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2350 fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{z}_{T})");
2351 fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2353 outputContainer->Add(fhDeltaPhiUeNeutralPt) ;
2354 outputContainer->Add(fhXEUeNeutral) ;
2355 outputContainer->Add(fhPtHbpXEUeNeutral) ;
2356 outputContainer->Add(fhZTUeNeutral) ;
2357 outputContainer->Add(fhPtHbpZTUeNeutral) ;
2361 fhDeltaPhiUeLeftNeutral = new TH2F
2362 ("hDeltaPhiUeLeftNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs #it{p}_{T h^{0}} with neutral UE left side range of trigger particles",
2363 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2364 fhDeltaPhiUeLeftNeutral->SetYTitle("#Delta #phi (rad)");
2365 fhDeltaPhiUeLeftNeutral->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2366 outputContainer->Add(fhDeltaPhiUeLeftNeutral) ;
2369 new TH2F("hXEUeNeutralLeft","#it{x}_{#it{E}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger",
2370 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2371 fhXEUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2372 fhXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2373 outputContainer->Add(fhXEUeLeftNeutral) ;
2375 fhPtHbpXEUeLeftNeutral =
2376 new TH2F("hHbpXEUeNeutralLeft","#xi = ln(1/#it{x}_{#it{E}}) with neutral UE left side of trigger",
2377 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2378 fhPtHbpXEUeLeftNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2379 fhPtHbpXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2380 outputContainer->Add(fhPtHbpXEUeLeftNeutral) ;
2383 new TH2F("hZTUeNeutralLeft","#it{z}_{trigger h^{0}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger",
2384 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2385 fhZTUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2386 fhZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2387 outputContainer->Add(fhZTUeLeftNeutral) ;
2389 fhPtHbpZTUeLeftNeutral =
2390 new TH2F("hHbpZTUeNeutralLeft","#xi = ln(1/#it{z}_{T}) with neutral UE left side of trigger",
2391 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2392 fhPtHbpZTUeLeftNeutral->SetYTitle("ln(1/#it{z}_{T})");
2393 fhPtHbpZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger}");
2394 outputContainer->Add(fhPtHbpZTUeLeftNeutral) ;
2399 fhDeltaPhiPi0DecayNeutral = new TH2F
2400 ("hDeltaPhiPi0DecayNeutral","#phi_{Decay} - #phi_{h^{0}} vs #it{p}_{T Decay}",
2401 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2402 fhDeltaPhiPi0DecayNeutral->SetYTitle("#Delta #phi (rad)");
2403 fhDeltaPhiPi0DecayNeutral->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
2405 fhXEPi0DecayNeutral =
2406 new TH2F("hXEPi0DecayNeutral","#it{x}_{#it{E}} for decay trigger",
2407 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2408 fhXEPi0DecayNeutral->SetYTitle("#it{x}_{#it{E}}");
2409 fhXEPi0DecayNeutral->SetXTitle("#it{p}_{T decay}");
2411 fhZTPi0DecayNeutral =
2412 new TH2F("hZTPi0DecayNeutral","#it{z}_{trigger h^{0}} = #it{p}_{T h^{0}} / #it{p}_{T Decay}",
2413 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2414 fhZTPi0DecayNeutral->SetYTitle("#it{z}_{h^{0}}");
2415 fhZTPi0DecayNeutral->SetXTitle("#it{p}_{T decay}");
2417 outputContainer->Add(fhDeltaPhiPi0DecayNeutral) ;
2418 outputContainer->Add(fhXEPi0DecayNeutral) ;
2419 outputContainer->Add(fhZTPi0DecayNeutral) ;
2421 }//Correlation with neutral hadrons
2423 // If data is MC, fill more histograms, depending on origin
2426 for(Int_t i= fMCGenTypeMin; i <= fMCGenTypeMax; i++)
2428 fhMCPtTrigger[i] = new TH1F (Form("hMCPtTrigger_%s",nameMC[i].Data()),
2429 Form("MC %s: generated trigger #it{p}_{T}",nameMC[i].Data()),
2430 nptbins,ptmin,ptmax);
2431 fhMCPtTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2433 fhMCPhiTrigger[i] = new TH2F (Form("hMCPhiTrigger_%s",nameMC[i].Data()),
2434 Form("MC %s: generated trigger #phi",nameMC[i].Data()),
2435 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2436 fhMCPhiTrigger[i]->SetYTitle("#phi (rad)");
2437 fhMCPhiTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2439 fhMCEtaTrigger[i] = new TH2F (Form("hMCEtaTrigger_%s",nameMC[i].Data()),
2440 Form("MC %s: generated trigger #eta",nameMC[i].Data()),
2441 nptbins,ptmin,ptmax, netabins,etamin,etamax);
2442 fhMCEtaTrigger[i]->SetYTitle("#eta");
2443 fhMCEtaTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2445 if(fMakeAbsoluteLeading || fMakeNearSideLeading)
2447 fhMCPtTriggerNotLeading[i] = new TH1F (Form("hMCPtTriggerNotLeading_%s",nameMC[i].Data()),
2448 Form("MC %s: generated trigger #it{p}_{T}, when not leading of primaries",nameMC[i].Data()),
2449 nptbins,ptmin,ptmax);
2450 fhMCPtTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2452 fhMCPhiTriggerNotLeading[i] = new TH2F (Form("hMCPhiTriggerNotLeading_%s",nameMC[i].Data()),
2453 Form("MC %s: generated trigger #phi, when not leading of primaries",nameMC[i].Data()),
2454 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2455 fhMCPhiTriggerNotLeading[i]->SetYTitle("#phi (rad)");
2456 fhMCPhiTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2459 fhMCEtaTriggerNotLeading[i] = new TH2F (Form("hMCEtaTriggerNotLeading_%s",nameMC[i].Data()),
2460 Form("MC %s: generated triogger #eta, when not leading of primaries",nameMC[i].Data()),
2461 nptbins,ptmin,ptmax, netabins,etamin,etamax);
2462 fhMCEtaTriggerNotLeading[i]->SetYTitle("#eta ");
2463 fhMCEtaTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2466 fhMCEtaCharged[i] = new TH2F (Form("hMCEtaCharged_%s",nameMC[i].Data()),
2467 Form("MC %s: #eta_{h^{#pm}} vs #it{p}_{T #pm}",nameMC[i].Data()),
2468 nptbins,ptmin,ptmax,100,-1.,1.);
2469 fhMCEtaCharged[i]->SetYTitle("#eta_{h^{#pm}} (rad)");
2470 fhMCEtaCharged[i]->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
2472 fhMCPhiCharged[i] = new TH2F(Form("hMCPhiCharged_%s",nameMC[i].Data()),
2473 Form("MC %s: phi_{h^{#pm}} vs #it{p}_{T #pm}",nameMC[i].Data()),
2474 nptbins,ptmin,ptmax,180,0,TMath::TwoPi());
2475 fhMCPhiCharged[i]->SetYTitle("MC #phi_{h^{#pm}} (rad)");
2476 fhMCPhiCharged[i]->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
2478 fhMCDeltaPhiDeltaEtaCharged[i] = new TH2F (Form("hMCDeltaPhiDeltaEtaCharged_%s",nameMC[i].Data()),
2479 Form("MC %s: phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",nameMC[i].Data()),
2480 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2481 fhMCDeltaPhiDeltaEtaCharged[i]->SetXTitle("#Delta #phi (rad)");
2482 fhMCDeltaPhiDeltaEtaCharged[i]->SetYTitle("#Delta #eta");
2484 fhMCDeltaEtaCharged[i] = new TH2F (Form("hMCDeltaEtaCharged_%s",nameMC[i].Data()),
2485 Form("MC %s: #eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger} and #it{p}_{T assoc}",nameMC[i].Data()),
2486 nptbins,ptmin,ptmax,ndeltaetabins ,deltaetamin,deltaetamax);
2487 fhMCDeltaEtaCharged[i]->SetYTitle("#Delta #eta");
2488 fhMCDeltaEtaCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2490 fhMCDeltaPhiCharged[i] = new TH2F (Form("hMCDeltaPhiCharged_%s",nameMC[i].Data()),
2491 Form("MC %s: #phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",nameMC[i].Data()),
2492 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2493 fhMCDeltaPhiCharged[i]->SetYTitle("#Delta #phi (rad)");
2494 fhMCDeltaPhiCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2496 fhMCDeltaPhiChargedPt[i] = new TH2F (Form("hMCDeltaPhiChargedPt_%s",nameMC[i].Data()),
2497 Form("MC %s: #phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}",nameMC[i].Data()),
2498 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2499 fhMCDeltaPhiChargedPt[i]->SetYTitle("#Delta #phi (rad)");
2500 fhMCDeltaPhiChargedPt[i]->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
2502 fhMCPtXECharged[i] = new TH2F (Form("hMCPtXECharged_%s",nameMC[i].Data()),
2503 Form("MC %s: #it{x}_{#it{E}} with charged hadrons",nameMC[i].Data()),
2504 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2505 fhMCPtXECharged[i]->SetYTitle("#it{x}_{#it{E}}");
2506 fhMCPtXECharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2508 fhMCPtHbpXECharged[i] = new TH2F(Form("hMCHbpXECharged_%s",nameMC[i].Data()),
2509 Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",nameMC[i].Data()),
2510 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2511 fhMCPtHbpXECharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})");
2512 fhMCPtHbpXECharged[i]->SetXTitle("#it{p}_{T trigger}");
2514 fhMCPtZTCharged[i] = new TH2F(Form("hMCPtZTCharged_%s",nameMC[i].Data()),
2515 Form("MC %s: #it{z}_{T} with charged hadrons",nameMC[i].Data()),
2516 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2517 fhMCPtZTCharged[i]->SetYTitle("#it{z}_{T}");
2518 fhMCPtZTCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2520 fhMCPtHbpZTCharged[i] = new TH2F(Form("hMCHbpZTCharged_%s",nameMC[i].Data()),
2521 Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons",nameMC[i].Data()),
2522 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2523 fhMCPtHbpZTCharged[i]->SetYTitle("ln(1/#it{z}_{T})");
2524 fhMCPtHbpZTCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2526 fhMCPtTrigPout[i] = new TH2F(Form("hMCPtTrigPout_%s",nameMC[i].Data()),
2527 Form("MC %s: #it{p}_{out} with triggers",nameMC[i].Data()),
2528 nptbins,ptmin,ptmax,nptbins,-1.*ptmax/2.,ptmax/2.);
2529 fhMCPtTrigPout[i]->SetYTitle("#it{p}_{out} (GeV/#it{c})");
2530 fhMCPtTrigPout[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2532 fhMCPtAssocDeltaPhi[i] = new TH2F(Form("hMCPtAssocDeltaPhi_%s",nameMC[i].Data()),
2533 Form("MC %s: #Delta #phi with associated charged hadrons",nameMC[i].Data()),
2534 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2535 fhMCPtAssocDeltaPhi[i]->SetYTitle("#Delta #phi (rad)");
2536 fhMCPtAssocDeltaPhi[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2538 outputContainer->Add(fhMCPtTrigger[i]);
2539 outputContainer->Add(fhMCPhiTrigger[i]);
2540 outputContainer->Add(fhMCEtaTrigger[i]);
2542 if(fMakeAbsoluteLeading || fMakeNearSideLeading)
2544 outputContainer->Add(fhMCPtTriggerNotLeading[i]);
2545 outputContainer->Add(fhMCPhiTriggerNotLeading[i]);
2546 outputContainer->Add(fhMCEtaTriggerNotLeading[i]);
2549 outputContainer->Add(fhMCDeltaPhiDeltaEtaCharged[i]);
2550 outputContainer->Add(fhMCPhiCharged[i]) ;
2551 outputContainer->Add(fhMCEtaCharged[i]) ;
2552 outputContainer->Add(fhMCDeltaEtaCharged[i]) ;
2553 outputContainer->Add(fhMCDeltaPhiCharged[i]) ;
2555 outputContainer->Add(fhMCDeltaPhiChargedPt[i]) ;
2556 outputContainer->Add(fhMCPtXECharged[i]) ;
2557 outputContainer->Add(fhMCPtZTCharged[i]) ;
2558 outputContainer->Add(fhMCPtHbpXECharged[i]) ;
2559 outputContainer->Add(fhMCPtHbpZTCharged[i]) ;
2560 outputContainer->Add(fhMCPtTrigPout[i]) ;
2561 outputContainer->Add(fhMCPtAssocDeltaPhi[i]) ;
2566 new TH1F(Form("hMCUePart_%s",nameMC[i].Data()),
2567 Form("MC %s: UE particles distribution vs #it{p}_{T trigger}",nameMC[i].Data()),
2568 nptbins,ptmin,ptmax);
2569 fhMCUePart[i]->SetYTitle("#it{dN}^{ch}");
2570 fhMCUePart[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2572 fhMCPtXEUeCharged[i] =
2573 new TH2F(Form("hMCPtXEUeCharged%s",right.Data()),
2574 Form("MC %s: #it{x}_{#it{E}} with charged hadrons, Underlying Event",nameMC[i].Data()),
2575 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2576 fhMCPtXEUeCharged[i]->SetYTitle("#it{x}_{#it{E}}");
2577 fhMCPtXEUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2579 fhMCPtHbpXEUeCharged[i] =
2580 new TH2F(Form("hMCPtHbpXEUeCharged%s",right.Data()),
2581 Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, Underlying Event",nameMC[i].Data()),
2582 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2583 fhMCPtHbpXEUeCharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})");
2584 fhMCPtHbpXEUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2586 fhMCPtZTUeCharged[i] =
2587 new TH2F(Form("hMCPtZTUeCharged%s",right.Data()),
2588 Form("MC %s: #it{z}_{T} with charged hadrons, Underlying Event",nameMC[i].Data()),
2589 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2590 fhMCPtZTUeCharged[i]->SetYTitle("#it{z}_{T}");
2591 fhMCPtZTUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2593 fhMCPtHbpZTUeCharged[i] =
2594 new TH2F(Form("hMCPtHbpZTUeCharged%s",right.Data()),
2595 Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons, Underlying Event",nameMC[i].Data()),
2596 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2597 fhMCPtHbpZTUeCharged[i]->SetYTitle("ln(1/#it{z}_{T})");
2598 fhMCPtHbpZTUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2600 outputContainer->Add(fhMCUePart[i]);
2601 outputContainer->Add(fhMCPtXEUeCharged[i]) ;
2602 outputContainer->Add(fhMCPtZTUeCharged[i]) ;
2603 outputContainer->Add(fhMCPtHbpZTUeCharged[i]);
2604 outputContainer->Add(fhMCPtHbpXEUeCharged[i]);
2608 fhMCPtXEUeLeftCharged[i] = new TH2F(Form("hMCPtXEUeChargedLeft_%s",nameMC[i].Data()),
2609 Form("MC %s: #it{x}_{#it{E}} with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2610 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2611 fhMCPtXEUeLeftCharged[i]->SetYTitle("#it{x}_{#it{E}}");
2612 fhMCPtXEUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2614 fhMCPtHbpXEUeLeftCharged[i] = new TH2F(Form("hMCPtHbpXEUeChargedLeft_%s",nameMC[i].Data()),
2615 Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2616 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2617 fhMCPtHbpXEUeLeftCharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})");
2618 fhMCPtHbpXEUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2620 fhMCPtZTUeLeftCharged[i] = new TH2F(Form("hMCPtZTUeChargedLeft_%s",nameMC[i].Data()),
2621 Form("MC %s: #it{z}_{T} with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2622 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2623 fhMCPtZTUeLeftCharged[i]->SetYTitle("#it{z}_{T}");
2624 fhMCPtZTUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2626 fhMCPtHbpZTUeLeftCharged[i] = new TH2F(Form("hMCPtHbpZTUeChargedLeft_%s",nameMC[i].Data()),
2627 Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2628 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2629 fhMCPtHbpZTUeLeftCharged[i]->SetYTitle("ln(1/#it{z}_{T})");
2630 fhMCPtHbpZTUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2632 outputContainer->Add(fhMCPtXEUeLeftCharged[i]) ;
2633 outputContainer->Add(fhMCPtZTUeLeftCharged[i]) ;
2634 outputContainer->Add(fhMCPtHbpXEUeLeftCharged[i]);
2635 outputContainer->Add(fhMCPtHbpZTUeLeftCharged[i]) ;
2639 } //for MC histogram
2643 //create event containers
2645 if(!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForTracksExists()))
2647 Int_t nvz = GetNZvertBin();
2648 Int_t nrp = GetNRPBin();
2649 Int_t nce = GetNCentrBin();
2651 fListMixTrackEvents= new TList*[nvz*nrp*nce] ;
2653 for( Int_t ice = 0 ; ice < nce ; ice++ )
2655 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2657 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2659 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2661 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2662 // ic,iz, irp, bin);
2664 fListMixTrackEvents[bin] = new TList() ;
2665 fListMixTrackEvents[bin]->SetOwner(kFALSE);
2671 fhPtTriggerMixed = new TH1F ("hPtTriggerMixed","#it{p}_{T} distribution of trigger particles, used for mixing", nptbins,ptmin,ptmax);
2672 fhPtTriggerMixed->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2676 fhPtTriggerMixedVzBin = new TH2F ("hPtTriggerMixedVzBin","#it{p}_{T} distribution of trigger particles, used for mixing", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
2677 fhPtTriggerMixedVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2678 fhPtTriggerMixedVzBin->SetYTitle("#it{v}_{#it{z}} bin");
2679 outputContainer->Add(fhPtTriggerMixedVzBin);
2682 fhPtTriggerMixedBin = new TH2F ("hPtTriggerMixedBin","#it{p}_{T} distribution of trigger particles vs mixing bin", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
2683 fhPtTriggerMixedBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2684 fhPtTriggerMixedBin->SetYTitle("Bin");
2686 fhPhiTriggerMixed = new TH2F ("hPhiTriggerMixed","#phi distribution of trigger Particles, used for mixing",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2687 fhPhiTriggerMixed->SetYTitle("#phi (rad)");
2689 fhEtaTriggerMixed = new TH2F ("hEtaTriggerMixed","#eta distribution of trigger, used for mixing",nptbins,ptmin,ptmax, netabins,etamin,etamax);
2690 fhEtaTriggerMixed->SetYTitle("#eta ");
2692 outputContainer->Add(fhPtTriggerMixed);
2693 outputContainer->Add(fhPtTriggerMixedBin);
2694 outputContainer->Add(fhPhiTriggerMixed);
2695 outputContainer->Add(fhEtaTriggerMixed);
2697 // Fill the cluster pool only in isolation analysis or if requested
2698 if( neutralMix && (!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForCaloExists())))
2700 Int_t nvz = GetNZvertBin();
2701 Int_t nrp = GetNRPBin();
2702 Int_t nce = GetNCentrBin();
2704 fListMixCaloEvents= new TList*[nvz*nrp*nce] ;
2706 for( Int_t ice = 0 ; ice < nce ; ice++ )
2708 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2710 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2712 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2714 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2715 // ic,iz, irp, bin);
2717 fListMixCaloEvents[bin] = new TList() ;
2718 fListMixCaloEvents[bin]->SetOwner(kFALSE);
2724 //Init the list in the reader if not done previously
2725 if(fUseMixStoredInReader)
2727 if( !GetReader()->ListWithMixedEventsForTracksExists() )
2728 GetReader()->SetListWithMixedEventsForTracks(fListMixTrackEvents);
2730 if( !GetReader()->ListWithMixedEventsForCaloExists() )
2731 GetReader()->SetListWithMixedEventsForCalo (fListMixCaloEvents );
2734 fhEventBin=new TH1I("hEventBin","Number of triggers per bin(cen,vz,rp)",
2735 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2736 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2737 fhEventBin->SetXTitle("event bin");
2738 outputContainer->Add(fhEventBin) ;
2740 fhEventMixBin=new TH1I("hEventMixBin","Number of triggers mixed per event bin(cen,vz,rp)",
2741 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2742 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2743 fhEventMixBin->SetXTitle("event bin");
2744 outputContainer->Add(fhEventMixBin) ;
2746 fhEventMBBin=new TH1I("hEventMBBin","Number of min bias events per bin(cen,vz,rp)",
2747 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2748 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2749 fhEventMBBin->SetXTitle("event bin");
2750 outputContainer->Add(fhEventMBBin) ;
2752 fhNtracksMB=new TH2F("hNtracksMBEvent","Number of filtered tracks in MB event per event bin",ntrbins,trmin,trmax,
2753 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2754 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2755 fhNtracksMB->SetYTitle("event bin");
2756 fhNtracksMB->SetXTitle("#it{N}_{track}");
2757 outputContainer->Add(fhNtracksMB);
2761 fhNclustersMB=new TH2F("hNclustersMBEvent","Number of filtered clusters in MB events per event bin",nclbins,clmin,clmax,
2762 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2763 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2764 fhNclustersMB->SetYTitle("event bin");
2765 fhNclustersMB->SetXTitle("#it{N}_{cluster}");
2766 outputContainer->Add(fhNclustersMB);
2769 fhMixDeltaPhiCharged = new TH2F
2770 ("hMixDeltaPhiCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
2771 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2772 fhMixDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
2773 fhMixDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2774 outputContainer->Add(fhMixDeltaPhiCharged);
2776 fhMixDeltaPhiDeltaEtaCharged = new TH2F
2777 ("hMixDeltaPhiDeltaEtaCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
2778 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2779 fhMixDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
2780 fhMixDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
2781 outputContainer->Add(fhMixDeltaPhiDeltaEtaCharged);
2784 new TH2F("hMixXECharged","Mixed event : #it{x}_{#it{E}} for charged tracks",
2785 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2786 fhMixXECharged->SetYTitle("#it{x}_{#it{E}}");
2787 fhMixXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2788 outputContainer->Add(fhMixXECharged);
2791 new TH2F("hMixXEUeCharged","Mixed event : #it{x}_{#it{E}} for charged tracks in Ue region",
2792 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2793 fhMixXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
2794 fhMixXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2795 outputContainer->Add(fhMixXEUeCharged);
2798 new TH2F("hMixHbpXECharged","mixed event : #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
2799 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2800 fhMixHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2801 fhMixHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2802 outputContainer->Add(fhMixHbpXECharged);
2804 fhMixDeltaPhiChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2805 fhMixDeltaPhiChargedAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
2806 fhMixDeltaPhiChargedAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
2807 fhMixDeltaPhiDeltaEtaChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2809 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2811 for(Int_t z = 0 ; z < nz ; z++)
2817 sz = Form("_vz%d",z);
2818 tz = Form(", #it{v}_{#it{z}} bin %d",z);
2821 //printf("MIX : iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
2823 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiDeltaEtaChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2824 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()),
2825 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2826 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
2827 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetYTitle("#Delta #eta");
2829 outputContainer->Add(fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]);
2831 fhMixDeltaPhiChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2832 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()),
2833 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2834 fhMixDeltaPhiChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2835 fhMixDeltaPhiChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
2837 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBin[bin]);
2839 if(fFillEtaGapsHisto)
2841 fhMixDeltaPhiChargedAssocPtBinDEta08[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0.8ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2842 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()),
2843 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2844 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2845 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
2847 fhMixDeltaPhiChargedAssocPtBinDEta0[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2848 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()),
2849 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2850 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2851 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
2853 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta08[bin]);
2854 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta0[bin]);
2860 return outputContainer;
2864 //_________________________________________________________________________________________________
2865 Bool_t AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum(AliAODPWG4Particle* trigger,
2866 TLorentzVector & mom1,
2867 TLorentzVector & mom2)
2869 // Get the momentum of the pi0/eta assigned decay photons
2870 // In case of pi0/eta trigger, we may want to check their decay correlation,
2871 // get their decay children
2873 Int_t indexPhoton1 = trigger->GetCaloLabel(0);
2874 Int_t indexPhoton2 = trigger->GetCaloLabel(1);
2876 if(indexPhoton1!=-1 || indexPhoton2!=-1) return kFALSE;
2879 printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - indexPhoton1 = %d, indexPhoton2 = %d \n", indexPhoton1, indexPhoton2);
2881 TObjArray * clusters = 0x0 ;
2882 if(trigger->GetDetector()=="EMCAL") clusters = GetEMCALClusters() ;
2883 else clusters = GetPHOSClusters() ;
2885 for(Int_t iclus = 0; iclus < clusters->GetEntriesFast(); iclus++)
2887 AliVCluster * photon = (AliVCluster*) (clusters->At(iclus));
2889 if(photon->GetID()==indexPhoton1) photon->GetMomentum(mom1,GetVertex(0)) ;
2890 if(photon->GetID()==indexPhoton2) photon->GetMomentum(mom1,GetVertex(0)) ;
2892 if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - Photon1 = %f, Photon2 = %f \n", mom1.Pt(), mom2.Pt());
2900 //_____________________________________________________________
2901 Int_t AliAnaParticleHadronCorrelation::GetMCTagHistogramIndex(Int_t mcTag)
2903 // Index of MC histograms depending on MC origin
2905 if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPrompt) ||
2906 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCFragmentation)) return 0;
2907 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0)) return 1;
2908 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0Decay)) return 2;
2909 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) ||
2910 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEtaDecay)) return 3;
2911 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCOtherDecay)) return 4;
2912 else if(!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron)) return 5;
2917 //_________________________________________
2918 void AliAnaParticleHadronCorrelation::Init()
2923 if(!GetReader()->IsCTSSwitchedOn())
2924 AliFatal("STOP!: You want to use CTS tracks in analysis but not read!! \n!!Check the configuration file!!\n");
2927 //____________________________________________________
2928 void AliAnaParticleHadronCorrelation::InitParameters()
2931 //Initialize the parameters of the analysis.
2932 SetInputAODName("Particle");
2933 SetAODObjArrayName("Hadrons");
2934 AddToHistogramsName("AnaHadronCorr_");
2936 SetPtCutRange(0.,300);
2937 fDeltaPhiMinCut = TMath::DegToRad()*120.;
2938 fDeltaPhiMaxCut = TMath::DegToRad()*240. ;
2939 fSelectIsolated = kFALSE;
2940 fMakeSeveralUE = kFALSE;
2941 fUeDeltaPhiMinCut = TMath::DegToRad()*60.;
2942 fUeDeltaPhiMaxCut = TMath::DegToRad()*120 ;
2944 fNeutralCorr = kFALSE ;
2945 fPi0Trigger = kFALSE ;
2946 fDecayTrigger = kFALSE ;
2947 fHMPIDCorrelation = kFALSE ;
2949 fMakeAbsoluteLeading = kTRUE;
2950 fMakeNearSideLeading = kFALSE;
2953 fAssocPtBinLimit[0] = 0.2 ;
2954 fAssocPtBinLimit[1] = 0.5 ;
2955 fAssocPtBinLimit[2] = 1.0 ;
2956 fAssocPtBinLimit[3] = 2.0 ;
2957 fAssocPtBinLimit[4] = 3.0 ;
2958 fAssocPtBinLimit[5] = 4.0 ;
2959 fAssocPtBinLimit[6] = 5.0 ;
2960 fAssocPtBinLimit[7] = 6.0 ;
2961 fAssocPtBinLimit[8] = 7.0 ;
2962 fAssocPtBinLimit[9] = 8.0 ;
2963 fAssocPtBinLimit[10] = 9.0 ;
2964 fAssocPtBinLimit[11] = 10.0 ;
2965 fAssocPtBinLimit[12] = 12.0 ;
2966 fAssocPtBinLimit[13] = 14.0 ;
2967 fAssocPtBinLimit[14] = 16.0 ;
2968 fAssocPtBinLimit[15] = 20.0 ;
2969 fAssocPtBinLimit[16] = 30.0 ;
2970 fAssocPtBinLimit[17] = 40.0 ;
2971 fAssocPtBinLimit[18] = 50.0 ;
2972 fAssocPtBinLimit[19] = 200.0 ;
2974 fUseMixStoredInReader = kTRUE;
2979 fSelectLeadingHadronAngle = kFALSE;
2980 fFillLeadHadOppositeHisto = kFALSE;
2981 fMinLeadHadPhi = 150*TMath::DegToRad();
2982 fMaxLeadHadPhi = 210*TMath::DegToRad();
2985 fMaxLeadHadPt = 100;
2991 fDecayBits[0] = AliNeutralMesonSelection::kPi0;
2992 fDecayBits[1] = AliNeutralMesonSelection::kEta;
2993 fDecayBits[2] = AliNeutralMesonSelection::kPi0Side;
2994 fDecayBits[3] = AliNeutralMesonSelection::kEtaSide;
2997 //_________________________________________________________________________
2998 Bool_t AliAnaParticleHadronCorrelation::IsTriggerTheEventLeadingParticle()
3000 // Check if the what of the selected triggers is leading particle comparing
3001 // with all the triggers, all the tracks or all the clusters (if requested for the clusters).
3003 Double_t ptTrig = GetMinPt();
3004 Double_t phiTrig = 0 ;
3005 fLeadingTriggerIndex =-1 ;
3007 AliAODPWG4ParticleCorrelation* pLeading = 0;
3009 // Loop on stored AOD particles, find leading trigger on the selected list, with at least min pT.
3011 for(Int_t iaod = 0; iaod < GetInputAODBranch()->GetEntriesFast() ; iaod++)
3013 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
3014 particle->SetLeadingParticle(kFALSE); // set it later
3016 // Vertex cut in case of mixing
3017 Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0));
3018 if(check == 0) continue;
3019 if(check == -1) return kFALSE; // not sure if it is correct.
3021 // find the leading particles with highest momentum
3022 if (particle->Pt() > ptTrig)
3024 ptTrig = particle->Pt() ;
3025 phiTrig = particle->Phi();
3027 pLeading = particle ;
3029 }// finish search of leading trigger particle on the AOD branch.
3031 if(index < 0) return kFALSE;
3033 //printf("AOD leading pT %2.2f, ID %d\n", pLeading->Pt(),pLeading->GetCaloLabel(0));
3035 if(phiTrig < 0 ) phiTrig += TMath::TwoPi();
3037 // Compare if it is the leading of all tracks
3040 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
3042 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
3044 if(track->GetID() == pLeading->GetTrackLabel(0) || track->GetID() == pLeading->GetTrackLabel(1) ||
3045 track->GetID() == pLeading->GetTrackLabel(2) || track->GetID() == pLeading->GetTrackLabel(3) ) continue ;
3047 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
3048 p3.SetXYZ(mom[0],mom[1],mom[2]);
3049 Float_t pt = p3.Pt();
3050 Float_t phi = p3.Phi() ;
3051 if(phi < 0) phi+=TMath::TwoPi();
3053 //jump out this event if near side associated particle pt larger than trigger
3054 if (fMakeNearSideLeading)
3056 Float_t deltaPhi = phiTrig-phi;
3057 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3058 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3060 if(pt > ptTrig && deltaPhi < TMath::PiOver2()) return kFALSE;
3062 //jump out this event if there is any other particle with pt larger than trigger
3065 if(pt > ptTrig) return kFALSE ;
3069 // Compare if it is leading of all calorimeter clusters
3071 if(fCheckLeadingWithNeutralClusters)
3073 // Select the calorimeter cluster list
3074 TObjArray * nePl = 0x0;
3075 if (pLeading->GetDetector() == "PHOS" )
3076 nePl = GetPHOSClusters();
3078 nePl = GetEMCALClusters();
3080 if(!nePl) return kTRUE; // Do the selection just with the tracks if no calorimeter is available.
3083 for(Int_t ipr = 0;ipr < nePl->GetEntriesFast() ; ipr ++ )
3085 AliVCluster * cluster = (AliVCluster *) (nePl->At(ipr)) ;
3087 if(cluster->GetID() == pLeading->GetCaloLabel(0) || cluster->GetID() == pLeading->GetCaloLabel(1) ) continue ;
3089 cluster->GetMomentum(lv,GetVertex(0));
3091 Float_t pt = lv.Pt();
3092 Float_t phi = lv.Phi() ;
3093 if(phi < 0) phi+=TMath::TwoPi();
3095 if(IsTrackMatched(cluster,GetReader()->GetInputEvent())) continue ; // avoid charged clusters, already covered by tracks, or cluster merging with track.
3097 //jump out this event if near side associated particle pt larger than trigger
3098 // not really needed for calorimeter, unless DCal is included
3099 if (fMakeNearSideLeading)
3101 Float_t deltaPhi = phiTrig-phi;
3102 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3103 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3105 if(pt > ptTrig && deltaPhi < TMath::PiOver2()) return kFALSE ;
3107 //jump out this event if there is any other particle with pt larger than trigger
3110 if(pt > ptTrig) return kFALSE ;
3113 } // check neutral clusters
3115 fLeadingTriggerIndex = index ;
3116 pLeading->SetLeadingParticle(kTRUE);
3118 if( GetDebug() > 1 ) printf("\t particle AOD with index %d is leading with pT %2.2f\n", fLeadingTriggerIndex, pLeading->Pt());
3124 //_________________________________________________________________
3125 void AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms()
3127 //Particle-Hadron Correlation Analysis, fill histograms
3129 if(!GetInputAODBranch())
3131 AliFatal(Form("No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data()));
3132 return ; // coverity
3135 Int_t naod = GetInputAODBranch()->GetEntriesFast();
3139 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - No particle AOD found! \n");
3141 return ; // no trigger particles found.
3146 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Begin hadron correlation analysis, fill histograms \n");
3147 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In particle branch aod entries %d\n", naod);
3148 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In CTS aod entries %d\n", GetCTSTracks()->GetEntriesFast());
3151 //------------------------------------------------------
3152 // Find leading trigger if analysis request only leading,
3153 // if there is no leading trigger, then skip the event
3156 if( fMakeAbsoluteLeading || fMakeNearSideLeading )
3158 Bool_t leading = IsTriggerTheEventLeadingParticle();
3161 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - AOD Leading trigger? %d, with index %d\n",leading,fLeadingTriggerIndex);
3165 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Leading was requested and not found\n");
3170 // Select only the leading in the trigger AOD loop
3171 naod = fLeadingTriggerIndex+1 ;
3172 iaod = fLeadingTriggerIndex ;
3176 //------------------------------------------------------
3177 // Get event multiplicity and bins
3179 Float_t cen = GetEventCentrality();
3180 Float_t ep = GetEventPlaneAngle();
3181 if(fFillHighMultHistograms) fhTriggerEventPlaneCentrality->Fill(cen,ep);
3183 Int_t mixEventBin = GetEventMixBin();
3184 Int_t vzbin = GetEventVzBin();
3186 //------------------------------------------------------
3187 // Loop on trigger AOD
3189 for( iaod = 0; iaod < naod; iaod++ )
3191 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
3194 // Trigger particle selection criteria:
3196 Float_t pt = particle->Pt();
3198 if(pt < GetMinPt() || pt > GetMaxPt() ) continue ;
3200 fhPtTriggerInput->Fill(pt);
3203 // check if it was a calorimeter cluster
3204 // and if the shower shape cut was requested apply it.
3205 // Not needed if already done at the particle identification level,
3206 // but for isolation studies, it is preferred not to remove so we do it here
3208 Int_t clID1 = particle->GetCaloLabel(0) ;
3209 Int_t clID2 = particle->GetCaloLabel(1) ; // for photon clusters should not be set.
3210 if( GetDebug() > 1 ) printf("%s Trigger : id1 %d, id2 %d, min %f, max %f, det %s\n",
3211 GetInputAODName().Data(),clID1,clID2,fM02MinCut,fM02MaxCut,(particle->GetDetector()).Data());
3213 if(clID1 > 0 && clID2 < 0 && fM02MaxCut > 0 && fM02MinCut > 0)
3216 TObjArray* clusters = 0x0;
3217 if (particle->GetDetector() == "EMCAL") clusters = GetEMCALClusters();
3218 else if(particle->GetDetector() == "PHOS" ) clusters = GetPHOSClusters();
3222 AliVCluster *cluster = FindCluster(clusters,clID1,iclus);
3223 Float_t m02 = cluster->GetM02();
3224 if(m02 > fM02MaxCut || m02 < fM02MinCut) continue ;
3227 fhPtTriggerSSCut->Fill(pt);
3231 // Check if the particle is isolated or if we want to take the isolation into account
3232 // This bool is set in AliAnaParticleIsolation
3236 if( !particle->IsIsolated() ) continue;
3237 fhPtTriggerIsoCut->Fill(pt);
3241 // Check if trigger is in fiducial region
3243 if(IsFiducialCutOn())
3245 Bool_t in = GetFiducialCut()->IsInFiducialCut(*particle->Momentum(),particle->GetDetector()) ;
3246 if(! in ) continue ;
3249 fhPtTriggerFidCut->Fill(pt);
3251 //---------------------------------------
3254 // Find the leading hadron in the opposite hemisphere to the triggeer
3255 // and accept the trigger if leading is in defined window.
3256 Bool_t okLeadHad = kTRUE;
3257 if(fSelectLeadingHadronAngle || fFillLeadHadOppositeHisto)
3259 okLeadHad = FindLeadingOppositeHadronInWindow(particle);
3260 if(!okLeadHad && fSelectLeadingHadronAngle) continue;
3264 // Charged particles correlation
3266 MakeChargedCorrelation(particle);
3270 Int_t mcTag = particle->GetTag();
3271 Bool_t lostDecayPair = kFALSE;
3274 mcIndex = GetMCTagHistogramIndex(mcTag);
3275 lostDecayPair = GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairInCalo);
3276 MakeMCChargedCorrelation(particle->GetLabel(), mcIndex,lostDecayPair);
3279 // Do own mixed event with charged,
3280 // add event and remove previous or fill the mixed histograms
3282 MakeChargedMixCorrelation(particle);
3285 // Neutral particles correlation
3288 MakeNeutralCorrelation(particle);
3290 //----------------------------------------------------------------
3291 // Fill trigger pT related histograms if not absolute leading
3294 // pT of the trigger, vs trigger origin if MC
3296 fhPtTrigger->Fill(pt);
3297 if(IsDataMC() && mcIndex >=0 && mcIndex < fgkNmcTypes)
3299 fhPtTriggerMC[mcIndex]->Fill(pt);
3300 if( lostDecayPair && mcIndex==2 )
3301 fhPtTriggerMC[7]->Fill(pt);
3306 Int_t decayTag = particle->GetBtag(); // temporary
3309 for(Int_t ibit = 0; ibit<fNDecayBits; ibit++)
3311 if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit]))
3313 fhPtDecayTrigger[ibit]->Fill(pt);
3315 if(IsDataMC() && mcIndex >=0 && mcIndex < fgkNmcTypes)
3317 fhPtDecayTriggerMC[ibit][mcIndex]->Fill(pt);
3318 if(lostDecayPair && mcIndex==2 )
3319 fhPtDecayTriggerMC[ibit][7]->Fill(pt);
3327 // Acceptance of the trigger
3329 Float_t phi = particle->Phi();
3330 if( phi < 0 ) phi+=TMath::TwoPi();
3331 fhPhiTrigger->Fill(pt, phi);
3333 fhEtaTrigger->Fill(pt, particle->Eta());
3334 //printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Trigger particle : pt %f, eta %f, phi %f\n",particle->Pt(),particle->Eta(),phi);
3336 //----------------------------------
3337 // Trigger particle pT vs event bins
3339 fhPtTriggerBin->Fill(pt,mixEventBin);
3341 fhPtTriggerVzBin->Fill(pt,vzbin);
3343 if(fFillHighMultHistograms)
3345 fhPtTriggerCentrality->Fill(pt,cen);
3346 fhPtTriggerEventPlane->Fill(pt,ep);
3349 //----------------------------------
3350 // Trigger particle pT vs pile-up
3352 if(fFillPileUpHistograms)
3354 Int_t vtxBC = GetReader()->GetVertexBC();
3355 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA) fhPtTriggerVtxBC0->Fill(pt);
3357 if(GetReader()->IsPileUpFromSPD()) fhPtTriggerPileUp[0]->Fill(pt);
3358 if(GetReader()->IsPileUpFromEMCal()) fhPtTriggerPileUp[1]->Fill(pt);
3359 if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtTriggerPileUp[2]->Fill(pt);
3360 if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtTriggerPileUp[3]->Fill(pt);
3361 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtTriggerPileUp[4]->Fill(pt);
3362 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtTriggerPileUp[5]->Fill(pt);
3363 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtTriggerPileUp[6]->Fill(pt);
3365 } // AOD trigger loop
3367 //Reinit for next event
3368 fLeadingTriggerIndex = -1;
3370 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - End fill histograms \n");
3373 //_______________________________________________________________________________________________________
3374 void AliAnaParticleHadronCorrelation::MakeChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
3376 // Charged Hadron Correlation Analysis
3378 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Make trigger particle - charged hadron correlation \n");
3380 Float_t phiTrig = aodParticle->Phi();
3381 Float_t etaTrig = aodParticle->Eta();
3382 Float_t ptTrig = aodParticle->Pt();
3383 Int_t mcTag = aodParticle->GetTag();
3384 Double_t bz = GetReader()->GetInputEvent()->GetMagneticField();
3390 //decay = aodParticle->IsTagged();
3391 decayTag = aodParticle->GetBtag(); // temporary
3392 if(decayTag < 0) decayTag = 0; // temporary
3393 // printf("Correlation: pT %2.2f, BTag %d, Tagged %d\n",ptTrig, decayTag, aodParticle->IsTagged());
3394 // printf("\t check bit Pi0 %d, Eta %d, Pi0Side %d, EtaSide %d\n",
3395 // GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kPi0),
3396 // GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kEta),
3397 // GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kPi0Side),
3398 // GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kEtaSide));
3401 Float_t pt = -100. ;
3402 Float_t phi = -100. ;
3403 Float_t eta = -100. ;
3404 Float_t deltaPhi = -100. ;
3407 TLorentzVector photonMom ;
3408 TObjArray * reftracks = 0x0;
3411 // Mixed event settings
3412 Int_t evtIndex11 = -1 ; // cluster trigger or pi0 trigger
3413 Int_t evtIndex12 = -1 ; // pi0 trigger
3414 Int_t evtIndex13 = -1 ; // charged trigger
3416 if (GetMixedEvent())
3418 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
3419 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
3420 evtIndex13 = GetMixedEvent()->EventIndex(aodParticle->GetTrackLabel(0)) ;
3423 // Track multiplicity or cent bin
3425 if(fFillHighMultHistograms) cenbin = GetEventCentralityBin();
3428 // In case of pi0/eta trigger, we may want to check their decay correlation,
3429 // get their decay children
3431 TLorentzVector decayMom1;
3432 TLorentzVector decayMom2;
3433 Bool_t decayFound = kFALSE;
3436 decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
3439 fhPtPi0DecayRatio->Fill(ptTrig, decayMom1.Pt()/ptTrig);
3440 fhPtPi0DecayRatio->Fill(ptTrig, decayMom2.Pt()/ptTrig);
3444 //-----------------------------------------------------------------------
3445 // Track loop, select tracks with good pt, phi and fill AODs or histograms
3446 //-----------------------------------------------------------------------
3448 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
3450 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
3452 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
3453 p3.SetXYZ(mom[0],mom[1],mom[2]);
3457 if(phi < 0) phi+=TMath::TwoPi();
3459 //Select only hadrons in pt range
3460 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
3462 //remove trigger itself for correlation when use charged triggers
3463 if( track->GetID() == aodParticle->GetTrackLabel(0) || track->GetID() == aodParticle->GetTrackLabel(1) ||
3464 track->GetID() == aodParticle->GetTrackLabel(2) || track->GetID() == aodParticle->GetTrackLabel(3) )
3467 //Only for mixed event frame
3468 Int_t evtIndex2 = 0 ;
3469 if (GetMixedEvent())
3471 evtIndex2 = GetMixedEvent()->EventIndex(track->GetID()) ;
3472 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 || evtIndex13 == evtIndex2 ) // photon and track from different events
3475 if (TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut())
3480 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
3482 // ------------------------------
3483 // Track type bin or bits setting
3487 // * Set the pt associated bin for the defined bins *
3489 Int_t assocBin = -1;
3490 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3492 if(pt > fAssocPtBinLimit[i] && pt < fAssocPtBinLimit[i+1]) assocBin= i;
3496 // * Assign to the histogram array a bin corresponding
3497 // to a combination of pTa and vz bins *
3504 nz = GetNZvertBin();
3505 vz = GetEventVzBin();
3508 Int_t bin = assocBin*nz+vz;
3510 //printf("assoc Bin = %d, vZ bin = %d, bin = %d \n", assocBin,GetEventVzBin(),bin);
3513 // * Get the status of the TOF bit *
3515 ULong_t status = track->GetStatus();
3516 Bool_t okTOF = ( (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ) ;
3517 //Double32_t tof = track->GetTOFsignal()*1e-3;
3518 Int_t trackBC = track->GetTOFBunchCrossing(bz);
3521 if (okTOF && trackBC!=0) outTOF = 1;
3522 else if(okTOF && trackBC==0) outTOF = 0;
3528 // Azimuthal Angle histograms
3531 deltaPhi = phiTrig-phi;
3534 // Calculate deltaPhi shift so that for the particles on the opposite side
3535 // it is defined between 90 and 270 degrees
3536 // Shift [-360,-90] to [0, 270]
3537 // and [270,360] to [-90,0]
3538 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3539 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3541 FillChargedAngularCorrelationHistograms(pt, ptTrig, bin, phi, phiTrig, deltaPhi,
3542 eta, etaTrig, decayTag, track->GetHMPIDsignal(),
3543 outTOF, cenbin, mcTag);
3546 // Imbalance zT/xE/pOut histograms
3550 // Delta phi cut for momentum imbalance correlation
3552 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
3553 FillChargedMomentumImbalanceHistograms(ptTrig, pt, deltaPhi, cenbin, track->Charge(),
3554 assocBin, decayTag, outTOF, mcTag);
3557 // Underlying event, right side, default case
3559 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3560 FillChargedUnderlyingEventHistograms(ptTrig, pt, deltaPhi, cenbin, outTOF);
3563 // Several UE calculation, in different perpendicular regions, up to 6:
3564 // left, right, upper-left, lower left, upper-right, lower-right
3567 FillChargedUnderlyingEventSidesHistograms(ptTrig,pt,deltaPhi);
3570 if(fPi0Trigger && decayFound)
3571 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2, kTRUE) ;
3574 // Add track reference to array
3576 if(fFillAODWithReferences)
3581 reftracks = new TObjArray(0);
3582 TString trackname = Form("%sTracks", GetAODObjArrayName().Data());
3583 reftracks->SetName(trackname.Data());
3584 reftracks->SetOwner(kFALSE);
3587 reftracks->Add(track);
3588 }// reference track to AOD
3591 //Fill AOD with reference tracks, if not filling histograms
3592 if(fFillAODWithReferences && reftracks)
3594 aodParticle->AddObjArray(reftracks);
3599 //_________________________________________________________________________________________________________
3600 void AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
3602 // Mix current trigger with tracks in another MB event
3604 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Make trigger particle - charged hadron mixed event correlation \n");
3606 if(GetMixedEvent()) return; // This is not the mixed event from general mixing frame
3608 // Get the event with similar caracteristics
3609 //printf("MakeChargedMixCorrelation for %s\n",GetInputAODName().Data());
3611 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
3613 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
3615 if(!inputHandler) return;
3617 if(!(inputHandler->IsEventSelected( ) & GetReader()->GetEventTriggerMask())) return;
3619 // Get the pool, check if it exits
3620 Int_t eventBin = GetEventMixBin();
3622 //Check that the bin exists, if not (bad determination of RP, ntrality or vz bin) do nothing
3623 if(eventBin < 0) return;
3625 fhEventBin->Fill(eventBin);
3627 // get neutral clusters pool?
3628 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
3629 Bool_t neutralMix = fFillNeutralEventMixPool || isoCase ;
3632 TList * poolCalo = 0;
3633 if(fUseMixStoredInReader)
3635 pool = GetReader()->GetListWithMixedEventsForTracks(eventBin);
3636 if(neutralMix) poolCalo = GetReader()->GetListWithMixedEventsForCalo (eventBin);
3640 pool = fListMixTrackEvents[eventBin];
3641 if(neutralMix) poolCalo = fListMixCaloEvents [eventBin];
3646 if( neutralMix && !poolCalo )
3647 printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Careful, cluster pool not available\n");
3649 Double_t ptTrig = aodParticle->Pt();
3650 Double_t etaTrig = aodParticle->Eta();
3651 Double_t phiTrig = aodParticle->Phi();
3652 if(phiTrig < 0.) phiTrig+=TMath::TwoPi();
3655 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Pool bin %d size %d, trigger trigger pt=%f, phi=%f, eta=%f\n",
3656 eventBin,pool->GetSize(), ptTrig,phiTrig,etaTrig);
3658 Double_t ptAssoc = -999.;
3659 Double_t phiAssoc = -999.;
3660 Double_t etaAssoc = -999.;
3661 Double_t deltaPhi = -999.;
3662 Double_t deltaEta = -999.;
3663 Double_t xE = -999.;
3665 // Start from first event in pool except if in this same event the pool was filled
3667 if(GetReader()->GetLastTracksMixedEvent() == GetEventNumber()) ev0 = 1;
3669 for(Int_t ev=ev0; ev < pool->GetSize(); ev++)
3672 // Recover the lists of tracks or clusters
3674 TObjArray* bgTracks = static_cast<TObjArray*>(pool->At(ev));
3675 TObjArray* bgCalo = 0;
3677 // Recover the clusters list if requested
3678 if( neutralMix && poolCalo )
3680 if(pool->GetSize()!=poolCalo->GetSize())
3681 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Different size of calo and track pools\n");
3683 bgCalo = static_cast<TObjArray*>(poolCalo->At(ev));
3686 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Event %d in calo pool not available?\n",ev);
3690 // Isolate the trigger in the mixed event with mixed tracks and clusters
3692 if( OnlyIsolated() )
3694 Int_t n=0, nfrac = 0;
3695 Bool_t isolated = kFALSE;
3696 Float_t coneptsum = 0, coneptlead = 0;
3697 GetIsolationCut()->MakeIsolationCut(bgTracks,bgCalo,
3698 GetReader(), GetCaloPID(),
3699 kFALSE, aodParticle, "",
3700 n,nfrac,coneptsum,coneptlead,isolated);
3702 //printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Isolated? %d - cone %f, ptthres %f",
3703 // isolated,GetIsolationCut()->GetConeSize(),GetIsolationCut()->GetPtThreshold());
3704 //if(bgTracks)printf(" - n track %d", bgTracks->GetEntriesFast());
3707 if(!isolated) continue ;
3711 // Check if the trigger is leading of mixed event
3713 Int_t nTracks=bgTracks->GetEntriesFast();
3715 if(fMakeNearSideLeading || fMakeAbsoluteLeading)
3717 Bool_t leading = kTRUE;
3718 for(Int_t jlead = 0;jlead < nTracks; jlead++ )
3720 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(jlead) ;
3722 ptAssoc = track->Pt();
3723 phiAssoc = track->Phi() ;
3724 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3726 if (fMakeNearSideLeading)
3728 deltaPhi = phiTrig-phiAssoc;
3729 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3730 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3732 if(ptAssoc > ptTrig && deltaPhi < TMath::PiOver2())
3738 //jump out this event if there is any other particle with pt larger than trigger
3739 else if(fMakeAbsoluteLeading)
3741 if(ptAssoc > ptTrig)
3749 if( !neutralMix && fCheckLeadingWithNeutralClusters )
3750 printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Leading of clusters requested but no clusters in mixed event\n");
3752 if(neutralMix && fCheckLeadingWithNeutralClusters && bgCalo)
3754 Int_t nClusters=bgCalo->GetEntriesFast();
3755 TLorentzVector mom ;
3756 for(Int_t jlead = 0;jlead <nClusters; jlead++ )
3758 AliAODPWG4Particle *cluster= (AliAODPWG4Particle*) bgCalo->At(jlead) ;
3760 ptAssoc = cluster->Pt();
3761 phiAssoc = cluster->Phi() ;
3762 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3764 if (fMakeNearSideLeading)
3766 deltaPhi = phiTrig-phiAssoc;
3767 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3768 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3770 if(ptAssoc > ptTrig && deltaPhi < TMath::PiOver2())
3776 //jump out this event if there is any other particle with pt larger than trigger
3777 else if(fMakeAbsoluteLeading)
3779 if(ptAssoc > ptTrig)
3788 if(!leading) continue; // not leading, check the next event in pool
3792 // Fill histograms for selected triggers
3795 fhEventMixBin->Fill(eventBin);
3797 //printf("\t Read Pool event %d, nTracks %d\n",ev,nTracks);
3799 fhPtTriggerMixed ->Fill(ptTrig);
3800 fhPhiTriggerMixed ->Fill(ptTrig, phiTrig);
3801 fhEtaTriggerMixed ->Fill(ptTrig, etaTrig);
3802 fhPtTriggerMixedBin->Fill(ptTrig,eventBin);
3803 if(fCorrelVzBin)fhPtTriggerMixedVzBin->Fill(ptTrig, GetEventVzBin());
3806 // Correlation histograms
3808 for(Int_t j1 = 0;j1 <nTracks; j1++ )
3810 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(j1) ;
3812 if(!track) continue;
3814 ptAssoc = track->Pt();
3815 etaAssoc = track->Eta();
3816 phiAssoc = track->Phi() ;
3817 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3819 deltaPhi = phiTrig-phiAssoc;
3820 if(deltaPhi < -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3821 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3822 deltaEta = etaTrig-etaAssoc;
3825 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation(): deltaPhi= %f, deltaEta=%f\n",deltaPhi, deltaEta);
3827 // Angular correlation
3828 fhMixDeltaPhiCharged ->Fill(ptTrig, deltaPhi);
3829 fhMixDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
3832 // Momentum imbalance
3834 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
3836 xE = -ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3839 printf("MakeChargedMixCorrelation(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
3840 xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
3842 fhMixXECharged->Fill(ptTrig,xE);
3843 if(xE > 0 ) fhMixHbpXECharged->Fill(ptTrig, TMath::Log(1./xE));
3847 // Underlying event momentum imbalance
3849 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3851 //Underlying event region
3852 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
3853 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
3856 printf("MakeChargedMixCorrelation(): Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
3857 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
3859 fhMixXEUeCharged->Fill(ptTrig,uexE);
3862 // Set the pt associated bin for the defined bins
3863 Int_t assocBin = -1;
3864 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3866 if(ptAssoc > fAssocPtBinLimit[i] && ptAssoc < fAssocPtBinLimit[i+1]) assocBin= i;
3870 // Assign to the histogram array a bin corresponding to a combination of pTa and vz bins
3877 nz = GetNZvertBin();
3878 vz = GetEventVzBin();
3881 Int_t bin = assocBin*nz+vz;
3883 if(bin < 0) continue ; // this pt bin was not considered
3885 fhMixDeltaPhiChargedAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
3886 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->Fill(deltaPhi, deltaEta);
3888 if(fFillEtaGapsHisto)
3890 if(TMath::Abs(deltaEta) > 0.8)
3891 fhMixDeltaPhiChargedAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
3892 if(TMath::Abs(deltaEta) < 0.01)
3893 fhMixDeltaPhiChargedAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
3897 } // mixed event loop
3901 //_______________________________________________________________________________________________________
3902 void AliAnaParticleHadronCorrelation::MakeNeutralCorrelation(AliAODPWG4ParticleCorrelation * aodParticle)
3904 // Neutral Pion Correlation Analysis
3906 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); // For the future, foresee more possible pi0 lists
3907 if(!pi0list) return ;
3909 Int_t npi0 = pi0list->GetEntriesFast();
3910 if(npi0 == 0) return ;
3913 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Particle - pi0 correlation, %d pi0's\n",npi0);
3915 Int_t evtIndex11 = 0 ;
3916 Int_t evtIndex12 = 0 ;
3917 if (GetMixedEvent())
3919 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
3920 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
3923 Float_t pt = -100. ;
3924 Float_t zT = -100. ;
3925 Float_t phi = -100. ;
3926 Float_t eta = -100. ;
3927 Float_t xE = -100. ;
3928 Float_t hbpXE= -100. ;
3929 Float_t hbpZT= -100. ;
3931 Float_t ptTrig = aodParticle->Pt();
3932 Float_t phiTrig = aodParticle->Phi();
3933 Float_t etaTrig = aodParticle->Eta();
3934 Float_t deltaPhi= -100. ;
3935 Float_t deltaEta= -100. ;
3937 TLorentzVector photonMom ;
3939 // In case of pi0/eta trigger, we may want to check their decay correlation,
3940 // get their decay children
3941 TLorentzVector decayMom1;
3942 TLorentzVector decayMom2;
3943 Bool_t decayFound = kFALSE;
3944 if(fPi0Trigger) decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
3946 TObjArray * refpi0 = 0x0;
3949 //Loop on stored AOD pi0
3951 for(Int_t iaod = 0; iaod < npi0 ; iaod++)
3953 AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (pi0list->At(iaod));
3955 Int_t evtIndex2 = 0 ;
3956 Int_t evtIndex3 = 0 ;
3957 if (GetMixedEvent())
3959 evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(0)) ;
3960 evtIndex3 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(1)) ;
3962 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 ||
3963 evtIndex11 == evtIndex3 || evtIndex12 == evtIndex3) // trigger and pi0 are not from different events
3969 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
3971 //remove trigger itself for correlation when use charged triggers
3972 if(aodParticle->GetCaloLabel(0) >= 0 &&
3973 (pi0->GetCaloLabel(0) == aodParticle->GetCaloLabel(0) || pi0->GetCaloLabel(1) == aodParticle->GetCaloLabel(0))) continue ;
3975 if( aodParticle->GetCaloLabel(1) >= 0 &&
3976 (pi0->GetCaloLabel(0) == aodParticle->GetCaloLabel(1) || pi0->GetCaloLabel(1) == aodParticle->GetCaloLabel(1))) continue ;
3979 // Angular correlations
3983 deltaEta = etaTrig-eta;
3984 deltaPhi = phiTrig-phi;
3985 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3986 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3988 fhEtaNeutral ->Fill(pt , eta );
3989 fhPhiNeutral ->Fill(pt , phi );
3990 fhDeltaEtaNeutral->Fill(ptTrig, deltaEta);
3991 fhDeltaPhiNeutral->Fill(ptTrig, deltaPhi);
3993 if(pt > 2 ) fhDeltaPhiDeltaEtaNeutral->Fill(deltaPhi, deltaEta);
3996 // Momentum imbalance
4003 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
4005 //delta phi cut for correlation
4006 if( (deltaPhi > fDeltaPhiMinCut) && ( deltaPhi < fDeltaPhiMaxCut) )
4008 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
4011 printf("MakeNeutralCorrelation(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
4012 xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
4014 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
4016 fhDeltaPhiNeutralPt->Fill(pt,deltaPhi);
4017 fhXENeutral ->Fill(ptTrig,xE);
4018 fhPtHbpXENeutral ->Fill(ptTrig,hbpXE);
4019 fhZTNeutral ->Fill(ptTrig,zT);
4020 fhPtHbpZTNeutral ->Fill(ptTrig,hbpZT);
4022 else if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
4024 // Randomize angle for xE calculation
4025 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
4027 xE = -(pt/ptTrig)*TMath::Cos(randomphi);
4028 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
4030 fhDeltaPhiUeNeutralPt->Fill(pt,deltaPhi);
4031 fhZTUeNeutral ->Fill(ptTrig,zT);
4032 fhPtHbpZTUeNeutral ->Fill(ptTrig,hbpZT);
4033 fhXEUeNeutral ->Fill(ptTrig,xE);
4034 fhPtHbpXEUeNeutral ->Fill(ptTrig,hbpXE);
4037 // Several UE calculation, not sure it is useful
4038 // with partical calorimter acceptance
4039 if(fMakeSeveralUE) FillNeutralUnderlyingEventSidesHistograms(ptTrig,pt,zT,hbpZT,deltaPhi);
4042 // Decay photon correlations
4044 if(fPi0Trigger && decayFound)
4045 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2,kFALSE) ;
4047 if(fFillAODWithReferences)
4052 refpi0 = new TObjArray(0);
4053 refpi0->SetName(GetAODObjArrayName()+"Pi0s");
4054 refpi0->SetOwner(kFALSE);
4057 }//put references in trigger AOD
4060 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Selected pi0: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
4064 //Fill AOD with reference tracks, if not filling histograms
4065 if(fFillAODWithReferences && refpi0)
4067 aodParticle->AddObjArray(refpi0);
4071 //__________________________________________________________________________________________________________________
4072 void AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(Int_t label, Int_t histoIndex, Bool_t lostDecayPair)
4074 // Charged Hadron Correlation Analysis with MC information
4076 if ( GetDebug() > 1 )
4077 AliInfo("Make trigger particle - charged hadron correlation in AOD MC level");
4081 if( GetDebug() > 0 ) AliInfo(Form(" *** bad label ***: label %d", label));
4085 // Do MC correlation for a given particle type range.
4086 // Types defined in GetMCTagHistogramIndex:
4087 // 0 direct gamma; 1 pi0; 2 pi0 decay; 3 eta decay; 4 other decay; 5 electron; 6 other (hadron)
4088 if(histoIndex < fMCGenTypeMin || histoIndex > fMCGenTypeMax) return ;
4090 AliStack * stack = 0x0 ;
4091 TParticle * primary = 0x0 ;
4092 TClonesArray * mcparticles = 0x0 ;
4093 AliAODMCParticle * aodprimary = 0x0 ;
4095 Double_t eprim = 0 ;
4096 Double_t ptprim = 0 ;
4097 Double_t phiprim = 0 ;
4098 Double_t etaprim = 0 ;
4100 Int_t iParticle = 0 ;
4102 Bool_t leadTrig = kTRUE;
4104 if( GetReader()->ReadStack() )
4106 stack = GetMCStack() ;
4109 AliFatal("Stack not available, is the MC handler called? STOP");
4113 //nTracks = stack->GetNtrack() ;
4114 nTracks = stack->GetNprimary();
4115 if( label >= stack->GetNtrack() )
4118 AliInfo(Form("*** large label ***: label %d, n tracks %d", label, stack->GetNtrack()));
4122 primary = stack->Particle(label);
4125 AliInfo(Form(" *** no primary ***: label %d", label));
4129 eprim = primary->Energy();
4130 ptprim = primary->Pt();
4131 etaprim = primary->Eta();
4132 phiprim = primary->Phi();
4133 if(phiprim < 0) phiprim+=TMath::TwoPi();
4135 if(ptprim < 0.01 || eprim < 0.01) return ;
4137 for (iParticle = 0 ; iParticle < nTracks ; iParticle++)
4139 TParticle * particle = stack->Particle(iParticle);
4140 TLorentzVector momentum;
4142 //keep only final state particles
4143 if( particle->GetStatusCode() != 1 ) continue ;
4145 //---------- Charged particles ----------------------
4146 Int_t pdg = particle->GetPdgCode();
4147 Int_t charge = (Int_t) TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
4148 if(charge == 0) continue;
4150 particle->Momentum(momentum);
4152 //Particles in CTS acceptance, make sure to use the same selection as in the reader
4153 Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
4154 //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,momentum.Pt(),momentum.Eta(),momentum.Phi()*TMath::RadToDeg());
4155 if( !inCTS ) continue;
4157 // Remove conversions
4158 if ( TMath::Abs(pdg) == 11 && stack->Particle(particle->GetFirstMother())->GetPdgCode() == 22 ) continue ;
4160 if ( label == iParticle ) continue; // avoid trigger particle
4162 Float_t phi = particle->Phi();
4163 if(phi < 0) phi+=TMath::TwoPi();
4165 Bool_t lead = FillChargedMCCorrelationHistograms(particle->Pt(),phi,particle->Eta(),ptprim,phiprim,etaprim,histoIndex,lostDecayPair);
4166 if(!lead) leadTrig = kFALSE;
4167 //if ( !lead && (fMakeAbsoluteLeading || fMakeNearSideLeading) ) return;
4173 else if( GetReader()->ReadAODMCParticles() )
4175 //Get the list of MC particles
4176 mcparticles = GetReader()->GetAODMCParticles();
4177 if( !mcparticles ) return;
4179 nTracks = mcparticles->GetEntriesFast() ;
4181 if( label >= nTracks )
4184 AliInfo(Form(" *** large label ***: label %d, n tracks %d", label,nTracks));
4189 aodprimary = (AliAODMCParticle*) mcparticles->At(label);
4192 AliInfo(Form(" *** no AOD primary ***: label %d", label));
4196 eprim = aodprimary->E();
4197 ptprim = aodprimary->Pt();
4198 etaprim = aodprimary->Eta();
4199 phiprim = aodprimary->Phi();
4200 if(phiprim < 0) phiprim+=TMath::TwoPi();
4202 if(ptprim < 0.01 || eprim < 0.01) return ;
4204 for (iParticle = 0; iParticle < nTracks; iParticle++)
4206 AliAODMCParticle *part = (AliAODMCParticle*) mcparticles->At(iParticle);
4208 if (!part->IsPhysicalPrimary() ) continue; // same as part->GetStatus() !=1
4210 if ( part->Charge() == 0 ) continue;
4212 TLorentzVector momentum(part->Px(),part->Py(),part->Pz(),part->E());
4214 //Particles in CTS acceptance, make sure to use the same selection as in the reader
4215 Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
4216 //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,momentum.Pt(),momentum.Eta(),momentum.Phi()*TMath::RadToDeg());
4217 if( !inCTS ) continue;
4219 // Remove conversions
4220 Int_t indexmother = part->GetMother();
4221 if ( indexmother > -1 )
4223 Int_t pdg = part->GetPdgCode();
4224 Int_t mPdg = ((AliAODMCParticle*) mcparticles->At(indexmother)) ->GetPdgCode();
4225 if (TMath::Abs(pdg) == 11 && mPdg == 22) continue;
4228 if ( label == iParticle ) continue; // avoid trigger particle
4230 Float_t phi = part->Phi();
4231 if(phi < 0) phi+=TMath::TwoPi();
4233 Bool_t lead = FillChargedMCCorrelationHistograms(part->Pt(),phi,part->Eta(),ptprim,phiprim,etaprim, histoIndex,lostDecayPair);
4234 if(!lead) leadTrig = kFALSE;
4235 //if ( !lead && (fMakeAbsoluteLeading || fMakeNearSideLeading)) return;
4237 } //MC particle loop
4240 // Trigger MC particle histograms
4241 //if (!lead && (fMakeAbsoluteLeading || fMakeNearSideLeading)) return;
4243 fhMCPtTrigger [histoIndex]->Fill(ptprim);
4244 fhMCPhiTrigger[histoIndex]->Fill(ptprim,phiprim);
4245 fhMCEtaTrigger[histoIndex]->Fill(ptprim,etaprim);
4247 if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
4249 fhMCPtTrigger [7]->Fill(ptprim);
4250 fhMCPhiTrigger[7]->Fill(ptprim,phiprim);
4251 fhMCEtaTrigger[7]->Fill(ptprim,etaprim);
4254 if(!leadTrig && (fMakeAbsoluteLeading || fMakeNearSideLeading) )
4257 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(): Not leading primary trigger: pT %2.2f, phi %2.2f, eta %2.2f\n",
4258 ptprim,phiprim*TMath::RadToDeg(),etaprim);
4260 fhMCPtTriggerNotLeading [histoIndex]->Fill(ptprim);
4261 fhMCPhiTriggerNotLeading[histoIndex]->Fill(ptprim,phiprim);
4262 fhMCEtaTriggerNotLeading[histoIndex]->Fill(ptprim,etaprim);
4264 if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
4266 fhMCPtTriggerNotLeading [7]->Fill(ptprim);
4267 fhMCPhiTriggerNotLeading[7]->Fill(ptprim,phiprim);
4268 fhMCEtaTriggerNotLeading[7]->Fill(ptprim,etaprim);
4273 //_____________________________________________________________________
4274 void AliAnaParticleHadronCorrelation::Print(const Option_t * opt) const
4277 //Print some relevant parameters set for the analysis
4281 printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
4282 AliAnaCaloTrackCorrBaseClass::Print(" ");
4283 printf("Pt trigger > %2.2f; < %2.2f\n", GetMinPt() , GetMaxPt()) ;
4284 printf("Pt associa > %2.2f; < %2.2f\n", fMinAssocPt, fMaxAssocPt) ;
4285 printf("Phi trigger particle-Hadron < %3.2f\n", fDeltaPhiMaxCut) ;
4286 printf("Phi trigger particle-Hadron > %3.2f\n", fDeltaPhiMinCut) ;
4287 printf("Phi trigger particle-UeHadron < %3.2f\n", fUeDeltaPhiMaxCut) ;
4288 printf("Phi trigger particle-UeHadron > %3.2f\n", fUeDeltaPhiMinCut) ;
4289 printf("Isolated Trigger? %d\n" , fSelectIsolated) ;
4290 printf("Several UE? %d\n" , fMakeSeveralUE) ;
4291 printf("Name of AOD Pi0 Branch %s \n", fPi0AODBranchName.Data());
4292 printf("Do Decay-hadron correlation ? %d\n", fPi0Trigger) ;
4293 printf("Select absolute leading for cluster triggers ? %d or Near Side %d\n",
4294 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
4295 printf("Trigger pt bins %d\n", fNAssocPtBins) ;
4296 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
4297 printf("\t bin %d = [%2.1f,%2.1f]\n", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
4302 //____________________________________________________________
4303 void AliAnaParticleHadronCorrelation::SetNAssocPtBins(Int_t n)
4305 // Set number of bins
4315 printf("n = larger than 19 or too small, set to 19 \n");
4320 //______________________________________________________________________________
4321 void AliAnaParticleHadronCorrelation::SetAssocPtBinLimit(Int_t ibin, Float_t pt)
4323 // Set the list of limits for the trigger pt bins
4325 if(ibin <= fNAssocPtBins || ibin >= 0)
4327 fAssocPtBinLimit[ibin] = pt ;
4331 printf("AliAnaParticleHadronCorrelation::SetAssocPtBinLimit() - bin number too large %d > %d or small, nothing done\n", ibin, fNAssocPtBins) ;