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 fSelectLeadingHadronAngle(0), fFillLeadHadOppositeHisto(0),
73 fMinLeadHadPhi(0), fMaxLeadHadPhi(0),
74 fMinLeadHadPt(0), fMaxLeadHadPt(0),
75 fFillEtaGapsHisto(1), fFillMomImbalancePtAssocBinsHisto(0),
76 fMCGenTypeMin(0), fMCGenTypeMax(0),
77 fTrackVector(), fMomentum(),
78 fDecayMom1(), fDecayMom2(),
80 fhPtTriggerInput(0), fhPtTriggerSSCut(0),
81 fhPtTriggerIsoCut(0), fhPtTriggerFidCut(0),
82 fhPtTrigger(0), fhPtTriggerVtxBC0(0),
83 fhPtTriggerVzBin(0), fhPtTriggerBin(0),
84 fhPhiTrigger(0), fhEtaTrigger(0),
86 fhPtDecayTrigger(), fhPtDecayTriggerMC(),
87 fhPtTriggerCentrality(0), fhPtTriggerEventPlane(0),
88 fhTriggerEventPlaneCentrality(0),
89 fhPtTriggerMixed(0), fhPtTriggerMixedVzBin(0), fhPtTriggerMixedBin(0),
90 fhPhiTriggerMixed(0), fhEtaTriggerMixed(0),
91 fhPtLeadingOppositeHadron(0), fhPtDiffPhiLeadingOppositeHadron(0), fhPtDiffEtaLeadingOppositeHadron(0),
92 fhPtNoLeadingOppositeHadron(0), fhEtaPhiNoLeadingOppositeHadron(0),
93 fhDeltaPhiDeltaEtaCharged(0),
94 fhPhiCharged(0), fhEtaCharged(0),
95 fhDeltaPhiCharged(0), fhDeltaEtaCharged(0),
96 fhDeltaPhiChargedPt(0), fhDeltaPhiUeChargedPt(0),
98 fhXECharged(0), fhXECharged_Cone2(0), fhXEUeCharged(0),
99 fhXEPosCharged(0), fhXENegCharged(0),
100 fhPtHbpXECharged(0), fhPtHbpXECharged_Cone2(0), fhPtHbpXEUeCharged(0),
101 fhZTCharged(0), fhZTUeCharged(0),
102 fhZTPosCharged(0), fhZTNegCharged(0),
103 fhPtHbpZTCharged(0), fhPtHbpZTUeCharged(0),
104 fhXEChargedMC(), fhDeltaPhiChargedMC(),
105 fhDeltaPhiDeltaEtaChargedPtA3GeV(0),
106 fhDeltaPhiChargedPtA3GeV(0), fhDeltaEtaChargedPtA3GeV(0),
108 fhDeltaPhiChargedPileUp(), fhDeltaEtaChargedPileUp(),
109 fhDeltaPhiChargedPtA3GeVPileUp(), fhDeltaEtaChargedPtA3GeVPileUp(),
110 fhXEChargedPileUp(), fhXEUeChargedPileUp(),
111 fhZTChargedPileUp(), fhZTUeChargedPileUp(),
112 fhPtTrigChargedPileUp(),
113 fhDeltaPhiChargedOtherBC(), fhDeltaPhiChargedPtA3GeVOtherBC(),
114 fhXEChargedOtherBC(), fhXEUeChargedOtherBC(),
115 fhZTChargedOtherBC(), fhZTUeChargedOtherBC(),
116 fhPtTrigChargedOtherBC(),
117 fhDeltaPhiChargedBC0(), fhDeltaPhiChargedPtA3GeVBC0(),
118 fhXEChargedBC0(), fhXEUeChargedBC0(),
119 fhZTChargedBC0(), fhZTUeChargedBC0(),
120 fhPtTrigChargedBC0(),
121 fhDeltaPhiChargedVtxBC0(), fhDeltaPhiChargedPtA3GeVVtxBC0(),
122 fhXEChargedVtxBC0(), fhXEUeChargedVtxBC0(),
123 fhZTChargedVtxBC0(), fhZTUeChargedVtxBC0(),
124 fhPtTrigChargedVtxBC0(),
125 fhDeltaPhiUeLeftCharged(0),
126 fhDeltaPhiUeLeftUpCharged(0), fhDeltaPhiUeRightUpCharged(0),
127 fhDeltaPhiUeLeftDownCharged(0), fhDeltaPhiUeRightDownCharged(0),
128 fhXEUeLeftCharged(0),
129 fhXEUeLeftUpCharged(0), fhXEUeRightUpCharged(0),
130 fhXEUeLeftDownCharged(0), fhXEUeRightDownCharged(0),
131 fhPtHbpXEUeLeftCharged(0), fhZTUeLeftCharged(0),
132 fhPtHbpZTUeLeftCharged(0),
133 fhPtTrigPout(0), fhPtTrigCharged(0),
134 fhDeltaPhiChargedMult(0x0), fhDeltaEtaChargedMult(0x0),
135 fhXEMult(0x0), fhXEUeMult(0x0),
136 fhZTMult(0x0), fhZTUeMult(0x0),
137 fhAssocPtBkg(0), fhDeltaPhiDeltaEtaAssocPtBin(0),
138 fhDeltaPhiAssocPtBin(0),
139 fhDeltaPhiAssocPtBinDEta08(0), fhDeltaPhiAssocPtBinDEta0(0),
140 fhDeltaPhiAssocPtBinHMPID(0), fhDeltaPhiAssocPtBinHMPIDAcc(0),
141 fhDeltaPhiBradAssocPtBin(0), fhDeltaPhiBrad(0),
142 fhXEAssocPtBin(0), fhZTAssocPtBin(0),
143 fhXEVZ(0), fhZTVZ(0),
144 fhDeltaPhiDeltaEtaNeutral(0),
145 fhPhiNeutral(0), fhEtaNeutral(0),
146 fhDeltaPhiNeutral(0), fhDeltaEtaNeutral(0),
147 fhDeltaPhiNeutralPt(0), fhDeltaPhiUeNeutralPt(0),
148 fhXENeutral(0), fhXEUeNeutral(0),
149 fhPtHbpXENeutral(0), fhPtHbpXEUeNeutral(0),
150 fhZTNeutral(0), fhZTUeNeutral(0),
151 fhPtHbpZTNeutral(0), fhPtHbpZTUeNeutral(0),
152 fhDeltaPhiUeLeftNeutral(0), fhXEUeLeftNeutral(0),
153 fhPtHbpXEUeLeftNeutral(0), fhZTUeLeftNeutral(0),
154 fhPtHbpZTUeLeftNeutral(0), fhPtPi0DecayRatio(0),
155 fhDeltaPhiPi0DecayCharged(0), fhXEPi0DecayCharged(0), fhZTPi0DecayCharged(0),
156 fhDeltaPhiPi0DecayNeutral(0), fhXEPi0DecayNeutral(0), fhZTPi0DecayNeutral(0),
157 fhDeltaPhiDecayCharged(), fhXEDecayCharged(), fhZTDecayCharged(),
158 fhDeltaPhiDecayChargedAssocPtBin(),
159 fhMCPtTrigger(), fhMCPhiTrigger(), fhMCEtaTrigger(),
160 fhMCPtTriggerNotLeading(), fhMCPhiTriggerNotLeading(), fhMCEtaTriggerNotLeading(),
161 fhMCEtaCharged(), fhMCPhiCharged(),
162 fhMCDeltaEtaCharged(), fhMCDeltaPhiCharged(),
163 fhMCDeltaPhiDeltaEtaCharged(), fhMCDeltaPhiChargedPt(),
164 fhMCPtXECharged(), fhMCPtXEUeCharged(),
165 fhMCPtXEUeLeftCharged(),
166 fhMCPtHbpXECharged(), fhMCPtHbpXEUeCharged(),
167 fhMCPtHbpXEUeLeftCharged(),
169 fhMCPtZTCharged(), fhMCPtZTUeCharged(),
170 fhMCPtZTUeLeftCharged(),
171 fhMCPtHbpZTCharged(), fhMCPtHbpZTUeCharged(),
172 fhMCPtHbpZTUeLeftCharged(),
173 fhMCPtTrigPout(), fhMCPtAssocDeltaPhi(),
175 fhNEventsTrigger(0), fhNtracksMB(0), fhNclustersMB(0),
176 fhMixDeltaPhiCharged(0), fhMixDeltaPhiDeltaEtaCharged(0),
177 fhMixXECharged(0), fhMixXEUeCharged(0), fhMixHbpXECharged(0),
178 fhMixDeltaPhiChargedAssocPtBin(),
179 fhMixDeltaPhiChargedAssocPtBinDEta08(),
180 fhMixDeltaPhiChargedAssocPtBinDEta0(),
181 fhMixDeltaPhiDeltaEtaChargedAssocPtBin(),
182 fhEventBin(0), fhEventMixBin(0), fhEventMBBin(0)
186 //Initialize parameters
189 for(Int_t i = 0; i < fgkNmcTypes; i++)
191 fhPtTriggerMC[i] = 0;
192 fhXEChargedMC[i] = 0;
193 fhDeltaPhiChargedMC[i] = 0;
194 for(Int_t ib = 0; ib < 4; ib++) fhPtDecayTriggerMC[ib][i] = 0;
197 for(Int_t ib = 0; ib < 4; ib++) fhPtDecayTrigger[ib] = 0;
199 for(Int_t i = 0; i < 7; i++)
201 fhPtTriggerPileUp [i] = 0 ;
202 fhDeltaPhiChargedPileUp [i] = 0 ; fhDeltaEtaChargedPileUp [i] = 0 ;
203 fhXEChargedPileUp [i] = 0 ; fhXEUeChargedPileUp [i] = 0 ;
204 fhZTChargedPileUp [i] = 0 ; fhZTUeChargedPileUp [i] = 0 ;
205 fhPtTrigChargedPileUp [i] = 0 ;
206 fhDeltaPhiChargedPtA3GeVPileUp[i] = 0 ; fhDeltaEtaChargedPtA3GeVPileUp[i] = 0 ;
211 //_________________________________________________________________
212 AliAnaParticleHadronCorrelation::~AliAnaParticleHadronCorrelation()
214 // Remove event containers
218 if(fListMixTrackEvents)
220 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
222 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
224 for(Int_t irp=0; irp<GetNRPBin(); irp++)
226 Int_t bin = GetEventMixBin(ic, iz, irp);
227 fListMixTrackEvents[bin]->Delete() ;
228 delete fListMixTrackEvents[bin] ;
234 delete[] fListMixTrackEvents;
236 if(fListMixCaloEvents)
238 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
240 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
242 for(Int_t irp=0; irp<GetNRPBin(); irp++)
244 Int_t bin = GetEventMixBin(ic, iz, irp);
245 fListMixCaloEvents[bin]->Delete() ;
246 delete fListMixCaloEvents[bin] ;
252 delete[] fListMixCaloEvents;
257 //__________________________________________________________________________________________________________________________________________
258 void AliAnaParticleHadronCorrelation::FillChargedAngularCorrelationHistograms(Float_t ptAssoc, Float_t ptTrig, Int_t bin,
259 Float_t phiAssoc, Float_t phiTrig, Float_t deltaPhi,
260 Float_t etaAssoc, Float_t etaTrig,
261 Int_t decayTag, Float_t hmpidSignal, Int_t outTOF,
262 Int_t cen, Int_t mcTag)
264 // Fill angular correlation related histograms
266 Float_t deltaEta = etaTrig-etaAssoc;
267 Float_t deltaPhiOrg = phiTrig-phiAssoc;
269 fhEtaCharged ->Fill(ptAssoc,etaAssoc);
270 fhPhiCharged ->Fill(ptAssoc,phiAssoc);
271 fhDeltaEtaCharged ->Fill(ptTrig ,deltaEta);
272 fhDeltaPhiCharged ->Fill(ptTrig ,deltaPhi);
273 fhDeltaPhiChargedPt->Fill(ptAssoc, deltaPhi);
274 fhDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
278 fhDeltaEtaChargedPtA3GeV ->Fill(ptTrig ,deltaEta);
279 fhDeltaPhiChargedPtA3GeV ->Fill(ptTrig ,deltaPhi);
280 fhDeltaPhiDeltaEtaChargedPtA3GeV->Fill(deltaPhi, deltaEta);
285 if(IsPileUpAnalysisOn())
289 fhDeltaPhiChargedOtherBC->Fill(ptTrig ,deltaPhi) ;
290 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVOtherBC->Fill(ptTrig ,deltaPhi) ;
294 fhDeltaPhiChargedBC0->Fill(ptTrig ,deltaPhi) ;
295 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVBC0->Fill(ptTrig ,deltaPhi) ;
298 Int_t vtxBC = GetReader()->GetVertexBC();
299 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
301 fhDeltaPhiChargedVtxBC0->Fill(ptTrig ,deltaPhi) ;
302 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVVtxBC0->Fill(ptTrig ,deltaPhi) ;
305 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
306 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
307 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
308 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
309 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
310 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
311 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
315 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
316 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
317 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
318 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
319 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
320 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
321 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
327 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
328 fhDeltaPhiChargedMC[mcIndex]->Fill(ptTrig , deltaPhi);
329 if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
331 // check index in GetMCTagIndexHistogram
332 if ( mcIndex == 2 ) fhDeltaPhiChargedMC[8]->Fill(ptTrig , deltaPhi); // pi0 decay
333 else if( mcIndex == 4 ) fhDeltaPhiChargedMC[9]->Fill(ptTrig , deltaPhi); // eta decay
337 if(fDecayTrigger && decayTag > 0)
339 for(Int_t ibit = 0; ibit<fNDecayBits; ibit++)
341 if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit])) fhDeltaPhiDecayCharged[ibit]->Fill(ptTrig,deltaPhi);
345 Double_t dphiBrad = -100;
348 dphiBrad = atan2(sin(deltaPhiOrg), cos(deltaPhiOrg))/TMath::Pi();//-1 to 1
349 if( TMath::Abs(dphiBrad) > 0.325 && TMath::Abs(dphiBrad) < 0.475 ) //Hardcoded values, BAD, FIXME
351 fhAssocPtBkg->Fill(ptTrig, ptAssoc);
354 if( dphiBrad < -1./3 ) dphiBrad += 2;
355 fhDeltaPhiBrad->Fill(ptTrig, dphiBrad);
358 // Fill histograms in bins of associated particle pT
361 fhDeltaPhiDeltaEtaAssocPtBin [bin]->Fill(deltaPhi,deltaEta);
363 fhDeltaPhiAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
365 if(fFillEtaGapsHisto)
367 if(TMath::Abs(deltaEta)> 0.8)
368 fhDeltaPhiAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
370 if(TMath::Abs(deltaEta)< 0.01)
371 fhDeltaPhiAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
375 fhDeltaPhiBradAssocPtBin [bin]->Fill(ptTrig, dphiBrad);
377 if(fDecayTrigger && decayTag > 0 && fNDecayBits > 0 &&
378 GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[0]))
379 fhDeltaPhiDecayChargedAssocPtBin[bin]->Fill(ptTrig, deltaPhi);
381 if(fHMPIDCorrelation)
383 if( hmpidSignal > 0 )
385 //printf("Track pt %f with HMPID signal %f \n",pt,hmpidSignal);
386 fhDeltaPhiAssocPtBinHMPID[bin]->Fill(ptTrig, deltaPhi);
389 if(phiAssoc > 5*TMath::DegToRad() && phiAssoc < 20*TMath::DegToRad())
391 //printf("Track pt %f in HMPID acceptance phi %f \n ",pt,phi*TMath::RadToDeg() );
392 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->Fill(ptTrig, deltaPhi);
397 //fill different multiplicity/centrality histogram
398 if(IsHighMultiplicityAnalysisOn() && cen >= 0 && cen < GetNCentrBin())
400 fhDeltaPhiChargedMult[cen]->Fill(ptTrig,deltaPhi);
401 fhDeltaEtaChargedMult[cen]->Fill(ptTrig,deltaEta);
405 //___________________________________________________________________________________________________________________________________
406 Bool_t AliAnaParticleHadronCorrelation::FillChargedMCCorrelationHistograms(Float_t mcAssocPt, Float_t mcAssocPhi, Float_t mcAssocEta,
407 Float_t mcTrigPt, Float_t mcTrigPhi, Float_t mcTrigEta,
408 Int_t histoIndex, Bool_t lostDecayPair)
410 // Fill MC histograms independently of AOD or ESD
414 // In case we requested the trigger to be a leading particle,
415 // check if this is true at the MC level.
416 // Not sure if it is correct to skip or not skip this.
418 if( fMakeAbsoluteLeading && mcAssocPt > mcTrigPt ) lead = kFALSE; // skip event
420 // Skip this event if near side associated particle pt larger than trigger
421 if( mcAssocPhi < 0 ) mcAssocPhi+=TMath::TwoPi();
423 Float_t mcdeltaPhi= mcTrigPhi-mcAssocPhi;
424 if(mcdeltaPhi <= -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
425 if(mcdeltaPhi > 3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
427 if( fMakeNearSideLeading)
429 if( mcAssocPt > mcTrigPt && mcdeltaPhi < TMath::PiOver2() ) lead = kFALSE; // skip event
433 // Select only hadrons in pt range
434 if ( mcAssocPt < fMinAssocPt || mcAssocPt > fMaxAssocPt ) return lead ; // exclude but continue
435 if ( mcAssocPt < GetReader()->GetCTSPtMin()) return lead ;
439 // Remove trigger itself for correlation when use charged triggers
440 if(TMath::Abs(mcAssocPt -mcTrigPt ) < 1e-6 &&
442 TMath::Abs(mcAssocEta-mcTrigEta) < 1e-6) return lead ; // exclude but continue
444 Float_t mcxE =-mcAssocPt/mcTrigPt*TMath::Cos(mcdeltaPhi);// -(mcAssocPx*pxprim+mcAssocPy*pyprim)/(mcTrigPt*mcTrigPt);
445 Float_t mchbpXE =-100 ;
446 if(mcxE > 0 ) mchbpXE = TMath::Log(1./mcxE);
448 Float_t mczT = mcAssocPt/mcTrigPt ;
449 Float_t mchbpZT =-100 ;
450 if(mczT > 0 ) mchbpZT = TMath::Log(1./mczT);
452 Double_t mcpout = mcAssocPt*TMath::Sin(mcdeltaPhi) ;
454 AliDebug(1,Form("Charged hadron: track Pt %f, track Phi %f, phi trigger %f. Cuts: delta phi %2.2f < %2.2f < %2.2f",
455 mcAssocPt,mcAssocPhi, mcTrigPhi,fDeltaPhiMinCut, mcdeltaPhi, fDeltaPhiMaxCut));
459 fhMCEtaCharged [histoIndex]->Fill(mcAssocPt, mcAssocEta);
460 fhMCPhiCharged [histoIndex]->Fill(mcAssocPt, mcAssocPhi);
461 fhMCDeltaEtaCharged[histoIndex]->Fill(mcTrigPt , mcTrigEta-mcAssocEta);
462 fhMCDeltaPhiCharged[histoIndex]->Fill(mcTrigPt , mcdeltaPhi);
463 fhMCPtAssocDeltaPhi[histoIndex]->Fill(mcAssocPt, mcdeltaPhi);
465 fhMCDeltaPhiDeltaEtaCharged[histoIndex]->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
467 //delta phi cut for correlation
468 if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
470 fhMCDeltaPhiChargedPt[histoIndex]->Fill(mcAssocPt,mcdeltaPhi);
471 fhMCPtXECharged [histoIndex]->Fill(mcTrigPt, mcxE);
472 fhMCPtHbpXECharged [histoIndex]->Fill(mcTrigPt, mchbpXE);
473 fhMCPtZTCharged [histoIndex]->Fill(mcTrigPt, mczT);
474 fhMCPtHbpZTCharged [histoIndex]->Fill(mcTrigPt, mchbpZT);
475 fhMCPtTrigPout [histoIndex]->Fill(mcTrigPt, mcpout) ;
480 // check index in GetMCTagIndexHistogram
481 if(histoIndex == 2 && 8 >= fMCGenTypeMin && 8 <= fMCGenTypeMax )
484 fhMCEtaCharged [8]->Fill(mcAssocPt, mcAssocEta);
485 fhMCPhiCharged [8]->Fill(mcAssocPt, mcAssocPhi);
486 fhMCDeltaEtaCharged[8]->Fill(mcTrigPt , mcTrigEta-mcAssocEta);
487 fhMCDeltaPhiCharged[8]->Fill(mcTrigPt , mcdeltaPhi);
488 fhMCPtAssocDeltaPhi[8]->Fill(mcAssocPt, mcdeltaPhi);
490 fhMCDeltaPhiDeltaEtaCharged[8]->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
492 //delta phi cut for correlation
493 if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
495 fhMCDeltaPhiChargedPt[8]->Fill(mcAssocPt,mcdeltaPhi);
496 fhMCPtXECharged [8]->Fill(mcTrigPt, mcxE);
497 fhMCPtHbpXECharged [8]->Fill(mcTrigPt, mchbpXE);
498 fhMCPtZTCharged [8]->Fill(mcTrigPt, mczT);
499 fhMCPtHbpZTCharged [8]->Fill(mcTrigPt, mchbpZT);
500 fhMCPtTrigPout [8]->Fill(mcTrigPt, mcpout) ;
502 } // pi0 decay lost pair
503 if(histoIndex == 4 && 9 >= fMCGenTypeMin && 9 <= fMCGenTypeMax )
506 fhMCEtaCharged [9]->Fill(mcAssocPt, mcAssocEta);
507 fhMCPhiCharged [9]->Fill(mcAssocPt, mcAssocPhi);
508 fhMCDeltaEtaCharged[9]->Fill(mcTrigPt , mcTrigEta-mcAssocEta);
509 fhMCDeltaPhiCharged[9]->Fill(mcTrigPt , mcdeltaPhi);
510 fhMCPtAssocDeltaPhi[9]->Fill(mcAssocPt, mcdeltaPhi);
512 fhMCDeltaPhiDeltaEtaCharged[9]->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
514 //delta phi cut for correlation
515 if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
517 fhMCDeltaPhiChargedPt[9]->Fill(mcAssocPt,mcdeltaPhi);
518 fhMCPtXECharged [9]->Fill(mcTrigPt, mcxE);
519 fhMCPtHbpXECharged [9]->Fill(mcTrigPt, mchbpXE);
520 fhMCPtZTCharged [9]->Fill(mcTrigPt, mczT);
521 fhMCPtHbpZTCharged [9]->Fill(mcTrigPt, mchbpZT);
522 fhMCPtTrigPout [9]->Fill(mcTrigPt, mcpout) ;
524 } // eta decay lost pair
529 if ( (mcdeltaPhi > fUeDeltaPhiMinCut) && (mcdeltaPhi < fUeDeltaPhiMaxCut) )
531 //Double_t randomphi = gRandom->Uniform(TMath::Pi()/2,3*TMath::Pi()/2);
532 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
533 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
534 Double_t mcUezT = mcAssocPt/mcTrigPt;
537 AliWarning(Form("Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
538 mcUexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
540 fhMCPtXEUeCharged[histoIndex]->Fill(mcTrigPt,mcUexE);
541 if(mcUexE > 0) fhMCPtHbpXEUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
543 fhMCPtZTUeCharged[histoIndex]->Fill(mcTrigPt,mcUezT);
544 if(mcUezT > 0) fhMCPtHbpZTUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
546 fhMCUePart[histoIndex]->Fill(mcTrigPt);
550 // check index in GetMCTagIndexHistogram
551 if(histoIndex == 2 && 8 >= fMCGenTypeMin && 8 <= fMCGenTypeMax )
554 fhMCPtXEUeCharged[8]->Fill(mcTrigPt,mcUexE);
555 if(mcUexE > 0) fhMCPtHbpXEUeCharged[8]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
557 fhMCPtZTUeCharged[8]->Fill(mcTrigPt,mcUezT);
558 if(mcUezT > 0) fhMCPtHbpZTUeCharged[8]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
560 fhMCUePart[8]->Fill(mcTrigPt);
562 else if(histoIndex == 4 && 9 >= fMCGenTypeMin && 9 <= fMCGenTypeMax )
565 fhMCPtXEUeCharged[9]->Fill(mcTrigPt,mcUexE);
566 if(mcUexE > 0) fhMCPtHbpXEUeCharged[9]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
568 fhMCPtZTUeCharged[9]->Fill(mcTrigPt,mcUezT);
569 if(mcUezT > 0) fhMCPtHbpZTUeCharged[9]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
571 fhMCUePart[9]->Fill(mcTrigPt);
579 if((mcdeltaPhi<-fUeDeltaPhiMinCut) || (mcdeltaPhi >2*fUeDeltaPhiMaxCut))
581 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
582 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
583 Double_t mcUezT = mcAssocPt/mcTrigPt;
586 AliWarning(Form("Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
587 mcUexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
589 fhMCPtXEUeLeftCharged[histoIndex]->Fill(mcTrigPt,mcUexE);
590 if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
592 fhMCPtZTUeLeftCharged[histoIndex]->Fill(mcTrigPt,mcUezT);
593 if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
597 // check index in GetMCTagIndexHistogram
598 if(histoIndex == 2 && 8 >= fMCGenTypeMin && 8 <= fMCGenTypeMax )
601 fhMCPtXEUeLeftCharged[8]->Fill(mcTrigPt,mcUexE);
602 if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged[8]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
604 fhMCPtZTUeLeftCharged[8]->Fill(mcTrigPt,mcUezT);
605 if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[8]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
607 else if(histoIndex == 4 && 9 >= fMCGenTypeMin && 9 <= fMCGenTypeMax )
610 fhMCPtXEUeLeftCharged[9]->Fill(mcTrigPt,mcUexE);
611 if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged[9]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
613 fhMCPtZTUeLeftCharged[9]->Fill(mcTrigPt,mcUezT);
614 if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[9]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
623 //___________________________________________________________________________________________________________________
624 void AliAnaParticleHadronCorrelation::FillChargedMomentumImbalanceHistograms(Float_t ptTrig, Float_t ptAssoc,
626 Int_t cen, Int_t charge,
627 Int_t bin, Int_t decayTag,
628 Int_t outTOF, Int_t mcTag)
631 // Fill mostly momentum imbalance related histograms
633 Float_t zT = ptAssoc/ptTrig ;
634 Float_t xE =-ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
635 Float_t pout = ptAssoc*TMath::Sin(deltaPhi) ;
638 AliWarning(Form("Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
639 xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
641 Float_t hbpXE = -100;
642 Float_t hbpZT = -100;
644 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
645 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
647 fhXECharged ->Fill(ptTrig , xE);
648 fhPtHbpXECharged ->Fill(ptTrig , hbpXE);
649 fhZTCharged ->Fill(ptTrig , zT);
650 fhPtHbpZTCharged ->Fill(ptTrig , hbpZT);
651 fhPtTrigPout ->Fill(ptTrig , pout) ;
652 fhPtTrigCharged ->Fill(ptTrig , ptAssoc) ;
653 if((deltaPhi > 5*TMath::Pi()/6.) && (deltaPhi < 7*TMath::Pi()/6.))
655 fhXECharged_Cone2 ->Fill(ptTrig , xE);
656 fhPtHbpXECharged_Cone2 ->Fill(ptTrig , hbpXE);
662 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
663 fhXEChargedMC[mcIndex]->Fill(ptTrig , xE);
664 if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
666 // check index in GetMCTagIndexHistogram
667 if ( mcIndex == 2 ) fhXEChargedMC[8]->Fill(ptTrig , xE); // pi0 decay
668 else if ( mcIndex == 4 ) fhXEChargedMC[9]->Fill(ptTrig , xE); // eta decay
673 if(IsPileUpAnalysisOn())
677 fhXEChargedOtherBC ->Fill(ptTrig,xE);
678 fhZTChargedOtherBC ->Fill(ptTrig,zT);
679 fhPtTrigChargedOtherBC->Fill(ptTrig,ptAssoc);
683 fhXEChargedBC0 ->Fill(ptTrig,xE);
684 fhZTChargedBC0 ->Fill(ptTrig,zT);
685 fhPtTrigChargedBC0->Fill(ptTrig,ptAssoc);
688 Int_t vtxBC = GetReader()->GetVertexBC();
689 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
691 fhXEChargedVtxBC0 ->Fill(ptTrig,xE);
692 fhZTChargedVtxBC0 ->Fill(ptTrig,zT);
693 fhPtTrigChargedVtxBC0->Fill(ptTrig,ptAssoc);
696 if(GetReader()->IsPileUpFromSPD()) { fhXEChargedPileUp[0]->Fill(ptTrig,xE); fhZTChargedPileUp[0]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[0]->Fill(ptTrig,ptAssoc); }
697 if(GetReader()->IsPileUpFromEMCal()) { fhXEChargedPileUp[1]->Fill(ptTrig,xE); fhZTChargedPileUp[1]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[1]->Fill(ptTrig,ptAssoc); }
698 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEChargedPileUp[2]->Fill(ptTrig,xE); fhZTChargedPileUp[2]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[2]->Fill(ptTrig,ptAssoc); }
699 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEChargedPileUp[3]->Fill(ptTrig,xE); fhZTChargedPileUp[3]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[3]->Fill(ptTrig,ptAssoc); }
700 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEChargedPileUp[4]->Fill(ptTrig,xE); fhZTChargedPileUp[4]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[4]->Fill(ptTrig,ptAssoc); }
701 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEChargedPileUp[5]->Fill(ptTrig,xE); fhZTChargedPileUp[5]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[5]->Fill(ptTrig,ptAssoc); }
702 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEChargedPileUp[6]->Fill(ptTrig,xE); fhZTChargedPileUp[6]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[6]->Fill(ptTrig,ptAssoc); }
705 if(fDecayTrigger && decayTag > 0)
707 for(Int_t ibit = 0; ibit<fNDecayBits; ibit++)
709 if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit]))
711 fhXEDecayCharged[ibit]->Fill(ptTrig,xE);
712 fhZTDecayCharged[ibit]->Fill(ptTrig,zT);
715 } // photon decay pi0/eta trigger
717 if(bin >= 0 && fFillMomImbalancePtAssocBinsHisto)//away side
719 fhXEAssocPtBin[bin]->Fill(ptTrig, xE) ;
720 fhZTAssocPtBin[bin]->Fill(ptTrig, zT) ;
725 Int_t vz = GetEventVzBin();
726 fhXEVZ[vz]->Fill(ptTrig, xE) ;
727 fhZTVZ[vz]->Fill(ptTrig, zT) ;
732 fhXEPosCharged->Fill(ptTrig,xE) ;
733 fhZTPosCharged->Fill(ptTrig,zT) ;
737 fhXENegCharged->Fill(ptTrig,xE) ;
738 fhZTNegCharged->Fill(ptTrig,zT) ;
741 //fill different multiplicity/centrality histogram
742 if(IsHighMultiplicityAnalysisOn() && cen >= 0 && cen < GetNCentrBin())
744 fhXEMult[cen]->Fill(ptTrig,xE);
745 fhZTMult[cen]->Fill(ptTrig,zT);
746 } //multiplicity/centrality events selection
749 //_______________________________________________________________________________________________________________________
750 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventHistograms(Float_t ptTrig, Float_t ptAssoc,
751 Float_t deltaPhi, Int_t cen, Int_t outTOF)
753 // Fill underlying event histograms
755 fhUePart->Fill(ptTrig);
757 fhDeltaPhiUeChargedPt->Fill(ptAssoc,deltaPhi);
759 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
760 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
761 Double_t uezT = ptAssoc/ptTrig;
764 AliWarning(Form("Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
765 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
767 fhXEUeCharged->Fill(ptTrig,uexE);
768 if(uexE > 0) fhPtHbpXEUeCharged->Fill(ptTrig,TMath::Log(1/uexE));
770 fhZTUeCharged->Fill(ptTrig,uezT);
771 if(uezT > 0) fhPtHbpZTUeCharged->Fill(ptTrig,TMath::Log(1/uezT));
775 if(IsPileUpAnalysisOn())
779 fhXEUeChargedOtherBC->Fill(ptTrig,uexE);
780 fhZTUeChargedOtherBC->Fill(ptTrig,uezT);
784 fhXEUeChargedBC0->Fill(ptTrig,uexE);
785 fhZTUeChargedBC0->Fill(ptTrig,uezT);
788 Int_t vtxBC = GetReader()->GetVertexBC();
789 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
791 fhXEUeChargedVtxBC0->Fill(ptTrig,uexE);
792 fhZTUeChargedVtxBC0->Fill(ptTrig,uezT);
795 if(GetReader()->IsPileUpFromSPD()) { fhXEUeChargedPileUp[0]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[0]->Fill(ptTrig,uezT);}
796 if(GetReader()->IsPileUpFromEMCal()) { fhXEUeChargedPileUp[1]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[1]->Fill(ptTrig,uezT);}
797 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEUeChargedPileUp[2]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[2]->Fill(ptTrig,uezT);}
798 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEUeChargedPileUp[3]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[3]->Fill(ptTrig,uezT);}
799 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEUeChargedPileUp[4]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[4]->Fill(ptTrig,uezT);}
800 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEUeChargedPileUp[5]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[5]->Fill(ptTrig,uezT);}
801 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEUeChargedPileUp[6]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[6]->Fill(ptTrig,uezT);}
804 //fill different multiplicity/centrality histogram
805 if(IsHighMultiplicityAnalysisOn() && cen >= 0 && cen < GetNCentrBin())
807 fhXEUeMult[cen]->Fill(ptTrig,uexE);
808 fhZTUeMult[cen]->Fill(ptTrig,uezT);
812 //_____________________________________________________________________________________________________
813 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventSidesHistograms(Float_t ptTrig,
817 // Fill underlying event histograms to the left and right of trigger
818 // Right cone is the default UE.
820 if((deltaPhi<-fUeDeltaPhiMinCut) || (deltaPhi >2*fUeDeltaPhiMaxCut))
822 fhDeltaPhiUeLeftCharged->Fill(ptAssoc,deltaPhi);
823 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
824 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
825 Double_t uezT = ptAssoc/ptTrig;
828 AliWarning(Form("Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
829 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
831 fhXEUeLeftCharged->Fill(ptTrig,uexE);
832 if(uexE > 0) fhPtHbpXEUeLeftCharged->Fill(ptTrig,TMath::Log(1/uexE));
834 fhZTUeLeftCharged->Fill(ptTrig,uezT);
835 if(uezT > 0) fhPtHbpZTUeLeftCharged->Fill(ptTrig,TMath::Log(1/uezT));
837 fhDeltaPhiUeLeftCharged->Fill(ptAssoc, deltaPhi);
840 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-TMath::Pi()/2))
842 fhDeltaPhiUeLeftDownCharged->Fill(ptAssoc,deltaPhi);
843 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
844 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
847 AliWarning(Form("Careful!!, negative xE %2.2f for left-down UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
848 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
850 fhXEUeLeftDownCharged->Fill(ptTrig,uexE);
853 if((deltaPhi>2*fUeDeltaPhiMaxCut) && (deltaPhi <3*TMath::Pi()/2))
855 fhDeltaPhiUeLeftUpCharged->Fill(ptAssoc,deltaPhi);
856 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
857 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
860 AliWarning(Form("Careful!!, negative xE %2.2f for left-up UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
861 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
863 fhXEUeLeftUpCharged->Fill(ptTrig,uexE);
866 if((deltaPhi > TMath::Pi()/2) && (deltaPhi < fUeDeltaPhiMaxCut))
868 fhDeltaPhiUeRightUpCharged->Fill(ptAssoc,deltaPhi);
869 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
870 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
873 AliWarning(Form("Careful!!, negative xE %2.2f for right-up UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
874 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
876 fhXEUeRightUpCharged->Fill(ptTrig,uexE);
879 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < TMath::Pi()/2))
881 fhDeltaPhiUeRightDownCharged->Fill(ptAssoc,deltaPhi);
882 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
883 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
886 AliWarning(Form("Careful!!, negative xE %2.2f for right-down UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
887 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
889 fhXEUeRightDownCharged->Fill(ptTrig,uexE);
893 //_____________________________________________________________________________________________________________________________________
894 void AliAnaParticleHadronCorrelation::FillDecayPhotonCorrelationHistograms(Float_t ptAssoc, Float_t phiAssoc, Bool_t bChargedOrNeutral)
896 // Do correlation with decay photons of triggered pi0 or eta
898 // Calculate the correlation parameters
899 Float_t ptDecay1 = fDecayMom1.Pt();
900 Float_t ptDecay2 = fDecayMom2.Pt();
902 Float_t zTDecay1 = -100, zTDecay2 = -100;
903 if(ptDecay1 > 0) zTDecay1 = ptAssoc/ptDecay1 ;
904 if(ptDecay2 > 0) zTDecay2 = ptAssoc/ptDecay2 ;
906 Float_t deltaPhiDecay1 = fDecayMom1.Phi()-phiAssoc;
907 if(deltaPhiDecay1< -TMath::PiOver2()) deltaPhiDecay1+=TMath::TwoPi();
908 if(deltaPhiDecay1>3*TMath::PiOver2()) deltaPhiDecay1-=TMath::TwoPi();
910 Float_t deltaPhiDecay2 = fDecayMom2.Phi()-phiAssoc;
911 if(deltaPhiDecay2< -TMath::PiOver2()) deltaPhiDecay2+=TMath::TwoPi();
912 if(deltaPhiDecay2>3*TMath::PiOver2()) deltaPhiDecay2-=TMath::TwoPi();
914 Float_t xEDecay1 =-zTDecay1*TMath::Cos(deltaPhiDecay1); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
915 Float_t xEDecay2 =-zTDecay2*TMath::Cos(deltaPhiDecay2); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
917 if(bChargedOrNeutral) // correlate with charges
919 fhDeltaPhiPi0DecayCharged->Fill(ptDecay1, deltaPhiDecay1);
920 fhDeltaPhiPi0DecayCharged->Fill(ptDecay2, deltaPhiDecay2);
922 AliDebug(2,Form("deltaPhoton1 = %f, deltaPhoton2 = %f", deltaPhiDecay1, deltaPhiDecay2));
924 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
926 fhZTPi0DecayCharged->Fill(ptDecay1,zTDecay1);
927 fhXEPi0DecayCharged->Fill(ptDecay1,xEDecay1);
929 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
931 fhZTPi0DecayCharged->Fill(ptDecay2,zTDecay2);
932 fhXEPi0DecayCharged->Fill(ptDecay2,xEDecay2);
935 else // correlate with neutrals
937 fhDeltaPhiPi0DecayNeutral->Fill(ptDecay1, deltaPhiDecay1);
938 fhDeltaPhiPi0DecayNeutral->Fill(ptDecay2, deltaPhiDecay2);
940 AliDebug(2,Form("deltaPhoton1 = %f, deltaPhoton2 = %f", deltaPhiDecay1, deltaPhiDecay2));
942 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
944 fhZTPi0DecayNeutral->Fill(ptDecay1,zTDecay1);
945 fhXEPi0DecayNeutral->Fill(ptDecay1,xEDecay1);
947 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
949 fhZTPi0DecayNeutral->Fill(ptDecay2,zTDecay2);
950 fhXEPi0DecayNeutral->Fill(ptDecay2,xEDecay2);
955 //_____________________________________________________________________________________________________________________________
956 void AliAnaParticleHadronCorrelation::FillNeutralUnderlyingEventSidesHistograms(Float_t ptTrig, Float_t ptAssoc,
957 Float_t zT, Float_t hbpZT,
960 // Fill underlying event histograms to the left of trigger
961 // Right is the default case
963 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
965 Float_t xE =-ptAssoc/ptTrig*TMath::Cos(randomphi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
966 Float_t hbpXE = -100;
967 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
969 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-fUeDeltaPhiMaxCut))
971 fhDeltaPhiUeLeftNeutral->Fill(ptAssoc, deltaPhi);
972 fhXEUeLeftNeutral ->Fill(ptTrig , xE);
973 fhPtHbpXEUeLeftNeutral ->Fill(ptTrig , hbpXE);
974 fhZTUeLeftNeutral ->Fill(ptTrig , zT);
975 fhPtHbpZTUeLeftNeutral ->Fill(ptTrig , hbpZT);
979 //______________________________________________________
980 void AliAnaParticleHadronCorrelation::FillEventMixPool()
982 // Fill the pool with tracks or clusters if requested
984 if ( !DoOwnMix() ) return;
986 FillChargedEventMixPool();
988 // Do the cluster pool filling only if requested
989 // or in case of isolation cut using clusters in the cone.
990 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
992 if( !fFillNeutralEventMixPool && !isoCase) return;
994 FillNeutralEventMixPool();
997 //_____________________________________________________________
998 void AliAnaParticleHadronCorrelation::FillChargedEventMixPool()
1000 // Mixed event pool filling for tracks
1002 if(fUseMixStoredInReader && GetReader()->GetLastTracksMixedEvent() == GetEventNumber())
1004 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
1005 return ; // pool filled previously for another trigger
1008 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
1009 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
1011 if(!inputHandler) return ;
1013 // Do mixing only with MB event (or the chosen mask), if not skip
1014 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
1016 Int_t eventBin = GetEventMixBin();
1018 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
1019 if(eventBin < 0) return;
1021 fhEventMBBin->Fill(eventBin);
1023 TObjArray * mixEventTracks = new TObjArray;
1025 if(fUseMixStoredInReader)
1027 fListMixTrackEvents[eventBin] = GetReader()->GetListWithMixedEventsForTracks(eventBin);
1030 if(!fListMixTrackEvents[eventBin]) fListMixTrackEvents[eventBin] = new TList();
1032 //printf("%s ***** Pool Event bin : %d - nTracks %d\n",GetInputAODName().Data(),eventBin, GetCTSTracks()->GetEntriesFast());
1034 TList * pool = fListMixTrackEvents[eventBin];
1036 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
1038 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
1040 fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz());
1041 Float_t pt = fTrackVector.Pt();
1043 //Select only hadrons in pt range
1044 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
1046 AliAODPWG4Particle * mixedTrack = new AliAODPWG4Particle(track->Px(),track->Py(),track->Pz(),0);
1047 mixedTrack->SetDetectorTag(kCTS);
1048 mixedTrack->SetChargedBit(track->Charge()>0);
1049 mixEventTracks->Add(mixedTrack);
1052 fhNtracksMB->Fill(mixEventTracks->GetEntriesFast(),eventBin);
1054 //Set the event number where the last event was added, to avoid double pool filling
1055 GetReader()->SetLastTracksMixedEvent(GetEventNumber());
1057 //printf("Add event to pool with %d tracks \n ",mixEventTracks->GetEntries());
1058 pool->AddFirst(mixEventTracks);
1061 //printf("Pool size %d, max %d\n",pool->GetSize(), GetNMaxEvMix());
1063 if(pool->GetSize() > GetNMaxEvMix())
1064 {//Remove last event
1065 TClonesArray * tmp = static_cast<TClonesArray*>(pool->Last()) ;
1066 pool->RemoveLast() ;
1071 //_____________________________________________________________
1072 void AliAnaParticleHadronCorrelation::FillNeutralEventMixPool()
1074 // Mixed event pool filling for neutral clusters
1075 // Right now only for EMCAL and in isolation case
1077 //printf("FillNeutralEventMixPool for %s\n",GetInputAODName().Data());
1079 if(fUseMixStoredInReader && GetReader()->GetLastCaloMixedEvent() == GetEventNumber())
1081 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
1082 return ; // pool filled previously for another trigger
1085 TObjArray * pl = GetEMCALClusters();
1086 //if (GetAODObjArrayName.Contains("PHOS") )pl = GetPHOSClusters();
1087 //else pl = GetEMCALClusters();
1089 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
1090 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
1092 if(!inputHandler) return ;
1094 // Do mixing only with MB event (or the chosen mask), if not skip
1095 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
1097 Int_t eventBin = GetEventMixBin();
1099 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
1100 if(eventBin < 0) return;
1102 TObjArray * mixEventCalo = new TObjArray;
1104 if(fUseMixStoredInReader)
1106 fListMixCaloEvents[eventBin] = GetReader()->GetListWithMixedEventsForCalo(eventBin);
1109 if(!fListMixCaloEvents[eventBin]) fListMixCaloEvents[eventBin] = new TList();
1111 TList * poolCalo = fListMixCaloEvents[eventBin];
1113 for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ )
1115 AliVCluster * calo = (AliVCluster *) (pl->At(ipr)) ;
1117 // remove matched clusters
1118 if( IsTrackMatched( calo, GetReader()->GetInputEvent() ) ) continue ;
1120 //Cluster momentum calculation
1121 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
1123 calo->GetMomentum(fMomentum,GetVertex(0)) ;
1124 }//Assume that come from vertex in straight line
1127 Double_t vertex[]={0,0,0};
1128 calo->GetMomentum(fMomentum,vertex) ;
1131 Float_t pt = fMomentum.Pt();
1132 //Select only clusters in pt range
1133 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
1135 AliAODPWG4Particle * mixedCalo = new AliAODPWG4Particle(fMomentum);
1136 mixedCalo->SetDetectorTag(kEMCAL);
1137 mixEventCalo->Add(mixedCalo);
1140 fhNclustersMB->Fill(mixEventCalo->GetEntriesFast(),eventBin);
1142 //Set the event number where the last event was added, to avoid double pool filling
1143 GetReader()->SetLastCaloMixedEvent(GetEventNumber());
1145 //printf("Add event to pool with %d clusters \n ",mixEventCalo->GetEntries());
1146 poolCalo->AddFirst(mixEventCalo);
1149 //printf("Pool size %d, max %d\n",poolCalo->GetSize(), GetNMaxEvMix());
1151 if(poolCalo->GetSize() > GetNMaxEvMix())
1152 {//Remove last event
1153 TClonesArray * tmp = static_cast<TClonesArray*>(poolCalo->Last()) ;
1154 poolCalo->RemoveLast() ;
1159 //_________________________________________________________________________________________________________________
1160 Bool_t AliAnaParticleHadronCorrelation::FindLeadingOppositeHadronInWindow(AliAODPWG4ParticleCorrelation * particle)
1162 // Select events where the leading charged particle in the opposite hemisphere
1163 // to the trigger particle is in a window centered at 180 from the trigger
1165 Float_t etaTrig = particle->Eta();
1166 Float_t ptTrig = particle->Pt();
1167 Float_t phiTrig = particle->Phi();
1168 if(phiTrig < 0 ) phiTrig+= TMath::TwoPi();
1170 Float_t ptLeadHad = 0 ;
1171 Float_t dphiLeadHad= -100 ;
1172 Float_t phiLeadHad = -100 ;
1173 Float_t etaLeadHad = -100 ;
1176 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
1178 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
1180 fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz());
1182 Float_t pt = fTrackVector.Pt();
1183 Float_t phi = fTrackVector.Phi() ;
1184 if(phi < 0 ) phi+= TMath::TwoPi();
1186 Float_t deltaPhi = phiTrig-phi;
1188 // Calculate deltaPhi shift so that for the particles on the opposite side
1189 // it is defined between 90 and 270 degrees
1190 // Shift [-360,-90] to [0, 270]
1191 // and [270,360] to [-90,0]
1192 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
1193 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
1195 if(pt > ptLeadHad && deltaPhi > TMath::PiOver2()) // in opposite hemisphere
1199 dphiLeadHad= deltaPhi;
1200 etaLeadHad = fTrackVector.Eta();
1205 if(fFillLeadHadOppositeHisto)
1209 fhPtNoLeadingOppositeHadron ->Fill(ptTrig);
1210 fhEtaPhiNoLeadingOppositeHadron->Fill(etaTrig,phiTrig);
1214 fhPtLeadingOppositeHadron ->Fill(ptTrig, ptLeadHad);
1215 fhPtDiffPhiLeadingOppositeHadron->Fill(ptTrig,dphiLeadHad);
1216 fhPtDiffEtaLeadingOppositeHadron->Fill(ptTrig, etaLeadHad-etaTrig);
1221 AliDebug(1,Form("pT %2.2f, phi %2.2f, eta %2.2f, nTracks away %d, total tracks %d",
1222 ptLeadHad,phiLeadHad*TMath::RadToDeg(),etaLeadHad,nTrack, GetTrackMultiplicity()));
1223 AliDebug(1,Form("\t pT trig %2.2f, Dphi (trigger-hadron) %2.2f, Deta (trigger-hadron) %2.2f",
1224 ptTrig, dphiLeadHad*TMath::RadToDeg(), etaLeadHad-etaTrig));
1225 AliDebug(1,Form("\t cuts pT: min %2.2f, max %2.2f; DPhi: min %2.2f, max %2.2f",
1226 fMinLeadHadPt,fMaxLeadHadPt,fMinLeadHadPhi*TMath::RadToDeg(),fMaxLeadHadPhi*TMath::RadToDeg()));
1229 // reject the trigger if the leading hadron is not in the requested pt or phi window and
1231 if( nTrack == 0 ) return kFALSE; // No track found in opposite hemisphere
1233 if( ptLeadHad < fMinLeadHadPt || ptLeadHad > fMaxLeadHadPt ) return kFALSE;
1235 //printf("Accept leading hadron pT \n");
1237 if( dphiLeadHad < fMinLeadHadPhi || dphiLeadHad > fMaxLeadHadPhi ) return kFALSE;
1239 //printf("Accept leading hadron phi \n");
1245 //____________________________________________________________
1246 TObjString* AliAnaParticleHadronCorrelation::GetAnalysisCuts()
1248 //Save parameters used for analysis
1249 TString parList ; //this will be list of parameters used for this analysis.
1250 const Int_t buffersize = 560;
1251 char onePar[buffersize] ;
1253 snprintf(onePar,buffersize,"--- AliAnaPaticleHadronCorrelation ---:") ;
1255 snprintf(onePar,buffersize," %3.2f < Pt associated < %3.2f; ", fMinAssocPt, fMaxAssocPt) ;
1257 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-Hadron < %3.2f; ", fDeltaPhiMinCut, fDeltaPhiMaxCut) ;
1259 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-UeHadron < %3.2f; ", fUeDeltaPhiMinCut, fUeDeltaPhiMaxCut) ;
1261 snprintf(onePar,buffersize,"Isolated Trigger? %d;", fSelectIsolated) ;
1263 snprintf(onePar,buffersize,"Several UE? %d;", fMakeSeveralUE) ;
1265 snprintf(onePar,buffersize,"Name of AOD Pi0 Branch %s;", fPi0AODBranchName.Data());
1267 snprintf(onePar,buffersize,"Do Decay-hadron correlation ? pi0 %d, decay %d;", fPi0Trigger, fDecayTrigger) ;
1269 snprintf(onePar,buffersize,"Select absolute leading for cluster triggers ? %d or Near Side Leading %d;",
1270 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
1272 snprintf(onePar,buffersize,"Associated particle pt bins %d: ", fNAssocPtBins) ;
1274 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
1275 snprintf(onePar,buffersize,"bin %d = [%2.1f,%2.1f];", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
1279 //Get parameters set in base class.
1280 parList += GetBaseParametersList() ;
1282 //Get parameters set in FiducialCut class (not available yet)
1283 //parlist += GetFidCut()->GetFidCutParametersList()
1285 return new TObjString(parList) ;
1289 //________________________________________________________________
1290 TList * AliAnaParticleHadronCorrelation::GetCreateOutputObjects()
1292 // Create histograms to be saved in output file and
1293 // store them in fOutputContainer
1295 TList * outputContainer = new TList() ;
1296 outputContainer->SetName("CorrelationHistos") ;
1298 Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Int_t netabins = GetHistogramRanges()->GetHistoEtaBins();
1299 Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax();
1300 Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin();
1302 Int_t ndeltaphibins = GetHistogramRanges()->GetHistoDeltaPhiBins(); Int_t ndeltaetabins = GetHistogramRanges()->GetHistoDeltaEtaBins();
1303 Float_t deltaphimax = GetHistogramRanges()->GetHistoDeltaPhiMax(); Float_t deltaetamax = GetHistogramRanges()->GetHistoDeltaEtaMax();
1304 Float_t deltaphimin = GetHistogramRanges()->GetHistoDeltaPhiMin(); Float_t deltaetamin = GetHistogramRanges()->GetHistoDeltaEtaMin();
1306 Int_t ntrbins = GetHistogramRanges()->GetHistoTrackMultiplicityBins(); Int_t nclbins = GetHistogramRanges()->GetHistoNClustersBins();
1307 Int_t trmax = GetHistogramRanges()->GetHistoTrackMultiplicityMax(); Int_t clmax = GetHistogramRanges()->GetHistoNClustersMax();
1308 Int_t trmin = GetHistogramRanges()->GetHistoTrackMultiplicityMin(); Int_t clmin = GetHistogramRanges()->GetHistoNClustersMin();
1310 Int_t nxeztbins = GetHistogramRanges()->GetHistoRatioBins(); Int_t nhbpbins = GetHistogramRanges()->GetHistoHBPBins();
1311 Float_t xeztmax = GetHistogramRanges()->GetHistoRatioMax(); Float_t hbpmax = GetHistogramRanges()->GetHistoHBPMax();
1312 Float_t xeztmin = GetHistogramRanges()->GetHistoRatioMin(); Float_t hbpmin = GetHistogramRanges()->GetHistoHBPMin();
1314 Int_t nMixBins = GetNCentrBin()*GetNZvertBin()*GetNRPBin();
1316 TString nameMC[] = {"Photon","Pi0","Pi0Decay","Eta","EtaDecay","OtherDecay","Electron","Hadron","Pi0DecayLostPair","EtaDecayLostPair"};
1317 TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
1319 // For vz dependent histograms, if option ON
1321 if(fCorrelVzBin) nz = GetNZvertBin();
1325 // Fill histograms for neutral clusters in mixing?
1326 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
1327 Bool_t neutralMix = fFillNeutralEventMixPool || isoCase ;
1329 fhPtTriggerInput = new TH1F("hPtTriggerInput","Input trigger #it{p}_{T}", nptbins,ptmin,ptmax);
1330 fhPtTriggerInput->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1331 outputContainer->Add(fhPtTriggerInput);
1333 if( fM02MaxCut > 0 && fM02MinCut > 0 )
1335 fhPtTriggerSSCut = new TH1F("hPtTriggerSSCut","Trigger #it{p}_{T} after #lambda^{2}_{0} cut", nptbins,ptmin,ptmax);
1336 fhPtTriggerSSCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1337 outputContainer->Add(fhPtTriggerSSCut);
1340 if( OnlyIsolated() )
1342 fhPtTriggerIsoCut = new TH1F("hPtTriggerIsoCut","Trigger #it{p}_{T} after isolation (and #lambda^{2}_{0} cut)", nptbins,ptmin,ptmax);
1343 fhPtTriggerIsoCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1344 outputContainer->Add(fhPtTriggerIsoCut);
1347 fhPtTriggerFidCut = new TH1F("hPtTriggerFidCut","Trigger #it{p}_{T} after fiducial (isolation and #lambda^{2}_{0}) cut", nptbins,ptmin,ptmax);
1348 fhPtTriggerFidCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1349 outputContainer->Add(fhPtTriggerFidCut);
1351 fhPtTrigger = new TH1F("hPtTrigger","#it{p}_{T} distribution of trigger particles (after opposite hadron leading cut and rest)", nptbins,ptmin,ptmax);
1352 fhPtTrigger->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1353 outputContainer->Add(fhPtTrigger);
1357 for(Int_t i=0; i < fgkNmcTypes; i++)
1359 fhPtTriggerMC[i] = new TH1F(Form("hPtTrigger_MC%s",nameMC[i].Data()),
1360 Form("#it{p}_{T} distribution of trigger particles, trigger origin is %s",nameMC[i].Data()),
1361 nptbins,ptmin,ptmax);
1362 fhPtTriggerMC[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1363 outputContainer->Add(fhPtTriggerMC[i]);
1369 for(Int_t ibit = 0; ibit < fNDecayBits; ibit++)
1371 fhPtDecayTrigger[ibit] = new TH1F(Form("hPtDecayTrigger_bit%d",fDecayBits[ibit]),
1372 Form("#it{p}_{T} distribution of trigger particles, decay Bit %d",fDecayBits[ibit]),
1373 nptbins,ptmin,ptmax);
1374 fhPtDecayTrigger[ibit]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1375 outputContainer->Add(fhPtDecayTrigger[ibit]);
1379 for(Int_t i=0; i < fgkNmcTypes; i++)
1381 fhPtDecayTriggerMC[ibit][i] = new TH1F(Form("hPtDecayTrigger_bit%d_MC%s",fDecayBits[ibit], nameMC[i].Data()),
1382 Form("#it{p}_{T} distribution of trigger particles, decay Bit %d, trigger origin is %s",fDecayBits[ibit], nameMC[i].Data()),
1383 nptbins,ptmin,ptmax);
1384 fhPtDecayTriggerMC[ibit][i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1385 outputContainer->Add(fhPtDecayTriggerMC[ibit][i]);
1393 fhPtTriggerVzBin = new TH2F("hPtTriggerVzBin","#it{p}_{T} distribution of trigger particles vs vz bin", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
1394 fhPtTriggerVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1395 fhPtTriggerVzBin->SetYTitle("#it{v}_{#it{z}} bin");
1396 outputContainer->Add(fhPtTriggerVzBin);
1399 fhPtTriggerBin = new TH2F ("hPtTriggerBin","#it{p}_{T} distribution of trigger particles", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
1400 fhPtTriggerBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1401 fhPtTriggerBin->SetYTitle("Bin");
1402 outputContainer->Add(fhPtTriggerBin);
1404 fhPhiTrigger = new TH2F ("hPhiTrigger","#phi distribution of trigger Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
1405 fhPhiTrigger->SetYTitle("#phi (rad)");
1406 outputContainer->Add(fhPhiTrigger);
1408 fhEtaTrigger = new TH2F ("hEtaTrigger","#eta distribution of trigger",nptbins,ptmin,ptmax, netabins,etamin,etamax);
1409 fhEtaTrigger->SetYTitle("#eta ");
1410 outputContainer->Add(fhEtaTrigger);
1412 if(IsHighMultiplicityAnalysisOn())
1414 fhPtTriggerCentrality = new TH2F("hPtTriggerCentrality","Trigger particle #it{p}_{T} vs centrality",nptbins,ptmin,ptmax,100,0.,100) ;
1415 fhPtTriggerCentrality->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1416 fhPtTriggerCentrality->SetYTitle("Centrality (%)");
1417 outputContainer->Add(fhPtTriggerCentrality) ;
1419 fhPtTriggerEventPlane = new TH2F("hPtTriggerEventPlane","Trigger particle #it{p}_{T} vs event plane angle",nptbins,ptmin,ptmax, 100,0.,TMath::Pi()) ;
1420 fhPtTriggerEventPlane->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1421 fhPtTriggerEventPlane->SetXTitle("EP angle (rad)");
1422 outputContainer->Add(fhPtTriggerEventPlane) ;
1424 fhTriggerEventPlaneCentrality = new TH2F("hTriggerEventPlaneCentrality","Trigger particle centrality vs event plane angle",100,0.,100,100,0.,TMath::Pi()) ;
1425 fhTriggerEventPlaneCentrality->SetXTitle("Centrality (%)");
1426 fhTriggerEventPlaneCentrality->SetYTitle("EP angle (rad)");
1427 outputContainer->Add(fhTriggerEventPlaneCentrality) ;
1430 // Leading hadron in oposite side
1431 if(fFillLeadHadOppositeHisto)
1433 fhPtLeadingOppositeHadron = new TH2F("hPtTriggerPtLeadingOppositeHadron","Leading hadron opposite to trigger vs trigger #it{p}_{T}",
1434 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1435 fhPtLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1436 fhPtLeadingOppositeHadron->SetYTitle("#it{p}_{T}^{lead hadron} (GeV/#it{c})");
1437 outputContainer->Add(fhPtLeadingOppositeHadron);
1439 fhPtNoLeadingOppositeHadron = new TH1F("hPtTriggerNoLeadingOppositeHadron","No Leading hadron opposite to trigger #it{p}_{T}",
1440 nptbins,ptmin,ptmax);
1441 fhPtNoLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1442 outputContainer->Add(fhPtNoLeadingOppositeHadron);
1444 fhEtaPhiNoLeadingOppositeHadron = new TH2F("hEtaPhiTriggerNoLeadingOppositeHadron","No Leading hadron opposite to trigger #eta:#phi",
1445 netabins,etamin,etamax,nphibins,phimin,phimax);
1446 fhEtaPhiNoLeadingOppositeHadron->SetXTitle("#eta");
1447 fhEtaPhiNoLeadingOppositeHadron->SetYTitle("#phi");
1448 outputContainer->Add(fhEtaPhiNoLeadingOppositeHadron);
1451 fhPtDiffPhiLeadingOppositeHadron = new TH2F("hPtTriggerDiffPhiTriggerLeadingOppositeHadron","#phi_{trigger}-#phi_{leading opposite hadron} vs #it{p}_{T}^{trig}",
1452 nptbins,ptmin,ptmax,ndeltaphibins,deltaphimin,deltaphimax);
1453 fhPtDiffPhiLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1454 fhPtDiffPhiLeadingOppositeHadron->SetYTitle("#phi_{trigger}-#phi_{leading opposite hadron} (rad)");
1455 outputContainer->Add(fhPtDiffPhiLeadingOppositeHadron);
1457 fhPtDiffEtaLeadingOppositeHadron = new TH2F("hPtTriggerDiffEtaTriggerPhiLeadingOppositeHadron","#eta_{trigger}-#eta_{leading opposite hadron} vs #it{p}_{T}^{trig}",
1458 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1459 fhPtDiffEtaLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1460 fhPtDiffEtaLeadingOppositeHadron->SetYTitle("#eta_{trigger}-#eta_{leading opposite hadron}");
1461 outputContainer->Add(fhPtDiffEtaLeadingOppositeHadron);
1464 //Correlation with charged hadrons
1466 fhDeltaPhiDeltaEtaCharged = new TH2F
1467 ("hDeltaPhiDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}}",
1468 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1469 fhDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
1470 fhDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
1472 fhDeltaPhiDeltaEtaChargedPtA3GeV = new TH2F
1473 ("hDeltaPhiDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}, #it{p}_{TA}>3 GeV/#it{c}}",
1474 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1475 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetXTitle("#Delta #phi (rad)");
1476 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1478 fhPhiCharged = new TH2F
1479 ("hPhiCharged","#phi_{h^{#pm}} vs #it{p}_{T #pm}",
1480 nptbins,ptmin,ptmax,180,0,TMath::TwoPi());
1481 fhPhiCharged->SetYTitle("#phi_{h^{#pm}} (rad)");
1482 fhPhiCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
1484 fhEtaCharged = new TH2F
1485 ("hEtaCharged","#eta_{h^{#pm}} vs #it{p}_{T #pm}",
1486 nptbins,ptmin,ptmax,100,-1.,1.);
1487 fhEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
1488 fhEtaCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
1490 fhDeltaPhiCharged = new TH2F
1491 ("hDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
1492 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1493 fhDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
1494 fhDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1496 fhDeltaPhiChargedPtA3GeV = new TH2F
1497 ("hDeltaPhiChargedPtA3GeV","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}",
1498 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1499 fhDeltaPhiChargedPtA3GeV->SetYTitle("#Delta #phi (rad)");
1500 fhDeltaPhiChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1503 fhDeltaPhiChargedPt = new TH2F
1504 ("hDeltaPhiChargedPt","#phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}",
1505 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1506 fhDeltaPhiChargedPt->SetYTitle("#Delta #phi (rad)");
1507 fhDeltaPhiChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1509 fhDeltaEtaCharged = new TH2F
1510 ("hDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}",
1511 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1512 fhDeltaEtaCharged->SetYTitle("#Delta #eta");
1513 fhDeltaEtaCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1515 fhDeltaEtaChargedPtA3GeV = new TH2F
1516 ("hDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}",
1517 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1518 fhDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1519 fhDeltaEtaChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1522 new TH2F("hXECharged","#it{x}_{#it{E}} for charged tracks",
1523 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1524 fhXECharged->SetYTitle("#it{x}_{#it{E}}");
1525 fhXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1528 new TH2F("hXECharged_Cone2","#it{x}_{#it{E}} for charged tracks in cone 2 (5#pi/6-7#pi/6)",
1529 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1530 fhXECharged_Cone2->SetYTitle("#it{x}_{#it{E}}");
1531 fhXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1534 new TH2F("hXEPositiveCharged","#it{x}_{#it{E}} for positive charged tracks",
1535 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1536 fhXEPosCharged->SetYTitle("#it{x}_{#it{E}}");
1537 fhXEPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1540 new TH2F("hXENegativeCharged","#it{x}_{#it{E}} for negative charged tracks",
1541 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1542 fhXENegCharged->SetYTitle("#it{x}_{#it{E}}");
1543 fhXENegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1546 new TH2F("hHbpXECharged","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
1547 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1548 fhPtHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1549 fhPtHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1551 fhPtHbpXECharged_Cone2 =
1552 new TH2F("hHbpXECharged_Cone2","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons in cone 2 (5#pi/6-7#pi/6)",
1553 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1554 fhPtHbpXECharged_Cone2->SetYTitle("ln(1/#it{x}_{#it{E}})");
1555 fhPtHbpXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1558 new TH2F("hZTCharged","#it{z}_{T} for charged tracks",
1559 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1560 fhZTCharged->SetYTitle("#it{z}_{T}");
1561 fhZTCharged->SetXTitle("#it{p}_{T trigger}");
1564 new TH2F("hZTPositiveCharged","#it{z}_{T} for positive charged tracks",
1565 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1566 fhZTPosCharged->SetYTitle("#it{z}_{T}");
1567 fhZTPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1570 new TH2F("hZTNegativeCharged","#it{z}_{T} for negative charged tracks",
1571 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1572 fhZTNegCharged->SetYTitle("#it{z}_{T}");
1573 fhZTNegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1576 new TH2F("hHbpZTCharged","#xi = ln(1/#it{z}_{T}) with charged hadrons",
1577 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1578 fhPtHbpZTCharged->SetYTitle("ln(1/#it{z}_{T})");
1579 fhPtHbpZTCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1582 new TH2F("hPtTrigPout","Pout with triggers",
1583 nptbins,ptmin,ptmax,nptbins,-1.*ptmax/2.,ptmax/2.);
1584 fhPtTrigPout->SetYTitle("#it{p}_{out} (GeV/#it{c})");
1585 fhPtTrigPout->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1588 new TH2F("hPtTrigCharged","trigger and charged tracks pt distribution",
1589 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1590 fhPtTrigCharged->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1591 fhPtTrigCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1593 outputContainer->Add(fhDeltaPhiDeltaEtaCharged);
1594 outputContainer->Add(fhDeltaPhiDeltaEtaChargedPtA3GeV);
1595 outputContainer->Add(fhPhiCharged) ;
1596 outputContainer->Add(fhEtaCharged) ;
1597 outputContainer->Add(fhDeltaPhiCharged) ;
1598 outputContainer->Add(fhDeltaPhiChargedPtA3GeV) ;
1599 outputContainer->Add(fhDeltaEtaCharged) ;
1600 outputContainer->Add(fhDeltaEtaChargedPtA3GeV) ;
1601 outputContainer->Add(fhDeltaPhiChargedPt) ;
1603 outputContainer->Add(fhXECharged) ;
1604 outputContainer->Add(fhXECharged_Cone2) ;
1608 for(Int_t i=0; i < fgkNmcTypes; i++)
1611 fhDeltaPhiChargedMC[i] = new TH2F(Form("hDeltaPhiCharged_MC%s",nameMC[i].Data()),
1612 Form("#Delta #phi for charged tracks, trigger origin is %s",nameMC[i].Data()),
1613 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
1614 fhDeltaPhiChargedMC[i]->SetYTitle("#it{x}_{#it{E}}");
1615 fhDeltaPhiChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1616 outputContainer->Add(fhDeltaPhiChargedMC[i]) ;
1618 fhXEChargedMC[i] = new TH2F(Form("hXECharged_MC%s",nameMC[i].Data()),
1619 Form("#it{x}_{#it{E}} for charged tracks, trigger origin is %s",nameMC[i].Data()),
1620 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1621 fhXEChargedMC[i]->SetYTitle("#it{x}_{#it{E}}");
1622 fhXEChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1623 outputContainer->Add(fhXEChargedMC[i]) ;
1627 outputContainer->Add(fhXEPosCharged) ;
1628 outputContainer->Add(fhXENegCharged) ;
1629 outputContainer->Add(fhPtHbpXECharged) ;
1630 outputContainer->Add(fhPtHbpXECharged_Cone2) ;
1632 outputContainer->Add(fhZTCharged) ;
1633 outputContainer->Add(fhZTPosCharged) ;
1634 outputContainer->Add(fhZTNegCharged) ;
1635 outputContainer->Add(fhPtHbpZTCharged) ;
1637 outputContainer->Add(fhPtTrigPout) ;
1638 outputContainer->Add(fhPtTrigCharged) ;
1641 if(fMakeSeveralUE) right = "Right";
1643 fhUePart = new TH1F("hUePart","UE particles distribution vs pt trig",
1644 nptbins,ptmin,ptmax);
1645 fhUePart->SetYTitle("dNch");
1646 fhUePart->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1648 fhDeltaPhiUeChargedPt = new TH2F
1649 (Form("hDeltaPhiUe%sChargedPt",right.Data()),"#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}}",
1650 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1651 fhDeltaPhiUeChargedPt->SetYTitle("#Delta #phi (rad)");
1652 fhDeltaPhiUeChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1655 new TH2F(Form("hXEUeCharged%s",right.Data()),"#it{x}_{#it{E}} for Underlying Event",
1656 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1657 fhXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
1658 fhXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1660 fhPtHbpXEUeCharged =
1661 new TH2F(Form("hHbpXEUeCharged%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for Underlying Event",
1662 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1663 fhPtHbpXEUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1664 fhPtHbpXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1667 new TH2F(Form("hZTUeCharged%s",right.Data()),"#it{z}_{T} for Underlying Event",
1668 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1669 fhZTUeCharged->SetYTitle("#it{z}_{T}");
1670 fhZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1672 fhPtHbpZTUeCharged =
1673 new TH2F(Form("hHbpZTUeCharged%s",right.Data()),"#xi = ln(1/#it{z}_{T}) for Underlying Event",
1674 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1675 fhPtHbpZTUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1676 fhPtHbpZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1678 outputContainer->Add(fhUePart);
1679 outputContainer->Add(fhDeltaPhiUeChargedPt) ;
1680 outputContainer->Add(fhXEUeCharged) ;
1681 outputContainer->Add(fhPtHbpXEUeCharged) ;
1682 outputContainer->Add(fhZTUeCharged) ;
1683 outputContainer->Add(fhPtHbpZTUeCharged) ;
1687 fhDeltaPhiUeLeftCharged = new TH2F
1688 ("hDeltaPhiUeLeftChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left side range of trigger particles",
1689 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1690 fhDeltaPhiUeLeftCharged->SetYTitle("#Delta #phi (rad)");
1691 fhDeltaPhiUeLeftCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1692 outputContainer->Add(fhDeltaPhiUeLeftCharged) ;
1694 fhDeltaPhiUeLeftUpCharged = new TH2F
1695 ("hDeltaPhiUeLeftUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Up side range of trigger particles",
1696 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1697 fhDeltaPhiUeLeftUpCharged->SetYTitle("#Delta #phi (rad)");
1698 fhDeltaPhiUeLeftUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1699 outputContainer->Add(fhDeltaPhiUeLeftUpCharged) ;
1701 fhDeltaPhiUeRightUpCharged = new TH2F
1702 ("hDeltaPhiUeRightUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Up side range of trigger particles",
1703 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1704 fhDeltaPhiUeRightUpCharged->SetYTitle("#Delta #phi (rad)");
1705 fhDeltaPhiUeRightUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1706 outputContainer->Add(fhDeltaPhiUeRightUpCharged) ;
1708 fhDeltaPhiUeLeftDownCharged = new TH2F
1709 ("hDeltaPhiUeLeftDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Down side range of trigger particles",
1710 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1711 fhDeltaPhiUeLeftDownCharged->SetYTitle("#Delta #phi (rad)");
1712 fhDeltaPhiUeLeftDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1713 outputContainer->Add(fhDeltaPhiUeLeftDownCharged) ;
1715 fhDeltaPhiUeRightDownCharged = new TH2F
1716 ("hDeltaPhiUeRightDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Down side range of trigger particles",
1717 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1718 fhDeltaPhiUeRightDownCharged->SetYTitle("#Delta #phi (rad)");
1719 fhDeltaPhiUeRightDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1720 outputContainer->Add(fhDeltaPhiUeRightDownCharged) ;
1723 new TH2F("hXEUeChargedLeft","#it{x}_{#it{E}} with UE left side of trigger",
1724 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1725 fhXEUeLeftCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1726 fhXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1727 outputContainer->Add(fhXEUeLeftCharged) ;
1729 fhXEUeLeftUpCharged =
1730 new TH2F("hXEUeChargedLeftUp","#it{x}_{#it{E}} with UE left Up side of trigger",
1731 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1732 fhXEUeLeftUpCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1733 fhXEUeLeftUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1734 outputContainer->Add(fhXEUeLeftUpCharged) ;
1736 fhXEUeRightUpCharged =
1737 new TH2F("hXEUeChargedRightUp","#it{x}_{#it{E} h^{#pm}} with UE right Up side of trigger",
1738 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1739 fhXEUeRightUpCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1740 fhXEUeRightUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1741 outputContainer->Add(fhXEUeRightUpCharged) ;
1743 fhXEUeLeftDownCharged =
1744 new TH2F("hXEUeChargedLeftDown","#it{x}_{#it{E}} with UE left Down side of trigger",
1745 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1746 fhXEUeLeftDownCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1747 fhXEUeLeftDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1748 outputContainer->Add(fhXEUeLeftDownCharged) ;
1750 fhXEUeRightDownCharged =
1751 new TH2F("hXEUeChargedRightDown","#it{x}_{#it{E} h^{#pm}} with UE right Down side of trigger",
1752 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1753 fhXEUeRightDownCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1754 fhXEUeRightDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1755 outputContainer->Add(fhXEUeRightDownCharged) ;
1757 fhPtHbpXEUeLeftCharged =
1758 new TH2F("hHbpXEUeChargedLeft","#xi = ln(1/#it{x}_{#it{E}}) with charged UE left side of trigger",
1759 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1760 fhPtHbpXEUeLeftCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1761 fhPtHbpXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1762 outputContainer->Add(fhPtHbpXEUeLeftCharged) ;
1765 new TH2F("hZTUeChargedLeft","#it{z}_{trigger h^{#pm}} = #it{p}_{T Ueh^{#pm}} / #it{p}_{T trigger} with UE left side of trigger",
1766 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1767 fhZTUeLeftCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1768 fhZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1769 outputContainer->Add(fhZTUeLeftCharged) ;
1771 fhPtHbpZTUeLeftCharged =
1772 new TH2F("hHbpZTUeChargedLeft","#xi = ln(1/#it{z}_{T}) with charged UE left side of trigger",
1773 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1774 fhPtHbpZTUeLeftCharged->SetYTitle("ln(1/#it{z}_{T})");
1775 fhPtHbpZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1776 outputContainer->Add(fhPtHbpZTUeLeftCharged) ;
1779 if(IsPileUpAnalysisOn())
1781 fhDeltaPhiChargedOtherBC = new TH2F
1782 ("hDeltaPhiChargedOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC!=0",
1783 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1784 fhDeltaPhiChargedOtherBC->SetYTitle("#Delta #phi (rad)");
1785 fhDeltaPhiChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1787 fhDeltaPhiChargedPtA3GeVOtherBC = new TH2F
1788 ("hDeltaPhiChargedPtA3GeVOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC!=0",
1789 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1790 fhDeltaPhiChargedPtA3GeVOtherBC->SetYTitle("#Delta #phi (rad)");
1791 fhDeltaPhiChargedPtA3GeVOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1793 fhPtTrigChargedOtherBC =
1794 new TH2F("hPtTrigChargedOtherBC","trigger and charged tracks pt distribution, track BC!=0",
1795 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1796 fhPtTrigChargedOtherBC->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1797 fhPtTrigChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1799 fhXEChargedOtherBC =
1800 new TH2F("hXEChargedOtherBC","#it{x}_{#it{E}} for charged tracks, track BC!=0",
1801 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1802 fhXEChargedOtherBC->SetYTitle("#it{x}_{#it{E}}");
1803 fhXEChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1805 fhXEUeChargedOtherBC =
1806 new TH2F("hXEUeChargedOtherBC","#it{x}_{#it{E}} for Underlying Event, track BC!=0",
1807 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1808 fhXEUeChargedOtherBC->SetYTitle("#it{x}_{#it{E}}");
1809 fhXEUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1811 fhZTChargedOtherBC =
1812 new TH2F("hZTChargedOtherBC","#it{z}_{T} for charged tracks, track BC!=0",
1813 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1814 fhZTChargedOtherBC->SetYTitle("#it{z}_{T}");
1815 fhZTChargedOtherBC->SetXTitle("#it{p}_{T trigger}");
1817 fhZTUeChargedOtherBC =
1818 new TH2F("hZTUeChargedOtherBC","#it{z}_{T} for Underlying Event, track BC!=0",
1819 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1820 fhZTUeChargedOtherBC->SetYTitle("#it{z}_{T}");
1821 fhZTUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1823 outputContainer->Add(fhDeltaPhiChargedOtherBC) ;
1824 outputContainer->Add(fhDeltaPhiChargedPtA3GeVOtherBC) ;
1825 outputContainer->Add(fhXEChargedOtherBC) ;
1826 outputContainer->Add(fhXEUeChargedOtherBC) ;
1827 outputContainer->Add(fhZTChargedOtherBC) ;
1828 outputContainer->Add(fhZTUeChargedOtherBC) ;
1829 outputContainer->Add(fhPtTrigChargedOtherBC) ;
1831 fhDeltaPhiChargedBC0 = new TH2F
1832 ("hDeltaPhiChargedBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0",
1833 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1834 fhDeltaPhiChargedBC0->SetYTitle("#Delta #phi (rad)");
1835 fhDeltaPhiChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1837 fhDeltaPhiChargedPtA3GeVBC0 = new TH2F
1838 ("hDeltaPhiChargedPtA3GeVBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0",
1839 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1840 fhDeltaPhiChargedPtA3GeVBC0->SetYTitle("#Delta #phi (rad)");
1841 fhDeltaPhiChargedPtA3GeVBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1843 fhPtTrigChargedBC0 =
1844 new TH2F("hPtTrigChargedBC0","trigger and charged tracks pt distribution, track BC==0",
1845 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1846 fhPtTrigChargedBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1847 fhPtTrigChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1850 new TH2F("hXEChargedBC0","#it{x}_{#it{E}} for charged tracks, track BC==0",
1851 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1852 fhXEChargedBC0->SetYTitle("#it{x}_{#it{E}}");
1853 fhXEChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1856 new TH2F("hXEUeChargedBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0",
1857 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1858 fhXEUeChargedBC0->SetYTitle("#it{x}_{#it{E}}");
1859 fhXEUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1862 new TH2F("hZTChargedBC0","#it{z}_{T} for charged tracks, track BC==0",
1863 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1864 fhZTChargedBC0->SetYTitle("#it{z}_{T}");
1865 fhZTChargedBC0->SetXTitle("#it{p}_{T trigger}");
1868 new TH2F("hZTUeChargedBC0","#it{z}_{T} for Underlying Event, track BC==0",
1869 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1870 fhZTUeChargedBC0->SetYTitle("#it{z}_{T}");
1871 fhZTUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1873 outputContainer->Add(fhDeltaPhiChargedBC0) ;
1874 outputContainer->Add(fhDeltaPhiChargedPtA3GeVBC0) ;
1875 outputContainer->Add(fhXEChargedBC0) ;
1876 outputContainer->Add(fhXEUeChargedBC0) ;
1877 outputContainer->Add(fhZTChargedBC0) ;
1878 outputContainer->Add(fhZTUeChargedBC0) ;
1879 outputContainer->Add(fhPtTrigChargedBC0) ;
1881 fhPtTriggerVtxBC0 = new TH1F("hPtTriggerVtxBC0","#it{p}_{T} distribution of trigger particles", nptbins,ptmin,ptmax);
1882 fhPtTriggerVtxBC0->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1884 fhDeltaPhiChargedVtxBC0 = new TH2F
1885 ("hDeltaPhiChargedVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0",
1886 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1887 fhDeltaPhiChargedVtxBC0->SetYTitle("#Delta #phi (rad)");
1888 fhDeltaPhiChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1890 fhDeltaPhiChargedPtA3GeVVtxBC0 = new TH2F
1891 ("hDeltaPhiChargedPtA3GeVVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0",
1892 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1893 fhDeltaPhiChargedPtA3GeVVtxBC0->SetYTitle("#Delta #phi (rad)");
1894 fhDeltaPhiChargedPtA3GeVVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1896 fhPtTrigChargedVtxBC0 =
1897 new TH2F("hPtTrigChargedVtxBC0","trigger and charged tracks pt distribution, track BC==0",
1898 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1899 fhPtTrigChargedVtxBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1900 fhPtTrigChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1903 new TH2F("hXEChargedVtxBC0","#it{x}_{#it{E}} for charged tracks, track BC==0",
1904 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1905 fhXEChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}");
1906 fhXEChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1908 fhXEUeChargedVtxBC0 =
1909 new TH2F("hXEUeChargedVtxBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0",
1910 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1911 fhXEUeChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}");
1912 fhXEUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1915 new TH2F("hZTChargedVtxBC0","#it{z}_{T} for charged tracks, track BC==0",
1916 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1917 fhZTChargedVtxBC0->SetYTitle("#it{z}_{T}");
1918 fhZTChargedVtxBC0->SetXTitle("#it{p}_{T trigger}");
1920 fhZTUeChargedVtxBC0 =
1921 new TH2F("hZTUeChargedVtxBC0","#it{z}_{T} for Underlying Event, track BC==0",
1922 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1923 fhZTUeChargedVtxBC0->SetYTitle("#it{z}_{T}");
1924 fhZTUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1926 outputContainer->Add(fhPtTriggerVtxBC0);
1927 outputContainer->Add(fhDeltaPhiChargedVtxBC0) ;
1928 outputContainer->Add(fhDeltaPhiChargedPtA3GeVVtxBC0) ;
1929 outputContainer->Add(fhXEChargedVtxBC0) ;
1930 outputContainer->Add(fhXEUeChargedVtxBC0) ;
1931 outputContainer->Add(fhZTChargedVtxBC0) ;
1932 outputContainer->Add(fhZTUeChargedVtxBC0) ;
1933 outputContainer->Add(fhPtTrigChargedVtxBC0) ;
1935 for(Int_t i = 0 ; i < 7 ; i++)
1937 fhPtTriggerPileUp[i] = new TH1F(Form("hPtTriggerPileUp%s",pileUpName[i].Data()),
1938 Form("#it{p}_{T} distribution of trigger particles, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
1939 fhPtTriggerPileUp[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1940 outputContainer->Add(fhPtTriggerPileUp[i]);
1942 fhDeltaPhiChargedPileUp[i] = new TH2F(Form("hDeltaPhiChargedPileUp%s",pileUpName[i].Data()),
1943 Form("#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1944 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1945 fhDeltaPhiChargedPileUp[i]->SetYTitle("#Delta #phi (rad)");
1946 fhDeltaPhiChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1947 outputContainer->Add(fhDeltaPhiChargedPileUp[i]) ;
1949 fhDeltaPhiChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaPhiChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1950 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()),
1951 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1952 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #phi (rad)");
1953 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1954 outputContainer->Add(fhDeltaPhiChargedPtA3GeVPileUp[i]) ;
1956 fhDeltaEtaChargedPileUp[i] = new TH2F(Form("hDeltaEtaChargedPileUp%s",pileUpName[i].Data()),
1957 Form("#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1958 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1959 fhDeltaEtaChargedPileUp[i]->SetYTitle("#Delta #eta");
1960 fhDeltaEtaChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1961 outputContainer->Add(fhDeltaEtaChargedPileUp[i]) ;
1963 fhDeltaEtaChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaEtaChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1964 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()),
1965 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1966 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #eta");
1967 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1968 outputContainer->Add(fhDeltaEtaChargedPtA3GeVPileUp[i]) ;
1970 fhXEChargedPileUp[i] = new TH2F(Form("hXEChargedPileUp%s",pileUpName[i].Data()),
1971 Form("#it{x}_{#it{E}} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1972 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1973 fhXEChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}");
1974 fhXEChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1975 outputContainer->Add(fhXEChargedPileUp[i]) ;
1977 fhXEUeChargedPileUp[i] = new TH2F(Form("hXEUeChargedPileUp%s",pileUpName[i].Data()),
1978 Form("#it{x}_{#it{E}} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1979 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1980 fhXEUeChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}");
1981 fhXEUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1982 outputContainer->Add(fhXEUeChargedPileUp[i]) ;
1984 fhZTChargedPileUp[i] = new TH2F(Form("hZTChargedPileUp%s",pileUpName[i].Data()),
1985 Form("#it{z}_{T} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1986 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1987 fhZTChargedPileUp[i]->SetYTitle("#it{z}_{T}");
1988 fhZTChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1989 outputContainer->Add(fhZTChargedPileUp[i]) ;
1991 fhZTUeChargedPileUp[i] = new TH2F(Form("hZTUeChargedPileUp%s",pileUpName[i].Data()),
1992 Form("#it{z}_{T} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1993 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1994 fhZTUeChargedPileUp[i]->SetYTitle("#it{z}_{T}");
1995 fhZTUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1996 outputContainer->Add(fhZTUeChargedPileUp[i]) ;
1998 fhPtTrigChargedPileUp[i] = new TH2F(Form("hPtTrigChargedPileUp%s",pileUpName[i].Data()),
1999 Form("trigger and charged tracks pt distribution, %s Pile-Up event",pileUpName[i].Data()),
2000 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2001 fhPtTrigChargedPileUp[i]->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
2002 fhPtTrigChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2003 outputContainer->Add(fhPtTrigChargedPileUp[i]) ;
2008 if(IsHighMultiplicityAnalysisOn())
2010 Int_t nMultiBins = GetNCentrBin();
2011 fhDeltaPhiChargedMult = new TH2F*[nMultiBins] ;
2012 fhDeltaEtaChargedMult = new TH2F*[nMultiBins] ;
2013 fhXEMult = new TH2F*[nMultiBins] ;
2014 fhXEUeMult = new TH2F*[nMultiBins] ;
2015 fhZTMult = new TH2F*[nMultiBins] ;
2016 fhZTUeMult = new TH2F*[nMultiBins] ;
2018 for(Int_t im=0; im<nMultiBins; im++)
2020 fhDeltaPhiChargedMult[im] = new TH2F
2021 (Form("hDeltaPhiCharged_Mult%d",im),Form("#Delta #phi charged Mult bin %d",im), nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2022 fhDeltaPhiChargedMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2023 fhDeltaPhiChargedMult[im]->SetYTitle("#Delta #phi (rad)");
2025 fhDeltaEtaChargedMult[im] = new TH2F
2026 (Form("hDeltaEtaCharged_Mult%d",im),Form("#Delta #eta charged Mult bin %d",im), nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
2027 fhDeltaEtaChargedMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2028 fhDeltaEtaChargedMult[im]->SetYTitle("#Delta #eta");
2030 fhXEMult[im] = new TH2F
2031 (Form("hXECharged_Mult%d",im),Form("#it{x}_{E} charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2032 fhXEMult[im]->SetYTitle("#it{x}_{E}");
2033 fhXEMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2035 fhXEUeMult[im] = new TH2F
2036 (Form("hXEUeCharged_Mult%d",im),Form("#it{x}_{E} UE charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2037 fhXEUeMult[im]->SetYTitle("#it{x}_{E}");
2038 fhXEUeMult[im]->SetXTitle("#it{p}_{T trigger}(GeV/#it{c})");
2040 fhZTMult[im] = new TH2F
2041 (Form("hZTCharged_Mult%d",im),Form("#it{z}_{T} charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2042 fhZTMult[im]->SetYTitle("#it{z}_{T}");
2043 fhZTMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2045 fhZTUeMult[im] = new TH2F
2046 (Form("hZTUeCharged_Mult%d",im),Form("#it{z}_{T} UE charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2047 fhZTUeMult[im]->SetYTitle("#it{z}_{T}");
2048 fhZTUeMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2050 outputContainer->Add(fhDeltaPhiChargedMult[im]) ;
2051 outputContainer->Add(fhDeltaEtaChargedMult[im]) ;
2052 outputContainer->Add(fhXEMult [im]);
2053 outputContainer->Add(fhXEUeMult[im]);
2054 outputContainer->Add(fhZTMult [im]);
2055 outputContainer->Add(fhZTUeMult[im]);
2061 fhAssocPtBkg = new TH2F("hAssocPtBkg", " Trigger #it{p}_{T} vs associated hadron #it{p}_{T} from background",
2062 nptbins, ptmin, ptmax,nptbins,ptmin,ptmax);
2063 fhAssocPtBkg->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2064 fhAssocPtBkg->SetYTitle("#it{p}_{T associated} (GeV/#it{c})");
2065 outputContainer->Add(fhAssocPtBkg) ;
2067 fhDeltaPhiBrad = new TH2F("hDeltaPhiBrad","atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs #it{p}_{T trigger} ",
2068 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
2069 fhDeltaPhiBrad->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2070 fhDeltaPhiBrad->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
2071 outputContainer->Add(fhDeltaPhiBrad) ;
2074 fhDeltaPhiDeltaEtaAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2075 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2076 fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
2077 fhDeltaPhiAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
2078 if(fFillMomImbalancePtAssocBinsHisto)
2080 fhXEAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2081 fhZTAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2086 fhXEVZ = new TH2F*[nz];
2087 fhZTVZ = new TH2F*[nz];
2091 fhDeltaPhiBradAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2094 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2095 if(fFillEtaGapsHisto)fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
2096 if(fDecayTrigger) fhDeltaPhiDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2099 if(fHMPIDCorrelation)
2101 fhDeltaPhiAssocPtBinHMPID = new TH2F*[fNAssocPtBins*nz];
2102 fhDeltaPhiAssocPtBinHMPIDAcc= new TH2F*[fNAssocPtBins*nz];
2105 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2107 for(Int_t z = 0 ; z < nz ; z++)
2113 sz = Form("_vz%d",z);
2114 tz = Form(", #it{v}_{#it{z}} bin %d",z);
2117 //printf("iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
2119 fhDeltaPhiDeltaEtaAssocPtBin[bin] = new TH2F(Form("hDeltaPhiDeltaEtaPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2120 Form("#Delta #phi vs #Delta #eta for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2121 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
2122 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
2123 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetYTitle("#Delta #eta");
2125 fhDeltaPhiAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2126 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()),
2127 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2128 fhDeltaPhiAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2129 fhDeltaPhiAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
2131 outputContainer->Add(fhDeltaPhiDeltaEtaAssocPtBin[bin]) ;
2132 outputContainer->Add(fhDeltaPhiAssocPtBin[bin]) ;
2134 if(fFillEtaGapsHisto)
2136 fhDeltaPhiAssocPtBinDEta08[bin] = new TH2F(Form("hDeltaPhiDeltaEta0.8PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2137 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()),
2138 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2139 fhDeltaPhiAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2140 fhDeltaPhiAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
2142 fhDeltaPhiAssocPtBinDEta0[bin] = new TH2F(Form("hDeltaPhiDeltaEta0PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2143 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()),
2144 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2145 fhDeltaPhiAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2146 fhDeltaPhiAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
2148 outputContainer->Add(fhDeltaPhiAssocPtBinDEta08[bin]) ;
2149 outputContainer->Add(fhDeltaPhiAssocPtBinDEta0[bin]) ;
2154 fhDeltaPhiDecayChargedAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtDecayChargedAssocPt%2.1f_%2.1f%s_bit%d", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data(),fDecayBits[0]),
2155 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]),
2156 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2157 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2158 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
2160 outputContainer->Add(fhDeltaPhiDecayChargedAssocPtBin[bin]) ;
2165 fhDeltaPhiBradAssocPtBin[bin] = new TH2F(Form("hDeltaPhiBradPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2166 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()),
2167 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
2168 fhDeltaPhiBradAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2169 fhDeltaPhiBradAssocPtBin[bin]->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
2170 outputContainer->Add(fhDeltaPhiBradAssocPtBin[bin]) ;
2173 if(fHMPIDCorrelation)
2175 fhDeltaPhiAssocPtBinHMPID[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPID", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2176 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()),
2177 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2178 fhDeltaPhiAssocPtBinHMPID[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})" );
2179 fhDeltaPhiAssocPtBinHMPID[bin]->SetYTitle("#Delta #phi (rad)");
2181 fhDeltaPhiAssocPtBinHMPIDAcc[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPIDAcc", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2182 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()),
2183 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2184 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2185 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetYTitle("#Delta #phi (rad)");
2187 outputContainer->Add(fhDeltaPhiAssocPtBinHMPID [bin]) ;
2188 outputContainer->Add(fhDeltaPhiAssocPtBinHMPIDAcc[bin]) ;
2193 if(fFillMomImbalancePtAssocBinsHisto)
2195 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2197 fhXEAssocPtBin[i] = new TH2F(Form("hXEAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
2198 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]),
2199 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2200 fhXEAssocPtBin[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2201 fhXEAssocPtBin[i]->SetYTitle("#it{x}_{#it{E}}");
2203 fhZTAssocPtBin[i] = new TH2F(Form("hZTAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
2204 Form("#it{z}_{T} vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
2205 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2206 fhZTAssocPtBin[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2207 fhZTAssocPtBin[i]->SetYTitle("#it{z}_{T}");
2210 outputContainer->Add(fhXEAssocPtBin[i]);
2211 outputContainer->Add(fhZTAssocPtBin[i]);
2217 for(Int_t z = 0 ; z < nz ; z++)
2219 sz = Form("_vz%d",z);
2220 tz = Form(", #it{v}_{#it{z}} bin %d",z);
2222 fhXEVZ[z] = new TH2F(Form("hXE%s", sz.Data()),
2223 Form("#it{x}_{#it{E}} vs #it{p}_{T trigger}%s", tz.Data()),
2224 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2225 fhXEVZ[z]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2226 fhXEVZ[z]->SetYTitle("#it{x}_{#it{E}}");
2228 fhZTVZ[z] = new TH2F(Form("hZT%s",sz.Data()),
2229 Form("#it{z}_{T} vs #it{p}_{T trigger}%s", tz.Data()),
2230 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2231 fhZTVZ[z]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2232 fhZTVZ[z]->SetYTitle("#it{z}_{T}");
2234 outputContainer->Add(fhXEVZ[z]);
2235 outputContainer->Add(fhZTVZ[z]);
2242 fhPtPi0DecayRatio = new TH2F
2243 ("hPtPi0DecayRatio","#it{p}_{T} of #pi^{0} and the ratio of pt for two decay",
2244 nptbins,ptmin,ptmax, 100,0.,2.);
2245 fhPtPi0DecayRatio->SetXTitle("#it{p}_{T}^{#pi^{0}} (GeV/#it{c})");
2246 fhPtPi0DecayRatio->SetYTitle("#it{p}_{T}^{Decay}/#it{p}_{T}^{#pi^{0}}");
2247 outputContainer->Add(fhPtPi0DecayRatio) ;
2249 fhDeltaPhiPi0DecayCharged = new TH2F
2250 ("hDeltaPhiPi0DecayCharged","#phi_{Decay} - #phi_{h^{#pm}} vs #it{p}_{T Decay}",
2251 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2252 fhDeltaPhiPi0DecayCharged->SetYTitle("#Delta #phi (rad)");
2253 fhDeltaPhiPi0DecayCharged->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
2255 fhXEPi0DecayCharged =
2256 new TH2F("hXEPi0DecayCharged","#it{x}_{#it{E}} Decay",
2257 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2258 fhXEPi0DecayCharged->SetYTitle("#it{x}_{#it{E}}");
2259 fhXEPi0DecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2261 fhZTPi0DecayCharged =
2262 new TH2F("hZTPi0DecayCharged","#it{z}_{trigger h^{#pm}} = #it{p}_{T h^{#pm}} / #it{p}_{T Decay}",
2263 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2264 fhZTPi0DecayCharged->SetYTitle("#it{z}_{decay h^{#pm}}");
2265 fhZTPi0DecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2267 outputContainer->Add(fhDeltaPhiPi0DecayCharged) ;
2268 outputContainer->Add(fhXEPi0DecayCharged) ;
2269 outputContainer->Add(fhZTPi0DecayCharged) ;
2274 for(Int_t ibit = 0; ibit< fNDecayBits; ibit++)
2276 fhDeltaPhiDecayCharged[ibit] = new TH2F
2277 (Form("hDeltaPhiDecayCharged_bit%d",fDecayBits[ibit]),
2278 Form("#phi_{Decay} - #phi_{h^{#pm}} vs #it{p}_{T Decay}, Bit %d",fDecayBits[ibit]),
2279 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2280 fhDeltaPhiDecayCharged[ibit]->SetYTitle("#Delta #phi (rad)");
2281 fhDeltaPhiDecayCharged[ibit]->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
2283 fhXEDecayCharged[ibit] =
2284 new TH2F(Form("hXEDecayCharged_bit%d",fDecayBits[ibit]),
2285 Form("#it{x}_{#it{E}} Decay, Bit %d",fDecayBits[ibit]),
2286 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2287 fhXEDecayCharged[ibit]->SetYTitle("#it{x}_{#it{E}}");
2288 fhXEDecayCharged[ibit]->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2290 fhZTDecayCharged[ibit] =
2291 new TH2F(Form("hZTDecayCharged_bit%d",fDecayBits[ibit]),
2292 Form("#it{z}_{trigger h^{#pm}} = #it{p}_{T h^{#pm}} / #it{p}_{T Decay}, Bit %d",fDecayBits[ibit]),
2293 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2294 fhZTDecayCharged[ibit]->SetYTitle("#it{z}_{decay h^{#pm}}");
2295 fhZTDecayCharged[ibit]->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2297 outputContainer->Add(fhDeltaPhiDecayCharged[ibit]) ;
2298 outputContainer->Add(fhXEDecayCharged[ibit]) ;
2299 outputContainer->Add(fhZTDecayCharged[ibit]) ;
2303 //Correlation with neutral hadrons
2306 fhDeltaPhiDeltaEtaNeutral = new TH2F
2307 ("hDeltaPhiDeltaEtaNeutral","#phi_{trigger} - #phi_{h^{0}} vs #eta_{trigger} - #eta_{h^{0}}",
2308 ndeltaphibins ,deltaphimin,deltaphimax, ndeltaetabins ,deltaetamin,deltaetamax);
2309 fhDeltaPhiDeltaEtaNeutral->SetXTitle("#Delta #phi (rad)");
2310 fhDeltaPhiDeltaEtaNeutral->SetYTitle("#Delta #eta");
2312 fhPhiNeutral = new TH2F
2313 ("hPhiNeutral","#phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}",
2314 nptbins,ptmin,ptmax,180,0,TMath::TwoPi());
2315 fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)");
2316 fhPhiNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})");
2318 fhEtaNeutral = new TH2F
2319 ("hEtaNeutral","#eta_{#pi^{0}} vs #it{p}_{T #pi^{0}}",
2320 nptbins,ptmin,ptmax,200,-1.,1.);
2321 fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)");
2322 fhEtaNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})");
2324 fhDeltaPhiNeutral = new TH2F
2325 ("hDeltaPhiNeutral","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T trigger}",
2326 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2327 fhDeltaPhiNeutral->SetYTitle("#Delta #phi (rad)");
2328 fhDeltaPhiNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2330 fhDeltaPhiNeutralPt = new TH2F
2331 ("hDeltaPhiNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}",
2332 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2333 fhDeltaPhiNeutralPt->SetYTitle("#Delta #phi (rad)");
2334 fhDeltaPhiNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2336 fhDeltaEtaNeutral = new TH2F
2337 ("hDeltaEtaNeutral","#eta_{trigger} - #eta_{#pi^{0}} vs #it{p}_{T trigger}",
2338 nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
2339 fhDeltaEtaNeutral->SetYTitle("#Delta #eta");
2340 fhDeltaEtaNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2343 new TH2F("hXENeutral","#it{x}_{#it{E}} for #pi^{0} associated",
2344 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2345 fhXENeutral->SetYTitle("#it{x}_{#it{E}}");
2346 fhXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2349 new TH2F("hHbpXENeutral","#xi = ln(1/#it{x}_{#it{E}})for #pi^{0} associated",
2350 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2351 fhPtHbpXENeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2352 fhPtHbpXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2355 new TH2F("hZTNeutral","#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated",
2356 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2357 fhZTNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}");
2358 fhZTNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2361 new TH2F("hHbpZTNeutral","#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2362 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2363 fhPtHbpZTNeutral->SetYTitle("ln(1/#it{z}_{T})");
2364 fhPtHbpZTNeutral->SetXTitle("#it{p}_{T trigger}");
2366 outputContainer->Add(fhDeltaPhiDeltaEtaNeutral);
2367 outputContainer->Add(fhPhiNeutral) ;
2368 outputContainer->Add(fhEtaNeutral) ;
2369 outputContainer->Add(fhDeltaPhiNeutral) ;
2370 outputContainer->Add(fhDeltaPhiNeutralPt) ;
2371 outputContainer->Add(fhDeltaEtaNeutral) ;
2372 outputContainer->Add(fhXENeutral) ;
2373 outputContainer->Add(fhPtHbpXENeutral) ;
2374 outputContainer->Add(fhZTNeutral) ;
2375 outputContainer->Add(fhPtHbpZTNeutral) ;
2377 fhDeltaPhiUeNeutralPt = new TH2F
2378 (Form("hDeltaPhiUe%sNeutralPt",right.Data()),"#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}",
2379 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2380 fhDeltaPhiUeNeutralPt->SetYTitle("#Delta #phi (rad)");
2381 fhDeltaPhiUeNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2384 new TH2F(Form("hXEUeNeutral%s",right.Data()),"#it{x}_{#it{E}} for #pi^{0} associated",
2385 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2386 fhXEUeNeutral->SetYTitle("#it{x}_{#it{E}}");
2387 fhXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2389 fhPtHbpXEUeNeutral =
2390 new TH2F(Form("hHbpXEUeNeutral%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2391 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2392 fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2393 fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2396 new TH2F(Form("hZTUeNeutral%s",right.Data()),"#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated",
2397 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2398 fhZTUeNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}");
2399 fhZTUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2401 fhPtHbpZTUeNeutral =
2402 new TH2F(Form("hHbpZTUeNeutral%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2403 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2404 fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{z}_{T})");
2405 fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2407 outputContainer->Add(fhDeltaPhiUeNeutralPt) ;
2408 outputContainer->Add(fhXEUeNeutral) ;
2409 outputContainer->Add(fhPtHbpXEUeNeutral) ;
2410 outputContainer->Add(fhZTUeNeutral) ;
2411 outputContainer->Add(fhPtHbpZTUeNeutral) ;
2415 fhDeltaPhiUeLeftNeutral = new TH2F
2416 ("hDeltaPhiUeLeftNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs #it{p}_{T h^{0}} with neutral UE left side range of trigger particles",
2417 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2418 fhDeltaPhiUeLeftNeutral->SetYTitle("#Delta #phi (rad)");
2419 fhDeltaPhiUeLeftNeutral->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2420 outputContainer->Add(fhDeltaPhiUeLeftNeutral) ;
2423 new TH2F("hXEUeNeutralLeft","#it{x}_{#it{E}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger",
2424 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2425 fhXEUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2426 fhXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2427 outputContainer->Add(fhXEUeLeftNeutral) ;
2429 fhPtHbpXEUeLeftNeutral =
2430 new TH2F("hHbpXEUeNeutralLeft","#xi = ln(1/#it{x}_{#it{E}}) with neutral UE left side of trigger",
2431 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2432 fhPtHbpXEUeLeftNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2433 fhPtHbpXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2434 outputContainer->Add(fhPtHbpXEUeLeftNeutral) ;
2437 new TH2F("hZTUeNeutralLeft","#it{z}_{trigger h^{0}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger",
2438 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2439 fhZTUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2440 fhZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2441 outputContainer->Add(fhZTUeLeftNeutral) ;
2443 fhPtHbpZTUeLeftNeutral =
2444 new TH2F("hHbpZTUeNeutralLeft","#xi = ln(1/#it{z}_{T}) with neutral UE left side of trigger",
2445 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2446 fhPtHbpZTUeLeftNeutral->SetYTitle("ln(1/#it{z}_{T})");
2447 fhPtHbpZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger}");
2448 outputContainer->Add(fhPtHbpZTUeLeftNeutral) ;
2453 fhDeltaPhiPi0DecayNeutral = new TH2F
2454 ("hDeltaPhiPi0DecayNeutral","#phi_{Decay} - #phi_{h^{0}} vs #it{p}_{T Decay}",
2455 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2456 fhDeltaPhiPi0DecayNeutral->SetYTitle("#Delta #phi (rad)");
2457 fhDeltaPhiPi0DecayNeutral->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
2459 fhXEPi0DecayNeutral =
2460 new TH2F("hXEPi0DecayNeutral","#it{x}_{#it{E}} for decay trigger",
2461 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2462 fhXEPi0DecayNeutral->SetYTitle("#it{x}_{#it{E}}");
2463 fhXEPi0DecayNeutral->SetXTitle("#it{p}_{T decay}");
2465 fhZTPi0DecayNeutral =
2466 new TH2F("hZTPi0DecayNeutral","#it{z}_{trigger h^{0}} = #it{p}_{T h^{0}} / #it{p}_{T Decay}",
2467 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2468 fhZTPi0DecayNeutral->SetYTitle("#it{z}_{h^{0}}");
2469 fhZTPi0DecayNeutral->SetXTitle("#it{p}_{T decay}");
2471 outputContainer->Add(fhDeltaPhiPi0DecayNeutral) ;
2472 outputContainer->Add(fhXEPi0DecayNeutral) ;
2473 outputContainer->Add(fhZTPi0DecayNeutral) ;
2475 }//Correlation with neutral hadrons
2477 // If data is MC, fill more histograms, depending on origin
2480 for(Int_t i= fMCGenTypeMin; i <= fMCGenTypeMax; i++)
2482 fhMCPtTrigger[i] = new TH1F (Form("hMCPtTrigger_%s",nameMC[i].Data()),
2483 Form("MC %s: generated trigger #it{p}_{T}",nameMC[i].Data()),
2484 nptbins,ptmin,ptmax);
2485 fhMCPtTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2487 fhMCPhiTrigger[i] = new TH2F (Form("hMCPhiTrigger_%s",nameMC[i].Data()),
2488 Form("MC %s: generated trigger #phi",nameMC[i].Data()),
2489 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2490 fhMCPhiTrigger[i]->SetYTitle("#phi (rad)");
2491 fhMCPhiTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2493 fhMCEtaTrigger[i] = new TH2F (Form("hMCEtaTrigger_%s",nameMC[i].Data()),
2494 Form("MC %s: generated trigger #eta",nameMC[i].Data()),
2495 nptbins,ptmin,ptmax, netabins,etamin,etamax);
2496 fhMCEtaTrigger[i]->SetYTitle("#eta");
2497 fhMCEtaTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2499 if(fMakeAbsoluteLeading || fMakeNearSideLeading)
2501 fhMCPtTriggerNotLeading[i] = new TH1F (Form("hMCPtTriggerNotLeading_%s",nameMC[i].Data()),
2502 Form("MC %s: generated trigger #it{p}_{T}, when not leading of primaries",nameMC[i].Data()),
2503 nptbins,ptmin,ptmax);
2504 fhMCPtTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2506 fhMCPhiTriggerNotLeading[i] = new TH2F (Form("hMCPhiTriggerNotLeading_%s",nameMC[i].Data()),
2507 Form("MC %s: generated trigger #phi, when not leading of primaries",nameMC[i].Data()),
2508 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2509 fhMCPhiTriggerNotLeading[i]->SetYTitle("#phi (rad)");
2510 fhMCPhiTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2513 fhMCEtaTriggerNotLeading[i] = new TH2F (Form("hMCEtaTriggerNotLeading_%s",nameMC[i].Data()),
2514 Form("MC %s: generated triogger #eta, when not leading of primaries",nameMC[i].Data()),
2515 nptbins,ptmin,ptmax, netabins,etamin,etamax);
2516 fhMCEtaTriggerNotLeading[i]->SetYTitle("#eta ");
2517 fhMCEtaTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2520 fhMCEtaCharged[i] = new TH2F (Form("hMCEtaCharged_%s",nameMC[i].Data()),
2521 Form("MC %s: #eta_{h^{#pm}} vs #it{p}_{T #pm}",nameMC[i].Data()),
2522 nptbins,ptmin,ptmax,100,-1.,1.);
2523 fhMCEtaCharged[i]->SetYTitle("#eta_{h^{#pm}} (rad)");
2524 fhMCEtaCharged[i]->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
2526 fhMCPhiCharged[i] = new TH2F(Form("hMCPhiCharged_%s",nameMC[i].Data()),
2527 Form("MC %s: phi_{h^{#pm}} vs #it{p}_{T #pm}",nameMC[i].Data()),
2528 nptbins,ptmin,ptmax,180,0,TMath::TwoPi());
2529 fhMCPhiCharged[i]->SetYTitle("MC #phi_{h^{#pm}} (rad)");
2530 fhMCPhiCharged[i]->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
2532 fhMCDeltaPhiDeltaEtaCharged[i] = new TH2F (Form("hMCDeltaPhiDeltaEtaCharged_%s",nameMC[i].Data()),
2533 Form("MC %s: phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",nameMC[i].Data()),
2534 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2535 fhMCDeltaPhiDeltaEtaCharged[i]->SetXTitle("#Delta #phi (rad)");
2536 fhMCDeltaPhiDeltaEtaCharged[i]->SetYTitle("#Delta #eta");
2538 fhMCDeltaEtaCharged[i] = new TH2F (Form("hMCDeltaEtaCharged_%s",nameMC[i].Data()),
2539 Form("MC %s: #eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger} and #it{p}_{T assoc}",nameMC[i].Data()),
2540 nptbins,ptmin,ptmax,ndeltaetabins ,deltaetamin,deltaetamax);
2541 fhMCDeltaEtaCharged[i]->SetYTitle("#Delta #eta");
2542 fhMCDeltaEtaCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2544 fhMCDeltaPhiCharged[i] = new TH2F (Form("hMCDeltaPhiCharged_%s",nameMC[i].Data()),
2545 Form("MC %s: #phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",nameMC[i].Data()),
2546 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2547 fhMCDeltaPhiCharged[i]->SetYTitle("#Delta #phi (rad)");
2548 fhMCDeltaPhiCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2550 fhMCDeltaPhiChargedPt[i] = new TH2F (Form("hMCDeltaPhiChargedPt_%s",nameMC[i].Data()),
2551 Form("MC %s: #phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}",nameMC[i].Data()),
2552 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2553 fhMCDeltaPhiChargedPt[i]->SetYTitle("#Delta #phi (rad)");
2554 fhMCDeltaPhiChargedPt[i]->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
2556 fhMCPtXECharged[i] = new TH2F (Form("hMCPtXECharged_%s",nameMC[i].Data()),
2557 Form("MC %s: #it{x}_{#it{E}} with charged hadrons",nameMC[i].Data()),
2558 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2559 fhMCPtXECharged[i]->SetYTitle("#it{x}_{#it{E}}");
2560 fhMCPtXECharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2562 fhMCPtHbpXECharged[i] = new TH2F(Form("hMCHbpXECharged_%s",nameMC[i].Data()),
2563 Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",nameMC[i].Data()),
2564 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2565 fhMCPtHbpXECharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})");
2566 fhMCPtHbpXECharged[i]->SetXTitle("#it{p}_{T trigger}");
2568 fhMCPtZTCharged[i] = new TH2F(Form("hMCPtZTCharged_%s",nameMC[i].Data()),
2569 Form("MC %s: #it{z}_{T} with charged hadrons",nameMC[i].Data()),
2570 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2571 fhMCPtZTCharged[i]->SetYTitle("#it{z}_{T}");
2572 fhMCPtZTCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2574 fhMCPtHbpZTCharged[i] = new TH2F(Form("hMCHbpZTCharged_%s",nameMC[i].Data()),
2575 Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons",nameMC[i].Data()),
2576 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2577 fhMCPtHbpZTCharged[i]->SetYTitle("ln(1/#it{z}_{T})");
2578 fhMCPtHbpZTCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2580 fhMCPtTrigPout[i] = new TH2F(Form("hMCPtTrigPout_%s",nameMC[i].Data()),
2581 Form("MC %s: #it{p}_{out} with triggers",nameMC[i].Data()),
2582 nptbins,ptmin,ptmax,nptbins,-1.*ptmax/2.,ptmax/2.);
2583 fhMCPtTrigPout[i]->SetYTitle("#it{p}_{out} (GeV/#it{c})");
2584 fhMCPtTrigPout[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2586 fhMCPtAssocDeltaPhi[i] = new TH2F(Form("hMCPtAssocDeltaPhi_%s",nameMC[i].Data()),
2587 Form("MC %s: #Delta #phi with associated charged hadrons",nameMC[i].Data()),
2588 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2589 fhMCPtAssocDeltaPhi[i]->SetYTitle("#Delta #phi (rad)");
2590 fhMCPtAssocDeltaPhi[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2592 outputContainer->Add(fhMCPtTrigger[i]);
2593 outputContainer->Add(fhMCPhiTrigger[i]);
2594 outputContainer->Add(fhMCEtaTrigger[i]);
2596 if(fMakeAbsoluteLeading || fMakeNearSideLeading)
2598 outputContainer->Add(fhMCPtTriggerNotLeading[i]);
2599 outputContainer->Add(fhMCPhiTriggerNotLeading[i]);
2600 outputContainer->Add(fhMCEtaTriggerNotLeading[i]);
2603 outputContainer->Add(fhMCDeltaPhiDeltaEtaCharged[i]);
2604 outputContainer->Add(fhMCPhiCharged[i]) ;
2605 outputContainer->Add(fhMCEtaCharged[i]) ;
2606 outputContainer->Add(fhMCDeltaEtaCharged[i]) ;
2607 outputContainer->Add(fhMCDeltaPhiCharged[i]) ;
2609 outputContainer->Add(fhMCDeltaPhiChargedPt[i]) ;
2610 outputContainer->Add(fhMCPtXECharged[i]) ;
2611 outputContainer->Add(fhMCPtZTCharged[i]) ;
2612 outputContainer->Add(fhMCPtHbpXECharged[i]) ;
2613 outputContainer->Add(fhMCPtHbpZTCharged[i]) ;
2614 outputContainer->Add(fhMCPtTrigPout[i]) ;
2615 outputContainer->Add(fhMCPtAssocDeltaPhi[i]) ;
2620 new TH1F(Form("hMCUePart_%s",nameMC[i].Data()),
2621 Form("MC %s: UE particles distribution vs #it{p}_{T trigger}",nameMC[i].Data()),
2622 nptbins,ptmin,ptmax);
2623 fhMCUePart[i]->SetYTitle("#it{dN}^{ch}");
2624 fhMCUePart[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2626 fhMCPtXEUeCharged[i] =
2627 new TH2F(Form("hMCPtXEUeCharged%s_%s",right.Data(),nameMC[i].Data()),
2628 Form("MC %s: #it{x}_{#it{E}} with charged hadrons, Underlying Event %s",nameMC[i].Data(),right.Data()),
2629 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2630 fhMCPtXEUeCharged[i]->SetYTitle("#it{x}_{#it{E}}");
2631 fhMCPtXEUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2633 fhMCPtHbpXEUeCharged[i] =
2634 new TH2F(Form("hMCPtHbpXEUeCharged%s_%s",right.Data(),nameMC[i].Data()),
2635 Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, Underlying Event %s",nameMC[i].Data(),right.Data()),
2636 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2637 fhMCPtHbpXEUeCharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})");
2638 fhMCPtHbpXEUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2640 fhMCPtZTUeCharged[i] =
2641 new TH2F(Form("hMCPtZTUeCharged%s_%s",right.Data(),nameMC[i].Data()),
2642 Form("MC %s: #it{z}_{T} with charged hadrons, Underlying Event %s",nameMC[i].Data(),right.Data()),
2643 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2644 fhMCPtZTUeCharged[i]->SetYTitle("#it{z}_{T}");
2645 fhMCPtZTUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2647 fhMCPtHbpZTUeCharged[i] =
2648 new TH2F(Form("hMCPtHbpZTUeCharged%s_%s",right.Data(),nameMC[i].Data()),
2649 Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons, Underlying Event %s",nameMC[i].Data(),right.Data()),
2650 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2651 fhMCPtHbpZTUeCharged[i]->SetYTitle("ln(1/#it{z}_{T})");
2652 fhMCPtHbpZTUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2654 outputContainer->Add(fhMCUePart[i]);
2655 outputContainer->Add(fhMCPtXEUeCharged[i]) ;
2656 outputContainer->Add(fhMCPtZTUeCharged[i]) ;
2657 outputContainer->Add(fhMCPtHbpZTUeCharged[i]);
2658 outputContainer->Add(fhMCPtHbpXEUeCharged[i]);
2662 fhMCPtXEUeLeftCharged[i] = new TH2F(Form("hMCPtXEUeChargedLeft_%s",nameMC[i].Data()),
2663 Form("MC %s: #it{x}_{#it{E}} with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2664 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2665 fhMCPtXEUeLeftCharged[i]->SetYTitle("#it{x}_{#it{E}}");
2666 fhMCPtXEUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2668 fhMCPtHbpXEUeLeftCharged[i] = new TH2F(Form("hMCPtHbpXEUeChargedLeft_%s",nameMC[i].Data()),
2669 Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2670 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2671 fhMCPtHbpXEUeLeftCharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})");
2672 fhMCPtHbpXEUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2674 fhMCPtZTUeLeftCharged[i] = new TH2F(Form("hMCPtZTUeChargedLeft_%s",nameMC[i].Data()),
2675 Form("MC %s: #it{z}_{T} with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2676 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2677 fhMCPtZTUeLeftCharged[i]->SetYTitle("#it{z}_{T}");
2678 fhMCPtZTUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2680 fhMCPtHbpZTUeLeftCharged[i] = new TH2F(Form("hMCPtHbpZTUeChargedLeft_%s",nameMC[i].Data()),
2681 Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2682 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2683 fhMCPtHbpZTUeLeftCharged[i]->SetYTitle("ln(1/#it{z}_{T})");
2684 fhMCPtHbpZTUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2686 outputContainer->Add(fhMCPtXEUeLeftCharged[i]) ;
2687 outputContainer->Add(fhMCPtZTUeLeftCharged[i]) ;
2688 outputContainer->Add(fhMCPtHbpXEUeLeftCharged[i]);
2689 outputContainer->Add(fhMCPtHbpZTUeLeftCharged[i]) ;
2693 } //for MC histogram
2697 //create event containers
2699 if(!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForTracksExists()))
2701 Int_t nvz = GetNZvertBin();
2702 Int_t nrp = GetNRPBin();
2703 Int_t nce = GetNCentrBin();
2705 fListMixTrackEvents= new TList*[nvz*nrp*nce] ;
2707 for( Int_t ice = 0 ; ice < nce ; ice++ )
2709 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2711 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2713 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2715 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2716 // ic,iz, irp, bin);
2718 fListMixTrackEvents[bin] = new TList() ;
2719 fListMixTrackEvents[bin]->SetOwner(kFALSE);
2725 fhPtTriggerMixed = new TH1F ("hPtTriggerMixed","#it{p}_{T} distribution of trigger particles, used for mixing", nptbins,ptmin,ptmax);
2726 fhPtTriggerMixed->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2730 fhPtTriggerMixedVzBin = new TH2F ("hPtTriggerMixedVzBin","#it{p}_{T} distribution of trigger particles, used for mixing", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
2731 fhPtTriggerMixedVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2732 fhPtTriggerMixedVzBin->SetYTitle("#it{v}_{#it{z}} bin");
2733 outputContainer->Add(fhPtTriggerMixedVzBin);
2736 fhPtTriggerMixedBin = new TH2F ("hPtTriggerMixedBin","#it{p}_{T} distribution of trigger particles vs mixing bin", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
2737 fhPtTriggerMixedBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2738 fhPtTriggerMixedBin->SetYTitle("Bin");
2740 fhPhiTriggerMixed = new TH2F ("hPhiTriggerMixed","#phi distribution of trigger Particles, used for mixing",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2741 fhPhiTriggerMixed->SetYTitle("#phi (rad)");
2743 fhEtaTriggerMixed = new TH2F ("hEtaTriggerMixed","#eta distribution of trigger, used for mixing",nptbins,ptmin,ptmax, netabins,etamin,etamax);
2744 fhEtaTriggerMixed->SetYTitle("#eta ");
2746 outputContainer->Add(fhPtTriggerMixed);
2747 outputContainer->Add(fhPtTriggerMixedBin);
2748 outputContainer->Add(fhPhiTriggerMixed);
2749 outputContainer->Add(fhEtaTriggerMixed);
2751 // Fill the cluster pool only in isolation analysis or if requested
2752 if( neutralMix && (!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForCaloExists())))
2754 Int_t nvz = GetNZvertBin();
2755 Int_t nrp = GetNRPBin();
2756 Int_t nce = GetNCentrBin();
2758 fListMixCaloEvents= new TList*[nvz*nrp*nce] ;
2760 for( Int_t ice = 0 ; ice < nce ; ice++ )
2762 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2764 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2766 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2768 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2769 // ic,iz, irp, bin);
2771 fListMixCaloEvents[bin] = new TList() ;
2772 fListMixCaloEvents[bin]->SetOwner(kFALSE);
2778 //Init the list in the reader if not done previously
2779 if(fUseMixStoredInReader)
2781 if( !GetReader()->ListWithMixedEventsForTracksExists() )
2782 GetReader()->SetListWithMixedEventsForTracks(fListMixTrackEvents);
2784 if( !GetReader()->ListWithMixedEventsForCaloExists() )
2785 GetReader()->SetListWithMixedEventsForCalo (fListMixCaloEvents );
2788 fhEventBin=new TH1I("hEventBin","Number of triggers per bin(cen,vz,rp)",
2789 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2790 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2791 fhEventBin->SetXTitle("event bin");
2792 outputContainer->Add(fhEventBin) ;
2794 fhEventMixBin=new TH1I("hEventMixBin","Number of triggers mixed per event bin(cen,vz,rp)",
2795 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2796 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2797 fhEventMixBin->SetXTitle("event bin");
2798 outputContainer->Add(fhEventMixBin) ;
2800 fhEventMBBin=new TH1I("hEventMBBin","Number of min bias events per bin(cen,vz,rp)",
2801 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2802 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2803 fhEventMBBin->SetXTitle("event bin");
2804 outputContainer->Add(fhEventMBBin) ;
2806 fhNtracksMB=new TH2F("hNtracksMBEvent","Number of filtered tracks in MB event per event bin",ntrbins,trmin,trmax,
2807 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2808 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2809 fhNtracksMB->SetYTitle("event bin");
2810 fhNtracksMB->SetXTitle("#it{N}_{track}");
2811 outputContainer->Add(fhNtracksMB);
2815 fhNclustersMB=new TH2F("hNclustersMBEvent","Number of filtered clusters in MB events per event bin",nclbins,clmin,clmax,
2816 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2817 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2818 fhNclustersMB->SetYTitle("event bin");
2819 fhNclustersMB->SetXTitle("#it{N}_{cluster}");
2820 outputContainer->Add(fhNclustersMB);
2823 fhMixDeltaPhiCharged = new TH2F
2824 ("hMixDeltaPhiCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
2825 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2826 fhMixDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
2827 fhMixDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2828 outputContainer->Add(fhMixDeltaPhiCharged);
2830 fhMixDeltaPhiDeltaEtaCharged = new TH2F
2831 ("hMixDeltaPhiDeltaEtaCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
2832 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2833 fhMixDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
2834 fhMixDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
2835 outputContainer->Add(fhMixDeltaPhiDeltaEtaCharged);
2838 new TH2F("hMixXECharged","Mixed event : #it{x}_{#it{E}} for charged tracks",
2839 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2840 fhMixXECharged->SetYTitle("#it{x}_{#it{E}}");
2841 fhMixXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2842 outputContainer->Add(fhMixXECharged);
2845 new TH2F("hMixXEUeCharged","Mixed event : #it{x}_{#it{E}} for charged tracks in Ue region",
2846 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2847 fhMixXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
2848 fhMixXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2849 outputContainer->Add(fhMixXEUeCharged);
2852 new TH2F("hMixHbpXECharged","mixed event : #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
2853 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2854 fhMixHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2855 fhMixHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2856 outputContainer->Add(fhMixHbpXECharged);
2858 fhMixDeltaPhiChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2859 fhMixDeltaPhiChargedAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
2860 fhMixDeltaPhiChargedAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
2861 fhMixDeltaPhiDeltaEtaChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2863 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2865 for(Int_t z = 0 ; z < nz ; z++)
2871 sz = Form("_vz%d",z);
2872 tz = Form(", #it{v}_{#it{z}} bin %d",z);
2875 //printf("MIX : iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
2877 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiDeltaEtaChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2878 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()),
2879 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2880 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
2881 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetYTitle("#Delta #eta");
2883 outputContainer->Add(fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]);
2885 fhMixDeltaPhiChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2886 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()),
2887 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2888 fhMixDeltaPhiChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2889 fhMixDeltaPhiChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
2891 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBin[bin]);
2893 if(fFillEtaGapsHisto)
2895 fhMixDeltaPhiChargedAssocPtBinDEta08[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0.8ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2896 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()),
2897 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2898 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2899 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
2901 fhMixDeltaPhiChargedAssocPtBinDEta0[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2902 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()),
2903 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2904 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2905 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
2907 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta08[bin]);
2908 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta0[bin]);
2914 return outputContainer;
2918 //_____________________________________________________________________________________________________________________
2919 Bool_t AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum(Int_t indexPhoton1, Int_t indexPhoton2, Int_t idetector)
2921 // Get the momentum of the pi0/eta assigned decay photons
2922 // In case of pi0/eta trigger, we may want to check their decay correlation,
2923 // get their decay children
2925 if(indexPhoton1!=-1 || indexPhoton2!=-1) return kFALSE;
2927 AliDebug(1,Form("indexPhoton1 = %d, indexPhoton2 = %d", indexPhoton1, indexPhoton2));
2929 TObjArray * clusters = 0x0 ;
2930 if(idetector==kEMCAL) clusters = GetEMCALClusters() ;
2931 else clusters = GetPHOSClusters() ;
2933 for(Int_t iclus = 0; iclus < clusters->GetEntriesFast(); iclus++)
2935 AliVCluster * photon = (AliVCluster*) (clusters->At(iclus));
2937 if(photon->GetID()==indexPhoton1) photon->GetMomentum(fDecayMom1,GetVertex(0)) ;
2938 if(photon->GetID()==indexPhoton2) photon->GetMomentum(fDecayMom2,GetVertex(0)) ;
2940 AliDebug(1,Form("Photon1 = %f, Photon2 = %f", fDecayMom1.Pt(), fDecayMom2.Pt()));
2948 //_____________________________________________________________
2949 Int_t AliAnaParticleHadronCorrelation::GetMCTagHistogramIndex(Int_t mcTag)
2951 // Index of MC histograms depending on MC origin
2953 if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPrompt) ||
2954 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCFragmentation)) return 0;
2955 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) ) return 1;
2956 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0Decay) ) return 2;
2957 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) ) return 3;
2958 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEtaDecay) ) return 4;
2959 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCOtherDecay) ) return 5;
2960 else if(!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron) ) return 6;
2965 //_________________________________________
2966 void AliAnaParticleHadronCorrelation::Init()
2971 if(!GetReader()->IsCTSSwitchedOn())
2972 AliFatal("STOP!: You want to use CTS tracks in analysis but not read!! \n!!Check the configuration file!!");
2975 //____________________________________________________
2976 void AliAnaParticleHadronCorrelation::InitParameters()
2979 //Initialize the parameters of the analysis.
2980 SetInputAODName("Particle");
2981 SetAODObjArrayName("Hadrons");
2982 AddToHistogramsName("AnaHadronCorr_");
2984 SetPtCutRange(0.,300);
2985 fDeltaPhiMinCut = TMath::DegToRad()*120.;
2986 fDeltaPhiMaxCut = TMath::DegToRad()*240. ;
2987 fSelectIsolated = kFALSE;
2988 fMakeSeveralUE = kFALSE;
2989 fUeDeltaPhiMinCut = TMath::DegToRad()*60.;
2990 fUeDeltaPhiMaxCut = TMath::DegToRad()*120 ;
2992 fNeutralCorr = kFALSE ;
2993 fPi0Trigger = kFALSE ;
2994 fDecayTrigger = kFALSE ;
2995 fHMPIDCorrelation = kFALSE ;
2997 fMakeAbsoluteLeading = kTRUE;
2998 fMakeNearSideLeading = kFALSE;
3001 fAssocPtBinLimit[0] = 0.2 ;
3002 fAssocPtBinLimit[1] = 0.5 ;
3003 fAssocPtBinLimit[2] = 1.0 ;
3004 fAssocPtBinLimit[3] = 2.0 ;
3005 fAssocPtBinLimit[4] = 3.0 ;
3006 fAssocPtBinLimit[5] = 4.0 ;
3007 fAssocPtBinLimit[6] = 5.0 ;
3008 fAssocPtBinLimit[7] = 6.0 ;
3009 fAssocPtBinLimit[8] = 7.0 ;
3010 fAssocPtBinLimit[9] = 8.0 ;
3011 fAssocPtBinLimit[10] = 9.0 ;
3012 fAssocPtBinLimit[11] = 10.0 ;
3013 fAssocPtBinLimit[12] = 12.0 ;
3014 fAssocPtBinLimit[13] = 14.0 ;
3015 fAssocPtBinLimit[14] = 16.0 ;
3016 fAssocPtBinLimit[15] = 20.0 ;
3017 fAssocPtBinLimit[16] = 30.0 ;
3018 fAssocPtBinLimit[17] = 40.0 ;
3019 fAssocPtBinLimit[18] = 50.0 ;
3020 fAssocPtBinLimit[19] = 200.0 ;
3022 fUseMixStoredInReader = kTRUE;
3027 fSelectLeadingHadronAngle = kFALSE;
3028 fFillLeadHadOppositeHisto = kFALSE;
3029 fMinLeadHadPhi = 150*TMath::DegToRad();
3030 fMaxLeadHadPhi = 210*TMath::DegToRad();
3033 fMaxLeadHadPt = 100;
3039 fDecayBits[0] = AliNeutralMesonSelection::kPi0;
3040 fDecayBits[1] = AliNeutralMesonSelection::kEta;
3041 fDecayBits[2] = AliNeutralMesonSelection::kPi0Side;
3042 fDecayBits[3] = AliNeutralMesonSelection::kEtaSide;
3045 //_________________________________________________________________________
3046 Bool_t AliAnaParticleHadronCorrelation::IsTriggerTheEventLeadingParticle()
3048 // Check if the what of the selected triggers is leading particle comparing
3049 // with all the triggers, all the tracks or all the clusters (if requested for the clusters).
3051 Double_t ptTrig = GetMinPt();
3052 Double_t phiTrig = 0 ;
3053 fLeadingTriggerIndex =-1 ;
3055 AliAODPWG4ParticleCorrelation* pLeading = 0;
3057 // Loop on stored AOD particles, find leading trigger on the selected list, with at least min pT.
3059 for(Int_t iaod = 0; iaod < GetInputAODBranch()->GetEntriesFast() ; iaod++)
3061 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
3062 particle->SetLeadingParticle(kFALSE); // set it later
3064 // Vertex cut in case of mixing
3065 Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0));
3066 if(check == 0) continue;
3067 if(check == -1) return kFALSE; // not sure if it is correct.
3069 // find the leading particles with highest momentum
3070 if (particle->Pt() > ptTrig)
3072 ptTrig = particle->Pt() ;
3073 phiTrig = particle->Phi();
3075 pLeading = particle ;
3077 }// finish search of leading trigger particle on the AOD branch.
3079 if(index < 0) return kFALSE;
3081 //printf("AOD leading pT %2.2f, ID %d\n", pLeading->Pt(),pLeading->GetCaloLabel(0));
3083 if(phiTrig < 0 ) phiTrig += TMath::TwoPi();
3085 // Compare if it is the leading of all tracks
3087 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
3089 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
3091 if(track->GetID() == pLeading->GetTrackLabel(0) || track->GetID() == pLeading->GetTrackLabel(1) ||
3092 track->GetID() == pLeading->GetTrackLabel(2) || track->GetID() == pLeading->GetTrackLabel(3) ) continue ;
3094 fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz());
3095 Float_t pt = fTrackVector.Pt();
3096 Float_t phi = fTrackVector.Phi() ;
3097 if(phi < 0) phi+=TMath::TwoPi();
3099 //jump out this event if near side associated particle pt larger than trigger
3100 if (fMakeNearSideLeading)
3102 Float_t deltaPhi = phiTrig-phi;
3103 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3104 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3106 if(pt > ptTrig && deltaPhi < TMath::PiOver2()) return kFALSE;
3108 //jump out this event if there is any other particle with pt larger than trigger
3111 if(pt > ptTrig) return kFALSE ;
3115 // Compare if it is leading of all calorimeter clusters
3117 if(fCheckLeadingWithNeutralClusters)
3119 // Select the calorimeter cluster list
3120 TObjArray * nePl = 0x0;
3121 if (pLeading->GetDetectorTag() == kPHOS )
3122 nePl = GetPHOSClusters();
3124 nePl = GetEMCALClusters();
3126 if(!nePl) return kTRUE; // Do the selection just with the tracks if no calorimeter is available.
3128 for(Int_t ipr = 0;ipr < nePl->GetEntriesFast() ; ipr ++ )
3130 AliVCluster * cluster = (AliVCluster *) (nePl->At(ipr)) ;
3132 if(cluster->GetID() == pLeading->GetCaloLabel(0) || cluster->GetID() == pLeading->GetCaloLabel(1) ) continue ;
3134 cluster->GetMomentum(fMomentum,GetVertex(0));
3136 Float_t pt = fMomentum.Pt();
3137 Float_t phi = fMomentum.Phi() ;
3138 if(phi < 0) phi+=TMath::TwoPi();
3140 if(IsTrackMatched(cluster,GetReader()->GetInputEvent())) continue ; // avoid charged clusters, already covered by tracks, or cluster merging with track.
3142 //jump out this event if near side associated particle pt larger than trigger
3143 // not really needed for calorimeter, unless DCal is included
3144 if (fMakeNearSideLeading)
3146 Float_t deltaPhi = phiTrig-phi;
3147 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3148 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3150 if(pt > ptTrig && deltaPhi < TMath::PiOver2()) return kFALSE ;
3152 //jump out this event if there is any other particle with pt larger than trigger
3155 if(pt > ptTrig) return kFALSE ;
3158 } // check neutral clusters
3160 fLeadingTriggerIndex = index ;
3161 pLeading->SetLeadingParticle(kTRUE);
3163 AliDebug(1,Form("\t particle AOD with index %d is leading with pT %2.2f", fLeadingTriggerIndex, pLeading->Pt()));
3169 //_________________________________________________________________
3170 void AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms()
3172 //Particle-Hadron Correlation Analysis, fill histograms
3174 if(!GetInputAODBranch())
3176 AliFatal(Form("No input particles in AOD with name branch < %s >, STOP",GetInputAODName().Data()));
3177 return ; // coverity
3180 Int_t naod = GetInputAODBranch()->GetEntriesFast();
3183 AliWarning("No particle AOD found!");
3184 return ; // no trigger particles found.
3187 AliDebug(1,Form("Begin hadron correlation analysis, fill histograms"));
3188 AliDebug(1,Form("n particle branch aod entries %d", naod));
3189 AliDebug(1,Form("In CTS aod entries %d",GetCTSTracks()->GetEntriesFast()));
3191 //------------------------------------------------------
3192 // Find leading trigger if analysis request only leading,
3193 // if there is no leading trigger, then skip the event
3196 if( fMakeAbsoluteLeading || fMakeNearSideLeading )
3198 Bool_t leading = IsTriggerTheEventLeadingParticle();
3200 AliDebug(1,Form("AOD Leading trigger? %d, with index %d",leading,fLeadingTriggerIndex));
3204 AliDebug(1,"Leading was requested and not found");
3209 // Select only the leading in the trigger AOD loop
3210 naod = fLeadingTriggerIndex+1 ;
3211 iaod = fLeadingTriggerIndex ;
3215 //------------------------------------------------------
3216 // Get event multiplicity and bins
3218 Float_t cen = GetEventCentrality();
3219 Float_t ep = GetEventPlaneAngle();
3220 if(IsHighMultiplicityAnalysisOn()) fhTriggerEventPlaneCentrality->Fill(cen,ep);
3222 Int_t mixEventBin = GetEventMixBin();
3223 Int_t vzbin = GetEventVzBin();
3225 //------------------------------------------------------
3226 // Loop on trigger AOD
3228 for( iaod = 0; iaod < naod; iaod++ )
3230 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
3233 // Trigger particle selection criteria:
3235 Float_t pt = particle->Pt();
3237 if(pt < GetMinPt() || pt > GetMaxPt() ) continue ;
3239 fhPtTriggerInput->Fill(pt);
3242 // check if it was a calorimeter cluster
3243 // and if the shower shape cut was requested apply it.
3244 // Not needed if already done at the particle identification level,
3245 // but for isolation studies, it is preferred not to remove so we do it here
3248 AliDebug(1,Form("%s Trigger : min %f, max %f, det %d",
3249 GetInputAODName().Data(),fM02MinCut,fM02MaxCut,particle->GetDetectorTag()));
3251 if(fM02MaxCut > 0 && fM02MinCut > 0) //clID1 > 0 && clID2 < 0 &&
3253 // Int_t iclus = -1;
3254 // TObjArray* clusters = 0x0;
3255 // if (particle->GetDetectorTag() == kEMCAL) clusters = GetEMCALClusters();
3256 // else if(particle->GetDetectorTag() == kPHOS ) clusters = GetPHOSClusters();
3260 // AliVCluster *cluster = FindCluster(clusters,clID1,iclus);
3261 // Float_t m02 = cluster->GetM02();
3262 // if(m02 > fM02MaxCut || m02 < fM02MinCut) continue ;
3265 Float_t m02 = particle->GetM02();
3267 if(m02 > fM02MaxCut || m02 < fM02MinCut) continue ;
3269 fhPtTriggerSSCut->Fill(pt);
3271 AliDebug(1,"Pass the shower shape cut");
3275 // Check if the particle is isolated or if we want to take the isolation into account
3276 // This bool is set in AliAnaParticleIsolation
3280 if( !particle->IsIsolated() ) continue;
3282 fhPtTriggerIsoCut->Fill(pt);
3284 AliDebug(1,"Pass the isolation cut");
3288 // Check if trigger is in fiducial region
3290 if(IsFiducialCutOn())
3292 Bool_t in = GetFiducialCut()->IsInFiducialCut(particle->Eta(),particle->Phi(),particle->GetDetectorTag()) ;
3294 if(! in ) continue ;
3296 AliDebug(1,"Pass the fiducial cut");
3299 fhPtTriggerFidCut->Fill(pt);
3301 //---------------------------------------
3304 // Find the leading hadron in the opposite hemisphere to the triggeer
3305 // and accept the trigger if leading is in defined window.
3306 Bool_t okLeadHad = kTRUE;
3307 if(fSelectLeadingHadronAngle || fFillLeadHadOppositeHisto)
3309 okLeadHad = FindLeadingOppositeHadronInWindow(particle);
3310 if(!okLeadHad && fSelectLeadingHadronAngle) continue;
3314 // Charged particles correlation
3316 MakeChargedCorrelation(particle);
3320 Int_t mcTag = particle->GetTag();
3321 Bool_t lostDecayPair = kFALSE;
3324 mcIndex = GetMCTagHistogramIndex(mcTag);
3325 lostDecayPair = GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost);
3326 MakeMCChargedCorrelation(particle->GetLabel(), mcIndex,lostDecayPair);
3329 // Do own mixed event with charged,
3330 // add event and remove previous or fill the mixed histograms
3332 MakeChargedMixCorrelation(particle);
3335 // Neutral particles correlation
3338 MakeNeutralCorrelation(particle);
3340 //----------------------------------------------------------------
3341 // Fill trigger pT related histograms if not absolute leading
3344 // pT of the trigger, vs trigger origin if MC
3346 fhPtTrigger->Fill(pt);
3347 if(IsDataMC() && mcIndex >=0 && mcIndex < fgkNmcTypes)
3349 fhPtTriggerMC[mcIndex]->Fill(pt);
3352 // check index in GetMCTagIndexHistogram
3353 if ( mcIndex == 2 ) fhPtTriggerMC[8]->Fill(pt); // pi0 decay
3354 else if( mcIndex == 4 ) fhPtTriggerMC[9]->Fill(pt); // eta decay
3360 Int_t decayTag = particle->DecayTag();
3361 if(decayTag < 0) decayTag = 0;
3363 for(Int_t ibit = 0; ibit<fNDecayBits; ibit++)
3365 if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit]))
3367 fhPtDecayTrigger[ibit]->Fill(pt);
3369 if(IsDataMC() && mcIndex >=0 && mcIndex < fgkNmcTypes)
3371 fhPtDecayTriggerMC[ibit][mcIndex]->Fill(pt);
3374 // check index in GetMCTagIndexHistogram
3375 if( mcIndex == 2 ) fhPtDecayTriggerMC[ibit][8]->Fill(pt); // pi0 decay
3376 if( mcIndex == 4 ) fhPtDecayTriggerMC[ibit][9]->Fill(pt); // eta decay
3384 // Acceptance of the trigger
3386 Float_t phi = particle->Phi();
3387 if( phi < 0 ) phi+=TMath::TwoPi();
3388 fhPhiTrigger->Fill(pt, phi);
3390 fhEtaTrigger->Fill(pt, particle->Eta());
3391 //printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Trigger particle : pt %f, eta %f, phi %f\n",particle->Pt(),particle->Eta(),phi);
3393 //----------------------------------
3394 // Trigger particle pT vs event bins
3396 fhPtTriggerBin->Fill(pt,mixEventBin);
3398 fhPtTriggerVzBin->Fill(pt,vzbin);
3400 if(IsHighMultiplicityAnalysisOn())
3402 fhPtTriggerCentrality->Fill(pt,cen);
3403 fhPtTriggerEventPlane->Fill(pt,ep);
3406 //----------------------------------
3407 // Trigger particle pT vs pile-up
3409 if(IsPileUpAnalysisOn())
3411 Int_t vtxBC = GetReader()->GetVertexBC();
3412 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA) fhPtTriggerVtxBC0->Fill(pt);
3414 if(GetReader()->IsPileUpFromSPD()) fhPtTriggerPileUp[0]->Fill(pt);
3415 if(GetReader()->IsPileUpFromEMCal()) fhPtTriggerPileUp[1]->Fill(pt);
3416 if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtTriggerPileUp[2]->Fill(pt);
3417 if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtTriggerPileUp[3]->Fill(pt);
3418 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtTriggerPileUp[4]->Fill(pt);
3419 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtTriggerPileUp[5]->Fill(pt);
3420 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtTriggerPileUp[6]->Fill(pt);
3422 } // AOD trigger loop
3424 //Reinit for next event
3425 fLeadingTriggerIndex = -1;
3427 AliDebug(1,"End fill histograms");
3430 //_______________________________________________________________________________________________________
3431 void AliAnaParticleHadronCorrelation::MakeChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
3433 // Charged Hadron Correlation Analysis
3434 AliDebug(1,"Make trigger particle - charged hadron correlation");
3436 Float_t phiTrig = aodParticle->Phi();
3437 Float_t etaTrig = aodParticle->Eta();
3438 Float_t ptTrig = aodParticle->Pt();
3439 Int_t mcTag = aodParticle->GetTag();
3440 Double_t bz = GetReader()->GetInputEvent()->GetMagneticField();
3446 //decay = aodParticle->IsTagged();
3447 decayTag = aodParticle->DecayTag();
3448 if(decayTag < 0) decayTag = 0;
3449 // printf("Correlation: pT %2.2f, BTag %d, Tagged %d\n",ptTrig, decayTag, aodParticle->IsTagged());
3450 // printf("\t check bit Pi0 %d, Eta %d, Pi0Side %d, EtaSide %d\n",
3451 // GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kPi0),
3452 // GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kEta),
3453 // GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kPi0Side),
3454 // GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kEtaSide));
3457 Float_t pt = -100. ;
3458 Float_t phi = -100. ;
3459 Float_t eta = -100. ;
3460 Float_t deltaPhi = -100. ;
3462 TObjArray * reftracks = 0x0;
3465 // Mixed event settings
3466 Int_t evtIndex11 = -1 ; // cluster trigger or pi0 trigger
3467 Int_t evtIndex12 = -1 ; // pi0 trigger
3468 Int_t evtIndex13 = -1 ; // charged trigger
3470 if (GetMixedEvent())
3472 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
3473 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
3474 evtIndex13 = GetMixedEvent()->EventIndex(aodParticle->GetTrackLabel(0)) ;
3477 // Track multiplicity or cent bin
3479 if(IsHighMultiplicityAnalysisOn()) cenbin = GetEventCentralityBin();
3482 // In case of pi0/eta trigger, we may want to check their decay correlation,
3483 // get their decay children
3486 Bool_t decayFound = kFALSE;
3489 decayFound = GetDecayPhotonMomentum(aodParticle->GetCaloLabel(0),aodParticle->GetCaloLabel(1),aodParticle->GetDetectorTag());
3492 fhPtPi0DecayRatio->Fill(ptTrig, fDecayMom1.Pt()/ptTrig);
3493 fhPtPi0DecayRatio->Fill(ptTrig, fDecayMom2.Pt()/ptTrig);
3497 //-----------------------------------------------------------------------
3498 // Track loop, select tracks with good pt, phi and fill AODs or histograms
3499 //-----------------------------------------------------------------------
3501 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
3503 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
3505 fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz());
3506 pt = fTrackVector.Pt();
3507 eta = fTrackVector.Eta();
3508 phi = fTrackVector.Phi() ;
3509 if(phi < 0) phi+=TMath::TwoPi();
3511 //Select only hadrons in pt range
3512 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
3514 //remove trigger itself for correlation when use charged triggers
3515 if( track->GetID() == aodParticle->GetTrackLabel(0) || track->GetID() == aodParticle->GetTrackLabel(1) ||
3516 track->GetID() == aodParticle->GetTrackLabel(2) || track->GetID() == aodParticle->GetTrackLabel(3) )
3519 //Only for mixed event frame
3520 Int_t evtIndex2 = 0 ;
3521 if (GetMixedEvent())
3523 evtIndex2 = GetMixedEvent()->EventIndex(track->GetID()) ;
3524 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 || evtIndex13 == evtIndex2 ) // photon and track from different events
3527 if (TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut())
3531 AliDebug(2,Form("Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f",pt,phi,eta));
3533 // ------------------------------
3534 // Track type bin or bits setting
3538 // * Set the pt associated bin for the defined bins *
3540 Int_t assocBin = -1;
3541 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3543 if(pt > fAssocPtBinLimit[i] && pt < fAssocPtBinLimit[i+1]) assocBin= i;
3547 // * Assign to the histogram array a bin corresponding
3548 // to a combination of pTa and vz bins *
3555 nz = GetNZvertBin();
3556 vz = GetEventVzBin();
3559 Int_t bin = assocBin*nz+vz;
3561 //printf("assoc Bin = %d, vZ bin = %d, bin = %d \n", assocBin,GetEventVzBin(),bin);
3564 // * Get the status of the TOF bit *
3566 ULong_t status = track->GetStatus();
3567 Bool_t okTOF = ( (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ) ;
3568 //Double32_t tof = track->GetTOFsignal()*1e-3;
3569 Int_t trackBC = track->GetTOFBunchCrossing(bz);
3572 if (okTOF && trackBC!=0) outTOF = 1;
3573 else if(okTOF && trackBC==0) outTOF = 0;
3579 // Azimuthal Angle histograms
3582 deltaPhi = phiTrig-phi;
3585 // Calculate deltaPhi shift so that for the particles on the opposite side
3586 // it is defined between 90 and 270 degrees
3587 // Shift [-360,-90] to [0, 270]
3588 // and [270,360] to [-90,0]
3589 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3590 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3592 FillChargedAngularCorrelationHistograms(pt, ptTrig, bin, phi, phiTrig, deltaPhi,
3593 eta, etaTrig, decayTag, track->GetHMPIDsignal(),
3594 outTOF, cenbin, mcTag);
3597 // Imbalance zT/xE/pOut histograms
3601 // Delta phi cut for momentum imbalance correlation
3603 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
3604 FillChargedMomentumImbalanceHistograms(ptTrig, pt, deltaPhi, cenbin, track->Charge(),
3605 assocBin, decayTag, outTOF, mcTag);
3608 // Underlying event, right side, default case
3610 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3611 FillChargedUnderlyingEventHistograms(ptTrig, pt, deltaPhi, cenbin, outTOF);
3614 // Several UE calculation, in different perpendicular regions, up to 6:
3615 // left, right, upper-left, lower left, upper-right, lower-right
3618 FillChargedUnderlyingEventSidesHistograms(ptTrig,pt,deltaPhi);
3621 if(fPi0Trigger && decayFound)
3622 FillDecayPhotonCorrelationHistograms(pt, phi, kTRUE) ;
3625 // Add track reference to array
3627 if(fFillAODWithReferences)
3632 reftracks = new TObjArray(0);
3633 TString trackname = Form("%sTracks", GetAODObjArrayName().Data());
3634 reftracks->SetName(trackname.Data());
3635 reftracks->SetOwner(kFALSE);
3638 reftracks->Add(track);
3639 }// reference track to AOD
3642 //Fill AOD with reference tracks, if not filling histograms
3643 if(fFillAODWithReferences && reftracks)
3645 aodParticle->AddObjArray(reftracks);
3650 //_________________________________________________________________________________________________________
3651 void AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
3653 // Mix current trigger with tracks in another MB event
3655 AliDebug(1,Form("Make trigger particle - charged hadron mixed event correlation"));
3657 if(GetMixedEvent()) return; // This is not the mixed event from general mixing frame
3659 // Get the event with similar caracteristics
3660 //printf("MakeChargedMixCorrelation for %s\n",GetInputAODName().Data());
3662 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
3664 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
3666 if(!inputHandler) return;
3668 if(!(inputHandler->IsEventSelected( ) & GetReader()->GetEventTriggerMask())) return;
3670 // Get the pool, check if it exits
3671 Int_t eventBin = GetEventMixBin();
3673 //Check that the bin exists, if not (bad determination of RP, ntrality or vz bin) do nothing
3674 if(eventBin < 0) return;
3676 fhEventBin->Fill(eventBin);
3678 // get neutral clusters pool?
3679 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
3680 Bool_t neutralMix = fFillNeutralEventMixPool || isoCase ;
3683 TList * poolCalo = 0;
3684 if(fUseMixStoredInReader)
3686 pool = GetReader()->GetListWithMixedEventsForTracks(eventBin);
3687 if(neutralMix) poolCalo = GetReader()->GetListWithMixedEventsForCalo (eventBin);
3691 pool = fListMixTrackEvents[eventBin];
3692 if(neutralMix) poolCalo = fListMixCaloEvents [eventBin];
3697 if( neutralMix && !poolCalo )
3698 AliWarning("Careful, cluster pool not available");
3700 Double_t ptTrig = aodParticle->Pt();
3701 Double_t etaTrig = aodParticle->Eta();
3702 Double_t phiTrig = aodParticle->Phi();
3703 if(phiTrig < 0.) phiTrig+=TMath::TwoPi();
3705 AliDebug(1,Form("Pool bin %d size %d, trigger trigger pt=%f, phi=%f, eta=%f",
3706 eventBin,pool->GetSize(), ptTrig,phiTrig,etaTrig));
3708 Double_t ptAssoc = -999.;
3709 Double_t phiAssoc = -999.;
3710 Double_t etaAssoc = -999.;
3711 Double_t deltaPhi = -999.;
3712 Double_t deltaEta = -999.;
3713 Double_t xE = -999.;
3715 // Start from first event in pool except if in this same event the pool was filled
3717 if(GetReader()->GetLastTracksMixedEvent() == GetEventNumber()) ev0 = 1;
3719 for(Int_t ev=ev0; ev < pool->GetSize(); ev++)
3722 // Recover the lists of tracks or clusters
3724 TObjArray* bgTracks = static_cast<TObjArray*>(pool->At(ev));
3725 TObjArray* bgCalo = 0;
3727 // Recover the clusters list if requested
3728 if( neutralMix && poolCalo )
3730 if(pool->GetSize()!=poolCalo->GetSize())
3731 AliWarning("Different size of calo and track pools");
3733 bgCalo = static_cast<TObjArray*>(poolCalo->At(ev));
3735 if(!bgCalo) AliDebug(1,Form("Event %d in calo pool not available?",ev));
3739 // Isolate the trigger in the mixed event with mixed tracks and clusters
3741 if( OnlyIsolated() )
3743 Int_t n=0, nfrac = 0;
3744 Bool_t isolated = kFALSE;
3745 Float_t coneptsum = 0, coneptlead = 0;
3746 GetIsolationCut()->MakeIsolationCut(bgTracks,bgCalo,
3747 GetReader(), GetCaloPID(),
3748 kFALSE, aodParticle, "",
3749 n,nfrac,coneptsum,coneptlead,isolated);
3751 //printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Isolated? %d - cone %f, ptthres %f",
3752 // isolated,GetIsolationCut()->GetConeSize(),GetIsolationCut()->GetPtThreshold());
3753 //if(bgTracks)printf(" - n track %d", bgTracks->GetEntriesFast());
3756 if(!isolated) continue ;
3760 // Check if the trigger is leading of mixed event
3762 Int_t nTracks=bgTracks->GetEntriesFast();
3764 if(fMakeNearSideLeading || fMakeAbsoluteLeading)
3766 Bool_t leading = kTRUE;
3767 for(Int_t jlead = 0;jlead < nTracks; jlead++ )
3769 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(jlead) ;
3771 ptAssoc = track->Pt();
3772 phiAssoc = track->Phi() ;
3773 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3775 if (fMakeNearSideLeading)
3777 deltaPhi = phiTrig-phiAssoc;
3778 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3779 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3781 if(ptAssoc > ptTrig && deltaPhi < TMath::PiOver2())
3787 //jump out this event if there is any other particle with pt larger than trigger
3788 else if(fMakeAbsoluteLeading)
3790 if(ptAssoc > ptTrig)
3798 if( !neutralMix && fCheckLeadingWithNeutralClusters )
3799 AliWarning("Leading of clusters requested but no clusters in mixed event");
3801 if(neutralMix && fCheckLeadingWithNeutralClusters && bgCalo)
3803 Int_t nClusters=bgCalo->GetEntriesFast();
3804 for(Int_t jlead = 0;jlead <nClusters; jlead++ )
3806 AliAODPWG4Particle *cluster= (AliAODPWG4Particle*) bgCalo->At(jlead) ;
3808 ptAssoc = cluster->Pt();
3809 phiAssoc = cluster->Phi() ;
3810 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3812 if (fMakeNearSideLeading)
3814 deltaPhi = phiTrig-phiAssoc;
3815 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3816 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3818 if(ptAssoc > ptTrig && deltaPhi < TMath::PiOver2())
3824 //jump out this event if there is any other particle with pt larger than trigger
3825 else if(fMakeAbsoluteLeading)
3827 if(ptAssoc > ptTrig)
3836 if(!leading) continue; // not leading, check the next event in pool
3840 // Fill histograms for selected triggers
3843 fhEventMixBin->Fill(eventBin);
3845 //printf("\t Read Pool event %d, nTracks %d\n",ev,nTracks);
3847 fhPtTriggerMixed ->Fill(ptTrig);
3848 fhPhiTriggerMixed ->Fill(ptTrig, phiTrig);
3849 fhEtaTriggerMixed ->Fill(ptTrig, etaTrig);
3850 fhPtTriggerMixedBin->Fill(ptTrig,eventBin);
3851 if(fCorrelVzBin)fhPtTriggerMixedVzBin->Fill(ptTrig, GetEventVzBin());
3854 // Correlation histograms
3856 for(Int_t j1 = 0;j1 <nTracks; j1++ )
3858 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(j1) ;
3860 if(!track) continue;
3862 ptAssoc = track->Pt();
3863 etaAssoc = track->Eta();
3864 phiAssoc = track->Phi() ;
3865 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3867 deltaPhi = phiTrig-phiAssoc;
3868 if(deltaPhi < -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3869 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3870 deltaEta = etaTrig-etaAssoc;
3872 AliDebug(1,Form("deltaPhi= %f, deltaEta=%f",deltaPhi, deltaEta));
3874 // Angular correlation
3875 fhMixDeltaPhiCharged ->Fill(ptTrig, deltaPhi);
3876 fhMixDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
3879 // Momentum imbalance
3881 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
3883 xE = -ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3886 AliWarning(Form("Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
3887 xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
3889 fhMixXECharged->Fill(ptTrig,xE);
3890 if(xE > 0 ) fhMixHbpXECharged->Fill(ptTrig, TMath::Log(1./xE));
3894 // Underlying event momentum imbalance
3896 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3898 //Underlying event region
3899 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
3900 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
3903 AliWarning(Form("Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
3904 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
3906 fhMixXEUeCharged->Fill(ptTrig,uexE);
3909 // Set the pt associated bin for the defined bins
3910 Int_t assocBin = -1;
3911 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3913 if(ptAssoc > fAssocPtBinLimit[i] && ptAssoc < fAssocPtBinLimit[i+1]) assocBin= i;
3917 // Assign to the histogram array a bin corresponding to a combination of pTa and vz bins
3924 nz = GetNZvertBin();
3925 vz = GetEventVzBin();
3928 Int_t bin = assocBin*nz+vz;
3930 if(bin < 0) continue ; // this pt bin was not considered
3932 fhMixDeltaPhiChargedAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
3933 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->Fill(deltaPhi, deltaEta);
3935 if(fFillEtaGapsHisto)
3937 if(TMath::Abs(deltaEta) > 0.8)
3938 fhMixDeltaPhiChargedAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
3939 if(TMath::Abs(deltaEta) < 0.01)
3940 fhMixDeltaPhiChargedAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
3944 } // mixed event loop
3948 //_______________________________________________________________________________________________________
3949 void AliAnaParticleHadronCorrelation::MakeNeutralCorrelation(AliAODPWG4ParticleCorrelation * aodParticle)
3951 // Neutral Pion Correlation Analysis
3953 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); // For the future, foresee more possible pi0 lists
3954 if(!pi0list) return ;
3956 Int_t npi0 = pi0list->GetEntriesFast();
3957 if(npi0 == 0) return ;
3959 AliDebug(1,Form("Particle - pi0 correlation, %d pi0's",npi0));
3961 Int_t evtIndex11 = 0 ;
3962 Int_t evtIndex12 = 0 ;
3963 if (GetMixedEvent())
3965 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
3966 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
3969 Float_t pt = -100. ;
3970 Float_t zT = -100. ;
3971 Float_t phi = -100. ;
3972 Float_t eta = -100. ;
3973 Float_t xE = -100. ;
3974 Float_t hbpXE= -100. ;
3975 Float_t hbpZT= -100. ;
3977 Float_t ptTrig = aodParticle->Pt();
3978 Float_t phiTrig = aodParticle->Phi();
3979 Float_t etaTrig = aodParticle->Eta();
3980 Float_t deltaPhi= -100. ;
3981 Float_t deltaEta= -100. ;
3983 // In case of pi0/eta trigger, we may want to check their decay correlation,
3984 // get their decay children
3986 Bool_t decayFound = kFALSE;
3987 if(fPi0Trigger) decayFound = GetDecayPhotonMomentum(aodParticle->GetCaloLabel(0),aodParticle->GetCaloLabel(1),aodParticle->GetDetectorTag());
3989 TObjArray * refpi0 = 0x0;
3992 //Loop on stored AOD pi0
3994 for(Int_t iaod = 0; iaod < npi0 ; iaod++)
3996 AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (pi0list->At(iaod));
3998 Int_t evtIndex2 = 0 ;
3999 Int_t evtIndex3 = 0 ;
4000 if (GetMixedEvent())
4002 evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(0)) ;
4003 evtIndex3 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(1)) ;
4005 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 ||
4006 evtIndex11 == evtIndex3 || evtIndex12 == evtIndex3) // trigger and pi0 are not from different events
4012 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
4014 //remove trigger itself for correlation when use charged triggers
4015 if(aodParticle->GetCaloLabel(0) >= 0 &&
4016 (pi0->GetCaloLabel(0) == aodParticle->GetCaloLabel(0) || pi0->GetCaloLabel(1) == aodParticle->GetCaloLabel(0))) continue ;
4018 if( aodParticle->GetCaloLabel(1) >= 0 &&
4019 (pi0->GetCaloLabel(0) == aodParticle->GetCaloLabel(1) || pi0->GetCaloLabel(1) == aodParticle->GetCaloLabel(1))) continue ;
4022 // Angular correlations
4026 deltaEta = etaTrig-eta;
4027 deltaPhi = phiTrig-phi;
4028 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
4029 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
4031 fhEtaNeutral ->Fill(pt , eta );
4032 fhPhiNeutral ->Fill(pt , phi );
4033 fhDeltaEtaNeutral->Fill(ptTrig, deltaEta);
4034 fhDeltaPhiNeutral->Fill(ptTrig, deltaPhi);
4036 if(pt > 2 ) fhDeltaPhiDeltaEtaNeutral->Fill(deltaPhi, deltaEta);
4039 // Momentum imbalance
4046 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
4048 //delta phi cut for correlation
4049 if( (deltaPhi > fDeltaPhiMinCut) && ( deltaPhi < fDeltaPhiMaxCut) )
4051 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
4054 AliWarning(Form("Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
4055 xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
4057 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
4059 fhDeltaPhiNeutralPt->Fill(pt,deltaPhi);
4060 fhXENeutral ->Fill(ptTrig,xE);
4061 fhPtHbpXENeutral ->Fill(ptTrig,hbpXE);
4062 fhZTNeutral ->Fill(ptTrig,zT);
4063 fhPtHbpZTNeutral ->Fill(ptTrig,hbpZT);
4065 else if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
4067 // Randomize angle for xE calculation
4068 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
4070 xE = -(pt/ptTrig)*TMath::Cos(randomphi);
4071 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
4073 fhDeltaPhiUeNeutralPt->Fill(pt,deltaPhi);
4074 fhZTUeNeutral ->Fill(ptTrig,zT);
4075 fhPtHbpZTUeNeutral ->Fill(ptTrig,hbpZT);
4076 fhXEUeNeutral ->Fill(ptTrig,xE);
4077 fhPtHbpXEUeNeutral ->Fill(ptTrig,hbpXE);
4080 // Several UE calculation, not sure it is useful
4081 // with partical calorimter acceptance
4082 if(fMakeSeveralUE) FillNeutralUnderlyingEventSidesHistograms(ptTrig,pt,zT,hbpZT,deltaPhi);
4085 // Decay photon correlations
4087 if(fPi0Trigger && decayFound)
4088 FillDecayPhotonCorrelationHistograms(pt, phi, kFALSE) ;
4090 if(fFillAODWithReferences)
4095 refpi0 = new TObjArray(0);
4096 refpi0->SetName(GetAODObjArrayName()+"Pi0s");
4097 refpi0->SetOwner(kFALSE);
4100 } // put references in trigger AOD
4102 AliDebug(1,Form("Selected pi0: pt %2.2f, phi %2.2f, eta %2.2f",pt,phi,eta));
4106 //Fill AOD with reference tracks, if not filling histograms
4107 if(fFillAODWithReferences && refpi0)
4109 aodParticle->AddObjArray(refpi0);
4113 //__________________________________________________________________________________________________________________
4114 void AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(Int_t label, Int_t histoIndex, Bool_t lostDecayPair)
4116 // Charged Hadron Correlation Analysis with MC information
4118 AliDebug(1,"Make trigger particle - charged hadron correlation in AOD MC level");
4122 AliDebug(1,Form(" *** bad label ***: label %d", label));
4126 // Do MC correlation for a given particle type range.
4127 // Types defined in GetMCTagHistogramIndex:
4128 // 0 direct gamma; 1 pi0; 2 pi0 decay; 3 eta decay; 4 other decay; 5 electron; 6 other (hadron)
4129 if(histoIndex < fMCGenTypeMin || histoIndex > fMCGenTypeMax) return ;
4131 AliStack * stack = 0x0 ;
4132 TParticle * primary = 0x0 ;
4133 TClonesArray * mcparticles = 0x0 ;
4134 AliAODMCParticle * aodprimary = 0x0 ;
4136 Double_t eprim = 0 ;
4137 Double_t ptprim = 0 ;
4138 Double_t phiprim = 0 ;
4139 Double_t etaprim = 0 ;
4141 Int_t iParticle = 0 ;
4143 Bool_t leadTrig = kTRUE;
4145 if( GetReader()->ReadStack() )
4147 stack = GetMCStack() ;
4150 AliFatal("Stack not available, is the MC handler called? STOP");
4154 //nTracks = stack->GetNtrack() ;
4155 nTracks = stack->GetNprimary();
4156 if( label >= stack->GetNtrack() )
4159 AliInfo(Form("*** large label ***: label %d, n tracks %d", label, stack->GetNtrack()));
4163 primary = stack->Particle(label);
4166 AliInfo(Form(" *** no primary ***: label %d", label));
4170 eprim = primary->Energy();
4171 ptprim = primary->Pt();
4172 etaprim = primary->Eta();
4173 phiprim = primary->Phi();
4174 if(phiprim < 0) phiprim+=TMath::TwoPi();
4176 if(ptprim < 0.01 || eprim < 0.01) return ;
4178 for (iParticle = 0 ; iParticle < nTracks ; iParticle++)
4180 TParticle * particle = stack->Particle(iParticle);
4182 //keep only final state particles
4183 if( particle->GetStatusCode() != 1 ) continue ;
4185 //---------- Charged particles ----------------------
4186 Int_t pdg = particle->GetPdgCode();
4187 Int_t charge = (Int_t) TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
4188 if(charge == 0) continue;
4190 particle->Momentum(fMomentum);
4192 //Particles in CTS acceptance, make sure to use the same selection as in the reader
4193 Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(fMomentum.Eta(),fMomentum.Phi(),kCTS);
4194 //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,fMomentum.Pt(),fMomentum.Eta(),fMomentum.Phi()*TMath::RadToDeg());
4195 if( !inCTS ) continue;
4197 // Remove conversions
4198 if ( TMath::Abs(pdg) == 11 && stack->Particle(particle->GetFirstMother())->GetPdgCode() == 22 ) continue ;
4200 if ( label == iParticle ) continue; // avoid trigger particle
4202 Float_t phi = particle->Phi();
4203 if(phi < 0) phi+=TMath::TwoPi();
4205 Bool_t lead = FillChargedMCCorrelationHistograms(particle->Pt(),phi,particle->Eta(),ptprim,phiprim,etaprim,histoIndex,lostDecayPair);
4206 if(!lead) leadTrig = kFALSE;
4207 //if ( !lead && (fMakeAbsoluteLeading || fMakeNearSideLeading) ) return;
4213 else if( GetReader()->ReadAODMCParticles() )
4215 //Get the list of MC particles
4216 mcparticles = GetReader()->GetAODMCParticles();
4217 if( !mcparticles ) return;
4219 nTracks = mcparticles->GetEntriesFast() ;
4221 if( label >= nTracks )
4224 AliInfo(Form(" *** large label ***: label %d, n tracks %d", label,nTracks));
4229 aodprimary = (AliAODMCParticle*) mcparticles->At(label);
4232 AliInfo(Form(" *** no AOD primary ***: label %d", label));
4236 eprim = aodprimary->E();
4237 ptprim = aodprimary->Pt();
4238 etaprim = aodprimary->Eta();
4239 phiprim = aodprimary->Phi();
4240 if(phiprim < 0) phiprim+=TMath::TwoPi();
4242 if(ptprim < 0.01 || eprim < 0.01) return ;
4244 for (iParticle = 0; iParticle < nTracks; iParticle++)
4246 AliAODMCParticle *part = (AliAODMCParticle*) mcparticles->At(iParticle);
4248 if (!part->IsPhysicalPrimary() ) continue; // same as part->GetStatus() !=1
4250 if ( part->Charge() == 0 ) continue;
4252 fMomentum.SetPxPyPzE(part->Px(),part->Py(),part->Pz(),part->E());
4254 //Particles in CTS acceptance, make sure to use the same selection as in the reader
4255 Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(fMomentum.Eta(),fMomentum.Phi(),kCTS);
4256 //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,fMomentum.Pt(),fMomentum.Eta(),fMomentum.Phi()*TMath::RadToDeg());
4257 if( !inCTS ) continue;
4259 // Remove conversions
4260 Int_t indexmother = part->GetMother();
4261 if ( indexmother > -1 )
4263 Int_t pdg = part->GetPdgCode();
4264 Int_t mPdg = ((AliAODMCParticle*) mcparticles->At(indexmother)) ->GetPdgCode();
4265 if (TMath::Abs(pdg) == 11 && mPdg == 22) continue;
4268 if ( label == iParticle ) continue; // avoid trigger particle
4270 Float_t phi = part->Phi();
4271 if(phi < 0) phi+=TMath::TwoPi();
4273 Bool_t lead = FillChargedMCCorrelationHistograms(part->Pt(),phi,part->Eta(),ptprim,phiprim,etaprim, histoIndex,lostDecayPair);
4274 if(!lead) leadTrig = kFALSE;
4275 //if ( !lead && (fMakeAbsoluteLeading || fMakeNearSideLeading)) return;
4277 } //MC particle loop
4280 // Trigger MC particle histograms
4281 //if (!lead && (fMakeAbsoluteLeading || fMakeNearSideLeading)) return;
4283 fhMCPtTrigger [histoIndex]->Fill(ptprim);
4284 fhMCPhiTrigger[histoIndex]->Fill(ptprim,phiprim);
4285 fhMCEtaTrigger[histoIndex]->Fill(ptprim,etaprim);
4289 // check index in GetMCTagIndexHistogram
4290 if (histoIndex == 2 && 8 >= fMCGenTypeMin && 8 <= fMCGenTypeMax )
4293 fhMCPtTrigger [8]->Fill(ptprim);
4294 fhMCPhiTrigger[8]->Fill(ptprim,phiprim);
4295 fhMCEtaTrigger[8]->Fill(ptprim,etaprim);
4297 else if(histoIndex == 4 && 9 >= fMCGenTypeMin && 9 <= fMCGenTypeMax )
4300 fhMCPtTrigger [9]->Fill(ptprim);
4301 fhMCPhiTrigger[9]->Fill(ptprim,phiprim);
4302 fhMCEtaTrigger[9]->Fill(ptprim,etaprim);
4306 if(!leadTrig && (fMakeAbsoluteLeading || fMakeNearSideLeading) )
4308 AliDebug(1,Form("Not leading primary trigger: pT %2.2f, phi %2.2f, eta %2.2f",
4309 ptprim,phiprim*TMath::RadToDeg(),etaprim));
4311 fhMCPtTriggerNotLeading [histoIndex]->Fill(ptprim);
4312 fhMCPhiTriggerNotLeading[histoIndex]->Fill(ptprim,phiprim);
4313 fhMCEtaTriggerNotLeading[histoIndex]->Fill(ptprim,etaprim);
4317 // check index in GetMCTagIndexHistogram
4318 if (histoIndex == 2 && 8 >= fMCGenTypeMin && 8 <= fMCGenTypeMax )
4321 fhMCPtTriggerNotLeading [8]->Fill(ptprim);
4322 fhMCPhiTriggerNotLeading[8]->Fill(ptprim,phiprim);
4323 fhMCEtaTriggerNotLeading[8]->Fill(ptprim,etaprim);
4325 else if(histoIndex == 4 && 9 >= fMCGenTypeMin && 9 <= fMCGenTypeMax )
4328 fhMCPtTriggerNotLeading [9]->Fill(ptprim);
4329 fhMCPhiTriggerNotLeading[9]->Fill(ptprim,phiprim);
4330 fhMCEtaTriggerNotLeading[9]->Fill(ptprim,etaprim);
4336 //_____________________________________________________________________
4337 void AliAnaParticleHadronCorrelation::Print(const Option_t * opt) const
4340 //Print some relevant parameters set for the analysis
4344 printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
4345 AliAnaCaloTrackCorrBaseClass::Print(" ");
4346 printf("Pt trigger > %2.2f; < %2.2f\n", GetMinPt() , GetMaxPt()) ;
4347 printf("Pt associa > %2.2f; < %2.2f\n", fMinAssocPt, fMaxAssocPt) ;
4348 printf("Phi trigger particle-Hadron < %3.2f\n", fDeltaPhiMaxCut) ;
4349 printf("Phi trigger particle-Hadron > %3.2f\n", fDeltaPhiMinCut) ;
4350 printf("Phi trigger particle-UeHadron < %3.2f\n", fUeDeltaPhiMaxCut) ;
4351 printf("Phi trigger particle-UeHadron > %3.2f\n", fUeDeltaPhiMinCut) ;
4352 printf("Isolated Trigger? %d\n" , fSelectIsolated) ;
4353 printf("Several UE? %d\n" , fMakeSeveralUE) ;
4354 printf("Name of AOD Pi0 Branch %s \n", fPi0AODBranchName.Data());
4355 printf("Do Decay-hadron correlation ? %d\n", fPi0Trigger) ;
4356 printf("Select absolute leading for cluster triggers ? %d or Near Side %d\n",
4357 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
4358 printf("Trigger pt bins %d\n", fNAssocPtBins) ;
4359 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
4360 printf("\t bin %d = [%2.1f,%2.1f]\n", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
4365 //____________________________________________________________
4366 void AliAnaParticleHadronCorrelation::SetNAssocPtBins(Int_t n)
4368 // Set number of bins
4378 AliWarning("n = larger than 19 or too small, set to 19");
4383 //______________________________________________________________________________
4384 void AliAnaParticleHadronCorrelation::SetAssocPtBinLimit(Int_t ibin, Float_t pt)
4386 // Set the list of limits for the trigger pt bins
4388 if(ibin <= fNAssocPtBins || ibin >= 0)
4390 fAssocPtBinLimit[ibin] = pt ;
4394 AliWarning(Form("Bin number too large %d > %d or small, nothing done", ibin, fNAssocPtBins)) ;