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(), fUseMixStoredInReader(0),
75 fM02MaxCut(0), fM02MinCut(0),
76 fFillPileUpHistograms(0),
78 fhPtInput(0), fhPtFidCut(0),
79 fhPtLeading(0), fhPtLeadingPileUp(),
80 fhPtLeadingVzBin(0), fhPtLeadingBin(0),
81 fhPhiLeading(0), fhEtaLeading(0),
83 fhPtLeadingCentrality(0), fhPtLeadingEventPlane(0),
84 fhLeadingEventPlaneCentrality(0),
85 fhPtLeadingMixed(0), fhPtLeadingMixedVzBin(0), fhPtLeadingMixedBin(0),
86 fhPhiLeadingMixed(0), fhEtaLeadingMixed(0),
87 fhDeltaPhiDeltaEtaCharged(0),
88 fhPhiCharged(0), fhEtaCharged(0),
89 fhDeltaPhiCharged(0), fhDeltaEtaCharged(0),
90 fhDeltaPhiChargedPt(0), fhDeltaPhiUeChargedPt(0),
92 fhXECharged(0), fhXEUeCharged(0),
93 fhXEPosCharged(0), fhXENegCharged(0),
94 fhPtHbpXECharged(0), fhPtHbpXEUeCharged(0),
95 fhZTCharged(0), fhZTUeCharged(0),
96 fhZTPosCharged(0), fhZTNegCharged(0),
97 fhPtHbpZTCharged(0), fhPtHbpZTUeCharged(0),
98 fhXEChargedMC(), fhDeltaPhiChargedMC(),
99 fhDeltaPhiDeltaEtaChargedPtA3GeV(0),
100 fhDeltaPhiChargedPtA3GeV(0), fhDeltaEtaChargedPtA3GeV(0),
102 fhDeltaPhiChargedPileUp(), fhDeltaEtaChargedPileUp(),
103 fhXEChargedPileUp(), fhXEUeChargedPileUp(),
104 fhZTChargedPileUp(), fhZTUeChargedPileUp(),
105 fhPtTrigChargedPileUp(),
106 fhDeltaPhiChargedPtA3GeVPileUp(), fhDeltaEtaChargedPtA3GeVPileUp(),
108 fhDeltaPhiUeLeftCharged(0), fhDeltaPhiUeRightCharged(0),
109 fhDeltaPhiUeLeftUpCharged(0), fhDeltaPhiUeRightUpCharged(0),
110 fhDeltaPhiUeLeftDownCharged(0), fhDeltaPhiUeRightDownCharged(0),
111 fhXEUeLeftCharged(0), fhXEUeRightCharged(0),
112 fhXEUeLeftUpCharged(0), fhXEUeRightUpCharged(0),
113 fhXEUeLeftDownCharged(0), fhXEUeRightDownCharged(0),
114 fhPtHbpXEUeLeftCharged(0), fhPtHbpXEUeRightCharged(0),
115 fhZTUeLeftCharged(0), fhZTUeRightCharged(0),
116 fhPtHbpZTUeLeftCharged(0), fhPtHbpZTUeRightCharged(0),
117 fhPtTrigPout(0), fhPtTrigCharged(0),
118 fhTrigDeltaPhiCharged(0x0), fhTrigDeltaEtaCharged(0x0),
119 fhTrigXECorr(0x0), fhTrigXEUeCorr(0x0),
120 fhTrigZTCorr(0x0), fhTrigZTUeCorr(0x0),
121 fhAssocPtBkg(0), fhDeltaPhiDeltaEtaAssocPtBin(0),
122 fhDeltaPhiAssocPtBin(0),
123 fhDeltaPhiAssocPtBinDEta08(0), fhDeltaPhiAssocPtBinDEta0(0),
124 fhDeltaPhiAssocPtBinHMPID(0), fhDeltaPhiAssocPtBinHMPIDAcc(0),
125 fhDeltaPhiBradAssocPtBin(0), fhDeltaPhiBrad(0),
126 fhXEAssocPtBin(0), fhZTAssocPtBin(0),
127 fhDeltaPhiDeltaEtaNeutral(0),
128 fhPhiNeutral(0), fhEtaNeutral(0),
129 fhDeltaPhiNeutral(0), fhDeltaEtaNeutral(0),
130 fhDeltaPhiNeutralPt(0), fhDeltaPhiUeNeutralPt(0),
131 fhXENeutral(0), fhXEUeNeutral(0),
132 fhPtHbpXENeutral(0), fhPtHbpXEUeNeutral(0),
133 fhZTNeutral(0), fhZTUeNeutral(0),
134 fhPtHbpZTNeutral(0), fhPtHbpZTUeNeutral(0),
135 fhDeltaPhiUeLeftNeutral(0), fhDeltaPhiUeRightNeutral(0),
136 fhXEUeLeftNeutral(0), fhXEUeRightNeutral(0),
137 fhPtHbpXEUeLeftNeutral(0), fhPtHbpXEUeRightNeutral(0),
138 fhZTUeLeftNeutral(0), fhZTUeRightNeutral(0),
139 fhPtHbpZTUeLeftNeutral(0), fhPtHbpZTUeRightNeutral(0),
140 fhPtPi0DecayRatio(0),
141 fhDeltaPhiDecayCharged(0), fhXEDecayCharged(0), fhZTDecayCharged(0),
142 fhDeltaPhiDecayNeutral(0), fhXEDecayNeutral(0), fhZTDecayNeutral(0),
143 fhDeltaPhiDecayChargedAssocPtBin(0),
144 fhXEDecayChargedAssocPtBin(0), fhZTDecayChargedAssocPtBin(0),
145 fh2phiLeadingParticle(0x0), fhMCPtLeading(0),
146 fhMCPhiLeading(0), fhMCEtaLeading(0),
147 fhMCEtaCharged(0), fhMCPhiCharged(0),
148 fhMCDeltaEtaCharged(0), fhMCDeltaPhiCharged(0x0),
149 fhMCDeltaPhiDeltaEtaCharged(0), fhMCDeltaPhiChargedPt(0),
150 fhMCPtXECharged(0), fhMCPtXEUeCharged(0),
151 fhMCPtHbpXECharged(0), fhMCPtHbpXEUeCharged(0),
153 fhMCPtZTCharged(0), fhMCPtHbpZTCharged(0),
154 fhMCPtTrigPout(0), fhMCPtAssocDeltaPhi(0),
157 fhNtracksAll(0), fhNtracksTrigger(0),
159 fhMixDeltaPhiCharged(0), fhMixDeltaPhiDeltaEtaCharged(0),
160 fhMixXECharged(0), fhMixHbpXECharged(0),
161 fhMixDeltaPhiChargedAssocPtBin(),
162 fhMixDeltaPhiChargedAssocPtBinDEta08(),
163 fhMixDeltaPhiChargedAssocPtBinDEta0(),
164 fhMixDeltaPhiDeltaEtaChargedAssocPtBin(),
165 fhEventBin(0), fhEventMixBin(0)
169 //Initialize parameters
172 for(Int_t i = 0; i < 7; i++)
174 fhPtLeadingMC[i] = 0;
175 fhXEChargedMC[i] = 0;
176 fhDeltaPhiChargedMC[i] = 0;
179 for(Int_t i = 0; i < 7; i++)
181 fhPtLeadingPileUp [i] = 0 ;
182 fhDeltaPhiChargedPileUp [i] = 0 ; fhDeltaEtaChargedPileUp [i] = 0 ;
183 fhXEChargedPileUp [i] = 0 ; fhXEUeChargedPileUp [i] = 0 ;
184 fhZTChargedPileUp [i] = 0 ; fhZTUeChargedPileUp [i] = 0 ;
185 fhPtTrigChargedPileUp [i] = 0 ;
186 fhDeltaPhiChargedPtA3GeVPileUp[i] = 0 ; fhDeltaEtaChargedPtA3GeVPileUp[i] = 0 ;
192 //_________________________________________________________________
193 AliAnaParticleHadronCorrelation::~AliAnaParticleHadronCorrelation()
195 // Remove event containers
199 if(fListMixTrackEvents)
201 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
203 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
205 for(Int_t irp=0; irp<GetNRPBin(); irp++)
207 Int_t bin = GetEventMixBin(ic, iz, irp);
208 fListMixTrackEvents[bin]->Delete() ;
209 delete fListMixTrackEvents[bin] ;
215 delete[] fListMixTrackEvents;
217 if(fListMixCaloEvents)
219 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
221 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
223 for(Int_t irp=0; irp<GetNRPBin(); irp++)
225 Int_t bin = GetEventMixBin(ic, iz, irp);
226 fListMixCaloEvents[bin]->Delete() ;
227 delete fListMixCaloEvents[bin] ;
233 delete[] fListMixCaloEvents;
238 //______________________________________________________________________________________________________________________________________________________
239 void AliAnaParticleHadronCorrelation::FillChargedAngularCorrelationHistograms(const Float_t ptAssoc, const Float_t ptTrig, const Int_t bin,
240 const Float_t phiAssoc, const Float_t phiTrig, Float_t & deltaPhi,
241 const Float_t etaAssoc, const Float_t etaTrig,
242 const Bool_t decay, const Float_t hmpidSignal, const Int_t nTracks,
245 // Fill angular correlation related histograms
247 Float_t deltaEta = etaTrig-etaAssoc;
248 deltaPhi = phiTrig-phiAssoc;
249 Float_t deltaPhiOrg = deltaPhi;
251 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
252 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
254 fhEtaCharged ->Fill(ptAssoc,etaAssoc);
255 fhPhiCharged ->Fill(ptAssoc,phiAssoc);
256 fhDeltaEtaCharged ->Fill(ptTrig ,deltaEta);
257 fhDeltaPhiCharged ->Fill(ptTrig ,deltaPhi);
258 fhDeltaPhiChargedPt->Fill(ptAssoc, deltaPhi);
259 fhDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
263 fhDeltaEtaChargedPtA3GeV ->Fill(ptTrig ,deltaEta);
264 fhDeltaPhiChargedPtA3GeV ->Fill(ptTrig ,deltaPhi);
265 fhDeltaPhiDeltaEtaChargedPtA3GeV->Fill(deltaPhi, deltaEta);
270 if(fFillPileUpHistograms)
272 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
273 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
274 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
275 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
276 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
277 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
278 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
284 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
285 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
286 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
287 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
288 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
289 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
290 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
296 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
297 fhDeltaPhiChargedMC[mcIndex]->Fill(ptTrig , deltaPhi);
300 if(fDecayTrigger && decay) fhDeltaPhiDecayCharged ->Fill(ptTrig , deltaPhi);
302 Double_t dphiBrad = -100;
305 dphiBrad = atan2(sin(deltaPhiOrg), cos(deltaPhiOrg))/TMath::Pi();//-1 to 1
306 if(TMath::Abs(dphiBrad)>0.325 && TMath::Abs(dphiBrad)<0.475) //Hardcoded values, BAD, FIXME
308 fhAssocPtBkg->Fill(ptTrig, ptAssoc);
311 if(dphiBrad<-1./3) dphiBrad += 2;
312 fhDeltaPhiBrad->Fill(ptTrig, dphiBrad);
315 // Fill histograms in bins of associated particle pT
318 fhDeltaPhiDeltaEtaAssocPtBin [bin]->Fill(deltaPhi,deltaEta);
320 fhDeltaPhiAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
322 if(TMath::Abs(deltaEta)> 0.8)
323 fhDeltaPhiAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
325 if(TMath::Abs(deltaEta)< 0.01)
326 fhDeltaPhiAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
329 fhDeltaPhiBradAssocPtBin [bin]->Fill(ptTrig, dphiBrad);
331 if(fDecayTrigger && decay)
332 fhDeltaPhiDecayChargedAssocPtBin[bin]->Fill(ptTrig, deltaPhi);
334 if(fHMPIDCorrelation)
336 if( hmpidSignal > 0 )
338 //printf("Track pt %f with HMPID signal %f \n",pt,hmpidSignal);
339 fhDeltaPhiAssocPtBinHMPID[bin]->Fill(ptTrig, deltaPhi);
342 if(phiAssoc > 5*TMath::DegToRad() && phiAssoc < 20*TMath::DegToRad())
344 //printf("Track pt %f in HMPID acceptance phi %f \n ",pt,phi*TMath::RadToDeg() );
345 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->Fill(ptTrig, deltaPhi);
350 //fill different multiplicity histogram
353 for(Int_t im = 0; im<GetMultiBin(); im++)
355 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
357 fhTrigDeltaPhiCharged[im]->Fill(ptTrig,deltaPhi);
358 fhTrigDeltaEtaCharged[im]->Fill(ptTrig,deltaEta);
364 //____________________________________________________________________________________________________________________________________________________
365 Bool_t AliAnaParticleHadronCorrelation::FillChargedMCCorrelationHistograms(const Float_t mcAssocPt, Float_t mcAssocPhi, const Float_t mcAssocEta,
366 const Float_t mcTrigPt, const Float_t mcTrigPhi, const Float_t mcTrigEta)
368 // Fill MC histograms independently of AOD or ESD
370 //Select only hadrons in pt range
371 if(mcAssocPt < fMinAssocPt || mcAssocPt > fMaxAssocPt) return kTRUE ; // exclude but continue
373 if(mcAssocPhi < 0) mcAssocPhi+=TMath::TwoPi();
375 //remove trigger itself for correlation when use charged triggers
376 if(TMath::Abs(mcAssocPt -mcTrigPt ) < 1e-6 &&
377 TMath::Abs(mcAssocPhi-mcTrigPhi) < 1e-6 &&
378 TMath::Abs(mcAssocEta-mcTrigEta) < 1e-6) return kTRUE ; // exclude but continue
381 if( fMakeAbsoluteLeading && mcAssocPt > mcTrigPt ) return kFALSE; // jump event
383 //jump out this event if near side associated partile pt larger than trigger
384 if( fMakeNearSideLeading && mcAssocPt > mcTrigPt &&
385 TMath::Abs(mcAssocPhi-mcTrigPhi)<TMath::PiOver2() ) return kFALSE; // jump event
387 Float_t mcdeltaPhi= mcTrigPhi-mcAssocPhi;
388 if(mcdeltaPhi <= -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
389 if(mcdeltaPhi > 3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
391 Float_t mcxE =-mcAssocPt/mcTrigPt*TMath::Cos(mcdeltaPhi);// -(mcAssocPx*pxprim+mcAssocPy*pyprim)/(mcTrigPt*mcTrigPt);
392 Float_t mchbpXE =-100 ;
393 if(mcxE > 0 ) mchbpXE = TMath::Log(1./mcxE);
395 Float_t mczT = mcAssocPt/mcTrigPt ;
396 Float_t mchbpZT =-100 ;
397 if(mczT > 0 ) mchbpZT = TMath::Log(1./mczT);
399 //Selection within angular range
400 if( mcdeltaPhi< -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
401 if( mcdeltaPhi>3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
403 Double_t mcpout = mcAssocPt*TMath::Sin(mcdeltaPhi) ;
406 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",
407 mcAssocPt,mcAssocPhi, mcTrigPhi,fDeltaPhiMinCut, mcdeltaPhi, fDeltaPhiMaxCut, GetMinPt());
410 fhMCEtaCharged ->Fill(mcAssocPt, mcAssocEta);
411 fhMCPhiCharged ->Fill(mcAssocPt, mcAssocPhi);
412 fhMCDeltaEtaCharged->Fill(mcTrigPt, mcTrigEta-mcAssocEta);
413 fhMCDeltaPhiCharged->Fill(mcTrigPt, mcdeltaPhi);
414 fhMCPtAssocDeltaPhi->Fill(mcAssocPt, mcdeltaPhi);
416 fhMCDeltaPhiDeltaEtaCharged->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
418 //delta phi cut for correlation
419 if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
421 fhMCDeltaPhiChargedPt->Fill(mcAssocPt,mcdeltaPhi);
422 fhMCPtXECharged ->Fill(mcTrigPt,mcxE);
423 fhMCPtHbpXECharged ->Fill(mcTrigPt,mchbpXE);
424 fhMCPtZTCharged ->Fill(mcTrigPt,mczT);
425 fhMCPtHbpZTCharged ->Fill(mcTrigPt,mchbpZT);
426 fhMCPtTrigPout ->Fill(mcTrigPt, mcpout) ;
430 if ( (mcdeltaPhi > fUeDeltaPhiMinCut) && (mcdeltaPhi < fUeDeltaPhiMaxCut) )
432 Double_t randomphi = gRandom->Uniform(TMath::Pi()/2,3*TMath::Pi()/2);
433 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
435 if(mcUexE < 0.) mcUexE = -mcUexE;
437 fhMCPtXEUeCharged->Fill(mcTrigPt,mcUexE);
438 if(mcUexE > 0) fhMCPtHbpXEUeCharged->Fill(mcTrigPt,TMath::Log(1/mcUexE));
440 fhMCUePart->Fill(mcTrigPt);
446 //___________________________________________________________________________________________________________________
447 void AliAnaParticleHadronCorrelation::FillChargedMomentumImbalanceHistograms(const Float_t ptTrig, const Float_t ptAssoc,
448 const Float_t xE, const Float_t hbpXE,
449 const Float_t zT, const Float_t hbpZT,
451 const Int_t nTracks, const Int_t charge,
452 const Int_t bin, const Bool_t decay,
456 // Fill mostly momentum imbalance related histograms
458 fhXECharged ->Fill(ptTrig , xE);
459 fhPtHbpXECharged ->Fill(ptTrig , hbpXE);
460 fhZTCharged ->Fill(ptTrig , zT);
461 fhPtHbpZTCharged ->Fill(ptTrig , hbpZT);
462 fhPtTrigPout ->Fill(ptTrig , pout) ;
463 fhPtTrigCharged ->Fill(ptTrig , ptAssoc) ;
466 if(fFillPileUpHistograms)
468 if(GetReader()->IsPileUpFromSPD()) { fhXEChargedPileUp[0]->Fill(ptTrig ,xE); fhZTChargedPileUp[0]->Fill(ptTrig,zT);fhPtTrigChargedPileUp[0]->Fill(ptTrig,ptAssoc); }
469 if(GetReader()->IsPileUpFromEMCal()) { fhXEChargedPileUp[1]->Fill(ptTrig ,xE); fhZTChargedPileUp[1]->Fill(ptTrig,zT);fhPtTrigChargedPileUp[1]->Fill(ptTrig,ptAssoc); }
470 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEChargedPileUp[2]->Fill(ptTrig ,xE); fhZTChargedPileUp[2]->Fill(ptTrig,zT);fhPtTrigChargedPileUp[2]->Fill(ptTrig,ptAssoc); }
471 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEChargedPileUp[3]->Fill(ptTrig ,xE); fhZTChargedPileUp[3]->Fill(ptTrig,zT);fhPtTrigChargedPileUp[3]->Fill(ptTrig,ptAssoc); }
472 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEChargedPileUp[4]->Fill(ptTrig ,xE); fhZTChargedPileUp[4]->Fill(ptTrig,zT);fhPtTrigChargedPileUp[4]->Fill(ptTrig,ptAssoc); }
473 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEChargedPileUp[5]->Fill(ptTrig ,xE); fhZTChargedPileUp[5]->Fill(ptTrig,zT);fhPtTrigChargedPileUp[5]->Fill(ptTrig,ptAssoc); }
474 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEChargedPileUp[6]->Fill(ptTrig ,xE); fhZTChargedPileUp[6]->Fill(ptTrig,zT);fhPtTrigChargedPileUp[6]->Fill(ptTrig,ptAssoc); }
479 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
480 fhXEChargedMC [mcIndex]->Fill(ptTrig , xE );
483 if(fDecayTrigger && decay)
485 fhXEDecayCharged->Fill(ptTrig,xE);
486 fhZTDecayCharged->Fill(ptTrig,zT);
487 } // photon decay pi0/eta trigger
489 if(bin >= 0 )//away side
491 fhXEAssocPtBin[bin]->Fill(ptTrig, xE) ;
492 fhZTAssocPtBin[bin]->Fill(ptTrig, zT) ;
494 if(fDecayTrigger && decay)
496 fhXEDecayChargedAssocPtBin[bin]->Fill(ptTrig, xE);
497 fhZTDecayChargedAssocPtBin[bin]->Fill(ptTrig, zT);
503 fhXEPosCharged->Fill(ptTrig,xE) ;
504 fhZTPosCharged->Fill(ptTrig,zT) ;
508 fhXENegCharged->Fill(ptTrig,xE) ;
509 fhZTNegCharged->Fill(ptTrig,zT) ;
512 //fill different multiplicity histogram
515 for(Int_t im=0; im<GetMultiBin(); im++)
517 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
519 fhTrigXECorr[im]->Fill(ptTrig,xE);
520 fhTrigZTCorr[im]->Fill(ptTrig,zT);
523 } //multiplicity events selection
526 //_______________________________________________________________________________________________________________________
527 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventHistograms(const Float_t ptTrig, const Float_t ptAssoc,
528 const Float_t deltaPhi, const Int_t nTracks)
530 // Fill underlying event histograms
532 fhDeltaPhiUeChargedPt->Fill(ptAssoc,deltaPhi);
534 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
535 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
536 Double_t uezT = ptAssoc/ptTrig;
538 if(uexE < 0.) uexE = -uexE;
540 fhXEUeCharged->Fill(ptTrig,uexE);
541 if(uexE > 0) fhPtHbpXEUeCharged->Fill(ptTrig,TMath::Log(1/uexE));
543 fhZTUeCharged->Fill(ptTrig,uezT);
544 if(uexE > 0) fhPtHbpZTUeCharged->Fill(ptTrig,TMath::Log(1/uezT));
548 if(fFillPileUpHistograms)
550 if(GetReader()->IsPileUpFromSPD()) { fhXEUeChargedPileUp[0]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[0]->Fill(ptTrig,uezT);}
551 if(GetReader()->IsPileUpFromEMCal()) { fhXEUeChargedPileUp[1]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[1]->Fill(ptTrig,uezT);}
552 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEUeChargedPileUp[2]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[2]->Fill(ptTrig,uezT);}
553 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEUeChargedPileUp[3]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[3]->Fill(ptTrig,uezT);}
554 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEUeChargedPileUp[4]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[4]->Fill(ptTrig,uezT);}
555 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEUeChargedPileUp[5]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[5]->Fill(ptTrig,uezT);}
556 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEUeChargedPileUp[6]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[6]->Fill(ptTrig,uezT);}
561 for(Int_t im=0; im<GetMultiBin(); im++)
563 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
565 fhTrigXEUeCorr[im]->Fill(ptTrig,uexE); // xE? CHECK
566 fhTrigZTUeCorr[im]->Fill(ptTrig,uezT); // zT? CHECK
569 } //multiplicity events selection
572 //_____________________________________________________________________________________________________
573 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventSidesHistograms(const Float_t ptTrig,
574 const Float_t ptAssoc,
575 const Float_t deltaPhi)
577 // Fill underlying event histograms to the left and right of trigger
578 if((deltaPhi<-fUeDeltaPhiMinCut) || (deltaPhi >2*fUeDeltaPhiMaxCut))
580 fhDeltaPhiUeLeftCharged->Fill(ptAssoc,deltaPhi);
581 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
582 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
583 Double_t uezT = ptAssoc/ptTrig;
585 if(uexE < 0.) uexE = -uexE;
587 fhXEUeLeftCharged->Fill(ptTrig,uexE);
588 if(uexE > 0) fhPtHbpXEUeLeftCharged->Fill(ptTrig,TMath::Log(1/uexE));
590 fhZTUeLeftCharged->Fill(ptTrig,uezT);
591 if(uexE > 0) fhPtHbpZTUeLeftCharged->Fill(ptTrig,TMath::Log(1/uezT));
592 fhDeltaPhiUeLeftCharged->Fill(ptAssoc, deltaPhi);
595 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut))
597 fhDeltaPhiUeRightCharged->Fill(ptAssoc,deltaPhi);
598 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
599 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
600 Double_t uezT = ptAssoc/ptTrig;
602 if(uexE < 0.) uexE = -uexE;
604 fhXEUeRightCharged->Fill(ptTrig,uexE);
605 if(uexE > 0) fhPtHbpXEUeRightCharged->Fill(ptTrig,TMath::Log(1/uexE));
607 fhZTUeRightCharged->Fill(ptTrig,uezT);
608 if(uexE > 0) fhPtHbpZTUeRightCharged->Fill(ptTrig,TMath::Log(1/uezT));
609 fhDeltaPhiUeRightCharged->Fill(ptAssoc, deltaPhi);
612 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-TMath::Pi()/2))
614 fhDeltaPhiUeLeftDownCharged->Fill(ptAssoc,deltaPhi);
615 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
616 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
618 if(uexE < 0.) uexE = -uexE;
620 fhXEUeLeftDownCharged->Fill(ptTrig,uexE);
623 if((deltaPhi>2*fUeDeltaPhiMaxCut) && (deltaPhi <3*TMath::Pi()/2))
625 fhDeltaPhiUeLeftUpCharged->Fill(ptAssoc,deltaPhi);
626 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
627 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
629 if(uexE < 0.) uexE = -uexE;
631 fhXEUeLeftUpCharged->Fill(ptTrig,uexE);
634 if((deltaPhi > TMath::Pi()/2) && (deltaPhi < fUeDeltaPhiMaxCut))
636 fhDeltaPhiUeRightUpCharged->Fill(ptAssoc,deltaPhi);
637 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
638 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
640 if(uexE < 0.) uexE = -uexE;
642 fhXEUeRightUpCharged->Fill(ptTrig,uexE);
645 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < TMath::Pi()/2))
647 fhDeltaPhiUeRightDownCharged->Fill(ptAssoc,deltaPhi);
648 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
649 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
651 if(uexE < 0.) uexE = -uexE;
653 fhXEUeRightDownCharged->Fill(ptTrig,uexE);
657 //______________________________________________________________________________________________________________________________
658 void AliAnaParticleHadronCorrelation::FillDecayPhotonCorrelationHistograms(const Float_t ptAssoc, const Float_t phiAssoc,
659 const TLorentzVector mom1, const TLorentzVector mom2,
660 const Bool_t bChargedOrNeutral)
662 // Do correlation with decay photons of triggered pi0 or eta
664 // Calculate the correlation parameters
665 Float_t ptDecay1 = mom1.Pt();
666 Float_t ptDecay2 = mom2.Pt();
668 Float_t zTDecay1 = -100, zTDecay2 = -100;
669 if(ptDecay1) zTDecay1 = ptAssoc/ptDecay1 ;
670 if(ptDecay2) zTDecay2 = ptAssoc/ptDecay2 ;
672 Float_t deltaPhiDecay1 = mom1.Phi()-phiAssoc;
673 if(deltaPhiDecay1< -TMath::PiOver2()) deltaPhiDecay1+=TMath::TwoPi();
674 if(deltaPhiDecay1>3*TMath::PiOver2()) deltaPhiDecay1-=TMath::TwoPi();
676 Float_t deltaPhiDecay2 = mom2.Phi()-phiAssoc;
677 if(deltaPhiDecay2< -TMath::PiOver2()) deltaPhiDecay2+=TMath::TwoPi();
678 if(deltaPhiDecay2>3*TMath::PiOver2()) deltaPhiDecay2-=TMath::TwoPi();
680 Float_t xEDecay1 =-zTDecay1*TMath::Cos(deltaPhiDecay1); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
681 Float_t xEDecay2 =-zTDecay2*TMath::Cos(deltaPhiDecay2); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
683 if(bChargedOrNeutral) // correlate with charges
685 fhDeltaPhiDecayCharged->Fill(ptDecay1, deltaPhiDecay1);
686 fhDeltaPhiDecayCharged->Fill(ptDecay2, deltaPhiDecay2);
688 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms( Charged corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
690 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
692 fhZTDecayCharged->Fill(ptDecay1,zTDecay1);
693 fhXEDecayCharged->Fill(ptDecay1,xEDecay1);
695 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
697 fhZTDecayCharged->Fill(ptDecay2,zTDecay2);
698 fhXEDecayCharged->Fill(ptDecay2,xEDecay2);
701 else // correlate with neutrals
703 fhDeltaPhiDecayCharged->Fill(ptDecay1, deltaPhiDecay1);
704 fhDeltaPhiDecayCharged->Fill(ptDecay2, deltaPhiDecay2);
706 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms(Neutral corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
708 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
710 fhZTDecayCharged->Fill(ptDecay1,zTDecay1);
711 fhXEDecayCharged->Fill(ptDecay1,xEDecay1);
713 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
715 fhZTDecayCharged->Fill(ptDecay2,zTDecay2);
716 fhXEDecayCharged->Fill(ptDecay2,xEDecay2);
721 //______________________________________________________________________________________________________________________________________________________
722 void AliAnaParticleHadronCorrelation::FillNeutralAngularCorrelationHistograms(const Float_t ptAssoc, const Float_t ptTrig,
723 const Float_t phiAssoc, const Float_t phiTrig, Float_t & deltaPhi,
724 const Float_t etaAssoc, const Float_t etaTrig)
726 // Fill angular correlation related histograms
728 Float_t deltaEta = etaTrig-etaAssoc;
729 deltaPhi = phiTrig-phiAssoc;
731 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
732 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
734 fhEtaNeutral ->Fill(ptAssoc,etaAssoc);
735 fhPhiNeutral ->Fill(ptAssoc,phiAssoc);
736 fhDeltaEtaNeutral->Fill(ptTrig ,deltaEta);
737 fhDeltaPhiNeutral->Fill(ptTrig ,deltaPhi);
739 if(ptAssoc > 2 ) fhDeltaPhiDeltaEtaNeutral->Fill(deltaPhi, deltaEta);
743 //_____________________________________________________________________________________________________________________________
744 void AliAnaParticleHadronCorrelation::FillNeutralUnderlyingEventSidesHistograms(const Float_t ptTrig, const Float_t ptAssoc,
745 const Float_t xE, const Float_t hbpXE,
746 const Float_t zT, const Float_t hbpZT,
747 const Float_t deltaPhi)
749 // Fill underlying event histograms to the left and right of trigger
751 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-fUeDeltaPhiMaxCut))
753 fhDeltaPhiUeLeftNeutral->Fill(ptAssoc, deltaPhi);
754 fhXEUeLeftNeutral ->Fill(ptTrig , xE);
755 fhPtHbpXEUeLeftNeutral ->Fill(ptTrig , hbpXE);
756 fhZTUeLeftNeutral ->Fill(ptTrig , zT);
757 fhPtHbpZTUeLeftNeutral ->Fill(ptTrig , hbpZT);
760 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut))
762 fhDeltaPhiUeRightNeutral->Fill(ptAssoc, deltaPhi);
763 fhXEUeRightNeutral ->Fill(ptTrig , xE);
764 fhPtHbpXEUeRightNeutral ->Fill(ptTrig , hbpXE);
765 fhZTUeRightNeutral ->Fill(ptTrig , zT);
766 fhPtHbpZTUeRightNeutral ->Fill(ptTrig , hbpZT);
770 //_____________________________________________________________
771 void AliAnaParticleHadronCorrelation::FillChargedEventMixPool()
773 // Mixed event pool filling for tracks
775 //printf("FillChargedEventMixPool for %s\n",GetInputAODName().Data());
777 if(fUseMixStoredInReader && GetReader()->GetLastTracksMixedEvent() == GetEventNumber())
779 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
780 return ; // pool filled previously for another trigger
783 Int_t nTracks = GetCTSTracks()->GetEntriesFast();
785 fhNtracksAll->Fill(nTracks);
787 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
788 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
790 if(!inputHandler) return ;
792 if( inputHandler->IsEventSelected( ) & GetReader()->GetEventTriggerMask() )
794 fhNtracksTrigger->Fill(nTracks);
797 // Do mixing only with MB event (or the chosen mask), if not skip
798 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
800 fhNtracksMB->Fill(nTracks);
802 Int_t eventBin = GetEventMixBin();
804 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
805 if(eventBin < 0) return;
807 TObjArray * mixEventTracks = new TObjArray;
809 if(fUseMixStoredInReader)
811 fListMixTrackEvents[eventBin] = GetReader()->GetListWithMixedEventsForTracks(eventBin);
814 if(!fListMixTrackEvents[eventBin]) fListMixTrackEvents[eventBin] = new TList();
816 //printf("%s ***** Pool Event bin : %d - nTracks %d\n",GetInputAODName().Data(),eventBin, GetCTSTracks()->GetEntriesFast());
818 TList * pool = fListMixTrackEvents[eventBin];
821 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
823 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
825 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
826 p3.SetXYZ(mom[0],mom[1],mom[2]);
827 Float_t pt = p3.Pt();
829 //Select only hadrons in pt range
830 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
832 AliAODPWG4Particle * mixedTrack = new AliAODPWG4Particle(mom[0],mom[1],mom[2],0);
833 mixedTrack->SetDetector("CTS");
834 mixedTrack->SetChargedBit(track->Charge()>0);
835 mixEventTracks->Add(mixedTrack);
838 //Set the event number where the last event was added, to avoid double pool filling
839 GetReader()->SetLastTracksMixedEvent(GetEventNumber());
841 //printf("Add event to pool with %d tracks \n ",mixEventTracks->GetEntries());
842 pool->AddFirst(mixEventTracks);
845 //printf("Pool size %d, max %d\n",pool->GetSize(), GetNMaxEvMix());
847 if(pool->GetSize() > GetNMaxEvMix())
849 TClonesArray * tmp = static_cast<TClonesArray*>(pool->Last()) ;
855 //_____________________________________________________________
856 void AliAnaParticleHadronCorrelation::FillNeutralEventMixPool()
858 // Mixed event pool filling for neutral clusters
859 // Right now only for EMCAL and in isolation case
861 //printf("FillNeutralEventMixPool for %s\n",GetInputAODName().Data());
863 if(fUseMixStoredInReader && GetReader()->GetLastCaloMixedEvent() == GetEventNumber())
865 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
866 return ; // pool filled previously for another trigger
869 // Int_t nClusters = GetEMCALClusters()->GetEntriesFast();
871 // fhNclustersAll->Fill(nClusters);
873 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
874 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
876 if(!inputHandler) return ;
878 // if( inputHandler->IsEventSelected( ) & GetReader()->GetEventTriggerMask() )
880 // fhNclustersTrigger->Fill(nClusters);
883 // Do mixing only with MB event (or the chosen mask), if not skip
884 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
886 // fhNClustersMB->Fill(nCluster);
888 Int_t eventBin = GetEventMixBin();
890 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
891 if(eventBin < 0) return;
893 TObjArray * mixEventCalo = new TObjArray;
895 if(fUseMixStoredInReader)
897 fListMixCaloEvents[eventBin] = GetReader()->GetListWithMixedEventsForCalo(eventBin);
900 if(!fListMixCaloEvents[eventBin]) fListMixCaloEvents[eventBin] = new TList();
902 TList * poolCalo = fListMixCaloEvents[eventBin];
904 TObjArray * pl = GetEMCALClusters();
905 //if (GetAODObjArrayName.Contains("PHOS") )pl = GetPHOSClusters();
906 //else pl = GetEMCALClusters();
909 //printf("NClusters before selection %d\n",pl->GetEntriesFast());
910 for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ )
912 AliVCluster * calo = (AliVCluster *) (pl->At(ipr)) ;
914 // remove matched clusters
915 if( IsTrackMatched( calo, GetReader()->GetInputEvent() ) ) continue ;
917 //Cluster momentum calculation
918 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
920 calo->GetMomentum(mom,GetVertex(0)) ;
921 }//Assume that come from vertex in straight line
924 Double_t vertex[]={0,0,0};
925 calo->GetMomentum(mom,vertex) ;
928 Float_t pt = mom.Pt();
929 //Select only clusters in pt range
930 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
932 AliAODPWG4Particle * mixedCalo = new AliAODPWG4Particle(mom);
933 mixedCalo->SetDetector("EMCAL");
934 mixEventCalo->Add(mixedCalo);
937 //Set the event number where the last event was added, to avoid double pool filling
938 GetReader()->SetLastCaloMixedEvent(GetEventNumber());
940 //printf("Add event to pool with %d clusters \n ",mixEventCalo->GetEntries());
941 poolCalo->AddFirst(mixEventCalo);
944 //printf("Pool size %d, max %d\n",poolCalo->GetSize(), GetNMaxEvMix());
946 if(poolCalo->GetSize() > GetNMaxEvMix())
948 TClonesArray * tmp = static_cast<TClonesArray*>(poolCalo->Last()) ;
949 poolCalo->RemoveLast() ;
954 //____________________________________________________________
955 TObjString* AliAnaParticleHadronCorrelation::GetAnalysisCuts()
957 //Save parameters used for analysis
958 TString parList ; //this will be list of parameters used for this analysis.
959 const Int_t buffersize = 560;
960 char onePar[buffersize] ;
962 snprintf(onePar,buffersize,"--- AliAnaPaticleHadronCorrelation ---\n") ;
964 snprintf(onePar,buffersize," Pt Trigger > %3.2f ", fMinTriggerPt) ;
966 snprintf(onePar,buffersize," %3.2f < Pt associated < %3.2f ", fMinAssocPt, fMaxAssocPt) ;
968 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-Hadron < %3.2f ", fDeltaPhiMinCut, fDeltaPhiMaxCut) ;
970 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-UeHadron < %3.2f ", fUeDeltaPhiMinCut, fUeDeltaPhiMaxCut) ;
972 snprintf(onePar,buffersize,"Isolated Trigger? %d\n", fSelectIsolated) ;
974 snprintf(onePar,buffersize,"Several UE? %d\n", fMakeSeveralUE) ;
976 snprintf(onePar,buffersize,"Name of AOD Pi0 Branch %s ", fPi0AODBranchName.Data());
978 snprintf(onePar,buffersize,"Do Decay-hadron correlation ? pi0 %d, decay %d", fPi0Trigger, fDecayTrigger) ;
980 snprintf(onePar,buffersize,"Select absolute leading for cluster triggers ? %d or Near Side Leading %d \n",
981 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
983 snprintf(onePar,buffersize,"Associated particle pt bins %d: ", fNAssocPtBins) ;
985 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
986 snprintf(onePar,buffersize,"bin %d = [%2.1f,%2.1f];", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
990 //Get parameters set in base class.
991 parList += GetBaseParametersList() ;
993 //Get parameters set in FiducialCut class (not available yet)
994 //parlist += GetFidCut()->GetFidCutParametersList()
996 return new TObjString(parList) ;
1000 //________________________________________________________________
1001 TList * AliAnaParticleHadronCorrelation::GetCreateOutputObjects()
1004 // Create histograms to be saved in output file and
1005 // store them in fOutputContainer
1007 TList * outputContainer = new TList() ;
1008 outputContainer->SetName("CorrelationHistos") ;
1010 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();
1011 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();
1012 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();
1014 Int_t nMixBins = GetNCentrBin()*GetNZvertBin()*GetNRPBin();
1016 TString nameMC[] = {"Photon","Pi0","Pi0Decay","EtaDecay","OtherDecay","Electron","Hadron"};
1017 TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
1019 // For vz dependent histograms, if option ON
1021 if(fCorrelVzBin) nz = GetNZvertBin();
1025 fhPtInput = new TH1F("hPtInput","p_{T} distribution of input trigger particles", nptbins,ptmin,ptmax);
1026 fhPtInput->SetXTitle("p_{T}^{trig} (GeV/c)");
1027 outputContainer->Add(fhPtInput);
1029 fhPtFidCut = new TH1F("hPtFidCut","p_{T} distribution of input trigger particles after fiducial cut", nptbins,ptmin,ptmax);
1030 fhPtFidCut->SetXTitle("p_{T}^{trig} (GeV/c)");
1031 outputContainer->Add(fhPtFidCut);
1033 fhPtLeading = new TH1F("hPtLeading","p_{T} distribution of leading particles", nptbins,ptmin,ptmax);
1034 fhPtLeading->SetXTitle("p_{T}^{trig} (GeV/c)");
1035 outputContainer->Add(fhPtLeading);
1039 for(Int_t i=0; i < 7; i++)
1041 fhPtLeadingMC[i] = new TH1F(Form("hPtLeading_MC%s",nameMC[i].Data()),
1042 Form("p_{T} distribution of leading particles, trigger origin is %s",nameMC[i].Data()),
1043 nptbins,ptmin,ptmax);
1044 fhPtLeadingMC[i]->SetXTitle("p_{T}^{trig} (GeV/c)");
1045 outputContainer->Add(fhPtLeadingMC[i]);
1051 fhPtLeadingVzBin = new TH2F("hPtLeadingVzBin","p_{T} distribution of leading particles vs vz bin", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
1052 fhPtLeadingVzBin->SetXTitle("p_{T}^{trig} (GeV/c)");
1053 fhPtLeadingVzBin->SetYTitle("v_{z} bin");
1054 outputContainer->Add(fhPtLeadingVzBin);
1057 fhPtLeadingBin = new TH2F ("hPtLeadingBin","p_{T} distribution of leading particles", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
1058 fhPtLeadingBin->SetXTitle("p_{T}^{trig} (GeV/c)");
1059 fhPtLeadingBin->SetYTitle("Bin");
1060 outputContainer->Add(fhPtLeadingBin);
1062 fhPhiLeading = new TH2F ("hPhiLeading","#phi distribution of leading Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
1063 fhPhiLeading->SetYTitle("#phi (rad)");
1064 outputContainer->Add(fhPhiLeading);
1066 fhEtaLeading = new TH2F ("hEtaLeading","#eta distribution of leading",nptbins,ptmin,ptmax, netabins,etamin,etamax);
1067 fhEtaLeading->SetYTitle("#eta ");
1068 outputContainer->Add(fhEtaLeading);
1070 fhPtLeadingCentrality = new TH2F("hPtLeadingCentrality","Leading particle p_{T} vs centrality",nptbins,ptmin,ptmax,100,0.,100) ;
1071 fhPtLeadingCentrality->SetXTitle("p_{T}^{trig} (GeV/c)");
1072 fhPtLeadingCentrality->SetYTitle("Centrality (%)");
1073 outputContainer->Add(fhPtLeadingCentrality) ;
1075 fhPtLeadingEventPlane = new TH2F("hPtLeadingEventPlane","Leading particle p_{T} vs event plane angle",nptbins,ptmin,ptmax, 100,0.,TMath::Pi()) ;
1076 fhPtLeadingEventPlane->SetXTitle("p_{T}^{trig} (GeV/c)");
1077 fhPtLeadingEventPlane->SetXTitle("EP angle (rad)");
1078 outputContainer->Add(fhPtLeadingEventPlane) ;
1080 fhLeadingEventPlaneCentrality = new TH2F("hLeadingEventPlane","Leading particle centrality vs event plane angle",100,0.,100,100,0.,TMath::Pi()) ;
1081 fhLeadingEventPlaneCentrality->SetXTitle("Centrality (%)");
1082 fhLeadingEventPlaneCentrality->SetYTitle("EP angle (rad)");
1083 outputContainer->Add(fhLeadingEventPlaneCentrality) ;
1085 //Correlation with charged hadrons
1086 if(GetReader()->IsCTSSwitchedOn())
1088 fhDeltaPhiDeltaEtaCharged = new TH2F
1089 ("hDeltaPhiDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}}",
1090 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1091 fhDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi");
1092 fhDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
1094 fhDeltaPhiDeltaEtaChargedPtA3GeV = new TH2F
1095 ("hDeltaPhiDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}, p_{TA}>3 GeV/c}",
1096 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1097 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetXTitle("#Delta #phi");
1098 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1100 fhPhiCharged = new TH2F
1101 ("hPhiCharged","#phi_{h^{#pm}} vs p_{T #pm}",
1102 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1103 fhPhiCharged->SetYTitle("#phi_{h^{#pm}} (rad)");
1104 fhPhiCharged->SetXTitle("p_{T #pm} (GeV/c)");
1106 fhEtaCharged = new TH2F
1107 ("hEtaCharged","#eta_{h^{#pm}} vs p_{T #pm}",
1108 nptbins,ptmin,ptmax,netabins,etamin,etamax);
1109 fhEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
1110 fhEtaCharged->SetXTitle("p_{T #pm} (GeV/c)");
1112 fhDeltaPhiCharged = new TH2F
1113 ("hDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}",
1114 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1115 fhDeltaPhiCharged->SetYTitle("#Delta #phi");
1116 fhDeltaPhiCharged->SetXTitle("p_{T trigger} (GeV/c)");
1118 fhDeltaPhiChargedPtA3GeV = new TH2F
1119 ("hDeltaPhiChargedPtA3GeV","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}, p_{TA}>3 GeV/c",
1120 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1121 fhDeltaPhiChargedPtA3GeV->SetYTitle("#Delta #phi");
1122 fhDeltaPhiChargedPtA3GeV->SetXTitle("p_{T trigger} (GeV/c)");
1125 fhDeltaPhiChargedPt = new TH2F
1126 ("hDeltaPhiChargedPt","#phi_{trigger} - #phi_{#h^{#pm}} vs p_{T h^{#pm}}",
1127 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1128 fhDeltaPhiChargedPt->SetYTitle("#Delta #phi");
1129 fhDeltaPhiChargedPt->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1131 fhDeltaPhiUeChargedPt = new TH2F
1132 ("hDeltaPhiUeChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}}",
1133 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1134 fhDeltaPhiUeChargedPt->SetYTitle("#Delta #phi");
1135 fhDeltaPhiUeChargedPt->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1137 fhUePart = new TH1F("hUePart","UE particles distribution vs pt trig",
1138 nptbins,ptmin,ptmax);
1139 fhUePart->SetYTitle("dNch");
1140 fhUePart->SetXTitle("p_{T trigger}");
1143 fhDeltaEtaCharged = new TH2F
1144 ("hDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger}",
1145 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1146 fhDeltaEtaCharged->SetYTitle("#Delta #eta");
1147 fhDeltaEtaCharged->SetXTitle("p_{T trigger} (GeV/c)");
1149 fhDeltaEtaChargedPtA3GeV = new TH2F
1150 ("hDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger}, p_{TA}>3 GeV/c",
1151 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1152 fhDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1153 fhDeltaEtaChargedPtA3GeV->SetXTitle("p_{T trigger} (GeV/c)");
1156 new TH2F("hXECharged","x_{E} for charged tracks",
1157 nptbins,ptmin,ptmax,200,0.,2.);
1158 fhXECharged->SetYTitle("x_{E}");
1159 fhXECharged->SetXTitle("p_{T trigger}");
1162 new TH2F("hXEUeCharged","x_{E} for Underlying Event",
1163 nptbins,ptmin,ptmax,200,0.,2.);
1164 fhXEUeCharged->SetYTitle("x_{E}");
1165 fhXEUeCharged->SetXTitle("p_{T trigger}");
1168 new TH2F("hXEPositiveCharged","x_{E} for positive charged tracks",
1169 nptbins,ptmin,ptmax,200,0.,2.);
1170 fhXEPosCharged->SetYTitle("x_{E}");
1171 fhXEPosCharged->SetXTitle("p_{T trigger}");
1174 new TH2F("hXENegativeCharged","x_{E} for negative charged tracks",
1175 nptbins,ptmin,ptmax,200,0.,2.);
1176 fhXENegCharged->SetYTitle("x_{E}");
1177 fhXENegCharged->SetXTitle("p_{T trigger}");
1180 new TH2F("hHbpXECharged","#xi = ln(1/x_{E}) with charged hadrons",
1181 nptbins,ptmin,ptmax,200,0.,10.);
1182 fhPtHbpXECharged->SetYTitle("ln(1/x_{E})");
1183 fhPtHbpXECharged->SetXTitle("p_{T trigger}");
1185 fhPtHbpXEUeCharged =
1186 new TH2F("hHbpXEUeCharged","#xi = ln(1/x_{E}) with charged hadrons,Underlying Event",
1187 nptbins,ptmin,ptmax,200,0.,10.);
1188 fhPtHbpXEUeCharged->SetYTitle("ln(1/x_{E})");
1189 fhPtHbpXEUeCharged->SetXTitle("p_{T trigger}");
1192 new TH2F("hZTCharged","z_{T} for charged tracks",
1193 nptbins,ptmin,ptmax,200,0.,2.);
1194 fhZTCharged->SetYTitle("z_{T}");
1195 fhZTCharged->SetXTitle("p_{T trigger}");
1198 new TH2F("hZTUeCharged","z_{T} for Underlying Event",
1199 nptbins,ptmin,ptmax,200,0.,2.);
1200 fhZTUeCharged->SetYTitle("z_{T}");
1201 fhZTUeCharged->SetXTitle("p_{T trigger}");
1204 new TH2F("hZTPositiveCharged","z_{T} for positive charged tracks",
1205 nptbins,ptmin,ptmax,200,0.,2.);
1206 fhZTPosCharged->SetYTitle("z_{T}");
1207 fhZTPosCharged->SetXTitle("p_{T trigger}");
1210 new TH2F("hZTNegativeCharged","z_{T} for negative charged tracks",
1211 nptbins,ptmin,ptmax,200,0.,2.);
1212 fhZTNegCharged->SetYTitle("z_{T}");
1213 fhZTNegCharged->SetXTitle("p_{T trigger}");
1216 new TH2F("hHbpZTCharged","#xi = ln(1/z_{T}) with charged hadrons",
1217 nptbins,ptmin,ptmax,200,0.,10.);
1218 fhPtHbpZTCharged->SetYTitle("ln(1/z_{T})");
1219 fhPtHbpZTCharged->SetXTitle("p_{T trigger}");
1221 fhPtHbpZTUeCharged =
1222 new TH2F("hHbpZTUeCharged","#xi = ln(1/z_{T}) with charged hadrons,Underlying Event",
1223 nptbins,ptmin,ptmax,200,0.,10.);
1224 fhPtHbpZTUeCharged->SetYTitle("ln(1/x_{E})");
1225 fhPtHbpZTUeCharged->SetXTitle("p_{T trigger}");
1228 new TH2F("hPtTrigPout","Pout with triggers",
1229 nptbins,ptmin,ptmax,2*nptbins,-ptmax,ptmax);
1230 fhPtTrigPout->SetYTitle("p_{out} (GeV/c)");
1231 fhPtTrigPout->SetXTitle("p_{T trigger} (GeV/c)");
1234 new TH2F("hPtTrigCharged","trigger and charged tracks pt distribution",
1235 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1236 fhPtTrigCharged->SetYTitle("p_{T h^{#pm}} (GeV/c)");
1237 fhPtTrigCharged->SetXTitle("p_{T trigger} (GeV/c)");
1239 outputContainer->Add(fhDeltaPhiDeltaEtaCharged);
1240 outputContainer->Add(fhDeltaPhiDeltaEtaChargedPtA3GeV);
1241 outputContainer->Add(fhPhiCharged) ;
1242 outputContainer->Add(fhEtaCharged) ;
1243 outputContainer->Add(fhDeltaPhiCharged) ;
1244 outputContainer->Add(fhDeltaPhiChargedPtA3GeV) ;
1245 outputContainer->Add(fhDeltaEtaCharged) ;
1246 outputContainer->Add(fhDeltaEtaChargedPtA3GeV) ;
1247 outputContainer->Add(fhDeltaPhiChargedPt) ;
1248 outputContainer->Add(fhDeltaPhiUeChargedPt) ;
1249 outputContainer->Add(fhUePart);
1251 outputContainer->Add(fhXECharged) ;
1255 for(Int_t i=0; i < 7; i++)
1258 fhDeltaPhiChargedMC[i] = new TH2F(Form("hDeltaPhiCharged_MC%s",nameMC[i].Data()),
1259 Form("#Delta #phi for charged tracks, trigger origin is %s",nameMC[i].Data()),
1260 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
1261 fhDeltaPhiChargedMC[i]->SetYTitle("x_{E}");
1262 fhDeltaPhiChargedMC[i]->SetXTitle("p_{T trigger}");
1263 outputContainer->Add(fhDeltaPhiChargedMC[i]) ;
1265 fhXEChargedMC[i] = new TH2F(Form("hXECharged_MC%s",nameMC[i].Data()),
1266 Form("x_{E} for charged tracks, trigger origin is %s",nameMC[i].Data()),
1267 nptbins,ptmin,ptmax,200,0.,2.);
1268 fhXEChargedMC[i]->SetYTitle("x_{E}");
1269 fhXEChargedMC[i]->SetXTitle("p_{T trigger}");
1270 outputContainer->Add(fhXEChargedMC[i]) ;
1274 outputContainer->Add(fhXEPosCharged) ;
1275 outputContainer->Add(fhXENegCharged) ;
1276 outputContainer->Add(fhXEUeCharged) ;
1277 outputContainer->Add(fhPtHbpXECharged) ;
1278 outputContainer->Add(fhPtHbpXEUeCharged) ;
1280 outputContainer->Add(fhZTCharged) ;
1281 outputContainer->Add(fhZTPosCharged) ;
1282 outputContainer->Add(fhZTNegCharged) ;
1283 outputContainer->Add(fhZTUeCharged) ;
1284 outputContainer->Add(fhPtHbpZTCharged) ;
1285 outputContainer->Add(fhPtHbpZTUeCharged) ;
1287 outputContainer->Add(fhPtTrigPout) ;
1288 outputContainer->Add(fhPtTrigCharged) ;
1291 if(fFillPileUpHistograms)
1293 for(Int_t i = 0 ; i < 7 ; i++)
1295 fhPtLeadingPileUp[i] = new TH1F(Form("hPtLeadingPileUp%s",pileUpName[i].Data()),
1296 Form("p_{T} distribution of leading particles, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
1297 fhPtLeadingPileUp[i]->SetXTitle("p_{T}^{trig} (GeV/c)");
1298 outputContainer->Add(fhPtLeadingPileUp[i]);
1300 fhDeltaPhiChargedPileUp[i] = new TH2F(Form("hDeltaPhiChargedPileUp%s",pileUpName[i].Data()),
1301 Form("#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1302 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1303 fhDeltaPhiChargedPileUp[i]->SetYTitle("#Delta #phi");
1304 fhDeltaPhiChargedPileUp[i]->SetXTitle("p_{T trigger} (GeV/c)");
1305 outputContainer->Add(fhDeltaPhiChargedPileUp[i]) ;
1307 fhDeltaPhiChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaPhiChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1308 Form("#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}, p_{TA}>3 GeV/c, %s Pile-Up event",pileUpName[i].Data()),
1309 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1310 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #phi");
1311 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetXTitle("p_{T trigger} (GeV/c)");
1312 outputContainer->Add(fhDeltaPhiChargedPtA3GeVPileUp[i]) ;
1314 fhDeltaEtaChargedPileUp[i] = new TH2F(Form("hDeltaEtaChargedPileUp%s",pileUpName[i].Data()),
1315 Form("#eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1316 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1317 fhDeltaEtaChargedPileUp[i]->SetYTitle("#Delta #eta");
1318 fhDeltaEtaChargedPileUp[i]->SetXTitle("p_{T trigger} (GeV/c)");
1319 outputContainer->Add(fhDeltaEtaChargedPileUp[i]) ;
1321 fhDeltaEtaChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaEtaChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1322 Form("#eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger}, p_{TA}>3 GeV/c, %s Pile-Up event",pileUpName[i].Data()),
1323 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1324 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #eta");
1325 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetXTitle("p_{T trigger} (GeV/c)");
1326 outputContainer->Add(fhDeltaEtaChargedPtA3GeVPileUp[i]) ;
1328 fhXEChargedPileUp[i] = new TH2F(Form("hXEChargedPileUp%s",pileUpName[i].Data()),
1329 Form("x_{E} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1330 nptbins,ptmin,ptmax,200,0.,2.);
1331 fhXEChargedPileUp[i]->SetYTitle("x_{E}");
1332 fhXEChargedPileUp[i]->SetXTitle("p_{T trigger}");
1333 outputContainer->Add(fhXEChargedPileUp[i]) ;
1335 fhXEUeChargedPileUp[i] = new TH2F(Form("hXEUeChargedPileUp%s",pileUpName[i].Data()),
1336 Form("x_{E} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1337 nptbins,ptmin,ptmax,200,0.,2.);
1338 fhXEUeChargedPileUp[i]->SetYTitle("x_{E}");
1339 fhXEUeChargedPileUp[i]->SetXTitle("p_{T trigger}");
1340 outputContainer->Add(fhXEUeChargedPileUp[i]) ;
1342 fhZTChargedPileUp[i] = new TH2F(Form("hZTChargedPileUp%s",pileUpName[i].Data()),
1343 Form("z_{T} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1344 nptbins,ptmin,ptmax,200,0.,2.);
1345 fhZTChargedPileUp[i]->SetYTitle("z_{T}");
1346 fhZTChargedPileUp[i]->SetXTitle("p_{T trigger}");
1347 outputContainer->Add(fhZTChargedPileUp[i]) ;
1349 fhZTUeChargedPileUp[i] = new TH2F(Form("hZTUeChargedPileUp%s",pileUpName[i].Data()),
1350 Form("z_{T} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1351 nptbins,ptmin,ptmax,200,0.,2.);
1352 fhZTUeChargedPileUp[i]->SetYTitle("z_{T}");
1353 fhZTUeChargedPileUp[i]->SetXTitle("p_{T trigger}");
1354 outputContainer->Add(fhZTUeChargedPileUp[i]) ;
1356 fhPtTrigChargedPileUp[i] = new TH2F(Form("hPtTrigChargedPileUp%s",pileUpName[i].Data()),
1357 Form("trigger and charged tracks pt distribution, %s Pile-Up event",pileUpName[i].Data()),
1358 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1359 fhPtTrigChargedPileUp[i]->SetYTitle("p_{T h^{#pm}} (GeV/c)");
1360 fhPtTrigChargedPileUp[i]->SetXTitle("p_{T trigger} (GeV/c)");
1361 outputContainer->Add(fhPtTrigChargedPileUp[i]) ;
1367 Int_t nMultiBins = GetMultiBin();
1368 fhTrigDeltaPhiCharged = new TH2F*[nMultiBins] ;
1369 fhTrigDeltaEtaCharged = new TH2F*[nMultiBins] ;
1370 fhTrigXECorr = new TH2F*[nMultiBins] ;
1371 fhTrigXEUeCorr = new TH2F*[nMultiBins] ;
1372 fhTrigZTCorr = new TH2F*[nMultiBins] ;
1373 fhTrigZTUeCorr = new TH2F*[nMultiBins] ;
1375 for(Int_t im=0; im<nMultiBins; im++)
1377 fhTrigDeltaPhiCharged[im] = new TH2F
1378 (Form("hTrigDeltaPhiCharged_%d",im),Form("hTrigDeltaPhiCharged_%d",im), nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1379 fhTrigDeltaPhiCharged[im]->SetXTitle("p_{T trigger} (GeV/c)");
1380 fhTrigDeltaPhiCharged[im]->SetYTitle("#Delta #phi");
1382 fhTrigDeltaEtaCharged[im] = new TH2F
1383 (Form("hTrigDeltaEtaCharged_%d",im),Form("hTrigDeltaEtaCharged_%d",im), nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
1384 fhTrigDeltaEtaCharged[im]->SetXTitle("p_{T trigger} (GeV/c)");
1385 fhTrigDeltaEtaCharged[im]->SetYTitle("#Delta #eta");
1387 fhTrigXECorr[im] = new TH2F
1388 (Form("hTrigXEPtCorr_%d",im),Form("hTrigXEPtCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
1389 fhTrigXECorr[im]->SetYTitle("x_{E trigger h^{#pm}}");
1390 fhTrigXECorr[im]->SetXTitle("p_{T trigger}");
1392 fhTrigXEUeCorr[im] = new TH2F
1393 (Form("hTrigXEPtUeCorr_%d",im),Form("hTrigXEPtUeCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
1394 fhTrigXEUeCorr[im]->SetYTitle("x_{E trigger h^{#pm}}");
1395 fhTrigXEUeCorr[im]->SetXTitle("p_{T trigger}");
1397 fhTrigZTCorr[im] = new TH2F
1398 (Form("hTrigZTPtCorr_%d",im),Form("hTrigZTPtCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
1399 fhTrigZTCorr[im]->SetYTitle("z_{trigger h^{#pm}}");
1400 fhTrigZTCorr[im]->SetXTitle("p_{T trigger}");
1402 fhTrigZTUeCorr[im] = new TH2F
1403 (Form("hTrigZTPtUeCorr_%d",im),Form("hTrigZTPtUeCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
1404 fhTrigZTUeCorr[im]->SetYTitle("z_{trigger h^{#pm}}");
1405 fhTrigZTUeCorr[im]->SetXTitle("p_{T trigger}");
1407 outputContainer->Add(fhTrigDeltaPhiCharged[im]) ;
1408 outputContainer->Add(fhTrigDeltaEtaCharged[im]) ;
1409 outputContainer->Add(fhTrigXECorr[im]);
1410 outputContainer->Add(fhTrigXEUeCorr[im]);
1411 outputContainer->Add(fhTrigZTCorr[im]);
1412 outputContainer->Add(fhTrigZTUeCorr[im]);
1418 fhAssocPtBkg = new TH2F("hAssocPtBkg", " Trigger p_{T} vs associated hadron p_{T} from background",
1419 nptbins, ptmin, ptmax,nptbins,ptmin,ptmax);
1420 fhAssocPtBkg->SetXTitle("p_{T trigger}");
1421 fhAssocPtBkg->SetYTitle("p_{T associated}");
1422 outputContainer->Add(fhAssocPtBkg) ;
1424 fhDeltaPhiBrad = new TH2F("hDeltaPhiBrad","atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs p_{T trigger} ",
1425 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
1426 fhDeltaPhiBrad->SetXTitle("p_{T trigger}");
1427 fhDeltaPhiBrad->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
1428 outputContainer->Add(fhDeltaPhiBrad) ;
1431 fhDeltaPhiDeltaEtaAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1432 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1433 fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
1434 fhDeltaPhiAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
1435 fhXEAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1436 fhZTAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1439 fhDeltaPhiBradAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1441 if(fPi0Trigger || fDecayTrigger)
1443 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1444 fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
1445 fhXEAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1446 fhZTAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1447 fhXEDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1448 fhZTDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1449 fhDeltaPhiDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1452 if(fHMPIDCorrelation)
1454 fhDeltaPhiAssocPtBinHMPID = new TH2F*[fNAssocPtBins*nz];
1455 fhDeltaPhiAssocPtBinHMPIDAcc= new TH2F*[fNAssocPtBins*nz];
1458 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
1460 for(Int_t z = 0 ; z < nz ; z++)
1467 tz = ", v_{z} bin "+z;
1470 //printf("iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
1472 fhDeltaPhiDeltaEtaAssocPtBin[bin] = new TH2F(Form("hDeltaPhiDeltaEtaPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1473 Form("#Delta #phi vs #Delta #eta for associated p_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1474 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1475 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetXTitle("#Delta #phi");
1476 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetYTitle("#Delta #eta");
1478 fhDeltaPhiAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1479 Form("#Delta #phi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1480 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1481 fhDeltaPhiAssocPtBin[bin]->SetXTitle("p_{T trigger}");
1482 fhDeltaPhiAssocPtBin[bin]->SetYTitle("#Delta #phi");
1484 fhDeltaPhiAssocPtBinDEta08[bin] = new TH2F(Form("hDeltaPhiDeltaEta0.8PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1485 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()),
1486 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1487 fhDeltaPhiAssocPtBinDEta08[bin]->SetXTitle("p_{T trigger}");
1488 fhDeltaPhiAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi");
1490 fhDeltaPhiAssocPtBinDEta0[bin] = new TH2F(Form("hDeltaPhiDeltaEta0PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1491 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()),
1492 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1493 fhDeltaPhiAssocPtBinDEta0[bin]->SetXTitle("p_{T trigger}");
1494 fhDeltaPhiAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi");
1496 fhXEAssocPtBin[bin] = new TH2F(Form("hXEAssocPtBin%1.f_%1.f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1497 Form("x_{E} vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1498 nptbins, ptmin, ptmax,200, 0.0, 2.0);
1499 fhXEAssocPtBin[bin]->SetXTitle("p_{T trigger}");
1500 fhXEAssocPtBin[bin]->SetYTitle("x_{E}");
1502 fhZTAssocPtBin[bin] = new TH2F(Form("hZTAssocPtBin%1.f_%1.f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1503 Form("z_{T} vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1504 nptbins, ptmin, ptmax,200, 0.0, 2.0);
1505 fhZTAssocPtBin[bin]->SetXTitle("p_{T trigger}");
1506 fhZTAssocPtBin[bin]->SetYTitle("z_{T}");
1508 outputContainer->Add(fhDeltaPhiDeltaEtaAssocPtBin[bin]) ;
1509 outputContainer->Add(fhDeltaPhiAssocPtBin[bin]) ;
1510 outputContainer->Add(fhDeltaPhiAssocPtBinDEta08[bin]) ;
1511 outputContainer->Add(fhDeltaPhiAssocPtBinDEta0[bin]) ;
1512 outputContainer->Add(fhXEAssocPtBin[bin]);
1513 outputContainer->Add(fhZTAssocPtBin[bin]);
1515 if(fPi0Trigger || fDecayTrigger)
1517 fhDeltaPhiDecayChargedAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtDecayChargedAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1518 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()),
1519 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1520 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetXTitle("p_{T trigger}");
1521 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetYTitle("#Delta #phi");
1523 fhXEDecayChargedAssocPtBin[bin] = new TH2F(Form("hXEDecayChargedAssocPtBin%1.f_%1.f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1524 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()),
1525 nptbins, ptmin, ptmax,200, 0.0, 2.0);
1526 fhXEDecayChargedAssocPtBin[bin]->SetXTitle("p_{T trigger}");
1527 fhXEDecayChargedAssocPtBin[bin]->SetYTitle("x_{E}");
1529 fhZTDecayChargedAssocPtBin[bin] = new TH2F(Form("hZTDecayChargedAssocPtBin%1.f_%1.f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1530 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()),
1531 nptbins, ptmin, ptmax,200, 0.0, 2.0);
1532 fhZTDecayChargedAssocPtBin[bin]->SetXTitle("p_{T trigger}");
1533 fhZTDecayChargedAssocPtBin[bin]->SetYTitle("z_{T}");
1535 outputContainer->Add(fhDeltaPhiDecayChargedAssocPtBin[bin]) ;
1536 outputContainer->Add(fhXEDecayChargedAssocPtBin[bin]);
1537 outputContainer->Add(fhZTDecayChargedAssocPtBin[bin]);
1543 fhDeltaPhiBradAssocPtBin[bin] = new TH2F(Form("hDeltaPhiBradPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1544 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()),
1545 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
1546 fhDeltaPhiBradAssocPtBin[bin]->SetXTitle("p_{T trigger}");
1547 fhDeltaPhiBradAssocPtBin[bin]->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
1548 outputContainer->Add(fhDeltaPhiBradAssocPtBin[bin]) ;
1551 if(fHMPIDCorrelation)
1553 fhDeltaPhiAssocPtBinHMPID[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPID", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1554 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()),
1555 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1556 fhDeltaPhiAssocPtBinHMPID[bin]->SetXTitle("p_{T trigger}");
1557 fhDeltaPhiAssocPtBinHMPID[bin]->SetYTitle("#Delta #phi");
1559 fhDeltaPhiAssocPtBinHMPIDAcc[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPIDAcc", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1560 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()),
1561 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1562 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetXTitle("p_{T trigger}");
1563 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetYTitle("#Delta #phi");
1565 outputContainer->Add(fhDeltaPhiAssocPtBinHMPID[bin]) ;
1566 outputContainer->Add(fhDeltaPhiAssocPtBinHMPIDAcc[bin]) ;
1572 if(fPi0Trigger || fDecayTrigger)
1576 fhPtPi0DecayRatio = new TH2F
1577 ("hPtPi0DecayRatio","p_{T} of #pi^{0} and the ratio of pt for two decay",
1578 nptbins,ptmin,ptmax, 100,0.,2.);
1579 fhPtPi0DecayRatio->SetXTitle("p_{T}^{#pi^{0}} (GeV/c)");
1580 fhPtPi0DecayRatio->SetYTitle("p_{T}^{Decay}/p_{T}^{#pi^{0}}");
1581 outputContainer->Add(fhPtPi0DecayRatio) ;
1584 fhDeltaPhiDecayCharged = new TH2F
1585 ("hDeltaPhiDecayCharged","#phi_{Decay} - #phi_{h^{#pm}} vs p_{T Decay}",
1586 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1587 fhDeltaPhiDecayCharged->SetYTitle("#Delta #phi");
1588 fhDeltaPhiDecayCharged->SetXTitle("p_{T Decay} (GeV/c)");
1591 new TH2F("hXEDecayCharged","x_{E} Decay",
1592 nptbins,ptmin,ptmax,200,0.,2.);
1593 fhXEDecayCharged->SetYTitle("x_{E}");
1594 fhXEDecayCharged->SetXTitle("p_{T decay}");
1597 new TH2F("hZTDecayCharged","z_{trigger h^{#pm}} = p_{T h^{#pm}} / p_{T Decay}",
1598 nptbins,ptmin,ptmax,200,0.,2.);
1599 fhZTDecayCharged->SetYTitle("z_{decay h^{#pm}}");
1600 fhZTDecayCharged->SetXTitle("p_{T decay}");
1602 outputContainer->Add(fhDeltaPhiDecayCharged) ;
1603 outputContainer->Add(fhXEDecayCharged) ;
1604 outputContainer->Add(fhZTDecayCharged) ;
1609 fhDeltaPhiUeLeftCharged = new TH2F
1610 ("hDeltaPhiUeLeftChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE left side range of trigger particles",
1611 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1612 fhDeltaPhiUeLeftCharged->SetYTitle("#Delta #phi");
1613 fhDeltaPhiUeLeftCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1614 outputContainer->Add(fhDeltaPhiUeLeftCharged) ;
1616 fhDeltaPhiUeRightCharged = new TH2F
1617 ("hDeltaPhiUeRightChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE right side range of trigger particles",
1618 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1619 fhDeltaPhiUeRightCharged->SetYTitle("#Delta #phi");
1620 fhDeltaPhiUeRightCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1621 outputContainer->Add(fhDeltaPhiUeRightCharged) ;
1623 fhDeltaPhiUeLeftUpCharged = new TH2F
1624 ("hDeltaPhiUeLeftUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE left Up side range of trigger particles",
1625 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1626 fhDeltaPhiUeLeftUpCharged->SetYTitle("#Delta #phi");
1627 fhDeltaPhiUeLeftUpCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1628 outputContainer->Add(fhDeltaPhiUeLeftUpCharged) ;
1630 fhDeltaPhiUeRightUpCharged = new TH2F
1631 ("hDeltaPhiUeRightUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE right Up side range of trigger particles",
1632 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1633 fhDeltaPhiUeRightUpCharged->SetYTitle("#Delta #phi");
1634 fhDeltaPhiUeRightUpCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1635 outputContainer->Add(fhDeltaPhiUeRightUpCharged) ;
1637 fhDeltaPhiUeLeftDownCharged = new TH2F
1638 ("hDeltaPhiUeLeftDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE left Down side range of trigger particles",
1639 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1640 fhDeltaPhiUeLeftDownCharged->SetYTitle("#Delta #phi");
1641 fhDeltaPhiUeLeftDownCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1642 outputContainer->Add(fhDeltaPhiUeLeftDownCharged) ;
1644 fhDeltaPhiUeRightDownCharged = new TH2F
1645 ("hDeltaPhiUeRightDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE right Down side range of trigger particles",
1646 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1647 fhDeltaPhiUeRightDownCharged->SetYTitle("#Delta #phi");
1648 fhDeltaPhiUeRightDownCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1649 outputContainer->Add(fhDeltaPhiUeRightDownCharged) ;
1652 new TH2F("hXEUeChargedLeft","x_{E} with UE left side of trigger",
1653 nptbins,ptmin,ptmax,200,0.,2.);
1654 fhXEUeLeftCharged->SetYTitle("x_{E Ueh^{#pm}}");
1655 fhXEUeLeftCharged->SetXTitle("p_{T trigger}");
1656 outputContainer->Add(fhXEUeLeftCharged) ;
1658 fhXEUeRightCharged =
1659 new TH2F("hXEUeChargedRight","x_{E h^{#pm}} with UE right side of trigger",
1660 nptbins,ptmin,ptmax,200,0.,2.);
1661 fhXEUeRightCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
1662 fhXEUeRightCharged->SetXTitle("p_{T trigger}");
1663 outputContainer->Add(fhXEUeRightCharged) ;
1665 fhXEUeLeftUpCharged =
1666 new TH2F("hXEUeChargedLeftUp","x_{E} with UE left Up side of trigger",
1667 nptbins,ptmin,ptmax,200,0.,2.);
1668 fhXEUeLeftUpCharged->SetYTitle("x_{E Ueh^{#pm}}");
1669 fhXEUeLeftUpCharged->SetXTitle("p_{T trigger}");
1670 outputContainer->Add(fhXEUeLeftUpCharged) ;
1672 fhXEUeRightUpCharged =
1673 new TH2F("hXEUeChargedRightUp","x_{E h^{#pm}} with UE right Up side of trigger",
1674 nptbins,ptmin,ptmax,200,0.,2.);
1675 fhXEUeRightUpCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
1676 fhXEUeRightUpCharged->SetXTitle("p_{T trigger}");
1677 outputContainer->Add(fhXEUeRightUpCharged) ;
1679 fhXEUeLeftDownCharged =
1680 new TH2F("hXEUeChargedLeftDown","x_{E} with UE left Down side of trigger",
1681 nptbins,ptmin,ptmax,200,0.,2.);
1682 fhXEUeLeftDownCharged->SetYTitle("x_{E Ueh^{#pm}}");
1683 fhXEUeLeftDownCharged->SetXTitle("p_{T trigger}");
1684 outputContainer->Add(fhXEUeLeftDownCharged) ;
1686 fhXEUeRightDownCharged =
1687 new TH2F("hXEUeChargedRightDown","x_{E h^{#pm}} with UE right Down side of trigger",
1688 nptbins,ptmin,ptmax,200,0.,2.);
1689 fhXEUeRightDownCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
1690 fhXEUeRightDownCharged->SetXTitle("p_{T trigger}");
1691 outputContainer->Add(fhXEUeRightDownCharged) ;
1693 fhPtHbpXEUeLeftCharged =
1694 new TH2F("hHbpXEUeChargedLeft","#xi = ln(1/x_{E}) with charged UE left side of trigger",
1695 nptbins,ptmin,ptmax,200,0.,10.);
1696 fhPtHbpXEUeLeftCharged->SetYTitle("ln(1/x_{E})");
1697 fhPtHbpXEUeLeftCharged->SetXTitle("p_{T trigger}");
1698 outputContainer->Add(fhPtHbpXEUeLeftCharged) ;
1700 fhPtHbpXEUeRightCharged =
1701 new TH2F("hHbpXEUeChargedRight","#xi = ln(1/x_{E}) with charged UE right side of trigger",
1702 nptbins,ptmin,ptmax,200,0.,10.);
1703 fhPtHbpXEUeRightCharged->SetYTitle("ln(1/x_{E})");
1704 fhPtHbpXEUeRightCharged->SetXTitle("p_{T trigger}");
1705 outputContainer->Add(fhPtHbpXEUeRightCharged) ;
1708 new TH2F("hZTUeChargedLeft","z_{trigger h^{#pm}} = p_{T Ueh^{#pm}} / p_{T trigger} with UE left side of trigger",
1709 nptbins,ptmin,ptmax,200,0.,2.);
1710 fhZTUeLeftCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
1711 fhZTUeLeftCharged->SetXTitle("p_{T trigger}");
1712 outputContainer->Add(fhZTUeLeftCharged) ;
1714 fhZTUeRightCharged =
1715 new TH2F("hZTUeChargedRight","z_{trigger h^{#pm}} = p_{T Ueh^{#pm}} / p_{T trigger} with UE right side of trigger",
1716 nptbins,ptmin,ptmax,200,0.,2.);
1717 fhZTUeRightCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
1718 fhZTUeRightCharged->SetXTitle("p_{T trigger}");
1719 outputContainer->Add(fhZTUeRightCharged) ;
1721 fhPtHbpZTUeLeftCharged =
1722 new TH2F("hHbpZTUeChargedLeft","#xi = ln(1/z_{T}) with charged UE left side of trigger",
1723 nptbins,ptmin,ptmax,200,0.,10.);
1724 fhPtHbpZTUeLeftCharged->SetYTitle("ln(1/z_{T})");
1725 fhPtHbpZTUeLeftCharged->SetXTitle("p_{T trigger}");
1726 outputContainer->Add(fhPtHbpZTUeLeftCharged) ;
1728 fhPtHbpZTUeRightCharged =
1729 new TH2F("hHbpZTUeChargedRight","#xi = ln(1/z_{T}) with charged UE right side of trigger",
1730 nptbins,ptmin,ptmax,200,0.,10.);
1731 fhPtHbpZTUeRightCharged->SetYTitle("ln(1/z_{T})");
1732 fhPtHbpZTUeRightCharged->SetXTitle("p_{T trigger}");
1733 outputContainer->Add(fhPtHbpZTUeRightCharged) ;
1736 } //Correlation with charged hadrons
1738 //Correlation with neutral hadrons
1741 fhDeltaPhiDeltaEtaNeutral = new TH2F
1742 ("hDeltaPhiDeltaEtaNeutral","#phi_{trigger} - #phi_{h^{0}} vs #eta_{trigger} - #eta_{h^{0}}",
1743 ndeltaphibins ,deltaphimin,deltaphimax, ndeltaetabins ,deltaetamin,deltaetamax);
1744 fhDeltaPhiDeltaEtaNeutral->SetXTitle("#Delta #phi");
1745 fhDeltaPhiDeltaEtaNeutral->SetYTitle("#Delta #eta");
1747 fhPhiNeutral = new TH2F
1748 ("hPhiNeutral","#phi_{#pi^{0}} vs p_{T #pi^{0}}",
1749 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1750 fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)");
1751 fhPhiNeutral->SetXTitle("p_{T #pi^{0}} (GeV/c)");
1753 fhEtaNeutral = new TH2F
1754 ("hEtaNeutral","#eta_{#pi^{0}} vs p_{T #pi^{0}}",
1755 nptbins,ptmin,ptmax,netabins,etamin,etamax);
1756 fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)");
1757 fhEtaNeutral->SetXTitle("p_{T #pi^{0}} (GeV/c)");
1759 fhDeltaPhiNeutral = new TH2F
1760 ("hDeltaPhiNeutral","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T trigger}",
1761 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1762 fhDeltaPhiNeutral->SetYTitle("#Delta #phi");
1763 fhDeltaPhiNeutral->SetXTitle("p_{T trigger} (GeV/c)");
1765 fhDeltaPhiNeutralPt = new TH2F
1766 ("hDeltaPhiNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T #pi^{0}}}",
1767 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1768 fhDeltaPhiNeutralPt->SetYTitle("#Delta #phi");
1769 fhDeltaPhiNeutralPt->SetXTitle("p_{T h^{0}} (GeV/c)");
1771 fhDeltaPhiUeNeutralPt = new TH2F
1772 ("hDeltaPhiUeNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T #pi^{0}}}",
1773 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1774 fhDeltaPhiUeNeutralPt->SetYTitle("#Delta #phi");
1775 fhDeltaPhiUeNeutralPt->SetXTitle("p_{T h^{0}} (GeV/c)");
1777 fhDeltaEtaNeutral = new TH2F
1778 ("hDeltaEtaNeutral","#eta_{trigger} - #eta_{#pi^{0}} vs p_{T trigger}",
1779 nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
1780 fhDeltaEtaNeutral->SetYTitle("#Delta #eta");
1781 fhDeltaEtaNeutral->SetXTitle("p_{T trigger} (GeV/c)");
1784 new TH2F("hXENeutral","x_{E} for #pi^{0} associated",
1785 nptbins,ptmin,ptmax,200,0.,2.);
1786 fhXENeutral->SetYTitle("x_{E}");
1787 fhXENeutral->SetXTitle("p_{T trigger}");
1790 new TH2F("hXEUeNeutral","x_{E} for #pi^{0} associated",
1791 nptbins,ptmin,ptmax,200,0.,2.);
1792 fhXEUeNeutral->SetYTitle("x_{E}");
1793 fhXEUeNeutral->SetXTitle("p_{T trigger}");
1796 new TH2F("hHbpXENeutral","#xi = ln(1/x_{E})for #pi^{0} associated",
1797 nptbins,ptmin,ptmax,200,0.,10.);
1798 fhPtHbpXENeutral->SetYTitle("ln(1/x_{E})");
1799 fhPtHbpXENeutral->SetXTitle("p_{T trigger}");
1801 fhPtHbpXEUeNeutral =
1802 new TH2F("hHbpXEUeNeutral","#xi = ln(1/x_{E}) for #pi^{0} associated",
1803 nptbins,ptmin,ptmax,200,0.,10.);
1804 fhPtHbpXEUeNeutral->SetYTitle("ln(1/x_{E})");
1805 fhPtHbpXEUeNeutral->SetXTitle("p_{T trigger}");
1808 new TH2F("hZTNeutral","z_{trigger #pi} = p_{T #pi^{0}} / p_{T trigger} for #pi^{0} associated",
1809 nptbins,ptmin,ptmax,200,0.,2.);
1810 fhZTNeutral->SetYTitle("z_{trigger #pi^{0}}");
1811 fhZTNeutral->SetXTitle("p_{T trigger}");
1814 new TH2F("hZTUeNeutral","z_{trigger #pi} = p_{T #pi^{0}} / p_{T trigger} for #pi^{0} associated",
1815 nptbins,ptmin,ptmax,200,0.,2.);
1816 fhZTUeNeutral->SetYTitle("z_{trigger #pi^{0}}");
1817 fhZTUeNeutral->SetXTitle("p_{T trigger}");
1820 new TH2F("hHbpZTNeutral","#xi = ln(1/x_{E}) for #pi^{0} associated",
1821 nptbins,ptmin,ptmax,200,0.,10.);
1822 fhPtHbpZTNeutral->SetYTitle("ln(1/z_{T})");
1823 fhPtHbpZTNeutral->SetXTitle("p_{T trigger}");
1825 fhPtHbpZTUeNeutral =
1826 new TH2F("hHbpZTUeNeutral","#xi = ln(1/x_{E}) for #pi^{0} associated",
1827 nptbins,ptmin,ptmax,200,0.,10.);
1828 fhPtHbpXEUeNeutral->SetYTitle("ln(1/z_{T})");
1829 fhPtHbpXEUeNeutral->SetXTitle("p_{T trigger}");
1831 outputContainer->Add(fhDeltaPhiDeltaEtaNeutral);
1832 outputContainer->Add(fhPhiNeutral) ;
1833 outputContainer->Add(fhEtaNeutral) ;
1834 outputContainer->Add(fhDeltaPhiNeutral) ;
1835 outputContainer->Add(fhDeltaPhiNeutralPt) ;
1836 outputContainer->Add(fhDeltaPhiUeNeutralPt) ;
1837 outputContainer->Add(fhDeltaEtaNeutral) ;
1838 outputContainer->Add(fhXENeutral) ;
1839 outputContainer->Add(fhXEUeNeutral) ;
1840 outputContainer->Add(fhPtHbpXENeutral) ;
1841 outputContainer->Add(fhPtHbpXEUeNeutral) ;
1842 outputContainer->Add(fhZTNeutral) ;
1843 outputContainer->Add(fhZTUeNeutral) ;
1844 outputContainer->Add(fhPtHbpZTNeutral) ;
1845 outputContainer->Add(fhPtHbpZTUeNeutral) ;
1847 if(fPi0Trigger || fDecayTrigger)
1849 fhDeltaPhiDecayNeutral = new TH2F
1850 ("hDeltaPhiDecayNeutral","#phi_{Decay} - #phi_{h^{0}} vs p_{T Decay}",
1851 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1852 fhDeltaPhiDecayNeutral->SetYTitle("#Delta #phi");
1853 fhDeltaPhiDecayNeutral->SetXTitle("p_{T Decay} (GeV/c)");
1856 new TH2F("hXEDecayNeutral","x_{E} for decay trigger",
1857 nptbins,ptmin,ptmax,200,0.,2.);
1858 fhXEDecayNeutral->SetYTitle("x_{E}");
1859 fhXEDecayNeutral->SetXTitle("p_{T decay}");
1862 new TH2F("hZTDecayNeutral","z_{trigger h^{0}} = p_{T h^{0}} / p_{T Decay}",
1863 nptbins,ptmin,ptmax,200,0.,2.);
1864 fhZTDecayNeutral->SetYTitle("z_{h^{0}}");
1865 fhZTDecayNeutral->SetXTitle("p_{T decay}");
1867 outputContainer->Add(fhDeltaPhiDecayNeutral) ;
1868 outputContainer->Add(fhXEDecayNeutral) ;
1869 outputContainer->Add(fhZTDecayNeutral) ;
1875 fhDeltaPhiUeLeftNeutral = new TH2F
1876 ("hDeltaPhiUeLeftNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs p_{T h^{0}} with neutral UE left side range of trigger particles",
1877 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1878 fhDeltaPhiUeLeftNeutral->SetYTitle("#Delta #phi");
1879 fhDeltaPhiUeLeftNeutral->SetXTitle("p_{T h^{0}} (GeV/c)");
1880 outputContainer->Add(fhDeltaPhiUeLeftNeutral) ;
1882 fhDeltaPhiUeRightNeutral = new TH2F
1883 ("hDeltaPhiUeRightNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs p_{T Ueh^{0}} with neutral UE right side range of trigger particles",
1884 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1885 fhDeltaPhiUeRightNeutral->SetYTitle("#Delta #phi");
1886 fhDeltaPhiUeRightNeutral->SetXTitle("p_{T h^{0}} (GeV/c)");
1887 outputContainer->Add(fhDeltaPhiUeRightNeutral) ;
1890 new TH2F("hXEUeNeutralLeft","x_{E} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE left side of trigger",
1891 nptbins,ptmin,ptmax,140,0.,2.);
1892 fhXEUeLeftNeutral->SetYTitle("z_{trigger Ueh^{0}}");
1893 fhXEUeLeftNeutral->SetXTitle("p_{T trigger}");
1894 outputContainer->Add(fhXEUeLeftNeutral) ;
1896 fhXEUeRightNeutral =
1897 new TH2F("hXEUeNeutralRight","x_{E} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE right side of trigger",
1898 nptbins,ptmin,ptmax,200,0.,2.);
1899 fhXEUeRightNeutral->SetYTitle("z_{trigger Ueh^{0}}");
1900 fhXEUeRightNeutral->SetXTitle("p_{T trigger}");
1901 outputContainer->Add(fhXEUeRightNeutral) ;
1903 fhPtHbpXEUeLeftNeutral =
1904 new TH2F("hHbpXEUeNeutralLeft","#xi = ln(1/x_{E}) with neutral UE left side of trigger",
1905 nptbins,ptmin,ptmax,200,0.,10.);
1906 fhPtHbpXEUeLeftNeutral->SetYTitle("ln(1/x_{E})");
1907 fhPtHbpXEUeLeftNeutral->SetXTitle("p_{T trigger}");
1908 outputContainer->Add(fhPtHbpXEUeLeftNeutral) ;
1910 fhPtHbpXEUeRightNeutral =
1911 new TH2F("hHbpXEUeNeutralRight","#xi = ln(1/x_{E}) with neutral UE right side of trigger",
1912 nptbins,ptmin,ptmax,200,0.,10.);
1913 fhPtHbpXEUeRightNeutral->SetYTitle("ln(1/x_{E})");
1914 fhPtHbpXEUeRightNeutral->SetXTitle("p_{T trigger}");
1915 outputContainer->Add(fhPtHbpXEUeRightNeutral) ;
1918 new TH2F("hZTUeNeutralLeft","z_{trigger h^{0}} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE left side of trigger",
1919 nptbins,ptmin,ptmax,140,0.,2.);
1920 fhZTUeLeftNeutral->SetYTitle("z_{trigger Ueh^{0}}");
1921 fhZTUeLeftNeutral->SetXTitle("p_{T trigger}");
1922 outputContainer->Add(fhZTUeLeftNeutral) ;
1924 fhZTUeRightNeutral =
1925 new TH2F("hZTUeNeutralRight","z_{trigger h^{0}} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE right side of trigger",
1926 nptbins,ptmin,ptmax,200,0.,2.);
1927 fhZTUeRightNeutral->SetYTitle("z_{trigger Ueh^{0}}");
1928 fhZTUeRightNeutral->SetXTitle("p_{T trigger}");
1929 outputContainer->Add(fhZTUeRightNeutral) ;
1931 fhPtHbpZTUeLeftNeutral =
1932 new TH2F("hHbpZTUeNeutralLeft","#xi = ln(1/z_{T}) with neutral UE left side of trigger",
1933 nptbins,ptmin,ptmax,200,0.,10.);
1934 fhPtHbpZTUeLeftNeutral->SetYTitle("ln(1/z_{T})");
1935 fhPtHbpZTUeLeftNeutral->SetXTitle("p_{T trigger}");
1936 outputContainer->Add(fhPtHbpZTUeLeftNeutral) ;
1938 fhPtHbpZTUeRightNeutral =
1939 new TH2F("hHbpZTUeNeutralRight","#xi = ln(1/z_{T}) with neutral UE right side of trigger",
1940 nptbins,ptmin,ptmax,200,0.,10.);
1941 fhPtHbpZTUeRightNeutral->SetYTitle("ln(1/z_{T})");
1942 fhPtHbpZTUeRightNeutral->SetXTitle("p_{T trigger}");
1943 outputContainer->Add(fhPtHbpZTUeRightNeutral) ;
1947 }//Correlation with neutral hadrons
1949 //if data is MC, fill more histograms
1952 fh2phiLeadingParticle=new TH2F("h2phiLeadingParticle","#phi resolustion for trigger particles",nptbins,ptmin,ptmax,100,-1,1);
1953 fh2phiLeadingParticle->GetXaxis()->SetTitle("p_{T gen Leading} (GeV/c)");
1954 fh2phiLeadingParticle->GetYaxis()->SetTitle("(#phi_{rec}-#phi_{gen})/#phi_{gen}");
1956 fhMCPtLeading = new TH1F ("hMCPtLeading","MC : p_{T} distribution of leading particles", nptbins,ptmin,ptmax);
1957 fhMCPtLeading->SetXTitle("p_{T}^{trig} (GeV/c)");
1959 fhMCPhiLeading = new TH2F ("hMCPhiLeading","MC : #phi distribution of leading Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
1960 fhMCPhiLeading->SetYTitle("#phi (rad)");
1962 fhMCEtaLeading = new TH2F ("hMCEtaLeading","MC : #eta distribution of leading",nptbins,ptmin,ptmax, netabins,etamin,etamax);
1963 fhMCEtaLeading->SetYTitle("#eta ");
1966 fhMCEtaCharged = new TH2F
1967 ("hMCEtaCharged","MC #eta_{h^{#pm}} vs p_{T #pm}",
1968 nptbins,ptmin,ptmax,netabins,etamin,etamax);
1969 fhMCEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
1970 fhMCEtaCharged->SetXTitle("p_{T #pm} (GeV/c)");
1972 fhMCPhiCharged = new TH2F
1973 ("hMCPhiCharged","#MC phi_{h^{#pm}} vs p_{T #pm}",
1974 200,ptmin,ptmax,nphibins,phimin,phimax);
1975 fhMCPhiCharged->SetYTitle("MC #phi_{h^{#pm}} (rad)");
1976 fhMCPhiCharged->SetXTitle("p_{T #pm} (GeV/c)");
1978 fhMCDeltaPhiDeltaEtaCharged = new TH2F
1979 ("hMCDeltaPhiDeltaEtaCharged","#MC phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
1980 140,-2.,5.,200,-2,2);
1981 fhMCDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi");
1982 fhMCDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
1984 fhMCDeltaEtaCharged = new TH2F
1985 ("hMCDeltaEtaCharged","MC #eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger} and p_{T assoc}",
1986 nptbins,ptmin,ptmax,200,-2,2);
1987 fhMCDeltaEtaCharged->SetYTitle("#Delta #eta");
1988 fhMCDeltaEtaCharged->SetXTitle("p_{T trigger} (GeV/c)");
1990 fhMCDeltaPhiCharged = new TH2F
1991 ("hMCDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}",
1992 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
1993 fhMCDeltaPhiCharged->SetYTitle("#Delta #phi");
1994 fhMCDeltaPhiCharged->SetXTitle("p_{T trigger} (GeV/c)");
1996 fhMCDeltaPhiChargedPt = new TH2F
1997 ("hMCDeltaPhiChargedPt","MC #phi_{trigger} - #phi_{#h^{#pm}} vs p_{T h^{#pm}}",
1998 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
1999 fhMCDeltaPhiChargedPt->SetYTitle("#Delta #phi");
2000 fhMCDeltaPhiChargedPt->SetXTitle("p_{T h^{#pm}} (GeV/c)");
2003 new TH2F("hMCPtXECharged","x_{E}",
2004 nptbins,ptmin,ptmax,200,0.,2.);
2005 fhMCPtXECharged->SetYTitle("x_{E}");
2006 fhMCPtXECharged->SetXTitle("p_{T trigger}");
2009 new TH2F("hMCPtXEUeCharged","x_{E}",
2010 nptbins,ptmin,ptmax,200,0.,2.);
2011 fhMCPtXEUeCharged->SetYTitle("x_{E}");
2012 fhMCPtXEUeCharged->SetXTitle("p_{T trigger}");
2014 fhMCPtHbpXECharged =
2015 new TH2F("hMCHbpXECharged","MC #xi = ln(1/x_{E}) with charged hadrons",
2016 nptbins,ptmin,ptmax,200,0.,10.);
2017 fhMCPtHbpXECharged->SetYTitle("ln(1/x_{E})");
2018 fhMCPtHbpXECharged->SetXTitle("p_{T trigger}");
2020 fhMCPtHbpXEUeCharged =
2021 new TH2F("hMCPtHbpXEUeCharged","#xi = ln(1/x_{E}) with charged hadrons,Underlying Event",
2022 nptbins,ptmin,ptmax,200,0.,10.);
2023 fhMCPtHbpXEUeCharged->SetYTitle("ln(1/x_{E})");
2024 fhMCPtHbpXEUeCharged->SetXTitle("p_{T trigger}");
2027 new TH1F("hMCUePart","MC UE particles distribution vs pt trig",
2028 nptbins,ptmin,ptmax);
2029 fhMCUePart->SetYTitle("dNch");
2030 fhMCUePart->SetXTitle("p_{T trigger}");
2033 new TH2F("hMCPtZTCharged","z_{T}",
2034 nptbins,ptmin,ptmax,200,0.,2.);
2035 fhMCPtZTCharged->SetYTitle("z_{T}");
2036 fhMCPtZTCharged->SetXTitle("p_{T trigger}");
2038 fhMCPtHbpZTCharged =
2039 new TH2F("hMCHbpZTCharged","MC #xi = ln(1/z_{T}) with charged hadrons",
2040 nptbins,ptmin,ptmax,200,0.,10.);
2041 fhMCPtHbpZTCharged->SetYTitle("ln(1/z_{T})");
2042 fhMCPtHbpZTCharged->SetXTitle("p_{T trigger}");
2045 new TH2F("hMCPtTrigPout","AOD MC Pout with triggers",
2046 nptbins,ptmin,ptmax,2*nptbins,-ptmax,ptmax);
2047 fhMCPtTrigPout->SetYTitle("p_{out} (GeV/c)");
2048 fhMCPtTrigPout->SetXTitle("p_{T trigger} (GeV/c)");
2050 fhMCPtAssocDeltaPhi =
2051 new TH2F("hMCPtAssocDeltaPhi","AOD MC delta phi with associated charged hadrons",
2052 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2053 fhMCPtAssocDeltaPhi->SetYTitle("#Delta #phi");
2054 fhMCPtAssocDeltaPhi->SetXTitle("p_{T trigger} (GeV/c)");
2056 outputContainer->Add(fh2phiLeadingParticle);
2057 outputContainer->Add(fhMCPtLeading);
2058 outputContainer->Add(fhMCPhiLeading);
2059 outputContainer->Add(fhMCEtaLeading);
2060 outputContainer->Add(fhMCDeltaPhiDeltaEtaCharged);
2061 outputContainer->Add(fhMCPhiCharged) ;
2062 outputContainer->Add(fhMCEtaCharged) ;
2063 outputContainer->Add(fhMCDeltaEtaCharged) ;
2064 outputContainer->Add(fhMCDeltaPhiCharged) ;
2066 outputContainer->Add(fhMCDeltaPhiChargedPt) ;
2067 outputContainer->Add(fhMCPtXECharged) ;
2068 outputContainer->Add(fhMCPtXEUeCharged) ;
2069 outputContainer->Add(fhMCPtZTCharged) ;
2070 outputContainer->Add(fhMCPtHbpXECharged) ;
2071 outputContainer->Add(fhMCPtHbpXEUeCharged);
2072 outputContainer->Add(fhMCUePart);
2073 outputContainer->Add(fhMCPtHbpZTCharged) ;
2074 outputContainer->Add(fhMCPtTrigPout) ;
2075 outputContainer->Add(fhMCPtAssocDeltaPhi) ;
2076 } //for MC histogram
2080 //create event containers
2082 if(!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForTracksExists()))
2084 Int_t nvz = GetNZvertBin();
2085 Int_t nrp = GetNRPBin();
2086 Int_t nce = GetNCentrBin();
2088 fListMixTrackEvents= new TList*[nvz*nrp*nce] ;
2090 for( Int_t ice = 0 ; ice < nce ; ice++ )
2092 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2094 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2096 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2098 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2099 // ic,iz, irp, bin);
2101 fListMixTrackEvents[bin] = new TList() ;
2102 fListMixTrackEvents[bin]->SetOwner(kFALSE);
2108 fhPtLeadingMixed = new TH1F ("hPtLeadingMixed","p_{T} distribution of leading particles, used for mixing", nptbins,ptmin,ptmax);
2109 fhPtLeadingMixed->SetXTitle("p_{T}^{trig} (GeV/c)");
2113 fhPtLeadingMixedVzBin = new TH2F ("hPtLeadingMixedVzBin","p_{T} distribution of leading particles, used for mixing", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
2114 fhPtLeadingMixedVzBin->SetXTitle("p_{T}^{trig} (GeV/c)");
2115 fhPtLeadingMixedVzBin->SetYTitle("v_{z} bin");
2116 outputContainer->Add(fhPtLeadingMixedVzBin);
2119 fhPtLeadingMixedBin = new TH2F ("hPtLeadingMixedBin","p_{T} distribution of leading particles vs mixing bin", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
2120 fhPtLeadingMixedBin->SetXTitle("p_{T}^{trig} (GeV/c)");
2121 fhPtLeadingMixedBin->SetYTitle("Bin");
2123 fhPhiLeadingMixed = new TH2F ("hPhiLeadingMixed","#phi distribution of leading Particles, used for mixing",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2124 fhPhiLeadingMixed->SetYTitle("#phi (rad)");
2126 fhEtaLeadingMixed = new TH2F ("hEtaLeadingMixed","#eta distribution of leading, used for mixing",nptbins,ptmin,ptmax, netabins,etamin,etamax);
2127 fhEtaLeadingMixed->SetYTitle("#eta ");
2129 outputContainer->Add(fhPtLeadingMixed);
2130 outputContainer->Add(fhPtLeadingMixedBin);
2131 outputContainer->Add(fhPhiLeadingMixed);
2132 outputContainer->Add(fhEtaLeadingMixed);
2134 // Fill the cluster pool only in isolation analysis
2135 if( OnlyIsolated() && (!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForCaloExists())))
2137 Int_t nvz = GetNZvertBin();
2138 Int_t nrp = GetNRPBin();
2139 Int_t nce = GetNCentrBin();
2141 fListMixCaloEvents= new TList*[nvz*nrp*nce] ;
2143 for( Int_t ice = 0 ; ice < nce ; ice++ )
2145 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2147 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2149 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2151 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2152 // ic,iz, irp, bin);
2154 fListMixCaloEvents[bin] = new TList() ;
2155 fListMixCaloEvents[bin]->SetOwner(kFALSE);
2161 //Init the list in the reader if not done previously
2162 if(fUseMixStoredInReader)
2164 if( !GetReader()->ListWithMixedEventsForTracksExists() )
2165 GetReader()->SetListWithMixedEventsForTracks(fListMixTrackEvents);
2167 if( !GetReader()->ListWithMixedEventsForCaloExists() )
2168 GetReader()->SetListWithMixedEventsForCalo (fListMixCaloEvents );
2171 fhEventBin=new TH1I("hEventBin","Number of real events per bin(cen,vz,rp)",
2172 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2173 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2174 fhEventBin->SetXTitle("bin");
2175 outputContainer->Add(fhEventBin) ;
2177 fhEventMixBin=new TH1I("hEventMixBin","Number of events per bin(cen,vz,rp)",
2178 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2179 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2180 fhEventMixBin->SetXTitle("bin");
2181 outputContainer->Add(fhEventMixBin) ;
2183 fhNtracksAll=new TH1F("hNtracksAll","Number of tracks w/o event trigger",2000,0,2000);
2184 outputContainer->Add(fhNtracksAll);
2186 fhNtracksTrigger=new TH1F("hNtracksTriggerEvent","Number of tracks w/ event trigger",2000,0,2000);
2187 outputContainer->Add(fhNtracksTrigger);
2189 fhNtracksMB=new TH1F("hNtracksMBEvent","Number of tracks w/ event trigger kMB",2000,0,2000);
2190 outputContainer->Add(fhNtracksMB);
2192 fhMixDeltaPhiCharged = new TH2F
2193 ("hMixDeltaPhiCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}",
2194 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2195 fhMixDeltaPhiCharged->SetYTitle("#Delta #phi");
2196 fhMixDeltaPhiCharged->SetXTitle("p_{T trigger} (GeV/c)");
2197 outputContainer->Add(fhMixDeltaPhiCharged);
2199 fhMixDeltaPhiDeltaEtaCharged = new TH2F
2200 ("hMixDeltaPhiDeltaEtaCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
2201 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2202 fhMixDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi");
2203 fhMixDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
2204 outputContainer->Add(fhMixDeltaPhiDeltaEtaCharged);
2207 new TH2F("hMixXECharged","Mixed event : x_{E} for charged tracks",
2208 nptbins,ptmin,ptmax,200,0.,2.);
2209 fhMixXECharged->SetYTitle("x_{E}");
2210 fhMixXECharged->SetXTitle("p_{T trigger}");
2211 outputContainer->Add(fhMixXECharged);
2214 new TH2F("hMixHbpXECharged","mixed event : #xi = ln(1/x_{E}) with charged hadrons",
2215 nptbins,ptmin,ptmax,200,0.,10.);
2216 fhMixHbpXECharged->SetYTitle("ln(1/x_{E})");
2217 fhMixHbpXECharged->SetXTitle("p_{T trigger}");
2218 outputContainer->Add(fhMixHbpXECharged);
2220 fhMixDeltaPhiChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2221 fhMixDeltaPhiChargedAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
2222 fhMixDeltaPhiChargedAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
2223 fhMixDeltaPhiDeltaEtaChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2225 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2227 for(Int_t z = 0 ; z < nz ; z++)
2234 tz = ", v_{z} bin "+z;
2237 //printf("MIX : iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
2239 fhMixDeltaPhiChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2240 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()),
2241 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2242 fhMixDeltaPhiChargedAssocPtBin[bin]->SetXTitle("p_{T trigger}");
2243 fhMixDeltaPhiChargedAssocPtBin[bin]->SetYTitle("#Delta #phi");
2245 fhMixDeltaPhiChargedAssocPtBinDEta08[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0.8ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2246 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()),
2247 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2248 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetXTitle("p_{T trigger}");
2249 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi");
2251 fhMixDeltaPhiChargedAssocPtBinDEta0[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2252 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()),
2253 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2254 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetXTitle("p_{T trigger}");
2255 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi");
2257 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiDeltaEtaChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2258 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()),
2259 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2260 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetXTitle("#Delta #phi");
2261 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetYTitle("#Delta #eta");
2263 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBin[bin]);
2264 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta08[bin]);
2265 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta0[bin]);
2266 outputContainer->Add(fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]);
2271 return outputContainer;
2275 //_________________________________________________________________________________________________
2276 Bool_t AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum(const AliAODPWG4Particle* trigger,
2277 TLorentzVector & mom1,
2278 TLorentzVector & mom2)
2280 // Get the momentum of the pi0/eta assigned decay photons
2281 // In case of pi0/eta trigger, we may want to check their decay correlation,
2282 // get their decay children
2284 Int_t indexPhoton1 = trigger->GetCaloLabel(0);
2285 Int_t indexPhoton2 = trigger->GetCaloLabel(1);
2286 Float_t ptTrig = trigger->Pt();
2288 if(indexPhoton1!=-1 || indexPhoton2!=-1) return kFALSE;
2291 printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - indexPhoton1 = %d, indexPhoton2 = %d \n", indexPhoton1, indexPhoton2);
2293 TObjArray * clusters = 0x0 ;
2294 if(trigger->GetDetector()=="EMCAL") clusters = GetEMCALClusters() ;
2295 else clusters = GetPHOSClusters() ;
2297 for(Int_t iclus = 0; iclus < clusters->GetEntriesFast(); iclus++)
2299 AliVCluster * photon = (AliVCluster*) (clusters->At(iclus));
2300 if(photon->GetID()==indexPhoton1)
2302 photon->GetMomentum(mom1,GetVertex(0)) ;
2303 if(ptTrig) fhPtPi0DecayRatio->Fill(ptTrig, mom1.Pt()/ptTrig);
2305 if(photon->GetID()==indexPhoton2)
2307 photon->GetMomentum(mom1,GetVertex(0)) ;
2308 if(ptTrig > 0) fhPtPi0DecayRatio->Fill(ptTrig, mom2.Pt()/ptTrig);
2311 if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - Photon1 = %f, Photon2 = %f \n", mom1.Pt(), mom2.Pt());
2319 //_____________________________________________________________
2320 Int_t AliAnaParticleHadronCorrelation::GetMCTagHistogramIndex(const Int_t mcTag)
2322 // Index of MC histograms depending on MC origin
2324 if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPrompt) ||
2325 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCFragmentation)) return 0;
2326 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0)) return 1;
2327 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0Decay)) return 2;
2328 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEtaDecay)) return 3;
2329 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCOtherDecay)) return 4;
2330 else if(!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron)) return 5;
2335 //____________________________________________________
2336 void AliAnaParticleHadronCorrelation::InitParameters()
2339 //Initialize the parameters of the analysis.
2340 SetInputAODName("Particle");
2341 SetAODObjArrayName("Hadrons");
2342 AddToHistogramsName("AnaHadronCorr_");
2344 SetPtCutRange(0.,300);
2345 fDeltaPhiMinCut = 1.5 ;
2346 fDeltaPhiMaxCut = 4.5 ;
2347 fSelectIsolated = kFALSE;
2348 fMakeSeveralUE = kFALSE;
2349 fUeDeltaPhiMinCut = 1. ;
2350 fUeDeltaPhiMaxCut = 1.5 ;
2352 fNeutralCorr = kFALSE ;
2353 fPi0Trigger = kFALSE ;
2354 fDecayTrigger = kFALSE ;
2355 fHMPIDCorrelation = kFALSE ;
2357 fMakeAbsoluteLeading = kTRUE;
2358 fMakeNearSideLeading = kFALSE;
2361 fAssocPtBinLimit[0] = 0.2 ;
2362 fAssocPtBinLimit[1] = 0.5 ;
2363 fAssocPtBinLimit[2] = 1.0 ;
2364 fAssocPtBinLimit[3] = 2.0 ;
2365 fAssocPtBinLimit[4] = 3.0 ;
2366 fAssocPtBinLimit[5] = 4.0 ;
2367 fAssocPtBinLimit[6] = 5.0 ;
2368 fAssocPtBinLimit[7] = 6.0 ;
2369 fAssocPtBinLimit[8] = 7.0 ;
2370 fAssocPtBinLimit[9] = 8.0 ;
2371 fAssocPtBinLimit[10] = 9.0 ;
2372 fAssocPtBinLimit[11] = 10.0 ;
2373 fAssocPtBinLimit[12] = 12.0 ;
2374 fAssocPtBinLimit[13] = 14.0 ;
2375 fAssocPtBinLimit[14] = 16.0 ;
2376 fAssocPtBinLimit[15] = 20.0 ;
2377 fAssocPtBinLimit[16] = 30.0 ;
2378 fAssocPtBinLimit[17] = 40.0 ;
2379 fAssocPtBinLimit[18] = 50.0 ;
2380 fAssocPtBinLimit[19] = 200.0 ;
2383 fUseMixStoredInReader = kTRUE;
2390 //__________________________________________________________
2391 void AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD()
2393 //Particle-Hadron Correlation Analysis, fill AODs
2395 if(!GetInputAODBranch())
2397 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data());
2401 if(strcmp(GetInputAODBranch()->GetClass()->GetName(), "AliAODPWG4ParticleCorrelation"))
2403 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());
2409 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - Begin hadron correlation analysis, fill AODs \n");
2410 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In particle branch aod entries %d\n", GetInputAODBranch()->GetEntriesFast());
2411 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In CTS aod entries %d\n", GetCTSTracks() ->GetEntriesFast());
2412 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In EMCAL aod entries %d\n", GetEMCALClusters()->GetEntriesFast());
2413 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In PHOS aod entries %d\n", GetPHOSClusters() ->GetEntriesFast());
2416 //Get the vertex and check it is not too large in z
2417 Double_t v[3] = {0,0,0}; //vertex ;
2418 GetReader()->GetVertex(v);
2419 if(!GetMixedEvent() && TMath::Abs(v[2]) > GetZvertexCut()) return ;
2421 // Fill the pool with tracks if requested
2424 FillChargedEventMixPool();
2426 FillNeutralEventMixPool();
2429 //Loop on stored AOD particles, find leading trigger
2430 Double_t ptTrig = fMinTriggerPt ;
2431 fLeadingTriggerIndex = -1 ;
2432 Int_t naod = GetInputAODBranch()->GetEntriesFast() ;
2433 for(Int_t iaod = 0; iaod < naod ; iaod++)
2435 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
2437 // Vertex cut in case of mixing
2438 Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0));
2439 if(check == 0) continue;
2440 if(check == -1) return;
2442 // find the leading particles with highest momentum
2443 if (particle->Pt() > ptTrig)
2445 ptTrig = particle->Pt() ;
2446 fLeadingTriggerIndex = iaod ;
2448 }// finish search of leading trigger particle
2451 //Do correlation with leading particle
2452 if(fLeadingTriggerIndex >= 0)
2455 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(fLeadingTriggerIndex));
2457 //check if the particle is isolated or if we want to take the isolation into account
2458 if(OnlyIsolated() && !particle->IsIsolated()) return;
2460 //Make correlation with charged hadrons
2461 Bool_t okcharged = kTRUE;
2462 Bool_t okneutral = kTRUE;
2463 if(GetReader()->IsCTSSwitchedOn() )
2464 okcharged = MakeChargedCorrelation(particle, GetCTSTracks(),kFALSE);
2466 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); //For the future, foresee more possible pi0 lists
2467 if(fNeutralCorr && pi0list && pi0list->GetEntriesFast() > 0)
2468 okneutral = MakeNeutralCorrelation(particle, pi0list,kFALSE);
2470 }//Correlate leading
2472 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - End fill AODs \n");
2476 //_________________________________________________________________
2477 void AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms()
2479 //Particle-Hadron Correlation Analysis, fill histograms
2481 if(!GetInputAODBranch())
2483 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data());
2489 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Begin hadron correlation analysis, fill histograms \n");
2490 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In particle branch aod entries %d\n", GetInputAODBranch()->GetEntriesFast());
2493 //Get the vertex and check it is not too large in z
2494 Double_t v[3] = {0,0,0}; //vertex ;
2495 GetReader()->GetVertex(v);
2496 if(!GetMixedEvent() && TMath::Abs(v[2]) > GetZvertexCut()) return ;
2498 //Loop on stored AOD particles, find leading
2499 Double_t ptTrig = fMinTriggerPt;
2500 if(fLeadingTriggerIndex < 0)
2502 //Search leading if not done before
2503 Int_t naod = GetInputAODBranch()->GetEntriesFast() ;
2504 for(Int_t iaod = 0; iaod < naod ; iaod++)
2505 { //loop on input trigger AOD file
2506 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
2508 // Vertex cut in case of mixing
2509 Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0));
2510 if(check == 0) continue;
2511 if(check == -1) return;
2513 //check if the particle is isolated or if we want to take the isolation into account
2514 if(OnlyIsolated() && !particle->IsIsolated()) continue;
2516 //find the leading particles with highest momentum
2517 if (particle->Pt() > ptTrig)
2519 ptTrig = particle->Pt() ;
2520 fLeadingTriggerIndex = iaod ;
2523 }// Finish search of leading trigger particle
2524 }// Search leading if not done before
2526 if(fLeadingTriggerIndex >= 0 )
2527 { //using trigger particle to do correlations
2529 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(fLeadingTriggerIndex));
2531 // check if it was a calorimeter cluster and if the SS cut was requested, if so, apply it
2532 Int_t clID1 = particle->GetCaloLabel(0) ;
2533 Int_t clID2 = particle->GetCaloLabel(1) ; // for photon clusters should not be set.
2534 //printf("Leading for for %s: id1 %d, id2 %d, min %f, max %f, det %s\n",
2535 // GetInputAODName().Data(),clID1,clID2,fM02MinCut,fM02MaxCut,(particle->GetDetector()).Data());
2537 if(clID1 > 0 && clID2 < 0 && fM02MaxCut > 0 && fM02MinCut > 0)
2540 TObjArray* clusters = 0x0;
2541 if (particle->GetDetector() == "EMCAL") clusters = GetEMCALClusters();
2542 else if(particle->GetDetector() == "PHOS" ) clusters = GetPHOSClusters();
2546 AliVCluster *cluster = FindCluster(clusters,clID1,iclus);
2547 Float_t m02 = cluster->GetM02();
2548 //printf("\t Check m02 = %2.2f\n",m02);
2549 if(m02 > fM02MaxCut || m02 < fM02MinCut)
2551 //printf("\t \t Not accepted\n");
2557 // Check if the particle is isolated or if we want to take the isolation into account
2558 if(OnlyIsolated() && !particle->IsIsolated()) return;
2560 Float_t pt = particle->Pt();
2561 fhPtInput->Fill(pt);
2563 // Check if trigger is in fiducial region
2564 if(IsFiducialCutOn())
2566 Bool_t in = GetFiducialCut()->IsInFiducialCut(*particle->Momentum(),particle->GetDetector()) ;
2570 fhPtFidCut->Fill(pt);
2572 // Make correlation with charged hadrons
2573 Bool_t okcharged = kTRUE;
2574 Bool_t okneutral = kTRUE;
2575 if(GetReader()->IsCTSSwitchedOn() )
2577 okcharged = MakeChargedCorrelation(particle, GetCTSTracks(),kTRUE);
2580 MakeMCChargedCorrelation(particle);
2584 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); //For the future, foresee more possible pi0 lists
2585 if(fNeutralCorr && pi0list)
2587 if(pi0list->GetEntriesFast() > 0)
2588 okneutral = MakeNeutralCorrelation(particle, pi0list,kTRUE);
2591 // Fill leading particle histogram if correlation went well and
2592 // no problem was found, like not absolute leading, or bad vertex in mixing.
2593 if(okcharged && okneutral)
2595 fhPtLeading->Fill(pt);
2596 fhPtLeadingBin->Fill(pt,GetEventMixBin());
2597 if(fCorrelVzBin) fhPtLeadingVzBin->Fill(pt,GetEventVzBin());
2599 if(fFillPileUpHistograms)
2601 if(GetReader()->IsPileUpFromSPD()) fhPtLeadingPileUp[0]->Fill(pt);
2602 if(GetReader()->IsPileUpFromEMCal()) fhPtLeadingPileUp[1]->Fill(pt);
2603 if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtLeadingPileUp[2]->Fill(pt);
2604 if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtLeadingPileUp[3]->Fill(pt);
2605 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtLeadingPileUp[4]->Fill(pt);
2606 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtLeadingPileUp[5]->Fill(pt);
2607 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtLeadingPileUp[6]->Fill(pt);
2610 Float_t phi = particle->Phi();
2611 if(phi<0)phi+=TMath::TwoPi();
2612 fhPhiLeading->Fill(pt, phi);
2614 fhEtaLeading->Fill(pt, particle->Eta());
2615 //printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Leading particle : pt %f, eta %f, phi %f\n",particle->Pt(),particle->Eta(),phi);
2619 Int_t mcIndex = GetMCTagHistogramIndex(particle->GetTag());
2620 fhPtLeadingMC[mcIndex]->Fill(pt);
2623 Float_t cen = GetEventCentrality();
2624 Float_t ep = GetEventPlaneAngle();
2626 fhPtLeadingCentrality ->Fill(pt,cen);
2627 fhPtLeadingEventPlane ->Fill(pt,ep);
2628 fhLeadingEventPlaneCentrality->Fill(cen,ep);
2630 }//ok charged && neutral
2633 //Reinit for next event
2634 fLeadingTriggerIndex = -1;
2636 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - End fill histograms \n");
2639 //___________________________________________________________________________________________________________
2640 Bool_t AliAnaParticleHadronCorrelation::MakeChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle,
2641 const TObjArray* pl, const Bool_t bFillHisto)
2643 // Charged Hadron Correlation Analysis
2645 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Make trigger particle - charged hadron correlation \n");
2647 Float_t phiTrig = aodParticle->Phi();
2648 Float_t etaTrig = aodParticle->Eta();
2649 Float_t ptTrig = aodParticle->Pt();
2650 Bool_t decay = aodParticle->IsTagged();
2651 Int_t mcTag = aodParticle->GetTag();
2653 Float_t pt = -100. ;
2654 Float_t zT = -100. ;
2655 Float_t xE = -100. ;
2656 Float_t hbpXE = -100. ;
2657 Float_t hbpZT = -100. ;
2658 Float_t phi = -100. ;
2659 Float_t eta = -100. ;
2660 Float_t pout = -100. ;
2661 Float_t deltaPhi = -100. ;
2664 TLorentzVector photonMom ;
2665 TObjArray * reftracks = 0x0;
2667 Int_t nTracks = GetCTSTracks()->GetEntriesFast() ;
2669 // Mixed event settings
2670 Int_t evtIndex11 = -1 ; // cluster trigger or pi0 trigger
2671 Int_t evtIndex12 = -1 ; // pi0 trigger
2672 Int_t evtIndex13 = -1 ; // charged trigger
2674 Double_t v[3] = {0,0,0}; //vertex ;
2675 GetReader()->GetVertex(v);
2677 if (GetMixedEvent())
2679 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
2680 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
2681 evtIndex13 = GetMixedEvent()->EventIndex(aodParticle->GetTrackLabel(0)) ;
2684 // In case of pi0/eta trigger, we may want to check their decay correlation,
2685 // get their decay children
2686 TLorentzVector decayMom1;
2687 TLorentzVector decayMom2;
2688 Bool_t decayFound = kFALSE;
2689 if(fPi0Trigger && bFillHisto) decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
2691 //-----------------------------------------------------------------------
2692 //Track loop, select tracks with good pt, phi and fill AODs or histograms
2693 //-----------------------------------------------------------------------
2695 for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ )
2697 AliVTrack * track = (AliVTrack *) (pl->At(ipr)) ;
2699 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
2700 p3.SetXYZ(mom[0],mom[1],mom[2]);
2704 if(phi < 0) phi+=TMath::TwoPi();
2706 //Select only hadrons in pt range
2707 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
2709 //remove trigger itself for correlation when use charged triggers
2710 if( track->GetID() == aodParticle->GetTrackLabel(0) || track->GetID() == aodParticle->GetTrackLabel(1) ||
2711 track->GetID() == aodParticle->GetTrackLabel(2) || track->GetID() == aodParticle->GetTrackLabel(3) )
2714 //jump out this event if near side associated particle pt larger than trigger
2715 if (fMakeNearSideLeading)
2717 if(pt > ptTrig && TMath::Abs(phi-phiTrig) < TMath::PiOver2()) return kFALSE;
2719 //jump out this event if there is any other particle with pt larger than trigger
2720 else if(fMakeAbsoluteLeading)
2722 if(pt > ptTrig) return kFALSE;
2725 //Only for mixed event
2726 Int_t evtIndex2 = 0 ;
2727 if (GetMixedEvent())
2729 evtIndex2 = GetMixedEvent()->EventIndex(track->GetID()) ;
2730 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 || evtIndex13 == evtIndex2 ) // photon and track from different events
2733 if (TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut())
2742 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
2744 // Set the pt associated bin for the defined bins
2745 Int_t assocBin = -1;
2746 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2748 if(pt > fAssocPtBinLimit[i] && pt < fAssocPtBinLimit[i+1]) assocBin= i;
2751 // Assign to the histogram array a bin corresponding to a combination of pTa and vz bins
2757 nz = GetNZvertBin();
2758 vz = GetEventVzBin();
2761 Int_t bin = assocBin*nz+vz;
2763 //printf("assoc Bin = %d, vZ bin = %d, bin = %d \n", assocBin,GetEventVzBin(),bin);
2766 // calculate deltaPhi for later, shift when needed
2767 FillChargedAngularCorrelationHistograms(pt, ptTrig, bin, phi, phiTrig, deltaPhi,
2768 eta, etaTrig, decay, track->GetHMPIDsignal(),nTracks,mcTag);
2770 // Imbalance zT/xE/pOut
2772 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
2775 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
2776 //if(xE <0.)xE =-xE;
2777 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
2780 pout = pt*TMath::Sin(deltaPhi) ;
2782 //delta phi cut for momentum imbalance correlation
2783 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
2786 FillChargedMomentumImbalanceHistograms(ptTrig, pt, xE, hbpXE, zT, hbpZT, pout,
2787 nTracks, track->Charge(), bin, decay,mcTag);
2790 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
2793 FillChargedUnderlyingEventHistograms(ptTrig, pt, deltaPhi, nTracks);
2795 fhUePart->Fill(ptTrig);
2799 if(fPi0Trigger && decayFound)
2800 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2, kTRUE) ;
2802 //several UE calculation
2803 if(fMakeSeveralUE) FillChargedUnderlyingEventSidesHistograms(ptTrig,pt,deltaPhi);
2811 reftracks = new TObjArray(0);
2812 TString trackname = Form("%s+Tracks", GetAODObjArrayName().Data());
2813 reftracks->SetName(trackname.Data());
2814 reftracks->SetOwner(kFALSE);
2817 reftracks->Add(track);
2819 }//aod particle loop
2822 //Fill AOD with reference tracks, if not filling histograms
2823 if(!bFillHisto && reftracks)
2825 aodParticle->AddObjArray(reftracks);
2828 //Own mixed event, add event and remove previous or fill the mixed histograms
2829 if(DoOwnMix() && bFillHisto)
2831 MakeChargedMixCorrelation(aodParticle);
2839 //_________________________________________________________________________________________________________
2840 void AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
2842 // Mix current trigger with tracks in another MB event
2844 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Make trigger particle - charged hadron mixed event correlation \n");
2846 if(GetMixedEvent()) return; // This is not the mixed event from general mixing frame
2848 // Get the event with similar caracteristics
2849 //printf("MakeChargedMixCorrelation for %s\n",GetInputAODName().Data());
2851 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
2853 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
2855 if(!inputHandler) return;
2857 if(!(inputHandler->IsEventSelected( ) & GetReader()->GetEventTriggerMask())) return;
2859 // Get the pool, check if it exits
2860 Int_t eventBin = GetEventMixBin();
2862 fhEventBin->Fill(eventBin);
2864 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
2865 if(eventBin < 0) return;
2868 TList * poolCalo = 0;
2869 if(fUseMixStoredInReader)
2871 pool = GetReader()->GetListWithMixedEventsForTracks(eventBin);
2872 if(OnlyIsolated()) poolCalo = GetReader()->GetListWithMixedEventsForCalo (eventBin);
2876 pool = fListMixTrackEvents[eventBin];
2877 if(OnlyIsolated()) poolCalo = fListMixCaloEvents [eventBin];
2882 if(OnlyIsolated() && !poolCalo &&
2883 (GetIsolationCut()->GetParticleTypeInCone()!=AliIsolationCut::AliIsolationCut::kOnlyCharged))
2884 printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Careful, cluster pool not available\n");
2886 Double_t ptTrig = aodParticle->Pt();
2887 Double_t etaTrig = aodParticle->Eta();
2888 Double_t phiTrig = aodParticle->Phi();
2889 if(phiTrig < 0.) phiTrig+=TMath::TwoPi();
2892 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Pool bin %d size %d, leading trigger pt=%f, phi=%f, eta=%f\n",
2893 eventBin,pool->GetSize(), ptTrig,phiTrig,etaTrig);
2895 Double_t ptAssoc = -999.;
2896 Double_t phiAssoc = -999.;
2897 Double_t etaAssoc = -999.;
2898 Double_t deltaPhi = -999.;
2899 Double_t deltaEta = -999.;
2900 Double_t xE = -999.;
2901 Double_t hbpXE = -999.;
2903 //Start from first event in pool except if in this same event the pool was filled
2905 if(GetReader()->GetLastTracksMixedEvent() == GetEventNumber()) ev0 = 1;
2907 for(Int_t ev=ev0; ev < pool->GetSize(); ev++)
2909 TObjArray* bgTracks = static_cast<TObjArray*>(pool->At(ev));
2911 // Check if the particle is isolated in the mixed event, it not, do not fill the histograms
2914 if(pool->GetSize()!=poolCalo->GetSize())
2915 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Different size of calo and track pools\n");
2917 TObjArray* bgCalo = static_cast<TObjArray*>(poolCalo->At(ev));
2920 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Event %d in calo pool not available?\n",ev);
2922 Int_t n=0; Int_t nfrac = 0; Bool_t isolated = kFALSE; Float_t coneptsum = 0;
2923 GetIsolationCut()->MakeIsolationCut(bgTracks,bgCalo,
2924 GetReader(), GetCaloPID(),
2925 kFALSE, aodParticle, "",
2926 n,nfrac,coneptsum, isolated);
2928 //printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Isolated? %d - cone %f, ptthres %f",
2929 // isolated,GetIsolationCut()->GetConeSize(),GetIsolationCut()->GetPtThreshold());
2930 //if(bgTracks)printf(" - n track %d", bgTracks->GetEntriesFast());
2933 if(!isolated) continue ;
2936 fhEventMixBin->Fill(eventBin);
2938 Int_t nTracks=bgTracks->GetEntriesFast();
2939 //printf("\t Read Pool event %d, nTracks %d\n",ev,nTracks);
2941 //Check if it is leading if mixed event
2942 if(fMakeNearSideLeading || fMakeAbsoluteLeading)
2944 Bool_t leading = kTRUE;
2945 for(Int_t jlead = 0;jlead <nTracks; jlead++ )
2947 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(jlead) ;
2949 ptAssoc = track->Pt();
2950 phiAssoc = track->Phi() ;
2952 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
2953 if (fMakeNearSideLeading)
2955 if(ptAssoc > ptTrig && TMath::Abs(phiAssoc-phiTrig) < TMath::PiOver2())
2961 //jump out this event if there is any other particle with pt larger than trigger
2962 else if(fMakeAbsoluteLeading)
2964 if(ptAssoc > ptTrig)
2971 if(!leading) continue; // not leading, check the next event in pool
2974 fhPtLeadingMixed ->Fill(ptTrig);
2975 fhPhiLeadingMixed ->Fill(ptTrig, phiTrig);
2976 fhEtaLeadingMixed ->Fill(ptTrig, etaTrig);
2977 fhPtLeadingMixedBin->Fill(ptTrig,eventBin);
2978 if(fCorrelVzBin)fhPtLeadingMixedVzBin->Fill(ptTrig, GetEventVzBin());
2980 for(Int_t j1 = 0;j1 <nTracks; j1++ )
2982 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(j1) ;
2984 if(!track) continue;
2986 ptAssoc = track->Pt();
2987 etaAssoc = track->Eta();
2988 phiAssoc = track->Phi() ;
2989 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
2991 if(IsFiducialCutOn())
2993 Bool_t in = GetFiducialCut()->IsInFiducialCut(*aodParticle->Momentum(),"CTS") ;
2997 deltaPhi = phiTrig-phiAssoc;
2998 if(deltaPhi < -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
2999 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3000 deltaEta = etaTrig-etaAssoc;
3003 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation(): deltaPhi= %f, deltaEta=%f\n",deltaPhi, deltaEta);
3005 // Set the pt associated bin for the defined bins
3006 Int_t assocBin = -1;
3007 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3009 if(ptAssoc > fAssocPtBinLimit[i] && ptAssoc < fAssocPtBinLimit[i+1]) assocBin= i;
3012 // Assign to the histogram array a bin corresponding to a combination of pTa and vz bins
3018 nz = GetNZvertBin();
3019 vz = GetEventVzBin();
3022 Int_t bin = assocBin*nz+vz;
3024 fhMixDeltaPhiCharged ->Fill(ptTrig, deltaPhi);
3025 fhMixDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
3027 fhMixDeltaPhiCharged ->Fill(ptTrig, deltaPhi);
3028 fhMixDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
3030 xE =-ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3031 //if(xE <0.)xE =-xE;
3032 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3035 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
3037 fhMixXECharged->Fill(ptTrig,xE);
3038 fhMixHbpXECharged->Fill(ptTrig,hbpXE);
3041 if(bin < 0) continue ; // this pt bin was not considered
3043 if(TMath::Abs(deltaEta) > 0.8)
3044 fhMixDeltaPhiChargedAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
3045 if(TMath::Abs(deltaEta) < 0.01)
3046 fhMixDeltaPhiChargedAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
3048 fhMixDeltaPhiChargedAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
3049 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->Fill(deltaPhi, deltaEta);
3052 } // mixed event loop
3056 //________________________________________________________________________________________________________________
3057 Bool_t AliAnaParticleHadronCorrelation::MakeNeutralCorrelation(AliAODPWG4ParticleCorrelation * const aodParticle,
3058 const TObjArray* pi0list, const Bool_t bFillHisto)
3060 // Neutral Pion Correlation Analysis
3061 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Make trigger particle - pi0 correlation, %d pi0's \n",
3062 pi0list->GetEntriesFast());
3064 Int_t evtIndex11 = 0 ;
3065 Int_t evtIndex12 = 0 ;
3066 if (GetMixedEvent())
3068 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
3069 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
3072 Float_t pt = -100. ;
3073 Float_t zT = -100. ;
3074 Float_t phi = -100. ;
3075 Float_t eta = -100. ;
3076 Float_t xE = -100. ;
3077 Float_t hbpXE= -100. ;
3078 Float_t hbpZT= -100. ;
3080 Float_t ptTrig = aodParticle->Pt();
3081 Float_t phiTrig = aodParticle->Phi();
3082 Float_t etaTrig = aodParticle->Eta();
3083 Float_t deltaPhi= -100. ;
3085 TLorentzVector photonMom ;
3087 // In case of pi0/eta trigger, we may want to check their decay correlation,
3088 // get their decay children
3089 TLorentzVector decayMom1;
3090 TLorentzVector decayMom2;
3091 Bool_t decayFound = kFALSE;
3092 if(fPi0Trigger && bFillHisto) decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
3094 TObjArray * refpi0 = 0x0;
3097 //Loop on stored AOD pi0
3099 Int_t naod = pi0list->GetEntriesFast();
3101 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillHistograms() - aod branch entries %d\n", naod);
3103 for(Int_t iaod = 0; iaod < naod ; iaod++)
3105 AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (pi0list->At(iaod));
3107 Int_t evtIndex2 = 0 ;
3108 Int_t evtIndex3 = 0 ;
3109 if (GetMixedEvent())
3111 evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(0)) ;
3112 evtIndex3 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(1)) ;
3114 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 ||
3115 evtIndex11 == evtIndex3 || evtIndex12 == evtIndex3) // trigger and pi0 are not from different events
3121 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
3123 //jump out this event if near side associated particle pt larger than trigger
3124 if (fMakeNearSideLeading)
3126 if(pt > ptTrig && TMath::Abs(phi-phiTrig) < TMath::PiOver2()) return kFALSE;
3128 //jump out this event if there is any other particle with pt larger than trigger
3129 else if(fMakeAbsoluteLeading)
3131 if(pt > ptTrig) return kFALSE;
3139 FillNeutralAngularCorrelationHistograms(pt, ptTrig, phi, phiTrig, deltaPhi, eta, etaTrig);
3142 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3144 //if(xE <0.)xE =-xE;
3149 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3150 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
3152 if(fPi0Trigger && decayFound)
3153 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2,kFALSE) ;
3155 //delta phi cut for correlation
3156 if( (deltaPhi > fDeltaPhiMinCut) && ( deltaPhi < fDeltaPhiMaxCut) )
3158 fhDeltaPhiNeutralPt->Fill(pt,deltaPhi);
3159 fhXENeutral ->Fill(ptTrig,xE);
3160 fhPtHbpXENeutral ->Fill(ptTrig,hbpXE);
3162 else if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3164 fhDeltaPhiUeNeutralPt->Fill(pt,deltaPhi);
3165 fhXEUeNeutral ->Fill(ptTrig,xE);
3166 fhPtHbpXEUeNeutral ->Fill(ptTrig,hbpXE);
3169 //several UE calculation
3170 if(fMakeSeveralUE) FillChargedUnderlyingEventSidesHistograms(ptTrig,pt,deltaPhi);
3178 refpi0 = new TObjArray(0);
3179 refpi0->SetName(GetAODObjArrayName()+"Pi0s");
3180 refpi0->SetOwner(kFALSE);
3183 }//put references in trigger AOD
3186 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Selected neutral for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
3193 //_________________________________________________________________________________________________________
3194 void AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
3196 // Charged Hadron Correlation Analysis with MC information
3199 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation() - Make trigger particle - charged hadron correlation in AOD MC level\n");
3201 AliStack * stack = 0x0 ;
3202 TParticle * primary = 0x0 ;
3203 TClonesArray * mcparticles0 = 0x0 ;
3204 TClonesArray * mcparticles = 0x0 ;
3205 AliAODMCParticle * aodprimary = 0x0 ;
3207 Double_t eprim = 0 ;
3208 Double_t ptprim = 0 ;
3209 Double_t phiprim = 0 ;
3210 Double_t etaprim = 0 ;
3212 Int_t iParticle = 0 ;
3213 Double_t charge = 0.;
3215 if(GetReader()->ReadStack())
3217 nTracks = GetMCStack()->GetNtrack() ;
3221 nTracks = GetReader()->GetAODMCParticles()->GetEntriesFast() ;
3223 //Int_t trackIndex[nTracks];
3225 Int_t label= aodParticle->GetLabel();
3228 if(GetDebug() > 0) printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** bad label ***: label %d \n", label);
3232 if(GetReader()->ReadStack())
3234 stack = GetMCStack() ;
3237 printf(" AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation- Stack not available, is the MC handler called? STOP\n");
3241 nTracks=stack->GetNprimary();
3242 if(label >= stack->GetNtrack())
3244 if(GetDebug() > 2) printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** large label ***: label %d, n tracks %d \n", label, stack->GetNtrack());
3248 primary = stack->Particle(label);
3251 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** no primary ***: label %d \n", label);
3257 eprim = primary->Energy();
3258 ptprim = primary->Pt();
3259 phiprim = primary->Phi();
3260 etaprim = primary->Eta();
3262 if(ptprim < 0.01 || eprim < 0.01) return ;
3264 for (iParticle = 0 ; iParticle < nTracks ; iParticle++)
3266 TParticle * particle = stack->Particle(iParticle);
3267 TLorentzVector momentum;
3269 //keep only final state particles
3270 if(particle->GetStatusCode()!=1) continue ;
3272 Int_t pdg = particle->GetPdgCode();
3274 charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
3276 particle->Momentum(momentum);
3278 //---------- Charged particles ----------------------
3281 //Particles in CTS acceptance
3282 Bool_t inCTS = GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
3284 if(TMath::Abs(pdg) == 11 && stack->Particle(particle->GetFirstMother())->GetPdgCode()==22) continue ;
3288 if( label!=iParticle) // avoid trigger particle
3290 if(!FillChargedMCCorrelationHistograms(particle->Pt(),particle->Phi(),particle->Eta(),ptprim,phiprim,etaprim)) return;
3292 }// in CTS acceptance
3295 } //when the leading particles could trace back to MC
3298 else if(GetReader()->ReadAODMCParticles())
3300 //Get the list of MC particles
3301 mcparticles0 = GetReader()->GetAODMCParticles(0);
3302 if(!mcparticles0) return;
3304 if(label >=mcparticles0->GetEntriesFast())
3307 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** large label ***: label %d, n tracks %d \n", label,mcparticles0->GetEntriesFast());
3312 aodprimary = (AliAODMCParticle*) mcparticles0->At(label);
3315 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** no AOD primary ***: label %d \n", label);
3321 ptprim = aodprimary->Pt();
3322 phiprim = aodprimary->Phi();
3323 etaprim = aodprimary->Eta();
3324 eprim = aodprimary->E();
3326 Bool_t lead = kFALSE;
3328 if(ptprim < 0.01 || eprim < 0.01) return ;
3330 mcparticles= GetReader()->GetAODMCParticles();
3331 for (iParticle = 0; iParticle < nTracks; iParticle++)
3333 AliAODMCParticle *part = (AliAODMCParticle*) mcparticles->At(iParticle);
3335 if (!part->IsPhysicalPrimary()) continue;
3337 Int_t pdg = part->GetPdgCode();
3338 charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
3339 TLorentzVector momentum(part->Px(),part->Py(),part->Pz(),part->E());
3343 if(part->Pt()> GetReader()->GetCTSPtMin())
3345 //Particles in CTS acceptance
3346 Bool_t inCTS = GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
3347 Int_t indexmother=part->GetMother();
3351 Int_t mPdg = ((AliAODMCParticle*) mcparticles->At(indexmother)) ->GetPdgCode();
3352 if(TMath::Abs(pdg) == 11 && mPdg == 22) continue;
3357 if( label!=iParticle) // avoid trigger particle
3359 if(!FillChargedMCCorrelationHistograms(part->Pt(),part->Phi(),part->Eta(),ptprim,phiprim,etaprim)) return;
3364 } //only charged particles
3365 } //MC particle loop
3368 fhMCPtLeading->Fill(ptprim);
3369 fhMCPhiLeading->Fill(ptprim,phiprim);
3370 fhMCEtaLeading->Fill(ptprim,etaprim);
3372 } //when the leading particles could trace back to MC
3376 //_____________________________________________________________________
3377 void AliAnaParticleHadronCorrelation::Print(const Option_t * opt) const
3380 //Print some relevant parameters set for the analysis
3384 printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
3385 AliAnaCaloTrackCorrBaseClass::Print(" ");
3386 printf("Pt trigger > %3.2f\n", fMinTriggerPt) ;
3387 printf("Pt associated hadron < %3.2f\n", fMaxAssocPt) ;
3388 printf("Pt associated hadron > %3.2f\n", fMinAssocPt) ;
3389 printf("Phi trigger particle-Hadron < %3.2f\n", fDeltaPhiMaxCut) ;
3390 printf("Phi trigger particle-Hadron > %3.2f\n", fDeltaPhiMinCut) ;
3391 printf("Phi trigger particle-UeHadron < %3.2f\n", fUeDeltaPhiMaxCut) ;
3392 printf("Phi trigger particle-UeHadron > %3.2f\n", fUeDeltaPhiMinCut) ;
3393 printf("Isolated Trigger? %d\n" , fSelectIsolated) ;
3394 printf("Several UE? %d\n" , fMakeSeveralUE) ;
3395 printf("Name of AOD Pi0 Branch %s \n", fPi0AODBranchName.Data());
3396 printf("Do Decay-hadron correlation ? %d\n", fPi0Trigger) ;
3397 printf("Select absolute leading for cluster triggers ? %d or Near Side %d\n",
3398 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
3399 printf("Trigger pt bins %d\n", fNAssocPtBins) ;
3400 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
3401 printf("\t bin %d = [%2.1f,%2.1f]\n", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
3406 //____________________________________________________________
3407 void AliAnaParticleHadronCorrelation::SetNAssocPtBins(Int_t n)
3409 // Set number of bins
3420 printf("n = larger than 19 or too small, set to 19 \n");
3425 //______________________________________________________________________________
3426 void AliAnaParticleHadronCorrelation::SetAssocPtBinLimit(Int_t ibin, Float_t pt)
3428 // Set the list of limits for the trigger pt bins
3430 if(ibin <= fNAssocPtBins || ibin >= 0)
3432 fAssocPtBinLimit[ibin] = pt ;
3436 printf("AliAnaParticleHadronCorrelation::SetAssocPtBinLimit() - bin number too large %d > %d or small, nothing done\n", ibin, fNAssocPtBins) ;