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),
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 fhDeltaPhiDeltaEtaCharged(0),
92 fhPhiCharged(0), fhEtaCharged(0),
93 fhDeltaPhiCharged(0), fhDeltaEtaCharged(0),
94 fhDeltaPhiChargedPt(0), fhDeltaPhiUeChargedPt(0),
96 fhXECharged(0), fhXECharged_Cone2(0), fhXEUeCharged(0),
97 fhXEPosCharged(0), fhXENegCharged(0),
98 fhPtHbpXECharged(0), fhPtHbpXECharged_Cone2(0), fhPtHbpXEUeCharged(0),
99 fhZTCharged(0), fhZTUeCharged(0),
100 fhZTPosCharged(0), fhZTNegCharged(0),
101 fhPtHbpZTCharged(0), fhPtHbpZTUeCharged(0),
102 fhXEChargedMC(), fhDeltaPhiChargedMC(),
103 fhDeltaPhiDeltaEtaChargedPtA3GeV(0),
104 fhDeltaPhiChargedPtA3GeV(0), fhDeltaEtaChargedPtA3GeV(0),
106 fhDeltaPhiChargedPileUp(), fhDeltaEtaChargedPileUp(),
107 fhDeltaPhiChargedPtA3GeVPileUp(), fhDeltaEtaChargedPtA3GeVPileUp(),
108 fhXEChargedPileUp(), fhXEUeChargedPileUp(),
109 fhZTChargedPileUp(), fhZTUeChargedPileUp(),
110 fhPtTrigChargedPileUp(),
111 fhDeltaPhiChargedOtherBC(), fhDeltaPhiChargedPtA3GeVOtherBC(),
112 fhXEChargedOtherBC(), fhXEUeChargedOtherBC(),
113 fhZTChargedOtherBC(), fhZTUeChargedOtherBC(),
114 fhPtTrigChargedOtherBC(),
115 fhDeltaPhiChargedBC0(), fhDeltaPhiChargedPtA3GeVBC0(),
116 fhXEChargedBC0(), fhXEUeChargedBC0(),
117 fhZTChargedBC0(), fhZTUeChargedBC0(),
118 fhPtTrigChargedBC0(),
119 fhDeltaPhiChargedVtxBC0(), fhDeltaPhiChargedPtA3GeVVtxBC0(),
120 fhXEChargedVtxBC0(), fhXEUeChargedVtxBC0(),
121 fhZTChargedVtxBC0(), fhZTUeChargedVtxBC0(),
122 fhPtTrigChargedVtxBC0(),
123 fhDeltaPhiUeLeftCharged(0),
124 fhDeltaPhiUeLeftUpCharged(0), fhDeltaPhiUeRightUpCharged(0),
125 fhDeltaPhiUeLeftDownCharged(0), fhDeltaPhiUeRightDownCharged(0),
126 fhXEUeLeftCharged(0),
127 fhXEUeLeftUpCharged(0), fhXEUeRightUpCharged(0),
128 fhXEUeLeftDownCharged(0), fhXEUeRightDownCharged(0),
129 fhPtHbpXEUeLeftCharged(0), fhZTUeLeftCharged(0),
130 fhPtHbpZTUeLeftCharged(0),
131 fhPtTrigPout(0), fhPtTrigCharged(0),
132 fhDeltaPhiChargedMult(0x0), fhDeltaEtaChargedMult(0x0),
133 fhXEMult(0x0), fhXEUeMult(0x0),
134 fhZTMult(0x0), fhZTUeMult(0x0),
135 fhAssocPtBkg(0), fhDeltaPhiDeltaEtaAssocPtBin(0),
136 fhDeltaPhiAssocPtBin(0),
137 fhDeltaPhiAssocPtBinDEta08(0), fhDeltaPhiAssocPtBinDEta0(0),
138 fhDeltaPhiAssocPtBinHMPID(0), fhDeltaPhiAssocPtBinHMPIDAcc(0),
139 fhDeltaPhiBradAssocPtBin(0), fhDeltaPhiBrad(0),
140 fhXEAssocPtBin(0), fhZTAssocPtBin(0),
141 fhXEVZ(0), fhZTVZ(0),
142 fhDeltaPhiDeltaEtaNeutral(0),
143 fhPhiNeutral(0), fhEtaNeutral(0),
144 fhDeltaPhiNeutral(0), fhDeltaEtaNeutral(0),
145 fhDeltaPhiNeutralPt(0), fhDeltaPhiUeNeutralPt(0),
146 fhXENeutral(0), fhXEUeNeutral(0),
147 fhPtHbpXENeutral(0), fhPtHbpXEUeNeutral(0),
148 fhZTNeutral(0), fhZTUeNeutral(0),
149 fhPtHbpZTNeutral(0), fhPtHbpZTUeNeutral(0),
150 fhDeltaPhiUeLeftNeutral(0), fhXEUeLeftNeutral(0),
151 fhPtHbpXEUeLeftNeutral(0), fhZTUeLeftNeutral(0),
152 fhPtHbpZTUeLeftNeutral(0), fhPtPi0DecayRatio(0),
153 fhDeltaPhiPi0DecayCharged(0), fhXEPi0DecayCharged(0), fhZTPi0DecayCharged(0),
154 fhDeltaPhiPi0DecayNeutral(0), fhXEPi0DecayNeutral(0), fhZTPi0DecayNeutral(0),
155 fhDeltaPhiDecayCharged(), fhXEDecayCharged(), fhZTDecayCharged(),
156 fhDeltaPhiDecayChargedAssocPtBin(),
157 fhMCPtTrigger(), fhMCPhiTrigger(), fhMCEtaTrigger(),
158 fhMCPtTriggerNotLeading(), fhMCPhiTriggerNotLeading(), fhMCEtaTriggerNotLeading(),
159 fhMCEtaCharged(), fhMCPhiCharged(),
160 fhMCDeltaEtaCharged(), fhMCDeltaPhiCharged(),
161 fhMCDeltaPhiDeltaEtaCharged(), fhMCDeltaPhiChargedPt(),
162 fhMCPtXECharged(), fhMCPtXEUeCharged(),
163 fhMCPtXEUeLeftCharged(),
164 fhMCPtHbpXECharged(), fhMCPtHbpXEUeCharged(),
165 fhMCPtHbpXEUeLeftCharged(),
167 fhMCPtZTCharged(), fhMCPtZTUeCharged(),
168 fhMCPtZTUeLeftCharged(),
169 fhMCPtHbpZTCharged(), fhMCPtHbpZTUeCharged(),
170 fhMCPtHbpZTUeLeftCharged(),
171 fhMCPtTrigPout(), fhMCPtAssocDeltaPhi(),
173 fhNEventsTrigger(0), fhNtracksMB(0), fhNclustersMB(0),
174 fhMixDeltaPhiCharged(0), fhMixDeltaPhiDeltaEtaCharged(0),
175 fhMixXECharged(0), fhMixXEUeCharged(0), fhMixHbpXECharged(0),
176 fhMixDeltaPhiChargedAssocPtBin(),
177 fhMixDeltaPhiChargedAssocPtBinDEta08(),
178 fhMixDeltaPhiChargedAssocPtBinDEta0(),
179 fhMixDeltaPhiDeltaEtaChargedAssocPtBin(),
180 fhEventBin(0), fhEventMixBin(0), fhEventMBBin(0)
184 //Initialize parameters
187 for(Int_t i = 0; i < 7; i++)
189 fhPtTriggerMC[i] = 0;
190 fhXEChargedMC[i] = 0;
191 fhDeltaPhiChargedMC[i] = 0;
192 for(Int_t ib = 0; ib < 4; ib++) fhPtDecayTriggerMC[ib][i] = 0;
195 for(Int_t ib = 0; ib < 4; ib++) fhPtDecayTrigger[ib] = 0;
197 for(Int_t i = 0; i < 7; i++)
199 fhPtTriggerPileUp [i] = 0 ;
200 fhDeltaPhiChargedPileUp [i] = 0 ; fhDeltaEtaChargedPileUp [i] = 0 ;
201 fhXEChargedPileUp [i] = 0 ; fhXEUeChargedPileUp [i] = 0 ;
202 fhZTChargedPileUp [i] = 0 ; fhZTUeChargedPileUp [i] = 0 ;
203 fhPtTrigChargedPileUp [i] = 0 ;
204 fhDeltaPhiChargedPtA3GeVPileUp[i] = 0 ; fhDeltaEtaChargedPtA3GeVPileUp[i] = 0 ;
209 //_________________________________________________________________
210 AliAnaParticleHadronCorrelation::~AliAnaParticleHadronCorrelation()
212 // Remove event containers
216 if(fListMixTrackEvents)
218 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
220 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
222 for(Int_t irp=0; irp<GetNRPBin(); irp++)
224 Int_t bin = GetEventMixBin(ic, iz, irp);
225 fListMixTrackEvents[bin]->Delete() ;
226 delete fListMixTrackEvents[bin] ;
232 delete[] fListMixTrackEvents;
234 if(fListMixCaloEvents)
236 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
238 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
240 for(Int_t irp=0; irp<GetNRPBin(); irp++)
242 Int_t bin = GetEventMixBin(ic, iz, irp);
243 fListMixCaloEvents[bin]->Delete() ;
244 delete fListMixCaloEvents[bin] ;
250 delete[] fListMixCaloEvents;
255 //__________________________________________________________________________________________________________________________________________
256 void AliAnaParticleHadronCorrelation::FillChargedAngularCorrelationHistograms(Float_t ptAssoc, Float_t ptTrig, Int_t bin,
257 Float_t phiAssoc, Float_t phiTrig, Float_t deltaPhi,
258 Float_t etaAssoc, Float_t etaTrig,
259 Int_t decayTag, Float_t hmpidSignal, Int_t outTOF,
260 Int_t cen, Int_t mcTag)
262 // Fill angular correlation related histograms
264 Float_t deltaEta = etaTrig-etaAssoc;
265 Float_t deltaPhiOrg = phiTrig-phiAssoc;
267 fhEtaCharged ->Fill(ptAssoc,etaAssoc);
268 fhPhiCharged ->Fill(ptAssoc,phiAssoc);
269 fhDeltaEtaCharged ->Fill(ptTrig ,deltaEta);
270 fhDeltaPhiCharged ->Fill(ptTrig ,deltaPhi);
271 fhDeltaPhiChargedPt->Fill(ptAssoc, deltaPhi);
272 fhDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
276 fhDeltaEtaChargedPtA3GeV ->Fill(ptTrig ,deltaEta);
277 fhDeltaPhiChargedPtA3GeV ->Fill(ptTrig ,deltaPhi);
278 fhDeltaPhiDeltaEtaChargedPtA3GeV->Fill(deltaPhi, deltaEta);
283 if(fFillPileUpHistograms)
287 fhDeltaPhiChargedOtherBC->Fill(ptTrig ,deltaPhi) ;
288 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVOtherBC->Fill(ptTrig ,deltaPhi) ;
292 fhDeltaPhiChargedBC0->Fill(ptTrig ,deltaPhi) ;
293 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVBC0->Fill(ptTrig ,deltaPhi) ;
296 Int_t vtxBC = GetReader()->GetVertexBC();
297 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
299 fhDeltaPhiChargedVtxBC0->Fill(ptTrig ,deltaPhi) ;
300 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVVtxBC0->Fill(ptTrig ,deltaPhi) ;
303 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
304 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
305 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
306 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
307 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
308 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
309 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
313 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
314 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
315 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
316 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
317 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
318 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
319 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
325 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
326 fhDeltaPhiChargedMC[mcIndex]->Fill(ptTrig , deltaPhi);
329 if(fDecayTrigger && decayTag > 0)
331 for(Int_t ibit = 0; ibit<fNDecayBits; ibit++)
333 if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit])) fhDeltaPhiDecayCharged[ibit]->Fill(ptTrig,deltaPhi);
337 Double_t dphiBrad = -100;
340 dphiBrad = atan2(sin(deltaPhiOrg), cos(deltaPhiOrg))/TMath::Pi();//-1 to 1
341 if( TMath::Abs(dphiBrad) > 0.325 && TMath::Abs(dphiBrad) < 0.475 ) //Hardcoded values, BAD, FIXME
343 fhAssocPtBkg->Fill(ptTrig, ptAssoc);
346 if( dphiBrad < -1./3 ) dphiBrad += 2;
347 fhDeltaPhiBrad->Fill(ptTrig, dphiBrad);
350 // Fill histograms in bins of associated particle pT
353 fhDeltaPhiDeltaEtaAssocPtBin [bin]->Fill(deltaPhi,deltaEta);
355 fhDeltaPhiAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
357 if(fFillEtaGapsHisto)
359 if(TMath::Abs(deltaEta)> 0.8)
360 fhDeltaPhiAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
362 if(TMath::Abs(deltaEta)< 0.01)
363 fhDeltaPhiAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
367 fhDeltaPhiBradAssocPtBin [bin]->Fill(ptTrig, dphiBrad);
369 if(fDecayTrigger && decayTag > 0 && fNDecayBits > 0 &&
370 GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[0]))
371 fhDeltaPhiDecayChargedAssocPtBin[bin]->Fill(ptTrig, deltaPhi);
373 if(fHMPIDCorrelation)
375 if( hmpidSignal > 0 )
377 //printf("Track pt %f with HMPID signal %f \n",pt,hmpidSignal);
378 fhDeltaPhiAssocPtBinHMPID[bin]->Fill(ptTrig, deltaPhi);
381 if(phiAssoc > 5*TMath::DegToRad() && phiAssoc < 20*TMath::DegToRad())
383 //printf("Track pt %f in HMPID acceptance phi %f \n ",pt,phi*TMath::RadToDeg() );
384 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->Fill(ptTrig, deltaPhi);
389 //fill different multiplicity/centrality histogram
390 if(fFillHighMultHistograms && cen >= 0 && cen < GetNCentrBin())
392 fhDeltaPhiChargedMult[cen]->Fill(ptTrig,deltaPhi);
393 fhDeltaEtaChargedMult[cen]->Fill(ptTrig,deltaEta);
397 //___________________________________________________________________________________________________________________________________
398 Bool_t AliAnaParticleHadronCorrelation::FillChargedMCCorrelationHistograms(Float_t mcAssocPt, Float_t mcAssocPhi, Float_t mcAssocEta,
399 Float_t mcTrigPt, Float_t mcTrigPhi, Float_t mcTrigEta,
402 // Fill MC histograms independently of AOD or ESD
406 // In case we requested the trigger to be a leading particle,
407 // check if this is true at the MC level.
408 // Not sure if it is correct to skip or not skip this.
410 if( fMakeAbsoluteLeading && mcAssocPt > mcTrigPt ) lead = kFALSE; // skip event
412 // Skip this event if near side associated particle pt larger than trigger
413 if( fMakeNearSideLeading && mcAssocPt > mcTrigPt &&
414 TMath::Abs(mcAssocPhi-mcTrigPhi)<TMath::PiOver2() ) lead = kFALSE; // skip event
417 // Select only hadrons in pt range
418 if ( mcAssocPt < fMinAssocPt || mcAssocPt > fMaxAssocPt ) return lead ; // exclude but continue
419 if ( mcAssocPt < GetReader()->GetCTSPtMin()) return lead ;
421 if( mcAssocPhi < 0 ) mcAssocPhi+=TMath::TwoPi();
424 // Remove trigger itself for correlation when use charged triggers
425 if(TMath::Abs(mcAssocPt -mcTrigPt ) < 1e-6 &&
426 TMath::Abs(mcAssocPhi-mcTrigPhi) < 1e-6 &&
427 TMath::Abs(mcAssocEta-mcTrigEta) < 1e-6) return lead ; // exclude but continue
429 Float_t mcdeltaPhi= mcTrigPhi-mcAssocPhi;
430 if(mcdeltaPhi <= -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
431 if(mcdeltaPhi > 3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
433 Float_t mcxE =-mcAssocPt/mcTrigPt*TMath::Cos(mcdeltaPhi);// -(mcAssocPx*pxprim+mcAssocPy*pyprim)/(mcTrigPt*mcTrigPt);
434 Float_t mchbpXE =-100 ;
435 if(mcxE > 0 ) mchbpXE = TMath::Log(1./mcxE);
437 Float_t mczT = mcAssocPt/mcTrigPt ;
438 Float_t mchbpZT =-100 ;
439 if(mczT > 0 ) mchbpZT = TMath::Log(1./mczT);
441 Double_t mcpout = mcAssocPt*TMath::Sin(mcdeltaPhi) ;
445 AliInfo(Form("Charged hadron: track Pt %f, track Phi %f, phi trigger %f. Cuts: delta phi %2.2f < %2.2f < %2.2f \n",
446 mcAssocPt,mcAssocPhi, mcTrigPhi,fDeltaPhiMinCut, mcdeltaPhi, fDeltaPhiMaxCut));
450 fhMCEtaCharged [histoIndex]->Fill(mcAssocPt, mcAssocEta);
451 fhMCPhiCharged [histoIndex]->Fill(mcAssocPt, mcAssocPhi);
452 fhMCDeltaEtaCharged[histoIndex]->Fill(mcTrigPt , mcTrigEta-mcAssocEta);
453 fhMCDeltaPhiCharged[histoIndex]->Fill(mcTrigPt , mcdeltaPhi);
454 fhMCPtAssocDeltaPhi[histoIndex]->Fill(mcAssocPt, mcdeltaPhi);
456 fhMCDeltaPhiDeltaEtaCharged[histoIndex]->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
458 //delta phi cut for correlation
459 if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
461 fhMCDeltaPhiChargedPt[histoIndex]->Fill(mcAssocPt,mcdeltaPhi);
462 fhMCPtXECharged [histoIndex]->Fill(mcTrigPt, mcxE);
463 fhMCPtHbpXECharged [histoIndex]->Fill(mcTrigPt, mchbpXE);
464 fhMCPtZTCharged [histoIndex]->Fill(mcTrigPt, mczT);
465 fhMCPtHbpZTCharged [histoIndex]->Fill(mcTrigPt, mchbpZT);
466 fhMCPtTrigPout [histoIndex]->Fill(mcTrigPt, mcpout) ;
472 if ( (mcdeltaPhi > fUeDeltaPhiMinCut) && (mcdeltaPhi < fUeDeltaPhiMaxCut) )
474 //Double_t randomphi = gRandom->Uniform(TMath::Pi()/2,3*TMath::Pi()/2);
475 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
476 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
477 Double_t mcUezT = mcAssocPt/mcTrigPt;
480 printf("FillChargedMCCorrelationHistograms(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
481 mcUexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
483 fhMCPtXEUeCharged[histoIndex]->Fill(mcTrigPt,mcUexE);
484 if(mcUexE > 0) fhMCPtHbpXEUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
486 fhMCPtZTUeCharged[histoIndex]->Fill(mcTrigPt,mcUezT);
487 if(mcUezT > 0) fhMCPtHbpZTUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
489 fhMCUePart[histoIndex]->Fill(mcTrigPt);
495 if((mcdeltaPhi<-fUeDeltaPhiMinCut) || (mcdeltaPhi >2*fUeDeltaPhiMaxCut))
497 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
498 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
499 Double_t mcUezT = mcAssocPt/mcTrigPt;
502 printf("FillChargedMCCorrelationHistograms(): Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
503 mcUexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
505 fhMCPtXEUeLeftCharged[histoIndex]->Fill(mcTrigPt,mcUexE);
506 if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
508 fhMCPtZTUeLeftCharged[histoIndex]->Fill(mcTrigPt,mcUezT);
509 if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
516 //___________________________________________________________________________________________________________________
517 void AliAnaParticleHadronCorrelation::FillChargedMomentumImbalanceHistograms(Float_t ptTrig, Float_t ptAssoc,
519 Int_t cen, Int_t charge,
520 Int_t bin, Int_t decayTag,
521 Int_t outTOF, Int_t mcTag)
524 // Fill mostly momentum imbalance related histograms
526 Float_t zT = ptAssoc/ptTrig ;
527 Float_t xE =-ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
528 Float_t pout = ptAssoc*TMath::Sin(deltaPhi) ;
531 printf("FillChargedMomentumImbalanceHistograms(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
532 xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
534 Float_t hbpXE = -100;
535 Float_t hbpZT = -100;
537 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
538 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
540 fhXECharged ->Fill(ptTrig , xE);
541 fhPtHbpXECharged ->Fill(ptTrig , hbpXE);
542 fhZTCharged ->Fill(ptTrig , zT);
543 fhPtHbpZTCharged ->Fill(ptTrig , hbpZT);
544 fhPtTrigPout ->Fill(ptTrig , pout) ;
545 fhPtTrigCharged ->Fill(ptTrig , ptAssoc) ;
546 if((deltaPhi > 5*TMath::Pi()/6.) && (deltaPhi < 7*TMath::Pi()/6.))
548 fhXECharged_Cone2 ->Fill(ptTrig , xE);
549 fhPtHbpXECharged_Cone2 ->Fill(ptTrig , hbpXE);
555 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
556 fhXEChargedMC[mcIndex]->Fill(ptTrig , xE);
560 if(fFillPileUpHistograms)
564 fhXEChargedOtherBC ->Fill(ptTrig,xE);
565 fhZTChargedOtherBC ->Fill(ptTrig,zT);
566 fhPtTrigChargedOtherBC->Fill(ptTrig,ptAssoc);
570 fhXEChargedBC0 ->Fill(ptTrig,xE);
571 fhZTChargedBC0 ->Fill(ptTrig,zT);
572 fhPtTrigChargedBC0->Fill(ptTrig,ptAssoc);
575 Int_t vtxBC = GetReader()->GetVertexBC();
576 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
578 fhXEChargedVtxBC0 ->Fill(ptTrig,xE);
579 fhZTChargedVtxBC0 ->Fill(ptTrig,zT);
580 fhPtTrigChargedVtxBC0->Fill(ptTrig,ptAssoc);
583 if(GetReader()->IsPileUpFromSPD()) { fhXEChargedPileUp[0]->Fill(ptTrig,xE); fhZTChargedPileUp[0]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[0]->Fill(ptTrig,ptAssoc); }
584 if(GetReader()->IsPileUpFromEMCal()) { fhXEChargedPileUp[1]->Fill(ptTrig,xE); fhZTChargedPileUp[1]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[1]->Fill(ptTrig,ptAssoc); }
585 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEChargedPileUp[2]->Fill(ptTrig,xE); fhZTChargedPileUp[2]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[2]->Fill(ptTrig,ptAssoc); }
586 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEChargedPileUp[3]->Fill(ptTrig,xE); fhZTChargedPileUp[3]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[3]->Fill(ptTrig,ptAssoc); }
587 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEChargedPileUp[4]->Fill(ptTrig,xE); fhZTChargedPileUp[4]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[4]->Fill(ptTrig,ptAssoc); }
588 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEChargedPileUp[5]->Fill(ptTrig,xE); fhZTChargedPileUp[5]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[5]->Fill(ptTrig,ptAssoc); }
589 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEChargedPileUp[6]->Fill(ptTrig,xE); fhZTChargedPileUp[6]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[6]->Fill(ptTrig,ptAssoc); }
592 if(fDecayTrigger && decayTag > 0)
594 for(Int_t ibit = 0; ibit<fNDecayBits; ibit++)
596 if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit]))
598 fhXEDecayCharged[ibit]->Fill(ptTrig,xE);
599 fhZTDecayCharged[ibit]->Fill(ptTrig,zT);
602 } // photon decay pi0/eta trigger
604 if(bin >= 0 && fFillMomImbalancePtAssocBinsHisto)//away side
606 fhXEAssocPtBin[bin]->Fill(ptTrig, xE) ;
607 fhZTAssocPtBin[bin]->Fill(ptTrig, zT) ;
612 Int_t vz = GetEventVzBin();
613 fhXEVZ[vz]->Fill(ptTrig, xE) ;
614 fhZTVZ[vz]->Fill(ptTrig, zT) ;
619 fhXEPosCharged->Fill(ptTrig,xE) ;
620 fhZTPosCharged->Fill(ptTrig,zT) ;
624 fhXENegCharged->Fill(ptTrig,xE) ;
625 fhZTNegCharged->Fill(ptTrig,zT) ;
628 //fill different multiplicity/centrality histogram
629 if(fFillHighMultHistograms && cen >= 0 && cen < GetNCentrBin())
631 fhXEMult[cen]->Fill(ptTrig,xE);
632 fhZTMult[cen]->Fill(ptTrig,zT);
633 } //multiplicity/centrality events selection
636 //_______________________________________________________________________________________________________________________
637 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventHistograms(Float_t ptTrig, Float_t ptAssoc,
638 Float_t deltaPhi, Int_t cen, Int_t outTOF)
640 // Fill underlying event histograms
642 fhUePart->Fill(ptTrig);
644 fhDeltaPhiUeChargedPt->Fill(ptAssoc,deltaPhi);
646 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
647 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
648 Double_t uezT = ptAssoc/ptTrig;
651 printf("FillChargedUnderlyingEventHistograms(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
652 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
654 fhXEUeCharged->Fill(ptTrig,uexE);
655 if(uexE > 0) fhPtHbpXEUeCharged->Fill(ptTrig,TMath::Log(1/uexE));
657 fhZTUeCharged->Fill(ptTrig,uezT);
658 if(uezT > 0) fhPtHbpZTUeCharged->Fill(ptTrig,TMath::Log(1/uezT));
662 if(fFillPileUpHistograms)
666 fhXEUeChargedOtherBC->Fill(ptTrig,uexE);
667 fhZTUeChargedOtherBC->Fill(ptTrig,uezT);
671 fhXEUeChargedBC0->Fill(ptTrig,uexE);
672 fhZTUeChargedBC0->Fill(ptTrig,uezT);
675 Int_t vtxBC = GetReader()->GetVertexBC();
676 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
678 fhXEUeChargedVtxBC0->Fill(ptTrig,uexE);
679 fhZTUeChargedVtxBC0->Fill(ptTrig,uezT);
682 if(GetReader()->IsPileUpFromSPD()) { fhXEUeChargedPileUp[0]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[0]->Fill(ptTrig,uezT);}
683 if(GetReader()->IsPileUpFromEMCal()) { fhXEUeChargedPileUp[1]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[1]->Fill(ptTrig,uezT);}
684 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEUeChargedPileUp[2]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[2]->Fill(ptTrig,uezT);}
685 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEUeChargedPileUp[3]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[3]->Fill(ptTrig,uezT);}
686 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEUeChargedPileUp[4]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[4]->Fill(ptTrig,uezT);}
687 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEUeChargedPileUp[5]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[5]->Fill(ptTrig,uezT);}
688 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEUeChargedPileUp[6]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[6]->Fill(ptTrig,uezT);}
691 //fill different multiplicity/centrality histogram
692 if(fFillHighMultHistograms && cen >= 0 && cen < GetNCentrBin())
694 fhXEUeMult[cen]->Fill(ptTrig,uexE);
695 fhZTUeMult[cen]->Fill(ptTrig,uezT);
699 //_____________________________________________________________________________________________________
700 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventSidesHistograms(Float_t ptTrig,
704 // Fill underlying event histograms to the left and right of trigger
705 // Right cone is the default UE.
707 if((deltaPhi<-fUeDeltaPhiMinCut) || (deltaPhi >2*fUeDeltaPhiMaxCut))
709 fhDeltaPhiUeLeftCharged->Fill(ptAssoc,deltaPhi);
710 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
711 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
712 Double_t uezT = ptAssoc/ptTrig;
715 printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
716 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
718 fhXEUeLeftCharged->Fill(ptTrig,uexE);
719 if(uexE > 0) fhPtHbpXEUeLeftCharged->Fill(ptTrig,TMath::Log(1/uexE));
721 fhZTUeLeftCharged->Fill(ptTrig,uezT);
722 if(uezT > 0) fhPtHbpZTUeLeftCharged->Fill(ptTrig,TMath::Log(1/uezT));
724 fhDeltaPhiUeLeftCharged->Fill(ptAssoc, deltaPhi);
727 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-TMath::Pi()/2))
729 fhDeltaPhiUeLeftDownCharged->Fill(ptAssoc,deltaPhi);
730 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
731 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
734 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",
735 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
737 fhXEUeLeftDownCharged->Fill(ptTrig,uexE);
740 if((deltaPhi>2*fUeDeltaPhiMaxCut) && (deltaPhi <3*TMath::Pi()/2))
742 fhDeltaPhiUeLeftUpCharged->Fill(ptAssoc,deltaPhi);
743 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
744 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
747 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",
748 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
750 fhXEUeLeftUpCharged->Fill(ptTrig,uexE);
753 if((deltaPhi > TMath::Pi()/2) && (deltaPhi < fUeDeltaPhiMaxCut))
755 fhDeltaPhiUeRightUpCharged->Fill(ptAssoc,deltaPhi);
756 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
757 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
760 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",
761 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
763 fhXEUeRightUpCharged->Fill(ptTrig,uexE);
766 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < TMath::Pi()/2))
768 fhDeltaPhiUeRightDownCharged->Fill(ptAssoc,deltaPhi);
769 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
770 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
773 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",
774 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
776 fhXEUeRightDownCharged->Fill(ptTrig,uexE);
780 //______________________________________________________________________________________________________________________________
781 void AliAnaParticleHadronCorrelation::FillDecayPhotonCorrelationHistograms(Float_t ptAssoc, Float_t phiAssoc,
782 TLorentzVector mom1, TLorentzVector mom2,
783 Bool_t bChargedOrNeutral)
785 // Do correlation with decay photons of triggered pi0 or eta
787 // Calculate the correlation parameters
788 Float_t ptDecay1 = mom1.Pt();
789 Float_t ptDecay2 = mom2.Pt();
791 Float_t zTDecay1 = -100, zTDecay2 = -100;
792 if(ptDecay1 > 0) zTDecay1 = ptAssoc/ptDecay1 ;
793 if(ptDecay2 > 0) zTDecay2 = ptAssoc/ptDecay2 ;
795 Float_t deltaPhiDecay1 = mom1.Phi()-phiAssoc;
796 if(deltaPhiDecay1< -TMath::PiOver2()) deltaPhiDecay1+=TMath::TwoPi();
797 if(deltaPhiDecay1>3*TMath::PiOver2()) deltaPhiDecay1-=TMath::TwoPi();
799 Float_t deltaPhiDecay2 = mom2.Phi()-phiAssoc;
800 if(deltaPhiDecay2< -TMath::PiOver2()) deltaPhiDecay2+=TMath::TwoPi();
801 if(deltaPhiDecay2>3*TMath::PiOver2()) deltaPhiDecay2-=TMath::TwoPi();
803 Float_t xEDecay1 =-zTDecay1*TMath::Cos(deltaPhiDecay1); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
804 Float_t xEDecay2 =-zTDecay2*TMath::Cos(deltaPhiDecay2); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
806 if(bChargedOrNeutral) // correlate with charges
808 fhDeltaPhiPi0DecayCharged->Fill(ptDecay1, deltaPhiDecay1);
809 fhDeltaPhiPi0DecayCharged->Fill(ptDecay2, deltaPhiDecay2);
811 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms( Charged corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
813 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
815 fhZTPi0DecayCharged->Fill(ptDecay1,zTDecay1);
816 fhXEPi0DecayCharged->Fill(ptDecay1,xEDecay1);
818 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
820 fhZTPi0DecayCharged->Fill(ptDecay2,zTDecay2);
821 fhXEPi0DecayCharged->Fill(ptDecay2,xEDecay2);
824 else // correlate with neutrals
826 fhDeltaPhiPi0DecayNeutral->Fill(ptDecay1, deltaPhiDecay1);
827 fhDeltaPhiPi0DecayNeutral->Fill(ptDecay2, deltaPhiDecay2);
829 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms(Neutral corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
831 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
833 fhZTPi0DecayNeutral->Fill(ptDecay1,zTDecay1);
834 fhXEPi0DecayNeutral->Fill(ptDecay1,xEDecay1);
836 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
838 fhZTPi0DecayNeutral->Fill(ptDecay2,zTDecay2);
839 fhXEPi0DecayNeutral->Fill(ptDecay2,xEDecay2);
844 //_____________________________________________________________________________________________________________________________
845 void AliAnaParticleHadronCorrelation::FillNeutralUnderlyingEventSidesHistograms(Float_t ptTrig, Float_t ptAssoc,
846 Float_t zT, Float_t hbpZT,
849 // Fill underlying event histograms to the left of trigger
850 // Right is the default case
852 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
854 Float_t xE =-ptAssoc/ptTrig*TMath::Cos(randomphi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
855 Float_t hbpXE = -100;
856 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
858 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-fUeDeltaPhiMaxCut))
860 fhDeltaPhiUeLeftNeutral->Fill(ptAssoc, deltaPhi);
861 fhXEUeLeftNeutral ->Fill(ptTrig , xE);
862 fhPtHbpXEUeLeftNeutral ->Fill(ptTrig , hbpXE);
863 fhZTUeLeftNeutral ->Fill(ptTrig , zT);
864 fhPtHbpZTUeLeftNeutral ->Fill(ptTrig , hbpZT);
868 //______________________________________________________
869 void AliAnaParticleHadronCorrelation::FillEventMixPool()
871 // Fill the pool with tracks or clusters if requested
873 if ( !DoOwnMix() ) return;
875 FillChargedEventMixPool();
877 // Do the cluster pool filling only if requested
878 // or in case of isolation cut using clusters in the cone.
879 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
881 if( !fFillNeutralEventMixPool && !isoCase) return;
883 FillNeutralEventMixPool();
886 //_____________________________________________________________
887 void AliAnaParticleHadronCorrelation::FillChargedEventMixPool()
889 // Mixed event pool filling for tracks
891 if(fUseMixStoredInReader && GetReader()->GetLastTracksMixedEvent() == GetEventNumber())
893 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
894 return ; // pool filled previously for another trigger
897 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
898 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
900 if(!inputHandler) return ;
902 // Do mixing only with MB event (or the chosen mask), if not skip
903 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
905 Int_t eventBin = GetEventMixBin();
907 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
908 if(eventBin < 0) return;
910 fhEventMBBin->Fill(eventBin);
912 TObjArray * mixEventTracks = new TObjArray;
914 if(fUseMixStoredInReader)
916 fListMixTrackEvents[eventBin] = GetReader()->GetListWithMixedEventsForTracks(eventBin);
919 if(!fListMixTrackEvents[eventBin]) fListMixTrackEvents[eventBin] = new TList();
921 //printf("%s ***** Pool Event bin : %d - nTracks %d\n",GetInputAODName().Data(),eventBin, GetCTSTracks()->GetEntriesFast());
923 TList * pool = fListMixTrackEvents[eventBin];
926 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
928 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
930 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
931 p3.SetXYZ(mom[0],mom[1],mom[2]);
932 Float_t pt = p3.Pt();
934 //Select only hadrons in pt range
935 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
937 AliAODPWG4Particle * mixedTrack = new AliAODPWG4Particle(mom[0],mom[1],mom[2],0);
938 mixedTrack->SetDetector("CTS");
939 mixedTrack->SetChargedBit(track->Charge()>0);
940 mixEventTracks->Add(mixedTrack);
943 fhNtracksMB->Fill(mixEventTracks->GetEntriesFast(),eventBin);
945 //Set the event number where the last event was added, to avoid double pool filling
946 GetReader()->SetLastTracksMixedEvent(GetEventNumber());
948 //printf("Add event to pool with %d tracks \n ",mixEventTracks->GetEntries());
949 pool->AddFirst(mixEventTracks);
952 //printf("Pool size %d, max %d\n",pool->GetSize(), GetNMaxEvMix());
954 if(pool->GetSize() > GetNMaxEvMix())
956 TClonesArray * tmp = static_cast<TClonesArray*>(pool->Last()) ;
962 //_____________________________________________________________
963 void AliAnaParticleHadronCorrelation::FillNeutralEventMixPool()
965 // Mixed event pool filling for neutral clusters
966 // Right now only for EMCAL and in isolation case
968 //printf("FillNeutralEventMixPool for %s\n",GetInputAODName().Data());
970 if(fUseMixStoredInReader && GetReader()->GetLastCaloMixedEvent() == GetEventNumber())
972 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
973 return ; // pool filled previously for another trigger
976 TObjArray * pl = GetEMCALClusters();
977 //if (GetAODObjArrayName.Contains("PHOS") )pl = GetPHOSClusters();
978 //else pl = GetEMCALClusters();
980 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
981 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
983 if(!inputHandler) return ;
985 // Do mixing only with MB event (or the chosen mask), if not skip
986 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
988 Int_t eventBin = GetEventMixBin();
990 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
991 if(eventBin < 0) return;
993 TObjArray * mixEventCalo = new TObjArray;
995 if(fUseMixStoredInReader)
997 fListMixCaloEvents[eventBin] = GetReader()->GetListWithMixedEventsForCalo(eventBin);
1000 if(!fListMixCaloEvents[eventBin]) fListMixCaloEvents[eventBin] = new TList();
1002 TList * poolCalo = fListMixCaloEvents[eventBin];
1006 for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ )
1008 AliVCluster * calo = (AliVCluster *) (pl->At(ipr)) ;
1010 // remove matched clusters
1011 if( IsTrackMatched( calo, GetReader()->GetInputEvent() ) ) continue ;
1013 //Cluster momentum calculation
1014 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
1016 calo->GetMomentum(mom,GetVertex(0)) ;
1017 }//Assume that come from vertex in straight line
1020 Double_t vertex[]={0,0,0};
1021 calo->GetMomentum(mom,vertex) ;
1024 Float_t pt = mom.Pt();
1025 //Select only clusters in pt range
1026 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
1028 AliAODPWG4Particle * mixedCalo = new AliAODPWG4Particle(mom);
1029 mixedCalo->SetDetector("EMCAL");
1030 mixEventCalo->Add(mixedCalo);
1033 fhNclustersMB->Fill(mixEventCalo->GetEntriesFast(),eventBin);
1035 //Set the event number where the last event was added, to avoid double pool filling
1036 GetReader()->SetLastCaloMixedEvent(GetEventNumber());
1038 //printf("Add event to pool with %d clusters \n ",mixEventCalo->GetEntries());
1039 poolCalo->AddFirst(mixEventCalo);
1042 //printf("Pool size %d, max %d\n",poolCalo->GetSize(), GetNMaxEvMix());
1044 if(poolCalo->GetSize() > GetNMaxEvMix())
1045 {//Remove last event
1046 TClonesArray * tmp = static_cast<TClonesArray*>(poolCalo->Last()) ;
1047 poolCalo->RemoveLast() ;
1052 //_________________________________________________________________________________________________________________
1053 Bool_t AliAnaParticleHadronCorrelation::FindLeadingOppositeHadronInWindow(AliAODPWG4ParticleCorrelation * particle)
1055 // Select events where the leading charged particle in the opposite hemisphere
1056 // to the trigger particle is in a window centered at 180 from the trigger
1058 Float_t phiTrig = particle->Phi();
1059 Float_t etaTrig = particle->Eta();
1060 Float_t ptTrig = particle->Pt();
1061 Float_t ptLeadHad = -100 ;
1062 Float_t phiLeadHad = -100 ;
1063 Float_t etaLeadHad = -100 ;
1066 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
1068 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
1070 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
1071 p3.SetXYZ(mom[0],mom[1],mom[2]);
1073 Float_t pt = p3.Pt();
1074 Float_t phi = p3.Phi() ;
1075 if(phi < 0 ) phi+= TMath::TwoPi();
1077 if(pt > ptLeadHad && TMath::Abs(phi-phiTrig) > TMath::PiOver2()) // in opposite hemisphere
1081 etaLeadHad = p3.Eta();
1085 fhPtLeadingOppositeHadron ->Fill(ptTrig, ptLeadHad);
1086 fhPtDiffPhiLeadingOppositeHadron->Fill(ptTrig,phiLeadHad-phiTrig);
1087 fhPtDiffEtaLeadingOppositeHadron->Fill(ptTrig,etaLeadHad-etaTrig);
1091 printf("AliAnaParticleHadronCorrelation::FindLeadingOppositeHadronInWindow() pT %2.2f, phi %2.2f, eta %2.2f\n",
1092 ptLeadHad,phiLeadHad*TMath::RadToDeg(),etaLeadHad);
1094 printf("\t pT trig %2.2f, Dphi (trigger-hadron) %2.2f, Deta (trigger-hadron) %2.2f\n",
1095 ptTrig, (phiLeadHad-phiTrig)*TMath::RadToDeg(), etaLeadHad-etaTrig);
1096 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());
1099 if( ptLeadHad < fMinLeadHadPt ||
1100 ptLeadHad > fMaxLeadHadPt ) return kFALSE;
1102 //printf("Accept leading hadron pT \n");
1104 if( TMath::Abs(phiLeadHad-phiTrig) < fMinLeadHadPhi ||
1105 TMath::Abs(phiLeadHad-phiTrig) > fMaxLeadHadPhi ) return kFALSE;
1107 //printf("Accept leading hadron phi \n");
1112 //____________________________________________________________
1113 TObjString* AliAnaParticleHadronCorrelation::GetAnalysisCuts()
1115 //Save parameters used for analysis
1116 TString parList ; //this will be list of parameters used for this analysis.
1117 const Int_t buffersize = 560;
1118 char onePar[buffersize] ;
1120 snprintf(onePar,buffersize,"--- AliAnaPaticleHadronCorrelation ---:") ;
1122 snprintf(onePar,buffersize," %3.2f < Pt associated < %3.2f; ", fMinAssocPt, fMaxAssocPt) ;
1124 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-Hadron < %3.2f; ", fDeltaPhiMinCut, fDeltaPhiMaxCut) ;
1126 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-UeHadron < %3.2f; ", fUeDeltaPhiMinCut, fUeDeltaPhiMaxCut) ;
1128 snprintf(onePar,buffersize,"Isolated Trigger? %d;", fSelectIsolated) ;
1130 snprintf(onePar,buffersize,"Several UE? %d;", fMakeSeveralUE) ;
1132 snprintf(onePar,buffersize,"Name of AOD Pi0 Branch %s;", fPi0AODBranchName.Data());
1134 snprintf(onePar,buffersize,"Do Decay-hadron correlation ? pi0 %d, decay %d;", fPi0Trigger, fDecayTrigger) ;
1136 snprintf(onePar,buffersize,"Select absolute leading for cluster triggers ? %d or Near Side Leading %d;",
1137 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
1139 snprintf(onePar,buffersize,"Associated particle pt bins %d: ", fNAssocPtBins) ;
1141 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
1142 snprintf(onePar,buffersize,"bin %d = [%2.1f,%2.1f];", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
1146 //Get parameters set in base class.
1147 parList += GetBaseParametersList() ;
1149 //Get parameters set in FiducialCut class (not available yet)
1150 //parlist += GetFidCut()->GetFidCutParametersList()
1152 return new TObjString(parList) ;
1156 //________________________________________________________________
1157 TList * AliAnaParticleHadronCorrelation::GetCreateOutputObjects()
1159 // Create histograms to be saved in output file and
1160 // store them in fOutputContainer
1162 TList * outputContainer = new TList() ;
1163 outputContainer->SetName("CorrelationHistos") ;
1165 Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Int_t netabins = GetHistogramRanges()->GetHistoEtaBins();
1166 Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax();
1167 Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin();
1169 Int_t ndeltaphibins = GetHistogramRanges()->GetHistoDeltaPhiBins(); Int_t ndeltaetabins = GetHistogramRanges()->GetHistoDeltaEtaBins();
1170 Float_t deltaphimax = GetHistogramRanges()->GetHistoDeltaPhiMax(); Float_t deltaetamax = GetHistogramRanges()->GetHistoDeltaEtaMax();
1171 Float_t deltaphimin = GetHistogramRanges()->GetHistoDeltaPhiMin(); Float_t deltaetamin = GetHistogramRanges()->GetHistoDeltaEtaMin();
1173 Int_t ntrbins = GetHistogramRanges()->GetHistoTrackMultiplicityBins(); Int_t nclbins = GetHistogramRanges()->GetHistoNClustersBins();
1174 Int_t trmax = GetHistogramRanges()->GetHistoTrackMultiplicityMax(); Int_t clmax = GetHistogramRanges()->GetHistoNClustersMax();
1175 Int_t trmin = GetHistogramRanges()->GetHistoTrackMultiplicityMin(); Int_t clmin = GetHistogramRanges()->GetHistoNClustersMin();
1177 Int_t nxeztbins = GetHistogramRanges()->GetHistoRatioBins(); Int_t nhbpbins = GetHistogramRanges()->GetHistoHBPBins();
1178 Float_t xeztmax = GetHistogramRanges()->GetHistoRatioMax(); Float_t hbpmax = GetHistogramRanges()->GetHistoHBPMax();
1179 Float_t xeztmin = GetHistogramRanges()->GetHistoRatioMin(); Float_t hbpmin = GetHistogramRanges()->GetHistoHBPMin();
1181 Int_t nMixBins = GetNCentrBin()*GetNZvertBin()*GetNRPBin();
1183 TString nameMC[] = {"Photon","Pi0","Pi0Decay","EtaDecay","OtherDecay","Electron","Hadron"};
1184 TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
1186 // For vz dependent histograms, if option ON
1188 if(fCorrelVzBin) nz = GetNZvertBin();
1192 // Fill histograms for neutral clusters in mixing?
1193 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
1194 Bool_t neutralMix = fFillNeutralEventMixPool || isoCase ;
1196 fhPtTriggerInput = new TH1F("hPtTriggerInput","Input trigger #it{p}_{T}", nptbins,ptmin,ptmax);
1197 fhPtTriggerInput->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1198 outputContainer->Add(fhPtTriggerInput);
1200 if( fM02MaxCut > 0 && fM02MinCut > 0 )
1202 fhPtTriggerSSCut = new TH1F("hPtTriggerSSCut","Trigger #it{p}_{T} after #lambda^{2}_{0} cut", nptbins,ptmin,ptmax);
1203 fhPtTriggerSSCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1204 outputContainer->Add(fhPtTriggerSSCut);
1207 if( OnlyIsolated() )
1209 fhPtTriggerIsoCut = new TH1F("hPtTriggerIsoCut","Trigger #it{p}_{T} after isolation (and #lambda^{2}_{0} cut)", nptbins,ptmin,ptmax);
1210 fhPtTriggerIsoCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1211 outputContainer->Add(fhPtTriggerIsoCut);
1214 fhPtTriggerFidCut = new TH1F("hPtTriggerFidCut","Trigger #it{p}_{T} after fiducial (isolation and #lambda^{2}_{0}) cut", nptbins,ptmin,ptmax);
1215 fhPtTriggerFidCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1216 outputContainer->Add(fhPtTriggerFidCut);
1218 fhPtTrigger = new TH1F("hPtTrigger","#it{p}_{T} distribution of trigger particles (after opposite hadron leading cut and rest)", nptbins,ptmin,ptmax);
1219 fhPtTrigger->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1220 outputContainer->Add(fhPtTrigger);
1224 for(Int_t i=0; i < 7; i++)
1226 fhPtTriggerMC[i] = new TH1F(Form("hPtTrigger_MC%s",nameMC[i].Data()),
1227 Form("#it{p}_{T} distribution of trigger particles, trigger origin is %s",nameMC[i].Data()),
1228 nptbins,ptmin,ptmax);
1229 fhPtTriggerMC[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1230 outputContainer->Add(fhPtTriggerMC[i]);
1236 for(Int_t ibit = 0; ibit < fNDecayBits; ibit++)
1238 fhPtDecayTrigger[ibit] = new TH1F(Form("hPtDecayTrigger_bit%d",fDecayBits[ibit]),
1239 Form("#it{p}_{T} distribution of trigger particles, decay Bit %d",fDecayBits[ibit]),
1240 nptbins,ptmin,ptmax);
1241 fhPtDecayTrigger[ibit]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1242 outputContainer->Add(fhPtDecayTrigger[ibit]);
1246 for(Int_t i=0; i < 7; i++)
1248 fhPtDecayTriggerMC[ibit][i] = new TH1F(Form("hPtDecayTrigger_bit%d_MC%s",fDecayBits[ibit], nameMC[i].Data()),
1249 Form("#it{p}_{T} distribution of trigger particles, decay Bit %d, trigger origin is %s",fDecayBits[ibit], nameMC[i].Data()),
1250 nptbins,ptmin,ptmax);
1251 fhPtDecayTriggerMC[ibit][i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1252 outputContainer->Add(fhPtDecayTriggerMC[ibit][i]);
1260 fhPtTriggerVzBin = new TH2F("hPtTriggerVzBin","#it{p}_{T} distribution of trigger particles vs vz bin", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
1261 fhPtTriggerVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1262 fhPtTriggerVzBin->SetYTitle("#it{v}_{#it{z}} bin");
1263 outputContainer->Add(fhPtTriggerVzBin);
1266 fhPtTriggerBin = new TH2F ("hPtTriggerBin","#it{p}_{T} distribution of trigger particles", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
1267 fhPtTriggerBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1268 fhPtTriggerBin->SetYTitle("Bin");
1269 outputContainer->Add(fhPtTriggerBin);
1271 fhPhiTrigger = new TH2F ("hPhiTrigger","#phi distribution of trigger Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
1272 fhPhiTrigger->SetYTitle("#phi (rad)");
1273 outputContainer->Add(fhPhiTrigger);
1275 fhEtaTrigger = new TH2F ("hEtaTrigger","#eta distribution of trigger",nptbins,ptmin,ptmax, netabins,etamin,etamax);
1276 fhEtaTrigger->SetYTitle("#eta ");
1277 outputContainer->Add(fhEtaTrigger);
1279 if(fFillHighMultHistograms)
1281 fhPtTriggerCentrality = new TH2F("hPtTriggerCentrality","Trigger particle #it{p}_{T} vs centrality",nptbins,ptmin,ptmax,100,0.,100) ;
1282 fhPtTriggerCentrality->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1283 fhPtTriggerCentrality->SetYTitle("Centrality (%)");
1284 outputContainer->Add(fhPtTriggerCentrality) ;
1286 fhPtTriggerEventPlane = new TH2F("hPtTriggerEventPlane","Trigger particle #it{p}_{T} vs event plane angle",nptbins,ptmin,ptmax, 100,0.,TMath::Pi()) ;
1287 fhPtTriggerEventPlane->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1288 fhPtTriggerEventPlane->SetXTitle("EP angle (rad)");
1289 outputContainer->Add(fhPtTriggerEventPlane) ;
1291 fhTriggerEventPlaneCentrality = new TH2F("hTriggerEventPlaneCentrality","Trigger particle centrality vs event plane angle",100,0.,100,100,0.,TMath::Pi()) ;
1292 fhTriggerEventPlaneCentrality->SetXTitle("Centrality (%)");
1293 fhTriggerEventPlaneCentrality->SetYTitle("EP angle (rad)");
1294 outputContainer->Add(fhTriggerEventPlaneCentrality) ;
1297 // Leading hadron in oposite side
1298 if(fSelectLeadingHadronAngle)
1300 fhPtLeadingOppositeHadron = new TH2F("hPtTriggerPtLeadingOppositeHadron","Leading hadron opposite to trigger vs trigger #it{p}_{T}",
1301 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1302 fhPtLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1303 fhPtLeadingOppositeHadron->SetYTitle("#it{p}_{T}^{lead hadron} (GeV/#it{c})");
1304 outputContainer->Add(fhPtLeadingOppositeHadron);
1306 fhPtDiffPhiLeadingOppositeHadron = new TH2F("hPtTriggerDiffPhiTriggerLeadingOppositeHadron","#phi_{trigger}-#phi_{leading opposite hadron} vs #it{p}_{T}^{trig}",
1307 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
1308 fhPtDiffPhiLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1309 fhPtDiffPhiLeadingOppositeHadron->SetYTitle("#phi_{trigger}-#phi_{leading opposite hadron} (rad)");
1310 outputContainer->Add(fhPtDiffPhiLeadingOppositeHadron);
1312 fhPtDiffEtaLeadingOppositeHadron = new TH2F("hPtTriggerDiffEtaTriggerPhiLeadingOppositeHadron","#eta_{trigger}-#eta_{leading opposite hadron} vs #it{p}_{T}^{trig}",
1313 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1314 fhPtDiffEtaLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1315 fhPtDiffEtaLeadingOppositeHadron->SetYTitle("#eta_{trigger}-#eta_{leading opposite hadron}");
1316 outputContainer->Add(fhPtDiffEtaLeadingOppositeHadron);
1319 //Correlation with charged hadrons
1321 fhDeltaPhiDeltaEtaCharged = new TH2F
1322 ("hDeltaPhiDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}}",
1323 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1324 fhDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
1325 fhDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
1327 fhDeltaPhiDeltaEtaChargedPtA3GeV = new TH2F
1328 ("hDeltaPhiDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}, #it{p}_{TA}>3 GeV/#it{c}}",
1329 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1330 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetXTitle("#Delta #phi (rad)");
1331 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1333 fhPhiCharged = new TH2F
1334 ("hPhiCharged","#phi_{h^{#pm}} vs #it{p}_{T #pm}",
1335 nptbins,ptmin,ptmax,180,0,TMath::TwoPi());
1336 fhPhiCharged->SetYTitle("#phi_{h^{#pm}} (rad)");
1337 fhPhiCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
1339 fhEtaCharged = new TH2F
1340 ("hEtaCharged","#eta_{h^{#pm}} vs #it{p}_{T #pm}",
1341 nptbins,ptmin,ptmax,100,-1.,1.);
1342 fhEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
1343 fhEtaCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
1345 fhDeltaPhiCharged = new TH2F
1346 ("hDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
1347 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1348 fhDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
1349 fhDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1351 fhDeltaPhiChargedPtA3GeV = new TH2F
1352 ("hDeltaPhiChargedPtA3GeV","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}",
1353 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1354 fhDeltaPhiChargedPtA3GeV->SetYTitle("#Delta #phi (rad)");
1355 fhDeltaPhiChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1358 fhDeltaPhiChargedPt = new TH2F
1359 ("hDeltaPhiChargedPt","#phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}",
1360 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1361 fhDeltaPhiChargedPt->SetYTitle("#Delta #phi (rad)");
1362 fhDeltaPhiChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1364 fhDeltaEtaCharged = new TH2F
1365 ("hDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}",
1366 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1367 fhDeltaEtaCharged->SetYTitle("#Delta #eta");
1368 fhDeltaEtaCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1370 fhDeltaEtaChargedPtA3GeV = new TH2F
1371 ("hDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}",
1372 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1373 fhDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1374 fhDeltaEtaChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1377 new TH2F("hXECharged","#it{x}_{#it{E}} for charged tracks",
1378 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1379 fhXECharged->SetYTitle("#it{x}_{#it{E}}");
1380 fhXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1383 new TH2F("hXECharged_Cone2","#it{x}_{#it{E}} for charged tracks in cone 2 (5#pi/6-7#pi/6)",
1384 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1385 fhXECharged_Cone2->SetYTitle("#it{x}_{#it{E}}");
1386 fhXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1389 new TH2F("hXEPositiveCharged","#it{x}_{#it{E}} for positive charged tracks",
1390 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1391 fhXEPosCharged->SetYTitle("#it{x}_{#it{E}}");
1392 fhXEPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1395 new TH2F("hXENegativeCharged","#it{x}_{#it{E}} for negative charged tracks",
1396 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1397 fhXENegCharged->SetYTitle("#it{x}_{#it{E}}");
1398 fhXENegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1401 new TH2F("hHbpXECharged","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
1402 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1403 fhPtHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1404 fhPtHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1406 fhPtHbpXECharged_Cone2 =
1407 new TH2F("hHbpXECharged_Cone2","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons in cone 2 (5#pi/6-7#pi/6)",
1408 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1409 fhPtHbpXECharged_Cone2->SetYTitle("ln(1/#it{x}_{#it{E}})");
1410 fhPtHbpXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1413 new TH2F("hZTCharged","#it{z}_{T} for charged tracks",
1414 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1415 fhZTCharged->SetYTitle("#it{z}_{T}");
1416 fhZTCharged->SetXTitle("#it{p}_{T trigger}");
1419 new TH2F("hZTPositiveCharged","#it{z}_{T} for positive charged tracks",
1420 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1421 fhZTPosCharged->SetYTitle("#it{z}_{T}");
1422 fhZTPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1425 new TH2F("hZTNegativeCharged","#it{z}_{T} for negative charged tracks",
1426 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1427 fhZTNegCharged->SetYTitle("#it{z}_{T}");
1428 fhZTNegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1431 new TH2F("hHbpZTCharged","#xi = ln(1/#it{z}_{T}) with charged hadrons",
1432 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1433 fhPtHbpZTCharged->SetYTitle("ln(1/#it{z}_{T})");
1434 fhPtHbpZTCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1437 new TH2F("hPtTrigPout","Pout with triggers",
1438 nptbins,ptmin,ptmax,nptbins,-1.*ptmax/2.,ptmax/2.);
1439 fhPtTrigPout->SetYTitle("#it{p}_{out} (GeV/#it{c})");
1440 fhPtTrigPout->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1443 new TH2F("hPtTrigCharged","trigger and charged tracks pt distribution",
1444 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1445 fhPtTrigCharged->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1446 fhPtTrigCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1448 outputContainer->Add(fhDeltaPhiDeltaEtaCharged);
1449 outputContainer->Add(fhDeltaPhiDeltaEtaChargedPtA3GeV);
1450 outputContainer->Add(fhPhiCharged) ;
1451 outputContainer->Add(fhEtaCharged) ;
1452 outputContainer->Add(fhDeltaPhiCharged) ;
1453 outputContainer->Add(fhDeltaPhiChargedPtA3GeV) ;
1454 outputContainer->Add(fhDeltaEtaCharged) ;
1455 outputContainer->Add(fhDeltaEtaChargedPtA3GeV) ;
1456 outputContainer->Add(fhDeltaPhiChargedPt) ;
1458 outputContainer->Add(fhXECharged) ;
1459 outputContainer->Add(fhXECharged_Cone2) ;
1463 for(Int_t i=0; i < 7; i++)
1466 fhDeltaPhiChargedMC[i] = new TH2F(Form("hDeltaPhiCharged_MC%s",nameMC[i].Data()),
1467 Form("#Delta #phi for charged tracks, trigger origin is %s",nameMC[i].Data()),
1468 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
1469 fhDeltaPhiChargedMC[i]->SetYTitle("#it{x}_{#it{E}}");
1470 fhDeltaPhiChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1471 outputContainer->Add(fhDeltaPhiChargedMC[i]) ;
1473 fhXEChargedMC[i] = new TH2F(Form("hXECharged_MC%s",nameMC[i].Data()),
1474 Form("#it{x}_{#it{E}} for charged tracks, trigger origin is %s",nameMC[i].Data()),
1475 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1476 fhXEChargedMC[i]->SetYTitle("#it{x}_{#it{E}}");
1477 fhXEChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1478 outputContainer->Add(fhXEChargedMC[i]) ;
1482 outputContainer->Add(fhXEPosCharged) ;
1483 outputContainer->Add(fhXENegCharged) ;
1484 outputContainer->Add(fhPtHbpXECharged) ;
1485 outputContainer->Add(fhPtHbpXECharged_Cone2) ;
1487 outputContainer->Add(fhZTCharged) ;
1488 outputContainer->Add(fhZTPosCharged) ;
1489 outputContainer->Add(fhZTNegCharged) ;
1490 outputContainer->Add(fhPtHbpZTCharged) ;
1492 outputContainer->Add(fhPtTrigPout) ;
1493 outputContainer->Add(fhPtTrigCharged) ;
1496 if(fMakeSeveralUE) right = "Right";
1498 fhUePart = new TH1F("hUePart","UE particles distribution vs pt trig",
1499 nptbins,ptmin,ptmax);
1500 fhUePart->SetYTitle("dNch");
1501 fhUePart->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1503 fhDeltaPhiUeChargedPt = new TH2F
1504 (Form("hDeltaPhiUe%sChargedPt",right.Data()),"#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}}",
1505 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1506 fhDeltaPhiUeChargedPt->SetYTitle("#Delta #phi (rad)");
1507 fhDeltaPhiUeChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1510 new TH2F(Form("hXEUeCharged%s",right.Data()),"#it{x}_{#it{E}} for Underlying Event",
1511 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1512 fhXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
1513 fhXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1515 fhPtHbpXEUeCharged =
1516 new TH2F(Form("hHbpXEUeCharged%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for Underlying Event",
1517 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1518 fhPtHbpXEUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1519 fhPtHbpXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1522 new TH2F(Form("hZTUeCharged%s",right.Data()),"#it{z}_{T} for Underlying Event",
1523 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1524 fhZTUeCharged->SetYTitle("#it{z}_{T}");
1525 fhZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1527 fhPtHbpZTUeCharged =
1528 new TH2F(Form("hHbpZTUeCharged%s",right.Data()),"#xi = ln(1/#it{z}_{T}) for Underlying Event",
1529 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1530 fhPtHbpZTUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1531 fhPtHbpZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1533 outputContainer->Add(fhUePart);
1534 outputContainer->Add(fhDeltaPhiUeChargedPt) ;
1535 outputContainer->Add(fhXEUeCharged) ;
1536 outputContainer->Add(fhPtHbpXEUeCharged) ;
1537 outputContainer->Add(fhZTUeCharged) ;
1538 outputContainer->Add(fhPtHbpZTUeCharged) ;
1542 fhDeltaPhiUeLeftCharged = new TH2F
1543 ("hDeltaPhiUeLeftChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left side range of trigger particles",
1544 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1545 fhDeltaPhiUeLeftCharged->SetYTitle("#Delta #phi (rad)");
1546 fhDeltaPhiUeLeftCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1547 outputContainer->Add(fhDeltaPhiUeLeftCharged) ;
1549 fhDeltaPhiUeLeftUpCharged = new TH2F
1550 ("hDeltaPhiUeLeftUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Up side range of trigger particles",
1551 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1552 fhDeltaPhiUeLeftUpCharged->SetYTitle("#Delta #phi (rad)");
1553 fhDeltaPhiUeLeftUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1554 outputContainer->Add(fhDeltaPhiUeLeftUpCharged) ;
1556 fhDeltaPhiUeRightUpCharged = new TH2F
1557 ("hDeltaPhiUeRightUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Up side range of trigger particles",
1558 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1559 fhDeltaPhiUeRightUpCharged->SetYTitle("#Delta #phi (rad)");
1560 fhDeltaPhiUeRightUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1561 outputContainer->Add(fhDeltaPhiUeRightUpCharged) ;
1563 fhDeltaPhiUeLeftDownCharged = new TH2F
1564 ("hDeltaPhiUeLeftDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Down side range of trigger particles",
1565 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1566 fhDeltaPhiUeLeftDownCharged->SetYTitle("#Delta #phi (rad)");
1567 fhDeltaPhiUeLeftDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1568 outputContainer->Add(fhDeltaPhiUeLeftDownCharged) ;
1570 fhDeltaPhiUeRightDownCharged = new TH2F
1571 ("hDeltaPhiUeRightDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Down side range of trigger particles",
1572 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1573 fhDeltaPhiUeRightDownCharged->SetYTitle("#Delta #phi (rad)");
1574 fhDeltaPhiUeRightDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1575 outputContainer->Add(fhDeltaPhiUeRightDownCharged) ;
1578 new TH2F("hXEUeChargedLeft","#it{x}_{#it{E}} with UE left side of trigger",
1579 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1580 fhXEUeLeftCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1581 fhXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1582 outputContainer->Add(fhXEUeLeftCharged) ;
1584 fhXEUeLeftUpCharged =
1585 new TH2F("hXEUeChargedLeftUp","#it{x}_{#it{E}} with UE left Up side of trigger",
1586 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1587 fhXEUeLeftUpCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1588 fhXEUeLeftUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1589 outputContainer->Add(fhXEUeLeftUpCharged) ;
1591 fhXEUeRightUpCharged =
1592 new TH2F("hXEUeChargedRightUp","#it{x}_{#it{E} h^{#pm}} with UE right Up side of trigger",
1593 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1594 fhXEUeRightUpCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1595 fhXEUeRightUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1596 outputContainer->Add(fhXEUeRightUpCharged) ;
1598 fhXEUeLeftDownCharged =
1599 new TH2F("hXEUeChargedLeftDown","#it{x}_{#it{E}} with UE left Down side of trigger",
1600 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1601 fhXEUeLeftDownCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1602 fhXEUeLeftDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1603 outputContainer->Add(fhXEUeLeftDownCharged) ;
1605 fhXEUeRightDownCharged =
1606 new TH2F("hXEUeChargedRightDown","#it{x}_{#it{E} h^{#pm}} with UE right Down side of trigger",
1607 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1608 fhXEUeRightDownCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1609 fhXEUeRightDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1610 outputContainer->Add(fhXEUeRightDownCharged) ;
1612 fhPtHbpXEUeLeftCharged =
1613 new TH2F("hHbpXEUeChargedLeft","#xi = ln(1/#it{x}_{#it{E}}) with charged UE left side of trigger",
1614 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1615 fhPtHbpXEUeLeftCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1616 fhPtHbpXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1617 outputContainer->Add(fhPtHbpXEUeLeftCharged) ;
1620 new TH2F("hZTUeChargedLeft","#it{z}_{trigger h^{#pm}} = #it{p}_{T Ueh^{#pm}} / #it{p}_{T trigger} with UE left side of trigger",
1621 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1622 fhZTUeLeftCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1623 fhZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1624 outputContainer->Add(fhZTUeLeftCharged) ;
1626 fhPtHbpZTUeLeftCharged =
1627 new TH2F("hHbpZTUeChargedLeft","#xi = ln(1/#it{z}_{T}) with charged UE left side of trigger",
1628 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1629 fhPtHbpZTUeLeftCharged->SetYTitle("ln(1/#it{z}_{T})");
1630 fhPtHbpZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1631 outputContainer->Add(fhPtHbpZTUeLeftCharged) ;
1634 if(fFillPileUpHistograms)
1636 fhDeltaPhiChargedOtherBC = new TH2F
1637 ("hDeltaPhiChargedOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC!=0",
1638 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1639 fhDeltaPhiChargedOtherBC->SetYTitle("#Delta #phi (rad)");
1640 fhDeltaPhiChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1642 fhDeltaPhiChargedPtA3GeVOtherBC = new TH2F
1643 ("hDeltaPhiChargedPtA3GeVOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC!=0",
1644 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1645 fhDeltaPhiChargedPtA3GeVOtherBC->SetYTitle("#Delta #phi (rad)");
1646 fhDeltaPhiChargedPtA3GeVOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1648 fhPtTrigChargedOtherBC =
1649 new TH2F("hPtTrigChargedOtherBC","trigger and charged tracks pt distribution, track BC!=0",
1650 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1651 fhPtTrigChargedOtherBC->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1652 fhPtTrigChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1654 fhXEChargedOtherBC =
1655 new TH2F("hXEChargedOtherBC","#it{x}_{#it{E}} for charged tracks, track BC!=0",
1656 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1657 fhXEChargedOtherBC->SetYTitle("#it{x}_{#it{E}}");
1658 fhXEChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1660 fhXEUeChargedOtherBC =
1661 new TH2F("hXEUeChargedOtherBC","#it{x}_{#it{E}} for Underlying Event, track BC!=0",
1662 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1663 fhXEUeChargedOtherBC->SetYTitle("#it{x}_{#it{E}}");
1664 fhXEUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1666 fhZTChargedOtherBC =
1667 new TH2F("hZTChargedOtherBC","#it{z}_{T} for charged tracks, track BC!=0",
1668 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1669 fhZTChargedOtherBC->SetYTitle("#it{z}_{T}");
1670 fhZTChargedOtherBC->SetXTitle("#it{p}_{T trigger}");
1672 fhZTUeChargedOtherBC =
1673 new TH2F("hZTUeChargedOtherBC","#it{z}_{T} for Underlying Event, track BC!=0",
1674 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1675 fhZTUeChargedOtherBC->SetYTitle("#it{z}_{T}");
1676 fhZTUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1678 outputContainer->Add(fhDeltaPhiChargedOtherBC) ;
1679 outputContainer->Add(fhDeltaPhiChargedPtA3GeVOtherBC) ;
1680 outputContainer->Add(fhXEChargedOtherBC) ;
1681 outputContainer->Add(fhXEUeChargedOtherBC) ;
1682 outputContainer->Add(fhZTChargedOtherBC) ;
1683 outputContainer->Add(fhZTUeChargedOtherBC) ;
1684 outputContainer->Add(fhPtTrigChargedOtherBC) ;
1686 fhDeltaPhiChargedBC0 = new TH2F
1687 ("hDeltaPhiChargedBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0",
1688 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1689 fhDeltaPhiChargedBC0->SetYTitle("#Delta #phi (rad)");
1690 fhDeltaPhiChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1692 fhDeltaPhiChargedPtA3GeVBC0 = new TH2F
1693 ("hDeltaPhiChargedPtA3GeVBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0",
1694 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1695 fhDeltaPhiChargedPtA3GeVBC0->SetYTitle("#Delta #phi (rad)");
1696 fhDeltaPhiChargedPtA3GeVBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1698 fhPtTrigChargedBC0 =
1699 new TH2F("hPtTrigChargedBC0","trigger and charged tracks pt distribution, track BC==0",
1700 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1701 fhPtTrigChargedBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1702 fhPtTrigChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1705 new TH2F("hXEChargedBC0","#it{x}_{#it{E}} for charged tracks, track BC==0",
1706 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1707 fhXEChargedBC0->SetYTitle("#it{x}_{#it{E}}");
1708 fhXEChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1711 new TH2F("hXEUeChargedBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0",
1712 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1713 fhXEUeChargedBC0->SetYTitle("#it{x}_{#it{E}}");
1714 fhXEUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1717 new TH2F("hZTChargedBC0","#it{z}_{T} for charged tracks, track BC==0",
1718 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1719 fhZTChargedBC0->SetYTitle("#it{z}_{T}");
1720 fhZTChargedBC0->SetXTitle("#it{p}_{T trigger}");
1723 new TH2F("hZTUeChargedBC0","#it{z}_{T} for Underlying Event, track BC==0",
1724 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1725 fhZTUeChargedBC0->SetYTitle("#it{z}_{T}");
1726 fhZTUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1728 outputContainer->Add(fhDeltaPhiChargedBC0) ;
1729 outputContainer->Add(fhDeltaPhiChargedPtA3GeVBC0) ;
1730 outputContainer->Add(fhXEChargedBC0) ;
1731 outputContainer->Add(fhXEUeChargedBC0) ;
1732 outputContainer->Add(fhZTChargedBC0) ;
1733 outputContainer->Add(fhZTUeChargedBC0) ;
1734 outputContainer->Add(fhPtTrigChargedBC0) ;
1736 fhPtTriggerVtxBC0 = new TH1F("hPtTriggerVtxBC0","#it{p}_{T} distribution of trigger particles", nptbins,ptmin,ptmax);
1737 fhPtTriggerVtxBC0->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1739 fhDeltaPhiChargedVtxBC0 = new TH2F
1740 ("hDeltaPhiChargedVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0",
1741 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1742 fhDeltaPhiChargedVtxBC0->SetYTitle("#Delta #phi (rad)");
1743 fhDeltaPhiChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1745 fhDeltaPhiChargedPtA3GeVVtxBC0 = new TH2F
1746 ("hDeltaPhiChargedPtA3GeVVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0",
1747 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1748 fhDeltaPhiChargedPtA3GeVVtxBC0->SetYTitle("#Delta #phi (rad)");
1749 fhDeltaPhiChargedPtA3GeVVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1751 fhPtTrigChargedVtxBC0 =
1752 new TH2F("hPtTrigChargedVtxBC0","trigger and charged tracks pt distribution, track BC==0",
1753 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1754 fhPtTrigChargedVtxBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1755 fhPtTrigChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1758 new TH2F("hXEChargedVtxBC0","#it{x}_{#it{E}} for charged tracks, track BC==0",
1759 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1760 fhXEChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}");
1761 fhXEChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1763 fhXEUeChargedVtxBC0 =
1764 new TH2F("hXEUeChargedVtxBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0",
1765 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1766 fhXEUeChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}");
1767 fhXEUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1770 new TH2F("hZTChargedVtxBC0","#it{z}_{T} for charged tracks, track BC==0",
1771 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1772 fhZTChargedVtxBC0->SetYTitle("#it{z}_{T}");
1773 fhZTChargedVtxBC0->SetXTitle("#it{p}_{T trigger}");
1775 fhZTUeChargedVtxBC0 =
1776 new TH2F("hZTUeChargedVtxBC0","#it{z}_{T} for Underlying Event, track BC==0",
1777 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1778 fhZTUeChargedVtxBC0->SetYTitle("#it{z}_{T}");
1779 fhZTUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1781 outputContainer->Add(fhPtTriggerVtxBC0);
1782 outputContainer->Add(fhDeltaPhiChargedVtxBC0) ;
1783 outputContainer->Add(fhDeltaPhiChargedPtA3GeVVtxBC0) ;
1784 outputContainer->Add(fhXEChargedVtxBC0) ;
1785 outputContainer->Add(fhXEUeChargedVtxBC0) ;
1786 outputContainer->Add(fhZTChargedVtxBC0) ;
1787 outputContainer->Add(fhZTUeChargedVtxBC0) ;
1788 outputContainer->Add(fhPtTrigChargedVtxBC0) ;
1790 for(Int_t i = 0 ; i < 7 ; i++)
1792 fhPtTriggerPileUp[i] = new TH1F(Form("hPtTriggerPileUp%s",pileUpName[i].Data()),
1793 Form("#it{p}_{T} distribution of trigger particles, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
1794 fhPtTriggerPileUp[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1795 outputContainer->Add(fhPtTriggerPileUp[i]);
1797 fhDeltaPhiChargedPileUp[i] = new TH2F(Form("hDeltaPhiChargedPileUp%s",pileUpName[i].Data()),
1798 Form("#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1799 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1800 fhDeltaPhiChargedPileUp[i]->SetYTitle("#Delta #phi (rad)");
1801 fhDeltaPhiChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1802 outputContainer->Add(fhDeltaPhiChargedPileUp[i]) ;
1804 fhDeltaPhiChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaPhiChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1805 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()),
1806 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1807 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #phi (rad)");
1808 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1809 outputContainer->Add(fhDeltaPhiChargedPtA3GeVPileUp[i]) ;
1811 fhDeltaEtaChargedPileUp[i] = new TH2F(Form("hDeltaEtaChargedPileUp%s",pileUpName[i].Data()),
1812 Form("#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1813 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1814 fhDeltaEtaChargedPileUp[i]->SetYTitle("#Delta #eta");
1815 fhDeltaEtaChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1816 outputContainer->Add(fhDeltaEtaChargedPileUp[i]) ;
1818 fhDeltaEtaChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaEtaChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1819 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()),
1820 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1821 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #eta");
1822 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1823 outputContainer->Add(fhDeltaEtaChargedPtA3GeVPileUp[i]) ;
1825 fhXEChargedPileUp[i] = new TH2F(Form("hXEChargedPileUp%s",pileUpName[i].Data()),
1826 Form("#it{x}_{#it{E}} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1827 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1828 fhXEChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}");
1829 fhXEChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1830 outputContainer->Add(fhXEChargedPileUp[i]) ;
1832 fhXEUeChargedPileUp[i] = new TH2F(Form("hXEUeChargedPileUp%s",pileUpName[i].Data()),
1833 Form("#it{x}_{#it{E}} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1834 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1835 fhXEUeChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}");
1836 fhXEUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1837 outputContainer->Add(fhXEUeChargedPileUp[i]) ;
1839 fhZTChargedPileUp[i] = new TH2F(Form("hZTChargedPileUp%s",pileUpName[i].Data()),
1840 Form("#it{z}_{T} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1841 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1842 fhZTChargedPileUp[i]->SetYTitle("#it{z}_{T}");
1843 fhZTChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1844 outputContainer->Add(fhZTChargedPileUp[i]) ;
1846 fhZTUeChargedPileUp[i] = new TH2F(Form("hZTUeChargedPileUp%s",pileUpName[i].Data()),
1847 Form("#it{z}_{T} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1848 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1849 fhZTUeChargedPileUp[i]->SetYTitle("#it{z}_{T}");
1850 fhZTUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1851 outputContainer->Add(fhZTUeChargedPileUp[i]) ;
1853 fhPtTrigChargedPileUp[i] = new TH2F(Form("hPtTrigChargedPileUp%s",pileUpName[i].Data()),
1854 Form("trigger and charged tracks pt distribution, %s Pile-Up event",pileUpName[i].Data()),
1855 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1856 fhPtTrigChargedPileUp[i]->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1857 fhPtTrigChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1858 outputContainer->Add(fhPtTrigChargedPileUp[i]) ;
1863 if(fFillHighMultHistograms)
1865 Int_t nMultiBins = GetNCentrBin();
1866 fhDeltaPhiChargedMult = new TH2F*[nMultiBins] ;
1867 fhDeltaEtaChargedMult = new TH2F*[nMultiBins] ;
1868 fhXEMult = new TH2F*[nMultiBins] ;
1869 fhXEUeMult = new TH2F*[nMultiBins] ;
1870 fhZTMult = new TH2F*[nMultiBins] ;
1871 fhZTUeMult = new TH2F*[nMultiBins] ;
1873 for(Int_t im=0; im<nMultiBins; im++)
1875 fhDeltaPhiChargedMult[im] = new TH2F
1876 (Form("hDeltaPhiCharged_Mult%d",im),Form("#Delta #phi charged Mult bin %d",im), nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1877 fhDeltaPhiChargedMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1878 fhDeltaPhiChargedMult[im]->SetYTitle("#Delta #phi (rad)");
1880 fhDeltaEtaChargedMult[im] = new TH2F
1881 (Form("hDeltaEtaCharged_Mult%d",im),Form("#Delta #eta charged Mult bin %d",im), nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
1882 fhDeltaEtaChargedMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1883 fhDeltaEtaChargedMult[im]->SetYTitle("#Delta #eta");
1885 fhXEMult[im] = new TH2F
1886 (Form("hXECharged_Mult%d",im),Form("#it{x}_{E} charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1887 fhXEMult[im]->SetYTitle("#it{x}_{E}");
1888 fhXEMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1890 fhXEUeMult[im] = new TH2F
1891 (Form("hXEUeCharged_Mult%d",im),Form("#it{x}_{E} UE charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1892 fhXEUeMult[im]->SetYTitle("#it{x}_{E}");
1893 fhXEUeMult[im]->SetXTitle("#it{p}_{T trigger}(GeV/#it{c})");
1895 fhZTMult[im] = new TH2F
1896 (Form("hZTCharged_Mult%d",im),Form("#it{z}_{T} charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1897 fhZTMult[im]->SetYTitle("#it{z}_{T}");
1898 fhZTMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1900 fhZTUeMult[im] = new TH2F
1901 (Form("hZTUeCharged_Mult%d",im),Form("#it{z}_{T} UE charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1902 fhZTUeMult[im]->SetYTitle("#it{z}_{T}");
1903 fhZTUeMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1905 outputContainer->Add(fhDeltaPhiChargedMult[im]) ;
1906 outputContainer->Add(fhDeltaEtaChargedMult[im]) ;
1907 outputContainer->Add(fhXEMult [im]);
1908 outputContainer->Add(fhXEUeMult[im]);
1909 outputContainer->Add(fhZTMult [im]);
1910 outputContainer->Add(fhZTUeMult[im]);
1916 fhAssocPtBkg = new TH2F("hAssocPtBkg", " Trigger #it{p}_{T} vs associated hadron #it{p}_{T} from background",
1917 nptbins, ptmin, ptmax,nptbins,ptmin,ptmax);
1918 fhAssocPtBkg->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1919 fhAssocPtBkg->SetYTitle("#it{p}_{T associated} (GeV/#it{c})");
1920 outputContainer->Add(fhAssocPtBkg) ;
1922 fhDeltaPhiBrad = new TH2F("hDeltaPhiBrad","atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs #it{p}_{T trigger} ",
1923 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
1924 fhDeltaPhiBrad->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1925 fhDeltaPhiBrad->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
1926 outputContainer->Add(fhDeltaPhiBrad) ;
1929 fhDeltaPhiDeltaEtaAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1930 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1931 fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
1932 fhDeltaPhiAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
1933 if(fFillMomImbalancePtAssocBinsHisto)
1935 fhXEAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1936 fhZTAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1941 fhXEVZ = new TH2F*[nz];
1942 fhZTVZ = new TH2F*[nz];
1946 fhDeltaPhiBradAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1949 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1950 if(fFillEtaGapsHisto)fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
1951 if(fDecayTrigger) fhDeltaPhiDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1954 if(fHMPIDCorrelation)
1956 fhDeltaPhiAssocPtBinHMPID = new TH2F*[fNAssocPtBins*nz];
1957 fhDeltaPhiAssocPtBinHMPIDAcc= new TH2F*[fNAssocPtBins*nz];
1960 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
1962 for(Int_t z = 0 ; z < nz ; z++)
1968 sz = Form("_vz%d",z);
1969 tz = Form(", #it{v}_{#it{z}} bin %d",z);
1972 //printf("iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
1974 fhDeltaPhiDeltaEtaAssocPtBin[bin] = new TH2F(Form("hDeltaPhiDeltaEtaPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1975 Form("#Delta #phi vs #Delta #eta for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1976 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1977 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
1978 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetYTitle("#Delta #eta");
1980 fhDeltaPhiAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1981 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()),
1982 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1983 fhDeltaPhiAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1984 fhDeltaPhiAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
1986 outputContainer->Add(fhDeltaPhiDeltaEtaAssocPtBin[bin]) ;
1987 outputContainer->Add(fhDeltaPhiAssocPtBin[bin]) ;
1989 if(fFillEtaGapsHisto)
1991 fhDeltaPhiAssocPtBinDEta08[bin] = new TH2F(Form("hDeltaPhiDeltaEta0.8PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1992 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()),
1993 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1994 fhDeltaPhiAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1995 fhDeltaPhiAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
1997 fhDeltaPhiAssocPtBinDEta0[bin] = new TH2F(Form("hDeltaPhiDeltaEta0PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1998 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()),
1999 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2000 fhDeltaPhiAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2001 fhDeltaPhiAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
2003 outputContainer->Add(fhDeltaPhiAssocPtBinDEta08[bin]) ;
2004 outputContainer->Add(fhDeltaPhiAssocPtBinDEta0[bin]) ;
2009 fhDeltaPhiDecayChargedAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtDecayChargedAssocPt%2.1f_%2.1f%s_bit%d", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data(),fDecayBits[0]),
2010 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]),
2011 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2012 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2013 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
2015 outputContainer->Add(fhDeltaPhiDecayChargedAssocPtBin[bin]) ;
2020 fhDeltaPhiBradAssocPtBin[bin] = new TH2F(Form("hDeltaPhiBradPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2021 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()),
2022 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
2023 fhDeltaPhiBradAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2024 fhDeltaPhiBradAssocPtBin[bin]->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
2025 outputContainer->Add(fhDeltaPhiBradAssocPtBin[bin]) ;
2028 if(fHMPIDCorrelation)
2030 fhDeltaPhiAssocPtBinHMPID[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPID", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2031 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()),
2032 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2033 fhDeltaPhiAssocPtBinHMPID[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})" );
2034 fhDeltaPhiAssocPtBinHMPID[bin]->SetYTitle("#Delta #phi (rad)");
2036 fhDeltaPhiAssocPtBinHMPIDAcc[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPIDAcc", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2037 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()),
2038 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2039 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2040 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetYTitle("#Delta #phi (rad)");
2042 outputContainer->Add(fhDeltaPhiAssocPtBinHMPID [bin]) ;
2043 outputContainer->Add(fhDeltaPhiAssocPtBinHMPIDAcc[bin]) ;
2048 if(fFillMomImbalancePtAssocBinsHisto)
2050 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2052 fhXEAssocPtBin[i] = new TH2F(Form("hXEAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
2053 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]),
2054 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2055 fhXEAssocPtBin[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2056 fhXEAssocPtBin[i]->SetYTitle("#it{x}_{#it{E}}");
2058 fhZTAssocPtBin[i] = new TH2F(Form("hZTAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
2059 Form("#it{z}_{T} vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
2060 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2061 fhZTAssocPtBin[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2062 fhZTAssocPtBin[i]->SetYTitle("#it{z}_{T}");
2065 outputContainer->Add(fhXEAssocPtBin[i]);
2066 outputContainer->Add(fhZTAssocPtBin[i]);
2072 for(Int_t z = 0 ; z < nz ; z++)
2074 sz = Form("_vz%d",z);
2075 tz = Form(", #it{v}_{#it{z}} bin %d",z);
2077 fhXEVZ[z] = new TH2F(Form("hXE%s", sz.Data()),
2078 Form("#it{x}_{#it{E}} vs #it{p}_{T trigger}%s", tz.Data()),
2079 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2080 fhXEVZ[z]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2081 fhXEVZ[z]->SetYTitle("#it{x}_{#it{E}}");
2083 fhZTVZ[z] = new TH2F(Form("hZT%s",sz.Data()),
2084 Form("#it{z}_{T} vs #it{p}_{T trigger}%s", tz.Data()),
2085 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2086 fhZTVZ[z]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2087 fhZTVZ[z]->SetYTitle("#it{z}_{T}");
2089 outputContainer->Add(fhXEVZ[z]);
2090 outputContainer->Add(fhZTVZ[z]);
2097 fhPtPi0DecayRatio = new TH2F
2098 ("hPtPi0DecayRatio","#it{p}_{T} of #pi^{0} and the ratio of pt for two decay",
2099 nptbins,ptmin,ptmax, 100,0.,2.);
2100 fhPtPi0DecayRatio->SetXTitle("#it{p}_{T}^{#pi^{0}} (GeV/#it{c})");
2101 fhPtPi0DecayRatio->SetYTitle("#it{p}_{T}^{Decay}/#it{p}_{T}^{#pi^{0}}");
2102 outputContainer->Add(fhPtPi0DecayRatio) ;
2104 fhDeltaPhiPi0DecayCharged = new TH2F
2105 ("hDeltaPhiPi0DecayCharged","#phi_{Decay} - #phi_{h^{#pm}} vs #it{p}_{T Decay}",
2106 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2107 fhDeltaPhiPi0DecayCharged->SetYTitle("#Delta #phi (rad)");
2108 fhDeltaPhiPi0DecayCharged->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
2110 fhXEPi0DecayCharged =
2111 new TH2F("hXEPi0DecayCharged","#it{x}_{#it{E}} Decay",
2112 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2113 fhXEPi0DecayCharged->SetYTitle("#it{x}_{#it{E}}");
2114 fhXEPi0DecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2116 fhZTPi0DecayCharged =
2117 new TH2F("hZTPi0DecayCharged","#it{z}_{trigger h^{#pm}} = #it{p}_{T h^{#pm}} / #it{p}_{T Decay}",
2118 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2119 fhZTPi0DecayCharged->SetYTitle("#it{z}_{decay h^{#pm}}");
2120 fhZTPi0DecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2122 outputContainer->Add(fhDeltaPhiPi0DecayCharged) ;
2123 outputContainer->Add(fhXEPi0DecayCharged) ;
2124 outputContainer->Add(fhZTPi0DecayCharged) ;
2129 for(Int_t ibit = 0; ibit< fNDecayBits; ibit++)
2131 fhDeltaPhiDecayCharged[ibit] = new TH2F
2132 (Form("hDeltaPhiDecayCharged_bit%d",fDecayBits[ibit]),
2133 Form("#phi_{Decay} - #phi_{h^{#pm}} vs #it{p}_{T Decay}, Bit %d",fDecayBits[ibit]),
2134 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2135 fhDeltaPhiDecayCharged[ibit]->SetYTitle("#Delta #phi (rad)");
2136 fhDeltaPhiDecayCharged[ibit]->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
2138 fhXEDecayCharged[ibit] =
2139 new TH2F(Form("hXEDecayCharged_bit%d",fDecayBits[ibit]),
2140 Form("#it{x}_{#it{E}} Decay, Bit %d",fDecayBits[ibit]),
2141 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2142 fhXEDecayCharged[ibit]->SetYTitle("#it{x}_{#it{E}}");
2143 fhXEDecayCharged[ibit]->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2145 fhZTDecayCharged[ibit] =
2146 new TH2F(Form("hZTDecayCharged_bit%d",fDecayBits[ibit]),
2147 Form("#it{z}_{trigger h^{#pm}} = #it{p}_{T h^{#pm}} / #it{p}_{T Decay}, Bit %d",fDecayBits[ibit]),
2148 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2149 fhZTDecayCharged[ibit]->SetYTitle("#it{z}_{decay h^{#pm}}");
2150 fhZTDecayCharged[ibit]->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2152 outputContainer->Add(fhDeltaPhiDecayCharged[ibit]) ;
2153 outputContainer->Add(fhXEDecayCharged[ibit]) ;
2154 outputContainer->Add(fhZTDecayCharged[ibit]) ;
2158 //Correlation with neutral hadrons
2161 fhDeltaPhiDeltaEtaNeutral = new TH2F
2162 ("hDeltaPhiDeltaEtaNeutral","#phi_{trigger} - #phi_{h^{0}} vs #eta_{trigger} - #eta_{h^{0}}",
2163 ndeltaphibins ,deltaphimin,deltaphimax, ndeltaetabins ,deltaetamin,deltaetamax);
2164 fhDeltaPhiDeltaEtaNeutral->SetXTitle("#Delta #phi (rad)");
2165 fhDeltaPhiDeltaEtaNeutral->SetYTitle("#Delta #eta");
2167 fhPhiNeutral = new TH2F
2168 ("hPhiNeutral","#phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}",
2169 nptbins,ptmin,ptmax,180,0,TMath::TwoPi());
2170 fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)");
2171 fhPhiNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})");
2173 fhEtaNeutral = new TH2F
2174 ("hEtaNeutral","#eta_{#pi^{0}} vs #it{p}_{T #pi^{0}}",
2175 nptbins,ptmin,ptmax,200,-1.,1.);
2176 fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)");
2177 fhEtaNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})");
2179 fhDeltaPhiNeutral = new TH2F
2180 ("hDeltaPhiNeutral","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T trigger}",
2181 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2182 fhDeltaPhiNeutral->SetYTitle("#Delta #phi (rad)");
2183 fhDeltaPhiNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2185 fhDeltaPhiNeutralPt = new TH2F
2186 ("hDeltaPhiNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}",
2187 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2188 fhDeltaPhiNeutralPt->SetYTitle("#Delta #phi (rad)");
2189 fhDeltaPhiNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2191 fhDeltaEtaNeutral = new TH2F
2192 ("hDeltaEtaNeutral","#eta_{trigger} - #eta_{#pi^{0}} vs #it{p}_{T trigger}",
2193 nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
2194 fhDeltaEtaNeutral->SetYTitle("#Delta #eta");
2195 fhDeltaEtaNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2198 new TH2F("hXENeutral","#it{x}_{#it{E}} for #pi^{0} associated",
2199 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2200 fhXENeutral->SetYTitle("#it{x}_{#it{E}}");
2201 fhXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2204 new TH2F("hHbpXENeutral","#xi = ln(1/#it{x}_{#it{E}})for #pi^{0} associated",
2205 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2206 fhPtHbpXENeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2207 fhPtHbpXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2210 new TH2F("hZTNeutral","#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated",
2211 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2212 fhZTNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}");
2213 fhZTNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2216 new TH2F("hHbpZTNeutral","#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2217 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2218 fhPtHbpZTNeutral->SetYTitle("ln(1/#it{z}_{T})");
2219 fhPtHbpZTNeutral->SetXTitle("#it{p}_{T trigger}");
2221 outputContainer->Add(fhDeltaPhiDeltaEtaNeutral);
2222 outputContainer->Add(fhPhiNeutral) ;
2223 outputContainer->Add(fhEtaNeutral) ;
2224 outputContainer->Add(fhDeltaPhiNeutral) ;
2225 outputContainer->Add(fhDeltaPhiNeutralPt) ;
2226 outputContainer->Add(fhDeltaEtaNeutral) ;
2227 outputContainer->Add(fhXENeutral) ;
2228 outputContainer->Add(fhPtHbpXENeutral) ;
2229 outputContainer->Add(fhZTNeutral) ;
2230 outputContainer->Add(fhPtHbpZTNeutral) ;
2232 fhDeltaPhiUeNeutralPt = new TH2F
2233 (Form("hDeltaPhiUe%sNeutralPt",right.Data()),"#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}",
2234 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2235 fhDeltaPhiUeNeutralPt->SetYTitle("#Delta #phi (rad)");
2236 fhDeltaPhiUeNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2239 new TH2F(Form("hXEUeNeutral%s",right.Data()),"#it{x}_{#it{E}} for #pi^{0} associated",
2240 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2241 fhXEUeNeutral->SetYTitle("#it{x}_{#it{E}}");
2242 fhXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2244 fhPtHbpXEUeNeutral =
2245 new TH2F(Form("hHbpXEUeNeutral%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2246 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2247 fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2248 fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2251 new TH2F(Form("hZTUeNeutral%s",right.Data()),"#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated",
2252 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2253 fhZTUeNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}");
2254 fhZTUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2256 fhPtHbpZTUeNeutral =
2257 new TH2F(Form("hHbpZTUeNeutral%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2258 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2259 fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{z}_{T})");
2260 fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2262 outputContainer->Add(fhDeltaPhiUeNeutralPt) ;
2263 outputContainer->Add(fhXEUeNeutral) ;
2264 outputContainer->Add(fhPtHbpXEUeNeutral) ;
2265 outputContainer->Add(fhZTUeNeutral) ;
2266 outputContainer->Add(fhPtHbpZTUeNeutral) ;
2270 fhDeltaPhiUeLeftNeutral = new TH2F
2271 ("hDeltaPhiUeLeftNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs #it{p}_{T h^{0}} with neutral UE left side range of trigger particles",
2272 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2273 fhDeltaPhiUeLeftNeutral->SetYTitle("#Delta #phi (rad)");
2274 fhDeltaPhiUeLeftNeutral->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2275 outputContainer->Add(fhDeltaPhiUeLeftNeutral) ;
2278 new TH2F("hXEUeNeutralLeft","#it{x}_{#it{E}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger",
2279 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2280 fhXEUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2281 fhXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2282 outputContainer->Add(fhXEUeLeftNeutral) ;
2284 fhPtHbpXEUeLeftNeutral =
2285 new TH2F("hHbpXEUeNeutralLeft","#xi = ln(1/#it{x}_{#it{E}}) with neutral UE left side of trigger",
2286 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2287 fhPtHbpXEUeLeftNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2288 fhPtHbpXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2289 outputContainer->Add(fhPtHbpXEUeLeftNeutral) ;
2292 new TH2F("hZTUeNeutralLeft","#it{z}_{trigger h^{0}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger",
2293 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2294 fhZTUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2295 fhZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2296 outputContainer->Add(fhZTUeLeftNeutral) ;
2298 fhPtHbpZTUeLeftNeutral =
2299 new TH2F("hHbpZTUeNeutralLeft","#xi = ln(1/#it{z}_{T}) with neutral UE left side of trigger",
2300 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2301 fhPtHbpZTUeLeftNeutral->SetYTitle("ln(1/#it{z}_{T})");
2302 fhPtHbpZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger}");
2303 outputContainer->Add(fhPtHbpZTUeLeftNeutral) ;
2308 fhDeltaPhiPi0DecayNeutral = new TH2F
2309 ("hDeltaPhiPi0DecayNeutral","#phi_{Decay} - #phi_{h^{0}} vs #it{p}_{T Decay}",
2310 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2311 fhDeltaPhiPi0DecayNeutral->SetYTitle("#Delta #phi (rad)");
2312 fhDeltaPhiPi0DecayNeutral->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
2314 fhXEPi0DecayNeutral =
2315 new TH2F("hXEPi0DecayNeutral","#it{x}_{#it{E}} for decay trigger",
2316 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2317 fhXEPi0DecayNeutral->SetYTitle("#it{x}_{#it{E}}");
2318 fhXEPi0DecayNeutral->SetXTitle("#it{p}_{T decay}");
2320 fhZTPi0DecayNeutral =
2321 new TH2F("hZTPi0DecayNeutral","#it{z}_{trigger h^{0}} = #it{p}_{T h^{0}} / #it{p}_{T Decay}",
2322 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2323 fhZTPi0DecayNeutral->SetYTitle("#it{z}_{h^{0}}");
2324 fhZTPi0DecayNeutral->SetXTitle("#it{p}_{T decay}");
2326 outputContainer->Add(fhDeltaPhiPi0DecayNeutral) ;
2327 outputContainer->Add(fhXEPi0DecayNeutral) ;
2328 outputContainer->Add(fhZTPi0DecayNeutral) ;
2330 }//Correlation with neutral hadrons
2332 // If data is MC, fill more histograms, depending on origin
2335 for(Int_t i= fMCGenTypeMin; i <= fMCGenTypeMax; i++)
2337 fhMCPtTrigger[i] = new TH1F (Form("hMCPtTrigger_%s",nameMC[i].Data()),
2338 Form("MC %s: generated trigger #it{p}_{T}",nameMC[i].Data()),
2339 nptbins,ptmin,ptmax);
2340 fhMCPtTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2342 fhMCPhiTrigger[i] = new TH2F (Form("hMCPhiTrigger_%s",nameMC[i].Data()),
2343 Form("MC %s: generated trigger #phi",nameMC[i].Data()),
2344 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2345 fhMCPhiTrigger[i]->SetYTitle("#phi (rad)");
2346 fhMCPhiTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2348 fhMCEtaTrigger[i] = new TH2F (Form("hMCEtaTrigger_%s",nameMC[i].Data()),
2349 Form("MC %s: generated trigger #eta",nameMC[i].Data()),
2350 nptbins,ptmin,ptmax, netabins,etamin,etamax);
2351 fhMCEtaTrigger[i]->SetYTitle("#eta");
2352 fhMCEtaTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2354 if(fMakeAbsoluteLeading || fMakeNearSideLeading)
2356 fhMCPtTriggerNotLeading[i] = new TH1F (Form("hMCPtTriggerNotLeading_%s",nameMC[i].Data()),
2357 Form("MC %s: generated trigger #it{p}_{T}, when not leading of primaries",nameMC[i].Data()),
2358 nptbins,ptmin,ptmax);
2359 fhMCPtTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2361 fhMCPhiTriggerNotLeading[i] = new TH2F (Form("hMCPhiTriggerNotLeading_%s",nameMC[i].Data()),
2362 Form("MC %s: generated trigger #phi, when not leading of primaries",nameMC[i].Data()),
2363 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2364 fhMCPhiTriggerNotLeading[i]->SetYTitle("#phi (rad)");
2365 fhMCPhiTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2368 fhMCEtaTriggerNotLeading[i] = new TH2F (Form("hMCEtaTriggerNotLeading_%s",nameMC[i].Data()),
2369 Form("MC %s: generated triogger #eta, when not leading of primaries",nameMC[i].Data()),
2370 nptbins,ptmin,ptmax, netabins,etamin,etamax);
2371 fhMCEtaTriggerNotLeading[i]->SetYTitle("#eta ");
2372 fhMCEtaTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2375 fhMCEtaCharged[i] = new TH2F (Form("hMCEtaCharged_%s",nameMC[i].Data()),
2376 Form("MC %s: #eta_{h^{#pm}} vs #it{p}_{T #pm}",nameMC[i].Data()),
2377 nptbins,ptmin,ptmax,100,-1.,1.);
2378 fhMCEtaCharged[i]->SetYTitle("#eta_{h^{#pm}} (rad)");
2379 fhMCEtaCharged[i]->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
2381 fhMCPhiCharged[i] = new TH2F(Form("hMCPhiCharged_%s",nameMC[i].Data()),
2382 Form("MC %s: phi_{h^{#pm}} vs #it{p}_{T #pm}",nameMC[i].Data()),
2383 nptbins,ptmin,ptmax,180,0,TMath::TwoPi());
2384 fhMCPhiCharged[i]->SetYTitle("MC #phi_{h^{#pm}} (rad)");
2385 fhMCPhiCharged[i]->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
2387 fhMCDeltaPhiDeltaEtaCharged[i] = new TH2F (Form("hMCDeltaPhiDeltaEtaCharged_%s",nameMC[i].Data()),
2388 Form("MC %s: phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",nameMC[i].Data()),
2389 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2390 fhMCDeltaPhiDeltaEtaCharged[i]->SetXTitle("#Delta #phi (rad)");
2391 fhMCDeltaPhiDeltaEtaCharged[i]->SetYTitle("#Delta #eta");
2393 fhMCDeltaEtaCharged[i] = new TH2F (Form("hMCDeltaEtaCharged_%s",nameMC[i].Data()),
2394 Form("MC %s: #eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger} and #it{p}_{T assoc}",nameMC[i].Data()),
2395 nptbins,ptmin,ptmax,ndeltaetabins ,deltaetamin,deltaetamax);
2396 fhMCDeltaEtaCharged[i]->SetYTitle("#Delta #eta");
2397 fhMCDeltaEtaCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2399 fhMCDeltaPhiCharged[i] = new TH2F (Form("hMCDeltaPhiCharged_%s",nameMC[i].Data()),
2400 Form("MC %s: #phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",nameMC[i].Data()),
2401 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2402 fhMCDeltaPhiCharged[i]->SetYTitle("#Delta #phi (rad)");
2403 fhMCDeltaPhiCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2405 fhMCDeltaPhiChargedPt[i] = new TH2F (Form("hMCDeltaPhiChargedPt_%s",nameMC[i].Data()),
2406 Form("MC %s: #phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}",nameMC[i].Data()),
2407 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2408 fhMCDeltaPhiChargedPt[i]->SetYTitle("#Delta #phi (rad)");
2409 fhMCDeltaPhiChargedPt[i]->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
2411 fhMCPtXECharged[i] = new TH2F (Form("hMCPtXECharged_%s",nameMC[i].Data()),
2412 Form("MC %s: #it{x}_{#it{E}} with charged hadrons",nameMC[i].Data()),
2413 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2414 fhMCPtXECharged[i]->SetYTitle("#it{x}_{#it{E}}");
2415 fhMCPtXECharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2417 fhMCPtHbpXECharged[i] = new TH2F(Form("hMCHbpXECharged_%s",nameMC[i].Data()),
2418 Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",nameMC[i].Data()),
2419 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2420 fhMCPtHbpXECharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})");
2421 fhMCPtHbpXECharged[i]->SetXTitle("#it{p}_{T trigger}");
2423 fhMCPtZTCharged[i] = new TH2F(Form("hMCPtZTCharged_%s",nameMC[i].Data()),
2424 Form("MC %s: #it{z}_{T} with charged hadrons",nameMC[i].Data()),
2425 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2426 fhMCPtZTCharged[i]->SetYTitle("#it{z}_{T}");
2427 fhMCPtZTCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2429 fhMCPtHbpZTCharged[i] = new TH2F(Form("hMCHbpZTCharged_%s",nameMC[i].Data()),
2430 Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons",nameMC[i].Data()),
2431 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2432 fhMCPtHbpZTCharged[i]->SetYTitle("ln(1/#it{z}_{T})");
2433 fhMCPtHbpZTCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2435 fhMCPtTrigPout[i] = new TH2F(Form("hMCPtTrigPout_%s",nameMC[i].Data()),
2436 Form("MC %s: #it{p}_{out} with triggers",nameMC[i].Data()),
2437 nptbins,ptmin,ptmax,nptbins,-1.*ptmax/2.,ptmax/2.);
2438 fhMCPtTrigPout[i]->SetYTitle("#it{p}_{out} (GeV/#it{c})");
2439 fhMCPtTrigPout[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2441 fhMCPtAssocDeltaPhi[i] = new TH2F(Form("hMCPtAssocDeltaPhi_%s",nameMC[i].Data()),
2442 Form("MC %s: #Delta #phi with associated charged hadrons",nameMC[i].Data()),
2443 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2444 fhMCPtAssocDeltaPhi[i]->SetYTitle("#Delta #phi (rad)");
2445 fhMCPtAssocDeltaPhi[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2447 outputContainer->Add(fhMCPtTrigger[i]);
2448 outputContainer->Add(fhMCPhiTrigger[i]);
2449 outputContainer->Add(fhMCEtaTrigger[i]);
2451 if(fMakeAbsoluteLeading || fMakeNearSideLeading)
2453 outputContainer->Add(fhMCPtTriggerNotLeading[i]);
2454 outputContainer->Add(fhMCPhiTriggerNotLeading[i]);
2455 outputContainer->Add(fhMCEtaTriggerNotLeading[i]);
2458 outputContainer->Add(fhMCDeltaPhiDeltaEtaCharged[i]);
2459 outputContainer->Add(fhMCPhiCharged[i]) ;
2460 outputContainer->Add(fhMCEtaCharged[i]) ;
2461 outputContainer->Add(fhMCDeltaEtaCharged[i]) ;
2462 outputContainer->Add(fhMCDeltaPhiCharged[i]) ;
2464 outputContainer->Add(fhMCDeltaPhiChargedPt[i]) ;
2465 outputContainer->Add(fhMCPtXECharged[i]) ;
2466 outputContainer->Add(fhMCPtZTCharged[i]) ;
2467 outputContainer->Add(fhMCPtHbpXECharged[i]) ;
2468 outputContainer->Add(fhMCPtHbpZTCharged[i]) ;
2469 outputContainer->Add(fhMCPtTrigPout[i]) ;
2470 outputContainer->Add(fhMCPtAssocDeltaPhi[i]) ;
2475 new TH1F(Form("hMCUePart_%s",nameMC[i].Data()),
2476 Form("MC %s: UE particles distribution vs #it{p}_{T trigger}",nameMC[i].Data()),
2477 nptbins,ptmin,ptmax);
2478 fhMCUePart[i]->SetYTitle("#it{dN}^{ch}");
2479 fhMCUePart[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2481 fhMCPtXEUeCharged[i] =
2482 new TH2F(Form("hMCPtXEUeCharged%s",right.Data()),
2483 Form("MC %s: #it{x}_{#it{E}} with charged hadrons, Underlying Event",nameMC[i].Data()),
2484 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2485 fhMCPtXEUeCharged[i]->SetYTitle("#it{x}_{#it{E}}");
2486 fhMCPtXEUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2488 fhMCPtHbpXEUeCharged[i] =
2489 new TH2F(Form("hMCPtHbpXEUeCharged%s",right.Data()),
2490 Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, Underlying Event",nameMC[i].Data()),
2491 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2492 fhMCPtHbpXEUeCharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})");
2493 fhMCPtHbpXEUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2495 fhMCPtZTUeCharged[i] =
2496 new TH2F(Form("hMCPtZTUeCharged%s",right.Data()),
2497 Form("MC %s: #it{z}_{T} with charged hadrons, Underlying Event",nameMC[i].Data()),
2498 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2499 fhMCPtZTUeCharged[i]->SetYTitle("#it{z}_{T}");
2500 fhMCPtZTUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2502 fhMCPtHbpZTUeCharged[i] =
2503 new TH2F(Form("hMCPtHbpZTUeCharged%s",right.Data()),
2504 Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons, Underlying Event",nameMC[i].Data()),
2505 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2506 fhMCPtHbpZTUeCharged[i]->SetYTitle("ln(1/#it{z}_{T})");
2507 fhMCPtHbpZTUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2509 outputContainer->Add(fhMCUePart[i]);
2510 outputContainer->Add(fhMCPtXEUeCharged[i]) ;
2511 outputContainer->Add(fhMCPtZTUeCharged[i]) ;
2512 outputContainer->Add(fhMCPtHbpZTUeCharged[i]);
2513 outputContainer->Add(fhMCPtHbpXEUeCharged[i]);
2517 fhMCPtXEUeLeftCharged[i] = new TH2F(Form("hMCPtXEUeChargedLeft_%s",nameMC[i].Data()),
2518 Form("MC %s: #it{x}_{#it{E}} with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2519 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2520 fhMCPtXEUeLeftCharged[i]->SetYTitle("#it{x}_{#it{E}}");
2521 fhMCPtXEUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2523 fhMCPtHbpXEUeLeftCharged[i] = new TH2F(Form("hMCPtHbpXEUeChargedLeft_%s",nameMC[i].Data()),
2524 Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2525 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2526 fhMCPtHbpXEUeLeftCharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})");
2527 fhMCPtHbpXEUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2529 fhMCPtZTUeLeftCharged[i] = new TH2F(Form("hMCPtZTUeChargedLeft_%s",nameMC[i].Data()),
2530 Form("MC %s: #it{z}_{T} with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2531 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2532 fhMCPtZTUeLeftCharged[i]->SetYTitle("#it{z}_{T}");
2533 fhMCPtZTUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2535 fhMCPtHbpZTUeLeftCharged[i] = new TH2F(Form("hMCPtHbpZTUeChargedLeft_%s",nameMC[i].Data()),
2536 Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2537 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2538 fhMCPtHbpZTUeLeftCharged[i]->SetYTitle("ln(1/#it{z}_{T})");
2539 fhMCPtHbpZTUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2541 outputContainer->Add(fhMCPtXEUeLeftCharged[i]) ;
2542 outputContainer->Add(fhMCPtZTUeLeftCharged[i]) ;
2543 outputContainer->Add(fhMCPtHbpXEUeLeftCharged[i]);
2544 outputContainer->Add(fhMCPtHbpZTUeLeftCharged[i]) ;
2548 } //for MC histogram
2552 //create event containers
2554 if(!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForTracksExists()))
2556 Int_t nvz = GetNZvertBin();
2557 Int_t nrp = GetNRPBin();
2558 Int_t nce = GetNCentrBin();
2560 fListMixTrackEvents= new TList*[nvz*nrp*nce] ;
2562 for( Int_t ice = 0 ; ice < nce ; ice++ )
2564 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2566 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2568 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2570 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2571 // ic,iz, irp, bin);
2573 fListMixTrackEvents[bin] = new TList() ;
2574 fListMixTrackEvents[bin]->SetOwner(kFALSE);
2580 fhPtTriggerMixed = new TH1F ("hPtTriggerMixed","#it{p}_{T} distribution of trigger particles, used for mixing", nptbins,ptmin,ptmax);
2581 fhPtTriggerMixed->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2585 fhPtTriggerMixedVzBin = new TH2F ("hPtTriggerMixedVzBin","#it{p}_{T} distribution of trigger particles, used for mixing", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
2586 fhPtTriggerMixedVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2587 fhPtTriggerMixedVzBin->SetYTitle("#it{v}_{#it{z}} bin");
2588 outputContainer->Add(fhPtTriggerMixedVzBin);
2591 fhPtTriggerMixedBin = new TH2F ("hPtTriggerMixedBin","#it{p}_{T} distribution of trigger particles vs mixing bin", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
2592 fhPtTriggerMixedBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2593 fhPtTriggerMixedBin->SetYTitle("Bin");
2595 fhPhiTriggerMixed = new TH2F ("hPhiTriggerMixed","#phi distribution of trigger Particles, used for mixing",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2596 fhPhiTriggerMixed->SetYTitle("#phi (rad)");
2598 fhEtaTriggerMixed = new TH2F ("hEtaTriggerMixed","#eta distribution of trigger, used for mixing",nptbins,ptmin,ptmax, netabins,etamin,etamax);
2599 fhEtaTriggerMixed->SetYTitle("#eta ");
2601 outputContainer->Add(fhPtTriggerMixed);
2602 outputContainer->Add(fhPtTriggerMixedBin);
2603 outputContainer->Add(fhPhiTriggerMixed);
2604 outputContainer->Add(fhEtaTriggerMixed);
2606 // Fill the cluster pool only in isolation analysis or if requested
2607 if( neutralMix && (!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForCaloExists())))
2609 Int_t nvz = GetNZvertBin();
2610 Int_t nrp = GetNRPBin();
2611 Int_t nce = GetNCentrBin();
2613 fListMixCaloEvents= new TList*[nvz*nrp*nce] ;
2615 for( Int_t ice = 0 ; ice < nce ; ice++ )
2617 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2619 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2621 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2623 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2624 // ic,iz, irp, bin);
2626 fListMixCaloEvents[bin] = new TList() ;
2627 fListMixCaloEvents[bin]->SetOwner(kFALSE);
2633 //Init the list in the reader if not done previously
2634 if(fUseMixStoredInReader)
2636 if( !GetReader()->ListWithMixedEventsForTracksExists() )
2637 GetReader()->SetListWithMixedEventsForTracks(fListMixTrackEvents);
2639 if( !GetReader()->ListWithMixedEventsForCaloExists() )
2640 GetReader()->SetListWithMixedEventsForCalo (fListMixCaloEvents );
2643 fhEventBin=new TH1I("hEventBin","Number of triggers per bin(cen,vz,rp)",
2644 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2645 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2646 fhEventBin->SetXTitle("event bin");
2647 outputContainer->Add(fhEventBin) ;
2649 fhEventMixBin=new TH1I("hEventMixBin","Number of triggers mixed per event bin(cen,vz,rp)",
2650 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2651 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2652 fhEventMixBin->SetXTitle("event bin");
2653 outputContainer->Add(fhEventMixBin) ;
2655 fhEventMBBin=new TH1I("hEventMBBin","Number of min bias events per bin(cen,vz,rp)",
2656 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2657 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2658 fhEventMBBin->SetXTitle("event bin");
2659 outputContainer->Add(fhEventMBBin) ;
2661 fhNtracksMB=new TH2F("hNtracksMBEvent","Number of filtered tracks in MB event per event bin",ntrbins,trmin,trmax,
2662 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2663 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2664 fhNtracksMB->SetYTitle("event bin");
2665 fhNtracksMB->SetXTitle("#it{N}_{track}");
2666 outputContainer->Add(fhNtracksMB);
2670 fhNclustersMB=new TH2F("hNclustersMBEvent","Number of filtered clusters in MB events per event bin",nclbins,clmin,clmax,
2671 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2672 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2673 fhNclustersMB->SetYTitle("event bin");
2674 fhNclustersMB->SetXTitle("#it{N}_{cluster}");
2675 outputContainer->Add(fhNclustersMB);
2678 fhMixDeltaPhiCharged = new TH2F
2679 ("hMixDeltaPhiCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
2680 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2681 fhMixDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
2682 fhMixDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2683 outputContainer->Add(fhMixDeltaPhiCharged);
2685 fhMixDeltaPhiDeltaEtaCharged = new TH2F
2686 ("hMixDeltaPhiDeltaEtaCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
2687 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2688 fhMixDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
2689 fhMixDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
2690 outputContainer->Add(fhMixDeltaPhiDeltaEtaCharged);
2693 new TH2F("hMixXECharged","Mixed event : #it{x}_{#it{E}} for charged tracks",
2694 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2695 fhMixXECharged->SetYTitle("#it{x}_{#it{E}}");
2696 fhMixXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2697 outputContainer->Add(fhMixXECharged);
2700 new TH2F("hMixXEUeCharged","Mixed event : #it{x}_{#it{E}} for charged tracks in Ue region",
2701 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2702 fhMixXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
2703 fhMixXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2704 outputContainer->Add(fhMixXEUeCharged);
2707 new TH2F("hMixHbpXECharged","mixed event : #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
2708 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2709 fhMixHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2710 fhMixHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2711 outputContainer->Add(fhMixHbpXECharged);
2713 fhMixDeltaPhiChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2714 fhMixDeltaPhiChargedAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
2715 fhMixDeltaPhiChargedAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
2716 fhMixDeltaPhiDeltaEtaChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2718 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2720 for(Int_t z = 0 ; z < nz ; z++)
2726 sz = Form("_vz%d",z);
2727 tz = Form(", #it{v}_{#it{z}} bin %d",z);
2730 //printf("MIX : iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
2732 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiDeltaEtaChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2733 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()),
2734 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2735 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
2736 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetYTitle("#Delta #eta");
2738 outputContainer->Add(fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]);
2740 fhMixDeltaPhiChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2741 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()),
2742 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2743 fhMixDeltaPhiChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2744 fhMixDeltaPhiChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
2746 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBin[bin]);
2748 if(fFillEtaGapsHisto)
2750 fhMixDeltaPhiChargedAssocPtBinDEta08[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0.8ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2751 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()),
2752 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2753 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2754 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
2756 fhMixDeltaPhiChargedAssocPtBinDEta0[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2757 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()),
2758 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2759 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2760 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
2762 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta08[bin]);
2763 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta0[bin]);
2769 return outputContainer;
2773 //_________________________________________________________________________________________________
2774 Bool_t AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum(AliAODPWG4Particle* trigger,
2775 TLorentzVector & mom1,
2776 TLorentzVector & mom2)
2778 // Get the momentum of the pi0/eta assigned decay photons
2779 // In case of pi0/eta trigger, we may want to check their decay correlation,
2780 // get their decay children
2782 Int_t indexPhoton1 = trigger->GetCaloLabel(0);
2783 Int_t indexPhoton2 = trigger->GetCaloLabel(1);
2785 if(indexPhoton1!=-1 || indexPhoton2!=-1) return kFALSE;
2788 printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - indexPhoton1 = %d, indexPhoton2 = %d \n", indexPhoton1, indexPhoton2);
2790 TObjArray * clusters = 0x0 ;
2791 if(trigger->GetDetector()=="EMCAL") clusters = GetEMCALClusters() ;
2792 else clusters = GetPHOSClusters() ;
2794 for(Int_t iclus = 0; iclus < clusters->GetEntriesFast(); iclus++)
2796 AliVCluster * photon = (AliVCluster*) (clusters->At(iclus));
2798 if(photon->GetID()==indexPhoton1) photon->GetMomentum(mom1,GetVertex(0)) ;
2799 if(photon->GetID()==indexPhoton2) photon->GetMomentum(mom1,GetVertex(0)) ;
2801 if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - Photon1 = %f, Photon2 = %f \n", mom1.Pt(), mom2.Pt());
2809 //_____________________________________________________________
2810 Int_t AliAnaParticleHadronCorrelation::GetMCTagHistogramIndex(Int_t mcTag)
2812 // Index of MC histograms depending on MC origin
2814 if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPrompt) ||
2815 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCFragmentation)) return 0;
2816 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0)) return 1;
2817 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0Decay)) return 2;
2818 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) ||
2819 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEtaDecay)) return 3;
2820 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCOtherDecay)) return 4;
2821 else if(!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron)) return 5;
2826 //_________________________________________
2827 void AliAnaParticleHadronCorrelation::Init()
2832 if(!GetReader()->IsCTSSwitchedOn())
2833 AliFatal("STOP!: You want to use CTS tracks in analysis but not read!! \n!!Check the configuration file!!\n");
2836 //____________________________________________________
2837 void AliAnaParticleHadronCorrelation::InitParameters()
2840 //Initialize the parameters of the analysis.
2841 SetInputAODName("Particle");
2842 SetAODObjArrayName("Hadrons");
2843 AddToHistogramsName("AnaHadronCorr_");
2845 SetPtCutRange(0.,300);
2846 fDeltaPhiMinCut = TMath::DegToRad()*120.;
2847 fDeltaPhiMaxCut = TMath::DegToRad()*240. ;
2848 fSelectIsolated = kFALSE;
2849 fMakeSeveralUE = kFALSE;
2850 fUeDeltaPhiMinCut = TMath::DegToRad()*60.;
2851 fUeDeltaPhiMaxCut = TMath::DegToRad()*120 ;
2853 fNeutralCorr = kFALSE ;
2854 fPi0Trigger = kFALSE ;
2855 fDecayTrigger = kFALSE ;
2856 fHMPIDCorrelation = kFALSE ;
2858 fMakeAbsoluteLeading = kTRUE;
2859 fMakeNearSideLeading = kFALSE;
2862 fAssocPtBinLimit[0] = 0.2 ;
2863 fAssocPtBinLimit[1] = 0.5 ;
2864 fAssocPtBinLimit[2] = 1.0 ;
2865 fAssocPtBinLimit[3] = 2.0 ;
2866 fAssocPtBinLimit[4] = 3.0 ;
2867 fAssocPtBinLimit[5] = 4.0 ;
2868 fAssocPtBinLimit[6] = 5.0 ;
2869 fAssocPtBinLimit[7] = 6.0 ;
2870 fAssocPtBinLimit[8] = 7.0 ;
2871 fAssocPtBinLimit[9] = 8.0 ;
2872 fAssocPtBinLimit[10] = 9.0 ;
2873 fAssocPtBinLimit[11] = 10.0 ;
2874 fAssocPtBinLimit[12] = 12.0 ;
2875 fAssocPtBinLimit[13] = 14.0 ;
2876 fAssocPtBinLimit[14] = 16.0 ;
2877 fAssocPtBinLimit[15] = 20.0 ;
2878 fAssocPtBinLimit[16] = 30.0 ;
2879 fAssocPtBinLimit[17] = 40.0 ;
2880 fAssocPtBinLimit[18] = 50.0 ;
2881 fAssocPtBinLimit[19] = 200.0 ;
2883 fUseMixStoredInReader = kTRUE;
2888 fSelectLeadingHadronAngle = kFALSE;
2889 fMinLeadHadPhi = 150*TMath::DegToRad();
2890 fMaxLeadHadPhi = 210*TMath::DegToRad();
2893 fMaxLeadHadPt = 100;
2899 fDecayBits[0] = AliNeutralMesonSelection::kPi0;
2900 fDecayBits[1] = AliNeutralMesonSelection::kEta;
2901 fDecayBits[2] = AliNeutralMesonSelection::kPi0Side;
2902 fDecayBits[3] = AliNeutralMesonSelection::kEtaSide;
2905 //_________________________________________________________________________
2906 Bool_t AliAnaParticleHadronCorrelation::IsTriggerTheEventLeadingParticle()
2908 // Check if the what of the selected triggers is leading particle comparing
2909 // with all the triggers, all the tracks or all the clusters (if requested for the clusters).
2911 Double_t ptTrig = GetMinPt();
2912 Double_t phiTrig = 0 ;
2913 fLeadingTriggerIndex =-1 ;
2915 AliAODPWG4ParticleCorrelation* pLeading = 0;
2917 // Loop on stored AOD particles, find leading trigger on the selected list, with at least min pT.
2919 for(Int_t iaod = 0; iaod < GetInputAODBranch()->GetEntriesFast() ; iaod++)
2921 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
2922 particle->SetLeadingParticle(kFALSE); // set it later
2924 // Vertex cut in case of mixing
2925 Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0));
2926 if(check == 0) continue;
2927 if(check == -1) return kFALSE; // not sure if it is correct.
2929 // find the leading particles with highest momentum
2930 if (particle->Pt() > ptTrig)
2932 ptTrig = particle->Pt() ;
2933 phiTrig = particle->Phi();
2935 pLeading = particle ;
2937 }// finish search of leading trigger particle on the AOD branch.
2939 if(index < 0) return kFALSE;
2941 //printf("AOD leading pT %2.2f, ID %d\n", pLeading->Pt(),pLeading->GetCaloLabel(0));
2943 if(phiTrig < 0 ) phiTrig += TMath::TwoPi();
2945 // Compare if it is the leading of all tracks
2948 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
2950 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
2952 if(track->GetID() == pLeading->GetTrackLabel(0) || track->GetID() == pLeading->GetTrackLabel(1) ||
2953 track->GetID() == pLeading->GetTrackLabel(2) || track->GetID() == pLeading->GetTrackLabel(3) ) continue ;
2955 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
2956 p3.SetXYZ(mom[0],mom[1],mom[2]);
2957 Float_t pt = p3.Pt();
2958 Float_t phi = p3.Phi() ;
2959 if(phi < 0) phi+=TMath::TwoPi();
2961 //jump out this event if near side associated particle pt larger than trigger
2962 if (fMakeNearSideLeading)
2964 if(pt > ptTrig && TMath::Abs(phi-phiTrig) < TMath::PiOver2()) return kFALSE;
2966 //jump out this event if there is any other particle with pt larger than trigger
2969 if(pt > ptTrig) return kFALSE ;
2973 // Compare if it is leading of all calorimeter clusters
2975 if(fCheckLeadingWithNeutralClusters)
2977 // Select the calorimeter cluster list
2978 TObjArray * nePl = 0x0;
2979 if (pLeading->GetDetector() == "PHOS" )
2980 nePl = GetPHOSClusters();
2982 nePl = GetEMCALClusters();
2984 if(!nePl) return kTRUE; // Do the selection just with the tracks if no calorimeter is available.
2987 for(Int_t ipr = 0;ipr < nePl->GetEntriesFast() ; ipr ++ )
2989 AliVCluster * cluster = (AliVCluster *) (nePl->At(ipr)) ;
2991 if(cluster->GetID() == pLeading->GetCaloLabel(0) || cluster->GetID() == pLeading->GetCaloLabel(1) ) continue ;
2993 cluster->GetMomentum(lv,GetVertex(0));
2995 Float_t pt = lv.Pt();
2996 Float_t phi = lv.Phi() ;
2997 if(phi < 0) phi+=TMath::TwoPi();
2999 if(IsTrackMatched(cluster,GetReader()->GetInputEvent())) continue ; // avoid charged clusters, already covered by tracks, or cluster merging with track.
3001 //jump out this event if near side associated particle pt larger than trigger
3002 // not really needed for calorimeter, unless DCal is included
3003 if (fMakeNearSideLeading)
3005 if(pt > ptTrig && TMath::Abs(phi-phiTrig) < TMath::PiOver2()) return kFALSE ;
3007 //jump out this event if there is any other particle with pt larger than trigger
3010 if(pt > ptTrig) return kFALSE ;
3013 } // check neutral clusters
3015 fLeadingTriggerIndex = index ;
3016 pLeading->SetLeadingParticle(kTRUE);
3018 if( GetDebug() > 1 ) printf("\t particle AOD with index %d is leading with pT %2.2f\n", fLeadingTriggerIndex, pLeading->Pt());
3024 //_________________________________________________________________
3025 void AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms()
3027 //Particle-Hadron Correlation Analysis, fill histograms
3029 if(!GetInputAODBranch())
3031 AliFatal(Form("No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data()));
3032 return ; // coverity
3035 Int_t naod = GetInputAODBranch()->GetEntriesFast();
3039 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - No particle AOD found! \n");
3041 return ; // no trigger particles found.
3046 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Begin hadron correlation analysis, fill histograms \n");
3047 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In particle branch aod entries %d\n", naod);
3048 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In CTS aod entries %d\n", GetCTSTracks()->GetEntriesFast());
3051 //------------------------------------------------------
3052 // Find leading trigger if analysis request only leading,
3053 // if there is no leading trigger, then skip the event
3056 if( fMakeAbsoluteLeading || fMakeNearSideLeading )
3058 Bool_t leading = IsTriggerTheEventLeadingParticle();
3061 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - AOD Leading trigger? %d, with index %d\n",leading,fLeadingTriggerIndex);
3065 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Leading was requested and not found\n");
3070 // Select only the leading in the trigger AOD loop
3071 naod = fLeadingTriggerIndex+1 ;
3072 iaod = fLeadingTriggerIndex ;
3076 //------------------------------------------------------
3077 // Get event multiplicity and bins
3079 Float_t cen = GetEventCentrality();
3080 Float_t ep = GetEventPlaneAngle();
3081 if(fFillHighMultHistograms) fhTriggerEventPlaneCentrality->Fill(cen,ep);
3083 Int_t mixEventBin = GetEventMixBin();
3084 Int_t vzbin = GetEventVzBin();
3086 //------------------------------------------------------
3087 // Loop on trigger AOD
3089 for( iaod = 0; iaod < naod; iaod++ )
3091 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
3094 // Trigger particle selection criteria:
3096 Float_t pt = particle->Pt();
3098 if(pt < GetMinPt() || pt > GetMaxPt() ) continue ;
3100 fhPtTriggerInput->Fill(pt);
3103 // check if it was a calorimeter cluster
3104 // and if the shower shape cut was requested apply it.
3105 // Not needed if already done at the particle identification level,
3106 // but for isolation studies, it is preferred not to remove so we do it here
3108 Int_t clID1 = particle->GetCaloLabel(0) ;
3109 Int_t clID2 = particle->GetCaloLabel(1) ; // for photon clusters should not be set.
3110 if( GetDebug() > 1 ) printf("%s Trigger : id1 %d, id2 %d, min %f, max %f, det %s\n",
3111 GetInputAODName().Data(),clID1,clID2,fM02MinCut,fM02MaxCut,(particle->GetDetector()).Data());
3113 if(clID1 > 0 && clID2 < 0 && fM02MaxCut > 0 && fM02MinCut > 0)
3116 TObjArray* clusters = 0x0;
3117 if (particle->GetDetector() == "EMCAL") clusters = GetEMCALClusters();
3118 else if(particle->GetDetector() == "PHOS" ) clusters = GetPHOSClusters();
3122 AliVCluster *cluster = FindCluster(clusters,clID1,iclus);
3123 Float_t m02 = cluster->GetM02();
3124 if(m02 > fM02MaxCut || m02 < fM02MinCut) continue ;
3127 fhPtTriggerSSCut->Fill(pt);
3131 // Check if the particle is isolated or if we want to take the isolation into account
3132 // This bool is set in AliAnaParticleIsolation
3136 if( !particle->IsIsolated() ) continue;
3137 fhPtTriggerIsoCut->Fill(pt);
3141 // Check if trigger is in fiducial region
3143 if(IsFiducialCutOn())
3145 Bool_t in = GetFiducialCut()->IsInFiducialCut(*particle->Momentum(),particle->GetDetector()) ;
3146 if(! in ) continue ;
3149 fhPtTriggerFidCut->Fill(pt);
3151 //---------------------------------------
3154 // Find the leading hadron in the opposite hemisphere to the triggeer
3155 // and accept the trigger if leading is in defined window.
3156 Bool_t okLeadHad = kTRUE;
3157 if(fSelectLeadingHadronAngle)
3158 okLeadHad = FindLeadingOppositeHadronInWindow(particle);
3159 if(!okLeadHad) continue;
3162 // Charged particles correlation
3164 MakeChargedCorrelation(particle);
3170 mcIndex = GetMCTagHistogramIndex(particle->GetTag());
3171 MakeMCChargedCorrelation(particle->GetLabel(), mcIndex);
3174 // Do own mixed event with charged,
3175 // add event and remove previous or fill the mixed histograms
3177 MakeChargedMixCorrelation(particle);
3180 // Neutral particles correlation
3183 MakeNeutralCorrelation(particle);
3185 //----------------------------------------------------------------
3186 // Fill trigger pT related histograms if not absolute leading
3189 // pT of the trigger, vs trigger origin if MC
3191 fhPtTrigger->Fill(pt);
3192 if(IsDataMC() && mcIndex >=0 && mcIndex < 7)
3193 fhPtTriggerMC[mcIndex]->Fill(pt);
3197 Int_t decayTag = particle->GetBtag(); // temporary
3200 for(Int_t ibit = 0; ibit<fNDecayBits; ibit++)
3202 if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit]))
3204 fhPtDecayTrigger[ibit]->Fill(pt);
3206 if(IsDataMC() && mcIndex >=0 && mcIndex < 7)
3207 fhPtDecayTriggerMC[ibit][mcIndex]->Fill(pt);
3214 // Acceptance of the trigger
3216 Float_t phi = particle->Phi();
3217 if( phi < 0 ) phi+=TMath::TwoPi();
3218 fhPhiTrigger->Fill(pt, phi);
3220 fhEtaTrigger->Fill(pt, particle->Eta());
3221 //printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Trigger particle : pt %f, eta %f, phi %f\n",particle->Pt(),particle->Eta(),phi);
3223 //----------------------------------
3224 // Trigger particle pT vs event bins
3226 fhPtTriggerBin->Fill(pt,mixEventBin);
3228 fhPtTriggerVzBin->Fill(pt,vzbin);
3230 if(fFillHighMultHistograms)
3232 fhPtTriggerCentrality->Fill(pt,cen);
3233 fhPtTriggerEventPlane->Fill(pt,ep);
3236 //----------------------------------
3237 // Trigger particle pT vs pile-up
3239 if(fFillPileUpHistograms)
3241 Int_t vtxBC = GetReader()->GetVertexBC();
3242 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA) fhPtTriggerVtxBC0->Fill(pt);
3244 if(GetReader()->IsPileUpFromSPD()) fhPtTriggerPileUp[0]->Fill(pt);
3245 if(GetReader()->IsPileUpFromEMCal()) fhPtTriggerPileUp[1]->Fill(pt);
3246 if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtTriggerPileUp[2]->Fill(pt);
3247 if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtTriggerPileUp[3]->Fill(pt);
3248 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtTriggerPileUp[4]->Fill(pt);
3249 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtTriggerPileUp[5]->Fill(pt);
3250 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtTriggerPileUp[6]->Fill(pt);
3252 } // AOD trigger loop
3254 //Reinit for next event
3255 fLeadingTriggerIndex = -1;
3257 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - End fill histograms \n");
3260 //_______________________________________________________________________________________________________
3261 void AliAnaParticleHadronCorrelation::MakeChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
3263 // Charged Hadron Correlation Analysis
3265 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Make trigger particle - charged hadron correlation \n");
3267 Float_t phiTrig = aodParticle->Phi();
3268 Float_t etaTrig = aodParticle->Eta();
3269 Float_t ptTrig = aodParticle->Pt();
3270 Int_t mcTag = aodParticle->GetTag();
3271 Double_t bz = GetReader()->GetInputEvent()->GetMagneticField();
3277 //decay = aodParticle->IsTagged();
3278 decayTag = aodParticle->GetBtag(); // temporary
3279 if(decayTag < 0) decayTag = 0; // temporary
3280 // printf("Correlation: pT %2.2f, BTag %d, Tagged %d\n",ptTrig, decayTag, aodParticle->IsTagged());
3281 // printf("\t check bit Pi0 %d, Eta %d, Pi0Side %d, EtaSide %d\n",
3282 // GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kPi0),
3283 // GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kEta),
3284 // GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kPi0Side),
3285 // GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kEtaSide));
3288 Float_t pt = -100. ;
3289 Float_t phi = -100. ;
3290 Float_t eta = -100. ;
3291 Float_t deltaPhi = -100. ;
3294 TLorentzVector photonMom ;
3295 TObjArray * reftracks = 0x0;
3298 // Mixed event settings
3299 Int_t evtIndex11 = -1 ; // cluster trigger or pi0 trigger
3300 Int_t evtIndex12 = -1 ; // pi0 trigger
3301 Int_t evtIndex13 = -1 ; // charged trigger
3303 if (GetMixedEvent())
3305 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
3306 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
3307 evtIndex13 = GetMixedEvent()->EventIndex(aodParticle->GetTrackLabel(0)) ;
3311 // In case of pi0/eta trigger, we may want to check their decay correlation,
3312 // get their decay children
3314 TLorentzVector decayMom1;
3315 TLorentzVector decayMom2;
3316 Bool_t decayFound = kFALSE;
3319 decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
3322 fhPtPi0DecayRatio->Fill(ptTrig, decayMom1.Pt()/ptTrig);
3323 fhPtPi0DecayRatio->Fill(ptTrig, decayMom2.Pt()/ptTrig);
3327 //-----------------------------------------------------------------------
3328 // Track loop, select tracks with good pt, phi and fill AODs or histograms
3329 //-----------------------------------------------------------------------
3331 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
3333 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
3335 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
3336 p3.SetXYZ(mom[0],mom[1],mom[2]);
3340 if(phi < 0) phi+=TMath::TwoPi();
3342 //Select only hadrons in pt range
3343 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
3345 //remove trigger itself for correlation when use charged triggers
3346 if( track->GetID() == aodParticle->GetTrackLabel(0) || track->GetID() == aodParticle->GetTrackLabel(1) ||
3347 track->GetID() == aodParticle->GetTrackLabel(2) || track->GetID() == aodParticle->GetTrackLabel(3) )
3350 //Only for mixed event frame
3351 Int_t evtIndex2 = 0 ;
3352 if (GetMixedEvent())
3354 evtIndex2 = GetMixedEvent()->EventIndex(track->GetID()) ;
3355 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 || evtIndex13 == evtIndex2 ) // photon and track from different events
3358 if (TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut())
3363 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
3365 // ------------------------------
3366 // Track type bin or bits setting
3370 // * Set the pt associated bin for the defined bins *
3372 Int_t assocBin = -1;
3373 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3375 if(pt > fAssocPtBinLimit[i] && pt < fAssocPtBinLimit[i+1]) assocBin= i;
3379 // * Assign to the histogram array a bin corresponding
3380 // to a combination of pTa and vz bins *
3387 nz = GetNZvertBin();
3388 vz = GetEventVzBin();
3391 Int_t bin = assocBin*nz+vz;
3393 //printf("assoc Bin = %d, vZ bin = %d, bin = %d \n", assocBin,GetEventVzBin(),bin);
3396 // * Get the status of the TOF bit *
3398 ULong_t status = track->GetStatus();
3399 Bool_t okTOF = ( (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ) ;
3400 //Double32_t tof = track->GetTOFsignal()*1e-3;
3401 Int_t trackBC = track->GetTOFBunchCrossing(bz);
3404 if (okTOF && trackBC!=0) outTOF = 1;
3405 else if(okTOF && trackBC==0) outTOF = 0;
3407 // Track multiplicity or cent bin
3408 Int_t cenbin = GetEventCentralityBin(); // combine with vz assoc bin???
3414 // Azimuthal Angle histograms
3417 deltaPhi = phiTrig-phi;
3420 // Calculate deltaPhi shift so that for the particles on the opposite side
3421 // it is defined between 90 and 270 degrees
3422 // Shift [-360,-90] to [0, 270]
3423 // and [270,360] to [-90,0]
3424 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3425 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3427 FillChargedAngularCorrelationHistograms(pt, ptTrig, bin, phi, phiTrig, deltaPhi,
3428 eta, etaTrig, decayTag, track->GetHMPIDsignal(),
3429 outTOF, cenbin, mcTag);
3432 // Imbalance zT/xE/pOut histograms
3436 // Delta phi cut for momentum imbalance correlation
3438 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
3439 FillChargedMomentumImbalanceHistograms(ptTrig, pt, deltaPhi, cenbin, track->Charge(),
3440 assocBin, decayTag, outTOF, mcTag);
3443 // Underlying event, right side, default case
3445 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3446 FillChargedUnderlyingEventHistograms(ptTrig, pt, deltaPhi, cenbin, outTOF);
3449 // Several UE calculation, in different perpendicular regions, up to 6:
3450 // left, right, upper-left, lower left, upper-right, lower-right
3453 FillChargedUnderlyingEventSidesHistograms(ptTrig,pt,deltaPhi);
3456 if(fPi0Trigger && decayFound)
3457 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2, kTRUE) ;
3460 // Add track reference to array
3462 if(fFillAODWithReferences)
3467 reftracks = new TObjArray(0);
3468 TString trackname = Form("%sTracks", GetAODObjArrayName().Data());
3469 reftracks->SetName(trackname.Data());
3470 reftracks->SetOwner(kFALSE);
3473 reftracks->Add(track);
3474 }// reference track to AOD
3477 //Fill AOD with reference tracks, if not filling histograms
3478 if(fFillAODWithReferences && reftracks)
3480 aodParticle->AddObjArray(reftracks);
3485 //_________________________________________________________________________________________________________
3486 void AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
3488 // Mix current trigger with tracks in another MB event
3490 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Make trigger particle - charged hadron mixed event correlation \n");
3492 if(GetMixedEvent()) return; // This is not the mixed event from general mixing frame
3494 // Get the event with similar caracteristics
3495 //printf("MakeChargedMixCorrelation for %s\n",GetInputAODName().Data());
3497 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
3499 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
3501 if(!inputHandler) return;
3503 if(!(inputHandler->IsEventSelected( ) & GetReader()->GetEventTriggerMask())) return;
3505 // Get the pool, check if it exits
3506 Int_t eventBin = GetEventMixBin();
3508 //Check that the bin exists, if not (bad determination of RP, ntrality or vz bin) do nothing
3509 if(eventBin < 0) return;
3511 fhEventBin->Fill(eventBin);
3513 // get neutral clusters pool?
3514 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
3515 Bool_t neutralMix = fFillNeutralEventMixPool || isoCase ;
3518 TList * poolCalo = 0;
3519 if(fUseMixStoredInReader)
3521 pool = GetReader()->GetListWithMixedEventsForTracks(eventBin);
3522 if(neutralMix) poolCalo = GetReader()->GetListWithMixedEventsForCalo (eventBin);
3526 pool = fListMixTrackEvents[eventBin];
3527 if(neutralMix) poolCalo = fListMixCaloEvents [eventBin];
3532 if( neutralMix && !poolCalo )
3533 printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Careful, cluster pool not available\n");
3535 Double_t ptTrig = aodParticle->Pt();
3536 Double_t etaTrig = aodParticle->Eta();
3537 Double_t phiTrig = aodParticle->Phi();
3538 if(phiTrig < 0.) phiTrig+=TMath::TwoPi();
3541 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Pool bin %d size %d, trigger trigger pt=%f, phi=%f, eta=%f\n",
3542 eventBin,pool->GetSize(), ptTrig,phiTrig,etaTrig);
3544 Double_t ptAssoc = -999.;
3545 Double_t phiAssoc = -999.;
3546 Double_t etaAssoc = -999.;
3547 Double_t deltaPhi = -999.;
3548 Double_t deltaEta = -999.;
3549 Double_t xE = -999.;
3551 // Start from first event in pool except if in this same event the pool was filled
3553 if(GetReader()->GetLastTracksMixedEvent() == GetEventNumber()) ev0 = 1;
3555 for(Int_t ev=ev0; ev < pool->GetSize(); ev++)
3558 // Recover the lists of tracks or clusters
3560 TObjArray* bgTracks = static_cast<TObjArray*>(pool->At(ev));
3561 TObjArray* bgCalo = 0;
3563 // Recover the clusters list if requested
3564 if( neutralMix && poolCalo )
3566 if(pool->GetSize()!=poolCalo->GetSize())
3567 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Different size of calo and track pools\n");
3569 bgCalo = static_cast<TObjArray*>(poolCalo->At(ev));
3572 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Event %d in calo pool not available?\n",ev);
3576 // Isolate the trigger in the mixed event with mixed tracks and clusters
3578 if( OnlyIsolated() )
3580 Int_t n=0, nfrac = 0;
3581 Bool_t isolated = kFALSE;
3582 Float_t coneptsum = 0, coneptlead = 0;
3583 GetIsolationCut()->MakeIsolationCut(bgTracks,bgCalo,
3584 GetReader(), GetCaloPID(),
3585 kFALSE, aodParticle, "",
3586 n,nfrac,coneptsum,coneptlead,isolated);
3588 //printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Isolated? %d - cone %f, ptthres %f",
3589 // isolated,GetIsolationCut()->GetConeSize(),GetIsolationCut()->GetPtThreshold());
3590 //if(bgTracks)printf(" - n track %d", bgTracks->GetEntriesFast());
3593 if(!isolated) continue ;
3597 // Check if the trigger is leading of mixed event
3599 Int_t nTracks=bgTracks->GetEntriesFast();
3601 if(fMakeNearSideLeading || fMakeAbsoluteLeading)
3603 Bool_t leading = kTRUE;
3604 for(Int_t jlead = 0;jlead < nTracks; jlead++ )
3606 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(jlead) ;
3608 ptAssoc = track->Pt();
3609 phiAssoc = track->Phi() ;
3610 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3612 if (fMakeNearSideLeading)
3614 if(ptAssoc > ptTrig && TMath::Abs(phiAssoc-phiTrig) < TMath::PiOver2())
3620 //jump out this event if there is any other particle with pt larger than trigger
3621 else if(fMakeAbsoluteLeading)
3623 if(ptAssoc > ptTrig)
3631 if( !neutralMix && fCheckLeadingWithNeutralClusters )
3632 printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Leading of clusters requested but no clusters in mixed event\n");
3634 if(neutralMix && fCheckLeadingWithNeutralClusters && bgCalo)
3636 Int_t nClusters=bgCalo->GetEntriesFast();
3637 TLorentzVector mom ;
3638 for(Int_t jlead = 0;jlead <nClusters; jlead++ )
3640 AliAODPWG4Particle *cluster= (AliAODPWG4Particle*) bgCalo->At(jlead) ;
3642 ptAssoc = cluster->Pt();
3643 phiAssoc = cluster->Phi() ;
3644 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3646 if (fMakeNearSideLeading)
3648 if(ptAssoc > ptTrig && TMath::Abs(phiAssoc-phiTrig) < TMath::PiOver2())
3654 //jump out this event if there is any other particle with pt larger than trigger
3655 else if(fMakeAbsoluteLeading)
3657 if(ptAssoc > ptTrig)
3666 if(!leading) continue; // not leading, check the next event in pool
3670 // Fill histograms for selected triggers
3673 fhEventMixBin->Fill(eventBin);
3675 //printf("\t Read Pool event %d, nTracks %d\n",ev,nTracks);
3677 fhPtTriggerMixed ->Fill(ptTrig);
3678 fhPhiTriggerMixed ->Fill(ptTrig, phiTrig);
3679 fhEtaTriggerMixed ->Fill(ptTrig, etaTrig);
3680 fhPtTriggerMixedBin->Fill(ptTrig,eventBin);
3681 if(fCorrelVzBin)fhPtTriggerMixedVzBin->Fill(ptTrig, GetEventVzBin());
3684 // Correlation histograms
3686 for(Int_t j1 = 0;j1 <nTracks; j1++ )
3688 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(j1) ;
3690 if(!track) continue;
3692 ptAssoc = track->Pt();
3693 etaAssoc = track->Eta();
3694 phiAssoc = track->Phi() ;
3695 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3697 deltaPhi = phiTrig-phiAssoc;
3698 if(deltaPhi < -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3699 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3700 deltaEta = etaTrig-etaAssoc;
3703 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation(): deltaPhi= %f, deltaEta=%f\n",deltaPhi, deltaEta);
3705 // Angular correlation
3706 fhMixDeltaPhiCharged ->Fill(ptTrig, deltaPhi);
3707 fhMixDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
3710 // Momentum imbalance
3712 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
3714 xE = -ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3717 printf("MakeChargedMixCorrelation(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
3718 xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
3720 fhMixXECharged->Fill(ptTrig,xE);
3721 if(xE > 0 ) fhMixHbpXECharged->Fill(ptTrig, TMath::Log(1./xE));
3725 // Underlying event momentum imbalance
3727 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3729 //Underlying event region
3730 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
3731 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
3734 printf("MakeChargedMixCorrelation(): Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
3735 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
3737 fhMixXEUeCharged->Fill(ptTrig,uexE);
3740 // Set the pt associated bin for the defined bins
3741 Int_t assocBin = -1;
3742 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3744 if(ptAssoc > fAssocPtBinLimit[i] && ptAssoc < fAssocPtBinLimit[i+1]) assocBin= i;
3748 // Assign to the histogram array a bin corresponding to a combination of pTa and vz bins
3755 nz = GetNZvertBin();
3756 vz = GetEventVzBin();
3759 Int_t bin = assocBin*nz+vz;
3761 if(bin < 0) continue ; // this pt bin was not considered
3763 fhMixDeltaPhiChargedAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
3764 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->Fill(deltaPhi, deltaEta);
3766 if(fFillEtaGapsHisto)
3768 if(TMath::Abs(deltaEta) > 0.8)
3769 fhMixDeltaPhiChargedAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
3770 if(TMath::Abs(deltaEta) < 0.01)
3771 fhMixDeltaPhiChargedAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
3775 } // mixed event loop
3779 //_______________________________________________________________________________________________________
3780 void AliAnaParticleHadronCorrelation::MakeNeutralCorrelation(AliAODPWG4ParticleCorrelation * aodParticle)
3782 // Neutral Pion Correlation Analysis
3784 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); // For the future, foresee more possible pi0 lists
3785 if(!pi0list) return ;
3787 Int_t npi0 = pi0list->GetEntriesFast();
3788 if(npi0 == 0) return ;
3791 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Particle - pi0 correlation, %d pi0's\n",npi0);
3793 Int_t evtIndex11 = 0 ;
3794 Int_t evtIndex12 = 0 ;
3795 if (GetMixedEvent())
3797 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
3798 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
3801 Float_t pt = -100. ;
3802 Float_t zT = -100. ;
3803 Float_t phi = -100. ;
3804 Float_t eta = -100. ;
3805 Float_t xE = -100. ;
3806 Float_t hbpXE= -100. ;
3807 Float_t hbpZT= -100. ;
3809 Float_t ptTrig = aodParticle->Pt();
3810 Float_t phiTrig = aodParticle->Phi();
3811 Float_t etaTrig = aodParticle->Eta();
3812 Float_t deltaPhi= -100. ;
3813 Float_t deltaEta= -100. ;
3815 TLorentzVector photonMom ;
3817 // In case of pi0/eta trigger, we may want to check their decay correlation,
3818 // get their decay children
3819 TLorentzVector decayMom1;
3820 TLorentzVector decayMom2;
3821 Bool_t decayFound = kFALSE;
3822 if(fPi0Trigger) decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
3824 TObjArray * refpi0 = 0x0;
3827 //Loop on stored AOD pi0
3829 for(Int_t iaod = 0; iaod < npi0 ; iaod++)
3831 AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (pi0list->At(iaod));
3833 Int_t evtIndex2 = 0 ;
3834 Int_t evtIndex3 = 0 ;
3835 if (GetMixedEvent())
3837 evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(0)) ;
3838 evtIndex3 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(1)) ;
3840 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 ||
3841 evtIndex11 == evtIndex3 || evtIndex12 == evtIndex3) // trigger and pi0 are not from different events
3847 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
3849 //remove trigger itself for correlation when use charged triggers
3850 if(aodParticle->GetCaloLabel(0) >= 0 &&
3851 (pi0->GetCaloLabel(0) == aodParticle->GetCaloLabel(0) || pi0->GetCaloLabel(1) == aodParticle->GetCaloLabel(0))) continue ;
3853 if( aodParticle->GetCaloLabel(1) >= 0 &&
3854 (pi0->GetCaloLabel(0) == aodParticle->GetCaloLabel(1) || pi0->GetCaloLabel(1) == aodParticle->GetCaloLabel(1))) continue ;
3857 // Angular correlations
3861 deltaEta = etaTrig-eta;
3862 deltaPhi = phiTrig-phi;
3863 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3864 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3866 fhEtaNeutral ->Fill(pt , eta );
3867 fhPhiNeutral ->Fill(pt , phi );
3868 fhDeltaEtaNeutral->Fill(ptTrig, deltaEta);
3869 fhDeltaPhiNeutral->Fill(ptTrig, deltaPhi);
3871 if(pt > 2 ) fhDeltaPhiDeltaEtaNeutral->Fill(deltaPhi, deltaEta);
3874 // Momentum imbalance
3881 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
3883 //delta phi cut for correlation
3884 if( (deltaPhi > fDeltaPhiMinCut) && ( deltaPhi < fDeltaPhiMaxCut) )
3886 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3889 printf("MakeNeutralCorrelation(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
3890 xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
3892 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3894 fhDeltaPhiNeutralPt->Fill(pt,deltaPhi);
3895 fhXENeutral ->Fill(ptTrig,xE);
3896 fhPtHbpXENeutral ->Fill(ptTrig,hbpXE);
3897 fhZTNeutral ->Fill(ptTrig,zT);
3898 fhPtHbpZTNeutral ->Fill(ptTrig,hbpZT);
3900 else if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3902 // Randomize angle for xE calculation
3903 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
3905 xE = -(pt/ptTrig)*TMath::Cos(randomphi);
3906 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3908 fhDeltaPhiUeNeutralPt->Fill(pt,deltaPhi);
3909 fhZTUeNeutral ->Fill(ptTrig,zT);
3910 fhPtHbpZTUeNeutral ->Fill(ptTrig,hbpZT);
3911 fhXEUeNeutral ->Fill(ptTrig,xE);
3912 fhPtHbpXEUeNeutral ->Fill(ptTrig,hbpXE);
3915 // Several UE calculation, not sure it is useful
3916 // with partical calorimter acceptance
3917 if(fMakeSeveralUE) FillNeutralUnderlyingEventSidesHistograms(ptTrig,pt,zT,hbpZT,deltaPhi);
3920 // Decay photon correlations
3922 if(fPi0Trigger && decayFound)
3923 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2,kFALSE) ;
3925 if(fFillAODWithReferences)
3930 refpi0 = new TObjArray(0);
3931 refpi0->SetName(GetAODObjArrayName()+"Pi0s");
3932 refpi0->SetOwner(kFALSE);
3935 }//put references in trigger AOD
3938 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Selected pi0: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
3942 //Fill AOD with reference tracks, if not filling histograms
3943 if(fFillAODWithReferences && refpi0)
3945 aodParticle->AddObjArray(refpi0);
3949 //____________________________________________________________________________________________
3950 void AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(Int_t label, Int_t histoIndex)
3952 // Charged Hadron Correlation Analysis with MC information
3954 if ( GetDebug() > 1 )
3955 AliInfo("Make trigger particle - charged hadron correlation in AOD MC level");
3959 if( GetDebug() > 0 ) AliInfo(Form(" *** bad label ***: label %d", label));
3963 // Do MC correlation for a given particle type range.
3964 // Types defined in GetMCTagHistogramIndex:
3965 // 0 direct gamma; 1 pi0; 2 pi0 decay; 3 eta decay; 4 other decay; 5 electron; 6 other (hadron)
3966 if(histoIndex < fMCGenTypeMin || histoIndex > fMCGenTypeMax) return ;
3968 AliStack * stack = 0x0 ;
3969 TParticle * primary = 0x0 ;
3970 TClonesArray * mcparticles = 0x0 ;
3971 AliAODMCParticle * aodprimary = 0x0 ;
3973 Double_t eprim = 0 ;
3974 Double_t ptprim = 0 ;
3975 Double_t phiprim = 0 ;
3976 Double_t etaprim = 0 ;
3978 Int_t iParticle = 0 ;
3980 Bool_t leadTrig = kTRUE;
3982 if( GetReader()->ReadStack() )
3984 stack = GetMCStack() ;
3987 AliFatal("Stack not available, is the MC handler called? STOP");
3991 //nTracks = stack->GetNtrack() ;
3992 nTracks = stack->GetNprimary();
3993 if( label >= stack->GetNtrack() )
3996 AliInfo(Form("*** large label ***: label %d, n tracks %d", label, stack->GetNtrack()));
4000 primary = stack->Particle(label);
4003 AliInfo(Form(" *** no primary ***: label %d", label));
4007 eprim = primary->Energy();
4008 ptprim = primary->Pt();
4009 etaprim = primary->Eta();
4010 phiprim = primary->Phi();
4011 if(phiprim < 0) phiprim+=TMath::TwoPi();
4013 if(ptprim < 0.01 || eprim < 0.01) return ;
4015 for (iParticle = 0 ; iParticle < nTracks ; iParticle++)
4017 TParticle * particle = stack->Particle(iParticle);
4018 TLorentzVector momentum;
4020 //keep only final state particles
4021 if( particle->GetStatusCode() != 1 ) continue ;
4023 //---------- Charged particles ----------------------
4024 Int_t pdg = particle->GetPdgCode();
4025 Int_t charge = (Int_t) TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
4026 if(charge == 0) continue;
4028 particle->Momentum(momentum);
4030 //Particles in CTS acceptance, make sure to use the same selection as in the reader
4031 Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
4032 //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,momentum.Pt(),momentum.Eta(),momentum.Phi()*TMath::RadToDeg());
4033 if( !inCTS ) continue;
4035 // Remove conversions
4036 if ( TMath::Abs(pdg) == 11 && stack->Particle(particle->GetFirstMother())->GetPdgCode() == 22 ) continue ;
4038 if ( label == iParticle ) continue; // avoid trigger particle
4040 Float_t phi = particle->Phi();
4041 if(phi < 0) phi+=TMath::TwoPi();
4043 Bool_t lead = FillChargedMCCorrelationHistograms(particle->Pt(),phi,particle->Eta(),ptprim,phiprim,etaprim,histoIndex);
4044 if(!lead) leadTrig = kFALSE;
4045 //if ( !lead && (fMakeAbsoluteLeading || fMakeNearSideLeading) ) return;
4051 else if( GetReader()->ReadAODMCParticles() )
4053 //Get the list of MC particles
4054 mcparticles = GetReader()->GetAODMCParticles();
4055 if( !mcparticles ) return;
4057 nTracks = mcparticles->GetEntriesFast() ;
4059 if( label >= nTracks )
4062 AliInfo(Form(" *** large label ***: label %d, n tracks %d", label,nTracks));
4067 aodprimary = (AliAODMCParticle*) mcparticles->At(label);
4070 AliInfo(Form(" *** no AOD primary ***: label %d", label));
4074 eprim = aodprimary->E();
4075 ptprim = aodprimary->Pt();
4076 etaprim = aodprimary->Eta();
4077 phiprim = aodprimary->Phi();
4078 if(phiprim < 0) phiprim+=TMath::TwoPi();
4080 if(ptprim < 0.01 || eprim < 0.01) return ;
4082 for (iParticle = 0; iParticle < nTracks; iParticle++)
4084 AliAODMCParticle *part = (AliAODMCParticle*) mcparticles->At(iParticle);
4086 if (!part->IsPhysicalPrimary() ) continue; // same as part->GetStatus() !=1
4088 if ( part->Charge() == 0 ) continue;
4090 TLorentzVector momentum(part->Px(),part->Py(),part->Pz(),part->E());
4092 //Particles in CTS acceptance, make sure to use the same selection as in the reader
4093 Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
4094 //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,momentum.Pt(),momentum.Eta(),momentum.Phi()*TMath::RadToDeg());
4095 if( !inCTS ) continue;
4097 // Remove conversions
4098 Int_t indexmother = part->GetMother();
4099 if ( indexmother > -1 )
4101 Int_t pdg = part->GetPdgCode();
4102 Int_t mPdg = ((AliAODMCParticle*) mcparticles->At(indexmother)) ->GetPdgCode();
4103 if (TMath::Abs(pdg) == 11 && mPdg == 22) continue;
4106 if ( label == iParticle ) continue; // avoid trigger particle
4108 Float_t phi = part->Phi();
4109 if(phi < 0) phi+=TMath::TwoPi();
4111 Bool_t lead = FillChargedMCCorrelationHistograms(part->Pt(),phi,part->Eta(),ptprim,phiprim,etaprim, histoIndex);
4112 if(!lead) leadTrig = kFALSE;
4113 //if ( !lead && (fMakeAbsoluteLeading || fMakeNearSideLeading)) return;
4115 } //MC particle loop
4118 // Trigger MC particle histograms
4119 //if (!lead && (fMakeAbsoluteLeading || fMakeNearSideLeading)) return;
4121 fhMCPtTrigger [histoIndex]->Fill(ptprim);
4122 fhMCPhiTrigger[histoIndex]->Fill(ptprim,phiprim);
4123 fhMCEtaTrigger[histoIndex]->Fill(ptprim,etaprim);
4125 if(!leadTrig && (fMakeAbsoluteLeading || fMakeNearSideLeading) )
4128 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(): Not leading primary trigger: pT %2.2f, phi %2.2f, eta %2.2f\n",
4129 ptprim,phiprim*TMath::RadToDeg(),etaprim);
4131 fhMCPtTriggerNotLeading [histoIndex]->Fill(ptprim);
4132 fhMCPhiTriggerNotLeading[histoIndex]->Fill(ptprim,phiprim);
4133 fhMCEtaTriggerNotLeading[histoIndex]->Fill(ptprim,etaprim);
4137 //_____________________________________________________________________
4138 void AliAnaParticleHadronCorrelation::Print(const Option_t * opt) const
4141 //Print some relevant parameters set for the analysis
4145 printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
4146 AliAnaCaloTrackCorrBaseClass::Print(" ");
4147 printf("Pt trigger > %2.2f; < %2.2f\n", GetMinPt() , GetMaxPt()) ;
4148 printf("Pt associa > %2.2f; < %2.2f\n", fMinAssocPt, fMaxAssocPt) ;
4149 printf("Phi trigger particle-Hadron < %3.2f\n", fDeltaPhiMaxCut) ;
4150 printf("Phi trigger particle-Hadron > %3.2f\n", fDeltaPhiMinCut) ;
4151 printf("Phi trigger particle-UeHadron < %3.2f\n", fUeDeltaPhiMaxCut) ;
4152 printf("Phi trigger particle-UeHadron > %3.2f\n", fUeDeltaPhiMinCut) ;
4153 printf("Isolated Trigger? %d\n" , fSelectIsolated) ;
4154 printf("Several UE? %d\n" , fMakeSeveralUE) ;
4155 printf("Name of AOD Pi0 Branch %s \n", fPi0AODBranchName.Data());
4156 printf("Do Decay-hadron correlation ? %d\n", fPi0Trigger) ;
4157 printf("Select absolute leading for cluster triggers ? %d or Near Side %d\n",
4158 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
4159 printf("Trigger pt bins %d\n", fNAssocPtBins) ;
4160 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
4161 printf("\t bin %d = [%2.1f,%2.1f]\n", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
4166 //____________________________________________________________
4167 void AliAnaParticleHadronCorrelation::SetNAssocPtBins(Int_t n)
4169 // Set number of bins
4179 printf("n = larger than 19 or too small, set to 19 \n");
4184 //______________________________________________________________________________
4185 void AliAnaParticleHadronCorrelation::SetAssocPtBinLimit(Int_t ibin, Float_t pt)
4187 // Set the list of limits for the trigger pt bins
4189 if(ibin <= fNAssocPtBins || ibin >= 0)
4191 fAssocPtBinLimit[ibin] = pt ;
4195 printf("AliAnaParticleHadronCorrelation::SetAssocPtBinLimit() - bin number too large %d > %d or small, nothing done\n", ibin, fNAssocPtBins) ;