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(),
64 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),
79 fhPtInput(0), fhPtFidCut(0),
80 fhPtLeading(0), fhPtLeadingVtxBC0(0),
81 fhPtLeadingVzBin(0), fhPtLeadingBin(0),
82 fhPhiLeading(0), fhEtaLeading(0),
84 fhPtLeadingCentrality(0), fhPtLeadingEventPlane(0),
85 fhLeadingEventPlaneCentrality(0),
86 fhPtLeadingMixed(0), fhPtLeadingMixedVzBin(0), fhPtLeadingMixedBin(0),
87 fhPhiLeadingMixed(0), fhEtaLeadingMixed(0),
88 fhDeltaPhiDeltaEtaCharged(0),
89 fhPhiCharged(0), fhEtaCharged(0),
90 fhDeltaPhiCharged(0), fhDeltaEtaCharged(0),
91 fhDeltaPhiChargedPt(0), fhDeltaPhiUeChargedPt(0),
93 fhXECharged(0), fhXEUeCharged(0),
94 fhXEPosCharged(0), fhXENegCharged(0),
95 fhPtHbpXECharged(0), fhPtHbpXEUeCharged(0),
96 fhZTCharged(0), fhZTUeCharged(0),
97 fhZTPosCharged(0), fhZTNegCharged(0),
98 fhPtHbpZTCharged(0), fhPtHbpZTUeCharged(0),
99 fhXEChargedMC(), fhDeltaPhiChargedMC(),
100 fhDeltaPhiDeltaEtaChargedPtA3GeV(0),
101 fhDeltaPhiChargedPtA3GeV(0), fhDeltaEtaChargedPtA3GeV(0),
103 fhDeltaPhiChargedPileUp(), fhDeltaEtaChargedPileUp(),
104 fhDeltaPhiChargedPtA3GeVPileUp(), fhDeltaEtaChargedPtA3GeVPileUp(),
105 fhXEChargedPileUp(), fhXEUeChargedPileUp(),
106 fhZTChargedPileUp(), fhZTUeChargedPileUp(),
107 fhPtTrigChargedPileUp(),
108 fhDeltaPhiChargedOtherBC(), fhDeltaPhiChargedPtA3GeVOtherBC(),
109 fhXEChargedOtherBC(), fhXEUeChargedOtherBC(),
110 fhZTChargedOtherBC(), fhZTUeChargedOtherBC(),
111 fhPtTrigChargedOtherBC(),
112 fhDeltaPhiChargedBC0(), fhDeltaPhiChargedPtA3GeVBC0(),
113 fhXEChargedBC0(), fhXEUeChargedBC0(),
114 fhZTChargedBC0(), fhZTUeChargedBC0(),
115 fhPtTrigChargedBC0(),
116 fhDeltaPhiChargedVtxBC0(), fhDeltaPhiChargedPtA3GeVVtxBC0(),
117 fhXEChargedVtxBC0(), fhXEUeChargedVtxBC0(),
118 fhZTChargedVtxBC0(), fhZTUeChargedVtxBC0(),
119 fhPtTrigChargedVtxBC0(),
120 fhDeltaPhiUeLeftCharged(0), fhDeltaPhiUeRightCharged(0),
121 fhDeltaPhiUeLeftUpCharged(0), fhDeltaPhiUeRightUpCharged(0),
122 fhDeltaPhiUeLeftDownCharged(0), fhDeltaPhiUeRightDownCharged(0),
123 fhXEUeLeftCharged(0), fhXEUeRightCharged(0),
124 fhXEUeLeftUpCharged(0), fhXEUeRightUpCharged(0),
125 fhXEUeLeftDownCharged(0), fhXEUeRightDownCharged(0),
126 fhPtHbpXEUeLeftCharged(0), fhPtHbpXEUeRightCharged(0),
127 fhZTUeLeftCharged(0), fhZTUeRightCharged(0),
128 fhPtHbpZTUeLeftCharged(0), fhPtHbpZTUeRightCharged(0),
129 fhPtTrigPout(0), fhPtTrigCharged(0),
130 fhTrigDeltaPhiCharged(0x0), fhTrigDeltaEtaCharged(0x0),
131 fhTrigXECorr(0x0), fhTrigXEUeCorr(0x0),
132 fhTrigZTCorr(0x0), fhTrigZTUeCorr(0x0),
133 fhAssocPtBkg(0), fhDeltaPhiDeltaEtaAssocPtBin(0),
134 fhDeltaPhiAssocPtBin(0),
135 fhDeltaPhiAssocPtBinDEta08(0), fhDeltaPhiAssocPtBinDEta0(0),
136 fhDeltaPhiAssocPtBinHMPID(0), fhDeltaPhiAssocPtBinHMPIDAcc(0),
137 fhDeltaPhiBradAssocPtBin(0), fhDeltaPhiBrad(0),
138 fhXEAssocPtBin(0), fhZTAssocPtBin(0),
139 fhDeltaPhiDeltaEtaNeutral(0),
140 fhPhiNeutral(0), fhEtaNeutral(0),
141 fhDeltaPhiNeutral(0), fhDeltaEtaNeutral(0),
142 fhDeltaPhiNeutralPt(0), fhDeltaPhiUeNeutralPt(0),
143 fhXENeutral(0), fhXEUeNeutral(0),
144 fhPtHbpXENeutral(0), fhPtHbpXEUeNeutral(0),
145 fhZTNeutral(0), fhZTUeNeutral(0),
146 fhPtHbpZTNeutral(0), fhPtHbpZTUeNeutral(0),
147 fhDeltaPhiUeLeftNeutral(0), fhDeltaPhiUeRightNeutral(0),
148 fhXEUeLeftNeutral(0), fhXEUeRightNeutral(0),
149 fhPtHbpXEUeLeftNeutral(0), fhPtHbpXEUeRightNeutral(0),
150 fhZTUeLeftNeutral(0), fhZTUeRightNeutral(0),
151 fhPtHbpZTUeLeftNeutral(0), fhPtHbpZTUeRightNeutral(0),
152 fhPtPi0DecayRatio(0),
153 fhDeltaPhiDecayCharged(0), fhXEDecayCharged(0), fhZTDecayCharged(0),
154 fhDeltaPhiDecayNeutral(0), fhXEDecayNeutral(0), fhZTDecayNeutral(0),
155 fhDeltaPhiDecayChargedAssocPtBin(0),
156 fhXEDecayChargedAssocPtBin(0), fhZTDecayChargedAssocPtBin(0),
157 fh2phiLeadingParticle(0x0), fhMCPtLeading(0),
158 fhMCPhiLeading(0), fhMCEtaLeading(0),
159 fhMCEtaCharged(0), fhMCPhiCharged(0),
160 fhMCDeltaEtaCharged(0), fhMCDeltaPhiCharged(0x0),
161 fhMCDeltaPhiDeltaEtaCharged(0), fhMCDeltaPhiChargedPt(0),
162 fhMCPtXECharged(0), fhMCPtXEUeCharged(0),
163 fhMCPtHbpXECharged(0), fhMCPtHbpXEUeCharged(0),
165 fhMCPtZTCharged(0), fhMCPtHbpZTCharged(0),
166 fhMCPtTrigPout(0), fhMCPtAssocDeltaPhi(0),
168 fhNEventsTrigger(0), fhNtracksMB(0), fhNclustersMB(0),
169 fhMixDeltaPhiCharged(0), fhMixDeltaPhiDeltaEtaCharged(0),
170 fhMixXECharged(0), fhMixXEUeCharged(0), fhMixHbpXECharged(0),
171 fhMixDeltaPhiChargedAssocPtBin(),
172 fhMixDeltaPhiChargedAssocPtBinDEta08(),
173 fhMixDeltaPhiChargedAssocPtBinDEta0(),
174 fhMixDeltaPhiDeltaEtaChargedAssocPtBin(),
175 fhEventBin(0), fhEventMixBin(0)
179 //Initialize parameters
182 for(Int_t i = 0; i < 7; i++)
184 fhPtLeadingMC[i] = 0;
185 fhXEChargedMC[i] = 0;
186 fhDeltaPhiChargedMC[i] = 0;
189 for(Int_t i = 0; i < 7; i++)
191 fhPtLeadingPileUp [i] = 0 ;
192 fhDeltaPhiChargedPileUp [i] = 0 ; fhDeltaEtaChargedPileUp [i] = 0 ;
193 fhXEChargedPileUp [i] = 0 ; fhXEUeChargedPileUp [i] = 0 ;
194 fhZTChargedPileUp [i] = 0 ; fhZTUeChargedPileUp [i] = 0 ;
195 fhPtTrigChargedPileUp [i] = 0 ;
196 fhDeltaPhiChargedPtA3GeVPileUp[i] = 0 ; fhDeltaEtaChargedPtA3GeVPileUp[i] = 0 ;
201 //_________________________________________________________________
202 AliAnaParticleHadronCorrelation::~AliAnaParticleHadronCorrelation()
204 // Remove event containers
208 if(fListMixTrackEvents)
210 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
212 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
214 for(Int_t irp=0; irp<GetNRPBin(); irp++)
216 Int_t bin = GetEventMixBin(ic, iz, irp);
217 fListMixTrackEvents[bin]->Delete() ;
218 delete fListMixTrackEvents[bin] ;
224 delete[] fListMixTrackEvents;
226 if(fListMixCaloEvents)
228 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
230 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
232 for(Int_t irp=0; irp<GetNRPBin(); irp++)
234 Int_t bin = GetEventMixBin(ic, iz, irp);
235 fListMixCaloEvents[bin]->Delete() ;
236 delete fListMixCaloEvents[bin] ;
242 delete[] fListMixCaloEvents;
247 //______________________________________________________________________________________________________________________________________________________
248 void AliAnaParticleHadronCorrelation::FillChargedAngularCorrelationHistograms(Float_t ptAssoc, Float_t ptTrig, Int_t bin,
249 Float_t phiAssoc, Float_t phiTrig, Float_t & deltaPhi,
250 Float_t etaAssoc, Float_t etaTrig,
251 Bool_t decay, Float_t hmpidSignal, Int_t outTOF,
252 Int_t nTracks, Int_t mcTag)
254 // Fill angular correlation related histograms
256 Float_t deltaEta = etaTrig-etaAssoc;
257 deltaPhi = phiTrig-phiAssoc;
258 Float_t deltaPhiOrg = deltaPhi;
260 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
261 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
263 fhEtaCharged ->Fill(ptAssoc,etaAssoc);
264 fhPhiCharged ->Fill(ptAssoc,phiAssoc);
265 fhDeltaEtaCharged ->Fill(ptTrig ,deltaEta);
266 fhDeltaPhiCharged ->Fill(ptTrig ,deltaPhi);
267 fhDeltaPhiChargedPt->Fill(ptAssoc, deltaPhi);
268 fhDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
272 fhDeltaEtaChargedPtA3GeV ->Fill(ptTrig ,deltaEta);
273 fhDeltaPhiChargedPtA3GeV ->Fill(ptTrig ,deltaPhi);
274 fhDeltaPhiDeltaEtaChargedPtA3GeV->Fill(deltaPhi, deltaEta);
279 if(fFillPileUpHistograms)
283 fhDeltaPhiChargedOtherBC->Fill(ptTrig ,deltaPhi) ;
284 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVOtherBC->Fill(ptTrig ,deltaPhi) ;
288 fhDeltaPhiChargedBC0->Fill(ptTrig ,deltaPhi) ;
289 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVBC0->Fill(ptTrig ,deltaPhi) ;
292 Int_t vtxBC = GetReader()->GetVertexBC();
293 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
295 fhDeltaPhiChargedVtxBC0->Fill(ptTrig ,deltaPhi) ;
296 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVVtxBC0->Fill(ptTrig ,deltaPhi) ;
299 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
300 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
301 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
302 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
303 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
304 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
305 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
309 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
310 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
311 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
312 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
313 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
314 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
315 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
321 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
322 fhDeltaPhiChargedMC[mcIndex]->Fill(ptTrig , deltaPhi);
325 if(fDecayTrigger && decay) fhDeltaPhiDecayCharged ->Fill(ptTrig , deltaPhi);
327 Double_t dphiBrad = -100;
330 dphiBrad = atan2(sin(deltaPhiOrg), cos(deltaPhiOrg))/TMath::Pi();//-1 to 1
331 if(TMath::Abs(dphiBrad)>0.325 && TMath::Abs(dphiBrad)<0.475) //Hardcoded values, BAD, FIXME
333 fhAssocPtBkg->Fill(ptTrig, ptAssoc);
336 if(dphiBrad<-1./3) dphiBrad += 2;
337 fhDeltaPhiBrad->Fill(ptTrig, dphiBrad);
340 // Fill histograms in bins of associated particle pT
343 fhDeltaPhiDeltaEtaAssocPtBin [bin]->Fill(deltaPhi,deltaEta);
345 fhDeltaPhiAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
347 if(TMath::Abs(deltaEta)> 0.8)
348 fhDeltaPhiAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
350 if(TMath::Abs(deltaEta)< 0.01)
351 fhDeltaPhiAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
354 fhDeltaPhiBradAssocPtBin [bin]->Fill(ptTrig, dphiBrad);
356 if(fDecayTrigger && decay)
357 fhDeltaPhiDecayChargedAssocPtBin[bin]->Fill(ptTrig, deltaPhi);
359 if(fHMPIDCorrelation)
361 if( hmpidSignal > 0 )
363 //printf("Track pt %f with HMPID signal %f \n",pt,hmpidSignal);
364 fhDeltaPhiAssocPtBinHMPID[bin]->Fill(ptTrig, deltaPhi);
367 if(phiAssoc > 5*TMath::DegToRad() && phiAssoc < 20*TMath::DegToRad())
369 //printf("Track pt %f in HMPID acceptance phi %f \n ",pt,phi*TMath::RadToDeg() );
370 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->Fill(ptTrig, deltaPhi);
375 //fill different multiplicity histogram
378 for(Int_t im = 0; im<GetMultiBin(); im++)
380 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
382 fhTrigDeltaPhiCharged[im]->Fill(ptTrig,deltaPhi);
383 fhTrigDeltaEtaCharged[im]->Fill(ptTrig,deltaEta);
389 //____________________________________________________________________________________________________________________________________________________
390 Bool_t AliAnaParticleHadronCorrelation::FillChargedMCCorrelationHistograms(Float_t mcAssocPt, Float_t mcAssocPhi, Float_t mcAssocEta,
391 Float_t mcTrigPt, Float_t mcTrigPhi, Float_t mcTrigEta)
393 // Fill MC histograms independently of AOD or ESD
395 //Select only hadrons in pt range
396 if(mcAssocPt < fMinAssocPt || mcAssocPt > fMaxAssocPt) return kTRUE ; // exclude but continue
398 if(mcAssocPhi < 0) mcAssocPhi+=TMath::TwoPi();
400 //remove trigger itself for correlation when use charged triggers
401 if(TMath::Abs(mcAssocPt -mcTrigPt ) < 1e-6 &&
402 TMath::Abs(mcAssocPhi-mcTrigPhi) < 1e-6 &&
403 TMath::Abs(mcAssocEta-mcTrigEta) < 1e-6) return kTRUE ; // exclude but continue
406 if( fMakeAbsoluteLeading && mcAssocPt > mcTrigPt ) return kFALSE; // jump event
408 //jump out this event if near side associated partile pt larger than trigger
409 if( fMakeNearSideLeading && mcAssocPt > mcTrigPt &&
410 TMath::Abs(mcAssocPhi-mcTrigPhi)<TMath::PiOver2() ) return kFALSE; // jump event
412 Float_t mcdeltaPhi= mcTrigPhi-mcAssocPhi;
413 if(mcdeltaPhi <= -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
414 if(mcdeltaPhi > 3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
416 Float_t mcxE =-mcAssocPt/mcTrigPt*TMath::Cos(mcdeltaPhi);// -(mcAssocPx*pxprim+mcAssocPy*pyprim)/(mcTrigPt*mcTrigPt);
417 Float_t mchbpXE =-100 ;
418 if(mcxE > 0 ) mchbpXE = TMath::Log(1./mcxE);
420 Float_t mczT = mcAssocPt/mcTrigPt ;
421 Float_t mchbpZT =-100 ;
422 if(mczT > 0 ) mchbpZT = TMath::Log(1./mczT);
424 //Selection within angular range
425 if( mcdeltaPhi< -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
426 if( mcdeltaPhi>3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
428 Double_t mcpout = mcAssocPt*TMath::Sin(mcdeltaPhi) ;
431 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation() - 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",
432 mcAssocPt,mcAssocPhi, mcTrigPhi,fDeltaPhiMinCut, mcdeltaPhi, fDeltaPhiMaxCut, GetMinPt());
435 fhMCEtaCharged ->Fill(mcAssocPt, mcAssocEta);
436 fhMCPhiCharged ->Fill(mcAssocPt, mcAssocPhi);
437 fhMCDeltaEtaCharged->Fill(mcTrigPt, mcTrigEta-mcAssocEta);
438 fhMCDeltaPhiCharged->Fill(mcTrigPt, mcdeltaPhi);
439 fhMCPtAssocDeltaPhi->Fill(mcAssocPt, mcdeltaPhi);
441 fhMCDeltaPhiDeltaEtaCharged->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
443 //delta phi cut for correlation
444 if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
446 fhMCDeltaPhiChargedPt->Fill(mcAssocPt,mcdeltaPhi);
447 fhMCPtXECharged ->Fill(mcTrigPt,mcxE);
448 fhMCPtHbpXECharged ->Fill(mcTrigPt,mchbpXE);
449 fhMCPtZTCharged ->Fill(mcTrigPt,mczT);
450 fhMCPtHbpZTCharged ->Fill(mcTrigPt,mchbpZT);
451 fhMCPtTrigPout ->Fill(mcTrigPt, mcpout) ;
455 if ( (mcdeltaPhi > fUeDeltaPhiMinCut) && (mcdeltaPhi < fUeDeltaPhiMaxCut) )
457 Double_t randomphi = gRandom->Uniform(TMath::Pi()/2,3*TMath::Pi()/2);
458 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
460 if(mcUexE < 0.) mcUexE = -mcUexE;
462 fhMCPtXEUeCharged->Fill(mcTrigPt,mcUexE);
463 if(mcUexE > 0) fhMCPtHbpXEUeCharged->Fill(mcTrigPt,TMath::Log(1/mcUexE));
465 fhMCUePart->Fill(mcTrigPt);
471 //___________________________________________________________________________________________________________________
472 void AliAnaParticleHadronCorrelation::FillChargedMomentumImbalanceHistograms(Float_t ptTrig, Float_t ptAssoc,
473 Float_t xE, Float_t hbpXE,
474 Float_t zT, Float_t hbpZT,
476 Int_t nTracks, Int_t charge,
477 Int_t bin, Bool_t decay,
478 Int_t outTOF, Int_t mcTag)
481 // Fill mostly momentum imbalance related histograms
483 fhXECharged ->Fill(ptTrig , xE);
484 fhPtHbpXECharged ->Fill(ptTrig , hbpXE);
485 fhZTCharged ->Fill(ptTrig , zT);
486 fhPtHbpZTCharged ->Fill(ptTrig , hbpZT);
487 fhPtTrigPout ->Fill(ptTrig , pout) ;
488 fhPtTrigCharged ->Fill(ptTrig , ptAssoc) ;
491 if(fFillPileUpHistograms)
495 fhXEChargedOtherBC ->Fill(ptTrig,xE);
496 fhZTChargedOtherBC ->Fill(ptTrig,zT);
497 fhPtTrigChargedOtherBC->Fill(ptTrig,ptAssoc);
501 fhXEChargedBC0 ->Fill(ptTrig,xE);
502 fhZTChargedBC0 ->Fill(ptTrig,zT);
503 fhPtTrigChargedBC0->Fill(ptTrig,ptAssoc);
506 Int_t vtxBC = GetReader()->GetVertexBC();
507 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
509 fhXEChargedVtxBC0 ->Fill(ptTrig,xE);
510 fhZTChargedVtxBC0 ->Fill(ptTrig,zT);
511 fhPtTrigChargedVtxBC0->Fill(ptTrig,ptAssoc);
514 if(GetReader()->IsPileUpFromSPD()) { fhXEChargedPileUp[0]->Fill(ptTrig,xE); fhZTChargedPileUp[0]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[0]->Fill(ptTrig,ptAssoc); }
515 if(GetReader()->IsPileUpFromEMCal()) { fhXEChargedPileUp[1]->Fill(ptTrig,xE); fhZTChargedPileUp[1]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[1]->Fill(ptTrig,ptAssoc); }
516 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEChargedPileUp[2]->Fill(ptTrig,xE); fhZTChargedPileUp[2]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[2]->Fill(ptTrig,ptAssoc); }
517 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEChargedPileUp[3]->Fill(ptTrig,xE); fhZTChargedPileUp[3]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[3]->Fill(ptTrig,ptAssoc); }
518 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEChargedPileUp[4]->Fill(ptTrig,xE); fhZTChargedPileUp[4]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[4]->Fill(ptTrig,ptAssoc); }
519 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEChargedPileUp[5]->Fill(ptTrig,xE); fhZTChargedPileUp[5]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[5]->Fill(ptTrig,ptAssoc); }
520 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEChargedPileUp[6]->Fill(ptTrig,xE); fhZTChargedPileUp[6]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[6]->Fill(ptTrig,ptAssoc); }
525 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
526 fhXEChargedMC [mcIndex]->Fill(ptTrig , xE );
529 if(fDecayTrigger && decay)
531 fhXEDecayCharged->Fill(ptTrig,xE);
532 fhZTDecayCharged->Fill(ptTrig,zT);
533 } // photon decay pi0/eta trigger
535 if(bin >= 0 )//away side
537 fhXEAssocPtBin[bin]->Fill(ptTrig, xE) ;
538 fhZTAssocPtBin[bin]->Fill(ptTrig, zT) ;
540 if(fDecayTrigger && decay)
542 fhXEDecayChargedAssocPtBin[bin]->Fill(ptTrig, xE);
543 fhZTDecayChargedAssocPtBin[bin]->Fill(ptTrig, zT);
549 fhXEPosCharged->Fill(ptTrig,xE) ;
550 fhZTPosCharged->Fill(ptTrig,zT) ;
554 fhXENegCharged->Fill(ptTrig,xE) ;
555 fhZTNegCharged->Fill(ptTrig,zT) ;
558 //fill different multiplicity histogram
561 for(Int_t im=0; im<GetMultiBin(); im++)
563 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
565 fhTrigXECorr[im]->Fill(ptTrig,xE);
566 fhTrigZTCorr[im]->Fill(ptTrig,zT);
569 } //multiplicity events selection
572 //_______________________________________________________________________________________________________________________
573 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventHistograms(Float_t ptTrig, Float_t ptAssoc,
574 Float_t deltaPhi, Int_t nTracks, Int_t outTOF)
576 // Fill underlying event histograms
578 fhDeltaPhiUeChargedPt->Fill(ptAssoc,deltaPhi);
580 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
581 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
582 Double_t uezT = ptAssoc/ptTrig;
584 if(uexE < 0.) uexE = -uexE;
586 fhXEUeCharged->Fill(ptTrig,uexE);
587 if(uexE > 0) fhPtHbpXEUeCharged->Fill(ptTrig,TMath::Log(1/uexE));
589 fhZTUeCharged->Fill(ptTrig,uezT);
590 if(uexE > 0) fhPtHbpZTUeCharged->Fill(ptTrig,TMath::Log(1/uezT));
594 if(fFillPileUpHistograms)
598 fhXEUeChargedOtherBC->Fill(ptTrig,uexE);
599 fhZTUeChargedOtherBC->Fill(ptTrig,uezT);
603 fhXEUeChargedBC0->Fill(ptTrig,uexE);
604 fhZTUeChargedBC0->Fill(ptTrig,uezT);
607 Int_t vtxBC = GetReader()->GetVertexBC();
608 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
610 fhXEUeChargedVtxBC0->Fill(ptTrig,uexE);
611 fhZTUeChargedVtxBC0->Fill(ptTrig,uezT);
614 if(GetReader()->IsPileUpFromSPD()) { fhXEUeChargedPileUp[0]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[0]->Fill(ptTrig,uezT);}
615 if(GetReader()->IsPileUpFromEMCal()) { fhXEUeChargedPileUp[1]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[1]->Fill(ptTrig,uezT);}
616 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEUeChargedPileUp[2]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[2]->Fill(ptTrig,uezT);}
617 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEUeChargedPileUp[3]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[3]->Fill(ptTrig,uezT);}
618 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEUeChargedPileUp[4]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[4]->Fill(ptTrig,uezT);}
619 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEUeChargedPileUp[5]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[5]->Fill(ptTrig,uezT);}
620 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEUeChargedPileUp[6]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[6]->Fill(ptTrig,uezT);}
625 for(Int_t im=0; im<GetMultiBin(); im++)
627 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
629 fhTrigXEUeCorr[im]->Fill(ptTrig,uexE); // xE? CHECK
630 fhTrigZTUeCorr[im]->Fill(ptTrig,uezT); // zT? CHECK
633 } //multiplicity events selection
636 //_____________________________________________________________________________________________________
637 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventSidesHistograms(Float_t ptTrig,
641 // Fill underlying event histograms to the left and right of trigger
642 if((deltaPhi<-fUeDeltaPhiMinCut) || (deltaPhi >2*fUeDeltaPhiMaxCut))
644 fhDeltaPhiUeLeftCharged->Fill(ptAssoc,deltaPhi);
645 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
646 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
647 Double_t uezT = ptAssoc/ptTrig;
649 if(uexE < 0.) uexE = -uexE;
651 fhXEUeLeftCharged->Fill(ptTrig,uexE);
652 if(uexE > 0) fhPtHbpXEUeLeftCharged->Fill(ptTrig,TMath::Log(1/uexE));
654 fhZTUeLeftCharged->Fill(ptTrig,uezT);
655 if(uexE > 0) fhPtHbpZTUeLeftCharged->Fill(ptTrig,TMath::Log(1/uezT));
656 fhDeltaPhiUeLeftCharged->Fill(ptAssoc, deltaPhi);
659 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut))
661 fhDeltaPhiUeRightCharged->Fill(ptAssoc,deltaPhi);
662 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
663 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
664 Double_t uezT = ptAssoc/ptTrig;
666 if(uexE < 0.) uexE = -uexE;
668 fhXEUeRightCharged->Fill(ptTrig,uexE);
669 if(uexE > 0) fhPtHbpXEUeRightCharged->Fill(ptTrig,TMath::Log(1/uexE));
671 fhZTUeRightCharged->Fill(ptTrig,uezT);
672 if(uexE > 0) fhPtHbpZTUeRightCharged->Fill(ptTrig,TMath::Log(1/uezT));
673 fhDeltaPhiUeRightCharged->Fill(ptAssoc, deltaPhi);
676 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-TMath::Pi()/2))
678 fhDeltaPhiUeLeftDownCharged->Fill(ptAssoc,deltaPhi);
679 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
680 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
682 if(uexE < 0.) uexE = -uexE;
684 fhXEUeLeftDownCharged->Fill(ptTrig,uexE);
687 if((deltaPhi>2*fUeDeltaPhiMaxCut) && (deltaPhi <3*TMath::Pi()/2))
689 fhDeltaPhiUeLeftUpCharged->Fill(ptAssoc,deltaPhi);
690 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
691 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
693 if(uexE < 0.) uexE = -uexE;
695 fhXEUeLeftUpCharged->Fill(ptTrig,uexE);
698 if((deltaPhi > TMath::Pi()/2) && (deltaPhi < fUeDeltaPhiMaxCut))
700 fhDeltaPhiUeRightUpCharged->Fill(ptAssoc,deltaPhi);
701 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
702 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
704 if(uexE < 0.) uexE = -uexE;
706 fhXEUeRightUpCharged->Fill(ptTrig,uexE);
709 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < TMath::Pi()/2))
711 fhDeltaPhiUeRightDownCharged->Fill(ptAssoc,deltaPhi);
712 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
713 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
715 if(uexE < 0.) uexE = -uexE;
717 fhXEUeRightDownCharged->Fill(ptTrig,uexE);
721 //______________________________________________________________________________________________________________________________
722 void AliAnaParticleHadronCorrelation::FillDecayPhotonCorrelationHistograms(Float_t ptAssoc, Float_t phiAssoc,
723 TLorentzVector mom1, TLorentzVector mom2,
724 Bool_t bChargedOrNeutral)
726 // Do correlation with decay photons of triggered pi0 or eta
728 // Calculate the correlation parameters
729 Float_t ptDecay1 = mom1.Pt();
730 Float_t ptDecay2 = mom2.Pt();
732 Float_t zTDecay1 = -100, zTDecay2 = -100;
733 if(ptDecay1) zTDecay1 = ptAssoc/ptDecay1 ;
734 if(ptDecay2) zTDecay2 = ptAssoc/ptDecay2 ;
736 Float_t deltaPhiDecay1 = mom1.Phi()-phiAssoc;
737 if(deltaPhiDecay1< -TMath::PiOver2()) deltaPhiDecay1+=TMath::TwoPi();
738 if(deltaPhiDecay1>3*TMath::PiOver2()) deltaPhiDecay1-=TMath::TwoPi();
740 Float_t deltaPhiDecay2 = mom2.Phi()-phiAssoc;
741 if(deltaPhiDecay2< -TMath::PiOver2()) deltaPhiDecay2+=TMath::TwoPi();
742 if(deltaPhiDecay2>3*TMath::PiOver2()) deltaPhiDecay2-=TMath::TwoPi();
744 Float_t xEDecay1 =-zTDecay1*TMath::Cos(deltaPhiDecay1); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
745 Float_t xEDecay2 =-zTDecay2*TMath::Cos(deltaPhiDecay2); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
747 if(bChargedOrNeutral) // correlate with charges
749 fhDeltaPhiDecayCharged->Fill(ptDecay1, deltaPhiDecay1);
750 fhDeltaPhiDecayCharged->Fill(ptDecay2, deltaPhiDecay2);
752 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms( Charged corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
754 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
756 fhZTDecayCharged->Fill(ptDecay1,zTDecay1);
757 fhXEDecayCharged->Fill(ptDecay1,xEDecay1);
759 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
761 fhZTDecayCharged->Fill(ptDecay2,zTDecay2);
762 fhXEDecayCharged->Fill(ptDecay2,xEDecay2);
765 else // correlate with neutrals
767 fhDeltaPhiDecayCharged->Fill(ptDecay1, deltaPhiDecay1);
768 fhDeltaPhiDecayCharged->Fill(ptDecay2, deltaPhiDecay2);
770 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms(Neutral corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
772 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
774 fhZTDecayCharged->Fill(ptDecay1,zTDecay1);
775 fhXEDecayCharged->Fill(ptDecay1,xEDecay1);
777 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
779 fhZTDecayCharged->Fill(ptDecay2,zTDecay2);
780 fhXEDecayCharged->Fill(ptDecay2,xEDecay2);
785 //______________________________________________________________________________________________________________________________________________________
786 void AliAnaParticleHadronCorrelation::FillNeutralAngularCorrelationHistograms(Float_t ptAssoc, Float_t ptTrig,
787 Float_t phiAssoc, Float_t phiTrig, Float_t & deltaPhi,
788 Float_t etaAssoc, Float_t etaTrig)
790 // Fill angular correlation related histograms
792 Float_t deltaEta = etaTrig-etaAssoc;
793 deltaPhi = phiTrig-phiAssoc;
795 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
796 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
798 fhEtaNeutral ->Fill(ptAssoc,etaAssoc);
799 fhPhiNeutral ->Fill(ptAssoc,phiAssoc);
800 fhDeltaEtaNeutral->Fill(ptTrig ,deltaEta);
801 fhDeltaPhiNeutral->Fill(ptTrig ,deltaPhi);
803 if(ptAssoc > 2 ) fhDeltaPhiDeltaEtaNeutral->Fill(deltaPhi, deltaEta);
807 //_____________________________________________________________________________________________________________________________
808 void AliAnaParticleHadronCorrelation::FillNeutralUnderlyingEventSidesHistograms(Float_t ptTrig, Float_t ptAssoc,
809 Float_t xE, Float_t hbpXE,
810 Float_t zT, Float_t hbpZT,
813 // Fill underlying event histograms to the left and right of trigger
815 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-fUeDeltaPhiMaxCut))
817 fhDeltaPhiUeLeftNeutral->Fill(ptAssoc, deltaPhi);
818 fhXEUeLeftNeutral ->Fill(ptTrig , xE);
819 fhPtHbpXEUeLeftNeutral ->Fill(ptTrig , hbpXE);
820 fhZTUeLeftNeutral ->Fill(ptTrig , zT);
821 fhPtHbpZTUeLeftNeutral ->Fill(ptTrig , hbpZT);
824 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut))
826 fhDeltaPhiUeRightNeutral->Fill(ptAssoc, deltaPhi);
827 fhXEUeRightNeutral ->Fill(ptTrig , xE);
828 fhPtHbpXEUeRightNeutral ->Fill(ptTrig , hbpXE);
829 fhZTUeRightNeutral ->Fill(ptTrig , zT);
830 fhPtHbpZTUeRightNeutral ->Fill(ptTrig , hbpZT);
834 //______________________________________________________
835 void AliAnaParticleHadronCorrelation::FillEventMixPool()
837 // Fill the pool with tracks if requested
841 FillChargedEventMixPool();
843 if(OnlyIsolated() || fFillNeutralEventMixPool)
844 FillNeutralEventMixPool();
849 //_____________________________________________________________
850 void AliAnaParticleHadronCorrelation::FillChargedEventMixPool()
852 // Mixed event pool filling for tracks
854 if(fUseMixStoredInReader && GetReader()->GetLastTracksMixedEvent() == GetEventNumber())
856 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
857 return ; // pool filled previously for another trigger
860 Int_t nTracks = GetCTSTracks()->GetEntriesFast();
862 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
863 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
865 if(!inputHandler) return ;
867 // Do mixing only with MB event (or the chosen mask), if not skip
868 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
870 fhNtracksMB->Fill(nTracks);
872 Int_t eventBin = GetEventMixBin();
874 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
875 if(eventBin < 0) return;
877 TObjArray * mixEventTracks = new TObjArray;
879 if(fUseMixStoredInReader)
881 fListMixTrackEvents[eventBin] = GetReader()->GetListWithMixedEventsForTracks(eventBin);
884 if(!fListMixTrackEvents[eventBin]) fListMixTrackEvents[eventBin] = new TList();
886 //printf("%s ***** Pool Event bin : %d - nTracks %d\n",GetInputAODName().Data(),eventBin, GetCTSTracks()->GetEntriesFast());
888 TList * pool = fListMixTrackEvents[eventBin];
891 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
893 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
895 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
896 p3.SetXYZ(mom[0],mom[1],mom[2]);
897 Float_t pt = p3.Pt();
899 //Select only hadrons in pt range
900 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
902 AliAODPWG4Particle * mixedTrack = new AliAODPWG4Particle(mom[0],mom[1],mom[2],0);
903 mixedTrack->SetDetector("CTS");
904 mixedTrack->SetChargedBit(track->Charge()>0);
905 mixEventTracks->Add(mixedTrack);
908 //Set the event number where the last event was added, to avoid double pool filling
909 GetReader()->SetLastTracksMixedEvent(GetEventNumber());
911 //printf("Add event to pool with %d tracks \n ",mixEventTracks->GetEntries());
912 pool->AddFirst(mixEventTracks);
915 //printf("Pool size %d, max %d\n",pool->GetSize(), GetNMaxEvMix());
917 if(pool->GetSize() > GetNMaxEvMix())
919 TClonesArray * tmp = static_cast<TClonesArray*>(pool->Last()) ;
925 //_____________________________________________________________
926 void AliAnaParticleHadronCorrelation::FillNeutralEventMixPool()
928 // Mixed event pool filling for neutral clusters
929 // Right now only for EMCAL and in isolation case
931 //printf("FillNeutralEventMixPool for %s\n",GetInputAODName().Data());
933 TObjArray * pl = GetEMCALClusters();
934 //if (GetAODObjArrayName.Contains("PHOS") )pl = GetPHOSClusters();
935 //else pl = GetEMCALClusters();
937 Int_t nClusters = pl->GetEntriesFast();
939 if(fUseMixStoredInReader && GetReader()->GetLastCaloMixedEvent() == GetEventNumber())
941 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
942 return ; // pool filled previously for another trigger
945 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
946 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
948 if(!inputHandler) return ;
950 // Do mixing only with MB event (or the chosen mask), if not skip
951 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
953 fhNclustersMB->Fill(nClusters);
955 Int_t eventBin = GetEventMixBin();
957 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
958 if(eventBin < 0) return;
960 TObjArray * mixEventCalo = new TObjArray;
962 if(fUseMixStoredInReader)
964 fListMixCaloEvents[eventBin] = GetReader()->GetListWithMixedEventsForCalo(eventBin);
967 if(!fListMixCaloEvents[eventBin]) fListMixCaloEvents[eventBin] = new TList();
969 TList * poolCalo = fListMixCaloEvents[eventBin];
973 for(Int_t ipr = 0;ipr < nClusters ; ipr ++ )
975 AliVCluster * calo = (AliVCluster *) (pl->At(ipr)) ;
977 // remove matched clusters
978 if( IsTrackMatched( calo, GetReader()->GetInputEvent() ) ) continue ;
980 //Cluster momentum calculation
981 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
983 calo->GetMomentum(mom,GetVertex(0)) ;
984 }//Assume that come from vertex in straight line
987 Double_t vertex[]={0,0,0};
988 calo->GetMomentum(mom,vertex) ;
991 Float_t pt = mom.Pt();
992 //Select only clusters in pt range
993 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
995 AliAODPWG4Particle * mixedCalo = new AliAODPWG4Particle(mom);
996 mixedCalo->SetDetector("EMCAL");
997 mixEventCalo->Add(mixedCalo);
1000 //Set the event number where the last event was added, to avoid double pool filling
1001 GetReader()->SetLastCaloMixedEvent(GetEventNumber());
1003 //printf("Add event to pool with %d clusters \n ",mixEventCalo->GetEntries());
1004 poolCalo->AddFirst(mixEventCalo);
1007 //printf("Pool size %d, max %d\n",poolCalo->GetSize(), GetNMaxEvMix());
1009 if(poolCalo->GetSize() > GetNMaxEvMix())
1010 {//Remove last event
1011 TClonesArray * tmp = static_cast<TClonesArray*>(poolCalo->Last()) ;
1012 poolCalo->RemoveLast() ;
1017 //____________________________________________________________
1018 TObjString* AliAnaParticleHadronCorrelation::GetAnalysisCuts()
1020 //Save parameters used for analysis
1021 TString parList ; //this will be list of parameters used for this analysis.
1022 const Int_t buffersize = 560;
1023 char onePar[buffersize] ;
1025 snprintf(onePar,buffersize,"--- AliAnaPaticleHadronCorrelation ---\n") ;
1027 snprintf(onePar,buffersize," Pt Trigger > %3.2f ", fMinTriggerPt) ;
1029 snprintf(onePar,buffersize," %3.2f < Pt associated < %3.2f ", fMinAssocPt, fMaxAssocPt) ;
1031 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-Hadron < %3.2f ", fDeltaPhiMinCut, fDeltaPhiMaxCut) ;
1033 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-UeHadron < %3.2f ", fUeDeltaPhiMinCut, fUeDeltaPhiMaxCut) ;
1035 snprintf(onePar,buffersize,"Isolated Trigger? %d\n", fSelectIsolated) ;
1037 snprintf(onePar,buffersize,"Several UE? %d\n", fMakeSeveralUE) ;
1039 snprintf(onePar,buffersize,"Name of AOD Pi0 Branch %s ", fPi0AODBranchName.Data());
1041 snprintf(onePar,buffersize,"Do Decay-hadron correlation ? pi0 %d, decay %d", fPi0Trigger, fDecayTrigger) ;
1043 snprintf(onePar,buffersize,"Select absolute leading for cluster triggers ? %d or Near Side Leading %d \n",
1044 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
1046 snprintf(onePar,buffersize,"Associated particle pt bins %d: ", fNAssocPtBins) ;
1048 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
1049 snprintf(onePar,buffersize,"bin %d = [%2.1f,%2.1f];", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
1053 //Get parameters set in base class.
1054 parList += GetBaseParametersList() ;
1056 //Get parameters set in FiducialCut class (not available yet)
1057 //parlist += GetFidCut()->GetFidCutParametersList()
1059 return new TObjString(parList) ;
1063 //________________________________________________________________
1064 TList * AliAnaParticleHadronCorrelation::GetCreateOutputObjects()
1067 // Create histograms to be saved in output file and
1068 // store them in fOutputContainer
1070 TList * outputContainer = new TList() ;
1071 outputContainer->SetName("CorrelationHistos") ;
1073 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();
1074 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();
1075 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();
1077 Int_t nMixBins = GetNCentrBin()*GetNZvertBin()*GetNRPBin();
1079 TString nameMC[] = {"Photon","Pi0","Pi0Decay","EtaDecay","OtherDecay","Electron","Hadron"};
1080 TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
1082 // For vz dependent histograms, if option ON
1084 if(fCorrelVzBin) nz = GetNZvertBin();
1088 fhPtInput = new TH1F("hPtInput","p_{T} distribution of input trigger particles", nptbins,ptmin,ptmax);
1089 fhPtInput->SetXTitle("p_{T}^{trig} (GeV/c)");
1090 outputContainer->Add(fhPtInput);
1092 fhPtFidCut = new TH1F("hPtFidCut","p_{T} distribution of input trigger particles after fiducial cut", nptbins,ptmin,ptmax);
1093 fhPtFidCut->SetXTitle("p_{T}^{trig} (GeV/c)");
1094 outputContainer->Add(fhPtFidCut);
1096 fhPtLeading = new TH1F("hPtLeading","p_{T} distribution of leading particles", nptbins,ptmin,ptmax);
1097 fhPtLeading->SetXTitle("p_{T}^{trig} (GeV/c)");
1098 outputContainer->Add(fhPtLeading);
1102 for(Int_t i=0; i < 7; i++)
1104 fhPtLeadingMC[i] = new TH1F(Form("hPtLeading_MC%s",nameMC[i].Data()),
1105 Form("p_{T} distribution of leading particles, trigger origin is %s",nameMC[i].Data()),
1106 nptbins,ptmin,ptmax);
1107 fhPtLeadingMC[i]->SetXTitle("p_{T}^{trig} (GeV/c)");
1108 outputContainer->Add(fhPtLeadingMC[i]);
1114 fhPtLeadingVzBin = new TH2F("hPtLeadingVzBin","p_{T} distribution of leading particles vs vz bin", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
1115 fhPtLeadingVzBin->SetXTitle("p_{T}^{trig} (GeV/c)");
1116 fhPtLeadingVzBin->SetYTitle("v_{z} bin");
1117 outputContainer->Add(fhPtLeadingVzBin);
1120 fhPtLeadingBin = new TH2F ("hPtLeadingBin","p_{T} distribution of leading particles", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
1121 fhPtLeadingBin->SetXTitle("p_{T}^{trig} (GeV/c)");
1122 fhPtLeadingBin->SetYTitle("Bin");
1123 outputContainer->Add(fhPtLeadingBin);
1125 fhPhiLeading = new TH2F ("hPhiLeading","#phi distribution of leading Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
1126 fhPhiLeading->SetYTitle("#phi (rad)");
1127 outputContainer->Add(fhPhiLeading);
1129 fhEtaLeading = new TH2F ("hEtaLeading","#eta distribution of leading",nptbins,ptmin,ptmax, netabins,etamin,etamax);
1130 fhEtaLeading->SetYTitle("#eta ");
1131 outputContainer->Add(fhEtaLeading);
1133 fhPtLeadingCentrality = new TH2F("hPtLeadingCentrality","Leading particle p_{T} vs centrality",nptbins,ptmin,ptmax,100,0.,100) ;
1134 fhPtLeadingCentrality->SetXTitle("p_{T}^{trig} (GeV/c)");
1135 fhPtLeadingCentrality->SetYTitle("Centrality (%)");
1136 outputContainer->Add(fhPtLeadingCentrality) ;
1138 fhPtLeadingEventPlane = new TH2F("hPtLeadingEventPlane","Leading particle p_{T} vs event plane angle",nptbins,ptmin,ptmax, 100,0.,TMath::Pi()) ;
1139 fhPtLeadingEventPlane->SetXTitle("p_{T}^{trig} (GeV/c)");
1140 fhPtLeadingEventPlane->SetXTitle("EP angle (rad)");
1141 outputContainer->Add(fhPtLeadingEventPlane) ;
1143 fhLeadingEventPlaneCentrality = new TH2F("hLeadingEventPlane","Leading particle centrality vs event plane angle",100,0.,100,100,0.,TMath::Pi()) ;
1144 fhLeadingEventPlaneCentrality->SetXTitle("Centrality (%)");
1145 fhLeadingEventPlaneCentrality->SetYTitle("EP angle (rad)");
1146 outputContainer->Add(fhLeadingEventPlaneCentrality) ;
1148 //Correlation with charged hadrons
1149 if(GetReader()->IsCTSSwitchedOn())
1151 fhDeltaPhiDeltaEtaCharged = new TH2F
1152 ("hDeltaPhiDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}}",
1153 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1154 fhDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
1155 fhDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
1157 fhDeltaPhiDeltaEtaChargedPtA3GeV = new TH2F
1158 ("hDeltaPhiDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}, p_{TA}>3 GeV/c}",
1159 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1160 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetXTitle("#Delta #phi (rad)");
1161 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1163 fhPhiCharged = new TH2F
1164 ("hPhiCharged","#phi_{h^{#pm}} vs p_{T #pm}",
1165 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1166 fhPhiCharged->SetYTitle("#phi_{h^{#pm}} (rad)");
1167 fhPhiCharged->SetXTitle("p_{T #pm} (GeV/c)");
1169 fhEtaCharged = new TH2F
1170 ("hEtaCharged","#eta_{h^{#pm}} vs p_{T #pm}",
1171 nptbins,ptmin,ptmax,netabins,etamin,etamax);
1172 fhEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
1173 fhEtaCharged->SetXTitle("p_{T #pm} (GeV/c)");
1175 fhDeltaPhiCharged = new TH2F
1176 ("hDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}",
1177 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1178 fhDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
1179 fhDeltaPhiCharged->SetXTitle("p_{T trigger} (GeV/c)");
1181 fhDeltaPhiChargedPtA3GeV = new TH2F
1182 ("hDeltaPhiChargedPtA3GeV","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}, p_{TA}>3 GeV/c",
1183 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1184 fhDeltaPhiChargedPtA3GeV->SetYTitle("#Delta #phi (rad)");
1185 fhDeltaPhiChargedPtA3GeV->SetXTitle("p_{T trigger} (GeV/c)");
1188 fhDeltaPhiChargedPt = new TH2F
1189 ("hDeltaPhiChargedPt","#phi_{trigger} - #phi_{#h^{#pm}} vs p_{T h^{#pm}}",
1190 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1191 fhDeltaPhiChargedPt->SetYTitle("#Delta #phi (rad)");
1192 fhDeltaPhiChargedPt->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1194 fhDeltaPhiUeChargedPt = new TH2F
1195 ("hDeltaPhiUeChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}}",
1196 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1197 fhDeltaPhiUeChargedPt->SetYTitle("#Delta #phi (rad)");
1198 fhDeltaPhiUeChargedPt->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1200 fhUePart = new TH1F("hUePart","UE particles distribution vs pt trig",
1201 nptbins,ptmin,ptmax);
1202 fhUePart->SetYTitle("dNch");
1203 fhUePart->SetXTitle("p_{T trigger} (GeV/c)");
1206 fhDeltaEtaCharged = new TH2F
1207 ("hDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger}",
1208 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1209 fhDeltaEtaCharged->SetYTitle("#Delta #eta");
1210 fhDeltaEtaCharged->SetXTitle("p_{T trigger} (GeV/c)");
1212 fhDeltaEtaChargedPtA3GeV = new TH2F
1213 ("hDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger}, p_{TA}>3 GeV/c",
1214 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1215 fhDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1216 fhDeltaEtaChargedPtA3GeV->SetXTitle("p_{T trigger} (GeV/c)");
1219 new TH2F("hXECharged","x_{E} for charged tracks",
1220 nptbins,ptmin,ptmax,200,0.,2.);
1221 fhXECharged->SetYTitle("x_{E}");
1222 fhXECharged->SetXTitle("p_{T trigger} (GeV/c)");
1225 new TH2F("hXEUeCharged","x_{E} for Underlying Event",
1226 nptbins,ptmin,ptmax,200,0.,2.);
1227 fhXEUeCharged->SetYTitle("x_{E}");
1228 fhXEUeCharged->SetXTitle("p_{T trigger} (GeV/c)");
1231 new TH2F("hXEPositiveCharged","x_{E} for positive charged tracks",
1232 nptbins,ptmin,ptmax,200,0.,2.);
1233 fhXEPosCharged->SetYTitle("x_{E}");
1234 fhXEPosCharged->SetXTitle("p_{T trigger} (GeV/c)");
1237 new TH2F("hXENegativeCharged","x_{E} for negative charged tracks",
1238 nptbins,ptmin,ptmax,200,0.,2.);
1239 fhXENegCharged->SetYTitle("x_{E}");
1240 fhXENegCharged->SetXTitle("p_{T trigger} (GeV/c)");
1243 new TH2F("hHbpXECharged","#xi = ln(1/x_{E}) with charged hadrons",
1244 nptbins,ptmin,ptmax,200,0.,10.);
1245 fhPtHbpXECharged->SetYTitle("ln(1/x_{E})");
1246 fhPtHbpXECharged->SetXTitle("p_{T trigger} (GeV/c)");
1248 fhPtHbpXEUeCharged =
1249 new TH2F("hHbpXEUeCharged","#xi = ln(1/x_{E}) with charged hadrons,Underlying Event",
1250 nptbins,ptmin,ptmax,200,0.,10.);
1251 fhPtHbpXEUeCharged->SetYTitle("ln(1/x_{E})");
1252 fhPtHbpXEUeCharged->SetXTitle("p_{T trigger} (GeV/c)");
1255 new TH2F("hZTCharged","z_{T} for charged tracks",
1256 nptbins,ptmin,ptmax,200,0.,2.);
1257 fhZTCharged->SetYTitle("z_{T}");
1258 fhZTCharged->SetXTitle("p_{T trigger}");
1261 new TH2F("hZTUeCharged","z_{T} for Underlying Event",
1262 nptbins,ptmin,ptmax,200,0.,2.);
1263 fhZTUeCharged->SetYTitle("z_{T}");
1264 fhZTUeCharged->SetXTitle("p_{T trigger} (GeV/c)");
1267 new TH2F("hZTPositiveCharged","z_{T} for positive charged tracks",
1268 nptbins,ptmin,ptmax,200,0.,2.);
1269 fhZTPosCharged->SetYTitle("z_{T}");
1270 fhZTPosCharged->SetXTitle("p_{T trigger} (GeV/c)");
1273 new TH2F("hZTNegativeCharged","z_{T} for negative charged tracks",
1274 nptbins,ptmin,ptmax,200,0.,2.);
1275 fhZTNegCharged->SetYTitle("z_{T}");
1276 fhZTNegCharged->SetXTitle("p_{T trigger} (GeV/c)");
1279 new TH2F("hHbpZTCharged","#xi = ln(1/z_{T}) with charged hadrons",
1280 nptbins,ptmin,ptmax,200,0.,10.);
1281 fhPtHbpZTCharged->SetYTitle("ln(1/z_{T})");
1282 fhPtHbpZTCharged->SetXTitle("p_{T trigger} (GeV/c)");
1284 fhPtHbpZTUeCharged =
1285 new TH2F("hHbpZTUeCharged","#xi = ln(1/z_{T}) with charged hadrons,Underlying Event",
1286 nptbins,ptmin,ptmax,200,0.,10.);
1287 fhPtHbpZTUeCharged->SetYTitle("ln(1/x_{E})");
1288 fhPtHbpZTUeCharged->SetXTitle("p_{T trigger} (GeV/c)");
1291 new TH2F("hPtTrigPout","Pout with triggers",
1292 nptbins,ptmin,ptmax,2*nptbins,-ptmax,ptmax);
1293 fhPtTrigPout->SetYTitle("p_{out} (GeV/c)");
1294 fhPtTrigPout->SetXTitle("p_{T trigger} (GeV/c)");
1297 new TH2F("hPtTrigCharged","trigger and charged tracks pt distribution",
1298 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1299 fhPtTrigCharged->SetYTitle("p_{T h^{#pm}} (GeV/c)");
1300 fhPtTrigCharged->SetXTitle("p_{T trigger} (GeV/c)");
1302 outputContainer->Add(fhDeltaPhiDeltaEtaCharged);
1303 outputContainer->Add(fhDeltaPhiDeltaEtaChargedPtA3GeV);
1304 outputContainer->Add(fhPhiCharged) ;
1305 outputContainer->Add(fhEtaCharged) ;
1306 outputContainer->Add(fhDeltaPhiCharged) ;
1307 outputContainer->Add(fhDeltaPhiChargedPtA3GeV) ;
1308 outputContainer->Add(fhDeltaEtaCharged) ;
1309 outputContainer->Add(fhDeltaEtaChargedPtA3GeV) ;
1310 outputContainer->Add(fhDeltaPhiChargedPt) ;
1311 outputContainer->Add(fhDeltaPhiUeChargedPt) ;
1312 outputContainer->Add(fhUePart);
1314 outputContainer->Add(fhXECharged) ;
1318 for(Int_t i=0; i < 7; i++)
1321 fhDeltaPhiChargedMC[i] = new TH2F(Form("hDeltaPhiCharged_MC%s",nameMC[i].Data()),
1322 Form("#Delta #phi for charged tracks, trigger origin is %s",nameMC[i].Data()),
1323 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
1324 fhDeltaPhiChargedMC[i]->SetYTitle("x_{E}");
1325 fhDeltaPhiChargedMC[i]->SetXTitle("p_{T trigger} (GeV/c)");
1326 outputContainer->Add(fhDeltaPhiChargedMC[i]) ;
1328 fhXEChargedMC[i] = new TH2F(Form("hXECharged_MC%s",nameMC[i].Data()),
1329 Form("x_{E} for charged tracks, trigger origin is %s",nameMC[i].Data()),
1330 nptbins,ptmin,ptmax,200,0.,2.);
1331 fhXEChargedMC[i]->SetYTitle("x_{E}");
1332 fhXEChargedMC[i]->SetXTitle("p_{T trigger} (GeV/c)");
1333 outputContainer->Add(fhXEChargedMC[i]) ;
1337 outputContainer->Add(fhXEPosCharged) ;
1338 outputContainer->Add(fhXENegCharged) ;
1339 outputContainer->Add(fhXEUeCharged) ;
1340 outputContainer->Add(fhPtHbpXECharged) ;
1341 outputContainer->Add(fhPtHbpXEUeCharged) ;
1343 outputContainer->Add(fhZTCharged) ;
1344 outputContainer->Add(fhZTPosCharged) ;
1345 outputContainer->Add(fhZTNegCharged) ;
1346 outputContainer->Add(fhZTUeCharged) ;
1347 outputContainer->Add(fhPtHbpZTCharged) ;
1348 outputContainer->Add(fhPtHbpZTUeCharged) ;
1350 outputContainer->Add(fhPtTrigPout) ;
1351 outputContainer->Add(fhPtTrigCharged) ;
1353 if(fFillPileUpHistograms)
1355 fhDeltaPhiChargedOtherBC = new TH2F
1356 ("hDeltaPhiChargedOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}, track BC!=0",
1357 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1358 fhDeltaPhiChargedOtherBC->SetYTitle("#Delta #phi (rad)");
1359 fhDeltaPhiChargedOtherBC->SetXTitle("p_{T trigger} (GeV/c)");
1361 fhDeltaPhiChargedPtA3GeVOtherBC = new TH2F
1362 ("hDeltaPhiChargedPtA3GeVOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}, p_{TA}>3 GeV/c, track BC!=0",
1363 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1364 fhDeltaPhiChargedPtA3GeVOtherBC->SetYTitle("#Delta #phi (rad)");
1365 fhDeltaPhiChargedPtA3GeVOtherBC->SetXTitle("p_{T trigger} (GeV/c)");
1367 fhPtTrigChargedOtherBC =
1368 new TH2F("hPtTrigChargedOtherBC","trigger and charged tracks pt distribution, track BC!=0",
1369 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1370 fhPtTrigChargedOtherBC->SetYTitle("p_{T h^{#pm}} (GeV/c)");
1371 fhPtTrigChargedOtherBC->SetXTitle("p_{T trigger} (GeV/c)");
1373 fhXEChargedOtherBC =
1374 new TH2F("hXEChargedOtherBC","x_{E} for charged tracks, track BC!=0",
1375 nptbins,ptmin,ptmax,200,0.,2.);
1376 fhXEChargedOtherBC->SetYTitle("x_{E}");
1377 fhXEChargedOtherBC->SetXTitle("p_{T trigger} (GeV/c)");
1379 fhXEUeChargedOtherBC =
1380 new TH2F("hXEUeChargedOtherBC","x_{E} for Underlying Event, track BC!=0",
1381 nptbins,ptmin,ptmax,200,0.,2.);
1382 fhXEUeChargedOtherBC->SetYTitle("x_{E}");
1383 fhXEUeChargedOtherBC->SetXTitle("p_{T trigger} (GeV/c)");
1385 fhZTChargedOtherBC =
1386 new TH2F("hZTChargedOtherBC","z_{T} for charged tracks, track BC!=0",
1387 nptbins,ptmin,ptmax,200,0.,2.);
1388 fhZTChargedOtherBC->SetYTitle("z_{T}");
1389 fhZTChargedOtherBC->SetXTitle("p_{T trigger}");
1391 fhZTUeChargedOtherBC =
1392 new TH2F("hZTUeChargedOtherBC","z_{T} for Underlying Event, track BC!=0",
1393 nptbins,ptmin,ptmax,200,0.,2.);
1394 fhZTUeChargedOtherBC->SetYTitle("z_{T}");
1395 fhZTUeChargedOtherBC->SetXTitle("p_{T trigger} (GeV/c)");
1397 outputContainer->Add(fhDeltaPhiChargedOtherBC) ;
1398 outputContainer->Add(fhDeltaPhiChargedPtA3GeVOtherBC) ;
1399 outputContainer->Add(fhXEChargedOtherBC) ;
1400 outputContainer->Add(fhXEUeChargedOtherBC) ;
1401 outputContainer->Add(fhZTChargedOtherBC) ;
1402 outputContainer->Add(fhZTUeChargedOtherBC) ;
1403 outputContainer->Add(fhPtTrigChargedOtherBC) ;
1405 fhDeltaPhiChargedBC0 = new TH2F
1406 ("hDeltaPhiChargedBC0","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}, track BC==0",
1407 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1408 fhDeltaPhiChargedBC0->SetYTitle("#Delta #phi (rad)");
1409 fhDeltaPhiChargedBC0->SetXTitle("p_{T trigger} (GeV/c)");
1411 fhDeltaPhiChargedPtA3GeVBC0 = new TH2F
1412 ("hDeltaPhiChargedPtA3GeVBC0","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}, p_{TA}>3 GeV/c, track BC==0",
1413 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1414 fhDeltaPhiChargedPtA3GeVBC0->SetYTitle("#Delta #phi (rad)");
1415 fhDeltaPhiChargedPtA3GeVBC0->SetXTitle("p_{T trigger} (GeV/c)");
1417 fhPtTrigChargedBC0 =
1418 new TH2F("hPtTrigChargedBC0","trigger and charged tracks pt distribution, track BC==0",
1419 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1420 fhPtTrigChargedBC0->SetYTitle("p_{T h^{#pm}} (GeV/c)");
1421 fhPtTrigChargedBC0->SetXTitle("p_{T trigger} (GeV/c)");
1424 new TH2F("hXEChargedBC0","x_{E} for charged tracks, track BC==0",
1425 nptbins,ptmin,ptmax,200,0.,2.);
1426 fhXEChargedBC0->SetYTitle("x_{E}");
1427 fhXEChargedBC0->SetXTitle("p_{T trigger} (GeV/c)");
1430 new TH2F("hXEUeChargedBC0","x_{E} for Underlying Event, track BC==0",
1431 nptbins,ptmin,ptmax,200,0.,2.);
1432 fhXEUeChargedBC0->SetYTitle("x_{E}");
1433 fhXEUeChargedBC0->SetXTitle("p_{T trigger} (GeV/c)");
1436 new TH2F("hZTChargedBC0","z_{T} for charged tracks, track BC==0",
1437 nptbins,ptmin,ptmax,200,0.,2.);
1438 fhZTChargedBC0->SetYTitle("z_{T}");
1439 fhZTChargedBC0->SetXTitle("p_{T trigger}");
1442 new TH2F("hZTUeChargedBC0","z_{T} for Underlying Event, track BC==0",
1443 nptbins,ptmin,ptmax,200,0.,2.);
1444 fhZTUeChargedBC0->SetYTitle("z_{T}");
1445 fhZTUeChargedBC0->SetXTitle("p_{T trigger} (GeV/c)");
1447 outputContainer->Add(fhDeltaPhiChargedBC0) ;
1448 outputContainer->Add(fhDeltaPhiChargedPtA3GeVBC0) ;
1449 outputContainer->Add(fhXEChargedBC0) ;
1450 outputContainer->Add(fhXEUeChargedBC0) ;
1451 outputContainer->Add(fhZTChargedBC0) ;
1452 outputContainer->Add(fhZTUeChargedBC0) ;
1453 outputContainer->Add(fhPtTrigChargedBC0) ;
1455 fhPtLeadingVtxBC0 = new TH1F("hPtLeadingVtxBC0","p_{T} distribution of leading particles", nptbins,ptmin,ptmax);
1456 fhPtLeadingVtxBC0->SetXTitle("p_{T}^{trig} (GeV/c)");
1458 fhDeltaPhiChargedVtxBC0 = new TH2F
1459 ("hDeltaPhiChargedVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}, track BC==0",
1460 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1461 fhDeltaPhiChargedVtxBC0->SetYTitle("#Delta #phi (rad)");
1462 fhDeltaPhiChargedVtxBC0->SetXTitle("p_{T trigger} (GeV/c)");
1464 fhDeltaPhiChargedPtA3GeVVtxBC0 = new TH2F
1465 ("hDeltaPhiChargedPtA3GeVVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}, p_{TA}>3 GeV/c, track BC==0",
1466 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1467 fhDeltaPhiChargedPtA3GeVVtxBC0->SetYTitle("#Delta #phi (rad)");
1468 fhDeltaPhiChargedPtA3GeVVtxBC0->SetXTitle("p_{T trigger} (GeV/c)");
1470 fhPtTrigChargedVtxBC0 =
1471 new TH2F("hPtTrigChargedVtxBC0","trigger and charged tracks pt distribution, track BC==0",
1472 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1473 fhPtTrigChargedVtxBC0->SetYTitle("p_{T h^{#pm}} (GeV/c)");
1474 fhPtTrigChargedVtxBC0->SetXTitle("p_{T trigger} (GeV/c)");
1477 new TH2F("hXEChargedVtxBC0","x_{E} for charged tracks, track BC==0",
1478 nptbins,ptmin,ptmax,200,0.,2.);
1479 fhXEChargedVtxBC0->SetYTitle("x_{E}");
1480 fhXEChargedVtxBC0->SetXTitle("p_{T trigger} (GeV/c)");
1482 fhXEUeChargedVtxBC0 =
1483 new TH2F("hXEUeChargedVtxBC0","x_{E} for Underlying Event, track BC==0",
1484 nptbins,ptmin,ptmax,200,0.,2.);
1485 fhXEUeChargedVtxBC0->SetYTitle("x_{E}");
1486 fhXEUeChargedVtxBC0->SetXTitle("p_{T trigger} (GeV/c)");
1489 new TH2F("hZTChargedVtxBC0","z_{T} for charged tracks, track BC==0",
1490 nptbins,ptmin,ptmax,200,0.,2.);
1491 fhZTChargedVtxBC0->SetYTitle("z_{T}");
1492 fhZTChargedVtxBC0->SetXTitle("p_{T trigger}");
1494 fhZTUeChargedVtxBC0 =
1495 new TH2F("hZTUeChargedVtxBC0","z_{T} for Underlying Event, track BC==0",
1496 nptbins,ptmin,ptmax,200,0.,2.);
1497 fhZTUeChargedVtxBC0->SetYTitle("z_{T}");
1498 fhZTUeChargedVtxBC0->SetXTitle("p_{T trigger} (GeV/c)");
1500 outputContainer->Add(fhPtLeadingVtxBC0);
1501 outputContainer->Add(fhDeltaPhiChargedVtxBC0) ;
1502 outputContainer->Add(fhDeltaPhiChargedPtA3GeVVtxBC0) ;
1503 outputContainer->Add(fhXEChargedVtxBC0) ;
1504 outputContainer->Add(fhXEUeChargedVtxBC0) ;
1505 outputContainer->Add(fhZTChargedVtxBC0) ;
1506 outputContainer->Add(fhZTUeChargedVtxBC0) ;
1507 outputContainer->Add(fhPtTrigChargedVtxBC0) ;
1509 for(Int_t i = 0 ; i < 7 ; i++)
1511 fhPtLeadingPileUp[i] = new TH1F(Form("hPtLeadingPileUp%s",pileUpName[i].Data()),
1512 Form("p_{T} distribution of leading particles, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
1513 fhPtLeadingPileUp[i]->SetXTitle("p_{T}^{trig} (GeV/c)");
1514 outputContainer->Add(fhPtLeadingPileUp[i]);
1516 fhDeltaPhiChargedPileUp[i] = new TH2F(Form("hDeltaPhiChargedPileUp%s",pileUpName[i].Data()),
1517 Form("#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1518 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1519 fhDeltaPhiChargedPileUp[i]->SetYTitle("#Delta #phi (rad)");
1520 fhDeltaPhiChargedPileUp[i]->SetXTitle("p_{T trigger} (GeV/c)");
1521 outputContainer->Add(fhDeltaPhiChargedPileUp[i]) ;
1523 fhDeltaPhiChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaPhiChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1524 Form("#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}, p_{TA}>3 GeV/c, %s Pile-Up event",pileUpName[i].Data()),
1525 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1526 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #phi (rad)");
1527 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetXTitle("p_{T trigger} (GeV/c)");
1528 outputContainer->Add(fhDeltaPhiChargedPtA3GeVPileUp[i]) ;
1530 fhDeltaEtaChargedPileUp[i] = new TH2F(Form("hDeltaEtaChargedPileUp%s",pileUpName[i].Data()),
1531 Form("#eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1532 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1533 fhDeltaEtaChargedPileUp[i]->SetYTitle("#Delta #eta");
1534 fhDeltaEtaChargedPileUp[i]->SetXTitle("p_{T trigger} (GeV/c)");
1535 outputContainer->Add(fhDeltaEtaChargedPileUp[i]) ;
1537 fhDeltaEtaChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaEtaChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1538 Form("#eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger}, p_{TA}>3 GeV/c, %s Pile-Up event",pileUpName[i].Data()),
1539 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1540 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #eta");
1541 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetXTitle("p_{T trigger} (GeV/c)");
1542 outputContainer->Add(fhDeltaEtaChargedPtA3GeVPileUp[i]) ;
1544 fhXEChargedPileUp[i] = new TH2F(Form("hXEChargedPileUp%s",pileUpName[i].Data()),
1545 Form("x_{E} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1546 nptbins,ptmin,ptmax,200,0.,2.);
1547 fhXEChargedPileUp[i]->SetYTitle("x_{E}");
1548 fhXEChargedPileUp[i]->SetXTitle("p_{T trigger} (GeV/c)");
1549 outputContainer->Add(fhXEChargedPileUp[i]) ;
1551 fhXEUeChargedPileUp[i] = new TH2F(Form("hXEUeChargedPileUp%s",pileUpName[i].Data()),
1552 Form("x_{E} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1553 nptbins,ptmin,ptmax,200,0.,2.);
1554 fhXEUeChargedPileUp[i]->SetYTitle("x_{E}");
1555 fhXEUeChargedPileUp[i]->SetXTitle("p_{T trigger} (GeV/c)");
1556 outputContainer->Add(fhXEUeChargedPileUp[i]) ;
1558 fhZTChargedPileUp[i] = new TH2F(Form("hZTChargedPileUp%s",pileUpName[i].Data()),
1559 Form("z_{T} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1560 nptbins,ptmin,ptmax,200,0.,2.);
1561 fhZTChargedPileUp[i]->SetYTitle("z_{T}");
1562 fhZTChargedPileUp[i]->SetXTitle("p_{T trigger} (GeV/c)");
1563 outputContainer->Add(fhZTChargedPileUp[i]) ;
1565 fhZTUeChargedPileUp[i] = new TH2F(Form("hZTUeChargedPileUp%s",pileUpName[i].Data()),
1566 Form("z_{T} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1567 nptbins,ptmin,ptmax,200,0.,2.);
1568 fhZTUeChargedPileUp[i]->SetYTitle("z_{T}");
1569 fhZTUeChargedPileUp[i]->SetXTitle("p_{T trigger} (GeV/c)");
1570 outputContainer->Add(fhZTUeChargedPileUp[i]) ;
1572 fhPtTrigChargedPileUp[i] = new TH2F(Form("hPtTrigChargedPileUp%s",pileUpName[i].Data()),
1573 Form("trigger and charged tracks pt distribution, %s Pile-Up event",pileUpName[i].Data()),
1574 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1575 fhPtTrigChargedPileUp[i]->SetYTitle("p_{T h^{#pm}} (GeV/c)");
1576 fhPtTrigChargedPileUp[i]->SetXTitle("p_{T trigger} (GeV/c)");
1577 outputContainer->Add(fhPtTrigChargedPileUp[i]) ;
1584 Int_t nMultiBins = GetMultiBin();
1585 fhTrigDeltaPhiCharged = new TH2F*[nMultiBins] ;
1586 fhTrigDeltaEtaCharged = new TH2F*[nMultiBins] ;
1587 fhTrigXECorr = new TH2F*[nMultiBins] ;
1588 fhTrigXEUeCorr = new TH2F*[nMultiBins] ;
1589 fhTrigZTCorr = new TH2F*[nMultiBins] ;
1590 fhTrigZTUeCorr = new TH2F*[nMultiBins] ;
1592 for(Int_t im=0; im<nMultiBins; im++)
1594 fhTrigDeltaPhiCharged[im] = new TH2F
1595 (Form("hTrigDeltaPhiCharged_%d",im),Form("hTrigDeltaPhiCharged_%d",im), nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1596 fhTrigDeltaPhiCharged[im]->SetXTitle("p_{T trigger} (GeV/c)");
1597 fhTrigDeltaPhiCharged[im]->SetYTitle("#Delta #phi (rad)");
1599 fhTrigDeltaEtaCharged[im] = new TH2F
1600 (Form("hTrigDeltaEtaCharged_%d",im),Form("hTrigDeltaEtaCharged_%d",im), nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
1601 fhTrigDeltaEtaCharged[im]->SetXTitle("p_{T trigger} (GeV/c)");
1602 fhTrigDeltaEtaCharged[im]->SetYTitle("#Delta #eta");
1604 fhTrigXECorr[im] = new TH2F
1605 (Form("hTrigXEPtCorr_%d",im),Form("hTrigXEPtCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
1606 fhTrigXECorr[im]->SetYTitle("x_{E trigger h^{#pm}}");
1607 fhTrigXECorr[im]->SetXTitle("p_{T trigger} (GeV/c)");
1609 fhTrigXEUeCorr[im] = new TH2F
1610 (Form("hTrigXEPtUeCorr_%d",im),Form("hTrigXEPtUeCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
1611 fhTrigXEUeCorr[im]->SetYTitle("x_{E trigger h^{#pm}}");
1612 fhTrigXEUeCorr[im]->SetXTitle("p_{T trigger}(GeV/c)");
1614 fhTrigZTCorr[im] = new TH2F
1615 (Form("hTrigZTPtCorr_%d",im),Form("hTrigZTPtCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
1616 fhTrigZTCorr[im]->SetYTitle("z_{trigger h^{#pm}}");
1617 fhTrigZTCorr[im]->SetXTitle("p_{T trigger} (GeV/c)");
1619 fhTrigZTUeCorr[im] = new TH2F
1620 (Form("hTrigZTPtUeCorr_%d",im),Form("hTrigZTPtUeCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
1621 fhTrigZTUeCorr[im]->SetYTitle("z_{trigger h^{#pm}}");
1622 fhTrigZTUeCorr[im]->SetXTitle("p_{T trigger} (GeV/c)");
1624 outputContainer->Add(fhTrigDeltaPhiCharged[im]) ;
1625 outputContainer->Add(fhTrigDeltaEtaCharged[im]) ;
1626 outputContainer->Add(fhTrigXECorr[im]);
1627 outputContainer->Add(fhTrigXEUeCorr[im]);
1628 outputContainer->Add(fhTrigZTCorr[im]);
1629 outputContainer->Add(fhTrigZTUeCorr[im]);
1635 fhAssocPtBkg = new TH2F("hAssocPtBkg", " Trigger p_{T} vs associated hadron p_{T} from background",
1636 nptbins, ptmin, ptmax,nptbins,ptmin,ptmax);
1637 fhAssocPtBkg->SetXTitle("p_{T trigger} (GeV/c)");
1638 fhAssocPtBkg->SetYTitle("p_{T associated} (GeV/c)");
1639 outputContainer->Add(fhAssocPtBkg) ;
1641 fhDeltaPhiBrad = new TH2F("hDeltaPhiBrad","atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs p_{T trigger} ",
1642 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
1643 fhDeltaPhiBrad->SetXTitle("p_{T trigger} (GeV/c)");
1644 fhDeltaPhiBrad->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
1645 outputContainer->Add(fhDeltaPhiBrad) ;
1648 fhDeltaPhiDeltaEtaAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1649 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1650 fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
1651 fhDeltaPhiAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
1652 fhXEAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1653 fhZTAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1656 fhDeltaPhiBradAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1658 if(fPi0Trigger || fDecayTrigger)
1660 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1661 fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
1662 fhXEAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1663 fhZTAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1664 fhXEDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1665 fhZTDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1666 fhDeltaPhiDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1669 if(fHMPIDCorrelation)
1671 fhDeltaPhiAssocPtBinHMPID = new TH2F*[fNAssocPtBins*nz];
1672 fhDeltaPhiAssocPtBinHMPIDAcc= new TH2F*[fNAssocPtBins*nz];
1675 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
1677 for(Int_t z = 0 ; z < nz ; z++)
1684 tz = ", v_{z} bin "+z;
1687 //printf("iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
1689 fhDeltaPhiDeltaEtaAssocPtBin[bin] = new TH2F(Form("hDeltaPhiDeltaEtaPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1690 Form("#Delta #phi vs #Delta #eta for associated p_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1691 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1692 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
1693 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetYTitle("#Delta #eta");
1695 fhDeltaPhiAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1696 Form("#Delta #phi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1697 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1698 fhDeltaPhiAssocPtBin[bin]->SetXTitle("p_{T trigger} (GeV/c)");
1699 fhDeltaPhiAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
1701 fhDeltaPhiAssocPtBinDEta08[bin] = new TH2F(Form("hDeltaPhiDeltaEta0.8PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1702 Form("#Delta #phi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]%s, for #Delta #eta > 0.8", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1703 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1704 fhDeltaPhiAssocPtBinDEta08[bin]->SetXTitle("p_{T trigger} (GeV/c)");
1705 fhDeltaPhiAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
1707 fhDeltaPhiAssocPtBinDEta0[bin] = new TH2F(Form("hDeltaPhiDeltaEta0PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1708 Form("#Delta #phi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]%s, for #Delta #eta = 0.", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1709 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1710 fhDeltaPhiAssocPtBinDEta0[bin]->SetXTitle("p_{T trigger} (GeV/c)");
1711 fhDeltaPhiAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
1713 fhXEAssocPtBin[bin] = new TH2F(Form("hXEAssocPtBin%1.f_%1.f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1714 Form("x_{E} vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1715 nptbins, ptmin, ptmax,200, 0.0, 2.0);
1716 fhXEAssocPtBin[bin]->SetXTitle("p_{T trigger} (GeV/c)");
1717 fhXEAssocPtBin[bin]->SetYTitle("x_{E}");
1719 fhZTAssocPtBin[bin] = new TH2F(Form("hZTAssocPtBin%1.f_%1.f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1720 Form("z_{T} vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1721 nptbins, ptmin, ptmax,200, 0.0, 2.0);
1722 fhZTAssocPtBin[bin]->SetXTitle("p_{T trigger} (GeV/c)");
1723 fhZTAssocPtBin[bin]->SetYTitle("z_{T}");
1725 outputContainer->Add(fhDeltaPhiDeltaEtaAssocPtBin[bin]) ;
1726 outputContainer->Add(fhDeltaPhiAssocPtBin[bin]) ;
1727 outputContainer->Add(fhDeltaPhiAssocPtBinDEta08[bin]) ;
1728 outputContainer->Add(fhDeltaPhiAssocPtBinDEta0[bin]) ;
1729 outputContainer->Add(fhXEAssocPtBin[bin]);
1730 outputContainer->Add(fhZTAssocPtBin[bin]);
1732 if(fPi0Trigger || fDecayTrigger)
1734 fhDeltaPhiDecayChargedAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtDecayChargedAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1735 Form("#Delta #phi vs p_{T trigger} tagged as decay for associated p_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1736 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1737 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetXTitle("p_{T trigger} (GeV/c)");
1738 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
1740 fhXEDecayChargedAssocPtBin[bin] = new TH2F(Form("hXEDecayChargedAssocPtBin%1.f_%1.f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1741 Form("x_{E} vs p_{T trigger} tagged as decay for associated p_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1742 nptbins, ptmin, ptmax,200, 0.0, 2.0);
1743 fhXEDecayChargedAssocPtBin[bin]->SetXTitle("p_{T trigger} (GeV/c)");
1744 fhXEDecayChargedAssocPtBin[bin]->SetYTitle("x_{E}");
1746 fhZTDecayChargedAssocPtBin[bin] = new TH2F(Form("hZTDecayChargedAssocPtBin%1.f_%1.f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1747 Form("z_{T} vs p_{T trigger} tagged as decay for associated p_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1748 nptbins, ptmin, ptmax,200, 0.0, 2.0);
1749 fhZTDecayChargedAssocPtBin[bin]->SetXTitle("p_{T trigger} (GeV/c)");
1750 fhZTDecayChargedAssocPtBin[bin]->SetYTitle("z_{T}");
1752 outputContainer->Add(fhDeltaPhiDecayChargedAssocPtBin[bin]) ;
1753 outputContainer->Add(fhXEDecayChargedAssocPtBin[bin]);
1754 outputContainer->Add(fhZTDecayChargedAssocPtBin[bin]);
1760 fhDeltaPhiBradAssocPtBin[bin] = new TH2F(Form("hDeltaPhiBradPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1761 Form("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1762 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
1763 fhDeltaPhiBradAssocPtBin[bin]->SetXTitle("p_{T trigger} (GeV/c)");
1764 fhDeltaPhiBradAssocPtBin[bin]->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
1765 outputContainer->Add(fhDeltaPhiBradAssocPtBin[bin]) ;
1768 if(fHMPIDCorrelation)
1770 fhDeltaPhiAssocPtBinHMPID[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPID", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1771 Form("#Delta #phi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]%s, with track having HMPID signal", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1772 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1773 fhDeltaPhiAssocPtBinHMPID[bin]->SetXTitle("p_{T trigger} (GeV/c)" );
1774 fhDeltaPhiAssocPtBinHMPID[bin]->SetYTitle("#Delta #phi (rad)");
1776 fhDeltaPhiAssocPtBinHMPIDAcc[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPIDAcc", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1777 Form("#Delta #phi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]%s, with track within 5<phi<20 deg", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1778 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1779 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetXTitle("p_{T trigger} (GeV/c)");
1780 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetYTitle("#Delta #phi (rad)");
1782 outputContainer->Add(fhDeltaPhiAssocPtBinHMPID[bin]) ;
1783 outputContainer->Add(fhDeltaPhiAssocPtBinHMPIDAcc[bin]) ;
1789 if(fPi0Trigger || fDecayTrigger)
1793 fhPtPi0DecayRatio = new TH2F
1794 ("hPtPi0DecayRatio","p_{T} of #pi^{0} and the ratio of pt for two decay",
1795 nptbins,ptmin,ptmax, 100,0.,2.);
1796 fhPtPi0DecayRatio->SetXTitle("p_{T}^{#pi^{0}} (GeV/c)");
1797 fhPtPi0DecayRatio->SetYTitle("p_{T}^{Decay}/p_{T}^{#pi^{0}}");
1798 outputContainer->Add(fhPtPi0DecayRatio) ;
1801 fhDeltaPhiDecayCharged = new TH2F
1802 ("hDeltaPhiDecayCharged","#phi_{Decay} - #phi_{h^{#pm}} vs p_{T Decay}",
1803 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1804 fhDeltaPhiDecayCharged->SetYTitle("#Delta #phi (rad)");
1805 fhDeltaPhiDecayCharged->SetXTitle("p_{T Decay} (GeV/c)");
1808 new TH2F("hXEDecayCharged","x_{E} Decay",
1809 nptbins,ptmin,ptmax,200,0.,2.);
1810 fhXEDecayCharged->SetYTitle("x_{E}");
1811 fhXEDecayCharged->SetXTitle("p_{T decay} (GeV/c)");
1814 new TH2F("hZTDecayCharged","z_{trigger h^{#pm}} = p_{T h^{#pm}} / p_{T Decay}",
1815 nptbins,ptmin,ptmax,200,0.,2.);
1816 fhZTDecayCharged->SetYTitle("z_{decay h^{#pm}}");
1817 fhZTDecayCharged->SetXTitle("p_{T decay} (GeV/c)");
1819 outputContainer->Add(fhDeltaPhiDecayCharged) ;
1820 outputContainer->Add(fhXEDecayCharged) ;
1821 outputContainer->Add(fhZTDecayCharged) ;
1826 fhDeltaPhiUeLeftCharged = new TH2F
1827 ("hDeltaPhiUeLeftChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE left side range of trigger particles",
1828 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1829 fhDeltaPhiUeLeftCharged->SetYTitle("#Delta #phi (rad)");
1830 fhDeltaPhiUeLeftCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1831 outputContainer->Add(fhDeltaPhiUeLeftCharged) ;
1833 fhDeltaPhiUeRightCharged = new TH2F
1834 ("hDeltaPhiUeRightChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE right side range of trigger particles",
1835 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1836 fhDeltaPhiUeRightCharged->SetYTitle("#Delta #phi (rad)");
1837 fhDeltaPhiUeRightCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1838 outputContainer->Add(fhDeltaPhiUeRightCharged) ;
1840 fhDeltaPhiUeLeftUpCharged = new TH2F
1841 ("hDeltaPhiUeLeftUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE left Up side range of trigger particles",
1842 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1843 fhDeltaPhiUeLeftUpCharged->SetYTitle("#Delta #phi (rad)");
1844 fhDeltaPhiUeLeftUpCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1845 outputContainer->Add(fhDeltaPhiUeLeftUpCharged) ;
1847 fhDeltaPhiUeRightUpCharged = new TH2F
1848 ("hDeltaPhiUeRightUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE right Up side range of trigger particles",
1849 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1850 fhDeltaPhiUeRightUpCharged->SetYTitle("#Delta #phi (rad)");
1851 fhDeltaPhiUeRightUpCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1852 outputContainer->Add(fhDeltaPhiUeRightUpCharged) ;
1854 fhDeltaPhiUeLeftDownCharged = new TH2F
1855 ("hDeltaPhiUeLeftDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE left Down side range of trigger particles",
1856 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1857 fhDeltaPhiUeLeftDownCharged->SetYTitle("#Delta #phi (rad)");
1858 fhDeltaPhiUeLeftDownCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1859 outputContainer->Add(fhDeltaPhiUeLeftDownCharged) ;
1861 fhDeltaPhiUeRightDownCharged = new TH2F
1862 ("hDeltaPhiUeRightDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE right Down side range of trigger particles",
1863 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1864 fhDeltaPhiUeRightDownCharged->SetYTitle("#Delta #phi (rad)");
1865 fhDeltaPhiUeRightDownCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1866 outputContainer->Add(fhDeltaPhiUeRightDownCharged) ;
1869 new TH2F("hXEUeChargedLeft","x_{E} with UE left side of trigger",
1870 nptbins,ptmin,ptmax,200,0.,2.);
1871 fhXEUeLeftCharged->SetYTitle("x_{E Ueh^{#pm}}");
1872 fhXEUeLeftCharged->SetXTitle("p_{T trigger} (GeV/c)");
1873 outputContainer->Add(fhXEUeLeftCharged) ;
1875 fhXEUeRightCharged =
1876 new TH2F("hXEUeChargedRight","x_{E h^{#pm}} with UE right side of trigger",
1877 nptbins,ptmin,ptmax,200,0.,2.);
1878 fhXEUeRightCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
1879 fhXEUeRightCharged->SetXTitle("p_{T trigger} (GeV/c)");
1880 outputContainer->Add(fhXEUeRightCharged) ;
1882 fhXEUeLeftUpCharged =
1883 new TH2F("hXEUeChargedLeftUp","x_{E} with UE left Up side of trigger",
1884 nptbins,ptmin,ptmax,200,0.,2.);
1885 fhXEUeLeftUpCharged->SetYTitle("x_{E Ueh^{#pm}}");
1886 fhXEUeLeftUpCharged->SetXTitle("p_{T trigger} (GeV/c)");
1887 outputContainer->Add(fhXEUeLeftUpCharged) ;
1889 fhXEUeRightUpCharged =
1890 new TH2F("hXEUeChargedRightUp","x_{E h^{#pm}} with UE right Up side of trigger",
1891 nptbins,ptmin,ptmax,200,0.,2.);
1892 fhXEUeRightUpCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
1893 fhXEUeRightUpCharged->SetXTitle("p_{T trigger} (GeV/c)");
1894 outputContainer->Add(fhXEUeRightUpCharged) ;
1896 fhXEUeLeftDownCharged =
1897 new TH2F("hXEUeChargedLeftDown","x_{E} with UE left Down side of trigger",
1898 nptbins,ptmin,ptmax,200,0.,2.);
1899 fhXEUeLeftDownCharged->SetYTitle("x_{E Ueh^{#pm}}");
1900 fhXEUeLeftDownCharged->SetXTitle("p_{T trigger} (GeV/c)");
1901 outputContainer->Add(fhXEUeLeftDownCharged) ;
1903 fhXEUeRightDownCharged =
1904 new TH2F("hXEUeChargedRightDown","x_{E h^{#pm}} with UE right Down side of trigger",
1905 nptbins,ptmin,ptmax,200,0.,2.);
1906 fhXEUeRightDownCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
1907 fhXEUeRightDownCharged->SetXTitle("p_{T trigger} (GeV/c)");
1908 outputContainer->Add(fhXEUeRightDownCharged) ;
1910 fhPtHbpXEUeLeftCharged =
1911 new TH2F("hHbpXEUeChargedLeft","#xi = ln(1/x_{E}) with charged UE left side of trigger",
1912 nptbins,ptmin,ptmax,200,0.,10.);
1913 fhPtHbpXEUeLeftCharged->SetYTitle("ln(1/x_{E})");
1914 fhPtHbpXEUeLeftCharged->SetXTitle("p_{T trigger} (GeV/c)");
1915 outputContainer->Add(fhPtHbpXEUeLeftCharged) ;
1917 fhPtHbpXEUeRightCharged =
1918 new TH2F("hHbpXEUeChargedRight","#xi = ln(1/x_{E}) with charged UE right side of trigger",
1919 nptbins,ptmin,ptmax,200,0.,10.);
1920 fhPtHbpXEUeRightCharged->SetYTitle("ln(1/x_{E})");
1921 fhPtHbpXEUeRightCharged->SetXTitle("p_{T trigger} (GeV/c)");
1922 outputContainer->Add(fhPtHbpXEUeRightCharged) ;
1925 new TH2F("hZTUeChargedLeft","z_{trigger h^{#pm}} = p_{T Ueh^{#pm}} / p_{T trigger} with UE left side of trigger",
1926 nptbins,ptmin,ptmax,200,0.,2.);
1927 fhZTUeLeftCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
1928 fhZTUeLeftCharged->SetXTitle("p_{T trigger} (GeV/c)");
1929 outputContainer->Add(fhZTUeLeftCharged) ;
1931 fhZTUeRightCharged =
1932 new TH2F("hZTUeChargedRight","z_{trigger h^{#pm}} = p_{T Ueh^{#pm}} / p_{T trigger} with UE right side of trigger",
1933 nptbins,ptmin,ptmax,200,0.,2.);
1934 fhZTUeRightCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
1935 fhZTUeRightCharged->SetXTitle("p_{T trigger} (GeV/c)");
1936 outputContainer->Add(fhZTUeRightCharged) ;
1938 fhPtHbpZTUeLeftCharged =
1939 new TH2F("hHbpZTUeChargedLeft","#xi = ln(1/z_{T}) with charged UE left side of trigger",
1940 nptbins,ptmin,ptmax,200,0.,10.);
1941 fhPtHbpZTUeLeftCharged->SetYTitle("ln(1/z_{T})");
1942 fhPtHbpZTUeLeftCharged->SetXTitle("p_{T trigger} (GeV/c)");
1943 outputContainer->Add(fhPtHbpZTUeLeftCharged) ;
1945 fhPtHbpZTUeRightCharged =
1946 new TH2F("hHbpZTUeChargedRight","#xi = ln(1/z_{T}) with charged UE right side of trigger",
1947 nptbins,ptmin,ptmax,200,0.,10.);
1948 fhPtHbpZTUeRightCharged->SetYTitle("ln(1/z_{T})");
1949 fhPtHbpZTUeRightCharged->SetXTitle("p_{T trigger} (GeV/c)");
1950 outputContainer->Add(fhPtHbpZTUeRightCharged) ;
1953 } //Correlation with charged hadrons
1955 //Correlation with neutral hadrons
1958 fhDeltaPhiDeltaEtaNeutral = new TH2F
1959 ("hDeltaPhiDeltaEtaNeutral","#phi_{trigger} - #phi_{h^{0}} vs #eta_{trigger} - #eta_{h^{0}}",
1960 ndeltaphibins ,deltaphimin,deltaphimax, ndeltaetabins ,deltaetamin,deltaetamax);
1961 fhDeltaPhiDeltaEtaNeutral->SetXTitle("#Delta #phi (rad)");
1962 fhDeltaPhiDeltaEtaNeutral->SetYTitle("#Delta #eta");
1964 fhPhiNeutral = new TH2F
1965 ("hPhiNeutral","#phi_{#pi^{0}} vs p_{T #pi^{0}}",
1966 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1967 fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)");
1968 fhPhiNeutral->SetXTitle("p_{T #pi^{0}} (GeV/c)");
1970 fhEtaNeutral = new TH2F
1971 ("hEtaNeutral","#eta_{#pi^{0}} vs p_{T #pi^{0}}",
1972 nptbins,ptmin,ptmax,netabins,etamin,etamax);
1973 fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)");
1974 fhEtaNeutral->SetXTitle("p_{T #pi^{0}} (GeV/c)");
1976 fhDeltaPhiNeutral = new TH2F
1977 ("hDeltaPhiNeutral","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T trigger}",
1978 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1979 fhDeltaPhiNeutral->SetYTitle("#Delta #phi (rad)");
1980 fhDeltaPhiNeutral->SetXTitle("p_{T trigger} (GeV/c)");
1982 fhDeltaPhiNeutralPt = new TH2F
1983 ("hDeltaPhiNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T #pi^{0}}}",
1984 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1985 fhDeltaPhiNeutralPt->SetYTitle("#Delta #phi (rad)");
1986 fhDeltaPhiNeutralPt->SetXTitle("p_{T h^{0}} (GeV/c)");
1988 fhDeltaPhiUeNeutralPt = new TH2F
1989 ("hDeltaPhiUeNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T #pi^{0}}}",
1990 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1991 fhDeltaPhiUeNeutralPt->SetYTitle("#Delta #phi (rad)");
1992 fhDeltaPhiUeNeutralPt->SetXTitle("p_{T h^{0}} (GeV/c)");
1994 fhDeltaEtaNeutral = new TH2F
1995 ("hDeltaEtaNeutral","#eta_{trigger} - #eta_{#pi^{0}} vs p_{T trigger}",
1996 nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
1997 fhDeltaEtaNeutral->SetYTitle("#Delta #eta");
1998 fhDeltaEtaNeutral->SetXTitle("p_{T trigger} (GeV/c)");
2001 new TH2F("hXENeutral","x_{E} for #pi^{0} associated",
2002 nptbins,ptmin,ptmax,200,0.,2.);
2003 fhXENeutral->SetYTitle("x_{E}");
2004 fhXENeutral->SetXTitle("p_{T trigger} (GeV/c)");
2007 new TH2F("hXEUeNeutral","x_{E} for #pi^{0} associated",
2008 nptbins,ptmin,ptmax,200,0.,2.);
2009 fhXEUeNeutral->SetYTitle("x_{E}");
2010 fhXEUeNeutral->SetXTitle("p_{T trigger} (GeV/c)");
2013 new TH2F("hHbpXENeutral","#xi = ln(1/x_{E})for #pi^{0} associated",
2014 nptbins,ptmin,ptmax,200,0.,10.);
2015 fhPtHbpXENeutral->SetYTitle("ln(1/x_{E})");
2016 fhPtHbpXENeutral->SetXTitle("p_{T trigger} (GeV/c)");
2018 fhPtHbpXEUeNeutral =
2019 new TH2F("hHbpXEUeNeutral","#xi = ln(1/x_{E}) for #pi^{0} associated",
2020 nptbins,ptmin,ptmax,200,0.,10.);
2021 fhPtHbpXEUeNeutral->SetYTitle("ln(1/x_{E})");
2022 fhPtHbpXEUeNeutral->SetXTitle("p_{T trigger} (GeV/c)");
2025 new TH2F("hZTNeutral","z_{trigger #pi} = p_{T #pi^{0}} / p_{T trigger} for #pi^{0} associated",
2026 nptbins,ptmin,ptmax,200,0.,2.);
2027 fhZTNeutral->SetYTitle("z_{trigger #pi^{0}}");
2028 fhZTNeutral->SetXTitle("p_{T trigger} (GeV/c)");
2031 new TH2F("hZTUeNeutral","z_{trigger #pi} = p_{T #pi^{0}} / p_{T trigger} for #pi^{0} associated",
2032 nptbins,ptmin,ptmax,200,0.,2.);
2033 fhZTUeNeutral->SetYTitle("z_{trigger #pi^{0}}");
2034 fhZTUeNeutral->SetXTitle("p_{T trigger} (GeV/c)");
2037 new TH2F("hHbpZTNeutral","#xi = ln(1/x_{E}) for #pi^{0} associated",
2038 nptbins,ptmin,ptmax,200,0.,10.);
2039 fhPtHbpZTNeutral->SetYTitle("ln(1/z_{T})");
2040 fhPtHbpZTNeutral->SetXTitle("p_{T trigger}");
2042 fhPtHbpZTUeNeutral =
2043 new TH2F("hHbpZTUeNeutral","#xi = ln(1/x_{E}) for #pi^{0} associated",
2044 nptbins,ptmin,ptmax,200,0.,10.);
2045 fhPtHbpXEUeNeutral->SetYTitle("ln(1/z_{T})");
2046 fhPtHbpXEUeNeutral->SetXTitle("p_{T trigger} (GeV/c)");
2048 outputContainer->Add(fhDeltaPhiDeltaEtaNeutral);
2049 outputContainer->Add(fhPhiNeutral) ;
2050 outputContainer->Add(fhEtaNeutral) ;
2051 outputContainer->Add(fhDeltaPhiNeutral) ;
2052 outputContainer->Add(fhDeltaPhiNeutralPt) ;
2053 outputContainer->Add(fhDeltaPhiUeNeutralPt) ;
2054 outputContainer->Add(fhDeltaEtaNeutral) ;
2055 outputContainer->Add(fhXENeutral) ;
2056 outputContainer->Add(fhXEUeNeutral) ;
2057 outputContainer->Add(fhPtHbpXENeutral) ;
2058 outputContainer->Add(fhPtHbpXEUeNeutral) ;
2059 outputContainer->Add(fhZTNeutral) ;
2060 outputContainer->Add(fhZTUeNeutral) ;
2061 outputContainer->Add(fhPtHbpZTNeutral) ;
2062 outputContainer->Add(fhPtHbpZTUeNeutral) ;
2064 if(fPi0Trigger || fDecayTrigger)
2066 fhDeltaPhiDecayNeutral = new TH2F
2067 ("hDeltaPhiDecayNeutral","#phi_{Decay} - #phi_{h^{0}} vs p_{T Decay}",
2068 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2069 fhDeltaPhiDecayNeutral->SetYTitle("#Delta #phi (rad)");
2070 fhDeltaPhiDecayNeutral->SetXTitle("p_{T Decay} (GeV/c)");
2073 new TH2F("hXEDecayNeutral","x_{E} for decay trigger",
2074 nptbins,ptmin,ptmax,200,0.,2.);
2075 fhXEDecayNeutral->SetYTitle("x_{E}");
2076 fhXEDecayNeutral->SetXTitle("p_{T decay}");
2079 new TH2F("hZTDecayNeutral","z_{trigger h^{0}} = p_{T h^{0}} / p_{T Decay}",
2080 nptbins,ptmin,ptmax,200,0.,2.);
2081 fhZTDecayNeutral->SetYTitle("z_{h^{0}}");
2082 fhZTDecayNeutral->SetXTitle("p_{T decay}");
2084 outputContainer->Add(fhDeltaPhiDecayNeutral) ;
2085 outputContainer->Add(fhXEDecayNeutral) ;
2086 outputContainer->Add(fhZTDecayNeutral) ;
2092 fhDeltaPhiUeLeftNeutral = new TH2F
2093 ("hDeltaPhiUeLeftNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs p_{T h^{0}} with neutral UE left side range of trigger particles",
2094 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2095 fhDeltaPhiUeLeftNeutral->SetYTitle("#Delta #phi (rad)");
2096 fhDeltaPhiUeLeftNeutral->SetXTitle("p_{T h^{0}} (GeV/c)");
2097 outputContainer->Add(fhDeltaPhiUeLeftNeutral) ;
2099 fhDeltaPhiUeRightNeutral = new TH2F
2100 ("hDeltaPhiUeRightNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs p_{T Ueh^{0}} with neutral UE right side range of trigger particles",
2101 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2102 fhDeltaPhiUeRightNeutral->SetYTitle("#Delta #phi (rad)");
2103 fhDeltaPhiUeRightNeutral->SetXTitle("p_{T h^{0}} (GeV/c)");
2104 outputContainer->Add(fhDeltaPhiUeRightNeutral) ;
2107 new TH2F("hXEUeNeutralLeft","x_{E} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE left side of trigger",
2108 nptbins,ptmin,ptmax,140,0.,2.);
2109 fhXEUeLeftNeutral->SetYTitle("z_{trigger Ueh^{0}}");
2110 fhXEUeLeftNeutral->SetXTitle("p_{T trigger} (GeV/c)");
2111 outputContainer->Add(fhXEUeLeftNeutral) ;
2113 fhXEUeRightNeutral =
2114 new TH2F("hXEUeNeutralRight","x_{E} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE right side of trigger",
2115 nptbins,ptmin,ptmax,200,0.,2.);
2116 fhXEUeRightNeutral->SetYTitle("z_{trigger Ueh^{0}}");
2117 fhXEUeRightNeutral->SetXTitle("p_{T trigger} (GeV/c)");
2118 outputContainer->Add(fhXEUeRightNeutral) ;
2120 fhPtHbpXEUeLeftNeutral =
2121 new TH2F("hHbpXEUeNeutralLeft","#xi = ln(1/x_{E}) with neutral UE left side of trigger",
2122 nptbins,ptmin,ptmax,200,0.,10.);
2123 fhPtHbpXEUeLeftNeutral->SetYTitle("ln(1/x_{E})");
2124 fhPtHbpXEUeLeftNeutral->SetXTitle("p_{T trigger} (GeV/c)");
2125 outputContainer->Add(fhPtHbpXEUeLeftNeutral) ;
2127 fhPtHbpXEUeRightNeutral =
2128 new TH2F("hHbpXEUeNeutralRight","#xi = ln(1/x_{E}) with neutral UE right side of trigger",
2129 nptbins,ptmin,ptmax,200,0.,10.);
2130 fhPtHbpXEUeRightNeutral->SetYTitle("ln(1/x_{E})");
2131 fhPtHbpXEUeRightNeutral->SetXTitle("p_{T trigger} (GeV/c)");
2132 outputContainer->Add(fhPtHbpXEUeRightNeutral) ;
2135 new TH2F("hZTUeNeutralLeft","z_{trigger h^{0}} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE left side of trigger",
2136 nptbins,ptmin,ptmax,140,0.,2.);
2137 fhZTUeLeftNeutral->SetYTitle("z_{trigger Ueh^{0}}");
2138 fhZTUeLeftNeutral->SetXTitle("p_{T trigger} (GeV/c)");
2139 outputContainer->Add(fhZTUeLeftNeutral) ;
2141 fhZTUeRightNeutral =
2142 new TH2F("hZTUeNeutralRight","z_{trigger h^{0}} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE right side of trigger",
2143 nptbins,ptmin,ptmax,200,0.,2.);
2144 fhZTUeRightNeutral->SetYTitle("z_{trigger Ueh^{0}}");
2145 fhZTUeRightNeutral->SetXTitle("p_{T trigger} (GeV/c)");
2146 outputContainer->Add(fhZTUeRightNeutral) ;
2148 fhPtHbpZTUeLeftNeutral =
2149 new TH2F("hHbpZTUeNeutralLeft","#xi = ln(1/z_{T}) with neutral UE left side of trigger",
2150 nptbins,ptmin,ptmax,200,0.,10.);
2151 fhPtHbpZTUeLeftNeutral->SetYTitle("ln(1/z_{T})");
2152 fhPtHbpZTUeLeftNeutral->SetXTitle("p_{T trigger}");
2153 outputContainer->Add(fhPtHbpZTUeLeftNeutral) ;
2155 fhPtHbpZTUeRightNeutral =
2156 new TH2F("hHbpZTUeNeutralRight","#xi = ln(1/z_{T}) with neutral UE right side of trigger",
2157 nptbins,ptmin,ptmax,200,0.,10.);
2158 fhPtHbpZTUeRightNeutral->SetYTitle("ln(1/z_{T})");
2159 fhPtHbpZTUeRightNeutral->SetXTitle("p_{T trigger}");
2160 outputContainer->Add(fhPtHbpZTUeRightNeutral) ;
2164 }//Correlation with neutral hadrons
2166 //if data is MC, fill more histograms
2169 fh2phiLeadingParticle=new TH2F("h2phiLeadingParticle","#phi resolustion for trigger particles",nptbins,ptmin,ptmax,100,-1,1);
2170 fh2phiLeadingParticle->GetXaxis()->SetTitle("p_{T gen Leading} (GeV/c)");
2171 fh2phiLeadingParticle->GetYaxis()->SetTitle("(#phi_{rec}-#phi_{gen})/#phi_{gen}");
2173 fhMCPtLeading = new TH1F ("hMCPtLeading","MC : p_{T} distribution of leading particles", nptbins,ptmin,ptmax);
2174 fhMCPtLeading->SetXTitle("p_{T}^{trig} (GeV/c)");
2176 fhMCPhiLeading = new TH2F ("hMCPhiLeading","MC : #phi distribution of leading Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2177 fhMCPhiLeading->SetYTitle("#phi (rad)");
2179 fhMCEtaLeading = new TH2F ("hMCEtaLeading","MC : #eta distribution of leading",nptbins,ptmin,ptmax, netabins,etamin,etamax);
2180 fhMCEtaLeading->SetYTitle("#eta ");
2183 fhMCEtaCharged = new TH2F
2184 ("hMCEtaCharged","MC #eta_{h^{#pm}} vs p_{T #pm}",
2185 nptbins,ptmin,ptmax,netabins,etamin,etamax);
2186 fhMCEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
2187 fhMCEtaCharged->SetXTitle("p_{T #pm} (GeV/c)");
2189 fhMCPhiCharged = new TH2F
2190 ("hMCPhiCharged","#MC phi_{h^{#pm}} vs p_{T #pm}",
2191 200,ptmin,ptmax,nphibins,phimin,phimax);
2192 fhMCPhiCharged->SetYTitle("MC #phi_{h^{#pm}} (rad)");
2193 fhMCPhiCharged->SetXTitle("p_{T #pm} (GeV/c)");
2195 fhMCDeltaPhiDeltaEtaCharged = new TH2F
2196 ("hMCDeltaPhiDeltaEtaCharged","#MC phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
2197 140,-2.,5.,200,-2,2);
2198 fhMCDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
2199 fhMCDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
2201 fhMCDeltaEtaCharged = new TH2F
2202 ("hMCDeltaEtaCharged","MC #eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger} and p_{T assoc}",
2203 nptbins,ptmin,ptmax,200,-2,2);
2204 fhMCDeltaEtaCharged->SetYTitle("#Delta #eta");
2205 fhMCDeltaEtaCharged->SetXTitle("p_{T trigger} (GeV/c)");
2207 fhMCDeltaPhiCharged = new TH2F
2208 ("hMCDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}",
2209 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2210 fhMCDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
2211 fhMCDeltaPhiCharged->SetXTitle("p_{T trigger} (GeV/c)");
2213 fhMCDeltaPhiChargedPt = new TH2F
2214 ("hMCDeltaPhiChargedPt","MC #phi_{trigger} - #phi_{#h^{#pm}} vs p_{T h^{#pm}}",
2215 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2216 fhMCDeltaPhiChargedPt->SetYTitle("#Delta #phi (rad)");
2217 fhMCDeltaPhiChargedPt->SetXTitle("p_{T h^{#pm}} (GeV/c)");
2220 new TH2F("hMCPtXECharged","x_{E}",
2221 nptbins,ptmin,ptmax,200,0.,2.);
2222 fhMCPtXECharged->SetYTitle("x_{E}");
2223 fhMCPtXECharged->SetXTitle("p_{T trigger} (GeV/c)");
2226 new TH2F("hMCPtXEUeCharged","x_{E}",
2227 nptbins,ptmin,ptmax,200,0.,2.);
2228 fhMCPtXEUeCharged->SetYTitle("x_{E}");
2229 fhMCPtXEUeCharged->SetXTitle("p_{T trigger} (GeV/c)");
2231 fhMCPtHbpXECharged =
2232 new TH2F("hMCHbpXECharged","MC #xi = ln(1/x_{E}) with charged hadrons",
2233 nptbins,ptmin,ptmax,200,0.,10.);
2234 fhMCPtHbpXECharged->SetYTitle("ln(1/x_{E})");
2235 fhMCPtHbpXECharged->SetXTitle("p_{T trigger}");
2237 fhMCPtHbpXEUeCharged =
2238 new TH2F("hMCPtHbpXEUeCharged","#xi = ln(1/x_{E}) with charged hadrons,Underlying Event",
2239 nptbins,ptmin,ptmax,200,0.,10.);
2240 fhMCPtHbpXEUeCharged->SetYTitle("ln(1/x_{E})");
2241 fhMCPtHbpXEUeCharged->SetXTitle("p_{T trigger} (GeV/c)");
2244 new TH1F("hMCUePart","MC UE particles distribution vs pt trig",
2245 nptbins,ptmin,ptmax);
2246 fhMCUePart->SetYTitle("dNch");
2247 fhMCUePart->SetXTitle("p_{T trigger} (GeV/c)");
2250 new TH2F("hMCPtZTCharged","z_{T}",
2251 nptbins,ptmin,ptmax,200,0.,2.);
2252 fhMCPtZTCharged->SetYTitle("z_{T}");
2253 fhMCPtZTCharged->SetXTitle("p_{T trigger} (GeV/c)");
2255 fhMCPtHbpZTCharged =
2256 new TH2F("hMCHbpZTCharged","MC #xi = ln(1/z_{T}) with charged hadrons",
2257 nptbins,ptmin,ptmax,200,0.,10.);
2258 fhMCPtHbpZTCharged->SetYTitle("ln(1/z_{T})");
2259 fhMCPtHbpZTCharged->SetXTitle("p_{T trigger} (GeV/c)");
2262 new TH2F("hMCPtTrigPout","AOD MC Pout with triggers",
2263 nptbins,ptmin,ptmax,2*nptbins,-ptmax,ptmax);
2264 fhMCPtTrigPout->SetYTitle("p_{out} (GeV/c)");
2265 fhMCPtTrigPout->SetXTitle("p_{T trigger} (GeV/c)");
2267 fhMCPtAssocDeltaPhi =
2268 new TH2F("hMCPtAssocDeltaPhi","AOD MC delta phi with associated charged hadrons",
2269 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2270 fhMCPtAssocDeltaPhi->SetYTitle("#Delta #phi (rad)");
2271 fhMCPtAssocDeltaPhi->SetXTitle("p_{T trigger} (GeV/c)");
2273 outputContainer->Add(fh2phiLeadingParticle);
2274 outputContainer->Add(fhMCPtLeading);
2275 outputContainer->Add(fhMCPhiLeading);
2276 outputContainer->Add(fhMCEtaLeading);
2277 outputContainer->Add(fhMCDeltaPhiDeltaEtaCharged);
2278 outputContainer->Add(fhMCPhiCharged) ;
2279 outputContainer->Add(fhMCEtaCharged) ;
2280 outputContainer->Add(fhMCDeltaEtaCharged) ;
2281 outputContainer->Add(fhMCDeltaPhiCharged) ;
2283 outputContainer->Add(fhMCDeltaPhiChargedPt) ;
2284 outputContainer->Add(fhMCPtXECharged) ;
2285 outputContainer->Add(fhMCPtXEUeCharged) ;
2286 outputContainer->Add(fhMCPtZTCharged) ;
2287 outputContainer->Add(fhMCPtHbpXECharged) ;
2288 outputContainer->Add(fhMCPtHbpXEUeCharged);
2289 outputContainer->Add(fhMCUePart);
2290 outputContainer->Add(fhMCPtHbpZTCharged) ;
2291 outputContainer->Add(fhMCPtTrigPout) ;
2292 outputContainer->Add(fhMCPtAssocDeltaPhi) ;
2293 } //for MC histogram
2297 //create event containers
2299 if(!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForTracksExists()))
2301 Int_t nvz = GetNZvertBin();
2302 Int_t nrp = GetNRPBin();
2303 Int_t nce = GetNCentrBin();
2305 fListMixTrackEvents= new TList*[nvz*nrp*nce] ;
2307 for( Int_t ice = 0 ; ice < nce ; ice++ )
2309 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2311 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2313 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2315 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2316 // ic,iz, irp, bin);
2318 fListMixTrackEvents[bin] = new TList() ;
2319 fListMixTrackEvents[bin]->SetOwner(kFALSE);
2325 fhPtLeadingMixed = new TH1F ("hPtLeadingMixed","p_{T} distribution of leading particles, used for mixing", nptbins,ptmin,ptmax);
2326 fhPtLeadingMixed->SetXTitle("p_{T}^{trig} (GeV/c)");
2330 fhPtLeadingMixedVzBin = new TH2F ("hPtLeadingMixedVzBin","p_{T} distribution of leading particles, used for mixing", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
2331 fhPtLeadingMixedVzBin->SetXTitle("p_{T}^{trig} (GeV/c)");
2332 fhPtLeadingMixedVzBin->SetYTitle("v_{z} bin");
2333 outputContainer->Add(fhPtLeadingMixedVzBin);
2336 fhPtLeadingMixedBin = new TH2F ("hPtLeadingMixedBin","p_{T} distribution of leading particles vs mixing bin", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
2337 fhPtLeadingMixedBin->SetXTitle("p_{T}^{trig} (GeV/c)");
2338 fhPtLeadingMixedBin->SetYTitle("Bin");
2340 fhPhiLeadingMixed = new TH2F ("hPhiLeadingMixed","#phi distribution of leading Particles, used for mixing",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2341 fhPhiLeadingMixed->SetYTitle("#phi (rad)");
2343 fhEtaLeadingMixed = new TH2F ("hEtaLeadingMixed","#eta distribution of leading, used for mixing",nptbins,ptmin,ptmax, netabins,etamin,etamax);
2344 fhEtaLeadingMixed->SetYTitle("#eta ");
2346 outputContainer->Add(fhPtLeadingMixed);
2347 outputContainer->Add(fhPtLeadingMixedBin);
2348 outputContainer->Add(fhPhiLeadingMixed);
2349 outputContainer->Add(fhEtaLeadingMixed);
2351 // Fill the cluster pool only in isolation analysis or if requested
2352 if( ( OnlyIsolated() || fFillNeutralEventMixPool) &&
2353 (!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForCaloExists())))
2355 Int_t nvz = GetNZvertBin();
2356 Int_t nrp = GetNRPBin();
2357 Int_t nce = GetNCentrBin();
2359 fListMixCaloEvents= new TList*[nvz*nrp*nce] ;
2361 for( Int_t ice = 0 ; ice < nce ; ice++ )
2363 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2365 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2367 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2369 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2370 // ic,iz, irp, bin);
2372 fListMixCaloEvents[bin] = new TList() ;
2373 fListMixCaloEvents[bin]->SetOwner(kFALSE);
2379 //Init the list in the reader if not done previously
2380 if(fUseMixStoredInReader)
2382 if( !GetReader()->ListWithMixedEventsForTracksExists() )
2383 GetReader()->SetListWithMixedEventsForTracks(fListMixTrackEvents);
2385 if( !GetReader()->ListWithMixedEventsForCaloExists() )
2386 GetReader()->SetListWithMixedEventsForCalo (fListMixCaloEvents );
2389 fhEventBin=new TH1I("hEventBin","Number of real events per bin(cen,vz,rp)",
2390 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2391 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2392 fhEventBin->SetXTitle("bin");
2393 outputContainer->Add(fhEventBin) ;
2395 fhEventMixBin=new TH1I("hEventMixBin","Number of events per bin(cen,vz,rp)",
2396 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2397 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2398 fhEventMixBin->SetXTitle("bin");
2399 outputContainer->Add(fhEventMixBin) ;
2401 fhNtracksMB=new TH1F("hNtracksMBEvent","Number of tracks w/ event trigger kMB",2000,0,2000);
2402 outputContainer->Add(fhNtracksMB);
2404 if(fFillNeutralEventMixPool || OnlyIsolated())
2406 fhNclustersMB=new TH1F("hNclustersMBEvent","Number of clusters w/ event trigger kMB",2000,0,2000);
2407 outputContainer->Add(fhNclustersMB);
2410 fhMixDeltaPhiCharged = new TH2F
2411 ("hMixDeltaPhiCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}",
2412 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2413 fhMixDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
2414 fhMixDeltaPhiCharged->SetXTitle("p_{T trigger} (GeV/c)");
2415 outputContainer->Add(fhMixDeltaPhiCharged);
2417 fhMixDeltaPhiDeltaEtaCharged = new TH2F
2418 ("hMixDeltaPhiDeltaEtaCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
2419 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2420 fhMixDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
2421 fhMixDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
2422 outputContainer->Add(fhMixDeltaPhiDeltaEtaCharged);
2425 new TH2F("hMixXECharged","Mixed event : x_{E} for charged tracks",
2426 nptbins,ptmin,ptmax,200,0.,2.);
2427 fhMixXECharged->SetYTitle("x_{E}");
2428 fhMixXECharged->SetXTitle("p_{T trigger} (GeV/c)");
2429 outputContainer->Add(fhMixXECharged);
2432 new TH2F("hMixXEUeCharged","Mixed event : x_{E} for charged tracks in Ue region",
2433 nptbins,ptmin,ptmax,200,0.,2.);
2434 fhMixXEUeCharged->SetYTitle("x_{E}");
2435 fhMixXEUeCharged->SetXTitle("p_{T trigger} (GeV/c)");
2436 outputContainer->Add(fhMixXEUeCharged);
2439 new TH2F("hMixHbpXECharged","mixed event : #xi = ln(1/x_{E}) with charged hadrons",
2440 nptbins,ptmin,ptmax,200,0.,10.);
2441 fhMixHbpXECharged->SetYTitle("ln(1/x_{E})");
2442 fhMixHbpXECharged->SetXTitle("p_{T trigger} (GeV/c)");
2443 outputContainer->Add(fhMixHbpXECharged);
2445 fhMixDeltaPhiChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2446 fhMixDeltaPhiChargedAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
2447 fhMixDeltaPhiChargedAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
2448 fhMixDeltaPhiDeltaEtaChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2450 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2452 for(Int_t z = 0 ; z < nz ; z++)
2459 tz = ", v_{z} bin "+z;
2462 //printf("MIX : iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
2464 fhMixDeltaPhiChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2465 Form("Mixed event #Delta #phi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2466 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2467 fhMixDeltaPhiChargedAssocPtBin[bin]->SetXTitle("p_{T trigger} (GeV/c)");
2468 fhMixDeltaPhiChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
2470 fhMixDeltaPhiChargedAssocPtBinDEta08[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0.8ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2471 Form("Mixed event #Delta #phi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]%s, for #Delta #eta > 0.8", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2472 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2473 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetXTitle("p_{T trigger} (GeV/c)");
2474 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
2476 fhMixDeltaPhiChargedAssocPtBinDEta0[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2477 Form("Mixed event #Delta #phi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]%s, for #Delta #eta = 0", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2478 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2479 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetXTitle("p_{T trigger} (GeV/c)");
2480 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
2482 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiDeltaEtaChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2483 Form("Mixed event #Delta #phi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2484 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2485 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
2486 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetYTitle("#Delta #eta");
2488 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBin[bin]);
2489 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta08[bin]);
2490 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta0[bin]);
2491 outputContainer->Add(fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]);
2496 return outputContainer;
2500 //_________________________________________________________________________________________________
2501 Bool_t AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum(const AliAODPWG4Particle* trigger,
2502 TLorentzVector & mom1,
2503 TLorentzVector & mom2)
2505 // Get the momentum of the pi0/eta assigned decay photons
2506 // In case of pi0/eta trigger, we may want to check their decay correlation,
2507 // get their decay children
2509 Int_t indexPhoton1 = trigger->GetCaloLabel(0);
2510 Int_t indexPhoton2 = trigger->GetCaloLabel(1);
2511 Float_t ptTrig = trigger->Pt();
2513 if(indexPhoton1!=-1 || indexPhoton2!=-1) return kFALSE;
2516 printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - indexPhoton1 = %d, indexPhoton2 = %d \n", indexPhoton1, indexPhoton2);
2518 TObjArray * clusters = 0x0 ;
2519 if(trigger->GetDetector()=="EMCAL") clusters = GetEMCALClusters() ;
2520 else clusters = GetPHOSClusters() ;
2522 for(Int_t iclus = 0; iclus < clusters->GetEntriesFast(); iclus++)
2524 AliVCluster * photon = (AliVCluster*) (clusters->At(iclus));
2525 if(photon->GetID()==indexPhoton1)
2527 photon->GetMomentum(mom1,GetVertex(0)) ;
2528 if(ptTrig) fhPtPi0DecayRatio->Fill(ptTrig, mom1.Pt()/ptTrig);
2530 if(photon->GetID()==indexPhoton2)
2532 photon->GetMomentum(mom1,GetVertex(0)) ;
2533 if(ptTrig > 0) fhPtPi0DecayRatio->Fill(ptTrig, mom2.Pt()/ptTrig);
2536 if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - Photon1 = %f, Photon2 = %f \n", mom1.Pt(), mom2.Pt());
2544 //_____________________________________________________________
2545 Int_t AliAnaParticleHadronCorrelation::GetMCTagHistogramIndex(Int_t mcTag)
2547 // Index of MC histograms depending on MC origin
2549 if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPrompt) ||
2550 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCFragmentation)) return 0;
2551 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0)) return 1;
2552 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0Decay)) return 2;
2553 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEtaDecay)) return 3;
2554 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCOtherDecay)) return 4;
2555 else if(!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron)) return 5;
2560 //____________________________________________________
2561 void AliAnaParticleHadronCorrelation::InitParameters()
2564 //Initialize the parameters of the analysis.
2565 SetInputAODName("Particle");
2566 SetAODObjArrayName("Hadrons");
2567 AddToHistogramsName("AnaHadronCorr_");
2569 SetPtCutRange(0.,300);
2570 fDeltaPhiMinCut = 1.5 ;
2571 fDeltaPhiMaxCut = 4.5 ;
2572 fSelectIsolated = kFALSE;
2573 fMakeSeveralUE = kFALSE;
2574 fUeDeltaPhiMinCut = 1. ;
2575 fUeDeltaPhiMaxCut = 1.5 ;
2577 fNeutralCorr = kFALSE ;
2578 fPi0Trigger = kFALSE ;
2579 fDecayTrigger = kFALSE ;
2580 fHMPIDCorrelation = kFALSE ;
2582 fMakeAbsoluteLeading = kTRUE;
2583 fMakeNearSideLeading = kFALSE;
2586 fAssocPtBinLimit[0] = 0.2 ;
2587 fAssocPtBinLimit[1] = 0.5 ;
2588 fAssocPtBinLimit[2] = 1.0 ;
2589 fAssocPtBinLimit[3] = 2.0 ;
2590 fAssocPtBinLimit[4] = 3.0 ;
2591 fAssocPtBinLimit[5] = 4.0 ;
2592 fAssocPtBinLimit[6] = 5.0 ;
2593 fAssocPtBinLimit[7] = 6.0 ;
2594 fAssocPtBinLimit[8] = 7.0 ;
2595 fAssocPtBinLimit[9] = 8.0 ;
2596 fAssocPtBinLimit[10] = 9.0 ;
2597 fAssocPtBinLimit[11] = 10.0 ;
2598 fAssocPtBinLimit[12] = 12.0 ;
2599 fAssocPtBinLimit[13] = 14.0 ;
2600 fAssocPtBinLimit[14] = 16.0 ;
2601 fAssocPtBinLimit[15] = 20.0 ;
2602 fAssocPtBinLimit[16] = 30.0 ;
2603 fAssocPtBinLimit[17] = 40.0 ;
2604 fAssocPtBinLimit[18] = 50.0 ;
2605 fAssocPtBinLimit[19] = 200.0 ;
2608 fUseMixStoredInReader = kTRUE;
2615 //__________________________________________________________
2616 void AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD()
2618 //Particle-Hadron Correlation Analysis, fill AODs
2620 if(!GetInputAODBranch())
2622 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data());
2626 if(strcmp(GetInputAODBranch()->GetClass()->GetName(), "AliAODPWG4ParticleCorrelation"))
2628 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - Wrong type of AOD object, change AOD class name in input AOD: It should be <AliAODPWG4ParticleCorrelation> and not <%s> \n",GetInputAODBranch()->GetClass()->GetName());
2634 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - Begin hadron correlation analysis, fill AODs \n");
2635 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In particle branch aod entries %d\n", GetInputAODBranch()->GetEntriesFast());
2636 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In CTS aod entries %d\n", GetCTSTracks() ->GetEntriesFast());
2637 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In EMCAL aod entries %d\n", GetEMCALClusters()->GetEntriesFast());
2638 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In PHOS aod entries %d\n", GetPHOSClusters() ->GetEntriesFast());
2641 //Get the vertex and check it is not too large in z
2642 Double_t v[3] = {0,0,0}; //vertex ;
2643 GetReader()->GetVertex(v);
2644 if(!GetMixedEvent() && TMath::Abs(v[2]) > GetZvertexCut()) return ;
2646 //Loop on stored AOD particles, find leading trigger
2647 Double_t ptTrig = fMinTriggerPt ;
2648 fLeadingTriggerIndex = -1 ;
2649 Int_t naod = GetInputAODBranch()->GetEntriesFast() ;
2650 for(Int_t iaod = 0; iaod < naod ; iaod++)
2652 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
2654 // Vertex cut in case of mixing
2655 Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0));
2656 if(check == 0) continue;
2657 if(check == -1) return;
2659 // find the leading particles with highest momentum
2660 if (particle->Pt() > ptTrig)
2662 ptTrig = particle->Pt() ;
2663 fLeadingTriggerIndex = iaod ;
2665 }// finish search of leading trigger particle
2668 //Do correlation with leading particle
2669 if(fLeadingTriggerIndex >= 0)
2672 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(fLeadingTriggerIndex));
2674 //check if the particle is isolated or if we want to take the isolation into account
2675 if(OnlyIsolated() && !particle->IsIsolated()) return;
2677 //Make correlation with charged hadrons
2678 Bool_t okcharged = kTRUE;
2679 Bool_t okneutral = kTRUE;
2680 if(GetReader()->IsCTSSwitchedOn() )
2681 okcharged = MakeChargedCorrelation(particle, GetCTSTracks(),kFALSE);
2683 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); //For the future, foresee more possible pi0 lists
2684 if(fNeutralCorr && pi0list && pi0list->GetEntriesFast() > 0)
2685 okneutral = MakeNeutralCorrelation(particle, pi0list,kFALSE);
2687 }//Correlate leading
2689 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - End fill AODs \n");
2693 //_________________________________________________________________
2694 void AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms()
2696 //Particle-Hadron Correlation Analysis, fill histograms
2698 if(!GetInputAODBranch())
2700 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data());
2706 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Begin hadron correlation analysis, fill histograms \n");
2707 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In particle branch aod entries %d\n", GetInputAODBranch()->GetEntriesFast());
2710 //Get the vertex and check it is not too large in z
2711 Double_t v[3] = {0,0,0}; //vertex ;
2712 GetReader()->GetVertex(v);
2713 if(!GetMixedEvent() && TMath::Abs(v[2]) > GetZvertexCut()) return ;
2715 Float_t cen = GetEventCentrality();
2716 Float_t ep = GetEventPlaneAngle();
2718 //Loop on stored AOD particles, find leading
2719 Double_t ptTrig = fMinTriggerPt;
2720 if(fLeadingTriggerIndex < 0)
2722 //Search leading if not done before
2723 Int_t naod = GetInputAODBranch()->GetEntriesFast() ;
2724 for(Int_t iaod = 0; iaod < naod ; iaod++)
2725 { //loop on input trigger AOD file
2726 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
2728 // Vertex cut in case of mixing
2729 Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0));
2730 if(check == 0) continue;
2731 if(check == -1) return;
2733 //check if the particle is isolated or if we want to take the isolation into account
2734 if(OnlyIsolated() && !particle->IsIsolated()) continue;
2736 //find the leading particles with highest momentum
2737 if (particle->Pt() > ptTrig)
2739 ptTrig = particle->Pt() ;
2740 fLeadingTriggerIndex = iaod ;
2743 }// Finish search of leading trigger particle
2744 }// Search leading if not done before
2746 if(fLeadingTriggerIndex >= 0 )
2747 { //using trigger particle to do correlations
2749 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(fLeadingTriggerIndex));
2751 // check if it was a calorimeter cluster and if the SS cut was requested, if so, apply it
2752 Int_t clID1 = particle->GetCaloLabel(0) ;
2753 Int_t clID2 = particle->GetCaloLabel(1) ; // for photon clusters should not be set.
2754 //printf("Leading for for %s: id1 %d, id2 %d, min %f, max %f, det %s\n",
2755 // GetInputAODName().Data(),clID1,clID2,fM02MinCut,fM02MaxCut,(particle->GetDetector()).Data());
2757 if(clID1 > 0 && clID2 < 0 && fM02MaxCut > 0 && fM02MinCut > 0)
2760 TObjArray* clusters = 0x0;
2761 if (particle->GetDetector() == "EMCAL") clusters = GetEMCALClusters();
2762 else if(particle->GetDetector() == "PHOS" ) clusters = GetPHOSClusters();
2766 AliVCluster *cluster = FindCluster(clusters,clID1,iclus);
2767 Float_t m02 = cluster->GetM02();
2768 //printf("\t Check m02 = %2.2f\n",m02);
2769 if(m02 > fM02MaxCut || m02 < fM02MinCut)
2771 //printf("\t \t Not accepted\n");
2777 // Check if the particle is isolated or if we want to take the isolation into account
2778 if(OnlyIsolated() && !particle->IsIsolated()) return;
2780 Float_t pt = particle->Pt();
2781 fhPtInput->Fill(pt);
2783 // Check if trigger is in fiducial region
2784 if(IsFiducialCutOn())
2786 Bool_t in = GetFiducialCut()->IsInFiducialCut(*particle->Momentum(),particle->GetDetector()) ;
2790 fhPtFidCut->Fill(pt);
2792 // Make correlation with charged hadrons
2793 Bool_t okcharged = kTRUE;
2794 Bool_t okneutral = kTRUE;
2795 if(GetReader()->IsCTSSwitchedOn() )
2797 okcharged = MakeChargedCorrelation(particle, GetCTSTracks(),kTRUE);
2800 MakeMCChargedCorrelation(particle);
2804 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); //For the future, foresee more possible pi0 lists
2805 if(fNeutralCorr && pi0list)
2807 if(pi0list->GetEntriesFast() > 0)
2808 okneutral = MakeNeutralCorrelation(particle, pi0list,kTRUE);
2811 // Fill leading particle histogram if correlation went well and
2812 // no problem was found, like not absolute leading, or bad vertex in mixing.
2813 if(okcharged && okneutral)
2815 fhPtLeading->Fill(pt);
2816 fhPtLeadingBin->Fill(pt,GetEventMixBin());
2817 if(fCorrelVzBin) fhPtLeadingVzBin->Fill(pt,GetEventVzBin());
2819 if(fFillPileUpHistograms)
2821 Int_t vtxBC = GetReader()->GetVertexBC();
2822 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA) fhPtLeadingVtxBC0->Fill(pt);
2824 if(GetReader()->IsPileUpFromSPD()) fhPtLeadingPileUp[0]->Fill(pt);
2825 if(GetReader()->IsPileUpFromEMCal()) fhPtLeadingPileUp[1]->Fill(pt);
2826 if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtLeadingPileUp[2]->Fill(pt);
2827 if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtLeadingPileUp[3]->Fill(pt);
2828 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtLeadingPileUp[4]->Fill(pt);
2829 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtLeadingPileUp[5]->Fill(pt);
2830 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtLeadingPileUp[6]->Fill(pt);
2833 Float_t phi = particle->Phi();
2834 if(phi<0)phi+=TMath::TwoPi();
2835 fhPhiLeading->Fill(pt, phi);
2837 fhEtaLeading->Fill(pt, particle->Eta());
2838 //printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Leading particle : pt %f, eta %f, phi %f\n",particle->Pt(),particle->Eta(),phi);
2842 Int_t mcIndex = GetMCTagHistogramIndex(particle->GetTag());
2843 fhPtLeadingMC[mcIndex]->Fill(pt);
2846 fhPtLeadingCentrality ->Fill(pt,cen);
2847 fhPtLeadingEventPlane ->Fill(pt,ep);
2848 fhLeadingEventPlaneCentrality->Fill(cen,ep);
2850 }//ok charged && neutral
2853 //Reinit for next event
2854 fLeadingTriggerIndex = -1;
2856 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - End fill histograms \n");
2859 //___________________________________________________________________________________________________________
2860 Bool_t AliAnaParticleHadronCorrelation::MakeChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle,
2861 const TObjArray* pl, Bool_t bFillHisto)
2863 // Charged Hadron Correlation Analysis
2865 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Make trigger particle - charged hadron correlation \n");
2867 Float_t phiTrig = aodParticle->Phi();
2868 Float_t etaTrig = aodParticle->Eta();
2869 Float_t ptTrig = aodParticle->Pt();
2870 Bool_t decay = aodParticle->IsTagged();
2871 Int_t mcTag = aodParticle->GetTag();
2872 Double_t bz = GetReader()->GetInputEvent()->GetMagneticField();
2874 Float_t pt = -100. ;
2875 Float_t zT = -100. ;
2876 Float_t xE = -100. ;
2877 Float_t hbpXE = -100. ;
2878 Float_t hbpZT = -100. ;
2879 Float_t phi = -100. ;
2880 Float_t eta = -100. ;
2881 Float_t pout = -100. ;
2882 Float_t deltaPhi = -100. ;
2885 TLorentzVector photonMom ;
2886 TObjArray * reftracks = 0x0;
2888 Int_t nTracks = GetCTSTracks()->GetEntriesFast() ;
2890 // Mixed event settings
2891 Int_t evtIndex11 = -1 ; // cluster trigger or pi0 trigger
2892 Int_t evtIndex12 = -1 ; // pi0 trigger
2893 Int_t evtIndex13 = -1 ; // charged trigger
2895 Double_t v[3] = {0,0,0}; //vertex ;
2896 GetReader()->GetVertex(v);
2898 if (GetMixedEvent())
2900 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
2901 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
2902 evtIndex13 = GetMixedEvent()->EventIndex(aodParticle->GetTrackLabel(0)) ;
2905 // In case of pi0/eta trigger, we may want to check their decay correlation,
2906 // get their decay children
2907 TLorentzVector decayMom1;
2908 TLorentzVector decayMom2;
2909 Bool_t decayFound = kFALSE;
2910 if(fPi0Trigger && bFillHisto) decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
2912 //-----------------------------------------------------------------------
2913 //Track loop, select tracks with good pt, phi and fill AODs or histograms
2914 //-----------------------------------------------------------------------
2916 for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ )
2918 AliVTrack * track = (AliVTrack *) (pl->At(ipr)) ;
2920 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
2921 p3.SetXYZ(mom[0],mom[1],mom[2]);
2925 if(phi < 0) phi+=TMath::TwoPi();
2927 //Select only hadrons in pt range
2928 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
2930 //remove trigger itself for correlation when use charged triggers
2931 if( track->GetID() == aodParticle->GetTrackLabel(0) || track->GetID() == aodParticle->GetTrackLabel(1) ||
2932 track->GetID() == aodParticle->GetTrackLabel(2) || track->GetID() == aodParticle->GetTrackLabel(3) )
2935 //jump out this event if near side associated particle pt larger than trigger
2936 if (fMakeNearSideLeading)
2938 if(pt > ptTrig && TMath::Abs(phi-phiTrig) < TMath::PiOver2()) return kFALSE;
2940 //jump out this event if there is any other particle with pt larger than trigger
2941 else if(fMakeAbsoluteLeading)
2943 if(pt > ptTrig) return kFALSE;
2946 //Only for mixed event
2947 Int_t evtIndex2 = 0 ;
2948 if (GetMixedEvent())
2950 evtIndex2 = GetMixedEvent()->EventIndex(track->GetID()) ;
2951 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 || evtIndex13 == evtIndex2 ) // photon and track from different events
2954 if (TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut())
2963 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
2965 // Set the pt associated bin for the defined bins
2966 Int_t assocBin = -1;
2967 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2969 if(pt > fAssocPtBinLimit[i] && pt < fAssocPtBinLimit[i+1]) assocBin= i;
2972 // Assign to the histogram array a bin corresponding to a combination of pTa and vz bins
2978 nz = GetNZvertBin();
2979 vz = GetEventVzBin();
2982 Int_t bin = assocBin*nz+vz;
2984 //printf("assoc Bin = %d, vZ bin = %d, bin = %d \n", assocBin,GetEventVzBin(),bin);
2986 ULong_t status = track->GetStatus();
2987 Bool_t okTOF = ( (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ) ;
2988 //Double32_t tof = track->GetTOFsignal()*1e-3;
2989 Int_t trackBC = track->GetTOFBunchCrossing(bz);
2992 if (okTOF && trackBC!=0) outTOF = 1;
2993 else if(okTOF && trackBC==0) outTOF = 0;
2996 // calculate deltaPhi for later, shift when needed
2997 FillChargedAngularCorrelationHistograms(pt, ptTrig, bin, phi, phiTrig, deltaPhi,
2998 eta, etaTrig, decay, track->GetHMPIDsignal(),outTOF,nTracks,mcTag);
3000 // Imbalance zT/xE/pOut
3002 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
3005 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3006 //if(xE <0.)xE =-xE;
3007 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3010 pout = pt*TMath::Sin(deltaPhi) ;
3012 //delta phi cut for momentum imbalance correlation
3013 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
3016 FillChargedMomentumImbalanceHistograms(ptTrig, pt, xE, hbpXE, zT, hbpZT, pout,
3017 nTracks, track->Charge(), bin, decay,outTOF,mcTag);
3021 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3024 FillChargedUnderlyingEventHistograms(ptTrig, pt, deltaPhi, nTracks,outTOF);
3026 fhUePart->Fill(ptTrig);
3030 if(fPi0Trigger && decayFound)
3031 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2, kTRUE) ;
3033 //several UE calculation
3034 if(fMakeSeveralUE) FillChargedUnderlyingEventSidesHistograms(ptTrig,pt,deltaPhi);
3042 reftracks = new TObjArray(0);
3043 TString trackname = Form("%s+Tracks", GetAODObjArrayName().Data());
3044 reftracks->SetName(trackname.Data());
3045 reftracks->SetOwner(kFALSE);
3048 reftracks->Add(track);
3050 }//aod particle loop
3053 //Fill AOD with reference tracks, if not filling histograms
3054 if(!bFillHisto && reftracks)
3056 aodParticle->AddObjArray(reftracks);
3059 //Own mixed event, add event and remove previous or fill the mixed histograms
3060 if(DoOwnMix() && bFillHisto)
3062 MakeChargedMixCorrelation(aodParticle);
3070 //_________________________________________________________________________________________________________
3071 void AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
3073 // Mix current trigger with tracks in another MB event
3075 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Make trigger particle - charged hadron mixed event correlation \n");
3077 if(GetMixedEvent()) return; // This is not the mixed event from general mixing frame
3079 // Get the event with similar caracteristics
3080 //printf("MakeChargedMixCorrelation for %s\n",GetInputAODName().Data());
3082 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
3084 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
3086 if(!inputHandler) return;
3088 if(!(inputHandler->IsEventSelected( ) & GetReader()->GetEventTriggerMask())) return;
3090 // Get the pool, check if it exits
3091 Int_t eventBin = GetEventMixBin();
3093 fhEventBin->Fill(eventBin);
3095 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
3096 if(eventBin < 0) return;
3099 TList * poolCalo = 0;
3100 if(fUseMixStoredInReader)
3102 pool = GetReader()->GetListWithMixedEventsForTracks(eventBin);
3103 if(OnlyIsolated() || fFillNeutralEventMixPool) poolCalo = GetReader()->GetListWithMixedEventsForCalo (eventBin);
3107 pool = fListMixTrackEvents[eventBin];
3108 if(OnlyIsolated() || fFillNeutralEventMixPool) poolCalo = fListMixCaloEvents [eventBin];
3113 if((OnlyIsolated() || fFillNeutralEventMixPool ) && !poolCalo &&
3114 (GetIsolationCut()->GetParticleTypeInCone()!=AliIsolationCut::AliIsolationCut::kOnlyCharged))
3115 printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Careful, cluster pool not available\n");
3117 Double_t ptTrig = aodParticle->Pt();
3118 Double_t etaTrig = aodParticle->Eta();
3119 Double_t phiTrig = aodParticle->Phi();
3120 if(phiTrig < 0.) phiTrig+=TMath::TwoPi();
3123 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Pool bin %d size %d, leading trigger pt=%f, phi=%f, eta=%f\n",
3124 eventBin,pool->GetSize(), ptTrig,phiTrig,etaTrig);
3126 Double_t ptAssoc = -999.;
3127 Double_t phiAssoc = -999.;
3128 Double_t etaAssoc = -999.;
3129 Double_t deltaPhi = -999.;
3130 Double_t deltaEta = -999.;
3131 Double_t xE = -999.;
3132 Double_t hbpXE = -999.;
3134 //Start from first event in pool except if in this same event the pool was filled
3136 if(GetReader()->GetLastTracksMixedEvent() == GetEventNumber()) ev0 = 1;
3138 for(Int_t ev=ev0; ev < pool->GetSize(); ev++)
3140 TObjArray* bgTracks = static_cast<TObjArray*>(pool->At(ev));
3141 TObjArray* bgCalo = 0;
3143 // Check if the particle is isolated in the mixed event, it not, do not fill the histograms
3144 if(OnlyIsolated() || fFillNeutralEventMixPool)
3146 if(pool->GetSize()!=poolCalo->GetSize())
3147 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Different size of calo and track pools\n");
3149 bgCalo = static_cast<TObjArray*>(poolCalo->At(ev));
3152 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Event %d in calo pool not available?\n",ev);
3154 if(OnlyIsolated() && bgCalo)
3156 Int_t n=0; Int_t nfrac = 0; Bool_t isolated = kFALSE; Float_t coneptsum = 0;
3157 GetIsolationCut()->MakeIsolationCut(bgTracks,bgCalo,
3158 GetReader(), GetCaloPID(),
3159 kFALSE, aodParticle, "",
3160 n,nfrac,coneptsum, isolated);
3162 //printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Isolated? %d - cone %f, ptthres %f",
3163 // isolated,GetIsolationCut()->GetConeSize(),GetIsolationCut()->GetPtThreshold());
3164 //if(bgTracks)printf(" - n track %d", bgTracks->GetEntriesFast());
3167 if(!isolated) continue ;
3171 fhEventMixBin->Fill(eventBin);
3173 Int_t nTracks=bgTracks->GetEntriesFast();
3174 //printf("\t Read Pool event %d, nTracks %d\n",ev,nTracks);
3176 //Check if it is leading if mixed event
3177 if(fMakeNearSideLeading || fMakeAbsoluteLeading)
3179 Bool_t leading = kTRUE;
3180 for(Int_t jlead = 0;jlead <nTracks; jlead++ )
3182 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(jlead) ;
3184 ptAssoc = track->Pt();
3185 phiAssoc = track->Phi() ;
3187 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3188 if (fMakeNearSideLeading)
3190 if(ptAssoc > ptTrig && TMath::Abs(phiAssoc-phiTrig) < TMath::PiOver2())
3196 //jump out this event if there is any other particle with pt larger than trigger
3197 else if(fMakeAbsoluteLeading)
3199 if(ptAssoc > ptTrig)
3207 if(fFillNeutralEventMixPool && bgCalo)
3209 Int_t nClusters=bgCalo->GetEntriesFast();
3210 TLorentzVector mom ;
3211 for(Int_t jlead = 0;jlead <nClusters; jlead++ )
3213 AliVCluster *cluster = (AliVCluster*) bgCalo->At(jlead) ;
3215 Double_t vertex[]={0,0,0}; // assume 0 vertex
3216 cluster->GetMomentum(mom,vertex) ;
3219 phiAssoc = mom.Phi() ;
3221 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3222 if (fMakeNearSideLeading)
3224 if(ptAssoc > ptTrig && TMath::Abs(phiAssoc-phiTrig) < TMath::PiOver2())
3230 //jump out this event if there is any other particle with pt larger than trigger
3231 else if(fMakeAbsoluteLeading)
3233 if(ptAssoc > ptTrig)
3242 if(!leading) continue; // not leading, check the next event in pool
3246 fhPtLeadingMixed ->Fill(ptTrig);
3247 fhPhiLeadingMixed ->Fill(ptTrig, phiTrig);
3248 fhEtaLeadingMixed ->Fill(ptTrig, etaTrig);
3249 fhPtLeadingMixedBin->Fill(ptTrig,eventBin);
3250 if(fCorrelVzBin)fhPtLeadingMixedVzBin->Fill(ptTrig, GetEventVzBin());
3252 for(Int_t j1 = 0;j1 <nTracks; j1++ )
3254 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(j1) ;
3256 if(!track) continue;
3258 ptAssoc = track->Pt();
3259 etaAssoc = track->Eta();
3260 phiAssoc = track->Phi() ;
3261 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3263 if(IsFiducialCutOn())
3265 Bool_t in = GetFiducialCut()->IsInFiducialCut(*aodParticle->Momentum(),"CTS") ;
3269 deltaPhi = phiTrig-phiAssoc;
3270 if(deltaPhi < -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3271 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3272 deltaEta = etaTrig-etaAssoc;
3275 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation(): deltaPhi= %f, deltaEta=%f\n",deltaPhi, deltaEta);
3277 // Set the pt associated bin for the defined bins
3278 Int_t assocBin = -1;
3279 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3281 if(ptAssoc > fAssocPtBinLimit[i] && ptAssoc < fAssocPtBinLimit[i+1]) assocBin= i;
3284 // Assign to the histogram array a bin corresponding to a combination of pTa and vz bins
3290 nz = GetNZvertBin();
3291 vz = GetEventVzBin();
3294 Int_t bin = assocBin*nz+vz;
3296 fhMixDeltaPhiCharged ->Fill(ptTrig, deltaPhi);
3297 fhMixDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
3299 fhMixDeltaPhiCharged ->Fill(ptTrig, deltaPhi);
3300 fhMixDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
3302 xE =-ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3303 //if(xE <0.)xE =-xE;
3304 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3307 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
3309 fhMixXECharged->Fill(ptTrig,xE);
3310 fhMixHbpXECharged->Fill(ptTrig,hbpXE);
3313 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3315 //Underlying event region
3316 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
3317 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
3319 if(uexE < 0.) uexE = -uexE;
3321 fhMixXEUeCharged->Fill(ptTrig,uexE);
3324 if(bin < 0) continue ; // this pt bin was not considered
3326 if(TMath::Abs(deltaEta) > 0.8)
3327 fhMixDeltaPhiChargedAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
3328 if(TMath::Abs(deltaEta) < 0.01)
3329 fhMixDeltaPhiChargedAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
3331 fhMixDeltaPhiChargedAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
3332 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->Fill(deltaPhi, deltaEta);
3335 } // mixed event loop
3339 //________________________________________________________________________________________________________________
3340 Bool_t AliAnaParticleHadronCorrelation::MakeNeutralCorrelation(AliAODPWG4ParticleCorrelation * const aodParticle,
3341 const TObjArray* pi0list, Bool_t bFillHisto)
3343 // Neutral Pion Correlation Analysis
3344 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Make trigger particle - pi0 correlation, %d pi0's \n",
3345 pi0list->GetEntriesFast());
3347 Int_t evtIndex11 = 0 ;
3348 Int_t evtIndex12 = 0 ;
3349 if (GetMixedEvent())
3351 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
3352 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
3355 Float_t pt = -100. ;
3356 Float_t zT = -100. ;
3357 Float_t phi = -100. ;
3358 Float_t eta = -100. ;
3359 Float_t xE = -100. ;
3360 Float_t hbpXE= -100. ;
3361 Float_t hbpZT= -100. ;
3363 Float_t ptTrig = aodParticle->Pt();
3364 Float_t phiTrig = aodParticle->Phi();
3365 Float_t etaTrig = aodParticle->Eta();
3366 Float_t deltaPhi= -100. ;
3368 TLorentzVector photonMom ;
3370 // In case of pi0/eta trigger, we may want to check their decay correlation,
3371 // get their decay children
3372 TLorentzVector decayMom1;
3373 TLorentzVector decayMom2;
3374 Bool_t decayFound = kFALSE;
3375 if(fPi0Trigger && bFillHisto) decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
3377 TObjArray * refpi0 = 0x0;
3380 //Loop on stored AOD pi0
3382 Int_t naod = pi0list->GetEntriesFast();
3384 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillHistograms() - aod branch entries %d\n", naod);
3386 for(Int_t iaod = 0; iaod < naod ; iaod++)
3388 AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (pi0list->At(iaod));
3390 Int_t evtIndex2 = 0 ;
3391 Int_t evtIndex3 = 0 ;
3392 if (GetMixedEvent())
3394 evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(0)) ;
3395 evtIndex3 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(1)) ;
3397 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 ||
3398 evtIndex11 == evtIndex3 || evtIndex12 == evtIndex3) // trigger and pi0 are not from different events
3404 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
3406 //jump out this event if near side associated particle pt larger than trigger
3407 if (fMakeNearSideLeading)
3409 if(pt > ptTrig && TMath::Abs(phi-phiTrig) < TMath::PiOver2()) return kFALSE;
3411 //jump out this event if there is any other particle with pt larger than trigger
3412 else if(fMakeAbsoluteLeading)
3414 if(pt > ptTrig) return kFALSE;
3422 FillNeutralAngularCorrelationHistograms(pt, ptTrig, phi, phiTrig, deltaPhi, eta, etaTrig);
3425 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3427 //if(xE <0.)xE =-xE;
3432 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3433 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
3435 if(fPi0Trigger && decayFound)
3436 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2,kFALSE) ;
3438 //delta phi cut for correlation
3439 if( (deltaPhi > fDeltaPhiMinCut) && ( deltaPhi < fDeltaPhiMaxCut) )
3441 fhDeltaPhiNeutralPt->Fill(pt,deltaPhi);
3442 fhXENeutral ->Fill(ptTrig,xE);
3443 fhPtHbpXENeutral ->Fill(ptTrig,hbpXE);
3445 else if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3447 fhDeltaPhiUeNeutralPt->Fill(pt,deltaPhi);
3448 fhXEUeNeutral ->Fill(ptTrig,xE);
3449 fhPtHbpXEUeNeutral ->Fill(ptTrig,hbpXE);
3452 //several UE calculation
3453 if(fMakeSeveralUE) FillChargedUnderlyingEventSidesHistograms(ptTrig,pt,deltaPhi);
3461 refpi0 = new TObjArray(0);
3462 refpi0->SetName(GetAODObjArrayName()+"Pi0s");
3463 refpi0->SetOwner(kFALSE);
3466 }//put references in trigger AOD
3469 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Selected neutral for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
3476 //_________________________________________________________________________________________________________
3477 void AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
3479 // Charged Hadron Correlation Analysis with MC information
3482 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation() - Make trigger particle - charged hadron correlation in AOD MC level\n");
3484 AliStack * stack = 0x0 ;
3485 TParticle * primary = 0x0 ;
3486 TClonesArray * mcparticles0 = 0x0 ;
3487 TClonesArray * mcparticles = 0x0 ;
3488 AliAODMCParticle * aodprimary = 0x0 ;
3490 Double_t eprim = 0 ;
3491 Double_t ptprim = 0 ;
3492 Double_t phiprim = 0 ;
3493 Double_t etaprim = 0 ;
3495 Int_t iParticle = 0 ;
3496 Double_t charge = 0.;
3498 if(GetReader()->ReadStack())
3500 nTracks = GetMCStack()->GetNtrack() ;
3504 nTracks = GetReader()->GetAODMCParticles()->GetEntriesFast() ;
3506 //Int_t trackIndex[nTracks];
3508 Int_t label= aodParticle->GetLabel();
3511 if(GetDebug() > 0) printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** bad label ***: label %d \n", label);
3515 if(GetReader()->ReadStack())
3517 stack = GetMCStack() ;
3520 printf(" AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation- Stack not available, is the MC handler called? STOP\n");
3524 nTracks=stack->GetNprimary();
3525 if(label >= stack->GetNtrack())
3527 if(GetDebug() > 2) printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** large label ***: label %d, n tracks %d \n", label, stack->GetNtrack());
3531 primary = stack->Particle(label);
3534 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** no primary ***: label %d \n", label);
3540 eprim = primary->Energy();
3541 ptprim = primary->Pt();
3542 phiprim = primary->Phi();
3543 etaprim = primary->Eta();
3545 if(ptprim < 0.01 || eprim < 0.01) return ;
3547 for (iParticle = 0 ; iParticle < nTracks ; iParticle++)
3549 TParticle * particle = stack->Particle(iParticle);
3550 TLorentzVector momentum;
3552 //keep only final state particles
3553 if(particle->GetStatusCode()!=1) continue ;
3555 Int_t pdg = particle->GetPdgCode();
3557 charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
3559 particle->Momentum(momentum);
3561 //---------- Charged particles ----------------------
3564 //Particles in CTS acceptance
3565 Bool_t inCTS = GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
3567 if(TMath::Abs(pdg) == 11 && stack->Particle(particle->GetFirstMother())->GetPdgCode()==22) continue ;
3571 if( label!=iParticle) // avoid trigger particle
3573 if(!FillChargedMCCorrelationHistograms(particle->Pt(),particle->Phi(),particle->Eta(),ptprim,phiprim,etaprim)) return;
3575 }// in CTS acceptance
3578 } //when the leading particles could trace back to MC
3581 else if(GetReader()->ReadAODMCParticles())
3583 //Get the list of MC particles
3584 mcparticles0 = GetReader()->GetAODMCParticles();
3585 if(!mcparticles0) return;
3587 if(label >=mcparticles0->GetEntriesFast())
3590 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** large label ***: label %d, n tracks %d \n", label,mcparticles0->GetEntriesFast());
3595 aodprimary = (AliAODMCParticle*) mcparticles0->At(label);
3598 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** no AOD primary ***: label %d \n", label);
3604 ptprim = aodprimary->Pt();
3605 phiprim = aodprimary->Phi();
3606 etaprim = aodprimary->Eta();
3607 eprim = aodprimary->E();
3609 Bool_t lead = kFALSE;
3611 if(ptprim < 0.01 || eprim < 0.01) return ;
3613 mcparticles= GetReader()->GetAODMCParticles();
3614 for (iParticle = 0; iParticle < nTracks; iParticle++)
3616 AliAODMCParticle *part = (AliAODMCParticle*) mcparticles->At(iParticle);
3618 if (!part->IsPhysicalPrimary()) continue;
3620 Int_t pdg = part->GetPdgCode();
3621 charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
3622 TLorentzVector momentum(part->Px(),part->Py(),part->Pz(),part->E());
3626 if(part->Pt()> GetReader()->GetCTSPtMin())
3628 //Particles in CTS acceptance
3629 Bool_t inCTS = GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
3630 Int_t indexmother=part->GetMother();
3634 Int_t mPdg = ((AliAODMCParticle*) mcparticles->At(indexmother)) ->GetPdgCode();
3635 if(TMath::Abs(pdg) == 11 && mPdg == 22) continue;
3640 if( label!=iParticle) // avoid trigger particle
3642 if(!FillChargedMCCorrelationHistograms(part->Pt(),part->Phi(),part->Eta(),ptprim,phiprim,etaprim)) return;
3647 } //only charged particles
3648 } //MC particle loop
3651 fhMCPtLeading->Fill(ptprim);
3652 fhMCPhiLeading->Fill(ptprim,phiprim);
3653 fhMCEtaLeading->Fill(ptprim,etaprim);
3655 } //when the leading particles could trace back to MC
3659 //_____________________________________________________________________
3660 void AliAnaParticleHadronCorrelation::Print(const Option_t * opt) const
3663 //Print some relevant parameters set for the analysis
3667 printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
3668 AliAnaCaloTrackCorrBaseClass::Print(" ");
3669 printf("Pt trigger > %3.2f\n", fMinTriggerPt) ;
3670 printf("Pt associated hadron < %3.2f\n", fMaxAssocPt) ;
3671 printf("Pt associated hadron > %3.2f\n", fMinAssocPt) ;
3672 printf("Phi trigger particle-Hadron < %3.2f\n", fDeltaPhiMaxCut) ;
3673 printf("Phi trigger particle-Hadron > %3.2f\n", fDeltaPhiMinCut) ;
3674 printf("Phi trigger particle-UeHadron < %3.2f\n", fUeDeltaPhiMaxCut) ;
3675 printf("Phi trigger particle-UeHadron > %3.2f\n", fUeDeltaPhiMinCut) ;
3676 printf("Isolated Trigger? %d\n" , fSelectIsolated) ;
3677 printf("Several UE? %d\n" , fMakeSeveralUE) ;
3678 printf("Name of AOD Pi0 Branch %s \n", fPi0AODBranchName.Data());
3679 printf("Do Decay-hadron correlation ? %d\n", fPi0Trigger) ;
3680 printf("Select absolute leading for cluster triggers ? %d or Near Side %d\n",
3681 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
3682 printf("Trigger pt bins %d\n", fNAssocPtBins) ;
3683 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
3684 printf("\t bin %d = [%2.1f,%2.1f]\n", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
3689 //____________________________________________________________
3690 void AliAnaParticleHadronCorrelation::SetNAssocPtBins(Int_t n)
3692 // Set number of bins
3703 printf("n = larger than 19 or too small, set to 19 \n");
3708 //______________________________________________________________________________
3709 void AliAnaParticleHadronCorrelation::SetAssocPtBinLimit(Int_t ibin, Float_t pt)
3711 // Set the list of limits for the trigger pt bins
3713 if(ibin <= fNAssocPtBins || ibin >= 0)
3715 fAssocPtBinLimit[ibin] = pt ;
3719 printf("AliAnaParticleHadronCorrelation::SetAssocPtBinLimit() - bin number too large %d > %d or small, nothing done\n", ibin, fNAssocPtBins) ;