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 in a previous analysis
19 //-- Author: Gustavo Conesa (LNF-INFN)
21 // Modified by Yaxian Mao:
22 // 1. add the UE subtraction for corrlation study
23 // 2. change the correlation variable
24 // 3. Only use leading particle(cluster/track) as trigger for correlation (2010/07/02)
25 // 4. Make decay photon-hadron correlations where decay contribute pi0 mass (2010/09/09)
26 // 5. fill the pout to extract kt at the end, also to study charge asymmetry(2010/10/06)
27 // 6. Add the possibility for event selection analysis based on vertex and multiplicity bins (10/10/2010)
28 // 7. change the way of delta phi cut for UE study due to memory issue (reduce histograms)
29 // 8. Add the possibility to request the absolute leading particle at the near side or not, set trigger bins, general clean-up (08/2011)
30 //////////////////////////////////////////////////////////////////////////////
33 // --- ROOT system ---
34 //#include "TClonesArray.h"
38 #include <TDatabasePDG.h>
40 //---- ANALYSIS system ----
41 #include "AliNeutralMesonSelection.h"
42 #include "AliAnaParticleHadronCorrelation.h"
43 #include "AliCaloTrackReader.h"
44 #include "AliAODPWG4ParticleCorrelation.h"
45 #include "AliFiducialCut.h"
46 #include "AliVTrack.h"
47 #include "AliVCluster.h"
48 #include "AliMCAnalysisUtils.h"
49 #include "TParticle.h"
51 #include "AliAODMCParticle.h"
52 #include "AliMixedEvent.h"
53 #include "AliAnalysisManager.h"
54 #include "AliInputEventHandler.h"
55 #include "AliEventplane.h"
57 ClassImp(AliAnaParticleHadronCorrelation)
60 //___________________________________________________________________
61 AliAnaParticleHadronCorrelation::AliAnaParticleHadronCorrelation():
62 AliAnaCaloTrackCorrBaseClass(),
63 fFillAODWithReferences(0), fCheckLeadingWithNeutralClusters(0),
64 fMinTriggerPt(0.), fMaxAssocPt(1000.), fMinAssocPt(0.),
65 fDeltaPhiMaxCut(0.), fDeltaPhiMinCut(0.),
66 fSelectIsolated(0), fMakeSeveralUE(0),
67 fUeDeltaPhiMaxCut(0.), fUeDeltaPhiMinCut(0.),
68 fPi0AODBranchName(""), fNeutralCorr(0),
69 fPi0Trigger(0), fDecayTrigger(0),
70 fMakeAbsoluteLeading(0), fMakeNearSideLeading(0),
71 fLeadingTriggerIndex(-1), fHMPIDCorrelation(0), fFillBradHisto(0),
72 fNAssocPtBins(0), fAssocPtBinLimit(),
74 fListMixTrackEvents(), fListMixCaloEvents(),
75 fUseMixStoredInReader(0), fFillNeutralEventMixPool(0),
76 fM02MaxCut(0), fM02MinCut(0),
77 fFillPileUpHistograms(0),
78 fSelectLeadingHadronAngle(0),
79 fMinLeadHadPhi(0), fMaxLeadHadPhi(0),
80 fMinLeadHadPt(0), fMaxLeadHadPt(0),
83 fhPtTriggerInput(0), fhPtTriggerSSCut(0),
84 fhPtTriggerIsoCut(0), fhPtTriggerFidCut(0),
85 fhPtLeading(0), fhPtLeadingVtxBC0(0),
86 fhPtLeadingVzBin(0), fhPtLeadingBin(0),
87 fhPhiLeading(0), fhEtaLeading(0),
89 fhPtLeadingCentrality(0), fhPtLeadingEventPlane(0),
90 fhLeadingEventPlaneCentrality(0),
91 fhPtLeadingMixed(0), fhPtLeadingMixedVzBin(0), fhPtLeadingMixedBin(0),
92 fhPhiLeadingMixed(0), fhEtaLeadingMixed(0),
93 fhDeltaPhiDeltaEtaCharged(0),
94 fhPhiCharged(0), fhEtaCharged(0),
95 fhDeltaPhiCharged(0), fhDeltaEtaCharged(0),
96 fhDeltaPhiChargedPt(0), fhDeltaPhiUeChargedPt(0),
98 fhXECharged(0), fhXECharged_Cone2(0), fhXEUeCharged(0),
99 fhXEPosCharged(0), fhXENegCharged(0),
100 fhPtHbpXECharged(0), fhPtHbpXECharged_Cone2(0), fhPtHbpXEUeCharged(0),
101 fhZTCharged(0), fhZTUeCharged(0),
102 fhZTPosCharged(0), fhZTNegCharged(0),
103 fhPtHbpZTCharged(0), fhPtHbpZTUeCharged(0),
104 fhXEChargedMC(), fhDeltaPhiChargedMC(),
105 fhDeltaPhiDeltaEtaChargedPtA3GeV(0),
106 fhDeltaPhiChargedPtA3GeV(0), fhDeltaEtaChargedPtA3GeV(0),
108 fhDeltaPhiChargedPileUp(), fhDeltaEtaChargedPileUp(),
109 fhDeltaPhiChargedPtA3GeVPileUp(), fhDeltaEtaChargedPtA3GeVPileUp(),
110 fhXEChargedPileUp(), fhXEUeChargedPileUp(),
111 fhZTChargedPileUp(), fhZTUeChargedPileUp(),
112 fhPtTrigChargedPileUp(),
113 fhDeltaPhiChargedOtherBC(), fhDeltaPhiChargedPtA3GeVOtherBC(),
114 fhXEChargedOtherBC(), fhXEUeChargedOtherBC(),
115 fhZTChargedOtherBC(), fhZTUeChargedOtherBC(),
116 fhPtTrigChargedOtherBC(),
117 fhDeltaPhiChargedBC0(), fhDeltaPhiChargedPtA3GeVBC0(),
118 fhXEChargedBC0(), fhXEUeChargedBC0(),
119 fhZTChargedBC0(), fhZTUeChargedBC0(),
120 fhPtTrigChargedBC0(),
121 fhDeltaPhiChargedVtxBC0(), fhDeltaPhiChargedPtA3GeVVtxBC0(),
122 fhXEChargedVtxBC0(), fhXEUeChargedVtxBC0(),
123 fhZTChargedVtxBC0(), fhZTUeChargedVtxBC0(),
124 fhPtTrigChargedVtxBC0(),
125 fhDeltaPhiUeLeftCharged(0), fhDeltaPhiUeRightCharged(0),
126 fhDeltaPhiUeLeftUpCharged(0), fhDeltaPhiUeRightUpCharged(0),
127 fhDeltaPhiUeLeftDownCharged(0), fhDeltaPhiUeRightDownCharged(0),
128 fhXEUeLeftCharged(0), fhXEUeRightCharged(0),
129 fhXEUeLeftUpCharged(0), fhXEUeRightUpCharged(0),
130 fhXEUeLeftDownCharged(0), fhXEUeRightDownCharged(0),
131 fhPtHbpXEUeLeftCharged(0), fhPtHbpXEUeRightCharged(0),
132 fhZTUeLeftCharged(0), fhZTUeRightCharged(0),
133 fhPtHbpZTUeLeftCharged(0), fhPtHbpZTUeRightCharged(0),
134 fhPtTrigPout(0), fhPtTrigCharged(0),
135 fhTrigDeltaPhiCharged(0x0), fhTrigDeltaEtaCharged(0x0),
136 fhTrigXECorr(0x0), fhTrigXEUeCorr(0x0),
137 fhTrigZTCorr(0x0), fhTrigZTUeCorr(0x0),
138 fhAssocPtBkg(0), fhDeltaPhiDeltaEtaAssocPtBin(0),
139 fhDeltaPhiAssocPtBin(0),
140 fhDeltaPhiAssocPtBinDEta08(0), fhDeltaPhiAssocPtBinDEta0(0),
141 fhDeltaPhiAssocPtBinHMPID(0), fhDeltaPhiAssocPtBinHMPIDAcc(0),
142 fhDeltaPhiBradAssocPtBin(0), fhDeltaPhiBrad(0),
143 fhXEAssocPtBin(0), fhZTAssocPtBin(0),
144 fhDeltaPhiDeltaEtaNeutral(0),
145 fhPhiNeutral(0), fhEtaNeutral(0),
146 fhDeltaPhiNeutral(0), fhDeltaEtaNeutral(0),
147 fhDeltaPhiNeutralPt(0), fhDeltaPhiUeNeutralPt(0),
148 fhXENeutral(0), fhXEUeNeutral(0),
149 fhPtHbpXENeutral(0), fhPtHbpXEUeNeutral(0),
150 fhZTNeutral(0), fhZTUeNeutral(0),
151 fhPtHbpZTNeutral(0), fhPtHbpZTUeNeutral(0),
152 fhDeltaPhiUeLeftNeutral(0), fhDeltaPhiUeRightNeutral(0),
153 fhXEUeLeftNeutral(0), fhXEUeRightNeutral(0),
154 fhPtHbpXEUeLeftNeutral(0), fhPtHbpXEUeRightNeutral(0),
155 fhZTUeLeftNeutral(0), fhZTUeRightNeutral(0),
156 fhPtHbpZTUeLeftNeutral(0), fhPtHbpZTUeRightNeutral(0),
157 fhPtPi0DecayRatio(0),
158 fhDeltaPhiDecayCharged(0), fhXEDecayCharged(0), fhZTDecayCharged(0),
159 fhDeltaPhiDecayNeutral(0), fhXEDecayNeutral(0), fhZTDecayNeutral(0),
160 fhDeltaPhiDecayChargedAssocPtBin(0),
161 fhXEDecayChargedAssocPtBin(0), fhZTDecayChargedAssocPtBin(0),
162 fh2phiLeadingParticle(0x0), fhMCPtLeading(0),
163 fhMCPhiLeading(0), fhMCEtaLeading(0),
164 fhMCEtaCharged(0), fhMCPhiCharged(0),
165 fhMCDeltaEtaCharged(0), fhMCDeltaPhiCharged(0x0),
166 fhMCDeltaPhiDeltaEtaCharged(0), fhMCDeltaPhiChargedPt(0),
167 fhMCPtXECharged(0), fhMCPtXEUeCharged(0),
168 fhMCPtXEUeLeftCharged(0), fhMCPtXEUeRightCharged(0),
169 fhMCPtHbpXECharged(0), fhMCPtHbpXEUeCharged(0),
170 fhMCPtHbpXEUeLeftCharged(0), fhMCPtHbpXEUeRightCharged(0),
172 fhMCPtZTCharged(0), fhMCPtZTUeCharged(0),
173 fhMCPtZTUeLeftCharged(0), fhMCPtZTUeRightCharged(0),
174 fhMCPtHbpZTCharged(0), fhMCPtHbpZTUeCharged(0),
175 fhMCPtHbpZTUeLeftCharged(0), fhMCPtHbpZTUeRightCharged(0),
176 fhMCPtTrigPout(0), fhMCPtAssocDeltaPhi(0),
178 fhNEventsTrigger(0), fhNtracksMB(0), fhNclustersMB(0),
179 fhMixDeltaPhiCharged(0), fhMixDeltaPhiDeltaEtaCharged(0),
180 fhMixXECharged(0), fhMixXEUeCharged(0), fhMixHbpXECharged(0),
181 fhMixDeltaPhiChargedAssocPtBin(),
182 fhMixDeltaPhiChargedAssocPtBinDEta08(),
183 fhMixDeltaPhiChargedAssocPtBinDEta0(),
184 fhMixDeltaPhiDeltaEtaChargedAssocPtBin(),
185 fhEventBin(0), fhEventMixBin(0)
189 //Initialize parameters
192 for(Int_t i = 0; i < 7; i++)
194 fhPtLeadingMC[i] = 0;
195 fhXEChargedMC[i] = 0;
196 fhDeltaPhiChargedMC[i] = 0;
199 for(Int_t i = 0; i < 7; i++)
201 fhPtLeadingPileUp [i] = 0 ;
202 fhDeltaPhiChargedPileUp [i] = 0 ; fhDeltaEtaChargedPileUp [i] = 0 ;
203 fhXEChargedPileUp [i] = 0 ; fhXEUeChargedPileUp [i] = 0 ;
204 fhZTChargedPileUp [i] = 0 ; fhZTUeChargedPileUp [i] = 0 ;
205 fhPtTrigChargedPileUp [i] = 0 ;
206 fhDeltaPhiChargedPtA3GeVPileUp[i] = 0 ; fhDeltaEtaChargedPtA3GeVPileUp[i] = 0 ;
211 //_________________________________________________________________
212 AliAnaParticleHadronCorrelation::~AliAnaParticleHadronCorrelation()
214 // Remove event containers
218 if(fListMixTrackEvents)
220 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
222 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
224 for(Int_t irp=0; irp<GetNRPBin(); irp++)
226 Int_t bin = GetEventMixBin(ic, iz, irp);
227 fListMixTrackEvents[bin]->Delete() ;
228 delete fListMixTrackEvents[bin] ;
234 delete[] fListMixTrackEvents;
236 if(fListMixCaloEvents)
238 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
240 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
242 for(Int_t irp=0; irp<GetNRPBin(); irp++)
244 Int_t bin = GetEventMixBin(ic, iz, irp);
245 fListMixCaloEvents[bin]->Delete() ;
246 delete fListMixCaloEvents[bin] ;
252 delete[] fListMixCaloEvents;
257 //______________________________________________________________________________________________________________________________________________________
258 void AliAnaParticleHadronCorrelation::FillChargedAngularCorrelationHistograms(Float_t ptAssoc, Float_t ptTrig, Int_t bin,
259 Float_t phiAssoc, Float_t phiTrig, Float_t & deltaPhi,
260 Float_t etaAssoc, Float_t etaTrig,
261 Bool_t decay, Float_t hmpidSignal, Int_t outTOF,
262 Int_t nTracks, Int_t mcTag)
264 // Fill angular correlation related histograms
266 Float_t deltaEta = etaTrig-etaAssoc;
267 deltaPhi = phiTrig-phiAssoc;
268 Float_t deltaPhiOrg = deltaPhi;
270 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
271 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
273 fhEtaCharged ->Fill(ptAssoc,etaAssoc);
274 fhPhiCharged ->Fill(ptAssoc,phiAssoc);
275 fhDeltaEtaCharged ->Fill(ptTrig ,deltaEta);
276 fhDeltaPhiCharged ->Fill(ptTrig ,deltaPhi);
277 fhDeltaPhiChargedPt->Fill(ptAssoc, deltaPhi);
278 fhDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
282 fhDeltaEtaChargedPtA3GeV ->Fill(ptTrig ,deltaEta);
283 fhDeltaPhiChargedPtA3GeV ->Fill(ptTrig ,deltaPhi);
284 fhDeltaPhiDeltaEtaChargedPtA3GeV->Fill(deltaPhi, deltaEta);
289 if(fFillPileUpHistograms)
293 fhDeltaPhiChargedOtherBC->Fill(ptTrig ,deltaPhi) ;
294 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVOtherBC->Fill(ptTrig ,deltaPhi) ;
298 fhDeltaPhiChargedBC0->Fill(ptTrig ,deltaPhi) ;
299 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVBC0->Fill(ptTrig ,deltaPhi) ;
302 Int_t vtxBC = GetReader()->GetVertexBC();
303 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
305 fhDeltaPhiChargedVtxBC0->Fill(ptTrig ,deltaPhi) ;
306 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVVtxBC0->Fill(ptTrig ,deltaPhi) ;
309 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
310 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
311 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
312 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
313 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
314 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
315 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
319 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
320 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
321 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
322 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
323 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
324 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
325 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
331 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
332 fhDeltaPhiChargedMC[mcIndex]->Fill(ptTrig , deltaPhi);
335 if(fDecayTrigger && decay) fhDeltaPhiDecayCharged ->Fill(ptTrig , deltaPhi);
337 Double_t dphiBrad = -100;
340 dphiBrad = atan2(sin(deltaPhiOrg), cos(deltaPhiOrg))/TMath::Pi();//-1 to 1
341 if(TMath::Abs(dphiBrad)>0.325 && TMath::Abs(dphiBrad)<0.475) //Hardcoded values, BAD, FIXME
343 fhAssocPtBkg->Fill(ptTrig, ptAssoc);
346 if(dphiBrad<-1./3) dphiBrad += 2;
347 fhDeltaPhiBrad->Fill(ptTrig, dphiBrad);
350 // Fill histograms in bins of associated particle pT
353 fhDeltaPhiDeltaEtaAssocPtBin [bin]->Fill(deltaPhi,deltaEta);
355 fhDeltaPhiAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
357 if(TMath::Abs(deltaEta)> 0.8)
358 fhDeltaPhiAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
360 if(TMath::Abs(deltaEta)< 0.01)
361 fhDeltaPhiAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
364 fhDeltaPhiBradAssocPtBin [bin]->Fill(ptTrig, dphiBrad);
366 if(fDecayTrigger && decay)
367 fhDeltaPhiDecayChargedAssocPtBin[bin]->Fill(ptTrig, deltaPhi);
369 if(fHMPIDCorrelation)
371 if( hmpidSignal > 0 )
373 //printf("Track pt %f with HMPID signal %f \n",pt,hmpidSignal);
374 fhDeltaPhiAssocPtBinHMPID[bin]->Fill(ptTrig, deltaPhi);
377 if(phiAssoc > 5*TMath::DegToRad() && phiAssoc < 20*TMath::DegToRad())
379 //printf("Track pt %f in HMPID acceptance phi %f \n ",pt,phi*TMath::RadToDeg() );
380 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->Fill(ptTrig, deltaPhi);
385 //fill different multiplicity histogram
388 for(Int_t im = 0; im<GetMultiBin(); im++)
390 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
392 fhTrigDeltaPhiCharged[im]->Fill(ptTrig,deltaPhi);
393 fhTrigDeltaEtaCharged[im]->Fill(ptTrig,deltaEta);
399 //____________________________________________________________________________________________________________________________________________________
400 Bool_t AliAnaParticleHadronCorrelation::FillChargedMCCorrelationHistograms(Float_t mcAssocPt, Float_t mcAssocPhi, Float_t mcAssocEta,
401 Float_t mcTrigPt, Float_t mcTrigPhi, Float_t mcTrigEta)
403 // Fill MC histograms independently of AOD or ESD
405 //Select only hadrons in pt range
406 if( mcAssocPt < fMinAssocPt || mcAssocPt > fMaxAssocPt ) return kTRUE ; // exclude but continue
408 if( mcAssocPhi < 0 ) mcAssocPhi+=TMath::TwoPi();
410 //remove trigger itself for correlation when use charged triggers
411 if(TMath::Abs(mcAssocPt -mcTrigPt ) < 1e-6 &&
412 TMath::Abs(mcAssocPhi-mcTrigPhi) < 1e-6 &&
413 TMath::Abs(mcAssocEta-mcTrigEta) < 1e-6) return kTRUE ; // exclude but continue
416 if( fMakeAbsoluteLeading && mcAssocPt > mcTrigPt ) return kFALSE; // skip event
418 // Skip this event if near side associated particle pt larger than trigger
419 if( fMakeNearSideLeading && mcAssocPt > mcTrigPt &&
420 TMath::Abs(mcAssocPhi-mcTrigPhi)<TMath::PiOver2() ) return kFALSE; // skip event
422 Float_t mcdeltaPhi= mcTrigPhi-mcAssocPhi;
423 if(mcdeltaPhi <= -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
424 if(mcdeltaPhi > 3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
426 Float_t mcxE =-mcAssocPt/mcTrigPt*TMath::Cos(mcdeltaPhi);// -(mcAssocPx*pxprim+mcAssocPy*pyprim)/(mcTrigPt*mcTrigPt);
427 Float_t mchbpXE =-100 ;
428 if(mcxE > 0 ) mchbpXE = TMath::Log(1./mcxE);
430 Float_t mczT = mcAssocPt/mcTrigPt ;
431 Float_t mchbpZT =-100 ;
432 if(mczT > 0 ) mchbpZT = TMath::Log(1./mczT);
434 //Selection within angular range
435 if( mcdeltaPhi< -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
436 if( mcdeltaPhi>3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
438 Double_t mcpout = mcAssocPt*TMath::Sin(mcdeltaPhi) ;
442 AliInfo(Form("Charged hadron: track Pt %f, track Phi %f, phi trigger %f. Cuts: delta phi %2.2f < %2.2f < %2.2f, pT min %2.2f \n",
443 mcAssocPt,mcAssocPhi, mcTrigPhi,fDeltaPhiMinCut, mcdeltaPhi, fDeltaPhiMaxCut, GetMinPt()));
447 fhMCEtaCharged ->Fill(mcAssocPt, mcAssocEta);
448 fhMCPhiCharged ->Fill(mcAssocPt, mcAssocPhi);
449 fhMCDeltaEtaCharged->Fill(mcTrigPt , mcTrigEta-mcAssocEta);
450 fhMCDeltaPhiCharged->Fill(mcTrigPt , mcdeltaPhi);
451 fhMCPtAssocDeltaPhi->Fill(mcAssocPt, mcdeltaPhi);
453 fhMCDeltaPhiDeltaEtaCharged->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
455 //delta phi cut for correlation
456 if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
458 fhMCDeltaPhiChargedPt->Fill(mcAssocPt,mcdeltaPhi);
459 fhMCPtXECharged ->Fill(mcTrigPt, mcxE);
460 fhMCPtHbpXECharged ->Fill(mcTrigPt, mchbpXE);
461 fhMCPtZTCharged ->Fill(mcTrigPt, mczT);
462 fhMCPtHbpZTCharged ->Fill(mcTrigPt, mchbpZT);
463 fhMCPtTrigPout ->Fill(mcTrigPt, mcpout) ;
468 if ( (mcdeltaPhi > fUeDeltaPhiMinCut) && (mcdeltaPhi < fUeDeltaPhiMaxCut) )
470 //Double_t randomphi = gRandom->Uniform(TMath::Pi()/2,3*TMath::Pi()/2);
471 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
472 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
473 Double_t mcUezT = mcAssocPt/mcTrigPt;
475 if(mcUexE < 0.) mcUexE = -mcUexE;
477 fhMCPtXEUeCharged->Fill(mcTrigPt,mcUexE);
478 if(mcUexE > 0) fhMCPtHbpXEUeCharged->Fill(mcTrigPt,TMath::Log(1/mcUexE));
480 fhMCPtZTUeCharged->Fill(mcTrigPt,mcUezT);
481 if(mcUezT > 0) fhMCPtHbpZTUeCharged->Fill(mcTrigPt,TMath::Log(1/mcUezT));
483 fhMCUePart->Fill(mcTrigPt);
487 if((mcdeltaPhi<-fUeDeltaPhiMinCut) || (mcdeltaPhi >2*fUeDeltaPhiMaxCut))
489 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
490 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
491 Double_t mcUezT = mcAssocPt/mcTrigPt;
493 if(mcUexE < 0.) mcUexE = -mcUexE;
495 fhMCPtXEUeLeftCharged->Fill(mcTrigPt,mcUexE);
496 if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged->Fill(mcTrigPt,TMath::Log(1/mcUexE));
498 fhMCPtZTUeLeftCharged->Fill(mcTrigPt,mcUezT);
499 if(mcUexE > 0) fhMCPtHbpZTUeLeftCharged->Fill(mcTrigPt,TMath::Log(1/mcUezT));
504 if((mcdeltaPhi > fUeDeltaPhiMinCut) && (mcdeltaPhi < fUeDeltaPhiMaxCut))
506 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
507 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
508 Double_t mcUezT = mcAssocPt/mcTrigPt;
510 if(mcUexE < 0.) mcUexE = -mcUexE;
512 fhMCPtXEUeRightCharged->Fill(mcTrigPt,mcUexE);
513 if(mcUexE > 0) fhMCPtHbpXEUeRightCharged->Fill(mcTrigPt,TMath::Log(1/mcUexE));
515 fhMCPtZTUeRightCharged->Fill(mcTrigPt,mcUezT);
516 if(mcUexE > 0) fhMCPtHbpZTUeRightCharged->Fill(mcTrigPt,TMath::Log(1/mcUezT));
522 //___________________________________________________________________________________________________________________
523 void AliAnaParticleHadronCorrelation::FillChargedMomentumImbalanceHistograms(Float_t ptTrig, Float_t ptAssoc,
524 Float_t xE, Float_t hbpXE,
525 Float_t zT, Float_t hbpZT,
526 Float_t pout, Float_t deltaPhi,
527 Int_t nTracks, Int_t charge,
528 Int_t bin, Bool_t decay,
529 Int_t outTOF, Int_t mcTag)
532 // Fill mostly momentum imbalance related histograms
534 fhXECharged ->Fill(ptTrig , xE);
535 fhPtHbpXECharged ->Fill(ptTrig , hbpXE);
536 fhZTCharged ->Fill(ptTrig , zT);
537 fhPtHbpZTCharged ->Fill(ptTrig , hbpZT);
538 fhPtTrigPout ->Fill(ptTrig , pout) ;
539 fhPtTrigCharged ->Fill(ptTrig , ptAssoc) ;
540 if((deltaPhi > 5*TMath::Pi()/6.) && (deltaPhi < 7*TMath::Pi()/6.)) {
541 fhXECharged_Cone2 ->Fill(ptTrig , xE);
542 fhPtHbpXECharged_Cone2 ->Fill(ptTrig , hbpXE);
546 if(fFillPileUpHistograms)
550 fhXEChargedOtherBC ->Fill(ptTrig,xE);
551 fhZTChargedOtherBC ->Fill(ptTrig,zT);
552 fhPtTrigChargedOtherBC->Fill(ptTrig,ptAssoc);
556 fhXEChargedBC0 ->Fill(ptTrig,xE);
557 fhZTChargedBC0 ->Fill(ptTrig,zT);
558 fhPtTrigChargedBC0->Fill(ptTrig,ptAssoc);
561 Int_t vtxBC = GetReader()->GetVertexBC();
562 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
564 fhXEChargedVtxBC0 ->Fill(ptTrig,xE);
565 fhZTChargedVtxBC0 ->Fill(ptTrig,zT);
566 fhPtTrigChargedVtxBC0->Fill(ptTrig,ptAssoc);
569 if(GetReader()->IsPileUpFromSPD()) { fhXEChargedPileUp[0]->Fill(ptTrig,xE); fhZTChargedPileUp[0]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[0]->Fill(ptTrig,ptAssoc); }
570 if(GetReader()->IsPileUpFromEMCal()) { fhXEChargedPileUp[1]->Fill(ptTrig,xE); fhZTChargedPileUp[1]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[1]->Fill(ptTrig,ptAssoc); }
571 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEChargedPileUp[2]->Fill(ptTrig,xE); fhZTChargedPileUp[2]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[2]->Fill(ptTrig,ptAssoc); }
572 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEChargedPileUp[3]->Fill(ptTrig,xE); fhZTChargedPileUp[3]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[3]->Fill(ptTrig,ptAssoc); }
573 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEChargedPileUp[4]->Fill(ptTrig,xE); fhZTChargedPileUp[4]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[4]->Fill(ptTrig,ptAssoc); }
574 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEChargedPileUp[5]->Fill(ptTrig,xE); fhZTChargedPileUp[5]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[5]->Fill(ptTrig,ptAssoc); }
575 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEChargedPileUp[6]->Fill(ptTrig,xE); fhZTChargedPileUp[6]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[6]->Fill(ptTrig,ptAssoc); }
580 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
581 fhXEChargedMC [mcIndex]->Fill(ptTrig , xE );
584 if(fDecayTrigger && decay)
586 fhXEDecayCharged->Fill(ptTrig,xE);
587 fhZTDecayCharged->Fill(ptTrig,zT);
588 } // photon decay pi0/eta trigger
590 if(bin >= 0 )//away side
592 fhXEAssocPtBin[bin]->Fill(ptTrig, xE) ;
593 fhZTAssocPtBin[bin]->Fill(ptTrig, zT) ;
595 if(fDecayTrigger && decay)
597 fhXEDecayChargedAssocPtBin[bin]->Fill(ptTrig, xE);
598 fhZTDecayChargedAssocPtBin[bin]->Fill(ptTrig, zT);
604 fhXEPosCharged->Fill(ptTrig,xE) ;
605 fhZTPosCharged->Fill(ptTrig,zT) ;
609 fhXENegCharged->Fill(ptTrig,xE) ;
610 fhZTNegCharged->Fill(ptTrig,zT) ;
613 //fill different multiplicity histogram
616 for(Int_t im=0; im<GetMultiBin(); im++)
618 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
620 fhTrigXECorr[im]->Fill(ptTrig,xE);
621 fhTrigZTCorr[im]->Fill(ptTrig,zT);
624 } //multiplicity events selection
627 //_______________________________________________________________________________________________________________________
628 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventHistograms(Float_t ptTrig, Float_t ptAssoc,
629 Float_t deltaPhi, Int_t nTracks, Int_t outTOF)
631 // Fill underlying event histograms
633 fhDeltaPhiUeChargedPt->Fill(ptAssoc,deltaPhi);
635 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
636 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
637 Double_t uezT = ptAssoc/ptTrig;
639 if(uexE < 0.) uexE = -uexE;
641 fhXEUeCharged->Fill(ptTrig,uexE);
642 if(uexE > 0) fhPtHbpXEUeCharged->Fill(ptTrig,TMath::Log(1/uexE));
644 fhZTUeCharged->Fill(ptTrig,uezT);
645 if(uezT > 0) fhPtHbpZTUeCharged->Fill(ptTrig,TMath::Log(1/uezT));
649 if(fFillPileUpHistograms)
653 fhXEUeChargedOtherBC->Fill(ptTrig,uexE);
654 fhZTUeChargedOtherBC->Fill(ptTrig,uezT);
658 fhXEUeChargedBC0->Fill(ptTrig,uexE);
659 fhZTUeChargedBC0->Fill(ptTrig,uezT);
662 Int_t vtxBC = GetReader()->GetVertexBC();
663 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
665 fhXEUeChargedVtxBC0->Fill(ptTrig,uexE);
666 fhZTUeChargedVtxBC0->Fill(ptTrig,uezT);
669 if(GetReader()->IsPileUpFromSPD()) { fhXEUeChargedPileUp[0]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[0]->Fill(ptTrig,uezT);}
670 if(GetReader()->IsPileUpFromEMCal()) { fhXEUeChargedPileUp[1]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[1]->Fill(ptTrig,uezT);}
671 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEUeChargedPileUp[2]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[2]->Fill(ptTrig,uezT);}
672 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEUeChargedPileUp[3]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[3]->Fill(ptTrig,uezT);}
673 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEUeChargedPileUp[4]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[4]->Fill(ptTrig,uezT);}
674 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEUeChargedPileUp[5]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[5]->Fill(ptTrig,uezT);}
675 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEUeChargedPileUp[6]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[6]->Fill(ptTrig,uezT);}
680 for(Int_t im=0; im<GetMultiBin(); im++)
682 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
684 fhTrigXEUeCorr[im]->Fill(ptTrig,uexE); // xE? CHECK
685 fhTrigZTUeCorr[im]->Fill(ptTrig,uezT); // zT? CHECK
688 } //multiplicity events selection
691 //_____________________________________________________________________________________________________
692 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventSidesHistograms(Float_t ptTrig,
696 // Fill underlying event histograms to the left and right of trigger
697 if((deltaPhi<-fUeDeltaPhiMinCut) || (deltaPhi >2*fUeDeltaPhiMaxCut))
699 fhDeltaPhiUeLeftCharged->Fill(ptAssoc,deltaPhi);
700 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
701 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
702 Double_t uezT = ptAssoc/ptTrig;
704 if(uexE < 0.) uexE = -uexE;
706 fhXEUeLeftCharged->Fill(ptTrig,uexE);
707 if(uexE > 0) fhPtHbpXEUeLeftCharged->Fill(ptTrig,TMath::Log(1/uexE));
709 fhZTUeLeftCharged->Fill(ptTrig,uezT);
710 if(uexE > 0) fhPtHbpZTUeLeftCharged->Fill(ptTrig,TMath::Log(1/uezT));
711 fhDeltaPhiUeLeftCharged->Fill(ptAssoc, deltaPhi);
714 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut))
716 fhDeltaPhiUeRightCharged->Fill(ptAssoc,deltaPhi);
717 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
718 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
719 Double_t uezT = ptAssoc/ptTrig;
721 if(uexE < 0.) uexE = -uexE;
723 fhXEUeRightCharged->Fill(ptTrig,uexE);
724 if(uexE > 0) fhPtHbpXEUeRightCharged->Fill(ptTrig,TMath::Log(1/uexE));
726 fhZTUeRightCharged->Fill(ptTrig,uezT);
727 if(uexE > 0) fhPtHbpZTUeRightCharged->Fill(ptTrig,TMath::Log(1/uezT));
728 fhDeltaPhiUeRightCharged->Fill(ptAssoc, deltaPhi);
731 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-TMath::Pi()/2))
733 fhDeltaPhiUeLeftDownCharged->Fill(ptAssoc,deltaPhi);
734 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
735 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
737 if(uexE < 0.) uexE = -uexE;
739 fhXEUeLeftDownCharged->Fill(ptTrig,uexE);
742 if((deltaPhi>2*fUeDeltaPhiMaxCut) && (deltaPhi <3*TMath::Pi()/2))
744 fhDeltaPhiUeLeftUpCharged->Fill(ptAssoc,deltaPhi);
745 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
746 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
748 if(uexE < 0.) uexE = -uexE;
750 fhXEUeLeftUpCharged->Fill(ptTrig,uexE);
753 if((deltaPhi > TMath::Pi()/2) && (deltaPhi < fUeDeltaPhiMaxCut))
755 fhDeltaPhiUeRightUpCharged->Fill(ptAssoc,deltaPhi);
756 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
757 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
759 if(uexE < 0.) uexE = -uexE;
761 fhXEUeRightUpCharged->Fill(ptTrig,uexE);
764 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < TMath::Pi()/2))
766 fhDeltaPhiUeRightDownCharged->Fill(ptAssoc,deltaPhi);
767 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
768 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
770 if(uexE < 0.) uexE = -uexE;
772 fhXEUeRightDownCharged->Fill(ptTrig,uexE);
776 //______________________________________________________________________________________________________________________________
777 void AliAnaParticleHadronCorrelation::FillDecayPhotonCorrelationHistograms(Float_t ptAssoc, Float_t phiAssoc,
778 TLorentzVector mom1, TLorentzVector mom2,
779 Bool_t bChargedOrNeutral)
781 // Do correlation with decay photons of triggered pi0 or eta
783 // Calculate the correlation parameters
784 Float_t ptDecay1 = mom1.Pt();
785 Float_t ptDecay2 = mom2.Pt();
787 Float_t zTDecay1 = -100, zTDecay2 = -100;
788 if(ptDecay1) zTDecay1 = ptAssoc/ptDecay1 ;
789 if(ptDecay2) zTDecay2 = ptAssoc/ptDecay2 ;
791 Float_t deltaPhiDecay1 = mom1.Phi()-phiAssoc;
792 if(deltaPhiDecay1< -TMath::PiOver2()) deltaPhiDecay1+=TMath::TwoPi();
793 if(deltaPhiDecay1>3*TMath::PiOver2()) deltaPhiDecay1-=TMath::TwoPi();
795 Float_t deltaPhiDecay2 = mom2.Phi()-phiAssoc;
796 if(deltaPhiDecay2< -TMath::PiOver2()) deltaPhiDecay2+=TMath::TwoPi();
797 if(deltaPhiDecay2>3*TMath::PiOver2()) deltaPhiDecay2-=TMath::TwoPi();
799 Float_t xEDecay1 =-zTDecay1*TMath::Cos(deltaPhiDecay1); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
800 Float_t xEDecay2 =-zTDecay2*TMath::Cos(deltaPhiDecay2); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
802 if(bChargedOrNeutral) // correlate with charges
804 fhDeltaPhiDecayCharged->Fill(ptDecay1, deltaPhiDecay1);
805 fhDeltaPhiDecayCharged->Fill(ptDecay2, deltaPhiDecay2);
807 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms( Charged corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
809 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
811 fhZTDecayCharged->Fill(ptDecay1,zTDecay1);
812 fhXEDecayCharged->Fill(ptDecay1,xEDecay1);
814 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
816 fhZTDecayCharged->Fill(ptDecay2,zTDecay2);
817 fhXEDecayCharged->Fill(ptDecay2,xEDecay2);
820 else // correlate with neutrals
822 fhDeltaPhiDecayCharged->Fill(ptDecay1, deltaPhiDecay1);
823 fhDeltaPhiDecayCharged->Fill(ptDecay2, deltaPhiDecay2);
825 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms(Neutral corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
827 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
829 fhZTDecayCharged->Fill(ptDecay1,zTDecay1);
830 fhXEDecayCharged->Fill(ptDecay1,xEDecay1);
832 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
834 fhZTDecayCharged->Fill(ptDecay2,zTDecay2);
835 fhXEDecayCharged->Fill(ptDecay2,xEDecay2);
840 //______________________________________________________________________________________________________________________________________________________
841 void AliAnaParticleHadronCorrelation::FillNeutralAngularCorrelationHistograms(Float_t ptAssoc, Float_t ptTrig,
842 Float_t phiAssoc, Float_t phiTrig, Float_t & deltaPhi,
843 Float_t etaAssoc, Float_t etaTrig)
845 // Fill angular correlation related histograms
847 Float_t deltaEta = etaTrig-etaAssoc;
848 deltaPhi = phiTrig-phiAssoc;
850 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
851 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
853 fhEtaNeutral ->Fill(ptAssoc,etaAssoc);
854 fhPhiNeutral ->Fill(ptAssoc,phiAssoc);
855 fhDeltaEtaNeutral->Fill(ptTrig ,deltaEta);
856 fhDeltaPhiNeutral->Fill(ptTrig ,deltaPhi);
858 if(ptAssoc > 2 ) fhDeltaPhiDeltaEtaNeutral->Fill(deltaPhi, deltaEta);
862 //_____________________________________________________________________________________________________________________________
863 void AliAnaParticleHadronCorrelation::FillNeutralUnderlyingEventSidesHistograms(Float_t ptTrig, Float_t ptAssoc,
864 Float_t xE, Float_t hbpXE,
865 Float_t zT, Float_t hbpZT,
868 // Fill underlying event histograms to the left and right of trigger
870 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-fUeDeltaPhiMaxCut))
872 fhDeltaPhiUeLeftNeutral->Fill(ptAssoc, deltaPhi);
873 fhXEUeLeftNeutral ->Fill(ptTrig , xE);
874 fhPtHbpXEUeLeftNeutral ->Fill(ptTrig , hbpXE);
875 fhZTUeLeftNeutral ->Fill(ptTrig , zT);
876 fhPtHbpZTUeLeftNeutral ->Fill(ptTrig , hbpZT);
879 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut))
881 fhDeltaPhiUeRightNeutral->Fill(ptAssoc, deltaPhi);
882 fhXEUeRightNeutral ->Fill(ptTrig , xE);
883 fhPtHbpXEUeRightNeutral ->Fill(ptTrig , hbpXE);
884 fhZTUeRightNeutral ->Fill(ptTrig , zT);
885 fhPtHbpZTUeRightNeutral ->Fill(ptTrig , hbpZT);
889 //______________________________________________________
890 void AliAnaParticleHadronCorrelation::FillEventMixPool()
892 // Fill the pool with tracks if requested
896 FillChargedEventMixPool();
898 if(OnlyIsolated() || fFillNeutralEventMixPool)
899 FillNeutralEventMixPool();
904 //_____________________________________________________________
905 void AliAnaParticleHadronCorrelation::FillChargedEventMixPool()
907 // Mixed event pool filling for tracks
909 if(fUseMixStoredInReader && GetReader()->GetLastTracksMixedEvent() == GetEventNumber())
911 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
912 return ; // pool filled previously for another trigger
915 Int_t nTracks = GetCTSTracks()->GetEntriesFast();
917 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
918 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
920 if(!inputHandler) return ;
922 // Do mixing only with MB event (or the chosen mask), if not skip
923 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
925 fhNtracksMB->Fill(nTracks);
927 Int_t eventBin = GetEventMixBin();
929 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
930 if(eventBin < 0) return;
932 TObjArray * mixEventTracks = new TObjArray;
934 if(fUseMixStoredInReader)
936 fListMixTrackEvents[eventBin] = GetReader()->GetListWithMixedEventsForTracks(eventBin);
939 if(!fListMixTrackEvents[eventBin]) fListMixTrackEvents[eventBin] = new TList();
941 //printf("%s ***** Pool Event bin : %d - nTracks %d\n",GetInputAODName().Data(),eventBin, GetCTSTracks()->GetEntriesFast());
943 TList * pool = fListMixTrackEvents[eventBin];
946 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
948 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
950 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
951 p3.SetXYZ(mom[0],mom[1],mom[2]);
952 Float_t pt = p3.Pt();
954 //Select only hadrons in pt range
955 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
957 AliAODPWG4Particle * mixedTrack = new AliAODPWG4Particle(mom[0],mom[1],mom[2],0);
958 mixedTrack->SetDetector("CTS");
959 mixedTrack->SetChargedBit(track->Charge()>0);
960 mixEventTracks->Add(mixedTrack);
963 //Set the event number where the last event was added, to avoid double pool filling
964 GetReader()->SetLastTracksMixedEvent(GetEventNumber());
966 //printf("Add event to pool with %d tracks \n ",mixEventTracks->GetEntries());
967 pool->AddFirst(mixEventTracks);
970 //printf("Pool size %d, max %d\n",pool->GetSize(), GetNMaxEvMix());
972 if(pool->GetSize() > GetNMaxEvMix())
974 TClonesArray * tmp = static_cast<TClonesArray*>(pool->Last()) ;
980 //_____________________________________________________________
981 void AliAnaParticleHadronCorrelation::FillNeutralEventMixPool()
983 // Mixed event pool filling for neutral clusters
984 // Right now only for EMCAL and in isolation case
986 //printf("FillNeutralEventMixPool for %s\n",GetInputAODName().Data());
988 TObjArray * pl = GetEMCALClusters();
989 //if (GetAODObjArrayName.Contains("PHOS") )pl = GetPHOSClusters();
990 //else pl = GetEMCALClusters();
992 Int_t nClusters = pl->GetEntriesFast();
994 if(fUseMixStoredInReader && GetReader()->GetLastCaloMixedEvent() == GetEventNumber())
996 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
997 return ; // pool filled previously for another trigger
1000 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
1001 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
1003 if(!inputHandler) return ;
1005 // Do mixing only with MB event (or the chosen mask), if not skip
1006 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
1008 fhNclustersMB->Fill(nClusters);
1010 Int_t eventBin = GetEventMixBin();
1012 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
1013 if(eventBin < 0) return;
1015 TObjArray * mixEventCalo = new TObjArray;
1017 if(fUseMixStoredInReader)
1019 fListMixCaloEvents[eventBin] = GetReader()->GetListWithMixedEventsForCalo(eventBin);
1022 if(!fListMixCaloEvents[eventBin]) fListMixCaloEvents[eventBin] = new TList();
1024 TList * poolCalo = fListMixCaloEvents[eventBin];
1028 for(Int_t ipr = 0;ipr < nClusters ; ipr ++ )
1030 AliVCluster * calo = (AliVCluster *) (pl->At(ipr)) ;
1032 // remove matched clusters
1033 if( IsTrackMatched( calo, GetReader()->GetInputEvent() ) ) continue ;
1035 //Cluster momentum calculation
1036 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
1038 calo->GetMomentum(mom,GetVertex(0)) ;
1039 }//Assume that come from vertex in straight line
1042 Double_t vertex[]={0,0,0};
1043 calo->GetMomentum(mom,vertex) ;
1046 Float_t pt = mom.Pt();
1047 //Select only clusters in pt range
1048 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
1050 AliAODPWG4Particle * mixedCalo = new AliAODPWG4Particle(mom);
1051 mixedCalo->SetDetector("EMCAL");
1052 mixEventCalo->Add(mixedCalo);
1055 //Set the event number where the last event was added, to avoid double pool filling
1056 GetReader()->SetLastCaloMixedEvent(GetEventNumber());
1058 //printf("Add event to pool with %d clusters \n ",mixEventCalo->GetEntries());
1059 poolCalo->AddFirst(mixEventCalo);
1062 //printf("Pool size %d, max %d\n",poolCalo->GetSize(), GetNMaxEvMix());
1064 if(poolCalo->GetSize() > GetNMaxEvMix())
1065 {//Remove last event
1066 TClonesArray * tmp = static_cast<TClonesArray*>(poolCalo->Last()) ;
1067 poolCalo->RemoveLast() ;
1072 //____________________________________________________________
1073 TObjString* AliAnaParticleHadronCorrelation::GetAnalysisCuts()
1075 //Save parameters used for analysis
1076 TString parList ; //this will be list of parameters used for this analysis.
1077 const Int_t buffersize = 560;
1078 char onePar[buffersize] ;
1080 snprintf(onePar,buffersize,"--- AliAnaPaticleHadronCorrelation ---\n") ;
1082 snprintf(onePar,buffersize," Pt Trigger > %3.2f ", fMinTriggerPt) ;
1084 snprintf(onePar,buffersize," %3.2f < Pt associated < %3.2f ", fMinAssocPt, fMaxAssocPt) ;
1086 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-Hadron < %3.2f ", fDeltaPhiMinCut, fDeltaPhiMaxCut) ;
1088 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-UeHadron < %3.2f ", fUeDeltaPhiMinCut, fUeDeltaPhiMaxCut) ;
1090 snprintf(onePar,buffersize,"Isolated Trigger? %d\n", fSelectIsolated) ;
1092 snprintf(onePar,buffersize,"Several UE? %d\n", fMakeSeveralUE) ;
1094 snprintf(onePar,buffersize,"Name of AOD Pi0 Branch %s ", fPi0AODBranchName.Data());
1096 snprintf(onePar,buffersize,"Do Decay-hadron correlation ? pi0 %d, decay %d", fPi0Trigger, fDecayTrigger) ;
1098 snprintf(onePar,buffersize,"Select absolute leading for cluster triggers ? %d or Near Side Leading %d \n",
1099 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
1101 snprintf(onePar,buffersize,"Associated particle pt bins %d: ", fNAssocPtBins) ;
1103 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
1104 snprintf(onePar,buffersize,"bin %d = [%2.1f,%2.1f];", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
1108 //Get parameters set in base class.
1109 parList += GetBaseParametersList() ;
1111 //Get parameters set in FiducialCut class (not available yet)
1112 //parlist += GetFidCut()->GetFidCutParametersList()
1114 return new TObjString(parList) ;
1118 //________________________________________________________________
1119 TList * AliAnaParticleHadronCorrelation::GetCreateOutputObjects()
1122 // Create histograms to be saved in output file and
1123 // store them in fOutputContainer
1125 TList * outputContainer = new TList() ;
1126 outputContainer->SetName("CorrelationHistos") ;
1128 Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); Int_t ndeltaphibins = GetHistogramRanges()->GetHistoDeltaPhiBins(); Int_t ndeltaetabins = GetHistogramRanges()->GetHistoDeltaEtaBins();
1129 Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); Float_t deltaphimax = GetHistogramRanges()->GetHistoDeltaPhiMax(); Float_t deltaetamax = GetHistogramRanges()->GetHistoDeltaEtaMax();
1130 Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin(); Float_t deltaphimin = GetHistogramRanges()->GetHistoDeltaPhiMin(); Float_t deltaetamin = GetHistogramRanges()->GetHistoDeltaEtaMin();
1132 Int_t nMixBins = GetNCentrBin()*GetNZvertBin()*GetNRPBin();
1134 TString nameMC[] = {"Photon","Pi0","Pi0Decay","EtaDecay","OtherDecay","Electron","Hadron"};
1135 TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
1137 // For vz dependent histograms, if option ON
1139 if(fCorrelVzBin) nz = GetNZvertBin();
1143 fhPtTriggerInput = new TH1F("hPtInput","Input trigger #it{p}_{T}", nptbins,ptmin,ptmax);
1144 fhPtTriggerInput->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1145 outputContainer->Add(fhPtTriggerInput);
1147 if( fM02MaxCut > 0 && fM02MinCut > 0 )
1149 fhPtTriggerSSCut = new TH1F("hPtTriggerSSCut","Trigger #it{p}_{T} after #lambda^{2}_{0} cut", nptbins,ptmin,ptmax);
1150 fhPtTriggerSSCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1151 outputContainer->Add(fhPtTriggerSSCut);
1154 if( OnlyIsolated() )
1156 fhPtTriggerIsoCut = new TH1F("hPtTriggerIsoCut","Trigger #it{p}_{T} after isolation (and #lambda^{2}_{0}) cut", nptbins,ptmin,ptmax);
1157 fhPtTriggerIsoCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1158 outputContainer->Add(fhPtTriggerIsoCut);
1161 fhPtTriggerFidCut = new TH1F("hPtTriggerFidCut","Trigger #it{p}_{T} after fiducial (isolation and #lambda^{2}_{0}) cut", nptbins,ptmin,ptmax);
1162 fhPtTriggerFidCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1163 outputContainer->Add(fhPtTriggerFidCut);
1165 fhPtLeading = new TH1F("hPtLeading","#it{p}_{T} distribution of leading particles", nptbins,ptmin,ptmax);
1166 fhPtLeading->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1167 outputContainer->Add(fhPtLeading);
1171 for(Int_t i=0; i < 7; i++)
1173 fhPtLeadingMC[i] = new TH1F(Form("hPtLeading_MC%s",nameMC[i].Data()),
1174 Form("#it{p}_{T} distribution of leading particles, trigger origin is %s",nameMC[i].Data()),
1175 nptbins,ptmin,ptmax);
1176 fhPtLeadingMC[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1177 outputContainer->Add(fhPtLeadingMC[i]);
1183 fhPtLeadingVzBin = new TH2F("hPtLeadingVzBin","#it{p}_{T} distribution of leading particles vs vz bin", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
1184 fhPtLeadingVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1185 fhPtLeadingVzBin->SetYTitle("#it{v}_{#it{z}} bin");
1186 outputContainer->Add(fhPtLeadingVzBin);
1189 fhPtLeadingBin = new TH2F ("hPtLeadingBin","#it{p}_{T} distribution of leading particles", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
1190 fhPtLeadingBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1191 fhPtLeadingBin->SetYTitle("Bin");
1192 outputContainer->Add(fhPtLeadingBin);
1194 fhPhiLeading = new TH2F ("hPhiLeading","#phi distribution of leading Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
1195 fhPhiLeading->SetYTitle("#phi (rad)");
1196 outputContainer->Add(fhPhiLeading);
1198 fhEtaLeading = new TH2F ("hEtaLeading","#eta distribution of leading",nptbins,ptmin,ptmax, netabins,etamin,etamax);
1199 fhEtaLeading->SetYTitle("#eta ");
1200 outputContainer->Add(fhEtaLeading);
1202 fhPtLeadingCentrality = new TH2F("hPtLeadingCentrality","Leading particle #it{p}_{T} vs centrality",nptbins,ptmin,ptmax,100,0.,100) ;
1203 fhPtLeadingCentrality->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1204 fhPtLeadingCentrality->SetYTitle("Centrality (%)");
1205 outputContainer->Add(fhPtLeadingCentrality) ;
1207 fhPtLeadingEventPlane = new TH2F("hPtLeadingEventPlane","Leading particle #it{p}_{T} vs event plane angle",nptbins,ptmin,ptmax, 100,0.,TMath::Pi()) ;
1208 fhPtLeadingEventPlane->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1209 fhPtLeadingEventPlane->SetXTitle("EP angle (rad)");
1210 outputContainer->Add(fhPtLeadingEventPlane) ;
1212 fhLeadingEventPlaneCentrality = new TH2F("hLeadingEventPlane","Leading particle centrality vs event plane angle",100,0.,100,100,0.,TMath::Pi()) ;
1213 fhLeadingEventPlaneCentrality->SetXTitle("Centrality (%)");
1214 fhLeadingEventPlaneCentrality->SetYTitle("EP angle (rad)");
1215 outputContainer->Add(fhLeadingEventPlaneCentrality) ;
1217 //Correlation with charged hadrons
1219 fhDeltaPhiDeltaEtaCharged = new TH2F
1220 ("hDeltaPhiDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}}",
1221 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1222 fhDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
1223 fhDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
1225 fhDeltaPhiDeltaEtaChargedPtA3GeV = new TH2F
1226 ("hDeltaPhiDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}, #it{p}_{TA}>3 GeV/#it{c}}",
1227 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1228 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetXTitle("#Delta #phi (rad)");
1229 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1231 fhPhiCharged = new TH2F
1232 ("hPhiCharged","#phi_{h^{#pm}} vs #it{p}_{T #pm}",
1233 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1234 fhPhiCharged->SetYTitle("#phi_{h^{#pm}} (rad)");
1235 fhPhiCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
1237 fhEtaCharged = new TH2F
1238 ("hEtaCharged","#eta_{h^{#pm}} vs #it{p}_{T #pm}",
1239 nptbins,ptmin,ptmax,netabins,etamin,etamax);
1240 fhEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
1241 fhEtaCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
1243 fhDeltaPhiCharged = new TH2F
1244 ("hDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
1245 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1246 fhDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
1247 fhDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1249 fhDeltaPhiChargedPtA3GeV = new TH2F
1250 ("hDeltaPhiChargedPtA3GeV","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}",
1251 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1252 fhDeltaPhiChargedPtA3GeV->SetYTitle("#Delta #phi (rad)");
1253 fhDeltaPhiChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1256 fhDeltaPhiChargedPt = new TH2F
1257 ("hDeltaPhiChargedPt","#phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}",
1258 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1259 fhDeltaPhiChargedPt->SetYTitle("#Delta #phi (rad)");
1260 fhDeltaPhiChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1262 fhDeltaPhiUeChargedPt = new TH2F
1263 ("hDeltaPhiUeChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}}",
1264 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1265 fhDeltaPhiUeChargedPt->SetYTitle("#Delta #phi (rad)");
1266 fhDeltaPhiUeChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1268 fhUePart = new TH1F("hUePart","UE particles distribution vs pt trig",
1269 nptbins,ptmin,ptmax);
1270 fhUePart->SetYTitle("dNch");
1271 fhUePart->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1274 fhDeltaEtaCharged = new TH2F
1275 ("hDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}",
1276 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1277 fhDeltaEtaCharged->SetYTitle("#Delta #eta");
1278 fhDeltaEtaCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1280 fhDeltaEtaChargedPtA3GeV = new TH2F
1281 ("hDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}",
1282 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1283 fhDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1284 fhDeltaEtaChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1287 new TH2F("hXECharged","#it{x}_{#it{E}} for charged tracks",
1288 nptbins,ptmin,ptmax,200,0.,2.);
1289 fhXECharged->SetYTitle("#it{x}_{#it{E}}");
1290 fhXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1293 new TH2F("hXECharged_Cone2","#it{x}_{#it{E}} for charged tracks in cone 2 (5#pi/6-7#pi/6)",
1294 nptbins,ptmin,ptmax,200,0.,2.);
1295 fhXECharged_Cone2->SetYTitle("#it{x}_{#it{E}}");
1296 fhXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1299 new TH2F("hXEUeCharged","#it{x}_{#it{E}} for Underlying Event",
1300 nptbins,ptmin,ptmax,200,0.,2.);
1301 fhXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
1302 fhXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1305 new TH2F("hXEPositiveCharged","#it{x}_{#it{E}} for positive charged tracks",
1306 nptbins,ptmin,ptmax,200,0.,2.);
1307 fhXEPosCharged->SetYTitle("#it{x}_{#it{E}}");
1308 fhXEPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1311 new TH2F("hXENegativeCharged","#it{x}_{#it{E}} for negative charged tracks",
1312 nptbins,ptmin,ptmax,200,0.,2.);
1313 fhXENegCharged->SetYTitle("#it{x}_{#it{E}}");
1314 fhXENegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1317 new TH2F("hHbpXECharged","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
1318 nptbins,ptmin,ptmax,200,0.,10.);
1319 fhPtHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1320 fhPtHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1322 fhPtHbpXECharged_Cone2 =
1323 new TH2F("hHbpXECharged_Cone2","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons in cone 2 (5#pi/6-7#pi/6)",
1324 nptbins,ptmin,ptmax,200,0.,10.);
1325 fhPtHbpXECharged_Cone2->SetYTitle("ln(1/#it{x}_{#it{E}})");
1326 fhPtHbpXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1328 fhPtHbpXEUeCharged =
1329 new TH2F("hHbpXEUeCharged","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons,Underlying Event",
1330 nptbins,ptmin,ptmax,200,0.,10.);
1331 fhPtHbpXEUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1332 fhPtHbpXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1335 new TH2F("hZTCharged","#it{z}_{T} for charged tracks",
1336 nptbins,ptmin,ptmax,200,0.,2.);
1337 fhZTCharged->SetYTitle("#it{z}_{T}");
1338 fhZTCharged->SetXTitle("#it{p}_{T trigger}");
1341 new TH2F("hZTUeCharged","#it{z}_{T} for Underlying Event",
1342 nptbins,ptmin,ptmax,200,0.,2.);
1343 fhZTUeCharged->SetYTitle("#it{z}_{T}");
1344 fhZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1347 new TH2F("hZTPositiveCharged","#it{z}_{T} for positive charged tracks",
1348 nptbins,ptmin,ptmax,200,0.,2.);
1349 fhZTPosCharged->SetYTitle("#it{z}_{T}");
1350 fhZTPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1353 new TH2F("hZTNegativeCharged","#it{z}_{T} for negative charged tracks",
1354 nptbins,ptmin,ptmax,200,0.,2.);
1355 fhZTNegCharged->SetYTitle("#it{z}_{T}");
1356 fhZTNegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1359 new TH2F("hHbpZTCharged","#xi = ln(1/#it{z}_{T}) with charged hadrons",
1360 nptbins,ptmin,ptmax,200,0.,10.);
1361 fhPtHbpZTCharged->SetYTitle("ln(1/#it{z}_{T})");
1362 fhPtHbpZTCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1364 fhPtHbpZTUeCharged =
1365 new TH2F("hHbpZTUeCharged","#xi = ln(1/#it{z}_{T}) with charged hadrons,Underlying Event",
1366 nptbins,ptmin,ptmax,200,0.,10.);
1367 fhPtHbpZTUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1368 fhPtHbpZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1371 new TH2F("hPtTrigPout","Pout with triggers",
1372 nptbins,ptmin,ptmax,2*nptbins,-ptmax,ptmax);
1373 fhPtTrigPout->SetYTitle("#it{p}_{out} (GeV/#it{c})");
1374 fhPtTrigPout->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1377 new TH2F("hPtTrigCharged","trigger and charged tracks pt distribution",
1378 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1379 fhPtTrigCharged->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1380 fhPtTrigCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1382 outputContainer->Add(fhDeltaPhiDeltaEtaCharged);
1383 outputContainer->Add(fhDeltaPhiDeltaEtaChargedPtA3GeV);
1384 outputContainer->Add(fhPhiCharged) ;
1385 outputContainer->Add(fhEtaCharged) ;
1386 outputContainer->Add(fhDeltaPhiCharged) ;
1387 outputContainer->Add(fhDeltaPhiChargedPtA3GeV) ;
1388 outputContainer->Add(fhDeltaEtaCharged) ;
1389 outputContainer->Add(fhDeltaEtaChargedPtA3GeV) ;
1390 outputContainer->Add(fhDeltaPhiChargedPt) ;
1391 outputContainer->Add(fhDeltaPhiUeChargedPt) ;
1392 outputContainer->Add(fhUePart);
1394 outputContainer->Add(fhXECharged) ;
1395 outputContainer->Add(fhXECharged_Cone2) ;
1398 for(Int_t i=0; i < 7; i++)
1401 fhDeltaPhiChargedMC[i] = new TH2F(Form("hDeltaPhiCharged_MC%s",nameMC[i].Data()),
1402 Form("#Delta #phi for charged tracks, trigger origin is %s",nameMC[i].Data()),
1403 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
1404 fhDeltaPhiChargedMC[i]->SetYTitle("#it{x}_{#it{E}}");
1405 fhDeltaPhiChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1406 outputContainer->Add(fhDeltaPhiChargedMC[i]) ;
1408 fhXEChargedMC[i] = new TH2F(Form("hXECharged_MC%s",nameMC[i].Data()),
1409 Form("#it{x}_{#it{E}} for charged tracks, trigger origin is %s",nameMC[i].Data()),
1410 nptbins,ptmin,ptmax,200,0.,2.);
1411 fhXEChargedMC[i]->SetYTitle("#it{x}_{#it{E}}");
1412 fhXEChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1413 outputContainer->Add(fhXEChargedMC[i]) ;
1417 outputContainer->Add(fhXEPosCharged) ;
1418 outputContainer->Add(fhXENegCharged) ;
1419 outputContainer->Add(fhXEUeCharged) ;
1420 outputContainer->Add(fhPtHbpXECharged) ;
1421 outputContainer->Add(fhPtHbpXECharged_Cone2) ;
1422 outputContainer->Add(fhPtHbpXEUeCharged) ;
1424 outputContainer->Add(fhZTCharged) ;
1425 outputContainer->Add(fhZTPosCharged) ;
1426 outputContainer->Add(fhZTNegCharged) ;
1427 outputContainer->Add(fhZTUeCharged) ;
1428 outputContainer->Add(fhPtHbpZTCharged) ;
1429 outputContainer->Add(fhPtHbpZTUeCharged) ;
1431 outputContainer->Add(fhPtTrigPout) ;
1432 outputContainer->Add(fhPtTrigCharged) ;
1434 if(fFillPileUpHistograms)
1436 fhDeltaPhiChargedOtherBC = new TH2F
1437 ("hDeltaPhiChargedOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC!=0",
1438 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1439 fhDeltaPhiChargedOtherBC->SetYTitle("#Delta #phi (rad)");
1440 fhDeltaPhiChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1442 fhDeltaPhiChargedPtA3GeVOtherBC = new TH2F
1443 ("hDeltaPhiChargedPtA3GeVOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC!=0",
1444 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1445 fhDeltaPhiChargedPtA3GeVOtherBC->SetYTitle("#Delta #phi (rad)");
1446 fhDeltaPhiChargedPtA3GeVOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1448 fhPtTrigChargedOtherBC =
1449 new TH2F("hPtTrigChargedOtherBC","trigger and charged tracks pt distribution, track BC!=0",
1450 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1451 fhPtTrigChargedOtherBC->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1452 fhPtTrigChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1454 fhXEChargedOtherBC =
1455 new TH2F("hXEChargedOtherBC","#it{x}_{#it{E}} for charged tracks, track BC!=0",
1456 nptbins,ptmin,ptmax,200,0.,2.);
1457 fhXEChargedOtherBC->SetYTitle("#it{x}_{#it{E}}");
1458 fhXEChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1460 fhXEUeChargedOtherBC =
1461 new TH2F("hXEUeChargedOtherBC","#it{x}_{#it{E}} for Underlying Event, track BC!=0",
1462 nptbins,ptmin,ptmax,200,0.,2.);
1463 fhXEUeChargedOtherBC->SetYTitle("#it{x}_{#it{E}}");
1464 fhXEUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1466 fhZTChargedOtherBC =
1467 new TH2F("hZTChargedOtherBC","#it{z}_{T} for charged tracks, track BC!=0",
1468 nptbins,ptmin,ptmax,200,0.,2.);
1469 fhZTChargedOtherBC->SetYTitle("#it{z}_{T}");
1470 fhZTChargedOtherBC->SetXTitle("#it{p}_{T trigger}");
1472 fhZTUeChargedOtherBC =
1473 new TH2F("hZTUeChargedOtherBC","#it{z}_{T} for Underlying Event, track BC!=0",
1474 nptbins,ptmin,ptmax,200,0.,2.);
1475 fhZTUeChargedOtherBC->SetYTitle("#it{z}_{T}");
1476 fhZTUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1478 outputContainer->Add(fhDeltaPhiChargedOtherBC) ;
1479 outputContainer->Add(fhDeltaPhiChargedPtA3GeVOtherBC) ;
1480 outputContainer->Add(fhXEChargedOtherBC) ;
1481 outputContainer->Add(fhXEUeChargedOtherBC) ;
1482 outputContainer->Add(fhZTChargedOtherBC) ;
1483 outputContainer->Add(fhZTUeChargedOtherBC) ;
1484 outputContainer->Add(fhPtTrigChargedOtherBC) ;
1486 fhDeltaPhiChargedBC0 = new TH2F
1487 ("hDeltaPhiChargedBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0",
1488 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1489 fhDeltaPhiChargedBC0->SetYTitle("#Delta #phi (rad)");
1490 fhDeltaPhiChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1492 fhDeltaPhiChargedPtA3GeVBC0 = new TH2F
1493 ("hDeltaPhiChargedPtA3GeVBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0",
1494 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1495 fhDeltaPhiChargedPtA3GeVBC0->SetYTitle("#Delta #phi (rad)");
1496 fhDeltaPhiChargedPtA3GeVBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1498 fhPtTrigChargedBC0 =
1499 new TH2F("hPtTrigChargedBC0","trigger and charged tracks pt distribution, track BC==0",
1500 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1501 fhPtTrigChargedBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1502 fhPtTrigChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1505 new TH2F("hXEChargedBC0","#it{x}_{#it{E}} for charged tracks, track BC==0",
1506 nptbins,ptmin,ptmax,200,0.,2.);
1507 fhXEChargedBC0->SetYTitle("#it{x}_{#it{E}}");
1508 fhXEChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1511 new TH2F("hXEUeChargedBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0",
1512 nptbins,ptmin,ptmax,200,0.,2.);
1513 fhXEUeChargedBC0->SetYTitle("#it{x}_{#it{E}}");
1514 fhXEUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1517 new TH2F("hZTChargedBC0","#it{z}_{T} for charged tracks, track BC==0",
1518 nptbins,ptmin,ptmax,200,0.,2.);
1519 fhZTChargedBC0->SetYTitle("#it{z}_{T}");
1520 fhZTChargedBC0->SetXTitle("#it{p}_{T trigger}");
1523 new TH2F("hZTUeChargedBC0","#it{z}_{T} for Underlying Event, track BC==0",
1524 nptbins,ptmin,ptmax,200,0.,2.);
1525 fhZTUeChargedBC0->SetYTitle("#it{z}_{T}");
1526 fhZTUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1528 outputContainer->Add(fhDeltaPhiChargedBC0) ;
1529 outputContainer->Add(fhDeltaPhiChargedPtA3GeVBC0) ;
1530 outputContainer->Add(fhXEChargedBC0) ;
1531 outputContainer->Add(fhXEUeChargedBC0) ;
1532 outputContainer->Add(fhZTChargedBC0) ;
1533 outputContainer->Add(fhZTUeChargedBC0) ;
1534 outputContainer->Add(fhPtTrigChargedBC0) ;
1536 fhPtLeadingVtxBC0 = new TH1F("hPtLeadingVtxBC0","#it{p}_{T} distribution of leading particles", nptbins,ptmin,ptmax);
1537 fhPtLeadingVtxBC0->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1539 fhDeltaPhiChargedVtxBC0 = new TH2F
1540 ("hDeltaPhiChargedVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0",
1541 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1542 fhDeltaPhiChargedVtxBC0->SetYTitle("#Delta #phi (rad)");
1543 fhDeltaPhiChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1545 fhDeltaPhiChargedPtA3GeVVtxBC0 = new TH2F
1546 ("hDeltaPhiChargedPtA3GeVVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0",
1547 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1548 fhDeltaPhiChargedPtA3GeVVtxBC0->SetYTitle("#Delta #phi (rad)");
1549 fhDeltaPhiChargedPtA3GeVVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1551 fhPtTrigChargedVtxBC0 =
1552 new TH2F("hPtTrigChargedVtxBC0","trigger and charged tracks pt distribution, track BC==0",
1553 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1554 fhPtTrigChargedVtxBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1555 fhPtTrigChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1558 new TH2F("hXEChargedVtxBC0","#it{x}_{#it{E}} for charged tracks, track BC==0",
1559 nptbins,ptmin,ptmax,200,0.,2.);
1560 fhXEChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}");
1561 fhXEChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1563 fhXEUeChargedVtxBC0 =
1564 new TH2F("hXEUeChargedVtxBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0",
1565 nptbins,ptmin,ptmax,200,0.,2.);
1566 fhXEUeChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}");
1567 fhXEUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1570 new TH2F("hZTChargedVtxBC0","#it{z}_{T} for charged tracks, track BC==0",
1571 nptbins,ptmin,ptmax,200,0.,2.);
1572 fhZTChargedVtxBC0->SetYTitle("#it{z}_{T}");
1573 fhZTChargedVtxBC0->SetXTitle("#it{p}_{T trigger}");
1575 fhZTUeChargedVtxBC0 =
1576 new TH2F("hZTUeChargedVtxBC0","#it{z}_{T} for Underlying Event, track BC==0",
1577 nptbins,ptmin,ptmax,200,0.,2.);
1578 fhZTUeChargedVtxBC0->SetYTitle("#it{z}_{T}");
1579 fhZTUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1581 outputContainer->Add(fhPtLeadingVtxBC0);
1582 outputContainer->Add(fhDeltaPhiChargedVtxBC0) ;
1583 outputContainer->Add(fhDeltaPhiChargedPtA3GeVVtxBC0) ;
1584 outputContainer->Add(fhXEChargedVtxBC0) ;
1585 outputContainer->Add(fhXEUeChargedVtxBC0) ;
1586 outputContainer->Add(fhZTChargedVtxBC0) ;
1587 outputContainer->Add(fhZTUeChargedVtxBC0) ;
1588 outputContainer->Add(fhPtTrigChargedVtxBC0) ;
1590 for(Int_t i = 0 ; i < 7 ; i++)
1592 fhPtLeadingPileUp[i] = new TH1F(Form("hPtLeadingPileUp%s",pileUpName[i].Data()),
1593 Form("#it{p}_{T} distribution of leading particles, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
1594 fhPtLeadingPileUp[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1595 outputContainer->Add(fhPtLeadingPileUp[i]);
1597 fhDeltaPhiChargedPileUp[i] = new TH2F(Form("hDeltaPhiChargedPileUp%s",pileUpName[i].Data()),
1598 Form("#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1599 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1600 fhDeltaPhiChargedPileUp[i]->SetYTitle("#Delta #phi (rad)");
1601 fhDeltaPhiChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1602 outputContainer->Add(fhDeltaPhiChargedPileUp[i]) ;
1604 fhDeltaPhiChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaPhiChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1605 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()),
1606 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1607 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #phi (rad)");
1608 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1609 outputContainer->Add(fhDeltaPhiChargedPtA3GeVPileUp[i]) ;
1611 fhDeltaEtaChargedPileUp[i] = new TH2F(Form("hDeltaEtaChargedPileUp%s",pileUpName[i].Data()),
1612 Form("#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1613 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1614 fhDeltaEtaChargedPileUp[i]->SetYTitle("#Delta #eta");
1615 fhDeltaEtaChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1616 outputContainer->Add(fhDeltaEtaChargedPileUp[i]) ;
1618 fhDeltaEtaChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaEtaChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1619 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()),
1620 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1621 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #eta");
1622 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1623 outputContainer->Add(fhDeltaEtaChargedPtA3GeVPileUp[i]) ;
1625 fhXEChargedPileUp[i] = new TH2F(Form("hXEChargedPileUp%s",pileUpName[i].Data()),
1626 Form("#it{x}_{#it{E}} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1627 nptbins,ptmin,ptmax,200,0.,2.);
1628 fhXEChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}");
1629 fhXEChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1630 outputContainer->Add(fhXEChargedPileUp[i]) ;
1632 fhXEUeChargedPileUp[i] = new TH2F(Form("hXEUeChargedPileUp%s",pileUpName[i].Data()),
1633 Form("#it{x}_{#it{E}} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1634 nptbins,ptmin,ptmax,200,0.,2.);
1635 fhXEUeChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}");
1636 fhXEUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1637 outputContainer->Add(fhXEUeChargedPileUp[i]) ;
1639 fhZTChargedPileUp[i] = new TH2F(Form("hZTChargedPileUp%s",pileUpName[i].Data()),
1640 Form("#it{z}_{T} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1641 nptbins,ptmin,ptmax,200,0.,2.);
1642 fhZTChargedPileUp[i]->SetYTitle("#it{z}_{T}");
1643 fhZTChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1644 outputContainer->Add(fhZTChargedPileUp[i]) ;
1646 fhZTUeChargedPileUp[i] = new TH2F(Form("hZTUeChargedPileUp%s",pileUpName[i].Data()),
1647 Form("#it{z}_{T} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1648 nptbins,ptmin,ptmax,200,0.,2.);
1649 fhZTUeChargedPileUp[i]->SetYTitle("#it{z}_{T}");
1650 fhZTUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1651 outputContainer->Add(fhZTUeChargedPileUp[i]) ;
1653 fhPtTrigChargedPileUp[i] = new TH2F(Form("hPtTrigChargedPileUp%s",pileUpName[i].Data()),
1654 Form("trigger and charged tracks pt distribution, %s Pile-Up event",pileUpName[i].Data()),
1655 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1656 fhPtTrigChargedPileUp[i]->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1657 fhPtTrigChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1658 outputContainer->Add(fhPtTrigChargedPileUp[i]) ;
1665 Int_t nMultiBins = GetMultiBin();
1666 fhTrigDeltaPhiCharged = new TH2F*[nMultiBins] ;
1667 fhTrigDeltaEtaCharged = new TH2F*[nMultiBins] ;
1668 fhTrigXECorr = new TH2F*[nMultiBins] ;
1669 fhTrigXEUeCorr = new TH2F*[nMultiBins] ;
1670 fhTrigZTCorr = new TH2F*[nMultiBins] ;
1671 fhTrigZTUeCorr = new TH2F*[nMultiBins] ;
1673 for(Int_t im=0; im<nMultiBins; im++)
1675 fhTrigDeltaPhiCharged[im] = new TH2F
1676 (Form("hTrigDeltaPhiCharged_%d",im),Form("hTrigDeltaPhiCharged_%d",im), nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1677 fhTrigDeltaPhiCharged[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1678 fhTrigDeltaPhiCharged[im]->SetYTitle("#Delta #phi (rad)");
1680 fhTrigDeltaEtaCharged[im] = new TH2F
1681 (Form("hTrigDeltaEtaCharged_%d",im),Form("hTrigDeltaEtaCharged_%d",im), nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
1682 fhTrigDeltaEtaCharged[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1683 fhTrigDeltaEtaCharged[im]->SetYTitle("#Delta #eta");
1685 fhTrigXECorr[im] = new TH2F
1686 (Form("hTrigXEPtCorr_%d",im),Form("hTrigXEPtCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
1687 fhTrigXECorr[im]->SetYTitle("#it{x}_{#it{E} trigger h^{#pm}}");
1688 fhTrigXECorr[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1690 fhTrigXEUeCorr[im] = new TH2F
1691 (Form("hTrigXEPtUeCorr_%d",im),Form("hTrigXEPtUeCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
1692 fhTrigXEUeCorr[im]->SetYTitle("#it{x}_{#it{E} trigger h^{#pm}}");
1693 fhTrigXEUeCorr[im]->SetXTitle("#it{p}_{T trigger}(GeV/#it{c})");
1695 fhTrigZTCorr[im] = new TH2F
1696 (Form("hTrigZTPtCorr_%d",im),Form("hTrigZTPtCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
1697 fhTrigZTCorr[im]->SetYTitle("#it{z}_{trigger h^{#pm}}");
1698 fhTrigZTCorr[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1700 fhTrigZTUeCorr[im] = new TH2F
1701 (Form("hTrigZTPtUeCorr_%d",im),Form("hTrigZTPtUeCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
1702 fhTrigZTUeCorr[im]->SetYTitle("#it{z}_{trigger h^{#pm}}");
1703 fhTrigZTUeCorr[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1705 outputContainer->Add(fhTrigDeltaPhiCharged[im]) ;
1706 outputContainer->Add(fhTrigDeltaEtaCharged[im]) ;
1707 outputContainer->Add(fhTrigXECorr[im]);
1708 outputContainer->Add(fhTrigXEUeCorr[im]);
1709 outputContainer->Add(fhTrigZTCorr[im]);
1710 outputContainer->Add(fhTrigZTUeCorr[im]);
1716 fhAssocPtBkg = new TH2F("hAssocPtBkg", " Trigger #it{p}_{T} vs associated hadron #it{p}_{T} from background",
1717 nptbins, ptmin, ptmax,nptbins,ptmin,ptmax);
1718 fhAssocPtBkg->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1719 fhAssocPtBkg->SetYTitle("#it{p}_{T associated} (GeV/#it{c})");
1720 outputContainer->Add(fhAssocPtBkg) ;
1722 fhDeltaPhiBrad = new TH2F("hDeltaPhiBrad","atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs #it{p}_{T trigger} ",
1723 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
1724 fhDeltaPhiBrad->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1725 fhDeltaPhiBrad->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
1726 outputContainer->Add(fhDeltaPhiBrad) ;
1729 fhDeltaPhiDeltaEtaAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1730 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1731 fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
1732 fhDeltaPhiAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
1733 fhXEAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1734 fhZTAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1737 fhDeltaPhiBradAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1739 if(fPi0Trigger || fDecayTrigger)
1741 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1742 fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
1743 fhXEAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1744 fhZTAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1745 fhXEDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1746 fhZTDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1747 fhDeltaPhiDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1750 if(fHMPIDCorrelation)
1752 fhDeltaPhiAssocPtBinHMPID = new TH2F*[fNAssocPtBins*nz];
1753 fhDeltaPhiAssocPtBinHMPIDAcc= new TH2F*[fNAssocPtBins*nz];
1756 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
1758 for(Int_t z = 0 ; z < nz ; z++)
1764 sz = Form("_vz%d",z);
1765 tz = Form(", #it{v}_{#it{z}} bin %d",z);
1768 //printf("iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
1770 fhDeltaPhiDeltaEtaAssocPtBin[bin] = new TH2F(Form("hDeltaPhiDeltaEtaPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1771 Form("#Delta #phi vs #Delta #eta for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1772 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1773 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
1774 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetYTitle("#Delta #eta");
1776 fhDeltaPhiAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1777 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()),
1778 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1779 fhDeltaPhiAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1780 fhDeltaPhiAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
1782 fhDeltaPhiAssocPtBinDEta08[bin] = new TH2F(Form("hDeltaPhiDeltaEta0.8PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1783 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()),
1784 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1785 fhDeltaPhiAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1786 fhDeltaPhiAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
1788 fhDeltaPhiAssocPtBinDEta0[bin] = new TH2F(Form("hDeltaPhiDeltaEta0PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1789 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()),
1790 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1791 fhDeltaPhiAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1792 fhDeltaPhiAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
1794 fhXEAssocPtBin[bin] = new TH2F(Form("hXEAssocPtBin%1.f_%1.f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1795 Form("#it{x}_{#it{E}} vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1796 nptbins, ptmin, ptmax,200, 0.0, 2.0);
1797 fhXEAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1798 fhXEAssocPtBin[bin]->SetYTitle("#it{x}_{#it{E}}");
1800 fhZTAssocPtBin[bin] = new TH2F(Form("hZTAssocPtBin%1.f_%1.f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1801 Form("#it{z}_{T} vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1802 nptbins, ptmin, ptmax,200, 0.0, 2.0);
1803 fhZTAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1804 fhZTAssocPtBin[bin]->SetYTitle("#it{z}_{T}");
1806 outputContainer->Add(fhDeltaPhiDeltaEtaAssocPtBin[bin]) ;
1807 outputContainer->Add(fhDeltaPhiAssocPtBin[bin]) ;
1808 outputContainer->Add(fhDeltaPhiAssocPtBinDEta08[bin]) ;
1809 outputContainer->Add(fhDeltaPhiAssocPtBinDEta0[bin]) ;
1810 outputContainer->Add(fhXEAssocPtBin[bin]);
1811 outputContainer->Add(fhZTAssocPtBin[bin]);
1813 if(fPi0Trigger || fDecayTrigger)
1815 fhDeltaPhiDecayChargedAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtDecayChargedAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1816 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()),
1817 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1818 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1819 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
1821 fhXEDecayChargedAssocPtBin[bin] = new TH2F(Form("hXEDecayChargedAssocPtBin%1.f_%1.f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1822 Form("#it{x}_{#it{E}} 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()),
1823 nptbins, ptmin, ptmax,200, 0.0, 2.0);
1824 fhXEDecayChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1825 fhXEDecayChargedAssocPtBin[bin]->SetYTitle("#it{x}_{#it{E}}");
1827 fhZTDecayChargedAssocPtBin[bin] = new TH2F(Form("hZTDecayChargedAssocPtBin%1.f_%1.f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1828 Form("#it{z}_{T} 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()),
1829 nptbins, ptmin, ptmax,200, 0.0, 2.0);
1830 fhZTDecayChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1831 fhZTDecayChargedAssocPtBin[bin]->SetYTitle("#it{z}_{T}");
1833 outputContainer->Add(fhDeltaPhiDecayChargedAssocPtBin[bin]) ;
1834 outputContainer->Add(fhXEDecayChargedAssocPtBin[bin]);
1835 outputContainer->Add(fhZTDecayChargedAssocPtBin[bin]);
1841 fhDeltaPhiBradAssocPtBin[bin] = new TH2F(Form("hDeltaPhiBradPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1842 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()),
1843 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
1844 fhDeltaPhiBradAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1845 fhDeltaPhiBradAssocPtBin[bin]->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
1846 outputContainer->Add(fhDeltaPhiBradAssocPtBin[bin]) ;
1849 if(fHMPIDCorrelation)
1851 fhDeltaPhiAssocPtBinHMPID[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPID", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1852 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()),
1853 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1854 fhDeltaPhiAssocPtBinHMPID[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})" );
1855 fhDeltaPhiAssocPtBinHMPID[bin]->SetYTitle("#Delta #phi (rad)");
1857 fhDeltaPhiAssocPtBinHMPIDAcc[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPIDAcc", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1858 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()),
1859 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1860 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1861 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetYTitle("#Delta #phi (rad)");
1863 outputContainer->Add(fhDeltaPhiAssocPtBinHMPID[bin]) ;
1864 outputContainer->Add(fhDeltaPhiAssocPtBinHMPIDAcc[bin]) ;
1870 if(fPi0Trigger || fDecayTrigger)
1874 fhPtPi0DecayRatio = new TH2F
1875 ("hPtPi0DecayRatio","#it{p}_{T} of #pi^{0} and the ratio of pt for two decay",
1876 nptbins,ptmin,ptmax, 100,0.,2.);
1877 fhPtPi0DecayRatio->SetXTitle("#it{p}_{T}^{#pi^{0}} (GeV/#it{c})");
1878 fhPtPi0DecayRatio->SetYTitle("#it{p}_{T}^{Decay}/#it{p}_{T}^{#pi^{0}}");
1879 outputContainer->Add(fhPtPi0DecayRatio) ;
1882 fhDeltaPhiDecayCharged = new TH2F
1883 ("hDeltaPhiDecayCharged","#phi_{Decay} - #phi_{h^{#pm}} vs #it{p}_{T Decay}",
1884 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1885 fhDeltaPhiDecayCharged->SetYTitle("#Delta #phi (rad)");
1886 fhDeltaPhiDecayCharged->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
1889 new TH2F("hXEDecayCharged","#it{x}_{#it{E}} Decay",
1890 nptbins,ptmin,ptmax,200,0.,2.);
1891 fhXEDecayCharged->SetYTitle("#it{x}_{#it{E}}");
1892 fhXEDecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
1895 new TH2F("hZTDecayCharged","#it{z}_{trigger h^{#pm}} = #it{p}_{T h^{#pm}} / #it{p}_{T Decay}",
1896 nptbins,ptmin,ptmax,200,0.,2.);
1897 fhZTDecayCharged->SetYTitle("#it{z}_{decay h^{#pm}}");
1898 fhZTDecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
1900 outputContainer->Add(fhDeltaPhiDecayCharged) ;
1901 outputContainer->Add(fhXEDecayCharged) ;
1902 outputContainer->Add(fhZTDecayCharged) ;
1907 fhDeltaPhiUeLeftCharged = new TH2F
1908 ("hDeltaPhiUeLeftChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left side range of trigger particles",
1909 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1910 fhDeltaPhiUeLeftCharged->SetYTitle("#Delta #phi (rad)");
1911 fhDeltaPhiUeLeftCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1912 outputContainer->Add(fhDeltaPhiUeLeftCharged) ;
1914 fhDeltaPhiUeRightCharged = new TH2F
1915 ("hDeltaPhiUeRightChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right side range of trigger particles",
1916 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1917 fhDeltaPhiUeRightCharged->SetYTitle("#Delta #phi (rad)");
1918 fhDeltaPhiUeRightCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1919 outputContainer->Add(fhDeltaPhiUeRightCharged) ;
1921 fhDeltaPhiUeLeftUpCharged = new TH2F
1922 ("hDeltaPhiUeLeftUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Up side range of trigger particles",
1923 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1924 fhDeltaPhiUeLeftUpCharged->SetYTitle("#Delta #phi (rad)");
1925 fhDeltaPhiUeLeftUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1926 outputContainer->Add(fhDeltaPhiUeLeftUpCharged) ;
1928 fhDeltaPhiUeRightUpCharged = new TH2F
1929 ("hDeltaPhiUeRightUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Up side range of trigger particles",
1930 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1931 fhDeltaPhiUeRightUpCharged->SetYTitle("#Delta #phi (rad)");
1932 fhDeltaPhiUeRightUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1933 outputContainer->Add(fhDeltaPhiUeRightUpCharged) ;
1935 fhDeltaPhiUeLeftDownCharged = new TH2F
1936 ("hDeltaPhiUeLeftDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Down side range of trigger particles",
1937 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1938 fhDeltaPhiUeLeftDownCharged->SetYTitle("#Delta #phi (rad)");
1939 fhDeltaPhiUeLeftDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1940 outputContainer->Add(fhDeltaPhiUeLeftDownCharged) ;
1942 fhDeltaPhiUeRightDownCharged = new TH2F
1943 ("hDeltaPhiUeRightDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Down side range of trigger particles",
1944 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1945 fhDeltaPhiUeRightDownCharged->SetYTitle("#Delta #phi (rad)");
1946 fhDeltaPhiUeRightDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1947 outputContainer->Add(fhDeltaPhiUeRightDownCharged) ;
1950 new TH2F("hXEUeChargedLeft","#it{x}_{#it{E}} with UE left side of trigger",
1951 nptbins,ptmin,ptmax,200,0.,2.);
1952 fhXEUeLeftCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1953 fhXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1954 outputContainer->Add(fhXEUeLeftCharged) ;
1956 fhXEUeRightCharged =
1957 new TH2F("hXEUeChargedRight","#it{x}_{#it{E} h^{#pm}} with UE right side of trigger",
1958 nptbins,ptmin,ptmax,200,0.,2.);
1959 fhXEUeRightCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1960 fhXEUeRightCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1961 outputContainer->Add(fhXEUeRightCharged) ;
1963 fhXEUeLeftUpCharged =
1964 new TH2F("hXEUeChargedLeftUp","#it{x}_{#it{E}} with UE left Up side of trigger",
1965 nptbins,ptmin,ptmax,200,0.,2.);
1966 fhXEUeLeftUpCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1967 fhXEUeLeftUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1968 outputContainer->Add(fhXEUeLeftUpCharged) ;
1970 fhXEUeRightUpCharged =
1971 new TH2F("hXEUeChargedRightUp","#it{x}_{#it{E} h^{#pm}} with UE right Up side of trigger",
1972 nptbins,ptmin,ptmax,200,0.,2.);
1973 fhXEUeRightUpCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1974 fhXEUeRightUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1975 outputContainer->Add(fhXEUeRightUpCharged) ;
1977 fhXEUeLeftDownCharged =
1978 new TH2F("hXEUeChargedLeftDown","#it{x}_{#it{E}} with UE left Down side of trigger",
1979 nptbins,ptmin,ptmax,200,0.,2.);
1980 fhXEUeLeftDownCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1981 fhXEUeLeftDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1982 outputContainer->Add(fhXEUeLeftDownCharged) ;
1984 fhXEUeRightDownCharged =
1985 new TH2F("hXEUeChargedRightDown","#it{x}_{#it{E} h^{#pm}} with UE right Down side of trigger",
1986 nptbins,ptmin,ptmax,200,0.,2.);
1987 fhXEUeRightDownCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1988 fhXEUeRightDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1989 outputContainer->Add(fhXEUeRightDownCharged) ;
1991 fhPtHbpXEUeLeftCharged =
1992 new TH2F("hHbpXEUeChargedLeft","#xi = ln(1/#it{x}_{#it{E}}) with charged UE left side of trigger",
1993 nptbins,ptmin,ptmax,200,0.,10.);
1994 fhPtHbpXEUeLeftCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1995 fhPtHbpXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1996 outputContainer->Add(fhPtHbpXEUeLeftCharged) ;
1998 fhPtHbpXEUeRightCharged =
1999 new TH2F("hHbpXEUeChargedRight","#xi = ln(1/#it{x}_{#it{E}}) with charged UE right side of trigger",
2000 nptbins,ptmin,ptmax,200,0.,10.);
2001 fhPtHbpXEUeRightCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2002 fhPtHbpXEUeRightCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2003 outputContainer->Add(fhPtHbpXEUeRightCharged) ;
2006 new TH2F("hZTUeChargedLeft","#it{z}_{trigger h^{#pm}} = #it{p}_{T Ueh^{#pm}} / #it{p}_{T trigger} with UE left side of trigger",
2007 nptbins,ptmin,ptmax,200,0.,2.);
2008 fhZTUeLeftCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
2009 fhZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2010 outputContainer->Add(fhZTUeLeftCharged) ;
2012 fhZTUeRightCharged =
2013 new TH2F("hZTUeChargedRight","#it{z}_{trigger h^{#pm}} = #it{p}_{T Ueh^{#pm}} / #it{p}_{T trigger} with UE right side of trigger",
2014 nptbins,ptmin,ptmax,200,0.,2.);
2015 fhZTUeRightCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
2016 fhZTUeRightCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2017 outputContainer->Add(fhZTUeRightCharged) ;
2019 fhPtHbpZTUeLeftCharged =
2020 new TH2F("hHbpZTUeChargedLeft","#xi = ln(1/#it{z}_{T}) with charged UE left side of trigger",
2021 nptbins,ptmin,ptmax,200,0.,10.);
2022 fhPtHbpZTUeLeftCharged->SetYTitle("ln(1/#it{z}_{T})");
2023 fhPtHbpZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2024 outputContainer->Add(fhPtHbpZTUeLeftCharged) ;
2026 fhPtHbpZTUeRightCharged =
2027 new TH2F("hHbpZTUeChargedRight","#xi = ln(1/#it{z}_{T}) with charged UE right side of trigger",
2028 nptbins,ptmin,ptmax,200,0.,10.);
2029 fhPtHbpZTUeRightCharged->SetYTitle("ln(1/#it{z}_{T})");
2030 fhPtHbpZTUeRightCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2031 outputContainer->Add(fhPtHbpZTUeRightCharged) ;
2036 //Correlation with neutral hadrons
2039 fhDeltaPhiDeltaEtaNeutral = new TH2F
2040 ("hDeltaPhiDeltaEtaNeutral","#phi_{trigger} - #phi_{h^{0}} vs #eta_{trigger} - #eta_{h^{0}}",
2041 ndeltaphibins ,deltaphimin,deltaphimax, ndeltaetabins ,deltaetamin,deltaetamax);
2042 fhDeltaPhiDeltaEtaNeutral->SetXTitle("#Delta #phi (rad)");
2043 fhDeltaPhiDeltaEtaNeutral->SetYTitle("#Delta #eta");
2045 fhPhiNeutral = new TH2F
2046 ("hPhiNeutral","#phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}",
2047 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
2048 fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)");
2049 fhPhiNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})");
2051 fhEtaNeutral = new TH2F
2052 ("hEtaNeutral","#eta_{#pi^{0}} vs #it{p}_{T #pi^{0}}",
2053 nptbins,ptmin,ptmax,netabins,etamin,etamax);
2054 fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)");
2055 fhEtaNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})");
2057 fhDeltaPhiNeutral = new TH2F
2058 ("hDeltaPhiNeutral","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T trigger}",
2059 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
2060 fhDeltaPhiNeutral->SetYTitle("#Delta #phi (rad)");
2061 fhDeltaPhiNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2063 fhDeltaPhiNeutralPt = new TH2F
2064 ("hDeltaPhiNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}",
2065 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2066 fhDeltaPhiNeutralPt->SetYTitle("#Delta #phi (rad)");
2067 fhDeltaPhiNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2069 fhDeltaPhiUeNeutralPt = new TH2F
2070 ("hDeltaPhiUeNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}",
2071 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2072 fhDeltaPhiUeNeutralPt->SetYTitle("#Delta #phi (rad)");
2073 fhDeltaPhiUeNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2075 fhDeltaEtaNeutral = new TH2F
2076 ("hDeltaEtaNeutral","#eta_{trigger} - #eta_{#pi^{0}} vs #it{p}_{T trigger}",
2077 nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
2078 fhDeltaEtaNeutral->SetYTitle("#Delta #eta");
2079 fhDeltaEtaNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2082 new TH2F("hXENeutral","#it{x}_{#it{E}} for #pi^{0} associated",
2083 nptbins,ptmin,ptmax,200,0.,2.);
2084 fhXENeutral->SetYTitle("#it{x}_{#it{E}}");
2085 fhXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2088 new TH2F("hXEUeNeutral","#it{x}_{#it{E}} for #pi^{0} associated",
2089 nptbins,ptmin,ptmax,200,0.,2.);
2090 fhXEUeNeutral->SetYTitle("#it{x}_{#it{E}}");
2091 fhXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2094 new TH2F("hHbpXENeutral","#xi = ln(1/#it{x}_{#it{E}})for #pi^{0} associated",
2095 nptbins,ptmin,ptmax,200,0.,10.);
2096 fhPtHbpXENeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2097 fhPtHbpXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2099 fhPtHbpXEUeNeutral =
2100 new TH2F("hHbpXEUeNeutral","#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2101 nptbins,ptmin,ptmax,200,0.,10.);
2102 fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2103 fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2106 new TH2F("hZTNeutral","#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated",
2107 nptbins,ptmin,ptmax,200,0.,2.);
2108 fhZTNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}");
2109 fhZTNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2112 new TH2F("hZTUeNeutral","#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated",
2113 nptbins,ptmin,ptmax,200,0.,2.);
2114 fhZTUeNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}");
2115 fhZTUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2118 new TH2F("hHbpZTNeutral","#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2119 nptbins,ptmin,ptmax,200,0.,10.);
2120 fhPtHbpZTNeutral->SetYTitle("ln(1/#it{z}_{T})");
2121 fhPtHbpZTNeutral->SetXTitle("#it{p}_{T trigger}");
2123 fhPtHbpZTUeNeutral =
2124 new TH2F("hHbpZTUeNeutral","#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2125 nptbins,ptmin,ptmax,200,0.,10.);
2126 fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{z}_{T})");
2127 fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2129 outputContainer->Add(fhDeltaPhiDeltaEtaNeutral);
2130 outputContainer->Add(fhPhiNeutral) ;
2131 outputContainer->Add(fhEtaNeutral) ;
2132 outputContainer->Add(fhDeltaPhiNeutral) ;
2133 outputContainer->Add(fhDeltaPhiNeutralPt) ;
2134 outputContainer->Add(fhDeltaPhiUeNeutralPt) ;
2135 outputContainer->Add(fhDeltaEtaNeutral) ;
2136 outputContainer->Add(fhXENeutral) ;
2137 outputContainer->Add(fhXEUeNeutral) ;
2138 outputContainer->Add(fhPtHbpXENeutral) ;
2139 outputContainer->Add(fhPtHbpXEUeNeutral) ;
2140 outputContainer->Add(fhZTNeutral) ;
2141 outputContainer->Add(fhZTUeNeutral) ;
2142 outputContainer->Add(fhPtHbpZTNeutral) ;
2143 outputContainer->Add(fhPtHbpZTUeNeutral) ;
2145 if(fPi0Trigger || fDecayTrigger)
2147 fhDeltaPhiDecayNeutral = new TH2F
2148 ("hDeltaPhiDecayNeutral","#phi_{Decay} - #phi_{h^{0}} vs #it{p}_{T Decay}",
2149 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2150 fhDeltaPhiDecayNeutral->SetYTitle("#Delta #phi (rad)");
2151 fhDeltaPhiDecayNeutral->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
2154 new TH2F("hXEDecayNeutral","#it{x}_{#it{E}} for decay trigger",
2155 nptbins,ptmin,ptmax,200,0.,2.);
2156 fhXEDecayNeutral->SetYTitle("#it{x}_{#it{E}}");
2157 fhXEDecayNeutral->SetXTitle("#it{p}_{T decay}");
2160 new TH2F("hZTDecayNeutral","#it{z}_{trigger h^{0}} = #it{p}_{T h^{0}} / #it{p}_{T Decay}",
2161 nptbins,ptmin,ptmax,200,0.,2.);
2162 fhZTDecayNeutral->SetYTitle("#it{z}_{h^{0}}");
2163 fhZTDecayNeutral->SetXTitle("#it{p}_{T decay}");
2165 outputContainer->Add(fhDeltaPhiDecayNeutral) ;
2166 outputContainer->Add(fhXEDecayNeutral) ;
2167 outputContainer->Add(fhZTDecayNeutral) ;
2173 fhDeltaPhiUeLeftNeutral = new TH2F
2174 ("hDeltaPhiUeLeftNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs #it{p}_{T h^{0}} with neutral UE left side range of trigger particles",
2175 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2176 fhDeltaPhiUeLeftNeutral->SetYTitle("#Delta #phi (rad)");
2177 fhDeltaPhiUeLeftNeutral->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2178 outputContainer->Add(fhDeltaPhiUeLeftNeutral) ;
2180 fhDeltaPhiUeRightNeutral = new TH2F
2181 ("hDeltaPhiUeRightNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs #it{p}_{T Ueh^{0}} with neutral UE right side range of trigger particles",
2182 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2183 fhDeltaPhiUeRightNeutral->SetYTitle("#Delta #phi (rad)");
2184 fhDeltaPhiUeRightNeutral->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2185 outputContainer->Add(fhDeltaPhiUeRightNeutral) ;
2188 new TH2F("hXEUeNeutralLeft","#it{x}_{#it{E}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger",
2189 nptbins,ptmin,ptmax,140,0.,2.);
2190 fhXEUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2191 fhXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2192 outputContainer->Add(fhXEUeLeftNeutral) ;
2194 fhXEUeRightNeutral =
2195 new TH2F("hXEUeNeutralRight","#it{x}_{#it{E}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE right side of trigger",
2196 nptbins,ptmin,ptmax,200,0.,2.);
2197 fhXEUeRightNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2198 fhXEUeRightNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2199 outputContainer->Add(fhXEUeRightNeutral) ;
2201 fhPtHbpXEUeLeftNeutral =
2202 new TH2F("hHbpXEUeNeutralLeft","#xi = ln(1/#it{x}_{#it{E}}) with neutral UE left side of trigger",
2203 nptbins,ptmin,ptmax,200,0.,10.);
2204 fhPtHbpXEUeLeftNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2205 fhPtHbpXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2206 outputContainer->Add(fhPtHbpXEUeLeftNeutral) ;
2208 fhPtHbpXEUeRightNeutral =
2209 new TH2F("hHbpXEUeNeutralRight","#xi = ln(1/#it{x}_{#it{E}}) with neutral UE right side of trigger",
2210 nptbins,ptmin,ptmax,200,0.,10.);
2211 fhPtHbpXEUeRightNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2212 fhPtHbpXEUeRightNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2213 outputContainer->Add(fhPtHbpXEUeRightNeutral) ;
2216 new TH2F("hZTUeNeutralLeft","#it{z}_{trigger h^{0}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger",
2217 nptbins,ptmin,ptmax,140,0.,2.);
2218 fhZTUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2219 fhZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2220 outputContainer->Add(fhZTUeLeftNeutral) ;
2222 fhZTUeRightNeutral =
2223 new TH2F("hZTUeNeutralRight","#it{z}_{trigger h^{0}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE right side of trigger",
2224 nptbins,ptmin,ptmax,200,0.,2.);
2225 fhZTUeRightNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2226 fhZTUeRightNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2227 outputContainer->Add(fhZTUeRightNeutral) ;
2229 fhPtHbpZTUeLeftNeutral =
2230 new TH2F("hHbpZTUeNeutralLeft","#xi = ln(1/#it{z}_{T}) with neutral UE left side of trigger",
2231 nptbins,ptmin,ptmax,200,0.,10.);
2232 fhPtHbpZTUeLeftNeutral->SetYTitle("ln(1/#it{z}_{T})");
2233 fhPtHbpZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger}");
2234 outputContainer->Add(fhPtHbpZTUeLeftNeutral) ;
2236 fhPtHbpZTUeRightNeutral =
2237 new TH2F("hHbpZTUeNeutralRight","#xi = ln(1/#it{z}_{T}) with neutral UE right side of trigger",
2238 nptbins,ptmin,ptmax,200,0.,10.);
2239 fhPtHbpZTUeRightNeutral->SetYTitle("ln(1/#it{z}_{T})");
2240 fhPtHbpZTUeRightNeutral->SetXTitle("#it{p}_{T trigger}");
2241 outputContainer->Add(fhPtHbpZTUeRightNeutral) ;
2245 }//Correlation with neutral hadrons
2247 //if data is MC, fill more histograms
2250 fh2phiLeadingParticle=new TH2F("h2phiLeadingParticle","#phi resolustion for trigger particles",nptbins,ptmin,ptmax,100,-1,1);
2251 fh2phiLeadingParticle->GetXaxis()->SetTitle("#it{p}_{T gen Leading} (GeV/#it{c})");
2252 fh2phiLeadingParticle->GetYaxis()->SetTitle("(#phi_{rec}-#phi_{gen})/#phi_{gen}");
2254 fhMCPtLeading = new TH1F ("hMCPtLeading","MC : #it{p}_{T} distribution of leading particles", nptbins,ptmin,ptmax);
2255 fhMCPtLeading->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2257 fhMCPhiLeading = new TH2F ("hMCPhiLeading","MC : #phi distribution of leading Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2258 fhMCPhiLeading->SetYTitle("#phi (rad)");
2260 fhMCEtaLeading = new TH2F ("hMCEtaLeading","MC : #eta distribution of leading",nptbins,ptmin,ptmax, netabins,etamin,etamax);
2261 fhMCEtaLeading->SetYTitle("#eta ");
2264 fhMCEtaCharged = new TH2F
2265 ("hMCEtaCharged","MC #eta_{h^{#pm}} vs #it{p}_{T #pm}",
2266 nptbins,ptmin,ptmax,netabins,etamin,etamax);
2267 fhMCEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
2268 fhMCEtaCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
2270 fhMCPhiCharged = new TH2F
2271 ("hMCPhiCharged","#MC phi_{h^{#pm}} vs #it{p}_{T #pm}",
2272 200,ptmin,ptmax,nphibins,phimin,phimax);
2273 fhMCPhiCharged->SetYTitle("MC #phi_{h^{#pm}} (rad)");
2274 fhMCPhiCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
2276 fhMCDeltaPhiDeltaEtaCharged = new TH2F
2277 ("hMCDeltaPhiDeltaEtaCharged","#MC phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
2278 140,-2.,5.,200,-2,2);
2279 fhMCDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
2280 fhMCDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
2282 fhMCDeltaEtaCharged = new TH2F
2283 ("hMCDeltaEtaCharged","MC #eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger} and #it{p}_{T assoc}",
2284 nptbins,ptmin,ptmax,200,-2,2);
2285 fhMCDeltaEtaCharged->SetYTitle("#Delta #eta");
2286 fhMCDeltaEtaCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2288 fhMCDeltaPhiCharged = new TH2F
2289 ("hMCDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
2290 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2291 fhMCDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
2292 fhMCDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2294 fhMCDeltaPhiChargedPt = new TH2F
2295 ("hMCDeltaPhiChargedPt","MC #phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}",
2296 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2297 fhMCDeltaPhiChargedPt->SetYTitle("#Delta #phi (rad)");
2298 fhMCDeltaPhiChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
2301 new TH2F("hMCPtXECharged","#it{x}_{#it{E}} with charged hadrons",
2302 nptbins,ptmin,ptmax,200,0.,2.);
2303 fhMCPtXECharged->SetYTitle("#it{x}_{#it{E}}");
2304 fhMCPtXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2307 new TH2F("hMCPtXEUeCharged","#it{x}_{#it{E}} with charged hadrons, Underlying Event",
2308 nptbins,ptmin,ptmax,200,0.,2.);
2309 fhMCPtXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
2310 fhMCPtXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2312 fhMCPtXEUeLeftCharged =
2313 new TH2F("hMCPtXEUeChargedLeft","#it{x}_{#it{E}} with charged hadrons, with UE left side range of trigger particles",
2314 nptbins,ptmin,ptmax,200,0.,2.);
2315 fhMCPtXEUeLeftCharged->SetYTitle("#it{x}_{#it{E}}");
2316 fhMCPtXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2318 fhMCPtXEUeRightCharged =
2319 new TH2F("hMCPtXEUeChargedRight","#it{x}_{#it{E}} with charged hadrons, with UE left side range of trigger particles",
2320 nptbins,ptmin,ptmax,200,0.,2.);
2321 fhMCPtXEUeRightCharged->SetYTitle("#it{x}_{#it{E}}");
2322 fhMCPtXEUeRightCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2325 fhMCPtHbpXECharged =
2326 new TH2F("hMCHbpXECharged","MC #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
2327 nptbins,ptmin,ptmax,200,0.,10.);
2328 fhMCPtHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2329 fhMCPtHbpXECharged->SetXTitle("#it{p}_{T trigger}");
2331 fhMCPtHbpXEUeCharged =
2332 new TH2F("hMCPtHbpXEUeCharged","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, Underlying Event",
2333 nptbins,ptmin,ptmax,200,0.,10.);
2334 fhMCPtHbpXEUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2335 fhMCPtHbpXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2337 fhMCPtHbpXEUeLeftCharged =
2338 new TH2F("hMCPtHbpXEUeChargedLeft","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, with UE left side range of trigger particles",
2339 nptbins,ptmin,ptmax,200,0.,10.);
2340 fhMCPtHbpXEUeLeftCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2341 fhMCPtHbpXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2343 fhMCPtHbpXEUeRightCharged =
2344 new TH2F("hMCPtHbpXEUeChargedRight","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, with UE right side range of trigger particles",
2345 nptbins,ptmin,ptmax,200,0.,10.);
2346 fhMCPtHbpXEUeRightCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2347 fhMCPtHbpXEUeRightCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2351 new TH1F("hMCUePart","MC UE particles distribution vs pt trig",
2352 nptbins,ptmin,ptmax);
2353 fhMCUePart->SetYTitle("#it{dN}^{ch}");
2354 fhMCUePart->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2357 new TH2F("hMCPtZTCharged","#it{z}_{T} with charged hadrons",
2358 nptbins,ptmin,ptmax,200,0.,2.);
2359 fhMCPtZTCharged->SetYTitle("#it{z}_{T}");
2360 fhMCPtZTCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2363 new TH2F("hMCPtZTUeCharged","#it{z}_{T} with charged hadrons, Underlying Event",
2364 nptbins,ptmin,ptmax,200,0.,2.);
2365 fhMCPtZTUeCharged->SetYTitle("#it{z}_{T}");
2366 fhMCPtZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2368 fhMCPtZTUeLeftCharged =
2369 new TH2F("hMCPtZTUeChargedLeft","#it{z}_{T} with charged hadrons, with UE left side range of trigger particles",
2370 nptbins,ptmin,ptmax,200,0.,2.);
2371 fhMCPtZTUeLeftCharged->SetYTitle("#it{z}_{T}");
2372 fhMCPtZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2374 fhMCPtZTUeRightCharged =
2375 new TH2F("hMCPtZTUeChargedRight","#it{z}_{T} with charged hadrons, with UE right side range of trigger particles",
2376 nptbins,ptmin,ptmax,200,0.,2.);
2377 fhMCPtZTUeRightCharged->SetYTitle("#it{z}_{T}");
2378 fhMCPtZTUeRightCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2380 fhMCPtHbpZTCharged =
2381 new TH2F("hMCHbpZTCharged","MC #xi = ln(1/#it{z}_{T}) with charged hadrons",
2382 nptbins,ptmin,ptmax,200,0.,10.);
2383 fhMCPtHbpZTCharged->SetYTitle("ln(1/#it{z}_{T})");
2384 fhMCPtHbpZTCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2386 fhMCPtHbpZTUeCharged =
2387 new TH2F("hMCPtHbpZTUeCharged","#xi = ln(1/#it{z}_{T}) with charged hadrons, Underlying Event",
2388 nptbins,ptmin,ptmax,200,0.,10.);
2389 fhMCPtHbpZTUeCharged->SetYTitle("ln(1/#it{z}_{T})");
2390 fhMCPtHbpZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2392 fhMCPtHbpZTUeLeftCharged =
2393 new TH2F("hMCPtHbpZTUeChargedLeft","#xi = ln(1/#it{z}_{T}) with charged hadrons, with UE left side range of trigger particles",
2394 nptbins,ptmin,ptmax,200,0.,10.);
2395 fhMCPtHbpZTUeLeftCharged->SetYTitle("ln(1/#it{z}_{T})");
2396 fhMCPtHbpZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2398 fhMCPtHbpZTUeRightCharged =
2399 new TH2F("hMCPtHbpZTUeChargedRight","#xi = ln(1/#it{z}_{T}) with charged hadrons, with UE right side range of trigger particles",
2400 nptbins,ptmin,ptmax,200,0.,10.);
2401 fhMCPtHbpZTUeRightCharged->SetYTitle("ln(1/#it{z}_{T})");
2402 fhMCPtHbpZTUeRightCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2405 new TH2F("hMCPtTrigPout","AOD MC Pout with triggers",
2406 nptbins,ptmin,ptmax,2*nptbins,-ptmax,ptmax);
2407 fhMCPtTrigPout->SetYTitle("#it{p}_{out} (GeV/#it{c})");
2408 fhMCPtTrigPout->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2410 fhMCPtAssocDeltaPhi =
2411 new TH2F("hMCPtAssocDeltaPhi","AOD MC delta phi with associated charged hadrons",
2412 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2413 fhMCPtAssocDeltaPhi->SetYTitle("#Delta #phi (rad)");
2414 fhMCPtAssocDeltaPhi->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2416 outputContainer->Add(fh2phiLeadingParticle);
2417 outputContainer->Add(fhMCPtLeading);
2418 outputContainer->Add(fhMCPhiLeading);
2419 outputContainer->Add(fhMCEtaLeading);
2420 outputContainer->Add(fhMCDeltaPhiDeltaEtaCharged);
2421 outputContainer->Add(fhMCPhiCharged) ;
2422 outputContainer->Add(fhMCEtaCharged) ;
2423 outputContainer->Add(fhMCDeltaEtaCharged) ;
2424 outputContainer->Add(fhMCDeltaPhiCharged) ;
2426 outputContainer->Add(fhMCDeltaPhiChargedPt) ;
2427 outputContainer->Add(fhMCPtXECharged) ;
2428 outputContainer->Add(fhMCPtXEUeCharged) ;
2429 outputContainer->Add(fhMCPtXEUeLeftCharged) ;
2430 outputContainer->Add(fhMCPtXEUeRightCharged) ;
2431 outputContainer->Add(fhMCPtZTCharged) ;
2432 outputContainer->Add(fhMCPtZTUeCharged) ;
2433 outputContainer->Add(fhMCPtZTUeLeftCharged) ;
2434 outputContainer->Add(fhMCPtZTUeRightCharged) ;
2435 outputContainer->Add(fhMCPtHbpXECharged) ;
2436 outputContainer->Add(fhMCPtHbpXEUeCharged);
2437 outputContainer->Add(fhMCPtHbpXEUeLeftCharged);
2438 outputContainer->Add(fhMCPtHbpXEUeRightCharged);
2439 outputContainer->Add(fhMCUePart);
2440 outputContainer->Add(fhMCPtHbpZTCharged) ;
2441 outputContainer->Add(fhMCPtHbpZTUeCharged) ;
2442 outputContainer->Add(fhMCPtHbpZTUeLeftCharged) ;
2443 outputContainer->Add(fhMCPtHbpZTUeRightCharged) ;
2444 outputContainer->Add(fhMCPtTrigPout) ;
2445 outputContainer->Add(fhMCPtAssocDeltaPhi) ;
2446 } //for MC histogram
2450 //create event containers
2452 if(!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForTracksExists()))
2454 Int_t nvz = GetNZvertBin();
2455 Int_t nrp = GetNRPBin();
2456 Int_t nce = GetNCentrBin();
2458 fListMixTrackEvents= new TList*[nvz*nrp*nce] ;
2460 for( Int_t ice = 0 ; ice < nce ; ice++ )
2462 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2464 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2466 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2468 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2469 // ic,iz, irp, bin);
2471 fListMixTrackEvents[bin] = new TList() ;
2472 fListMixTrackEvents[bin]->SetOwner(kFALSE);
2478 fhPtLeadingMixed = new TH1F ("hPtLeadingMixed","#it{p}_{T} distribution of leading particles, used for mixing", nptbins,ptmin,ptmax);
2479 fhPtLeadingMixed->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2483 fhPtLeadingMixedVzBin = new TH2F ("hPtLeadingMixedVzBin","#it{p}_{T} distribution of leading particles, used for mixing", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
2484 fhPtLeadingMixedVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2485 fhPtLeadingMixedVzBin->SetYTitle("#it{v}_{#it{z}} bin");
2486 outputContainer->Add(fhPtLeadingMixedVzBin);
2489 fhPtLeadingMixedBin = new TH2F ("hPtLeadingMixedBin","#it{p}_{T} distribution of leading particles vs mixing bin", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
2490 fhPtLeadingMixedBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2491 fhPtLeadingMixedBin->SetYTitle("Bin");
2493 fhPhiLeadingMixed = new TH2F ("hPhiLeadingMixed","#phi distribution of leading Particles, used for mixing",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2494 fhPhiLeadingMixed->SetYTitle("#phi (rad)");
2496 fhEtaLeadingMixed = new TH2F ("hEtaLeadingMixed","#eta distribution of leading, used for mixing",nptbins,ptmin,ptmax, netabins,etamin,etamax);
2497 fhEtaLeadingMixed->SetYTitle("#eta ");
2499 outputContainer->Add(fhPtLeadingMixed);
2500 outputContainer->Add(fhPtLeadingMixedBin);
2501 outputContainer->Add(fhPhiLeadingMixed);
2502 outputContainer->Add(fhEtaLeadingMixed);
2504 // Fill the cluster pool only in isolation analysis or if requested
2505 if( ( OnlyIsolated() || fFillNeutralEventMixPool) &&
2506 (!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForCaloExists())))
2508 Int_t nvz = GetNZvertBin();
2509 Int_t nrp = GetNRPBin();
2510 Int_t nce = GetNCentrBin();
2512 fListMixCaloEvents= new TList*[nvz*nrp*nce] ;
2514 for( Int_t ice = 0 ; ice < nce ; ice++ )
2516 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2518 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2520 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2522 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2523 // ic,iz, irp, bin);
2525 fListMixCaloEvents[bin] = new TList() ;
2526 fListMixCaloEvents[bin]->SetOwner(kFALSE);
2532 //Init the list in the reader if not done previously
2533 if(fUseMixStoredInReader)
2535 if( !GetReader()->ListWithMixedEventsForTracksExists() )
2536 GetReader()->SetListWithMixedEventsForTracks(fListMixTrackEvents);
2538 if( !GetReader()->ListWithMixedEventsForCaloExists() )
2539 GetReader()->SetListWithMixedEventsForCalo (fListMixCaloEvents );
2542 fhEventBin=new TH1I("hEventBin","Number of real events per bin(cen,vz,rp)",
2543 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2544 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2545 fhEventBin->SetXTitle("bin");
2546 outputContainer->Add(fhEventBin) ;
2548 fhEventMixBin=new TH1I("hEventMixBin","Number of events per bin(cen,vz,rp)",
2549 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2550 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2551 fhEventMixBin->SetXTitle("bin");
2552 outputContainer->Add(fhEventMixBin) ;
2554 fhNtracksMB=new TH1F("hNtracksMBEvent","Number of tracks w/ event trigger kMB",2000,0,2000);
2555 outputContainer->Add(fhNtracksMB);
2557 if(fFillNeutralEventMixPool || OnlyIsolated())
2559 fhNclustersMB=new TH1F("hNclustersMBEvent","Number of clusters w/ event trigger kMB",2000,0,2000);
2560 outputContainer->Add(fhNclustersMB);
2563 fhMixDeltaPhiCharged = new TH2F
2564 ("hMixDeltaPhiCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
2565 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2566 fhMixDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
2567 fhMixDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2568 outputContainer->Add(fhMixDeltaPhiCharged);
2570 fhMixDeltaPhiDeltaEtaCharged = new TH2F
2571 ("hMixDeltaPhiDeltaEtaCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
2572 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2573 fhMixDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
2574 fhMixDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
2575 outputContainer->Add(fhMixDeltaPhiDeltaEtaCharged);
2578 new TH2F("hMixXECharged","Mixed event : #it{x}_{#it{E}} for charged tracks",
2579 nptbins,ptmin,ptmax,200,0.,2.);
2580 fhMixXECharged->SetYTitle("#it{x}_{#it{E}}");
2581 fhMixXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2582 outputContainer->Add(fhMixXECharged);
2585 new TH2F("hMixXEUeCharged","Mixed event : #it{x}_{#it{E}} for charged tracks in Ue region",
2586 nptbins,ptmin,ptmax,200,0.,2.);
2587 fhMixXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
2588 fhMixXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2589 outputContainer->Add(fhMixXEUeCharged);
2592 new TH2F("hMixHbpXECharged","mixed event : #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
2593 nptbins,ptmin,ptmax,200,0.,10.);
2594 fhMixHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2595 fhMixHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2596 outputContainer->Add(fhMixHbpXECharged);
2598 fhMixDeltaPhiChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2599 fhMixDeltaPhiChargedAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
2600 fhMixDeltaPhiChargedAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
2601 fhMixDeltaPhiDeltaEtaChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2603 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2605 for(Int_t z = 0 ; z < nz ; z++)
2611 sz = Form("_vz%d",z);
2612 tz = Form(", #it{v}_{#it{z}} bin %d",z);
2615 //printf("MIX : iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
2617 fhMixDeltaPhiChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2618 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()),
2619 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2620 fhMixDeltaPhiChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2621 fhMixDeltaPhiChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
2623 fhMixDeltaPhiChargedAssocPtBinDEta08[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0.8ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2624 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()),
2625 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2626 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2627 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
2629 fhMixDeltaPhiChargedAssocPtBinDEta0[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2630 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()),
2631 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2632 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2633 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
2635 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiDeltaEtaChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2636 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()),
2637 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2638 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
2639 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetYTitle("#Delta #eta");
2641 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBin[bin]);
2642 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta08[bin]);
2643 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta0[bin]);
2644 outputContainer->Add(fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]);
2649 return outputContainer;
2653 //_________________________________________________________________________________________________
2654 Bool_t AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum(const AliAODPWG4Particle* trigger,
2655 TLorentzVector & mom1,
2656 TLorentzVector & mom2)
2658 // Get the momentum of the pi0/eta assigned decay photons
2659 // In case of pi0/eta trigger, we may want to check their decay correlation,
2660 // get their decay children
2662 Int_t indexPhoton1 = trigger->GetCaloLabel(0);
2663 Int_t indexPhoton2 = trigger->GetCaloLabel(1);
2664 Float_t ptTrig = trigger->Pt();
2666 if(indexPhoton1!=-1 || indexPhoton2!=-1) return kFALSE;
2669 printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - indexPhoton1 = %d, indexPhoton2 = %d \n", indexPhoton1, indexPhoton2);
2671 TObjArray * clusters = 0x0 ;
2672 if(trigger->GetDetector()=="EMCAL") clusters = GetEMCALClusters() ;
2673 else clusters = GetPHOSClusters() ;
2675 for(Int_t iclus = 0; iclus < clusters->GetEntriesFast(); iclus++)
2677 AliVCluster * photon = (AliVCluster*) (clusters->At(iclus));
2678 if(photon->GetID()==indexPhoton1)
2680 photon->GetMomentum(mom1,GetVertex(0)) ;
2681 if(ptTrig) fhPtPi0DecayRatio->Fill(ptTrig, mom1.Pt()/ptTrig);
2683 if(photon->GetID()==indexPhoton2)
2685 photon->GetMomentum(mom1,GetVertex(0)) ;
2686 if(ptTrig > 0) fhPtPi0DecayRatio->Fill(ptTrig, mom2.Pt()/ptTrig);
2689 if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - Photon1 = %f, Photon2 = %f \n", mom1.Pt(), mom2.Pt());
2697 //_____________________________________________________________
2698 Int_t AliAnaParticleHadronCorrelation::GetMCTagHistogramIndex(Int_t mcTag)
2700 // Index of MC histograms depending on MC origin
2702 if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPrompt) ||
2703 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCFragmentation)) return 0;
2704 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0)) return 1;
2705 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0Decay)) return 2;
2706 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEtaDecay)) return 3;
2707 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCOtherDecay)) return 4;
2708 else if(!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron)) return 5;
2713 //_________________________________________
2714 void AliAnaParticleHadronCorrelation::Init()
2719 if(!GetReader()->IsCTSSwitchedOn())
2720 AliFatal("STOP!: You want to use CTS tracks in analysis but not read!! \n!!Check the configuration file!!\n");
2725 //____________________________________________________
2726 void AliAnaParticleHadronCorrelation::InitParameters()
2729 //Initialize the parameters of the analysis.
2730 SetInputAODName("Particle");
2731 SetAODObjArrayName("Hadrons");
2732 AddToHistogramsName("AnaHadronCorr_");
2734 SetPtCutRange(0.,300);
2735 fDeltaPhiMinCut = 1.5 ;
2736 fDeltaPhiMaxCut = 4.5 ;
2737 fSelectIsolated = kFALSE;
2738 fMakeSeveralUE = kFALSE;
2739 fUeDeltaPhiMinCut = 1. ;
2740 fUeDeltaPhiMaxCut = 1.5 ;
2742 fNeutralCorr = kFALSE ;
2743 fPi0Trigger = kFALSE ;
2744 fDecayTrigger = kFALSE ;
2745 fHMPIDCorrelation = kFALSE ;
2747 fMakeAbsoluteLeading = kTRUE;
2748 fMakeNearSideLeading = kFALSE;
2751 fAssocPtBinLimit[0] = 0.2 ;
2752 fAssocPtBinLimit[1] = 0.5 ;
2753 fAssocPtBinLimit[2] = 1.0 ;
2754 fAssocPtBinLimit[3] = 2.0 ;
2755 fAssocPtBinLimit[4] = 3.0 ;
2756 fAssocPtBinLimit[5] = 4.0 ;
2757 fAssocPtBinLimit[6] = 5.0 ;
2758 fAssocPtBinLimit[7] = 6.0 ;
2759 fAssocPtBinLimit[8] = 7.0 ;
2760 fAssocPtBinLimit[9] = 8.0 ;
2761 fAssocPtBinLimit[10] = 9.0 ;
2762 fAssocPtBinLimit[11] = 10.0 ;
2763 fAssocPtBinLimit[12] = 12.0 ;
2764 fAssocPtBinLimit[13] = 14.0 ;
2765 fAssocPtBinLimit[14] = 16.0 ;
2766 fAssocPtBinLimit[15] = 20.0 ;
2767 fAssocPtBinLimit[16] = 30.0 ;
2768 fAssocPtBinLimit[17] = 40.0 ;
2769 fAssocPtBinLimit[18] = 50.0 ;
2770 fAssocPtBinLimit[19] = 200.0 ;
2772 fUseMixStoredInReader = kTRUE;
2777 fSelectLeadingHadronAngle = kFALSE;
2778 fMinLeadHadPhi = 150*TMath::DegToRad();
2779 fMaxLeadHadPhi = 210*TMath::DegToRad();
2782 fMaxLeadHadPt = 100;
2786 //_________________________________________________________________________
2787 Bool_t AliAnaParticleHadronCorrelation::IsTriggerTheEventLeadingParticle()
2789 // Check if the what of the selected triggers is leading particle comparing
2790 // with all the triggers, all the tracks or all the clusters (if requested for the clusters).
2792 Double_t ptTrig = fMinTriggerPt ;
2793 Double_t phiTrig = 0 ;
2794 fLeadingTriggerIndex =-1 ;
2796 AliAODPWG4ParticleCorrelation* pLeading = 0;
2798 // Loop on stored AOD particles, find leading trigger on the selected list, with at least min pT.
2800 for(Int_t iaod = 0; iaod < GetInputAODBranch()->GetEntriesFast() ; iaod++)
2802 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
2804 // Vertex cut in case of mixing
2805 Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0));
2806 if(check == 0) continue;
2807 if(check == -1) return kFALSE; // not sure if it is correct.
2809 // find the leading particles with highest momentum
2810 if (particle->Pt() > ptTrig)
2812 ptTrig = particle->Pt() ;
2813 phiTrig = particle->Phi();
2815 pLeading = particle ;
2817 }// finish search of leading trigger particle on the AOD branch.
2819 if(index < 0) return kFALSE;
2821 //printf("AOD leading pT %2.2f, ID %d\n", pLeading->Pt(),pLeading->GetCaloLabel(0));
2823 if(phiTrig < 0 ) phiTrig += TMath::TwoPi();
2825 // Compare if it is the leading of all tracks
2828 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
2830 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
2832 if(track->GetID() == pLeading->GetTrackLabel(0) || track->GetID() == pLeading->GetTrackLabel(1) ||
2833 track->GetID() == pLeading->GetTrackLabel(2) || track->GetID() == pLeading->GetTrackLabel(3) ) continue ;
2835 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
2836 p3.SetXYZ(mom[0],mom[1],mom[2]);
2837 Float_t pt = p3.Pt();
2838 Float_t phi = p3.Phi() ;
2839 if(phi < 0) phi+=TMath::TwoPi();
2841 //jump out this event if near side associated particle pt larger than trigger
2842 if (fMakeNearSideLeading)
2844 if(pt > ptTrig && TMath::Abs(phi-phiTrig) < TMath::PiOver2()) return kFALSE;
2846 //jump out this event if there is any other particle with pt larger than trigger
2849 if(pt > ptTrig) return kFALSE ;
2853 // Compare if it is leading of all calorimeter clusters
2855 if(fCheckLeadingWithNeutralClusters)
2857 // Select the calorimeter cluster list
2858 TObjArray * nePl = 0x0;
2859 if (pLeading->GetDetector() == "PHOS" )
2860 nePl = GetPHOSClusters();
2862 nePl = GetEMCALClusters();
2864 if(!nePl) return kTRUE; // Do the selection just with the tracks if no calorimeter is available.
2867 for(Int_t ipr = 0;ipr < nePl->GetEntriesFast() ; ipr ++ )
2869 AliVCluster * cluster = (AliVCluster *) (nePl->At(ipr)) ;
2871 if(cluster->GetID() == pLeading->GetCaloLabel(0) || cluster->GetID() == pLeading->GetCaloLabel(1) ) continue ;
2873 cluster->GetMomentum(lv,GetVertex(0));
2875 Float_t pt = lv.Pt();
2876 Float_t phi = lv.Phi() ;
2877 if(phi < 0) phi+=TMath::TwoPi();
2879 if(IsTrackMatched(cluster,GetReader()->GetInputEvent())) continue ; // avoid charged clusters, already covered by tracks, or cluster merging with track.
2881 //jump out this event if near side associated particle pt larger than trigger
2882 // not really needed for calorimeter, unless DCal is included
2883 if (fMakeNearSideLeading)
2885 if(pt > ptTrig && TMath::Abs(phi-phiTrig) < TMath::PiOver2()) return kFALSE ;
2887 //jump out this event if there is any other particle with pt larger than trigger
2890 if(pt > ptTrig) return kFALSE ;
2893 } // check neutral clusters
2895 fLeadingTriggerIndex = index ;
2897 if( GetDebug() > 1 ) printf("\t particle AOD with index %d is leading with pT %2.2f\n", fLeadingTriggerIndex, pLeading->Pt());
2903 //_________________________________________________________________
2904 void AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms()
2906 //Particle-Hadron Correlation Analysis, fill histograms
2908 if(!GetInputAODBranch())
2910 AliFatal(Form("No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data()));
2911 return ; // coverity
2914 Int_t naod = GetInputAODBranch()->GetEntriesFast();
2918 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - No particle AOD found! \n");
2920 return ; // no trigger particles found.
2925 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Begin hadron correlation analysis, fill histograms \n");
2926 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In particle branch aod entries %d\n", naod);
2927 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In CTS aod entries %d\n", GetCTSTracks()->GetEntriesFast());
2930 //---------------------------------------------------
2931 // Loop on stored AOD particles, find leading trigger
2933 Bool_t leading = IsTriggerTheEventLeadingParticle();
2936 printf("\t AOD Leading trigger? %d, with index %d\n",leading,fLeadingTriggerIndex);
2938 //-----------------------------------------
2939 // Fill Leading trigger related histograms
2940 //-----------------------------------------
2941 if(( !leading || fLeadingTriggerIndex < 0 ) &&
2942 ( fMakeAbsoluteLeading || fMakeNearSideLeading ) )
2944 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Leading not found\n");
2948 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(fLeadingTriggerIndex));
2950 particle->SetLeadingParticle(leading);
2952 Float_t pt = particle->Pt();
2953 fhPtTriggerInput->Fill(pt);
2955 // check if it was a calorimeter cluster and if the SS cut was requested, if so, apply it
2956 Int_t clID1 = particle->GetCaloLabel(0) ;
2957 Int_t clID2 = particle->GetCaloLabel(1) ; // for photon clusters should not be set.
2958 //printf("Leading for for %s: id1 %d, id2 %d, min %f, max %f, det %s\n",
2959 // GetInputAODName().Data(),clID1,clID2,fM02MinCut,fM02MaxCut,(particle->GetDetector()).Data());
2962 // if requested, do the rejection of clusters out of a shower shape window
2963 // not needed if already done at the particle identification level, but for isolation
2964 // studies, it is preferred not to remove so we do it here
2965 if(clID1 > 0 && clID2 < 0 && fM02MaxCut > 0 && fM02MinCut > 0)
2968 TObjArray* clusters = 0x0;
2969 if (particle->GetDetector() == "EMCAL") clusters = GetEMCALClusters();
2970 else if(particle->GetDetector() == "PHOS" ) clusters = GetPHOSClusters();
2974 AliVCluster *cluster = FindCluster(clusters,clID1,iclus);
2975 Float_t m02 = cluster->GetM02();
2976 if(m02 > fM02MaxCut || m02 < fM02MinCut) return ;
2979 fhPtTriggerSSCut->Fill(pt);
2982 // Check if the particle is isolated or if we want to take the isolation into account
2985 if( !particle->IsIsolated() ) return;
2986 fhPtTriggerIsoCut->Fill(pt);
2989 // Check if trigger is in fiducial region
2990 if(IsFiducialCutOn())
2992 Bool_t in = GetFiducialCut()->IsInFiducialCut(*particle->Momentum(),particle->GetDetector()) ;
2996 fhPtTriggerFidCut->Fill(pt);
2998 // Make correlation with charged hadrons
3000 Bool_t okcharged = MakeChargedCorrelation(particle, GetCTSTracks());
3002 MakeMCChargedCorrelation(particle);
3004 Bool_t okneutral = kTRUE;
3005 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); //For the future, foresee more possible pi0 lists
3006 if(fNeutralCorr && pi0list)
3008 if(pi0list->GetEntriesFast() > 0)
3009 okneutral = MakeNeutralCorrelation(particle, pi0list);
3012 // If the correlation or the finding of the leading did not succeed.
3013 if(!okcharged || !okneutral) return ;
3015 // Fill leading particle histogram if correlation went well and
3016 // no problem was found, like not absolute leading, or bad vertex in mixing.
3018 // pT of the leading, vs leading origin if MC
3019 fhPtLeading->Fill(pt);
3023 Int_t mcIndex = GetMCTagHistogramIndex(particle->GetTag());
3024 fhPtLeadingMC[mcIndex]->Fill(pt);
3027 // Acceptance of the leading
3028 Float_t phi = particle->Phi();
3029 if( phi<0 ) phi+=TMath::TwoPi();
3030 fhPhiLeading->Fill(pt, phi);
3032 fhEtaLeading->Fill(pt, particle->Eta());
3033 //printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Leading particle : pt %f, eta %f, phi %f\n",particle->Pt(),particle->Eta(),phi);
3035 //----------------------------------
3036 // Leading particle pT vs event bins
3038 fhPtLeadingBin->Fill(pt,GetEventMixBin());
3039 if(fCorrelVzBin) fhPtLeadingVzBin->Fill(pt,GetEventVzBin());
3041 Float_t cen = GetEventCentrality();
3042 Float_t ep = GetEventPlaneAngle();
3044 fhPtLeadingCentrality ->Fill(pt,cen);
3045 fhPtLeadingEventPlane ->Fill(pt,ep);
3046 fhLeadingEventPlaneCentrality->Fill(cen,ep);
3048 //----------------------------------
3049 // Leading particle pT vs pile-up
3051 if(fFillPileUpHistograms)
3053 Int_t vtxBC = GetReader()->GetVertexBC();
3054 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA) fhPtLeadingVtxBC0->Fill(pt);
3056 if(GetReader()->IsPileUpFromSPD()) fhPtLeadingPileUp[0]->Fill(pt);
3057 if(GetReader()->IsPileUpFromEMCal()) fhPtLeadingPileUp[1]->Fill(pt);
3058 if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtLeadingPileUp[2]->Fill(pt);
3059 if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtLeadingPileUp[3]->Fill(pt);
3060 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtLeadingPileUp[4]->Fill(pt);
3061 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtLeadingPileUp[5]->Fill(pt);
3062 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtLeadingPileUp[6]->Fill(pt);
3065 //Reinit for next event
3066 fLeadingTriggerIndex = -1;
3068 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - End fill histograms \n");
3071 //___________________________________________________________________________________________________________
3072 Bool_t AliAnaParticleHadronCorrelation::MakeChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle,
3073 const TObjArray* pl)
3075 // Charged Hadron Correlation Analysis
3077 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Make trigger particle - charged hadron correlation \n");
3079 Float_t phiTrig = aodParticle->Phi();
3080 Float_t etaTrig = aodParticle->Eta();
3081 Float_t ptTrig = aodParticle->Pt();
3082 Bool_t decay = aodParticle->IsTagged();
3083 Int_t mcTag = aodParticle->GetTag();
3084 Double_t bz = GetReader()->GetInputEvent()->GetMagneticField();
3086 Float_t pt = -100. ;
3087 Float_t zT = -100. ;
3088 Float_t xE = -100. ;
3089 Float_t hbpXE = -100. ;
3090 Float_t hbpZT = -100. ;
3091 Float_t phi = -100. ;
3092 Float_t eta = -100. ;
3093 Float_t pout = -100. ;
3094 Float_t deltaPhi = -100. ;
3095 Float_t ptLeadHad = -100 ;
3096 Float_t phiLeadHad = -100 ;
3099 TLorentzVector photonMom ;
3100 TObjArray * reftracks = 0x0;
3102 Int_t nTracks = GetCTSTracks()->GetEntriesFast() ;
3104 // Mixed event settings
3105 Int_t evtIndex11 = -1 ; // cluster trigger or pi0 trigger
3106 Int_t evtIndex12 = -1 ; // pi0 trigger
3107 Int_t evtIndex13 = -1 ; // charged trigger
3109 Double_t v[3] = {0,0,0}; //vertex ;
3110 GetReader()->GetVertex(v);
3112 if (GetMixedEvent())
3114 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
3115 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
3116 evtIndex13 = GetMixedEvent()->EventIndex(aodParticle->GetTrackLabel(0)) ;
3119 // In case of pi0/eta trigger, we may want to check their decay correlation,
3120 // get their decay children
3121 TLorentzVector decayMom1;
3122 TLorentzVector decayMom2;
3123 Bool_t decayFound = kFALSE;
3124 if( fPi0Trigger ) decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
3126 //-----------------------------------------------------------------------
3127 // Track loop, select tracks with good pt, phi and fill AODs or histograms
3128 //-----------------------------------------------------------------------
3130 // select events where the leading particle in the opposite hemisphere to the trigger particle is
3131 // is in a window centered at 180 from the trigger
3132 // Find the leading hadron
3133 if(fSelectLeadingHadronAngle)
3135 for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ )
3137 AliVTrack * track = (AliVTrack *) (pl->At(ipr)) ;
3138 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
3139 p3.SetXYZ(mom[0],mom[1],mom[2]);
3143 if(pt > ptLeadHad && TMath::Abs(phi-phiTrig) > TMath::PiOver2())
3151 if( ptLeadHad < fMinLeadHadPt ||
3152 ptLeadHad > fMaxLeadHadPt ) return kFALSE;
3154 if( TMath::Abs(phiLeadHad-phiTrig) < fMinLeadHadPhi ||
3155 TMath::Abs(phiLeadHad-phiTrig) > fMaxLeadHadPhi ) return kFALSE;
3157 }// select leading hadron
3159 for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ )
3161 AliVTrack * track = (AliVTrack *) (pl->At(ipr)) ;
3163 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
3164 p3.SetXYZ(mom[0],mom[1],mom[2]);
3168 if(phi < 0) phi+=TMath::TwoPi();
3170 //Select only hadrons in pt range
3171 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
3173 //remove trigger itself for correlation when use charged triggers
3174 if( track->GetID() == aodParticle->GetTrackLabel(0) || track->GetID() == aodParticle->GetTrackLabel(1) ||
3175 track->GetID() == aodParticle->GetTrackLabel(2) || track->GetID() == aodParticle->GetTrackLabel(3) )
3178 //Only for mixed event
3179 Int_t evtIndex2 = 0 ;
3180 if (GetMixedEvent())
3182 evtIndex2 = GetMixedEvent()->EventIndex(track->GetID()) ;
3183 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 || evtIndex13 == evtIndex2 ) // photon and track from different events
3186 if (TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut())
3193 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
3195 // Set the pt associated bin for the defined bins
3196 Int_t assocBin = -1;
3197 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3199 if(pt > fAssocPtBinLimit[i] && pt < fAssocPtBinLimit[i+1]) assocBin= i;
3202 // Assign to the histogram array a bin corresponding to a combination of pTa and vz bins
3208 nz = GetNZvertBin();
3209 vz = GetEventVzBin();
3212 Int_t bin = assocBin*nz+vz;
3214 //printf("assoc Bin = %d, vZ bin = %d, bin = %d \n", assocBin,GetEventVzBin(),bin);
3216 ULong_t status = track->GetStatus();
3217 Bool_t okTOF = ( (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ) ;
3218 //Double32_t tof = track->GetTOFsignal()*1e-3;
3219 Int_t trackBC = track->GetTOFBunchCrossing(bz);
3222 if (okTOF && trackBC!=0) outTOF = 1;
3223 else if(okTOF && trackBC==0) outTOF = 0;
3226 // calculate deltaPhi for later, shift when needed
3227 FillChargedAngularCorrelationHistograms(pt, ptTrig, bin, phi, phiTrig, deltaPhi,
3228 eta, etaTrig, decay, track->GetHMPIDsignal(),outTOF,nTracks,mcTag);
3230 // Imbalance zT/xE/pOut
3232 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
3235 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3236 //if(xE <0.)xE =-xE;
3237 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3240 pout = pt*TMath::Sin(deltaPhi) ;
3242 //delta phi cut for momentum imbalance correlation
3243 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
3246 FillChargedMomentumImbalanceHistograms(ptTrig, pt, xE, hbpXE, zT, hbpZT, pout, deltaPhi,
3247 nTracks, track->Charge(), bin, decay,outTOF,mcTag);
3251 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3254 FillChargedUnderlyingEventHistograms(ptTrig, pt, deltaPhi, nTracks,outTOF);
3256 fhUePart->Fill(ptTrig);
3260 if(fPi0Trigger && decayFound)
3261 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2, kTRUE) ;
3263 //several UE calculation
3264 if(fMakeSeveralUE) FillChargedUnderlyingEventSidesHistograms(ptTrig,pt,deltaPhi);
3266 if(fFillAODWithReferences)
3268 printf("Add references\n");
3272 reftracks = new TObjArray(0);
3273 TString trackname = Form("%sTracks", GetAODObjArrayName().Data());
3274 reftracks->SetName(trackname.Data());
3275 reftracks->SetOwner(kFALSE);
3278 reftracks->Add(track);
3279 }// reference track to AOD
3282 //Fill AOD with reference tracks, if not filling histograms
3283 if(fFillAODWithReferences && reftracks)
3285 aodParticle->AddObjArray(reftracks);
3288 //Own mixed event, add event and remove previous or fill the mixed histograms
3291 MakeChargedMixCorrelation(aodParticle);
3299 //_________________________________________________________________________________________________________
3300 void AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
3302 // Mix current trigger with tracks in another MB event
3304 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Make trigger particle - charged hadron mixed event correlation \n");
3306 if(GetMixedEvent()) return; // This is not the mixed event from general mixing frame
3308 // Get the event with similar caracteristics
3309 //printf("MakeChargedMixCorrelation for %s\n",GetInputAODName().Data());
3311 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
3313 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
3315 if(!inputHandler) return;
3317 if(!(inputHandler->IsEventSelected( ) & GetReader()->GetEventTriggerMask())) return;
3319 // Get the pool, check if it exits
3320 Int_t eventBin = GetEventMixBin();
3322 fhEventBin->Fill(eventBin);
3324 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
3325 if(eventBin < 0) return;
3328 TList * poolCalo = 0;
3329 if(fUseMixStoredInReader)
3331 pool = GetReader()->GetListWithMixedEventsForTracks(eventBin);
3332 if(OnlyIsolated() || fFillNeutralEventMixPool) poolCalo = GetReader()->GetListWithMixedEventsForCalo (eventBin);
3336 pool = fListMixTrackEvents[eventBin];
3337 if(OnlyIsolated() || fFillNeutralEventMixPool) poolCalo = fListMixCaloEvents [eventBin];
3342 if((OnlyIsolated() || fFillNeutralEventMixPool ) && !poolCalo &&
3343 (GetIsolationCut()->GetParticleTypeInCone()!=AliIsolationCut::AliIsolationCut::kOnlyCharged))
3344 printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Careful, cluster pool not available\n");
3346 Double_t ptTrig = aodParticle->Pt();
3347 Double_t etaTrig = aodParticle->Eta();
3348 Double_t phiTrig = aodParticle->Phi();
3349 if(phiTrig < 0.) phiTrig+=TMath::TwoPi();
3352 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Pool bin %d size %d, leading trigger pt=%f, phi=%f, eta=%f\n",
3353 eventBin,pool->GetSize(), ptTrig,phiTrig,etaTrig);
3355 Double_t ptAssoc = -999.;
3356 Double_t phiAssoc = -999.;
3357 Double_t etaAssoc = -999.;
3358 Double_t deltaPhi = -999.;
3359 Double_t deltaEta = -999.;
3360 Double_t xE = -999.;
3361 Double_t hbpXE = -999.;
3363 //Start from first event in pool except if in this same event the pool was filled
3365 if(GetReader()->GetLastTracksMixedEvent() == GetEventNumber()) ev0 = 1;
3367 for(Int_t ev=ev0; ev < pool->GetSize(); ev++)
3369 TObjArray* bgTracks = static_cast<TObjArray*>(pool->At(ev));
3370 TObjArray* bgCalo = 0;
3372 // Check if the particle is isolated in the mixed event, it not, do not fill the histograms
3373 if((OnlyIsolated() || fFillNeutralEventMixPool) && poolCalo)
3375 if(pool->GetSize()!=poolCalo->GetSize())
3376 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Different size of calo and track pools\n");
3378 bgCalo = static_cast<TObjArray*>(poolCalo->At(ev));
3381 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Event %d in calo pool not available?\n",ev);
3385 Int_t n=0; Int_t nfrac = 0; Bool_t isolated = kFALSE; Float_t coneptsum = 0;
3386 GetIsolationCut()->MakeIsolationCut(bgTracks,bgCalo,
3387 GetReader(), GetCaloPID(),
3388 kFALSE, aodParticle, "",
3389 n,nfrac,coneptsum, isolated);
3391 //printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Isolated? %d - cone %f, ptthres %f",
3392 // isolated,GetIsolationCut()->GetConeSize(),GetIsolationCut()->GetPtThreshold());
3393 //if(bgTracks)printf(" - n track %d", bgTracks->GetEntriesFast());
3396 if(!isolated) continue ;
3400 fhEventMixBin->Fill(eventBin);
3402 Int_t nTracks=bgTracks->GetEntriesFast();
3403 //printf("\t Read Pool event %d, nTracks %d\n",ev,nTracks);
3405 //Check if it is leading if mixed event
3406 if(fMakeNearSideLeading || fMakeAbsoluteLeading)
3408 Bool_t leading = kTRUE;
3409 for(Int_t jlead = 0;jlead <nTracks; jlead++ )
3411 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(jlead) ;
3413 ptAssoc = track->Pt();
3414 phiAssoc = track->Phi() ;
3416 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3417 if (fMakeNearSideLeading)
3419 if(ptAssoc > ptTrig && TMath::Abs(phiAssoc-phiTrig) < TMath::PiOver2())
3425 //jump out this event if there is any other particle with pt larger than trigger
3426 else if(fMakeAbsoluteLeading)
3428 if(ptAssoc > ptTrig)
3436 if(fFillNeutralEventMixPool && bgCalo)
3438 Int_t nClusters=bgCalo->GetEntriesFast();
3439 TLorentzVector mom ;
3440 for(Int_t jlead = 0;jlead <nClusters; jlead++ )
3442 AliAODPWG4Particle *cluster= (AliAODPWG4Particle*) bgCalo->At(jlead) ;
3444 ptAssoc = cluster->Pt();
3445 phiAssoc = cluster->Phi() ;
3447 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3448 if (fMakeNearSideLeading)
3450 if(ptAssoc > ptTrig && TMath::Abs(phiAssoc-phiTrig) < TMath::PiOver2())
3456 //jump out this event if there is any other particle with pt larger than trigger
3457 else if(fMakeAbsoluteLeading)
3459 if(ptAssoc > ptTrig)
3468 if(!leading) continue; // not leading, check the next event in pool
3472 fhPtLeadingMixed ->Fill(ptTrig);
3473 fhPhiLeadingMixed ->Fill(ptTrig, phiTrig);
3474 fhEtaLeadingMixed ->Fill(ptTrig, etaTrig);
3475 fhPtLeadingMixedBin->Fill(ptTrig,eventBin);
3476 if(fCorrelVzBin)fhPtLeadingMixedVzBin->Fill(ptTrig, GetEventVzBin());
3478 for(Int_t j1 = 0;j1 <nTracks; j1++ )
3480 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(j1) ;
3482 if(!track) continue;
3484 ptAssoc = track->Pt();
3485 etaAssoc = track->Eta();
3486 phiAssoc = track->Phi() ;
3487 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3489 if(IsFiducialCutOn())
3491 Bool_t in = GetFiducialCut()->IsInFiducialCut(*aodParticle->Momentum(),"CTS") ;
3495 deltaPhi = phiTrig-phiAssoc;
3496 if(deltaPhi < -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3497 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3498 deltaEta = etaTrig-etaAssoc;
3501 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation(): deltaPhi= %f, deltaEta=%f\n",deltaPhi, deltaEta);
3503 // Set the pt associated bin for the defined bins
3504 Int_t assocBin = -1;
3505 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3507 if(ptAssoc > fAssocPtBinLimit[i] && ptAssoc < fAssocPtBinLimit[i+1]) assocBin= i;
3510 // Assign to the histogram array a bin corresponding to a combination of pTa and vz bins
3516 nz = GetNZvertBin();
3517 vz = GetEventVzBin();
3520 Int_t bin = assocBin*nz+vz;
3522 fhMixDeltaPhiCharged ->Fill(ptTrig, deltaPhi);
3523 fhMixDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
3525 fhMixDeltaPhiCharged ->Fill(ptTrig, deltaPhi);
3526 fhMixDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
3528 xE =-ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3529 //if(xE <0.)xE =-xE;
3530 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3533 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
3535 fhMixXECharged->Fill(ptTrig,xE);
3536 fhMixHbpXECharged->Fill(ptTrig,hbpXE);
3539 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3541 //Underlying event region
3542 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
3543 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
3545 if(uexE < 0.) uexE = -uexE;
3547 fhMixXEUeCharged->Fill(ptTrig,uexE);
3550 if(bin < 0) continue ; // this pt bin was not considered
3552 if(TMath::Abs(deltaEta) > 0.8)
3553 fhMixDeltaPhiChargedAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
3554 if(TMath::Abs(deltaEta) < 0.01)
3555 fhMixDeltaPhiChargedAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
3557 fhMixDeltaPhiChargedAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
3558 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->Fill(deltaPhi, deltaEta);
3561 } // mixed event loop
3565 //___________________________________________________________________________________________________________
3566 Bool_t AliAnaParticleHadronCorrelation::MakeNeutralCorrelation(AliAODPWG4ParticleCorrelation * aodParticle,
3567 const TObjArray* pi0list)
3569 // Neutral Pion Correlation Analysis
3570 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Make trigger particle - pi0 correlation, %d pi0's \n",
3571 pi0list->GetEntriesFast());
3573 Int_t evtIndex11 = 0 ;
3574 Int_t evtIndex12 = 0 ;
3575 if (GetMixedEvent())
3577 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
3578 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
3581 Float_t pt = -100. ;
3582 // Float_t zT = -100. ;
3583 Float_t phi = -100. ;
3584 Float_t eta = -100. ;
3585 Float_t xE = -100. ;
3586 Float_t hbpXE= -100. ;
3587 //Float_t hbpZT= -100. ;
3589 Float_t ptTrig = aodParticle->Pt();
3590 Float_t phiTrig = aodParticle->Phi();
3591 Float_t etaTrig = aodParticle->Eta();
3592 Float_t deltaPhi= -100. ;
3594 TLorentzVector photonMom ;
3596 // In case of pi0/eta trigger, we may want to check their decay correlation,
3597 // get their decay children
3598 TLorentzVector decayMom1;
3599 TLorentzVector decayMom2;
3600 Bool_t decayFound = kFALSE;
3601 if(fPi0Trigger) decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
3603 TObjArray * refpi0 = 0x0;
3606 //Loop on stored AOD pi0
3608 Int_t naod = pi0list->GetEntriesFast();
3610 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillHistograms() - aod branch entries %d\n", naod);
3612 for(Int_t iaod = 0; iaod < naod ; iaod++)
3614 AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (pi0list->At(iaod));
3616 Int_t evtIndex2 = 0 ;
3617 Int_t evtIndex3 = 0 ;
3618 if (GetMixedEvent())
3620 evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(0)) ;
3621 evtIndex3 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(1)) ;
3623 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 ||
3624 evtIndex11 == evtIndex3 || evtIndex12 == evtIndex3) // trigger and pi0 are not from different events
3630 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
3635 FillNeutralAngularCorrelationHistograms(pt, ptTrig, phi, phiTrig, deltaPhi, eta, etaTrig);
3638 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3640 //if(xE <0.)xE =-xE;
3645 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3646 //if(zT > 0 ) hbpZT = TMath::Log(1./zT);
3648 if(fPi0Trigger && decayFound)
3649 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2,kFALSE) ;
3651 //delta phi cut for correlation
3652 if( (deltaPhi > fDeltaPhiMinCut) && ( deltaPhi < fDeltaPhiMaxCut) )
3654 fhDeltaPhiNeutralPt->Fill(pt,deltaPhi);
3655 fhXENeutral ->Fill(ptTrig,xE);
3656 fhPtHbpXENeutral ->Fill(ptTrig,hbpXE);
3658 else if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3660 fhDeltaPhiUeNeutralPt->Fill(pt,deltaPhi);
3661 fhXEUeNeutral ->Fill(ptTrig,xE);
3662 fhPtHbpXEUeNeutral ->Fill(ptTrig,hbpXE);
3665 //several UE calculation
3666 if(fMakeSeveralUE) FillChargedUnderlyingEventSidesHistograms(ptTrig,pt,deltaPhi);
3668 if(fFillAODWithReferences)
3673 refpi0 = new TObjArray(0);
3674 refpi0->SetName(GetAODObjArrayName()+"Pi0s");
3675 refpi0->SetOwner(kFALSE);
3678 }//put references in trigger AOD
3681 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Selected neutral for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
3685 //Fill AOD with reference tracks, if not filling histograms
3686 if(fFillAODWithReferences && refpi0)
3688 aodParticle->AddObjArray(refpi0);
3694 //_________________________________________________________________________________________________________
3695 void AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
3697 // Charged Hadron Correlation Analysis with MC information
3699 if ( GetDebug() > 1 )
3700 AliInfo("Make trigger particle - charged hadron correlation in AOD MC level");
3702 AliStack * stack = 0x0 ;
3703 TParticle * primary = 0x0 ;
3704 TClonesArray * mcparticles = 0x0 ;
3705 AliAODMCParticle * aodprimary = 0x0 ;
3707 Double_t eprim = 0 ;
3708 Double_t ptprim = 0 ;
3709 Double_t phiprim = 0 ;
3710 Double_t etaprim = 0 ;
3712 Int_t iParticle = 0 ;
3714 Bool_t lead = kFALSE;
3716 Int_t label= aodParticle->GetLabel();
3719 if( GetDebug() > 0 ) AliInfo(Form(" *** bad label ***: label %d", label));
3723 if( GetReader()->ReadStack() )
3725 stack = GetMCStack() ;
3728 AliFatal("Stack not available, is the MC handler called? STOP");
3732 //nTracks = stack->GetNtrack() ;
3733 nTracks = stack->GetNprimary();
3734 if( label >= stack->GetNtrack() )
3737 AliInfo(Form("*** large label ***: label %d, n tracks %d", label, stack->GetNtrack()));
3741 primary = stack->Particle(label);
3744 AliInfo(Form(" *** no primary ***: label %d", label));
3748 eprim = primary->Energy();
3749 ptprim = primary->Pt();
3750 phiprim = primary->Phi();
3751 etaprim = primary->Eta();
3753 if(ptprim < 0.01 || eprim < 0.01) return ;
3755 for (iParticle = 0 ; iParticle < nTracks ; iParticle++)
3757 TParticle * particle = stack->Particle(iParticle);
3758 TLorentzVector momentum;
3760 //keep only final state particles
3761 if( particle->GetStatusCode() != 1 ) continue ;
3763 if ( particle->Pt() < GetReader()->GetCTSPtMin()) continue;
3765 //---------- Charged particles ----------------------
3766 Int_t pdg = particle->GetPdgCode();
3767 Int_t charge = (Int_t) TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
3768 if(charge == 0) continue;
3770 particle->Momentum(momentum);
3772 //Particles in CTS acceptance, make sure to use the same selection as in the reader
3773 Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
3774 //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,momentum.Pt(),momentum.Eta(),momentum.Phi()*TMath::RadToDeg());
3775 if( !inCTS ) continue;
3777 // Remove conversions
3778 if ( TMath::Abs(pdg) == 11 && stack->Particle(particle->GetFirstMother())->GetPdgCode() == 22 ) continue ;
3780 if ( label == iParticle ) continue; // avoid trigger particle
3782 lead = FillChargedMCCorrelationHistograms(particle->Pt(),particle->Phi(),particle->Eta(),ptprim,phiprim,etaprim);
3783 if ( !lead ) return;
3789 else if( GetReader()->ReadAODMCParticles() )
3791 //Get the list of MC particles
3792 mcparticles = GetReader()->GetAODMCParticles();
3793 if( !mcparticles ) return;
3795 nTracks = mcparticles->GetEntriesFast() ;
3797 if( label >= nTracks )
3800 AliInfo(Form(" *** large label ***: label %d, n tracks %d", label,nTracks));
3805 aodprimary = (AliAODMCParticle*) mcparticles->At(label);
3808 AliInfo(Form(" *** no AOD primary ***: label %d", label));
3812 ptprim = aodprimary->Pt();
3813 phiprim = aodprimary->Phi();
3814 etaprim = aodprimary->Eta();
3815 eprim = aodprimary->E();
3817 if(ptprim < 0.01 || eprim < 0.01) return ;
3819 for (iParticle = 0; iParticle < nTracks; iParticle++)
3821 AliAODMCParticle *part = (AliAODMCParticle*) mcparticles->At(iParticle);
3823 if (!part->IsPhysicalPrimary() ) continue; // same as part->GetStatus() !=1
3825 if ( part->Charge() == 0 ) continue;
3827 if ( part->Pt() < GetReader()->GetCTSPtMin()) continue;
3829 TLorentzVector momentum(part->Px(),part->Py(),part->Pz(),part->E());
3831 //Particles in CTS acceptance, make sure to use the same selection as in the reader
3832 Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
3833 //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,momentum.Pt(),momentum.Eta(),momentum.Phi()*TMath::RadToDeg());
3834 if( !inCTS ) continue;
3836 // Remove conversions
3837 Int_t indexmother = part->GetMother();
3838 if ( indexmother > -1 )
3840 Int_t pdg = part->GetPdgCode();
3841 Int_t mPdg = ((AliAODMCParticle*) mcparticles->At(indexmother)) ->GetPdgCode();
3842 if (TMath::Abs(pdg) == 11 && mPdg == 22) continue;
3845 if ( label == iParticle ) continue; // avoid trigger particle
3847 lead = FillChargedMCCorrelationHistograms(part->Pt(),part->Phi(),part->Eta(),ptprim,phiprim,etaprim);
3848 if ( !lead ) return;
3850 } //MC particle loop
3853 // Leading MC particle histograms
3856 fhMCPtLeading ->Fill(ptprim);
3857 fhMCPhiLeading->Fill(ptprim,phiprim);
3858 fhMCEtaLeading->Fill(ptprim,etaprim);
3862 //_____________________________________________________________________
3863 void AliAnaParticleHadronCorrelation::Print(const Option_t * opt) const
3866 //Print some relevant parameters set for the analysis
3870 printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
3871 AliAnaCaloTrackCorrBaseClass::Print(" ");
3872 printf("Pt trigger > %3.2f\n", fMinTriggerPt) ;
3873 printf("Pt associated hadron < %3.2f\n", fMaxAssocPt) ;
3874 printf("Pt associated hadron > %3.2f\n", fMinAssocPt) ;
3875 printf("Phi trigger particle-Hadron < %3.2f\n", fDeltaPhiMaxCut) ;
3876 printf("Phi trigger particle-Hadron > %3.2f\n", fDeltaPhiMinCut) ;
3877 printf("Phi trigger particle-UeHadron < %3.2f\n", fUeDeltaPhiMaxCut) ;
3878 printf("Phi trigger particle-UeHadron > %3.2f\n", fUeDeltaPhiMinCut) ;
3879 printf("Isolated Trigger? %d\n" , fSelectIsolated) ;
3880 printf("Several UE? %d\n" , fMakeSeveralUE) ;
3881 printf("Name of AOD Pi0 Branch %s \n", fPi0AODBranchName.Data());
3882 printf("Do Decay-hadron correlation ? %d\n", fPi0Trigger) ;
3883 printf("Select absolute leading for cluster triggers ? %d or Near Side %d\n",
3884 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
3885 printf("Trigger pt bins %d\n", fNAssocPtBins) ;
3886 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
3887 printf("\t bin %d = [%2.1f,%2.1f]\n", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
3892 //____________________________________________________________
3893 void AliAnaParticleHadronCorrelation::SetNAssocPtBins(Int_t n)
3895 // Set number of bins
3906 printf("n = larger than 19 or too small, set to 19 \n");
3911 //______________________________________________________________________________
3912 void AliAnaParticleHadronCorrelation::SetAssocPtBinLimit(Int_t ibin, Float_t pt)
3914 // Set the list of limits for the trigger pt bins
3916 if(ibin <= fNAssocPtBins || ibin >= 0)
3918 fAssocPtBinLimit[ibin] = pt ;
3922 printf("AliAnaParticleHadronCorrelation::SetAssocPtBinLimit() - bin number too large %d > %d or small, nothing done\n", ibin, fNAssocPtBins) ;