1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 //_________________________________________________________________________
17 // Class for the analysis of particle - hadron correlations
18 // Particle (for example direct gamma) must be found
19 // in a previous analysis
21 //-- Author: Gustavo Conesa (LNF-INFN) (LPSC-IN2P3-CNRS)
22 // Yaxian Mao (LPSC-IN2P3-CNRS) and (CNWU) first usable implementation.
23 // Xiangrong Zhu (CNWU), implementtion of own mixing.
24 //////////////////////////////////////////////////////////////////////////////
27 // --- ROOT system ---
28 //#include "TClonesArray.h"
32 #include <TDatabasePDG.h>
34 //---- ANALYSIS system ----
35 #include "AliNeutralMesonSelection.h"
36 #include "AliAnaParticleHadronCorrelation.h"
37 #include "AliCaloTrackReader.h"
38 #include "AliAODPWG4ParticleCorrelation.h"
39 #include "AliFiducialCut.h"
40 #include "AliVTrack.h"
41 #include "AliVCluster.h"
42 #include "AliMCAnalysisUtils.h"
43 #include "TParticle.h"
45 #include "AliAODMCParticle.h"
46 #include "AliMixedEvent.h"
47 #include "AliAnalysisManager.h"
48 #include "AliInputEventHandler.h"
49 #include "AliEventplane.h"
51 ClassImp(AliAnaParticleHadronCorrelation)
54 //___________________________________________________________________
55 AliAnaParticleHadronCorrelation::AliAnaParticleHadronCorrelation():
56 AliAnaCaloTrackCorrBaseClass(),
57 fFillAODWithReferences(0), fCheckLeadingWithNeutralClusters(0),
58 fMaxAssocPt(1000.), fMinAssocPt(0.),
59 fDeltaPhiMaxCut(0.), fDeltaPhiMinCut(0.),
60 fSelectIsolated(0), fMakeSeveralUE(0),
61 fUeDeltaPhiMaxCut(0.), fUeDeltaPhiMinCut(0.),
62 fPi0AODBranchName(""), fNeutralCorr(0),
63 fPi0Trigger(0), fDecayTrigger(0),
64 fMakeAbsoluteLeading(0), fMakeNearSideLeading(0),
65 fLeadingTriggerIndex(-1), fHMPIDCorrelation(0), fFillBradHisto(0),
66 fNAssocPtBins(0), fAssocPtBinLimit(),
68 fListMixTrackEvents(), fListMixCaloEvents(),
69 fUseMixStoredInReader(0), fFillNeutralEventMixPool(0),
70 fM02MaxCut(0), fM02MinCut(0),
71 fFillPileUpHistograms(0), fFillHighMultHistograms(0),
72 fSelectLeadingHadronAngle(0),
73 fMinLeadHadPhi(0), fMaxLeadHadPhi(0),
74 fMinLeadHadPt(0), fMaxLeadHadPt(0),
75 fFillEtaGapsHisto(1), fFillMomImbalancePtAssocBinsHisto(0),
76 fMCGenTypeMin(0), fMCGenTypeMax(0),
78 fhPtTriggerInput(0), fhPtTriggerSSCut(0),
79 fhPtTriggerIsoCut(0), fhPtTriggerFidCut(0),
80 fhPtTrigger(0), fhPtTriggerVtxBC0(0),
81 fhPtTriggerVzBin(0), fhPtTriggerBin(0),
82 fhPhiTrigger(0), fhEtaTrigger(0),
84 fhPtTriggerCentrality(0), fhPtTriggerEventPlane(0),
85 fhTriggerEventPlaneCentrality(0),
86 fhPtTriggerMixed(0), fhPtTriggerMixedVzBin(0), fhPtTriggerMixedBin(0),
87 fhPhiTriggerMixed(0), fhEtaTriggerMixed(0),
88 fhPtLeadingOppositeHadron(0), fhPtDiffPhiLeadingOppositeHadron(0), fhPtDiffEtaLeadingOppositeHadron(0),
89 fhDeltaPhiDeltaEtaCharged(0),
90 fhPhiCharged(0), fhEtaCharged(0),
91 fhDeltaPhiCharged(0), fhDeltaEtaCharged(0),
92 fhDeltaPhiChargedPt(0), fhDeltaPhiUeChargedPt(0),
94 fhXECharged(0), fhXECharged_Cone2(0), fhXEUeCharged(0),
95 fhXEPosCharged(0), fhXENegCharged(0),
96 fhPtHbpXECharged(0), fhPtHbpXECharged_Cone2(0), fhPtHbpXEUeCharged(0),
97 fhZTCharged(0), fhZTUeCharged(0),
98 fhZTPosCharged(0), fhZTNegCharged(0),
99 fhPtHbpZTCharged(0), fhPtHbpZTUeCharged(0),
100 fhXEChargedMC(), fhDeltaPhiChargedMC(),
101 fhDeltaPhiDeltaEtaChargedPtA3GeV(0),
102 fhDeltaPhiChargedPtA3GeV(0), fhDeltaEtaChargedPtA3GeV(0),
104 fhDeltaPhiChargedPileUp(), fhDeltaEtaChargedPileUp(),
105 fhDeltaPhiChargedPtA3GeVPileUp(), fhDeltaEtaChargedPtA3GeVPileUp(),
106 fhXEChargedPileUp(), fhXEUeChargedPileUp(),
107 fhZTChargedPileUp(), fhZTUeChargedPileUp(),
108 fhPtTrigChargedPileUp(),
109 fhDeltaPhiChargedOtherBC(), fhDeltaPhiChargedPtA3GeVOtherBC(),
110 fhXEChargedOtherBC(), fhXEUeChargedOtherBC(),
111 fhZTChargedOtherBC(), fhZTUeChargedOtherBC(),
112 fhPtTrigChargedOtherBC(),
113 fhDeltaPhiChargedBC0(), fhDeltaPhiChargedPtA3GeVBC0(),
114 fhXEChargedBC0(), fhXEUeChargedBC0(),
115 fhZTChargedBC0(), fhZTUeChargedBC0(),
116 fhPtTrigChargedBC0(),
117 fhDeltaPhiChargedVtxBC0(), fhDeltaPhiChargedPtA3GeVVtxBC0(),
118 fhXEChargedVtxBC0(), fhXEUeChargedVtxBC0(),
119 fhZTChargedVtxBC0(), fhZTUeChargedVtxBC0(),
120 fhPtTrigChargedVtxBC0(),
121 fhDeltaPhiUeLeftCharged(0),
122 fhDeltaPhiUeLeftUpCharged(0), fhDeltaPhiUeRightUpCharged(0),
123 fhDeltaPhiUeLeftDownCharged(0), fhDeltaPhiUeRightDownCharged(0),
124 fhXEUeLeftCharged(0),
125 fhXEUeLeftUpCharged(0), fhXEUeRightUpCharged(0),
126 fhXEUeLeftDownCharged(0), fhXEUeRightDownCharged(0),
127 fhPtHbpXEUeLeftCharged(0), fhZTUeLeftCharged(0),
128 fhPtHbpZTUeLeftCharged(0),
129 fhPtTrigPout(0), fhPtTrigCharged(0),
130 fhDeltaPhiChargedMult(0x0), fhDeltaEtaChargedMult(0x0),
131 fhXEMult(0x0), fhXEUeMult(0x0),
132 fhZTMult(0x0), fhZTUeMult(0x0),
133 fhAssocPtBkg(0), fhDeltaPhiDeltaEtaAssocPtBin(0),
134 fhDeltaPhiAssocPtBin(0),
135 fhDeltaPhiAssocPtBinDEta08(0), fhDeltaPhiAssocPtBinDEta0(0),
136 fhDeltaPhiAssocPtBinHMPID(0), fhDeltaPhiAssocPtBinHMPIDAcc(0),
137 fhDeltaPhiBradAssocPtBin(0), fhDeltaPhiBrad(0),
138 fhXEAssocPtBin(0), fhZTAssocPtBin(0),
139 fhXEVZ(0), fhZTVZ(0),
140 fhDeltaPhiDeltaEtaNeutral(0),
141 fhPhiNeutral(0), fhEtaNeutral(0),
142 fhDeltaPhiNeutral(0), fhDeltaEtaNeutral(0),
143 fhDeltaPhiNeutralPt(0), fhDeltaPhiUeNeutralPt(0),
144 fhXENeutral(0), fhXEUeNeutral(0),
145 fhPtHbpXENeutral(0), fhPtHbpXEUeNeutral(0),
146 fhZTNeutral(0), fhZTUeNeutral(0),
147 fhPtHbpZTNeutral(0), fhPtHbpZTUeNeutral(0),
148 fhDeltaPhiUeLeftNeutral(0), fhXEUeLeftNeutral(0),
149 fhPtHbpXEUeLeftNeutral(0), fhZTUeLeftNeutral(0),
150 fhPtHbpZTUeLeftNeutral(0), fhPtPi0DecayRatio(0),
151 fhDeltaPhiDecayCharged(0), fhXEDecayCharged(0), fhZTDecayCharged(0),
152 fhDeltaPhiDecayNeutral(0), fhXEDecayNeutral(0), fhZTDecayNeutral(0),
153 fhDeltaPhiDecayChargedAssocPtBin(0),
154 fhMCPtTrigger(), fhMCPhiTrigger(), fhMCEtaTrigger(),
155 fhMCPtTriggerNotLeading(), fhMCPhiTriggerNotLeading(), fhMCEtaTriggerNotLeading(),
156 fhMCEtaCharged(), fhMCPhiCharged(),
157 fhMCDeltaEtaCharged(), fhMCDeltaPhiCharged(),
158 fhMCDeltaPhiDeltaEtaCharged(), fhMCDeltaPhiChargedPt(),
159 fhMCPtXECharged(), fhMCPtXEUeCharged(),
160 fhMCPtXEUeLeftCharged(),
161 fhMCPtHbpXECharged(), fhMCPtHbpXEUeCharged(),
162 fhMCPtHbpXEUeLeftCharged(),
164 fhMCPtZTCharged(), fhMCPtZTUeCharged(),
165 fhMCPtZTUeLeftCharged(),
166 fhMCPtHbpZTCharged(), fhMCPtHbpZTUeCharged(),
167 fhMCPtHbpZTUeLeftCharged(),
168 fhMCPtTrigPout(), fhMCPtAssocDeltaPhi(),
170 fhNEventsTrigger(0), fhNtracksMB(0), fhNclustersMB(0),
171 fhMixDeltaPhiCharged(0), fhMixDeltaPhiDeltaEtaCharged(0),
172 fhMixXECharged(0), fhMixXEUeCharged(0), fhMixHbpXECharged(0),
173 fhMixDeltaPhiChargedAssocPtBin(),
174 fhMixDeltaPhiChargedAssocPtBinDEta08(),
175 fhMixDeltaPhiChargedAssocPtBinDEta0(),
176 fhMixDeltaPhiDeltaEtaChargedAssocPtBin(),
177 fhEventBin(0), fhEventMixBin(0), fhEventMBBin(0)
181 //Initialize parameters
184 for(Int_t i = 0; i < 7; i++)
186 fhPtTriggerMC[i] = 0;
187 fhXEChargedMC[i] = 0;
188 fhDeltaPhiChargedMC[i] = 0;
191 for(Int_t i = 0; i < 7; i++)
193 fhPtTriggerPileUp [i] = 0 ;
194 fhDeltaPhiChargedPileUp [i] = 0 ; fhDeltaEtaChargedPileUp [i] = 0 ;
195 fhXEChargedPileUp [i] = 0 ; fhXEUeChargedPileUp [i] = 0 ;
196 fhZTChargedPileUp [i] = 0 ; fhZTUeChargedPileUp [i] = 0 ;
197 fhPtTrigChargedPileUp [i] = 0 ;
198 fhDeltaPhiChargedPtA3GeVPileUp[i] = 0 ; fhDeltaEtaChargedPtA3GeVPileUp[i] = 0 ;
203 //_________________________________________________________________
204 AliAnaParticleHadronCorrelation::~AliAnaParticleHadronCorrelation()
206 // Remove event containers
210 if(fListMixTrackEvents)
212 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
214 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
216 for(Int_t irp=0; irp<GetNRPBin(); irp++)
218 Int_t bin = GetEventMixBin(ic, iz, irp);
219 fListMixTrackEvents[bin]->Delete() ;
220 delete fListMixTrackEvents[bin] ;
226 delete[] fListMixTrackEvents;
228 if(fListMixCaloEvents)
230 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
232 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
234 for(Int_t irp=0; irp<GetNRPBin(); irp++)
236 Int_t bin = GetEventMixBin(ic, iz, irp);
237 fListMixCaloEvents[bin]->Delete() ;
238 delete fListMixCaloEvents[bin] ;
244 delete[] fListMixCaloEvents;
249 //__________________________________________________________________________________________________________________________________________
250 void AliAnaParticleHadronCorrelation::FillChargedAngularCorrelationHistograms(Float_t ptAssoc, Float_t ptTrig, Int_t bin,
251 Float_t phiAssoc, Float_t phiTrig, Float_t deltaPhi,
252 Float_t etaAssoc, Float_t etaTrig,
253 Bool_t decay, Float_t hmpidSignal, Int_t outTOF,
254 Int_t cen, Int_t mcTag)
256 // Fill angular correlation related histograms
258 Float_t deltaEta = etaTrig-etaAssoc;
259 Float_t deltaPhiOrg = phiTrig-phiAssoc;
261 fhEtaCharged ->Fill(ptAssoc,etaAssoc);
262 fhPhiCharged ->Fill(ptAssoc,phiAssoc);
263 fhDeltaEtaCharged ->Fill(ptTrig ,deltaEta);
264 fhDeltaPhiCharged ->Fill(ptTrig ,deltaPhi);
265 fhDeltaPhiChargedPt->Fill(ptAssoc, deltaPhi);
266 fhDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
270 fhDeltaEtaChargedPtA3GeV ->Fill(ptTrig ,deltaEta);
271 fhDeltaPhiChargedPtA3GeV ->Fill(ptTrig ,deltaPhi);
272 fhDeltaPhiDeltaEtaChargedPtA3GeV->Fill(deltaPhi, deltaEta);
277 if(fFillPileUpHistograms)
281 fhDeltaPhiChargedOtherBC->Fill(ptTrig ,deltaPhi) ;
282 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVOtherBC->Fill(ptTrig ,deltaPhi) ;
286 fhDeltaPhiChargedBC0->Fill(ptTrig ,deltaPhi) ;
287 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVBC0->Fill(ptTrig ,deltaPhi) ;
290 Int_t vtxBC = GetReader()->GetVertexBC();
291 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
293 fhDeltaPhiChargedVtxBC0->Fill(ptTrig ,deltaPhi) ;
294 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVVtxBC0->Fill(ptTrig ,deltaPhi) ;
297 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
298 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
299 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
300 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
301 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
302 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
303 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
307 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
308 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
309 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
310 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
311 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
312 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
313 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
319 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
320 fhDeltaPhiChargedMC[mcIndex]->Fill(ptTrig , deltaPhi);
323 if(fDecayTrigger && decay) fhDeltaPhiDecayCharged ->Fill(ptTrig , deltaPhi);
325 Double_t dphiBrad = -100;
328 dphiBrad = atan2(sin(deltaPhiOrg), cos(deltaPhiOrg))/TMath::Pi();//-1 to 1
329 if( TMath::Abs(dphiBrad) > 0.325 && TMath::Abs(dphiBrad) < 0.475 ) //Hardcoded values, BAD, FIXME
331 fhAssocPtBkg->Fill(ptTrig, ptAssoc);
334 if( dphiBrad < -1./3 ) dphiBrad += 2;
335 fhDeltaPhiBrad->Fill(ptTrig, dphiBrad);
338 // Fill histograms in bins of associated particle pT
341 fhDeltaPhiDeltaEtaAssocPtBin [bin]->Fill(deltaPhi,deltaEta);
343 fhDeltaPhiAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
345 if(fFillEtaGapsHisto)
347 if(TMath::Abs(deltaEta)> 0.8)
348 fhDeltaPhiAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
350 if(TMath::Abs(deltaEta)< 0.01)
351 fhDeltaPhiAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
355 fhDeltaPhiBradAssocPtBin [bin]->Fill(ptTrig, dphiBrad);
357 if(fDecayTrigger && decay)
358 fhDeltaPhiDecayChargedAssocPtBin[bin]->Fill(ptTrig, deltaPhi);
360 if(fHMPIDCorrelation)
362 if( hmpidSignal > 0 )
364 //printf("Track pt %f with HMPID signal %f \n",pt,hmpidSignal);
365 fhDeltaPhiAssocPtBinHMPID[bin]->Fill(ptTrig, deltaPhi);
368 if(phiAssoc > 5*TMath::DegToRad() && phiAssoc < 20*TMath::DegToRad())
370 //printf("Track pt %f in HMPID acceptance phi %f \n ",pt,phi*TMath::RadToDeg() );
371 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->Fill(ptTrig, deltaPhi);
376 //fill different multiplicity/centrality histogram
377 if(fFillHighMultHistograms && cen >= 0 && cen < GetNCentrBin())
379 fhDeltaPhiChargedMult[cen]->Fill(ptTrig,deltaPhi);
380 fhDeltaEtaChargedMult[cen]->Fill(ptTrig,deltaEta);
384 //___________________________________________________________________________________________________________________________________
385 Bool_t AliAnaParticleHadronCorrelation::FillChargedMCCorrelationHistograms(Float_t mcAssocPt, Float_t mcAssocPhi, Float_t mcAssocEta,
386 Float_t mcTrigPt, Float_t mcTrigPhi, Float_t mcTrigEta,
389 // Fill MC histograms independently of AOD or ESD
393 // In case we requested the trigger to be a leading particle,
394 // check if this is true at the MC level.
395 // Not sure if it is correct to skip or not skip this.
397 if( fMakeAbsoluteLeading && mcAssocPt > mcTrigPt ) lead = kFALSE; // skip event
399 // Skip this event if near side associated particle pt larger than trigger
400 if( fMakeNearSideLeading && mcAssocPt > mcTrigPt &&
401 TMath::Abs(mcAssocPhi-mcTrigPhi)<TMath::PiOver2() ) lead = kFALSE; // skip event
404 // Select only hadrons in pt range
405 if ( mcAssocPt < fMinAssocPt || mcAssocPt > fMaxAssocPt ) return lead ; // exclude but continue
406 if ( mcAssocPt < GetReader()->GetCTSPtMin()) return lead ;
408 if( mcAssocPhi < 0 ) mcAssocPhi+=TMath::TwoPi();
411 // Remove trigger itself for correlation when use charged triggers
412 if(TMath::Abs(mcAssocPt -mcTrigPt ) < 1e-6 &&
413 TMath::Abs(mcAssocPhi-mcTrigPhi) < 1e-6 &&
414 TMath::Abs(mcAssocEta-mcTrigEta) < 1e-6) return lead ; // exclude but continue
416 Float_t mcdeltaPhi= mcTrigPhi-mcAssocPhi;
417 if(mcdeltaPhi <= -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
418 if(mcdeltaPhi > 3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
420 Float_t mcxE =-mcAssocPt/mcTrigPt*TMath::Cos(mcdeltaPhi);// -(mcAssocPx*pxprim+mcAssocPy*pyprim)/(mcTrigPt*mcTrigPt);
421 Float_t mchbpXE =-100 ;
422 if(mcxE > 0 ) mchbpXE = TMath::Log(1./mcxE);
424 Float_t mczT = mcAssocPt/mcTrigPt ;
425 Float_t mchbpZT =-100 ;
426 if(mczT > 0 ) mchbpZT = TMath::Log(1./mczT);
428 Double_t mcpout = mcAssocPt*TMath::Sin(mcdeltaPhi) ;
432 AliInfo(Form("Charged hadron: track Pt %f, track Phi %f, phi trigger %f. Cuts: delta phi %2.2f < %2.2f < %2.2f \n",
433 mcAssocPt,mcAssocPhi, mcTrigPhi,fDeltaPhiMinCut, mcdeltaPhi, fDeltaPhiMaxCut));
437 fhMCEtaCharged [histoIndex]->Fill(mcAssocPt, mcAssocEta);
438 fhMCPhiCharged [histoIndex]->Fill(mcAssocPt, mcAssocPhi);
439 fhMCDeltaEtaCharged[histoIndex]->Fill(mcTrigPt , mcTrigEta-mcAssocEta);
440 fhMCDeltaPhiCharged[histoIndex]->Fill(mcTrigPt , mcdeltaPhi);
441 fhMCPtAssocDeltaPhi[histoIndex]->Fill(mcAssocPt, mcdeltaPhi);
443 fhMCDeltaPhiDeltaEtaCharged[histoIndex]->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
445 //delta phi cut for correlation
446 if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
448 fhMCDeltaPhiChargedPt[histoIndex]->Fill(mcAssocPt,mcdeltaPhi);
449 fhMCPtXECharged [histoIndex]->Fill(mcTrigPt, mcxE);
450 fhMCPtHbpXECharged [histoIndex]->Fill(mcTrigPt, mchbpXE);
451 fhMCPtZTCharged [histoIndex]->Fill(mcTrigPt, mczT);
452 fhMCPtHbpZTCharged [histoIndex]->Fill(mcTrigPt, mchbpZT);
453 fhMCPtTrigPout [histoIndex]->Fill(mcTrigPt, mcpout) ;
459 if ( (mcdeltaPhi > fUeDeltaPhiMinCut) && (mcdeltaPhi < fUeDeltaPhiMaxCut) )
461 //Double_t randomphi = gRandom->Uniform(TMath::Pi()/2,3*TMath::Pi()/2);
462 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
463 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
464 Double_t mcUezT = mcAssocPt/mcTrigPt;
467 printf("FillChargedMCCorrelationHistograms(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
468 mcUexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
470 fhMCPtXEUeCharged[histoIndex]->Fill(mcTrigPt,mcUexE);
471 if(mcUexE > 0) fhMCPtHbpXEUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
473 fhMCPtZTUeCharged[histoIndex]->Fill(mcTrigPt,mcUezT);
474 if(mcUezT > 0) fhMCPtHbpZTUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
476 fhMCUePart[histoIndex]->Fill(mcTrigPt);
482 if((mcdeltaPhi<-fUeDeltaPhiMinCut) || (mcdeltaPhi >2*fUeDeltaPhiMaxCut))
484 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
485 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
486 Double_t mcUezT = mcAssocPt/mcTrigPt;
489 printf("FillChargedMCCorrelationHistograms(): Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
490 mcUexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
492 fhMCPtXEUeLeftCharged[histoIndex]->Fill(mcTrigPt,mcUexE);
493 if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
495 fhMCPtZTUeLeftCharged[histoIndex]->Fill(mcTrigPt,mcUezT);
496 if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
503 //___________________________________________________________________________________________________________________
504 void AliAnaParticleHadronCorrelation::FillChargedMomentumImbalanceHistograms(Float_t ptTrig, Float_t ptAssoc,
506 Int_t cen, Int_t charge,
507 Int_t bin, Bool_t decay,
508 Int_t outTOF, Int_t mcTag)
511 // Fill mostly momentum imbalance related histograms
513 Float_t zT = ptAssoc/ptTrig ;
514 Float_t xE =-ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
515 Float_t pout = ptAssoc*TMath::Sin(deltaPhi) ;
518 printf("FillChargedMomentumImbalanceHistograms(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
519 xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
521 Float_t hbpXE = -100;
522 Float_t hbpZT = -100;
524 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
525 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
527 fhXECharged ->Fill(ptTrig , xE);
528 fhPtHbpXECharged ->Fill(ptTrig , hbpXE);
529 fhZTCharged ->Fill(ptTrig , zT);
530 fhPtHbpZTCharged ->Fill(ptTrig , hbpZT);
531 fhPtTrigPout ->Fill(ptTrig , pout) ;
532 fhPtTrigCharged ->Fill(ptTrig , ptAssoc) ;
533 if((deltaPhi > 5*TMath::Pi()/6.) && (deltaPhi < 7*TMath::Pi()/6.))
535 fhXECharged_Cone2 ->Fill(ptTrig , xE);
536 fhPtHbpXECharged_Cone2 ->Fill(ptTrig , hbpXE);
542 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
543 fhXEChargedMC[mcIndex]->Fill(ptTrig , xE);
547 if(fFillPileUpHistograms)
551 fhXEChargedOtherBC ->Fill(ptTrig,xE);
552 fhZTChargedOtherBC ->Fill(ptTrig,zT);
553 fhPtTrigChargedOtherBC->Fill(ptTrig,ptAssoc);
557 fhXEChargedBC0 ->Fill(ptTrig,xE);
558 fhZTChargedBC0 ->Fill(ptTrig,zT);
559 fhPtTrigChargedBC0->Fill(ptTrig,ptAssoc);
562 Int_t vtxBC = GetReader()->GetVertexBC();
563 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
565 fhXEChargedVtxBC0 ->Fill(ptTrig,xE);
566 fhZTChargedVtxBC0 ->Fill(ptTrig,zT);
567 fhPtTrigChargedVtxBC0->Fill(ptTrig,ptAssoc);
570 if(GetReader()->IsPileUpFromSPD()) { fhXEChargedPileUp[0]->Fill(ptTrig,xE); fhZTChargedPileUp[0]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[0]->Fill(ptTrig,ptAssoc); }
571 if(GetReader()->IsPileUpFromEMCal()) { fhXEChargedPileUp[1]->Fill(ptTrig,xE); fhZTChargedPileUp[1]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[1]->Fill(ptTrig,ptAssoc); }
572 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEChargedPileUp[2]->Fill(ptTrig,xE); fhZTChargedPileUp[2]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[2]->Fill(ptTrig,ptAssoc); }
573 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEChargedPileUp[3]->Fill(ptTrig,xE); fhZTChargedPileUp[3]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[3]->Fill(ptTrig,ptAssoc); }
574 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEChargedPileUp[4]->Fill(ptTrig,xE); fhZTChargedPileUp[4]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[4]->Fill(ptTrig,ptAssoc); }
575 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEChargedPileUp[5]->Fill(ptTrig,xE); fhZTChargedPileUp[5]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[5]->Fill(ptTrig,ptAssoc); }
576 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEChargedPileUp[6]->Fill(ptTrig,xE); fhZTChargedPileUp[6]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[6]->Fill(ptTrig,ptAssoc); }
579 if(fDecayTrigger && decay)
581 fhXEDecayCharged->Fill(ptTrig,xE);
582 fhZTDecayCharged->Fill(ptTrig,zT);
583 } // photon decay pi0/eta trigger
585 if(bin >= 0 && fFillMomImbalancePtAssocBinsHisto)//away side
587 fhXEAssocPtBin[bin]->Fill(ptTrig, xE) ;
588 fhZTAssocPtBin[bin]->Fill(ptTrig, zT) ;
593 Int_t vz = GetEventVzBin();
594 fhXEVZ[vz]->Fill(ptTrig, xE) ;
595 fhZTVZ[vz]->Fill(ptTrig, zT) ;
600 fhXEPosCharged->Fill(ptTrig,xE) ;
601 fhZTPosCharged->Fill(ptTrig,zT) ;
605 fhXENegCharged->Fill(ptTrig,xE) ;
606 fhZTNegCharged->Fill(ptTrig,zT) ;
609 //fill different multiplicity/centrality histogram
610 if(fFillHighMultHistograms && cen >= 0 && cen < GetNCentrBin())
612 fhXEMult[cen]->Fill(ptTrig,xE);
613 fhZTMult[cen]->Fill(ptTrig,zT);
614 } //multiplicity/centrality events selection
617 //_______________________________________________________________________________________________________________________
618 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventHistograms(Float_t ptTrig, Float_t ptAssoc,
619 Float_t deltaPhi, Int_t cen, Int_t outTOF)
621 // Fill underlying event histograms
623 fhUePart->Fill(ptTrig);
625 fhDeltaPhiUeChargedPt->Fill(ptAssoc,deltaPhi);
627 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
628 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
629 Double_t uezT = ptAssoc/ptTrig;
632 printf("FillChargedUnderlyingEventHistograms(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
633 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
635 fhXEUeCharged->Fill(ptTrig,uexE);
636 if(uexE > 0) fhPtHbpXEUeCharged->Fill(ptTrig,TMath::Log(1/uexE));
638 fhZTUeCharged->Fill(ptTrig,uezT);
639 if(uezT > 0) fhPtHbpZTUeCharged->Fill(ptTrig,TMath::Log(1/uezT));
643 if(fFillPileUpHistograms)
647 fhXEUeChargedOtherBC->Fill(ptTrig,uexE);
648 fhZTUeChargedOtherBC->Fill(ptTrig,uezT);
652 fhXEUeChargedBC0->Fill(ptTrig,uexE);
653 fhZTUeChargedBC0->Fill(ptTrig,uezT);
656 Int_t vtxBC = GetReader()->GetVertexBC();
657 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
659 fhXEUeChargedVtxBC0->Fill(ptTrig,uexE);
660 fhZTUeChargedVtxBC0->Fill(ptTrig,uezT);
663 if(GetReader()->IsPileUpFromSPD()) { fhXEUeChargedPileUp[0]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[0]->Fill(ptTrig,uezT);}
664 if(GetReader()->IsPileUpFromEMCal()) { fhXEUeChargedPileUp[1]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[1]->Fill(ptTrig,uezT);}
665 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEUeChargedPileUp[2]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[2]->Fill(ptTrig,uezT);}
666 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEUeChargedPileUp[3]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[3]->Fill(ptTrig,uezT);}
667 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEUeChargedPileUp[4]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[4]->Fill(ptTrig,uezT);}
668 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEUeChargedPileUp[5]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[5]->Fill(ptTrig,uezT);}
669 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEUeChargedPileUp[6]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[6]->Fill(ptTrig,uezT);}
672 //fill different multiplicity/centrality histogram
673 if(fFillHighMultHistograms && cen >= 0 && cen < GetNCentrBin())
675 fhXEUeMult[cen]->Fill(ptTrig,uexE);
676 fhZTUeMult[cen]->Fill(ptTrig,uezT);
680 //_____________________________________________________________________________________________________
681 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventSidesHistograms(Float_t ptTrig,
685 // Fill underlying event histograms to the left and right of trigger
686 // Right cone is the default UE.
688 if((deltaPhi<-fUeDeltaPhiMinCut) || (deltaPhi >2*fUeDeltaPhiMaxCut))
690 fhDeltaPhiUeLeftCharged->Fill(ptAssoc,deltaPhi);
691 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
692 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
693 Double_t uezT = ptAssoc/ptTrig;
696 printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
697 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
699 fhXEUeLeftCharged->Fill(ptTrig,uexE);
700 if(uexE > 0) fhPtHbpXEUeLeftCharged->Fill(ptTrig,TMath::Log(1/uexE));
702 fhZTUeLeftCharged->Fill(ptTrig,uezT);
703 if(uezT > 0) fhPtHbpZTUeLeftCharged->Fill(ptTrig,TMath::Log(1/uezT));
705 fhDeltaPhiUeLeftCharged->Fill(ptAssoc, deltaPhi);
708 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-TMath::Pi()/2))
710 fhDeltaPhiUeLeftDownCharged->Fill(ptAssoc,deltaPhi);
711 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
712 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
715 printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for left-down UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
716 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
718 fhXEUeLeftDownCharged->Fill(ptTrig,uexE);
721 if((deltaPhi>2*fUeDeltaPhiMaxCut) && (deltaPhi <3*TMath::Pi()/2))
723 fhDeltaPhiUeLeftUpCharged->Fill(ptAssoc,deltaPhi);
724 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
725 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
728 printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for left-up UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
729 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
731 fhXEUeLeftUpCharged->Fill(ptTrig,uexE);
734 if((deltaPhi > TMath::Pi()/2) && (deltaPhi < fUeDeltaPhiMaxCut))
736 fhDeltaPhiUeRightUpCharged->Fill(ptAssoc,deltaPhi);
737 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
738 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
741 printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for right-up UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
742 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
744 fhXEUeRightUpCharged->Fill(ptTrig,uexE);
747 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < TMath::Pi()/2))
749 fhDeltaPhiUeRightDownCharged->Fill(ptAssoc,deltaPhi);
750 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
751 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
754 printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for right-down UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
755 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
757 fhXEUeRightDownCharged->Fill(ptTrig,uexE);
761 //______________________________________________________________________________________________________________________________
762 void AliAnaParticleHadronCorrelation::FillDecayPhotonCorrelationHistograms(Float_t ptAssoc, Float_t phiAssoc,
763 TLorentzVector mom1, TLorentzVector mom2,
764 Bool_t bChargedOrNeutral)
766 // Do correlation with decay photons of triggered pi0 or eta
768 // Calculate the correlation parameters
769 Float_t ptDecay1 = mom1.Pt();
770 Float_t ptDecay2 = mom2.Pt();
772 Float_t zTDecay1 = -100, zTDecay2 = -100;
773 if(ptDecay1 > 0) zTDecay1 = ptAssoc/ptDecay1 ;
774 if(ptDecay2 > 0) zTDecay2 = ptAssoc/ptDecay2 ;
776 Float_t deltaPhiDecay1 = mom1.Phi()-phiAssoc;
777 if(deltaPhiDecay1< -TMath::PiOver2()) deltaPhiDecay1+=TMath::TwoPi();
778 if(deltaPhiDecay1>3*TMath::PiOver2()) deltaPhiDecay1-=TMath::TwoPi();
780 Float_t deltaPhiDecay2 = mom2.Phi()-phiAssoc;
781 if(deltaPhiDecay2< -TMath::PiOver2()) deltaPhiDecay2+=TMath::TwoPi();
782 if(deltaPhiDecay2>3*TMath::PiOver2()) deltaPhiDecay2-=TMath::TwoPi();
784 Float_t xEDecay1 =-zTDecay1*TMath::Cos(deltaPhiDecay1); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
785 Float_t xEDecay2 =-zTDecay2*TMath::Cos(deltaPhiDecay2); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
787 if(bChargedOrNeutral) // correlate with charges
789 fhDeltaPhiDecayCharged->Fill(ptDecay1, deltaPhiDecay1);
790 fhDeltaPhiDecayCharged->Fill(ptDecay2, deltaPhiDecay2);
792 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms( Charged corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
794 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
796 fhZTDecayCharged->Fill(ptDecay1,zTDecay1);
797 fhXEDecayCharged->Fill(ptDecay1,xEDecay1);
799 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
801 fhZTDecayCharged->Fill(ptDecay2,zTDecay2);
802 fhXEDecayCharged->Fill(ptDecay2,xEDecay2);
805 else // correlate with neutrals
807 fhDeltaPhiDecayNeutral->Fill(ptDecay1, deltaPhiDecay1);
808 fhDeltaPhiDecayNeutral->Fill(ptDecay2, deltaPhiDecay2);
810 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms(Neutral corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
812 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
814 fhZTDecayNeutral->Fill(ptDecay1,zTDecay1);
815 fhXEDecayNeutral->Fill(ptDecay1,xEDecay1);
817 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
819 fhZTDecayNeutral->Fill(ptDecay2,zTDecay2);
820 fhXEDecayNeutral->Fill(ptDecay2,xEDecay2);
825 //_____________________________________________________________________________________________________________________________
826 void AliAnaParticleHadronCorrelation::FillNeutralUnderlyingEventSidesHistograms(Float_t ptTrig, Float_t ptAssoc,
827 Float_t zT, Float_t hbpZT,
830 // Fill underlying event histograms to the left of trigger
831 // Right is the default case
833 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
835 Float_t xE =-ptAssoc/ptTrig*TMath::Cos(randomphi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
836 Float_t hbpXE = -100;
837 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
839 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-fUeDeltaPhiMaxCut))
841 fhDeltaPhiUeLeftNeutral->Fill(ptAssoc, deltaPhi);
842 fhXEUeLeftNeutral ->Fill(ptTrig , xE);
843 fhPtHbpXEUeLeftNeutral ->Fill(ptTrig , hbpXE);
844 fhZTUeLeftNeutral ->Fill(ptTrig , zT);
845 fhPtHbpZTUeLeftNeutral ->Fill(ptTrig , hbpZT);
849 //______________________________________________________
850 void AliAnaParticleHadronCorrelation::FillEventMixPool()
852 // Fill the pool with tracks or clusters if requested
854 if ( !DoOwnMix() ) return;
856 FillChargedEventMixPool();
858 // Do the cluster pool filling only if requested
859 // or in case of isolation cut using clusters in the cone.
860 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
862 if( !fFillNeutralEventMixPool && !isoCase) return;
864 FillNeutralEventMixPool();
867 //_____________________________________________________________
868 void AliAnaParticleHadronCorrelation::FillChargedEventMixPool()
870 // Mixed event pool filling for tracks
872 if(fUseMixStoredInReader && GetReader()->GetLastTracksMixedEvent() == GetEventNumber())
874 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
875 return ; // pool filled previously for another trigger
878 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
879 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
881 if(!inputHandler) return ;
883 // Do mixing only with MB event (or the chosen mask), if not skip
884 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
886 Int_t eventBin = GetEventMixBin();
888 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
889 if(eventBin < 0) return;
891 fhEventMBBin->Fill(eventBin);
893 TObjArray * mixEventTracks = new TObjArray;
895 if(fUseMixStoredInReader)
897 fListMixTrackEvents[eventBin] = GetReader()->GetListWithMixedEventsForTracks(eventBin);
900 if(!fListMixTrackEvents[eventBin]) fListMixTrackEvents[eventBin] = new TList();
902 //printf("%s ***** Pool Event bin : %d - nTracks %d\n",GetInputAODName().Data(),eventBin, GetCTSTracks()->GetEntriesFast());
904 TList * pool = fListMixTrackEvents[eventBin];
907 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
909 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
911 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
912 p3.SetXYZ(mom[0],mom[1],mom[2]);
913 Float_t pt = p3.Pt();
915 //Select only hadrons in pt range
916 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
918 AliAODPWG4Particle * mixedTrack = new AliAODPWG4Particle(mom[0],mom[1],mom[2],0);
919 mixedTrack->SetDetector("CTS");
920 mixedTrack->SetChargedBit(track->Charge()>0);
921 mixEventTracks->Add(mixedTrack);
924 fhNtracksMB->Fill(mixEventTracks->GetEntriesFast(),eventBin);
926 //Set the event number where the last event was added, to avoid double pool filling
927 GetReader()->SetLastTracksMixedEvent(GetEventNumber());
929 //printf("Add event to pool with %d tracks \n ",mixEventTracks->GetEntries());
930 pool->AddFirst(mixEventTracks);
933 //printf("Pool size %d, max %d\n",pool->GetSize(), GetNMaxEvMix());
935 if(pool->GetSize() > GetNMaxEvMix())
937 TClonesArray * tmp = static_cast<TClonesArray*>(pool->Last()) ;
943 //_____________________________________________________________
944 void AliAnaParticleHadronCorrelation::FillNeutralEventMixPool()
946 // Mixed event pool filling for neutral clusters
947 // Right now only for EMCAL and in isolation case
949 //printf("FillNeutralEventMixPool for %s\n",GetInputAODName().Data());
951 if(fUseMixStoredInReader && GetReader()->GetLastCaloMixedEvent() == GetEventNumber())
953 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
954 return ; // pool filled previously for another trigger
957 TObjArray * pl = GetEMCALClusters();
958 //if (GetAODObjArrayName.Contains("PHOS") )pl = GetPHOSClusters();
959 //else pl = GetEMCALClusters();
961 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
962 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
964 if(!inputHandler) return ;
966 // Do mixing only with MB event (or the chosen mask), if not skip
967 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
969 Int_t eventBin = GetEventMixBin();
971 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
972 if(eventBin < 0) return;
974 TObjArray * mixEventCalo = new TObjArray;
976 if(fUseMixStoredInReader)
978 fListMixCaloEvents[eventBin] = GetReader()->GetListWithMixedEventsForCalo(eventBin);
981 if(!fListMixCaloEvents[eventBin]) fListMixCaloEvents[eventBin] = new TList();
983 TList * poolCalo = fListMixCaloEvents[eventBin];
987 for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ )
989 AliVCluster * calo = (AliVCluster *) (pl->At(ipr)) ;
991 // remove matched clusters
992 if( IsTrackMatched( calo, GetReader()->GetInputEvent() ) ) continue ;
994 //Cluster momentum calculation
995 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
997 calo->GetMomentum(mom,GetVertex(0)) ;
998 }//Assume that come from vertex in straight line
1001 Double_t vertex[]={0,0,0};
1002 calo->GetMomentum(mom,vertex) ;
1005 Float_t pt = mom.Pt();
1006 //Select only clusters in pt range
1007 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
1009 AliAODPWG4Particle * mixedCalo = new AliAODPWG4Particle(mom);
1010 mixedCalo->SetDetector("EMCAL");
1011 mixEventCalo->Add(mixedCalo);
1014 fhNclustersMB->Fill(mixEventCalo->GetEntriesFast(),eventBin);
1016 //Set the event number where the last event was added, to avoid double pool filling
1017 GetReader()->SetLastCaloMixedEvent(GetEventNumber());
1019 //printf("Add event to pool with %d clusters \n ",mixEventCalo->GetEntries());
1020 poolCalo->AddFirst(mixEventCalo);
1023 //printf("Pool size %d, max %d\n",poolCalo->GetSize(), GetNMaxEvMix());
1025 if(poolCalo->GetSize() > GetNMaxEvMix())
1026 {//Remove last event
1027 TClonesArray * tmp = static_cast<TClonesArray*>(poolCalo->Last()) ;
1028 poolCalo->RemoveLast() ;
1033 //_________________________________________________________________________________________________________________
1034 Bool_t AliAnaParticleHadronCorrelation::FindLeadingOppositeHadronInWindow(AliAODPWG4ParticleCorrelation * particle)
1036 // Select events where the leading charged particle in the opposite hemisphere
1037 // to the trigger particle is in a window centered at 180 from the trigger
1039 Float_t phiTrig = particle->Phi();
1040 Float_t etaTrig = particle->Eta();
1041 Float_t ptTrig = particle->Pt();
1042 Float_t ptLeadHad = -100 ;
1043 Float_t phiLeadHad = -100 ;
1044 Float_t etaLeadHad = -100 ;
1047 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
1049 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
1051 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
1052 p3.SetXYZ(mom[0],mom[1],mom[2]);
1054 Float_t pt = p3.Pt();
1055 Float_t phi = p3.Phi() ;
1056 if(phi < 0 ) phi+= TMath::TwoPi();
1058 if(pt > ptLeadHad && TMath::Abs(phi-phiTrig) > TMath::PiOver2()) // in opposite hemisphere
1062 etaLeadHad = p3.Eta();
1066 fhPtLeadingOppositeHadron ->Fill(ptTrig, ptLeadHad);
1067 fhPtDiffPhiLeadingOppositeHadron->Fill(ptTrig,phiLeadHad-phiTrig);
1068 fhPtDiffEtaLeadingOppositeHadron->Fill(ptTrig,etaLeadHad-etaTrig);
1072 printf("AliAnaParticleHadronCorrelation::FindLeadingOppositeHadronInWindow() pT %2.2f, phi %2.2f, eta %2.2f\n",
1073 ptLeadHad,phiLeadHad*TMath::RadToDeg(),etaLeadHad);
1075 printf("\t pT trig %2.2f, Dphi (trigger-hadron) %2.2f, Deta (trigger-hadron) %2.2f\n",
1076 ptTrig, (phiLeadHad-phiTrig)*TMath::RadToDeg(), etaLeadHad-etaTrig);
1077 printf("\t cuts pT: min %2.2f, max %2.2f; DPhi: min %2.2f, max %2.2f\n",fMinLeadHadPt,fMaxLeadHadPt,fMinLeadHadPhi*TMath::RadToDeg(),fMaxLeadHadPhi*TMath::RadToDeg());
1080 if( ptLeadHad < fMinLeadHadPt ||
1081 ptLeadHad > fMaxLeadHadPt ) return kFALSE;
1083 //printf("Accept leading hadron pT \n");
1085 if( TMath::Abs(phiLeadHad-phiTrig) < fMinLeadHadPhi ||
1086 TMath::Abs(phiLeadHad-phiTrig) > fMaxLeadHadPhi ) return kFALSE;
1088 //printf("Accept leading hadron phi \n");
1093 //____________________________________________________________
1094 TObjString* AliAnaParticleHadronCorrelation::GetAnalysisCuts()
1096 //Save parameters used for analysis
1097 TString parList ; //this will be list of parameters used for this analysis.
1098 const Int_t buffersize = 560;
1099 char onePar[buffersize] ;
1101 snprintf(onePar,buffersize,"--- AliAnaPaticleHadronCorrelation ---:") ;
1103 snprintf(onePar,buffersize," %3.2f < Pt associated < %3.2f; ", fMinAssocPt, fMaxAssocPt) ;
1105 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-Hadron < %3.2f; ", fDeltaPhiMinCut, fDeltaPhiMaxCut) ;
1107 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-UeHadron < %3.2f; ", fUeDeltaPhiMinCut, fUeDeltaPhiMaxCut) ;
1109 snprintf(onePar,buffersize,"Isolated Trigger? %d;", fSelectIsolated) ;
1111 snprintf(onePar,buffersize,"Several UE? %d;", fMakeSeveralUE) ;
1113 snprintf(onePar,buffersize,"Name of AOD Pi0 Branch %s;", fPi0AODBranchName.Data());
1115 snprintf(onePar,buffersize,"Do Decay-hadron correlation ? pi0 %d, decay %d;", fPi0Trigger, fDecayTrigger) ;
1117 snprintf(onePar,buffersize,"Select absolute leading for cluster triggers ? %d or Near Side Leading %d;",
1118 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
1120 snprintf(onePar,buffersize,"Associated particle pt bins %d: ", fNAssocPtBins) ;
1122 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
1123 snprintf(onePar,buffersize,"bin %d = [%2.1f,%2.1f];", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
1127 //Get parameters set in base class.
1128 parList += GetBaseParametersList() ;
1130 //Get parameters set in FiducialCut class (not available yet)
1131 //parlist += GetFidCut()->GetFidCutParametersList()
1133 return new TObjString(parList) ;
1137 //________________________________________________________________
1138 TList * AliAnaParticleHadronCorrelation::GetCreateOutputObjects()
1140 // Create histograms to be saved in output file and
1141 // store them in fOutputContainer
1143 TList * outputContainer = new TList() ;
1144 outputContainer->SetName("CorrelationHistos") ;
1146 Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Int_t netabins = GetHistogramRanges()->GetHistoEtaBins();
1147 Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax();
1148 Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin();
1150 Int_t ndeltaphibins = GetHistogramRanges()->GetHistoDeltaPhiBins(); Int_t ndeltaetabins = GetHistogramRanges()->GetHistoDeltaEtaBins();
1151 Float_t deltaphimax = GetHistogramRanges()->GetHistoDeltaPhiMax(); Float_t deltaetamax = GetHistogramRanges()->GetHistoDeltaEtaMax();
1152 Float_t deltaphimin = GetHistogramRanges()->GetHistoDeltaPhiMin(); Float_t deltaetamin = GetHistogramRanges()->GetHistoDeltaEtaMin();
1154 Int_t ntrbins = GetHistogramRanges()->GetHistoTrackMultiplicityBins(); Int_t nclbins = GetHistogramRanges()->GetHistoNClustersBins();
1155 Int_t trmax = GetHistogramRanges()->GetHistoTrackMultiplicityMax(); Int_t clmax = GetHistogramRanges()->GetHistoNClustersMax();
1156 Int_t trmin = GetHistogramRanges()->GetHistoTrackMultiplicityMin(); Int_t clmin = GetHistogramRanges()->GetHistoNClustersMin();
1158 Int_t nxeztbins = GetHistogramRanges()->GetHistoRatioBins(); Int_t nhbpbins = GetHistogramRanges()->GetHistoHBPBins();
1159 Float_t xeztmax = GetHistogramRanges()->GetHistoRatioMax(); Float_t hbpmax = GetHistogramRanges()->GetHistoHBPMax();
1160 Float_t xeztmin = GetHistogramRanges()->GetHistoRatioMin(); Float_t hbpmin = GetHistogramRanges()->GetHistoHBPMin();
1162 Int_t nMixBins = GetNCentrBin()*GetNZvertBin()*GetNRPBin();
1164 TString nameMC[] = {"Photon","Pi0","Pi0Decay","EtaDecay","OtherDecay","Electron","Hadron"};
1165 TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
1167 // For vz dependent histograms, if option ON
1169 if(fCorrelVzBin) nz = GetNZvertBin();
1173 // Fill histograms for neutral clusters in mixing?
1174 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
1175 Bool_t neutralMix = fFillNeutralEventMixPool || isoCase ;
1177 fhPtTriggerInput = new TH1F("hPtTriggerInput","Input trigger #it{p}_{T}", nptbins,ptmin,ptmax);
1178 fhPtTriggerInput->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1179 outputContainer->Add(fhPtTriggerInput);
1181 if( fM02MaxCut > 0 && fM02MinCut > 0 )
1183 fhPtTriggerSSCut = new TH1F("hPtTriggerSSCut","Trigger #it{p}_{T} after #lambda^{2}_{0} cut", nptbins,ptmin,ptmax);
1184 fhPtTriggerSSCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1185 outputContainer->Add(fhPtTriggerSSCut);
1188 if( OnlyIsolated() )
1190 fhPtTriggerIsoCut = new TH1F("hPtTriggerIsoCut","Trigger #it{p}_{T} after isolation (and #lambda^{2}_{0} cut)", nptbins,ptmin,ptmax);
1191 fhPtTriggerIsoCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1192 outputContainer->Add(fhPtTriggerIsoCut);
1195 fhPtTriggerFidCut = new TH1F("hPtTriggerFidCut","Trigger #it{p}_{T} after fiducial (isolation and #lambda^{2}_{0}) cut", nptbins,ptmin,ptmax);
1196 fhPtTriggerFidCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1197 outputContainer->Add(fhPtTriggerFidCut);
1199 fhPtTrigger = new TH1F("hPtTrigger","#it{p}_{T} distribution of trigger particles (after opposite hadron leading cut and rest)", nptbins,ptmin,ptmax);
1200 fhPtTrigger->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1201 outputContainer->Add(fhPtTrigger);
1205 for(Int_t i=0; i < 7; i++)
1207 fhPtTriggerMC[i] = new TH1F(Form("hPtTrigger_MC%s",nameMC[i].Data()),
1208 Form("#it{p}_{T} distribution of trigger particles, trigger origin is %s",nameMC[i].Data()),
1209 nptbins,ptmin,ptmax);
1210 fhPtTriggerMC[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1211 outputContainer->Add(fhPtTriggerMC[i]);
1217 fhPtTriggerVzBin = new TH2F("hPtTriggerVzBin","#it{p}_{T} distribution of trigger particles vs vz bin", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
1218 fhPtTriggerVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1219 fhPtTriggerVzBin->SetYTitle("#it{v}_{#it{z}} bin");
1220 outputContainer->Add(fhPtTriggerVzBin);
1223 fhPtTriggerBin = new TH2F ("hPtTriggerBin","#it{p}_{T} distribution of trigger particles", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
1224 fhPtTriggerBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1225 fhPtTriggerBin->SetYTitle("Bin");
1226 outputContainer->Add(fhPtTriggerBin);
1228 fhPhiTrigger = new TH2F ("hPhiTrigger","#phi distribution of trigger Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
1229 fhPhiTrigger->SetYTitle("#phi (rad)");
1230 outputContainer->Add(fhPhiTrigger);
1232 fhEtaTrigger = new TH2F ("hEtaTrigger","#eta distribution of trigger",nptbins,ptmin,ptmax, netabins,etamin,etamax);
1233 fhEtaTrigger->SetYTitle("#eta ");
1234 outputContainer->Add(fhEtaTrigger);
1236 if(fFillHighMultHistograms)
1238 fhPtTriggerCentrality = new TH2F("hPtTriggerCentrality","Trigger particle #it{p}_{T} vs centrality",nptbins,ptmin,ptmax,100,0.,100) ;
1239 fhPtTriggerCentrality->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1240 fhPtTriggerCentrality->SetYTitle("Centrality (%)");
1241 outputContainer->Add(fhPtTriggerCentrality) ;
1243 fhPtTriggerEventPlane = new TH2F("hPtTriggerEventPlane","Trigger particle #it{p}_{T} vs event plane angle",nptbins,ptmin,ptmax, 100,0.,TMath::Pi()) ;
1244 fhPtTriggerEventPlane->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1245 fhPtTriggerEventPlane->SetXTitle("EP angle (rad)");
1246 outputContainer->Add(fhPtTriggerEventPlane) ;
1248 fhTriggerEventPlaneCentrality = new TH2F("hTriggerEventPlaneCentrality","Trigger particle centrality vs event plane angle",100,0.,100,100,0.,TMath::Pi()) ;
1249 fhTriggerEventPlaneCentrality->SetXTitle("Centrality (%)");
1250 fhTriggerEventPlaneCentrality->SetYTitle("EP angle (rad)");
1251 outputContainer->Add(fhTriggerEventPlaneCentrality) ;
1254 // Leading hadron in oposite side
1255 if(fSelectLeadingHadronAngle)
1257 fhPtLeadingOppositeHadron = new TH2F("hPtTriggerPtLeadingOppositeHadron","Leading hadron opposite to trigger vs trigger #it{p}_{T}",
1258 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1259 fhPtLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1260 fhPtLeadingOppositeHadron->SetYTitle("#it{p}_{T}^{lead hadron} (GeV/#it{c})");
1261 outputContainer->Add(fhPtLeadingOppositeHadron);
1263 fhPtDiffPhiLeadingOppositeHadron = new TH2F("hPtTriggerDiffPhiTriggerLeadingOppositeHadron","#phi_{trigger}-#phi_{leading opposite hadron} vs #it{p}_{T}^{trig}",
1264 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
1265 fhPtDiffPhiLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1266 fhPtDiffPhiLeadingOppositeHadron->SetYTitle("#phi_{trigger}-#phi_{leading opposite hadron} (rad)");
1267 outputContainer->Add(fhPtDiffPhiLeadingOppositeHadron);
1269 fhPtDiffEtaLeadingOppositeHadron = new TH2F("hPtTriggerDiffEtaTriggerPhiLeadingOppositeHadron","#eta_{trigger}-#eta_{leading opposite hadron} vs #it{p}_{T}^{trig}",
1270 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1271 fhPtDiffEtaLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1272 fhPtDiffEtaLeadingOppositeHadron->SetYTitle("#eta_{trigger}-#eta_{leading opposite hadron}");
1273 outputContainer->Add(fhPtDiffEtaLeadingOppositeHadron);
1276 //Correlation with charged hadrons
1278 fhDeltaPhiDeltaEtaCharged = new TH2F
1279 ("hDeltaPhiDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}}",
1280 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1281 fhDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
1282 fhDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
1284 fhDeltaPhiDeltaEtaChargedPtA3GeV = new TH2F
1285 ("hDeltaPhiDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}, #it{p}_{TA}>3 GeV/#it{c}}",
1286 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1287 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetXTitle("#Delta #phi (rad)");
1288 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1290 fhPhiCharged = new TH2F
1291 ("hPhiCharged","#phi_{h^{#pm}} vs #it{p}_{T #pm}",
1292 nptbins,ptmin,ptmax,180,0,TMath::TwoPi());
1293 fhPhiCharged->SetYTitle("#phi_{h^{#pm}} (rad)");
1294 fhPhiCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
1296 fhEtaCharged = new TH2F
1297 ("hEtaCharged","#eta_{h^{#pm}} vs #it{p}_{T #pm}",
1298 nptbins,ptmin,ptmax,100,-1.,1.);
1299 fhEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
1300 fhEtaCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
1302 fhDeltaPhiCharged = new TH2F
1303 ("hDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
1304 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1305 fhDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
1306 fhDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1308 fhDeltaPhiChargedPtA3GeV = new TH2F
1309 ("hDeltaPhiChargedPtA3GeV","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}",
1310 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1311 fhDeltaPhiChargedPtA3GeV->SetYTitle("#Delta #phi (rad)");
1312 fhDeltaPhiChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1315 fhDeltaPhiChargedPt = new TH2F
1316 ("hDeltaPhiChargedPt","#phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}",
1317 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1318 fhDeltaPhiChargedPt->SetYTitle("#Delta #phi (rad)");
1319 fhDeltaPhiChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1321 fhDeltaEtaCharged = new TH2F
1322 ("hDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}",
1323 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1324 fhDeltaEtaCharged->SetYTitle("#Delta #eta");
1325 fhDeltaEtaCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1327 fhDeltaEtaChargedPtA3GeV = new TH2F
1328 ("hDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}",
1329 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1330 fhDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1331 fhDeltaEtaChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1334 new TH2F("hXECharged","#it{x}_{#it{E}} for charged tracks",
1335 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1336 fhXECharged->SetYTitle("#it{x}_{#it{E}}");
1337 fhXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1340 new TH2F("hXECharged_Cone2","#it{x}_{#it{E}} for charged tracks in cone 2 (5#pi/6-7#pi/6)",
1341 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1342 fhXECharged_Cone2->SetYTitle("#it{x}_{#it{E}}");
1343 fhXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1346 new TH2F("hXEPositiveCharged","#it{x}_{#it{E}} for positive charged tracks",
1347 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1348 fhXEPosCharged->SetYTitle("#it{x}_{#it{E}}");
1349 fhXEPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1352 new TH2F("hXENegativeCharged","#it{x}_{#it{E}} for negative charged tracks",
1353 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1354 fhXENegCharged->SetYTitle("#it{x}_{#it{E}}");
1355 fhXENegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1358 new TH2F("hHbpXECharged","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
1359 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1360 fhPtHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1361 fhPtHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1363 fhPtHbpXECharged_Cone2 =
1364 new TH2F("hHbpXECharged_Cone2","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons in cone 2 (5#pi/6-7#pi/6)",
1365 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1366 fhPtHbpXECharged_Cone2->SetYTitle("ln(1/#it{x}_{#it{E}})");
1367 fhPtHbpXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1370 new TH2F("hZTCharged","#it{z}_{T} for charged tracks",
1371 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1372 fhZTCharged->SetYTitle("#it{z}_{T}");
1373 fhZTCharged->SetXTitle("#it{p}_{T trigger}");
1376 new TH2F("hZTPositiveCharged","#it{z}_{T} for positive charged tracks",
1377 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1378 fhZTPosCharged->SetYTitle("#it{z}_{T}");
1379 fhZTPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1382 new TH2F("hZTNegativeCharged","#it{z}_{T} for negative charged tracks",
1383 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1384 fhZTNegCharged->SetYTitle("#it{z}_{T}");
1385 fhZTNegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1388 new TH2F("hHbpZTCharged","#xi = ln(1/#it{z}_{T}) with charged hadrons",
1389 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1390 fhPtHbpZTCharged->SetYTitle("ln(1/#it{z}_{T})");
1391 fhPtHbpZTCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1394 new TH2F("hPtTrigPout","Pout with triggers",
1395 nptbins,ptmin,ptmax,nptbins,-1.*ptmax/2.,ptmax/2.);
1396 fhPtTrigPout->SetYTitle("#it{p}_{out} (GeV/#it{c})");
1397 fhPtTrigPout->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1400 new TH2F("hPtTrigCharged","trigger and charged tracks pt distribution",
1401 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1402 fhPtTrigCharged->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1403 fhPtTrigCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1405 outputContainer->Add(fhDeltaPhiDeltaEtaCharged);
1406 outputContainer->Add(fhDeltaPhiDeltaEtaChargedPtA3GeV);
1407 outputContainer->Add(fhPhiCharged) ;
1408 outputContainer->Add(fhEtaCharged) ;
1409 outputContainer->Add(fhDeltaPhiCharged) ;
1410 outputContainer->Add(fhDeltaPhiChargedPtA3GeV) ;
1411 outputContainer->Add(fhDeltaEtaCharged) ;
1412 outputContainer->Add(fhDeltaEtaChargedPtA3GeV) ;
1413 outputContainer->Add(fhDeltaPhiChargedPt) ;
1415 outputContainer->Add(fhXECharged) ;
1416 outputContainer->Add(fhXECharged_Cone2) ;
1420 for(Int_t i=0; i < 7; i++)
1423 fhDeltaPhiChargedMC[i] = new TH2F(Form("hDeltaPhiCharged_MC%s",nameMC[i].Data()),
1424 Form("#Delta #phi for charged tracks, trigger origin is %s",nameMC[i].Data()),
1425 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
1426 fhDeltaPhiChargedMC[i]->SetYTitle("#it{x}_{#it{E}}");
1427 fhDeltaPhiChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1428 outputContainer->Add(fhDeltaPhiChargedMC[i]) ;
1430 fhXEChargedMC[i] = new TH2F(Form("hXECharged_MC%s",nameMC[i].Data()),
1431 Form("#it{x}_{#it{E}} for charged tracks, trigger origin is %s",nameMC[i].Data()),
1432 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1433 fhXEChargedMC[i]->SetYTitle("#it{x}_{#it{E}}");
1434 fhXEChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1435 outputContainer->Add(fhXEChargedMC[i]) ;
1439 outputContainer->Add(fhXEPosCharged) ;
1440 outputContainer->Add(fhXENegCharged) ;
1441 outputContainer->Add(fhPtHbpXECharged) ;
1442 outputContainer->Add(fhPtHbpXECharged_Cone2) ;
1444 outputContainer->Add(fhZTCharged) ;
1445 outputContainer->Add(fhZTPosCharged) ;
1446 outputContainer->Add(fhZTNegCharged) ;
1447 outputContainer->Add(fhPtHbpZTCharged) ;
1449 outputContainer->Add(fhPtTrigPout) ;
1450 outputContainer->Add(fhPtTrigCharged) ;
1453 if(fMakeSeveralUE) right = "Right";
1455 fhUePart = new TH1F("hUePart","UE particles distribution vs pt trig",
1456 nptbins,ptmin,ptmax);
1457 fhUePart->SetYTitle("dNch");
1458 fhUePart->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1460 fhDeltaPhiUeChargedPt = new TH2F
1461 (Form("hDeltaPhiUe%sChargedPt",right.Data()),"#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}}",
1462 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1463 fhDeltaPhiUeChargedPt->SetYTitle("#Delta #phi (rad)");
1464 fhDeltaPhiUeChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1467 new TH2F(Form("hXEUeCharged%s",right.Data()),"#it{x}_{#it{E}} for Underlying Event",
1468 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1469 fhXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
1470 fhXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1472 fhPtHbpXEUeCharged =
1473 new TH2F(Form("hHbpXEUeCharged%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for Underlying Event",
1474 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1475 fhPtHbpXEUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1476 fhPtHbpXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1479 new TH2F(Form("hZTUeCharged%s",right.Data()),"#it{z}_{T} for Underlying Event",
1480 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1481 fhZTUeCharged->SetYTitle("#it{z}_{T}");
1482 fhZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1484 fhPtHbpZTUeCharged =
1485 new TH2F(Form("hHbpZTUeCharged%s",right.Data()),"#xi = ln(1/#it{z}_{T}) for Underlying Event",
1486 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1487 fhPtHbpZTUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1488 fhPtHbpZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1490 outputContainer->Add(fhUePart);
1491 outputContainer->Add(fhDeltaPhiUeChargedPt) ;
1492 outputContainer->Add(fhXEUeCharged) ;
1493 outputContainer->Add(fhPtHbpXEUeCharged) ;
1494 outputContainer->Add(fhZTUeCharged) ;
1495 outputContainer->Add(fhPtHbpZTUeCharged) ;
1499 fhDeltaPhiUeLeftCharged = new TH2F
1500 ("hDeltaPhiUeLeftChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left side range of trigger particles",
1501 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1502 fhDeltaPhiUeLeftCharged->SetYTitle("#Delta #phi (rad)");
1503 fhDeltaPhiUeLeftCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1504 outputContainer->Add(fhDeltaPhiUeLeftCharged) ;
1506 fhDeltaPhiUeLeftUpCharged = new TH2F
1507 ("hDeltaPhiUeLeftUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Up side range of trigger particles",
1508 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1509 fhDeltaPhiUeLeftUpCharged->SetYTitle("#Delta #phi (rad)");
1510 fhDeltaPhiUeLeftUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1511 outputContainer->Add(fhDeltaPhiUeLeftUpCharged) ;
1513 fhDeltaPhiUeRightUpCharged = new TH2F
1514 ("hDeltaPhiUeRightUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Up side range of trigger particles",
1515 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1516 fhDeltaPhiUeRightUpCharged->SetYTitle("#Delta #phi (rad)");
1517 fhDeltaPhiUeRightUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1518 outputContainer->Add(fhDeltaPhiUeRightUpCharged) ;
1520 fhDeltaPhiUeLeftDownCharged = new TH2F
1521 ("hDeltaPhiUeLeftDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Down side range of trigger particles",
1522 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1523 fhDeltaPhiUeLeftDownCharged->SetYTitle("#Delta #phi (rad)");
1524 fhDeltaPhiUeLeftDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1525 outputContainer->Add(fhDeltaPhiUeLeftDownCharged) ;
1527 fhDeltaPhiUeRightDownCharged = new TH2F
1528 ("hDeltaPhiUeRightDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Down side range of trigger particles",
1529 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1530 fhDeltaPhiUeRightDownCharged->SetYTitle("#Delta #phi (rad)");
1531 fhDeltaPhiUeRightDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1532 outputContainer->Add(fhDeltaPhiUeRightDownCharged) ;
1535 new TH2F("hXEUeChargedLeft","#it{x}_{#it{E}} with UE left side of trigger",
1536 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1537 fhXEUeLeftCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1538 fhXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1539 outputContainer->Add(fhXEUeLeftCharged) ;
1541 fhXEUeLeftUpCharged =
1542 new TH2F("hXEUeChargedLeftUp","#it{x}_{#it{E}} with UE left Up side of trigger",
1543 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1544 fhXEUeLeftUpCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1545 fhXEUeLeftUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1546 outputContainer->Add(fhXEUeLeftUpCharged) ;
1548 fhXEUeRightUpCharged =
1549 new TH2F("hXEUeChargedRightUp","#it{x}_{#it{E} h^{#pm}} with UE right Up side of trigger",
1550 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1551 fhXEUeRightUpCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1552 fhXEUeRightUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1553 outputContainer->Add(fhXEUeRightUpCharged) ;
1555 fhXEUeLeftDownCharged =
1556 new TH2F("hXEUeChargedLeftDown","#it{x}_{#it{E}} with UE left Down side of trigger",
1557 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1558 fhXEUeLeftDownCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1559 fhXEUeLeftDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1560 outputContainer->Add(fhXEUeLeftDownCharged) ;
1562 fhXEUeRightDownCharged =
1563 new TH2F("hXEUeChargedRightDown","#it{x}_{#it{E} h^{#pm}} with UE right Down side of trigger",
1564 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1565 fhXEUeRightDownCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1566 fhXEUeRightDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1567 outputContainer->Add(fhXEUeRightDownCharged) ;
1569 fhPtHbpXEUeLeftCharged =
1570 new TH2F("hHbpXEUeChargedLeft","#xi = ln(1/#it{x}_{#it{E}}) with charged UE left side of trigger",
1571 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1572 fhPtHbpXEUeLeftCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1573 fhPtHbpXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1574 outputContainer->Add(fhPtHbpXEUeLeftCharged) ;
1577 new TH2F("hZTUeChargedLeft","#it{z}_{trigger h^{#pm}} = #it{p}_{T Ueh^{#pm}} / #it{p}_{T trigger} with UE left side of trigger",
1578 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1579 fhZTUeLeftCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1580 fhZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1581 outputContainer->Add(fhZTUeLeftCharged) ;
1583 fhPtHbpZTUeLeftCharged =
1584 new TH2F("hHbpZTUeChargedLeft","#xi = ln(1/#it{z}_{T}) with charged UE left side of trigger",
1585 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
1586 fhPtHbpZTUeLeftCharged->SetYTitle("ln(1/#it{z}_{T})");
1587 fhPtHbpZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1588 outputContainer->Add(fhPtHbpZTUeLeftCharged) ;
1591 if(fFillPileUpHistograms)
1593 fhDeltaPhiChargedOtherBC = new TH2F
1594 ("hDeltaPhiChargedOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC!=0",
1595 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1596 fhDeltaPhiChargedOtherBC->SetYTitle("#Delta #phi (rad)");
1597 fhDeltaPhiChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1599 fhDeltaPhiChargedPtA3GeVOtherBC = new TH2F
1600 ("hDeltaPhiChargedPtA3GeVOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC!=0",
1601 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1602 fhDeltaPhiChargedPtA3GeVOtherBC->SetYTitle("#Delta #phi (rad)");
1603 fhDeltaPhiChargedPtA3GeVOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1605 fhPtTrigChargedOtherBC =
1606 new TH2F("hPtTrigChargedOtherBC","trigger and charged tracks pt distribution, track BC!=0",
1607 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1608 fhPtTrigChargedOtherBC->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1609 fhPtTrigChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1611 fhXEChargedOtherBC =
1612 new TH2F("hXEChargedOtherBC","#it{x}_{#it{E}} for charged tracks, track BC!=0",
1613 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1614 fhXEChargedOtherBC->SetYTitle("#it{x}_{#it{E}}");
1615 fhXEChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1617 fhXEUeChargedOtherBC =
1618 new TH2F("hXEUeChargedOtherBC","#it{x}_{#it{E}} for Underlying Event, track BC!=0",
1619 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1620 fhXEUeChargedOtherBC->SetYTitle("#it{x}_{#it{E}}");
1621 fhXEUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1623 fhZTChargedOtherBC =
1624 new TH2F("hZTChargedOtherBC","#it{z}_{T} for charged tracks, track BC!=0",
1625 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1626 fhZTChargedOtherBC->SetYTitle("#it{z}_{T}");
1627 fhZTChargedOtherBC->SetXTitle("#it{p}_{T trigger}");
1629 fhZTUeChargedOtherBC =
1630 new TH2F("hZTUeChargedOtherBC","#it{z}_{T} for Underlying Event, track BC!=0",
1631 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1632 fhZTUeChargedOtherBC->SetYTitle("#it{z}_{T}");
1633 fhZTUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1635 outputContainer->Add(fhDeltaPhiChargedOtherBC) ;
1636 outputContainer->Add(fhDeltaPhiChargedPtA3GeVOtherBC) ;
1637 outputContainer->Add(fhXEChargedOtherBC) ;
1638 outputContainer->Add(fhXEUeChargedOtherBC) ;
1639 outputContainer->Add(fhZTChargedOtherBC) ;
1640 outputContainer->Add(fhZTUeChargedOtherBC) ;
1641 outputContainer->Add(fhPtTrigChargedOtherBC) ;
1643 fhDeltaPhiChargedBC0 = new TH2F
1644 ("hDeltaPhiChargedBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0",
1645 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1646 fhDeltaPhiChargedBC0->SetYTitle("#Delta #phi (rad)");
1647 fhDeltaPhiChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1649 fhDeltaPhiChargedPtA3GeVBC0 = new TH2F
1650 ("hDeltaPhiChargedPtA3GeVBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0",
1651 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1652 fhDeltaPhiChargedPtA3GeVBC0->SetYTitle("#Delta #phi (rad)");
1653 fhDeltaPhiChargedPtA3GeVBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1655 fhPtTrigChargedBC0 =
1656 new TH2F("hPtTrigChargedBC0","trigger and charged tracks pt distribution, track BC==0",
1657 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1658 fhPtTrigChargedBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1659 fhPtTrigChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1662 new TH2F("hXEChargedBC0","#it{x}_{#it{E}} for charged tracks, track BC==0",
1663 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1664 fhXEChargedBC0->SetYTitle("#it{x}_{#it{E}}");
1665 fhXEChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1668 new TH2F("hXEUeChargedBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0",
1669 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1670 fhXEUeChargedBC0->SetYTitle("#it{x}_{#it{E}}");
1671 fhXEUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1674 new TH2F("hZTChargedBC0","#it{z}_{T} for charged tracks, track BC==0",
1675 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1676 fhZTChargedBC0->SetYTitle("#it{z}_{T}");
1677 fhZTChargedBC0->SetXTitle("#it{p}_{T trigger}");
1680 new TH2F("hZTUeChargedBC0","#it{z}_{T} for Underlying Event, track BC==0",
1681 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1682 fhZTUeChargedBC0->SetYTitle("#it{z}_{T}");
1683 fhZTUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1685 outputContainer->Add(fhDeltaPhiChargedBC0) ;
1686 outputContainer->Add(fhDeltaPhiChargedPtA3GeVBC0) ;
1687 outputContainer->Add(fhXEChargedBC0) ;
1688 outputContainer->Add(fhXEUeChargedBC0) ;
1689 outputContainer->Add(fhZTChargedBC0) ;
1690 outputContainer->Add(fhZTUeChargedBC0) ;
1691 outputContainer->Add(fhPtTrigChargedBC0) ;
1693 fhPtTriggerVtxBC0 = new TH1F("hPtTriggerVtxBC0","#it{p}_{T} distribution of trigger particles", nptbins,ptmin,ptmax);
1694 fhPtTriggerVtxBC0->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1696 fhDeltaPhiChargedVtxBC0 = new TH2F
1697 ("hDeltaPhiChargedVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0",
1698 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1699 fhDeltaPhiChargedVtxBC0->SetYTitle("#Delta #phi (rad)");
1700 fhDeltaPhiChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1702 fhDeltaPhiChargedPtA3GeVVtxBC0 = new TH2F
1703 ("hDeltaPhiChargedPtA3GeVVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0",
1704 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1705 fhDeltaPhiChargedPtA3GeVVtxBC0->SetYTitle("#Delta #phi (rad)");
1706 fhDeltaPhiChargedPtA3GeVVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1708 fhPtTrigChargedVtxBC0 =
1709 new TH2F("hPtTrigChargedVtxBC0","trigger and charged tracks pt distribution, track BC==0",
1710 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1711 fhPtTrigChargedVtxBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1712 fhPtTrigChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1715 new TH2F("hXEChargedVtxBC0","#it{x}_{#it{E}} for charged tracks, track BC==0",
1716 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1717 fhXEChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}");
1718 fhXEChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1720 fhXEUeChargedVtxBC0 =
1721 new TH2F("hXEUeChargedVtxBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0",
1722 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1723 fhXEUeChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}");
1724 fhXEUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1727 new TH2F("hZTChargedVtxBC0","#it{z}_{T} for charged tracks, track BC==0",
1728 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1729 fhZTChargedVtxBC0->SetYTitle("#it{z}_{T}");
1730 fhZTChargedVtxBC0->SetXTitle("#it{p}_{T trigger}");
1732 fhZTUeChargedVtxBC0 =
1733 new TH2F("hZTUeChargedVtxBC0","#it{z}_{T} for Underlying Event, track BC==0",
1734 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1735 fhZTUeChargedVtxBC0->SetYTitle("#it{z}_{T}");
1736 fhZTUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1738 outputContainer->Add(fhPtTriggerVtxBC0);
1739 outputContainer->Add(fhDeltaPhiChargedVtxBC0) ;
1740 outputContainer->Add(fhDeltaPhiChargedPtA3GeVVtxBC0) ;
1741 outputContainer->Add(fhXEChargedVtxBC0) ;
1742 outputContainer->Add(fhXEUeChargedVtxBC0) ;
1743 outputContainer->Add(fhZTChargedVtxBC0) ;
1744 outputContainer->Add(fhZTUeChargedVtxBC0) ;
1745 outputContainer->Add(fhPtTrigChargedVtxBC0) ;
1747 for(Int_t i = 0 ; i < 7 ; i++)
1749 fhPtTriggerPileUp[i] = new TH1F(Form("hPtTriggerPileUp%s",pileUpName[i].Data()),
1750 Form("#it{p}_{T} distribution of trigger particles, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
1751 fhPtTriggerPileUp[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1752 outputContainer->Add(fhPtTriggerPileUp[i]);
1754 fhDeltaPhiChargedPileUp[i] = new TH2F(Form("hDeltaPhiChargedPileUp%s",pileUpName[i].Data()),
1755 Form("#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1756 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1757 fhDeltaPhiChargedPileUp[i]->SetYTitle("#Delta #phi (rad)");
1758 fhDeltaPhiChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1759 outputContainer->Add(fhDeltaPhiChargedPileUp[i]) ;
1761 fhDeltaPhiChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaPhiChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1762 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()),
1763 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1764 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #phi (rad)");
1765 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1766 outputContainer->Add(fhDeltaPhiChargedPtA3GeVPileUp[i]) ;
1768 fhDeltaEtaChargedPileUp[i] = new TH2F(Form("hDeltaEtaChargedPileUp%s",pileUpName[i].Data()),
1769 Form("#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1770 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1771 fhDeltaEtaChargedPileUp[i]->SetYTitle("#Delta #eta");
1772 fhDeltaEtaChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1773 outputContainer->Add(fhDeltaEtaChargedPileUp[i]) ;
1775 fhDeltaEtaChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaEtaChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1776 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()),
1777 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1778 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #eta");
1779 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1780 outputContainer->Add(fhDeltaEtaChargedPtA3GeVPileUp[i]) ;
1782 fhXEChargedPileUp[i] = new TH2F(Form("hXEChargedPileUp%s",pileUpName[i].Data()),
1783 Form("#it{x}_{#it{E}} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1784 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1785 fhXEChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}");
1786 fhXEChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1787 outputContainer->Add(fhXEChargedPileUp[i]) ;
1789 fhXEUeChargedPileUp[i] = new TH2F(Form("hXEUeChargedPileUp%s",pileUpName[i].Data()),
1790 Form("#it{x}_{#it{E}} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1791 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1792 fhXEUeChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}");
1793 fhXEUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1794 outputContainer->Add(fhXEUeChargedPileUp[i]) ;
1796 fhZTChargedPileUp[i] = new TH2F(Form("hZTChargedPileUp%s",pileUpName[i].Data()),
1797 Form("#it{z}_{T} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1798 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1799 fhZTChargedPileUp[i]->SetYTitle("#it{z}_{T}");
1800 fhZTChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1801 outputContainer->Add(fhZTChargedPileUp[i]) ;
1803 fhZTUeChargedPileUp[i] = new TH2F(Form("hZTUeChargedPileUp%s",pileUpName[i].Data()),
1804 Form("#it{z}_{T} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1805 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1806 fhZTUeChargedPileUp[i]->SetYTitle("#it{z}_{T}");
1807 fhZTUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1808 outputContainer->Add(fhZTUeChargedPileUp[i]) ;
1810 fhPtTrigChargedPileUp[i] = new TH2F(Form("hPtTrigChargedPileUp%s",pileUpName[i].Data()),
1811 Form("trigger and charged tracks pt distribution, %s Pile-Up event",pileUpName[i].Data()),
1812 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1813 fhPtTrigChargedPileUp[i]->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1814 fhPtTrigChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1815 outputContainer->Add(fhPtTrigChargedPileUp[i]) ;
1820 if(fFillHighMultHistograms)
1822 Int_t nMultiBins = GetNCentrBin();
1823 fhDeltaPhiChargedMult = new TH2F*[nMultiBins] ;
1824 fhDeltaEtaChargedMult = new TH2F*[nMultiBins] ;
1825 fhXEMult = new TH2F*[nMultiBins] ;
1826 fhXEUeMult = new TH2F*[nMultiBins] ;
1827 fhZTMult = new TH2F*[nMultiBins] ;
1828 fhZTUeMult = new TH2F*[nMultiBins] ;
1830 for(Int_t im=0; im<nMultiBins; im++)
1832 fhDeltaPhiChargedMult[im] = new TH2F
1833 (Form("hDeltaPhiCharged_Mult%d",im),Form("#Delta #phi charged Mult bin %d",im), nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1834 fhDeltaPhiChargedMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1835 fhDeltaPhiChargedMult[im]->SetYTitle("#Delta #phi (rad)");
1837 fhDeltaEtaChargedMult[im] = new TH2F
1838 (Form("hDeltaEtaCharged_Mult%d",im),Form("#Delta #eta charged Mult bin %d",im), nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
1839 fhDeltaEtaChargedMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1840 fhDeltaEtaChargedMult[im]->SetYTitle("#Delta #eta");
1842 fhXEMult[im] = new TH2F
1843 (Form("hXECharged_Mult%d",im),Form("#it{x}_{E} charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1844 fhXEMult[im]->SetYTitle("#it{x}_{E}");
1845 fhXEMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1847 fhXEUeMult[im] = new TH2F
1848 (Form("hXEUeCharged_Mult%d",im),Form("#it{x}_{E} UE charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1849 fhXEUeMult[im]->SetYTitle("#it{x}_{E}");
1850 fhXEUeMult[im]->SetXTitle("#it{p}_{T trigger}(GeV/#it{c})");
1852 fhZTMult[im] = new TH2F
1853 (Form("hZTCharged_Mult%d",im),Form("#it{z}_{T} charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1854 fhZTMult[im]->SetYTitle("#it{z}_{T}");
1855 fhZTMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1857 fhZTUeMult[im] = new TH2F
1858 (Form("hZTUeCharged_Mult%d",im),Form("#it{z}_{T} UE charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
1859 fhZTUeMult[im]->SetYTitle("#it{z}_{T}");
1860 fhZTUeMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1862 outputContainer->Add(fhDeltaPhiChargedMult[im]) ;
1863 outputContainer->Add(fhDeltaEtaChargedMult[im]) ;
1864 outputContainer->Add(fhXEMult [im]);
1865 outputContainer->Add(fhXEUeMult[im]);
1866 outputContainer->Add(fhZTMult [im]);
1867 outputContainer->Add(fhZTUeMult[im]);
1873 fhAssocPtBkg = new TH2F("hAssocPtBkg", " Trigger #it{p}_{T} vs associated hadron #it{p}_{T} from background",
1874 nptbins, ptmin, ptmax,nptbins,ptmin,ptmax);
1875 fhAssocPtBkg->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1876 fhAssocPtBkg->SetYTitle("#it{p}_{T associated} (GeV/#it{c})");
1877 outputContainer->Add(fhAssocPtBkg) ;
1879 fhDeltaPhiBrad = new TH2F("hDeltaPhiBrad","atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs #it{p}_{T trigger} ",
1880 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
1881 fhDeltaPhiBrad->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1882 fhDeltaPhiBrad->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
1883 outputContainer->Add(fhDeltaPhiBrad) ;
1886 fhDeltaPhiDeltaEtaAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1887 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1888 fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
1889 fhDeltaPhiAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
1890 if(fFillMomImbalancePtAssocBinsHisto)
1892 fhXEAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1893 fhZTAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1898 fhXEVZ = new TH2F*[nz];
1899 fhZTVZ = new TH2F*[nz];
1903 fhDeltaPhiBradAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1905 if(fPi0Trigger || fDecayTrigger)
1907 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1908 fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
1909 fhDeltaPhiDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1912 if(fHMPIDCorrelation)
1914 fhDeltaPhiAssocPtBinHMPID = new TH2F*[fNAssocPtBins*nz];
1915 fhDeltaPhiAssocPtBinHMPIDAcc= new TH2F*[fNAssocPtBins*nz];
1918 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
1920 for(Int_t z = 0 ; z < nz ; z++)
1926 sz = Form("_vz%d",z);
1927 tz = Form(", #it{v}_{#it{z}} bin %d",z);
1930 //printf("iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
1932 fhDeltaPhiDeltaEtaAssocPtBin[bin] = new TH2F(Form("hDeltaPhiDeltaEtaPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1933 Form("#Delta #phi vs #Delta #eta for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1934 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1935 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
1936 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetYTitle("#Delta #eta");
1938 fhDeltaPhiAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1939 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()),
1940 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1941 fhDeltaPhiAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1942 fhDeltaPhiAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
1944 outputContainer->Add(fhDeltaPhiDeltaEtaAssocPtBin[bin]) ;
1945 outputContainer->Add(fhDeltaPhiAssocPtBin[bin]) ;
1947 if(fFillEtaGapsHisto)
1949 fhDeltaPhiAssocPtBinDEta08[bin] = new TH2F(Form("hDeltaPhiDeltaEta0.8PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1950 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()),
1951 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1952 fhDeltaPhiAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1953 fhDeltaPhiAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
1955 fhDeltaPhiAssocPtBinDEta0[bin] = new TH2F(Form("hDeltaPhiDeltaEta0PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1956 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()),
1957 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1958 fhDeltaPhiAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1959 fhDeltaPhiAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
1961 outputContainer->Add(fhDeltaPhiAssocPtBinDEta08[bin]) ;
1962 outputContainer->Add(fhDeltaPhiAssocPtBinDEta0[bin]) ;
1965 if(fPi0Trigger || fDecayTrigger)
1967 fhDeltaPhiDecayChargedAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtDecayChargedAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1968 Form("#Delta #phi vs #it{p}_{T trigger} tagged as decay for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1969 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1970 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1971 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
1973 outputContainer->Add(fhDeltaPhiDecayChargedAssocPtBin[bin]) ;
1978 fhDeltaPhiBradAssocPtBin[bin] = new TH2F(Form("hDeltaPhiBradPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1979 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()),
1980 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
1981 fhDeltaPhiBradAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1982 fhDeltaPhiBradAssocPtBin[bin]->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
1983 outputContainer->Add(fhDeltaPhiBradAssocPtBin[bin]) ;
1986 if(fHMPIDCorrelation)
1988 fhDeltaPhiAssocPtBinHMPID[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPID", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1989 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()),
1990 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1991 fhDeltaPhiAssocPtBinHMPID[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})" );
1992 fhDeltaPhiAssocPtBinHMPID[bin]->SetYTitle("#Delta #phi (rad)");
1994 fhDeltaPhiAssocPtBinHMPIDAcc[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPIDAcc", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1995 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()),
1996 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1997 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1998 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetYTitle("#Delta #phi (rad)");
2000 outputContainer->Add(fhDeltaPhiAssocPtBinHMPID [bin]) ;
2001 outputContainer->Add(fhDeltaPhiAssocPtBinHMPIDAcc[bin]) ;
2006 if(fFillMomImbalancePtAssocBinsHisto)
2008 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2010 fhXEAssocPtBin[i] = new TH2F(Form("hXEAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
2011 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]),
2012 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2013 fhXEAssocPtBin[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2014 fhXEAssocPtBin[i]->SetYTitle("#it{x}_{#it{E}}");
2016 fhZTAssocPtBin[i] = new TH2F(Form("hZTAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
2017 Form("#it{z}_{T} vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
2018 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2019 fhZTAssocPtBin[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2020 fhZTAssocPtBin[i]->SetYTitle("#it{z}_{T}");
2023 outputContainer->Add(fhXEAssocPtBin[i]);
2024 outputContainer->Add(fhZTAssocPtBin[i]);
2030 for(Int_t z = 0 ; z < nz ; z++)
2032 sz = Form("_vz%d",z);
2033 tz = Form(", #it{v}_{#it{z}} bin %d",z);
2035 fhXEVZ[z] = new TH2F(Form("hXE%s", sz.Data()),
2036 Form("#it{x}_{#it{E}} vs #it{p}_{T trigger}%s", tz.Data()),
2037 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2038 fhXEVZ[z]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2039 fhXEVZ[z]->SetYTitle("#it{x}_{#it{E}}");
2041 fhZTVZ[z] = new TH2F(Form("hZT%s",sz.Data()),
2042 Form("#it{z}_{T} vs #it{p}_{T trigger}%s", tz.Data()),
2043 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2044 fhZTVZ[z]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2045 fhZTVZ[z]->SetYTitle("#it{z}_{T}");
2047 outputContainer->Add(fhXEVZ[z]);
2048 outputContainer->Add(fhZTVZ[z]);
2052 if(fPi0Trigger || fDecayTrigger)
2056 fhPtPi0DecayRatio = new TH2F
2057 ("hPtPi0DecayRatio","#it{p}_{T} of #pi^{0} and the ratio of pt for two decay",
2058 nptbins,ptmin,ptmax, 100,0.,2.);
2059 fhPtPi0DecayRatio->SetXTitle("#it{p}_{T}^{#pi^{0}} (GeV/#it{c})");
2060 fhPtPi0DecayRatio->SetYTitle("#it{p}_{T}^{Decay}/#it{p}_{T}^{#pi^{0}}");
2061 outputContainer->Add(fhPtPi0DecayRatio) ;
2064 fhDeltaPhiDecayCharged = new TH2F
2065 ("hDeltaPhiDecayCharged","#phi_{Decay} - #phi_{h^{#pm}} vs #it{p}_{T Decay}",
2066 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2067 fhDeltaPhiDecayCharged->SetYTitle("#Delta #phi (rad)");
2068 fhDeltaPhiDecayCharged->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
2071 new TH2F("hXEDecayCharged","#it{x}_{#it{E}} Decay",
2072 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2073 fhXEDecayCharged->SetYTitle("#it{x}_{#it{E}}");
2074 fhXEDecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2077 new TH2F("hZTDecayCharged","#it{z}_{trigger h^{#pm}} = #it{p}_{T h^{#pm}} / #it{p}_{T Decay}",
2078 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2079 fhZTDecayCharged->SetYTitle("#it{z}_{decay h^{#pm}}");
2080 fhZTDecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2082 outputContainer->Add(fhDeltaPhiDecayCharged) ;
2083 outputContainer->Add(fhXEDecayCharged) ;
2084 outputContainer->Add(fhZTDecayCharged) ;
2087 //Correlation with neutral hadrons
2090 fhDeltaPhiDeltaEtaNeutral = new TH2F
2091 ("hDeltaPhiDeltaEtaNeutral","#phi_{trigger} - #phi_{h^{0}} vs #eta_{trigger} - #eta_{h^{0}}",
2092 ndeltaphibins ,deltaphimin,deltaphimax, ndeltaetabins ,deltaetamin,deltaetamax);
2093 fhDeltaPhiDeltaEtaNeutral->SetXTitle("#Delta #phi (rad)");
2094 fhDeltaPhiDeltaEtaNeutral->SetYTitle("#Delta #eta");
2096 fhPhiNeutral = new TH2F
2097 ("hPhiNeutral","#phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}",
2098 nptbins,ptmin,ptmax,180,0,TMath::TwoPi());
2099 fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)");
2100 fhPhiNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})");
2102 fhEtaNeutral = new TH2F
2103 ("hEtaNeutral","#eta_{#pi^{0}} vs #it{p}_{T #pi^{0}}",
2104 nptbins,ptmin,ptmax,200,-1.,1.);
2105 fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)");
2106 fhEtaNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})");
2108 fhDeltaPhiNeutral = new TH2F
2109 ("hDeltaPhiNeutral","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T trigger}",
2110 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2111 fhDeltaPhiNeutral->SetYTitle("#Delta #phi (rad)");
2112 fhDeltaPhiNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2114 fhDeltaPhiNeutralPt = new TH2F
2115 ("hDeltaPhiNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}",
2116 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2117 fhDeltaPhiNeutralPt->SetYTitle("#Delta #phi (rad)");
2118 fhDeltaPhiNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2120 fhDeltaEtaNeutral = new TH2F
2121 ("hDeltaEtaNeutral","#eta_{trigger} - #eta_{#pi^{0}} vs #it{p}_{T trigger}",
2122 nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
2123 fhDeltaEtaNeutral->SetYTitle("#Delta #eta");
2124 fhDeltaEtaNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2127 new TH2F("hXENeutral","#it{x}_{#it{E}} for #pi^{0} associated",
2128 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2129 fhXENeutral->SetYTitle("#it{x}_{#it{E}}");
2130 fhXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2133 new TH2F("hHbpXENeutral","#xi = ln(1/#it{x}_{#it{E}})for #pi^{0} associated",
2134 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2135 fhPtHbpXENeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2136 fhPtHbpXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2139 new TH2F("hZTNeutral","#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated",
2140 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2141 fhZTNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}");
2142 fhZTNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2145 new TH2F("hHbpZTNeutral","#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2146 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2147 fhPtHbpZTNeutral->SetYTitle("ln(1/#it{z}_{T})");
2148 fhPtHbpZTNeutral->SetXTitle("#it{p}_{T trigger}");
2150 outputContainer->Add(fhDeltaPhiDeltaEtaNeutral);
2151 outputContainer->Add(fhPhiNeutral) ;
2152 outputContainer->Add(fhEtaNeutral) ;
2153 outputContainer->Add(fhDeltaPhiNeutral) ;
2154 outputContainer->Add(fhDeltaPhiNeutralPt) ;
2155 outputContainer->Add(fhDeltaEtaNeutral) ;
2156 outputContainer->Add(fhXENeutral) ;
2157 outputContainer->Add(fhPtHbpXENeutral) ;
2158 outputContainer->Add(fhZTNeutral) ;
2159 outputContainer->Add(fhPtHbpZTNeutral) ;
2161 fhDeltaPhiUeNeutralPt = new TH2F
2162 (Form("hDeltaPhiUe%sNeutralPt",right.Data()),"#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}",
2163 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2164 fhDeltaPhiUeNeutralPt->SetYTitle("#Delta #phi (rad)");
2165 fhDeltaPhiUeNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2168 new TH2F(Form("hXEUeNeutral%s",right.Data()),"#it{x}_{#it{E}} for #pi^{0} associated",
2169 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2170 fhXEUeNeutral->SetYTitle("#it{x}_{#it{E}}");
2171 fhXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2173 fhPtHbpXEUeNeutral =
2174 new TH2F(Form("hHbpXEUeNeutral%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2175 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2176 fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2177 fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2180 new TH2F(Form("hZTUeNeutral%s",right.Data()),"#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated",
2181 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2182 fhZTUeNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}");
2183 fhZTUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2185 fhPtHbpZTUeNeutral =
2186 new TH2F(Form("hHbpZTUeNeutral%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2187 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2188 fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{z}_{T})");
2189 fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2191 outputContainer->Add(fhDeltaPhiUeNeutralPt) ;
2192 outputContainer->Add(fhXEUeNeutral) ;
2193 outputContainer->Add(fhPtHbpXEUeNeutral) ;
2194 outputContainer->Add(fhZTUeNeutral) ;
2195 outputContainer->Add(fhPtHbpZTUeNeutral) ;
2199 fhDeltaPhiUeLeftNeutral = new TH2F
2200 ("hDeltaPhiUeLeftNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs #it{p}_{T h^{0}} with neutral UE left side range of trigger particles",
2201 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2202 fhDeltaPhiUeLeftNeutral->SetYTitle("#Delta #phi (rad)");
2203 fhDeltaPhiUeLeftNeutral->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2204 outputContainer->Add(fhDeltaPhiUeLeftNeutral) ;
2207 new TH2F("hXEUeNeutralLeft","#it{x}_{#it{E}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger",
2208 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2209 fhXEUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2210 fhXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2211 outputContainer->Add(fhXEUeLeftNeutral) ;
2213 fhPtHbpXEUeLeftNeutral =
2214 new TH2F("hHbpXEUeNeutralLeft","#xi = ln(1/#it{x}_{#it{E}}) with neutral UE left side of trigger",
2215 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2216 fhPtHbpXEUeLeftNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2217 fhPtHbpXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2218 outputContainer->Add(fhPtHbpXEUeLeftNeutral) ;
2221 new TH2F("hZTUeNeutralLeft","#it{z}_{trigger h^{0}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger",
2222 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2223 fhZTUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2224 fhZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2225 outputContainer->Add(fhZTUeLeftNeutral) ;
2227 fhPtHbpZTUeLeftNeutral =
2228 new TH2F("hHbpZTUeNeutralLeft","#xi = ln(1/#it{z}_{T}) with neutral UE left side of trigger",
2229 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2230 fhPtHbpZTUeLeftNeutral->SetYTitle("ln(1/#it{z}_{T})");
2231 fhPtHbpZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger}");
2232 outputContainer->Add(fhPtHbpZTUeLeftNeutral) ;
2235 if(fPi0Trigger || fDecayTrigger)
2237 fhDeltaPhiDecayNeutral = new TH2F
2238 ("hDeltaPhiDecayNeutral","#phi_{Decay} - #phi_{h^{0}} vs #it{p}_{T Decay}",
2239 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2240 fhDeltaPhiDecayNeutral->SetYTitle("#Delta #phi (rad)");
2241 fhDeltaPhiDecayNeutral->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
2244 new TH2F("hXEDecayNeutral","#it{x}_{#it{E}} for decay trigger",
2245 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2246 fhXEDecayNeutral->SetYTitle("#it{x}_{#it{E}}");
2247 fhXEDecayNeutral->SetXTitle("#it{p}_{T decay}");
2250 new TH2F("hZTDecayNeutral","#it{z}_{trigger h^{0}} = #it{p}_{T h^{0}} / #it{p}_{T Decay}",
2251 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2252 fhZTDecayNeutral->SetYTitle("#it{z}_{h^{0}}");
2253 fhZTDecayNeutral->SetXTitle("#it{p}_{T decay}");
2255 outputContainer->Add(fhDeltaPhiDecayNeutral) ;
2256 outputContainer->Add(fhXEDecayNeutral) ;
2257 outputContainer->Add(fhZTDecayNeutral) ;
2260 }//Correlation with neutral hadrons
2262 // If data is MC, fill more histograms, depending on origin
2265 for(Int_t i= fMCGenTypeMin; i <= fMCGenTypeMax; i++)
2267 fhMCPtTrigger[i] = new TH1F (Form("hMCPtTrigger_%s",nameMC[i].Data()),
2268 Form("MC %s: generated trigger #it{p}_{T}",nameMC[i].Data()),
2269 nptbins,ptmin,ptmax);
2270 fhMCPtTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2272 fhMCPhiTrigger[i] = new TH2F (Form("hMCPhiTrigger_%s",nameMC[i].Data()),
2273 Form("MC %s: generated trigger #phi",nameMC[i].Data()),
2274 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2275 fhMCPhiTrigger[i]->SetYTitle("#phi (rad)");
2276 fhMCPhiTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2278 fhMCEtaTrigger[i] = new TH2F (Form("hMCEtaTrigger_%s",nameMC[i].Data()),
2279 Form("MC %s: generated trigger #eta",nameMC[i].Data()),
2280 nptbins,ptmin,ptmax, netabins,etamin,etamax);
2281 fhMCEtaTrigger[i]->SetYTitle("#eta");
2282 fhMCEtaTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2284 if(fMakeAbsoluteLeading || fMakeNearSideLeading)
2286 fhMCPtTriggerNotLeading[i] = new TH1F (Form("hMCPtTriggerNotLeading_%s",nameMC[i].Data()),
2287 Form("MC %s: generated trigger #it{p}_{T}, when not leading of primaries",nameMC[i].Data()),
2288 nptbins,ptmin,ptmax);
2289 fhMCPtTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2291 fhMCPhiTriggerNotLeading[i] = new TH2F (Form("hMCPhiTriggerNotLeading_%s",nameMC[i].Data()),
2292 Form("MC %s: generated trigger #phi, when not leading of primaries",nameMC[i].Data()),
2293 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2294 fhMCPhiTriggerNotLeading[i]->SetYTitle("#phi (rad)");
2295 fhMCPhiTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2298 fhMCEtaTriggerNotLeading[i] = new TH2F (Form("hMCEtaTriggerNotLeading_%s",nameMC[i].Data()),
2299 Form("MC %s: generated triogger #eta, when not leading of primaries",nameMC[i].Data()),
2300 nptbins,ptmin,ptmax, netabins,etamin,etamax);
2301 fhMCEtaTriggerNotLeading[i]->SetYTitle("#eta ");
2302 fhMCEtaTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2305 fhMCEtaCharged[i] = new TH2F (Form("hMCEtaCharged_%s",nameMC[i].Data()),
2306 Form("MC %s: #eta_{h^{#pm}} vs #it{p}_{T #pm}",nameMC[i].Data()),
2307 nptbins,ptmin,ptmax,100,-1.,1.);
2308 fhMCEtaCharged[i]->SetYTitle("#eta_{h^{#pm}} (rad)");
2309 fhMCEtaCharged[i]->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
2311 fhMCPhiCharged[i] = new TH2F(Form("hMCPhiCharged_%s",nameMC[i].Data()),
2312 Form("MC %s: phi_{h^{#pm}} vs #it{p}_{T #pm}",nameMC[i].Data()),
2313 nptbins,ptmin,ptmax,180,0,TMath::TwoPi());
2314 fhMCPhiCharged[i]->SetYTitle("MC #phi_{h^{#pm}} (rad)");
2315 fhMCPhiCharged[i]->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
2317 fhMCDeltaPhiDeltaEtaCharged[i] = new TH2F (Form("hMCDeltaPhiDeltaEtaCharged_%s",nameMC[i].Data()),
2318 Form("MC %s: phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",nameMC[i].Data()),
2319 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2320 fhMCDeltaPhiDeltaEtaCharged[i]->SetXTitle("#Delta #phi (rad)");
2321 fhMCDeltaPhiDeltaEtaCharged[i]->SetYTitle("#Delta #eta");
2323 fhMCDeltaEtaCharged[i] = new TH2F (Form("hMCDeltaEtaCharged_%s",nameMC[i].Data()),
2324 Form("MC %s: #eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger} and #it{p}_{T assoc}",nameMC[i].Data()),
2325 nptbins,ptmin,ptmax,ndeltaetabins ,deltaetamin,deltaetamax);
2326 fhMCDeltaEtaCharged[i]->SetYTitle("#Delta #eta");
2327 fhMCDeltaEtaCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2329 fhMCDeltaPhiCharged[i] = new TH2F (Form("hMCDeltaPhiCharged_%s",nameMC[i].Data()),
2330 Form("MC %s: #phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",nameMC[i].Data()),
2331 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2332 fhMCDeltaPhiCharged[i]->SetYTitle("#Delta #phi (rad)");
2333 fhMCDeltaPhiCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2335 fhMCDeltaPhiChargedPt[i] = new TH2F (Form("hMCDeltaPhiChargedPt_%s",nameMC[i].Data()),
2336 Form("MC %s: #phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}",nameMC[i].Data()),
2337 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2338 fhMCDeltaPhiChargedPt[i]->SetYTitle("#Delta #phi (rad)");
2339 fhMCDeltaPhiChargedPt[i]->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
2341 fhMCPtXECharged[i] = new TH2F (Form("hMCPtXECharged_%s",nameMC[i].Data()),
2342 Form("MC %s: #it{x}_{#it{E}} with charged hadrons",nameMC[i].Data()),
2343 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2344 fhMCPtXECharged[i]->SetYTitle("#it{x}_{#it{E}}");
2345 fhMCPtXECharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2347 fhMCPtHbpXECharged[i] = new TH2F(Form("hMCHbpXECharged_%s",nameMC[i].Data()),
2348 Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",nameMC[i].Data()),
2349 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2350 fhMCPtHbpXECharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})");
2351 fhMCPtHbpXECharged[i]->SetXTitle("#it{p}_{T trigger}");
2353 fhMCPtZTCharged[i] = new TH2F(Form("hMCPtZTCharged_%s",nameMC[i].Data()),
2354 Form("MC %s: #it{z}_{T} with charged hadrons",nameMC[i].Data()),
2355 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2356 fhMCPtZTCharged[i]->SetYTitle("#it{z}_{T}");
2357 fhMCPtZTCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2359 fhMCPtHbpZTCharged[i] = new TH2F(Form("hMCHbpZTCharged_%s",nameMC[i].Data()),
2360 Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons",nameMC[i].Data()),
2361 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2362 fhMCPtHbpZTCharged[i]->SetYTitle("ln(1/#it{z}_{T})");
2363 fhMCPtHbpZTCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2365 fhMCPtTrigPout[i] = new TH2F(Form("hMCPtTrigPout_%s",nameMC[i].Data()),
2366 Form("MC %s: #it{p}_{out} with triggers",nameMC[i].Data()),
2367 nptbins,ptmin,ptmax,nptbins,-1.*ptmax/2.,ptmax/2.);
2368 fhMCPtTrigPout[i]->SetYTitle("#it{p}_{out} (GeV/#it{c})");
2369 fhMCPtTrigPout[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2371 fhMCPtAssocDeltaPhi[i] = new TH2F(Form("hMCPtAssocDeltaPhi_%s",nameMC[i].Data()),
2372 Form("MC %s: #Delta #phi with associated charged hadrons",nameMC[i].Data()),
2373 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2374 fhMCPtAssocDeltaPhi[i]->SetYTitle("#Delta #phi (rad)");
2375 fhMCPtAssocDeltaPhi[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2377 outputContainer->Add(fhMCPtTrigger[i]);
2378 outputContainer->Add(fhMCPhiTrigger[i]);
2379 outputContainer->Add(fhMCEtaTrigger[i]);
2381 if(fMakeAbsoluteLeading || fMakeNearSideLeading)
2383 outputContainer->Add(fhMCPtTriggerNotLeading[i]);
2384 outputContainer->Add(fhMCPhiTriggerNotLeading[i]);
2385 outputContainer->Add(fhMCEtaTriggerNotLeading[i]);
2388 outputContainer->Add(fhMCDeltaPhiDeltaEtaCharged[i]);
2389 outputContainer->Add(fhMCPhiCharged[i]) ;
2390 outputContainer->Add(fhMCEtaCharged[i]) ;
2391 outputContainer->Add(fhMCDeltaEtaCharged[i]) ;
2392 outputContainer->Add(fhMCDeltaPhiCharged[i]) ;
2394 outputContainer->Add(fhMCDeltaPhiChargedPt[i]) ;
2395 outputContainer->Add(fhMCPtXECharged[i]) ;
2396 outputContainer->Add(fhMCPtZTCharged[i]) ;
2397 outputContainer->Add(fhMCPtHbpXECharged[i]) ;
2398 outputContainer->Add(fhMCPtHbpZTCharged[i]) ;
2399 outputContainer->Add(fhMCPtTrigPout[i]) ;
2400 outputContainer->Add(fhMCPtAssocDeltaPhi[i]) ;
2405 new TH1F(Form("hMCUePart_%s",nameMC[i].Data()),
2406 Form("MC %s: UE particles distribution vs #it{p}_{T trigger}",nameMC[i].Data()),
2407 nptbins,ptmin,ptmax);
2408 fhMCUePart[i]->SetYTitle("#it{dN}^{ch}");
2409 fhMCUePart[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2411 fhMCPtXEUeCharged[i] =
2412 new TH2F(Form("hMCPtXEUeCharged%s",right.Data()),
2413 Form("MC %s: #it{x}_{#it{E}} with charged hadrons, Underlying Event",nameMC[i].Data()),
2414 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2415 fhMCPtXEUeCharged[i]->SetYTitle("#it{x}_{#it{E}}");
2416 fhMCPtXEUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2418 fhMCPtHbpXEUeCharged[i] =
2419 new TH2F(Form("hMCPtHbpXEUeCharged%s",right.Data()),
2420 Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, Underlying Event",nameMC[i].Data()),
2421 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2422 fhMCPtHbpXEUeCharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})");
2423 fhMCPtHbpXEUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2425 fhMCPtZTUeCharged[i] =
2426 new TH2F(Form("hMCPtZTUeCharged%s",right.Data()),
2427 Form("MC %s: #it{z}_{T} with charged hadrons, Underlying Event",nameMC[i].Data()),
2428 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2429 fhMCPtZTUeCharged[i]->SetYTitle("#it{z}_{T}");
2430 fhMCPtZTUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2432 fhMCPtHbpZTUeCharged[i] =
2433 new TH2F(Form("hMCPtHbpZTUeCharged%s",right.Data()),
2434 Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons, Underlying Event",nameMC[i].Data()),
2435 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2436 fhMCPtHbpZTUeCharged[i]->SetYTitle("ln(1/#it{z}_{T})");
2437 fhMCPtHbpZTUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2439 outputContainer->Add(fhMCUePart[i]);
2440 outputContainer->Add(fhMCPtXEUeCharged[i]) ;
2441 outputContainer->Add(fhMCPtZTUeCharged[i]) ;
2442 outputContainer->Add(fhMCPtHbpZTUeCharged[i]);
2443 outputContainer->Add(fhMCPtHbpXEUeCharged[i]);
2447 fhMCPtXEUeLeftCharged[i] = new TH2F(Form("hMCPtXEUeChargedLeft_%s",nameMC[i].Data()),
2448 Form("MC %s: #it{x}_{#it{E}} with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2449 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2450 fhMCPtXEUeLeftCharged[i]->SetYTitle("#it{x}_{#it{E}}");
2451 fhMCPtXEUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2453 fhMCPtHbpXEUeLeftCharged[i] = new TH2F(Form("hMCPtHbpXEUeChargedLeft_%s",nameMC[i].Data()),
2454 Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2455 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2456 fhMCPtHbpXEUeLeftCharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})");
2457 fhMCPtHbpXEUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2459 fhMCPtZTUeLeftCharged[i] = new TH2F(Form("hMCPtZTUeChargedLeft_%s",nameMC[i].Data()),
2460 Form("MC %s: #it{z}_{T} with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2461 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2462 fhMCPtZTUeLeftCharged[i]->SetYTitle("#it{z}_{T}");
2463 fhMCPtZTUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2465 fhMCPtHbpZTUeLeftCharged[i] = new TH2F(Form("hMCPtHbpZTUeChargedLeft_%s",nameMC[i].Data()),
2466 Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2467 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2468 fhMCPtHbpZTUeLeftCharged[i]->SetYTitle("ln(1/#it{z}_{T})");
2469 fhMCPtHbpZTUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2471 outputContainer->Add(fhMCPtXEUeLeftCharged[i]) ;
2472 outputContainer->Add(fhMCPtZTUeLeftCharged[i]) ;
2473 outputContainer->Add(fhMCPtHbpXEUeLeftCharged[i]);
2474 outputContainer->Add(fhMCPtHbpZTUeLeftCharged[i]) ;
2478 } //for MC histogram
2482 //create event containers
2484 if(!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForTracksExists()))
2486 Int_t nvz = GetNZvertBin();
2487 Int_t nrp = GetNRPBin();
2488 Int_t nce = GetNCentrBin();
2490 fListMixTrackEvents= new TList*[nvz*nrp*nce] ;
2492 for( Int_t ice = 0 ; ice < nce ; ice++ )
2494 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2496 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2498 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2500 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2501 // ic,iz, irp, bin);
2503 fListMixTrackEvents[bin] = new TList() ;
2504 fListMixTrackEvents[bin]->SetOwner(kFALSE);
2510 fhPtTriggerMixed = new TH1F ("hPtTriggerMixed","#it{p}_{T} distribution of trigger particles, used for mixing", nptbins,ptmin,ptmax);
2511 fhPtTriggerMixed->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2515 fhPtTriggerMixedVzBin = new TH2F ("hPtTriggerMixedVzBin","#it{p}_{T} distribution of trigger particles, used for mixing", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
2516 fhPtTriggerMixedVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2517 fhPtTriggerMixedVzBin->SetYTitle("#it{v}_{#it{z}} bin");
2518 outputContainer->Add(fhPtTriggerMixedVzBin);
2521 fhPtTriggerMixedBin = new TH2F ("hPtTriggerMixedBin","#it{p}_{T} distribution of trigger particles vs mixing bin", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
2522 fhPtTriggerMixedBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2523 fhPtTriggerMixedBin->SetYTitle("Bin");
2525 fhPhiTriggerMixed = new TH2F ("hPhiTriggerMixed","#phi distribution of trigger Particles, used for mixing",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2526 fhPhiTriggerMixed->SetYTitle("#phi (rad)");
2528 fhEtaTriggerMixed = new TH2F ("hEtaTriggerMixed","#eta distribution of trigger, used for mixing",nptbins,ptmin,ptmax, netabins,etamin,etamax);
2529 fhEtaTriggerMixed->SetYTitle("#eta ");
2531 outputContainer->Add(fhPtTriggerMixed);
2532 outputContainer->Add(fhPtTriggerMixedBin);
2533 outputContainer->Add(fhPhiTriggerMixed);
2534 outputContainer->Add(fhEtaTriggerMixed);
2536 // Fill the cluster pool only in isolation analysis or if requested
2537 if( neutralMix && (!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForCaloExists())))
2539 Int_t nvz = GetNZvertBin();
2540 Int_t nrp = GetNRPBin();
2541 Int_t nce = GetNCentrBin();
2543 fListMixCaloEvents= new TList*[nvz*nrp*nce] ;
2545 for( Int_t ice = 0 ; ice < nce ; ice++ )
2547 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2549 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2551 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2553 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2554 // ic,iz, irp, bin);
2556 fListMixCaloEvents[bin] = new TList() ;
2557 fListMixCaloEvents[bin]->SetOwner(kFALSE);
2563 //Init the list in the reader if not done previously
2564 if(fUseMixStoredInReader)
2566 if( !GetReader()->ListWithMixedEventsForTracksExists() )
2567 GetReader()->SetListWithMixedEventsForTracks(fListMixTrackEvents);
2569 if( !GetReader()->ListWithMixedEventsForCaloExists() )
2570 GetReader()->SetListWithMixedEventsForCalo (fListMixCaloEvents );
2573 fhEventBin=new TH1I("hEventBin","Number of triggers per bin(cen,vz,rp)",
2574 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2575 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2576 fhEventBin->SetXTitle("event bin");
2577 outputContainer->Add(fhEventBin) ;
2579 fhEventMixBin=new TH1I("hEventMixBin","Number of triggers mixed per event bin(cen,vz,rp)",
2580 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2581 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2582 fhEventMixBin->SetXTitle("event bin");
2583 outputContainer->Add(fhEventMixBin) ;
2585 fhEventMBBin=new TH1I("hEventMBBin","Number of min bias events per bin(cen,vz,rp)",
2586 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2587 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2588 fhEventMBBin->SetXTitle("event bin");
2589 outputContainer->Add(fhEventMBBin) ;
2591 fhNtracksMB=new TH2F("hNtracksMBEvent","Number of filtered tracks in MB event per event bin",ntrbins,trmin,trmax,
2592 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2593 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2594 fhNtracksMB->SetYTitle("event bin");
2595 fhNtracksMB->SetXTitle("#it{N}_{track}");
2596 outputContainer->Add(fhNtracksMB);
2600 fhNclustersMB=new TH2F("hNclustersMBEvent","Number of filtered clusters in MB events per event bin",nclbins,clmin,clmax,
2601 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2602 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2603 fhNclustersMB->SetYTitle("event bin");
2604 fhNclustersMB->SetXTitle("#it{N}_{cluster}");
2605 outputContainer->Add(fhNclustersMB);
2608 fhMixDeltaPhiCharged = new TH2F
2609 ("hMixDeltaPhiCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
2610 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2611 fhMixDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
2612 fhMixDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2613 outputContainer->Add(fhMixDeltaPhiCharged);
2615 fhMixDeltaPhiDeltaEtaCharged = new TH2F
2616 ("hMixDeltaPhiDeltaEtaCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
2617 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2618 fhMixDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
2619 fhMixDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
2620 outputContainer->Add(fhMixDeltaPhiDeltaEtaCharged);
2623 new TH2F("hMixXECharged","Mixed event : #it{x}_{#it{E}} for charged tracks",
2624 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2625 fhMixXECharged->SetYTitle("#it{x}_{#it{E}}");
2626 fhMixXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2627 outputContainer->Add(fhMixXECharged);
2630 new TH2F("hMixXEUeCharged","Mixed event : #it{x}_{#it{E}} for charged tracks in Ue region",
2631 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2632 fhMixXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
2633 fhMixXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2634 outputContainer->Add(fhMixXEUeCharged);
2637 new TH2F("hMixHbpXECharged","mixed event : #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
2638 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2639 fhMixHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2640 fhMixHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2641 outputContainer->Add(fhMixHbpXECharged);
2643 fhMixDeltaPhiChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2644 fhMixDeltaPhiChargedAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
2645 fhMixDeltaPhiChargedAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
2646 fhMixDeltaPhiDeltaEtaChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2648 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2650 for(Int_t z = 0 ; z < nz ; z++)
2656 sz = Form("_vz%d",z);
2657 tz = Form(", #it{v}_{#it{z}} bin %d",z);
2660 //printf("MIX : iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
2662 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiDeltaEtaChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2663 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()),
2664 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2665 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
2666 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetYTitle("#Delta #eta");
2668 outputContainer->Add(fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]);
2670 fhMixDeltaPhiChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2671 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()),
2672 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2673 fhMixDeltaPhiChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2674 fhMixDeltaPhiChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
2676 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBin[bin]);
2678 if(fFillEtaGapsHisto)
2680 fhMixDeltaPhiChargedAssocPtBinDEta08[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0.8ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2681 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()),
2682 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2683 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2684 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
2686 fhMixDeltaPhiChargedAssocPtBinDEta0[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2687 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()),
2688 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2689 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2690 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
2692 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta08[bin]);
2693 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta0[bin]);
2699 return outputContainer;
2703 //_________________________________________________________________________________________________
2704 Bool_t AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum(AliAODPWG4Particle* trigger,
2705 TLorentzVector & mom1,
2706 TLorentzVector & mom2)
2708 // Get the momentum of the pi0/eta assigned decay photons
2709 // In case of pi0/eta trigger, we may want to check their decay correlation,
2710 // get their decay children
2712 Int_t indexPhoton1 = trigger->GetCaloLabel(0);
2713 Int_t indexPhoton2 = trigger->GetCaloLabel(1);
2715 if(indexPhoton1!=-1 || indexPhoton2!=-1) return kFALSE;
2718 printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - indexPhoton1 = %d, indexPhoton2 = %d \n", indexPhoton1, indexPhoton2);
2720 TObjArray * clusters = 0x0 ;
2721 if(trigger->GetDetector()=="EMCAL") clusters = GetEMCALClusters() ;
2722 else clusters = GetPHOSClusters() ;
2724 for(Int_t iclus = 0; iclus < clusters->GetEntriesFast(); iclus++)
2726 AliVCluster * photon = (AliVCluster*) (clusters->At(iclus));
2728 if(photon->GetID()==indexPhoton1) photon->GetMomentum(mom1,GetVertex(0)) ;
2729 if(photon->GetID()==indexPhoton2) photon->GetMomentum(mom1,GetVertex(0)) ;
2731 if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - Photon1 = %f, Photon2 = %f \n", mom1.Pt(), mom2.Pt());
2739 //_____________________________________________________________
2740 Int_t AliAnaParticleHadronCorrelation::GetMCTagHistogramIndex(Int_t mcTag)
2742 // Index of MC histograms depending on MC origin
2744 if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPrompt) ||
2745 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCFragmentation)) return 0;
2746 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0)) return 1;
2747 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0Decay)) return 2;
2748 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) ||
2749 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEtaDecay)) return 3;
2750 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCOtherDecay)) return 4;
2751 else if(!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron)) return 5;
2756 //_________________________________________
2757 void AliAnaParticleHadronCorrelation::Init()
2762 if(!GetReader()->IsCTSSwitchedOn())
2763 AliFatal("STOP!: You want to use CTS tracks in analysis but not read!! \n!!Check the configuration file!!\n");
2766 //____________________________________________________
2767 void AliAnaParticleHadronCorrelation::InitParameters()
2770 //Initialize the parameters of the analysis.
2771 SetInputAODName("Particle");
2772 SetAODObjArrayName("Hadrons");
2773 AddToHistogramsName("AnaHadronCorr_");
2775 SetPtCutRange(0.,300);
2776 fDeltaPhiMinCut = TMath::DegToRad()*120.;
2777 fDeltaPhiMaxCut = TMath::DegToRad()*240. ;
2778 fSelectIsolated = kFALSE;
2779 fMakeSeveralUE = kFALSE;
2780 fUeDeltaPhiMinCut = TMath::DegToRad()*60.;
2781 fUeDeltaPhiMaxCut = TMath::DegToRad()*120 ;
2783 fNeutralCorr = kFALSE ;
2784 fPi0Trigger = kFALSE ;
2785 fDecayTrigger = kFALSE ;
2786 fHMPIDCorrelation = kFALSE ;
2788 fMakeAbsoluteLeading = kTRUE;
2789 fMakeNearSideLeading = kFALSE;
2792 fAssocPtBinLimit[0] = 0.2 ;
2793 fAssocPtBinLimit[1] = 0.5 ;
2794 fAssocPtBinLimit[2] = 1.0 ;
2795 fAssocPtBinLimit[3] = 2.0 ;
2796 fAssocPtBinLimit[4] = 3.0 ;
2797 fAssocPtBinLimit[5] = 4.0 ;
2798 fAssocPtBinLimit[6] = 5.0 ;
2799 fAssocPtBinLimit[7] = 6.0 ;
2800 fAssocPtBinLimit[8] = 7.0 ;
2801 fAssocPtBinLimit[9] = 8.0 ;
2802 fAssocPtBinLimit[10] = 9.0 ;
2803 fAssocPtBinLimit[11] = 10.0 ;
2804 fAssocPtBinLimit[12] = 12.0 ;
2805 fAssocPtBinLimit[13] = 14.0 ;
2806 fAssocPtBinLimit[14] = 16.0 ;
2807 fAssocPtBinLimit[15] = 20.0 ;
2808 fAssocPtBinLimit[16] = 30.0 ;
2809 fAssocPtBinLimit[17] = 40.0 ;
2810 fAssocPtBinLimit[18] = 50.0 ;
2811 fAssocPtBinLimit[19] = 200.0 ;
2813 fUseMixStoredInReader = kTRUE;
2818 fSelectLeadingHadronAngle = kFALSE;
2819 fMinLeadHadPhi = 150*TMath::DegToRad();
2820 fMaxLeadHadPhi = 210*TMath::DegToRad();
2823 fMaxLeadHadPt = 100;
2830 //_________________________________________________________________________
2831 Bool_t AliAnaParticleHadronCorrelation::IsTriggerTheEventLeadingParticle()
2833 // Check if the what of the selected triggers is leading particle comparing
2834 // with all the triggers, all the tracks or all the clusters (if requested for the clusters).
2836 Double_t ptTrig = GetMinPt();
2837 Double_t phiTrig = 0 ;
2838 fLeadingTriggerIndex =-1 ;
2840 AliAODPWG4ParticleCorrelation* pLeading = 0;
2842 // Loop on stored AOD particles, find leading trigger on the selected list, with at least min pT.
2844 for(Int_t iaod = 0; iaod < GetInputAODBranch()->GetEntriesFast() ; iaod++)
2846 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
2847 particle->SetLeadingParticle(kFALSE); // set it later
2849 // Vertex cut in case of mixing
2850 Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0));
2851 if(check == 0) continue;
2852 if(check == -1) return kFALSE; // not sure if it is correct.
2854 // find the leading particles with highest momentum
2855 if (particle->Pt() > ptTrig)
2857 ptTrig = particle->Pt() ;
2858 phiTrig = particle->Phi();
2860 pLeading = particle ;
2862 }// finish search of leading trigger particle on the AOD branch.
2864 if(index < 0) return kFALSE;
2866 //printf("AOD leading pT %2.2f, ID %d\n", pLeading->Pt(),pLeading->GetCaloLabel(0));
2868 if(phiTrig < 0 ) phiTrig += TMath::TwoPi();
2870 // Compare if it is the leading of all tracks
2873 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
2875 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
2877 if(track->GetID() == pLeading->GetTrackLabel(0) || track->GetID() == pLeading->GetTrackLabel(1) ||
2878 track->GetID() == pLeading->GetTrackLabel(2) || track->GetID() == pLeading->GetTrackLabel(3) ) continue ;
2880 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
2881 p3.SetXYZ(mom[0],mom[1],mom[2]);
2882 Float_t pt = p3.Pt();
2883 Float_t phi = p3.Phi() ;
2884 if(phi < 0) phi+=TMath::TwoPi();
2886 //jump out this event if near side associated particle pt larger than trigger
2887 if (fMakeNearSideLeading)
2889 if(pt > ptTrig && TMath::Abs(phi-phiTrig) < TMath::PiOver2()) return kFALSE;
2891 //jump out this event if there is any other particle with pt larger than trigger
2894 if(pt > ptTrig) return kFALSE ;
2898 // Compare if it is leading of all calorimeter clusters
2900 if(fCheckLeadingWithNeutralClusters)
2902 // Select the calorimeter cluster list
2903 TObjArray * nePl = 0x0;
2904 if (pLeading->GetDetector() == "PHOS" )
2905 nePl = GetPHOSClusters();
2907 nePl = GetEMCALClusters();
2909 if(!nePl) return kTRUE; // Do the selection just with the tracks if no calorimeter is available.
2912 for(Int_t ipr = 0;ipr < nePl->GetEntriesFast() ; ipr ++ )
2914 AliVCluster * cluster = (AliVCluster *) (nePl->At(ipr)) ;
2916 if(cluster->GetID() == pLeading->GetCaloLabel(0) || cluster->GetID() == pLeading->GetCaloLabel(1) ) continue ;
2918 cluster->GetMomentum(lv,GetVertex(0));
2920 Float_t pt = lv.Pt();
2921 Float_t phi = lv.Phi() ;
2922 if(phi < 0) phi+=TMath::TwoPi();
2924 if(IsTrackMatched(cluster,GetReader()->GetInputEvent())) continue ; // avoid charged clusters, already covered by tracks, or cluster merging with track.
2926 //jump out this event if near side associated particle pt larger than trigger
2927 // not really needed for calorimeter, unless DCal is included
2928 if (fMakeNearSideLeading)
2930 if(pt > ptTrig && TMath::Abs(phi-phiTrig) < TMath::PiOver2()) return kFALSE ;
2932 //jump out this event if there is any other particle with pt larger than trigger
2935 if(pt > ptTrig) return kFALSE ;
2938 } // check neutral clusters
2940 fLeadingTriggerIndex = index ;
2941 pLeading->SetLeadingParticle(kTRUE);
2943 if( GetDebug() > 1 ) printf("\t particle AOD with index %d is leading with pT %2.2f\n", fLeadingTriggerIndex, pLeading->Pt());
2949 //_________________________________________________________________
2950 void AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms()
2952 //Particle-Hadron Correlation Analysis, fill histograms
2954 if(!GetInputAODBranch())
2956 AliFatal(Form("No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data()));
2957 return ; // coverity
2960 Int_t naod = GetInputAODBranch()->GetEntriesFast();
2964 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - No particle AOD found! \n");
2966 return ; // no trigger particles found.
2971 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Begin hadron correlation analysis, fill histograms \n");
2972 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In particle branch aod entries %d\n", naod);
2973 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In CTS aod entries %d\n", GetCTSTracks()->GetEntriesFast());
2976 //------------------------------------------------------
2977 // Find leading trigger if analysis request only leading,
2978 // if there is no leading trigger, then skip the event
2981 if( fMakeAbsoluteLeading || fMakeNearSideLeading )
2983 Bool_t leading = IsTriggerTheEventLeadingParticle();
2986 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - AOD Leading trigger? %d, with index %d\n",leading,fLeadingTriggerIndex);
2990 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Leading was requested and not found\n");
2995 // Select only the leading in the trigger AOD loop
2996 naod = fLeadingTriggerIndex+1 ;
2997 iaod = fLeadingTriggerIndex ;
3001 //------------------------------------------------------
3002 // Get event multiplicity and bins
3004 Float_t cen = GetEventCentrality();
3005 Float_t ep = GetEventPlaneAngle();
3006 if(fFillHighMultHistograms) fhTriggerEventPlaneCentrality->Fill(cen,ep);
3008 Int_t mixEventBin = GetEventMixBin();
3009 Int_t vzbin = GetEventVzBin();
3011 //------------------------------------------------------
3012 // Loop on trigger AOD
3014 for( iaod = 0; iaod < naod; iaod++ )
3016 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
3019 // Trigger particle selection criteria:
3021 Float_t pt = particle->Pt();
3023 if(pt < GetMinPt() || pt > GetMaxPt() ) continue ;
3025 fhPtTriggerInput->Fill(pt);
3028 // check if it was a calorimeter cluster
3029 // and if the shower shape cut was requested apply it.
3030 // Not needed if already done at the particle identification level,
3031 // but for isolation studies, it is preferred not to remove so we do it here
3033 Int_t clID1 = particle->GetCaloLabel(0) ;
3034 Int_t clID2 = particle->GetCaloLabel(1) ; // for photon clusters should not be set.
3035 if( GetDebug() > 1 ) printf("%s Trigger : id1 %d, id2 %d, min %f, max %f, det %s\n",
3036 GetInputAODName().Data(),clID1,clID2,fM02MinCut,fM02MaxCut,(particle->GetDetector()).Data());
3038 if(clID1 > 0 && clID2 < 0 && fM02MaxCut > 0 && fM02MinCut > 0)
3041 TObjArray* clusters = 0x0;
3042 if (particle->GetDetector() == "EMCAL") clusters = GetEMCALClusters();
3043 else if(particle->GetDetector() == "PHOS" ) clusters = GetPHOSClusters();
3047 AliVCluster *cluster = FindCluster(clusters,clID1,iclus);
3048 Float_t m02 = cluster->GetM02();
3049 if(m02 > fM02MaxCut || m02 < fM02MinCut) continue ;
3052 fhPtTriggerSSCut->Fill(pt);
3056 // Check if the particle is isolated or if we want to take the isolation into account
3057 // This bool is set in AliAnaParticleIsolation
3061 if( !particle->IsIsolated() ) continue;
3062 fhPtTriggerIsoCut->Fill(pt);
3066 // Check if trigger is in fiducial region
3068 if(IsFiducialCutOn())
3070 Bool_t in = GetFiducialCut()->IsInFiducialCut(*particle->Momentum(),particle->GetDetector()) ;
3071 if(! in ) continue ;
3074 fhPtTriggerFidCut->Fill(pt);
3076 //---------------------------------------
3079 // Find the leading hadron in the opposite hemisphere to the triggeer
3080 // and accept the trigger if leading is in defined window.
3081 Bool_t okLeadHad = kTRUE;
3082 if(fSelectLeadingHadronAngle)
3083 okLeadHad = FindLeadingOppositeHadronInWindow(particle);
3084 if(!okLeadHad) continue;
3087 // Charged particles correlation
3089 MakeChargedCorrelation(particle);
3095 mcIndex = GetMCTagHistogramIndex(particle->GetTag());
3096 MakeMCChargedCorrelation(particle->GetLabel(), mcIndex);
3099 // Do own mixed event with charged,
3100 // add event and remove previous or fill the mixed histograms
3102 MakeChargedMixCorrelation(particle);
3105 // Neutral particles correlation
3108 MakeNeutralCorrelation(particle);
3110 //----------------------------------------------------------------
3111 // Fill trigger pT related histograms if not absolute leading
3114 // pT of the trigger, vs trigger origin if MC
3116 fhPtTrigger->Fill(pt);
3117 if(IsDataMC() && mcIndex >=0 && mcIndex < 7)
3118 fhPtTriggerMC[mcIndex]->Fill(pt);
3121 // Acceptance of the trigger
3123 Float_t phi = particle->Phi();
3124 if( phi < 0 ) phi+=TMath::TwoPi();
3125 fhPhiTrigger->Fill(pt, phi);
3127 fhEtaTrigger->Fill(pt, particle->Eta());
3128 //printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Trigger particle : pt %f, eta %f, phi %f\n",particle->Pt(),particle->Eta(),phi);
3130 //----------------------------------
3131 // Trigger particle pT vs event bins
3133 fhPtTriggerBin->Fill(pt,mixEventBin);
3135 fhPtTriggerVzBin->Fill(pt,vzbin);
3137 if(fFillHighMultHistograms)
3139 fhPtTriggerCentrality->Fill(pt,cen);
3140 fhPtTriggerEventPlane->Fill(pt,ep);
3143 //----------------------------------
3144 // Trigger particle pT vs pile-up
3146 if(fFillPileUpHistograms)
3148 Int_t vtxBC = GetReader()->GetVertexBC();
3149 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA) fhPtTriggerVtxBC0->Fill(pt);
3151 if(GetReader()->IsPileUpFromSPD()) fhPtTriggerPileUp[0]->Fill(pt);
3152 if(GetReader()->IsPileUpFromEMCal()) fhPtTriggerPileUp[1]->Fill(pt);
3153 if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtTriggerPileUp[2]->Fill(pt);
3154 if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtTriggerPileUp[3]->Fill(pt);
3155 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtTriggerPileUp[4]->Fill(pt);
3156 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtTriggerPileUp[5]->Fill(pt);
3157 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtTriggerPileUp[6]->Fill(pt);
3159 } // AOD trigger loop
3161 //Reinit for next event
3162 fLeadingTriggerIndex = -1;
3164 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - End fill histograms \n");
3167 //_______________________________________________________________________________________________________
3168 void AliAnaParticleHadronCorrelation::MakeChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
3170 // Charged Hadron Correlation Analysis
3172 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Make trigger particle - charged hadron correlation \n");
3174 Float_t phiTrig = aodParticle->Phi();
3175 Float_t etaTrig = aodParticle->Eta();
3176 Float_t ptTrig = aodParticle->Pt();
3177 Bool_t decay = aodParticle->IsTagged();
3178 Int_t mcTag = aodParticle->GetTag();
3179 Double_t bz = GetReader()->GetInputEvent()->GetMagneticField();
3181 Float_t pt = -100. ;
3182 Float_t phi = -100. ;
3183 Float_t eta = -100. ;
3184 Float_t deltaPhi = -100. ;
3187 TLorentzVector photonMom ;
3188 TObjArray * reftracks = 0x0;
3191 // Mixed event settings
3192 Int_t evtIndex11 = -1 ; // cluster trigger or pi0 trigger
3193 Int_t evtIndex12 = -1 ; // pi0 trigger
3194 Int_t evtIndex13 = -1 ; // charged trigger
3196 if (GetMixedEvent())
3198 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
3199 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
3200 evtIndex13 = GetMixedEvent()->EventIndex(aodParticle->GetTrackLabel(0)) ;
3204 // In case of pi0/eta trigger, we may want to check their decay correlation,
3205 // get their decay children
3207 TLorentzVector decayMom1;
3208 TLorentzVector decayMom2;
3209 Bool_t decayFound = kFALSE;
3212 decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
3215 fhPtPi0DecayRatio->Fill(ptTrig, decayMom1.Pt()/ptTrig);
3216 fhPtPi0DecayRatio->Fill(ptTrig, decayMom2.Pt()/ptTrig);
3220 //-----------------------------------------------------------------------
3221 // Track loop, select tracks with good pt, phi and fill AODs or histograms
3222 //-----------------------------------------------------------------------
3224 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
3226 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
3228 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
3229 p3.SetXYZ(mom[0],mom[1],mom[2]);
3233 if(phi < 0) phi+=TMath::TwoPi();
3235 //Select only hadrons in pt range
3236 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
3238 //remove trigger itself for correlation when use charged triggers
3239 if( track->GetID() == aodParticle->GetTrackLabel(0) || track->GetID() == aodParticle->GetTrackLabel(1) ||
3240 track->GetID() == aodParticle->GetTrackLabel(2) || track->GetID() == aodParticle->GetTrackLabel(3) )
3243 //Only for mixed event frame
3244 Int_t evtIndex2 = 0 ;
3245 if (GetMixedEvent())
3247 evtIndex2 = GetMixedEvent()->EventIndex(track->GetID()) ;
3248 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 || evtIndex13 == evtIndex2 ) // photon and track from different events
3251 if (TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut())
3256 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
3258 // ------------------------------
3259 // Track type bin or bits setting
3263 // * Set the pt associated bin for the defined bins *
3265 Int_t assocBin = -1;
3266 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3268 if(pt > fAssocPtBinLimit[i] && pt < fAssocPtBinLimit[i+1]) assocBin= i;
3272 // * Assign to the histogram array a bin corresponding
3273 // to a combination of pTa and vz bins *
3280 nz = GetNZvertBin();
3281 vz = GetEventVzBin();
3284 Int_t bin = assocBin*nz+vz;
3286 //printf("assoc Bin = %d, vZ bin = %d, bin = %d \n", assocBin,GetEventVzBin(),bin);
3289 // * Get the status of the TOF bit *
3291 ULong_t status = track->GetStatus();
3292 Bool_t okTOF = ( (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ) ;
3293 //Double32_t tof = track->GetTOFsignal()*1e-3;
3294 Int_t trackBC = track->GetTOFBunchCrossing(bz);
3297 if (okTOF && trackBC!=0) outTOF = 1;
3298 else if(okTOF && trackBC==0) outTOF = 0;
3300 // Track multiplicity or cent bin
3301 Int_t cenbin = GetEventCentralityBin(); // combine with vz assoc bin???
3307 // Azimuthal Angle histograms
3310 deltaPhi = phiTrig-phi;
3313 // Calculate deltaPhi shift so that for the particles on the opposite side
3314 // it is defined between 90 and 270 degrees
3315 // Shift [-360,-90] to [0, 270]
3316 // and [270,360] to [-90,0]
3317 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3318 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3320 FillChargedAngularCorrelationHistograms(pt, ptTrig, bin, phi, phiTrig, deltaPhi,
3321 eta, etaTrig, decay, track->GetHMPIDsignal(),
3322 outTOF, cenbin, mcTag);
3325 // Imbalance zT/xE/pOut histograms
3329 // Delta phi cut for momentum imbalance correlation
3331 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
3332 FillChargedMomentumImbalanceHistograms(ptTrig, pt, deltaPhi, cenbin, track->Charge(),
3333 assocBin, decay, outTOF, mcTag);
3336 // Underlying event, right side, default case
3338 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3339 FillChargedUnderlyingEventHistograms(ptTrig, pt, deltaPhi, cenbin, outTOF);
3342 // Several UE calculation, in different perpendicular regions, up to 6:
3343 // left, right, upper-left, lower left, upper-right, lower-right
3346 FillChargedUnderlyingEventSidesHistograms(ptTrig,pt,deltaPhi);
3349 if(fPi0Trigger && decayFound)
3350 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2, kTRUE) ;
3353 // Add track reference to array
3355 if(fFillAODWithReferences)
3360 reftracks = new TObjArray(0);
3361 TString trackname = Form("%sTracks", GetAODObjArrayName().Data());
3362 reftracks->SetName(trackname.Data());
3363 reftracks->SetOwner(kFALSE);
3366 reftracks->Add(track);
3367 }// reference track to AOD
3370 //Fill AOD with reference tracks, if not filling histograms
3371 if(fFillAODWithReferences && reftracks)
3373 aodParticle->AddObjArray(reftracks);
3378 //_________________________________________________________________________________________________________
3379 void AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
3381 // Mix current trigger with tracks in another MB event
3383 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Make trigger particle - charged hadron mixed event correlation \n");
3385 if(GetMixedEvent()) return; // This is not the mixed event from general mixing frame
3387 // Get the event with similar caracteristics
3388 //printf("MakeChargedMixCorrelation for %s\n",GetInputAODName().Data());
3390 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
3392 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
3394 if(!inputHandler) return;
3396 if(!(inputHandler->IsEventSelected( ) & GetReader()->GetEventTriggerMask())) return;
3398 // Get the pool, check if it exits
3399 Int_t eventBin = GetEventMixBin();
3401 //Check that the bin exists, if not (bad determination of RP, ntrality or vz bin) do nothing
3402 if(eventBin < 0) return;
3404 fhEventBin->Fill(eventBin);
3406 // get neutral clusters pool?
3407 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
3408 Bool_t neutralMix = fFillNeutralEventMixPool || isoCase ;
3411 TList * poolCalo = 0;
3412 if(fUseMixStoredInReader)
3414 pool = GetReader()->GetListWithMixedEventsForTracks(eventBin);
3415 if(neutralMix) poolCalo = GetReader()->GetListWithMixedEventsForCalo (eventBin);
3419 pool = fListMixTrackEvents[eventBin];
3420 if(neutralMix) poolCalo = fListMixCaloEvents [eventBin];
3425 if( neutralMix && !poolCalo )
3426 printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Careful, cluster pool not available\n");
3428 Double_t ptTrig = aodParticle->Pt();
3429 Double_t etaTrig = aodParticle->Eta();
3430 Double_t phiTrig = aodParticle->Phi();
3431 if(phiTrig < 0.) phiTrig+=TMath::TwoPi();
3434 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Pool bin %d size %d, trigger trigger pt=%f, phi=%f, eta=%f\n",
3435 eventBin,pool->GetSize(), ptTrig,phiTrig,etaTrig);
3437 Double_t ptAssoc = -999.;
3438 Double_t phiAssoc = -999.;
3439 Double_t etaAssoc = -999.;
3440 Double_t deltaPhi = -999.;
3441 Double_t deltaEta = -999.;
3442 Double_t xE = -999.;
3444 // Start from first event in pool except if in this same event the pool was filled
3446 if(GetReader()->GetLastTracksMixedEvent() == GetEventNumber()) ev0 = 1;
3448 for(Int_t ev=ev0; ev < pool->GetSize(); ev++)
3451 // Recover the lists of tracks or clusters
3453 TObjArray* bgTracks = static_cast<TObjArray*>(pool->At(ev));
3454 TObjArray* bgCalo = 0;
3456 // Recover the clusters list if requested
3457 if( neutralMix && poolCalo )
3459 if(pool->GetSize()!=poolCalo->GetSize())
3460 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Different size of calo and track pools\n");
3462 bgCalo = static_cast<TObjArray*>(poolCalo->At(ev));
3465 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Event %d in calo pool not available?\n",ev);
3469 // Isolate the trigger in the mixed event with mixed tracks and clusters
3471 if( OnlyIsolated() )
3473 Int_t n=0; Int_t nfrac = 0; Bool_t isolated = kFALSE; Float_t coneptsum = 0;
3474 GetIsolationCut()->MakeIsolationCut(bgTracks,bgCalo,
3475 GetReader(), GetCaloPID(),
3476 kFALSE, aodParticle, "",
3477 n,nfrac,coneptsum, isolated);
3479 //printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Isolated? %d - cone %f, ptthres %f",
3480 // isolated,GetIsolationCut()->GetConeSize(),GetIsolationCut()->GetPtThreshold());
3481 //if(bgTracks)printf(" - n track %d", bgTracks->GetEntriesFast());
3484 if(!isolated) continue ;
3488 // Check if the trigger is leading of mixed event
3490 Int_t nTracks=bgTracks->GetEntriesFast();
3492 if(fMakeNearSideLeading || fMakeAbsoluteLeading)
3494 Bool_t leading = kTRUE;
3495 for(Int_t jlead = 0;jlead < nTracks; jlead++ )
3497 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(jlead) ;
3499 ptAssoc = track->Pt();
3500 phiAssoc = track->Phi() ;
3501 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3503 if (fMakeNearSideLeading)
3505 if(ptAssoc > ptTrig && TMath::Abs(phiAssoc-phiTrig) < TMath::PiOver2())
3511 //jump out this event if there is any other particle with pt larger than trigger
3512 else if(fMakeAbsoluteLeading)
3514 if(ptAssoc > ptTrig)
3522 if( !neutralMix && fCheckLeadingWithNeutralClusters )
3523 printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Leading of clusters requested but no clusters in mixed event\n");
3525 if(neutralMix && fCheckLeadingWithNeutralClusters && bgCalo)
3527 Int_t nClusters=bgCalo->GetEntriesFast();
3528 TLorentzVector mom ;
3529 for(Int_t jlead = 0;jlead <nClusters; jlead++ )
3531 AliAODPWG4Particle *cluster= (AliAODPWG4Particle*) bgCalo->At(jlead) ;
3533 ptAssoc = cluster->Pt();
3534 phiAssoc = cluster->Phi() ;
3535 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3537 if (fMakeNearSideLeading)
3539 if(ptAssoc > ptTrig && TMath::Abs(phiAssoc-phiTrig) < TMath::PiOver2())
3545 //jump out this event if there is any other particle with pt larger than trigger
3546 else if(fMakeAbsoluteLeading)
3548 if(ptAssoc > ptTrig)
3557 if(!leading) continue; // not leading, check the next event in pool
3561 // Fill histograms for selected triggers
3564 fhEventMixBin->Fill(eventBin);
3566 //printf("\t Read Pool event %d, nTracks %d\n",ev,nTracks);
3568 fhPtTriggerMixed ->Fill(ptTrig);
3569 fhPhiTriggerMixed ->Fill(ptTrig, phiTrig);
3570 fhEtaTriggerMixed ->Fill(ptTrig, etaTrig);
3571 fhPtTriggerMixedBin->Fill(ptTrig,eventBin);
3572 if(fCorrelVzBin)fhPtTriggerMixedVzBin->Fill(ptTrig, GetEventVzBin());
3575 // Correlation histograms
3577 for(Int_t j1 = 0;j1 <nTracks; j1++ )
3579 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(j1) ;
3581 if(!track) continue;
3583 ptAssoc = track->Pt();
3584 etaAssoc = track->Eta();
3585 phiAssoc = track->Phi() ;
3586 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3588 deltaPhi = phiTrig-phiAssoc;
3589 if(deltaPhi < -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3590 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3591 deltaEta = etaTrig-etaAssoc;
3594 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation(): deltaPhi= %f, deltaEta=%f\n",deltaPhi, deltaEta);
3596 // Angular correlation
3597 fhMixDeltaPhiCharged ->Fill(ptTrig, deltaPhi);
3598 fhMixDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
3601 // Momentum imbalance
3603 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
3605 xE = -ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3608 printf("MakeChargedMixCorrelation(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
3609 xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
3611 fhMixXECharged->Fill(ptTrig,xE);
3612 if(xE > 0 ) fhMixHbpXECharged->Fill(ptTrig, TMath::Log(1./xE));
3616 // Underlying event momentum imbalance
3618 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3620 //Underlying event region
3621 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
3622 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
3625 printf("MakeChargedMixCorrelation(): Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
3626 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
3628 fhMixXEUeCharged->Fill(ptTrig,uexE);
3631 // Set the pt associated bin for the defined bins
3632 Int_t assocBin = -1;
3633 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3635 if(ptAssoc > fAssocPtBinLimit[i] && ptAssoc < fAssocPtBinLimit[i+1]) assocBin= i;
3639 // Assign to the histogram array a bin corresponding to a combination of pTa and vz bins
3646 nz = GetNZvertBin();
3647 vz = GetEventVzBin();
3650 Int_t bin = assocBin*nz+vz;
3652 if(bin < 0) continue ; // this pt bin was not considered
3654 fhMixDeltaPhiChargedAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
3655 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->Fill(deltaPhi, deltaEta);
3657 if(fFillEtaGapsHisto)
3659 if(TMath::Abs(deltaEta) > 0.8)
3660 fhMixDeltaPhiChargedAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
3661 if(TMath::Abs(deltaEta) < 0.01)
3662 fhMixDeltaPhiChargedAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
3666 } // mixed event loop
3670 //_______________________________________________________________________________________________________
3671 void AliAnaParticleHadronCorrelation::MakeNeutralCorrelation(AliAODPWG4ParticleCorrelation * aodParticle)
3673 // Neutral Pion Correlation Analysis
3675 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); // For the future, foresee more possible pi0 lists
3676 if(!pi0list) return ;
3678 Int_t npi0 = pi0list->GetEntriesFast();
3679 if(npi0 == 0) return ;
3682 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Particle - pi0 correlation, %d pi0's\n",npi0);
3684 Int_t evtIndex11 = 0 ;
3685 Int_t evtIndex12 = 0 ;
3686 if (GetMixedEvent())
3688 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
3689 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
3692 Float_t pt = -100. ;
3693 Float_t zT = -100. ;
3694 Float_t phi = -100. ;
3695 Float_t eta = -100. ;
3696 Float_t xE = -100. ;
3697 Float_t hbpXE= -100. ;
3698 Float_t hbpZT= -100. ;
3700 Float_t ptTrig = aodParticle->Pt();
3701 Float_t phiTrig = aodParticle->Phi();
3702 Float_t etaTrig = aodParticle->Eta();
3703 Float_t deltaPhi= -100. ;
3704 Float_t deltaEta= -100. ;
3706 TLorentzVector photonMom ;
3708 // In case of pi0/eta trigger, we may want to check their decay correlation,
3709 // get their decay children
3710 TLorentzVector decayMom1;
3711 TLorentzVector decayMom2;
3712 Bool_t decayFound = kFALSE;
3713 if(fPi0Trigger) decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
3715 TObjArray * refpi0 = 0x0;
3718 //Loop on stored AOD pi0
3720 for(Int_t iaod = 0; iaod < npi0 ; iaod++)
3722 AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (pi0list->At(iaod));
3724 Int_t evtIndex2 = 0 ;
3725 Int_t evtIndex3 = 0 ;
3726 if (GetMixedEvent())
3728 evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(0)) ;
3729 evtIndex3 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(1)) ;
3731 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 ||
3732 evtIndex11 == evtIndex3 || evtIndex12 == evtIndex3) // trigger and pi0 are not from different events
3738 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
3740 //remove trigger itself for correlation when use charged triggers
3741 if(aodParticle->GetCaloLabel(0) >= 0 &&
3742 (pi0->GetCaloLabel(0) == aodParticle->GetCaloLabel(0) || pi0->GetCaloLabel(1) == aodParticle->GetCaloLabel(0))) continue ;
3744 if( aodParticle->GetCaloLabel(1) >= 0 &&
3745 (pi0->GetCaloLabel(0) == aodParticle->GetCaloLabel(1) || pi0->GetCaloLabel(1) == aodParticle->GetCaloLabel(1))) continue ;
3748 // Angular correlations
3752 deltaEta = etaTrig-eta;
3753 deltaPhi = phiTrig-phi;
3754 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3755 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3757 fhEtaNeutral ->Fill(pt , eta );
3758 fhPhiNeutral ->Fill(pt , phi );
3759 fhDeltaEtaNeutral->Fill(ptTrig, deltaEta);
3760 fhDeltaPhiNeutral->Fill(ptTrig, deltaPhi);
3762 if(pt > 2 ) fhDeltaPhiDeltaEtaNeutral->Fill(deltaPhi, deltaEta);
3765 // Momentum imbalance
3772 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
3774 //delta phi cut for correlation
3775 if( (deltaPhi > fDeltaPhiMinCut) && ( deltaPhi < fDeltaPhiMaxCut) )
3777 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3780 printf("MakeNeutralCorrelation(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
3781 xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
3783 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3785 fhDeltaPhiNeutralPt->Fill(pt,deltaPhi);
3786 fhXENeutral ->Fill(ptTrig,xE);
3787 fhPtHbpXENeutral ->Fill(ptTrig,hbpXE);
3788 fhZTNeutral ->Fill(ptTrig,zT);
3789 fhPtHbpZTNeutral ->Fill(ptTrig,hbpZT);
3791 else if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3793 // Randomize angle for xE calculation
3794 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
3796 xE = -(pt/ptTrig)*TMath::Cos(randomphi);
3797 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3799 fhDeltaPhiUeNeutralPt->Fill(pt,deltaPhi);
3800 fhZTUeNeutral ->Fill(ptTrig,zT);
3801 fhPtHbpZTUeNeutral ->Fill(ptTrig,hbpZT);
3802 fhXEUeNeutral ->Fill(ptTrig,xE);
3803 fhPtHbpXEUeNeutral ->Fill(ptTrig,hbpXE);
3806 // Several UE calculation, not sure it is useful
3807 // with partical calorimter acceptance
3808 if(fMakeSeveralUE) FillNeutralUnderlyingEventSidesHistograms(ptTrig,pt,zT,hbpZT,deltaPhi);
3811 // Decay photon correlations
3813 if(fPi0Trigger && decayFound)
3814 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2,kFALSE) ;
3816 if(fFillAODWithReferences)
3821 refpi0 = new TObjArray(0);
3822 refpi0->SetName(GetAODObjArrayName()+"Pi0s");
3823 refpi0->SetOwner(kFALSE);
3826 }//put references in trigger AOD
3829 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Selected pi0: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
3833 //Fill AOD with reference tracks, if not filling histograms
3834 if(fFillAODWithReferences && refpi0)
3836 aodParticle->AddObjArray(refpi0);
3840 //____________________________________________________________________________________________
3841 void AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(Int_t label, Int_t histoIndex)
3843 // Charged Hadron Correlation Analysis with MC information
3845 if ( GetDebug() > 1 )
3846 AliInfo("Make trigger particle - charged hadron correlation in AOD MC level");
3850 if( GetDebug() > 0 ) AliInfo(Form(" *** bad label ***: label %d", label));
3854 // Do MC correlation for a given particle type range.
3855 // Types defined in GetMCTagHistogramIndex:
3856 // 0 direct gamma; 1 pi0; 2 pi0 decay; 3 eta decay; 4 other decay; 5 electron; 6 other (hadron)
3857 if(histoIndex < fMCGenTypeMin || histoIndex > fMCGenTypeMax) return ;
3859 AliStack * stack = 0x0 ;
3860 TParticle * primary = 0x0 ;
3861 TClonesArray * mcparticles = 0x0 ;
3862 AliAODMCParticle * aodprimary = 0x0 ;
3864 Double_t eprim = 0 ;
3865 Double_t ptprim = 0 ;
3866 Double_t phiprim = 0 ;
3867 Double_t etaprim = 0 ;
3869 Int_t iParticle = 0 ;
3871 Bool_t leadTrig = kTRUE;
3873 if( GetReader()->ReadStack() )
3875 stack = GetMCStack() ;
3878 AliFatal("Stack not available, is the MC handler called? STOP");
3882 //nTracks = stack->GetNtrack() ;
3883 nTracks = stack->GetNprimary();
3884 if( label >= stack->GetNtrack() )
3887 AliInfo(Form("*** large label ***: label %d, n tracks %d", label, stack->GetNtrack()));
3891 primary = stack->Particle(label);
3894 AliInfo(Form(" *** no primary ***: label %d", label));
3898 eprim = primary->Energy();
3899 ptprim = primary->Pt();
3900 etaprim = primary->Eta();
3901 phiprim = primary->Phi();
3902 if(phiprim < 0) phiprim+=TMath::TwoPi();
3904 if(ptprim < 0.01 || eprim < 0.01) return ;
3906 for (iParticle = 0 ; iParticle < nTracks ; iParticle++)
3908 TParticle * particle = stack->Particle(iParticle);
3909 TLorentzVector momentum;
3911 //keep only final state particles
3912 if( particle->GetStatusCode() != 1 ) continue ;
3914 //---------- Charged particles ----------------------
3915 Int_t pdg = particle->GetPdgCode();
3916 Int_t charge = (Int_t) TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
3917 if(charge == 0) continue;
3919 particle->Momentum(momentum);
3921 //Particles in CTS acceptance, make sure to use the same selection as in the reader
3922 Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
3923 //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,momentum.Pt(),momentum.Eta(),momentum.Phi()*TMath::RadToDeg());
3924 if( !inCTS ) continue;
3926 // Remove conversions
3927 if ( TMath::Abs(pdg) == 11 && stack->Particle(particle->GetFirstMother())->GetPdgCode() == 22 ) continue ;
3929 if ( label == iParticle ) continue; // avoid trigger particle
3931 Float_t phi = particle->Phi();
3932 if(phi < 0) phi+=TMath::TwoPi();
3934 Bool_t lead = FillChargedMCCorrelationHistograms(particle->Pt(),phi,particle->Eta(),ptprim,phiprim,etaprim,histoIndex);
3935 if(!lead) leadTrig = kFALSE;
3936 //if ( !lead && (fMakeAbsoluteLeading || fMakeNearSideLeading) ) return;
3942 else if( GetReader()->ReadAODMCParticles() )
3944 //Get the list of MC particles
3945 mcparticles = GetReader()->GetAODMCParticles();
3946 if( !mcparticles ) return;
3948 nTracks = mcparticles->GetEntriesFast() ;
3950 if( label >= nTracks )
3953 AliInfo(Form(" *** large label ***: label %d, n tracks %d", label,nTracks));
3958 aodprimary = (AliAODMCParticle*) mcparticles->At(label);
3961 AliInfo(Form(" *** no AOD primary ***: label %d", label));
3965 eprim = aodprimary->E();
3966 ptprim = aodprimary->Pt();
3967 etaprim = aodprimary->Eta();
3968 phiprim = aodprimary->Phi();
3969 if(phiprim < 0) phiprim+=TMath::TwoPi();
3971 if(ptprim < 0.01 || eprim < 0.01) return ;
3973 for (iParticle = 0; iParticle < nTracks; iParticle++)
3975 AliAODMCParticle *part = (AliAODMCParticle*) mcparticles->At(iParticle);
3977 if (!part->IsPhysicalPrimary() ) continue; // same as part->GetStatus() !=1
3979 if ( part->Charge() == 0 ) continue;
3981 TLorentzVector momentum(part->Px(),part->Py(),part->Pz(),part->E());
3983 //Particles in CTS acceptance, make sure to use the same selection as in the reader
3984 Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
3985 //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,momentum.Pt(),momentum.Eta(),momentum.Phi()*TMath::RadToDeg());
3986 if( !inCTS ) continue;
3988 // Remove conversions
3989 Int_t indexmother = part->GetMother();
3990 if ( indexmother > -1 )
3992 Int_t pdg = part->GetPdgCode();
3993 Int_t mPdg = ((AliAODMCParticle*) mcparticles->At(indexmother)) ->GetPdgCode();
3994 if (TMath::Abs(pdg) == 11 && mPdg == 22) continue;
3997 if ( label == iParticle ) continue; // avoid trigger particle
3999 Float_t phi = part->Phi();
4000 if(phi < 0) phi+=TMath::TwoPi();
4002 Bool_t lead = FillChargedMCCorrelationHistograms(part->Pt(),phi,part->Eta(),ptprim,phiprim,etaprim, histoIndex);
4003 if(!lead) leadTrig = kFALSE;
4004 //if ( !lead && (fMakeAbsoluteLeading || fMakeNearSideLeading)) return;
4006 } //MC particle loop
4009 // Trigger MC particle histograms
4010 //if (!lead && (fMakeAbsoluteLeading || fMakeNearSideLeading)) return;
4012 fhMCPtTrigger [histoIndex]->Fill(ptprim);
4013 fhMCPhiTrigger[histoIndex]->Fill(ptprim,phiprim);
4014 fhMCEtaTrigger[histoIndex]->Fill(ptprim,etaprim);
4016 if(!leadTrig && (fMakeAbsoluteLeading || fMakeNearSideLeading) )
4019 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(): Not leading primary trigger: pT %2.2f, phi %2.2f, eta %2.2f\n",
4020 ptprim,phiprim*TMath::RadToDeg(),etaprim);
4022 fhMCPtTriggerNotLeading [histoIndex]->Fill(ptprim);
4023 fhMCPhiTriggerNotLeading[histoIndex]->Fill(ptprim,phiprim);
4024 fhMCEtaTriggerNotLeading[histoIndex]->Fill(ptprim,etaprim);
4028 //_____________________________________________________________________
4029 void AliAnaParticleHadronCorrelation::Print(const Option_t * opt) const
4032 //Print some relevant parameters set for the analysis
4036 printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
4037 AliAnaCaloTrackCorrBaseClass::Print(" ");
4038 printf("Pt trigger > %2.2f; < %2.2f\n", GetMinPt() , GetMaxPt()) ;
4039 printf("Pt associa > %2.2f; < %2.2f\n", fMinAssocPt, fMaxAssocPt) ;
4040 printf("Phi trigger particle-Hadron < %3.2f\n", fDeltaPhiMaxCut) ;
4041 printf("Phi trigger particle-Hadron > %3.2f\n", fDeltaPhiMinCut) ;
4042 printf("Phi trigger particle-UeHadron < %3.2f\n", fUeDeltaPhiMaxCut) ;
4043 printf("Phi trigger particle-UeHadron > %3.2f\n", fUeDeltaPhiMinCut) ;
4044 printf("Isolated Trigger? %d\n" , fSelectIsolated) ;
4045 printf("Several UE? %d\n" , fMakeSeveralUE) ;
4046 printf("Name of AOD Pi0 Branch %s \n", fPi0AODBranchName.Data());
4047 printf("Do Decay-hadron correlation ? %d\n", fPi0Trigger) ;
4048 printf("Select absolute leading for cluster triggers ? %d or Near Side %d\n",
4049 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
4050 printf("Trigger pt bins %d\n", fNAssocPtBins) ;
4051 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
4052 printf("\t bin %d = [%2.1f,%2.1f]\n", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
4057 //____________________________________________________________
4058 void AliAnaParticleHadronCorrelation::SetNAssocPtBins(Int_t n)
4060 // Set number of bins
4070 printf("n = larger than 19 or too small, set to 19 \n");
4075 //______________________________________________________________________________
4076 void AliAnaParticleHadronCorrelation::SetAssocPtBinLimit(Int_t ibin, Float_t pt)
4078 // Set the list of limits for the trigger pt bins
4080 if(ibin <= fNAssocPtBins || ibin >= 0)
4082 fAssocPtBinLimit[ibin] = pt ;
4086 printf("AliAnaParticleHadronCorrelation::SetAssocPtBinLimit() - bin number too large %d > %d or small, nothing done\n", ibin, fNAssocPtBins) ;