1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 //_________________________________________________________________________
17 // Class for the analysis of particle - hadron correlations
18 // Particle (for example direct gamma) must be found in a previous analysis
19 //-- Author: Gustavo Conesa (LNF-INFN)
21 // Modified by Yaxian Mao:
22 // 1. add the UE subtraction for corrlation study
23 // 2. change the correlation variable
24 // 3. Only use leading particle(cluster/track) as trigger for correlation (2010/07/02)
25 // 4. Make decay photon-hadron correlations where decay contribute pi0 mass (2010/09/09)
26 // 5. fill the pout to extract kt at the end, also to study charge asymmetry(2010/10/06)
27 // 6. Add the possibility for event selection analysis based on vertex and multiplicity bins (10/10/2010)
28 // 7. change the way of delta phi cut for UE study due to memory issue (reduce histograms)
29 // 8. Add the possibility to request the absolute leading particle at the near side or not, set trigger bins, general clean-up (08/2011)
30 //////////////////////////////////////////////////////////////////////////////
33 // --- ROOT system ---
34 //#include "TClonesArray.h"
38 #include <TDatabasePDG.h>
40 //---- ANALYSIS system ----
41 #include "AliNeutralMesonSelection.h"
42 #include "AliAnaParticleHadronCorrelation.h"
43 #include "AliCaloTrackReader.h"
44 #include "AliAODPWG4ParticleCorrelation.h"
45 #include "AliFiducialCut.h"
46 #include "AliVTrack.h"
47 #include "AliVCluster.h"
48 #include "AliMCAnalysisUtils.h"
49 #include "TParticle.h"
51 #include "AliAODMCParticle.h"
52 #include "AliMixedEvent.h"
53 #include "AliAnalysisManager.h"
54 #include "AliInputEventHandler.h"
55 #include "AliEventplane.h"
57 ClassImp(AliAnaParticleHadronCorrelation)
60 //___________________________________________________________________
61 AliAnaParticleHadronCorrelation::AliAnaParticleHadronCorrelation():
62 AliAnaCaloTrackCorrBaseClass(),
64 fMaxAssocPt(1000.), fMinAssocPt(0.),
65 fDeltaPhiMaxCut(0.), fDeltaPhiMinCut(0.),
66 fSelectIsolated(0), fMakeSeveralUE(0),
67 fUeDeltaPhiMaxCut(0.), fUeDeltaPhiMinCut(0.),
68 fPi0AODBranchName(""), fNeutralCorr(0),
69 fPi0Trigger(0), fDecayTrigger(0),
70 fMakeAbsoluteLeading(0), fMakeNearSideLeading(0),
71 fLeadingTriggerIndex(-1), fHMPIDCorrelation(0), fFillBradHisto(0),
72 fNAssocPtBins(0), fAssocPtBinLimit(),
74 fListMixTrackEvents(), fListMixCaloEvents(),
75 fUseMixStoredInReader(0), fFillNeutralEventMixPool(0),
76 fM02MaxCut(0), fM02MinCut(0),
77 fFillPileUpHistograms(0),
78 fSelectLeadingHadronAngle(0),
79 fMinLeadHadPhi(0), fMaxLeadHadPhi(0),
80 fMinLeadHadPt(0), fMaxLeadHadPt(0),
83 fhPtInput(0), fhPtFidCut(0),
84 fhPtLeading(0), fhPtLeadingVtxBC0(0),
85 fhPtLeadingVzBin(0), fhPtLeadingBin(0),
86 fhPhiLeading(0), fhEtaLeading(0),
88 fhPtLeadingCentrality(0), fhPtLeadingEventPlane(0),
89 fhLeadingEventPlaneCentrality(0),
90 fhPtLeadingMixed(0), fhPtLeadingMixedVzBin(0), fhPtLeadingMixedBin(0),
91 fhPhiLeadingMixed(0), fhEtaLeadingMixed(0),
92 fhDeltaPhiDeltaEtaCharged(0),
93 fhPhiCharged(0), fhEtaCharged(0),
94 fhDeltaPhiCharged(0), fhDeltaEtaCharged(0),
95 fhDeltaPhiChargedPt(0), fhDeltaPhiUeChargedPt(0),
97 fhXECharged(0), fhXECharged_Cone2(0), fhXEUeCharged(0),
98 fhXEPosCharged(0), fhXENegCharged(0),
99 fhPtHbpXECharged(0), fhPtHbpXECharged_Cone2(0), fhPtHbpXEUeCharged(0),
100 fhZTCharged(0), fhZTUeCharged(0),
101 fhZTPosCharged(0), fhZTNegCharged(0),
102 fhPtHbpZTCharged(0), fhPtHbpZTUeCharged(0),
103 fhXEChargedMC(), fhDeltaPhiChargedMC(),
104 fhDeltaPhiDeltaEtaChargedPtA3GeV(0),
105 fhDeltaPhiChargedPtA3GeV(0), fhDeltaEtaChargedPtA3GeV(0),
107 fhDeltaPhiChargedPileUp(), fhDeltaEtaChargedPileUp(),
108 fhDeltaPhiChargedPtA3GeVPileUp(), fhDeltaEtaChargedPtA3GeVPileUp(),
109 fhXEChargedPileUp(), fhXEUeChargedPileUp(),
110 fhZTChargedPileUp(), fhZTUeChargedPileUp(),
111 fhPtTrigChargedPileUp(),
112 fhDeltaPhiChargedOtherBC(), fhDeltaPhiChargedPtA3GeVOtherBC(),
113 fhXEChargedOtherBC(), fhXEUeChargedOtherBC(),
114 fhZTChargedOtherBC(), fhZTUeChargedOtherBC(),
115 fhPtTrigChargedOtherBC(),
116 fhDeltaPhiChargedBC0(), fhDeltaPhiChargedPtA3GeVBC0(),
117 fhXEChargedBC0(), fhXEUeChargedBC0(),
118 fhZTChargedBC0(), fhZTUeChargedBC0(),
119 fhPtTrigChargedBC0(),
120 fhDeltaPhiChargedVtxBC0(), fhDeltaPhiChargedPtA3GeVVtxBC0(),
121 fhXEChargedVtxBC0(), fhXEUeChargedVtxBC0(),
122 fhZTChargedVtxBC0(), fhZTUeChargedVtxBC0(),
123 fhPtTrigChargedVtxBC0(),
124 fhDeltaPhiUeLeftCharged(0), fhDeltaPhiUeRightCharged(0),
125 fhDeltaPhiUeLeftUpCharged(0), fhDeltaPhiUeRightUpCharged(0),
126 fhDeltaPhiUeLeftDownCharged(0), fhDeltaPhiUeRightDownCharged(0),
127 fhXEUeLeftCharged(0), fhXEUeRightCharged(0),
128 fhXEUeLeftUpCharged(0), fhXEUeRightUpCharged(0),
129 fhXEUeLeftDownCharged(0), fhXEUeRightDownCharged(0),
130 fhPtHbpXEUeLeftCharged(0), fhPtHbpXEUeRightCharged(0),
131 fhZTUeLeftCharged(0), fhZTUeRightCharged(0),
132 fhPtHbpZTUeLeftCharged(0), fhPtHbpZTUeRightCharged(0),
133 fhPtTrigPout(0), fhPtTrigCharged(0),
134 fhTrigDeltaPhiCharged(0x0), fhTrigDeltaEtaCharged(0x0),
135 fhTrigXECorr(0x0), fhTrigXEUeCorr(0x0),
136 fhTrigZTCorr(0x0), fhTrigZTUeCorr(0x0),
137 fhAssocPtBkg(0), fhDeltaPhiDeltaEtaAssocPtBin(0),
138 fhDeltaPhiAssocPtBin(0),
139 fhDeltaPhiAssocPtBinDEta08(0), fhDeltaPhiAssocPtBinDEta0(0),
140 fhDeltaPhiAssocPtBinHMPID(0), fhDeltaPhiAssocPtBinHMPIDAcc(0),
141 fhDeltaPhiBradAssocPtBin(0), fhDeltaPhiBrad(0),
142 fhXEAssocPtBin(0), fhZTAssocPtBin(0),
143 fhDeltaPhiDeltaEtaNeutral(0),
144 fhPhiNeutral(0), fhEtaNeutral(0),
145 fhDeltaPhiNeutral(0), fhDeltaEtaNeutral(0),
146 fhDeltaPhiNeutralPt(0), fhDeltaPhiUeNeutralPt(0),
147 fhXENeutral(0), fhXEUeNeutral(0),
148 fhPtHbpXENeutral(0), fhPtHbpXEUeNeutral(0),
149 fhZTNeutral(0), fhZTUeNeutral(0),
150 fhPtHbpZTNeutral(0), fhPtHbpZTUeNeutral(0),
151 fhDeltaPhiUeLeftNeutral(0), fhDeltaPhiUeRightNeutral(0),
152 fhXEUeLeftNeutral(0), fhXEUeRightNeutral(0),
153 fhPtHbpXEUeLeftNeutral(0), fhPtHbpXEUeRightNeutral(0),
154 fhZTUeLeftNeutral(0), fhZTUeRightNeutral(0),
155 fhPtHbpZTUeLeftNeutral(0), fhPtHbpZTUeRightNeutral(0),
156 fhPtPi0DecayRatio(0),
157 fhDeltaPhiDecayCharged(0), fhXEDecayCharged(0), fhZTDecayCharged(0),
158 fhDeltaPhiDecayNeutral(0), fhXEDecayNeutral(0), fhZTDecayNeutral(0),
159 fhDeltaPhiDecayChargedAssocPtBin(0),
160 fhXEDecayChargedAssocPtBin(0), fhZTDecayChargedAssocPtBin(0),
161 fh2phiLeadingParticle(0x0), fhMCPtLeading(0),
162 fhMCPhiLeading(0), fhMCEtaLeading(0),
163 fhMCEtaCharged(0), fhMCPhiCharged(0),
164 fhMCDeltaEtaCharged(0), fhMCDeltaPhiCharged(0x0),
165 fhMCDeltaPhiDeltaEtaCharged(0), fhMCDeltaPhiChargedPt(0),
166 fhMCPtXECharged(0), fhMCPtXEUeCharged(0),
167 fhMCPtHbpXECharged(0), fhMCPtHbpXEUeCharged(0),
169 fhMCPtZTCharged(0), fhMCPtHbpZTCharged(0),
170 fhMCPtTrigPout(0), fhMCPtAssocDeltaPhi(0),
172 fhNEventsTrigger(0), fhNtracksMB(0), fhNclustersMB(0),
173 fhMixDeltaPhiCharged(0), fhMixDeltaPhiDeltaEtaCharged(0),
174 fhMixXECharged(0), fhMixXEUeCharged(0), fhMixHbpXECharged(0),
175 fhMixDeltaPhiChargedAssocPtBin(),
176 fhMixDeltaPhiChargedAssocPtBinDEta08(),
177 fhMixDeltaPhiChargedAssocPtBinDEta0(),
178 fhMixDeltaPhiDeltaEtaChargedAssocPtBin(),
179 fhEventBin(0), fhEventMixBin(0)
183 //Initialize parameters
186 for(Int_t i = 0; i < 7; i++)
188 fhPtLeadingMC[i] = 0;
189 fhXEChargedMC[i] = 0;
190 fhDeltaPhiChargedMC[i] = 0;
193 for(Int_t i = 0; i < 7; i++)
195 fhPtLeadingPileUp [i] = 0 ;
196 fhDeltaPhiChargedPileUp [i] = 0 ; fhDeltaEtaChargedPileUp [i] = 0 ;
197 fhXEChargedPileUp [i] = 0 ; fhXEUeChargedPileUp [i] = 0 ;
198 fhZTChargedPileUp [i] = 0 ; fhZTUeChargedPileUp [i] = 0 ;
199 fhPtTrigChargedPileUp [i] = 0 ;
200 fhDeltaPhiChargedPtA3GeVPileUp[i] = 0 ; fhDeltaEtaChargedPtA3GeVPileUp[i] = 0 ;
205 //_________________________________________________________________
206 AliAnaParticleHadronCorrelation::~AliAnaParticleHadronCorrelation()
208 // Remove event containers
212 if(fListMixTrackEvents)
214 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
216 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
218 for(Int_t irp=0; irp<GetNRPBin(); irp++)
220 Int_t bin = GetEventMixBin(ic, iz, irp);
221 fListMixTrackEvents[bin]->Delete() ;
222 delete fListMixTrackEvents[bin] ;
228 delete[] fListMixTrackEvents;
230 if(fListMixCaloEvents)
232 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
234 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
236 for(Int_t irp=0; irp<GetNRPBin(); irp++)
238 Int_t bin = GetEventMixBin(ic, iz, irp);
239 fListMixCaloEvents[bin]->Delete() ;
240 delete fListMixCaloEvents[bin] ;
246 delete[] fListMixCaloEvents;
251 //______________________________________________________________________________________________________________________________________________________
252 void AliAnaParticleHadronCorrelation::FillChargedAngularCorrelationHistograms(Float_t ptAssoc, Float_t ptTrig, Int_t bin,
253 Float_t phiAssoc, Float_t phiTrig, Float_t & deltaPhi,
254 Float_t etaAssoc, Float_t etaTrig,
255 Bool_t decay, Float_t hmpidSignal, Int_t outTOF,
256 Int_t nTracks, Int_t mcTag)
258 // Fill angular correlation related histograms
260 Float_t deltaEta = etaTrig-etaAssoc;
261 deltaPhi = phiTrig-phiAssoc;
262 Float_t deltaPhiOrg = deltaPhi;
264 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
265 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
267 fhEtaCharged ->Fill(ptAssoc,etaAssoc);
268 fhPhiCharged ->Fill(ptAssoc,phiAssoc);
269 fhDeltaEtaCharged ->Fill(ptTrig ,deltaEta);
270 fhDeltaPhiCharged ->Fill(ptTrig ,deltaPhi);
271 fhDeltaPhiChargedPt->Fill(ptAssoc, deltaPhi);
272 fhDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
276 fhDeltaEtaChargedPtA3GeV ->Fill(ptTrig ,deltaEta);
277 fhDeltaPhiChargedPtA3GeV ->Fill(ptTrig ,deltaPhi);
278 fhDeltaPhiDeltaEtaChargedPtA3GeV->Fill(deltaPhi, deltaEta);
283 if(fFillPileUpHistograms)
287 fhDeltaPhiChargedOtherBC->Fill(ptTrig ,deltaPhi) ;
288 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVOtherBC->Fill(ptTrig ,deltaPhi) ;
292 fhDeltaPhiChargedBC0->Fill(ptTrig ,deltaPhi) ;
293 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVBC0->Fill(ptTrig ,deltaPhi) ;
296 Int_t vtxBC = GetReader()->GetVertexBC();
297 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
299 fhDeltaPhiChargedVtxBC0->Fill(ptTrig ,deltaPhi) ;
300 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVVtxBC0->Fill(ptTrig ,deltaPhi) ;
303 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
304 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
305 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
306 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
307 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
308 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
309 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
313 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
314 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
315 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
316 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
317 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
318 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
319 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
325 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
326 fhDeltaPhiChargedMC[mcIndex]->Fill(ptTrig , deltaPhi);
329 if(fDecayTrigger && decay) fhDeltaPhiDecayCharged ->Fill(ptTrig , deltaPhi);
331 Double_t dphiBrad = -100;
334 dphiBrad = atan2(sin(deltaPhiOrg), cos(deltaPhiOrg))/TMath::Pi();//-1 to 1
335 if(TMath::Abs(dphiBrad)>0.325 && TMath::Abs(dphiBrad)<0.475) //Hardcoded values, BAD, FIXME
337 fhAssocPtBkg->Fill(ptTrig, ptAssoc);
340 if(dphiBrad<-1./3) dphiBrad += 2;
341 fhDeltaPhiBrad->Fill(ptTrig, dphiBrad);
344 // Fill histograms in bins of associated particle pT
347 fhDeltaPhiDeltaEtaAssocPtBin [bin]->Fill(deltaPhi,deltaEta);
349 fhDeltaPhiAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
351 if(TMath::Abs(deltaEta)> 0.8)
352 fhDeltaPhiAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
354 if(TMath::Abs(deltaEta)< 0.01)
355 fhDeltaPhiAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
358 fhDeltaPhiBradAssocPtBin [bin]->Fill(ptTrig, dphiBrad);
360 if(fDecayTrigger && decay)
361 fhDeltaPhiDecayChargedAssocPtBin[bin]->Fill(ptTrig, deltaPhi);
363 if(fHMPIDCorrelation)
365 if( hmpidSignal > 0 )
367 //printf("Track pt %f with HMPID signal %f \n",pt,hmpidSignal);
368 fhDeltaPhiAssocPtBinHMPID[bin]->Fill(ptTrig, deltaPhi);
371 if(phiAssoc > 5*TMath::DegToRad() && phiAssoc < 20*TMath::DegToRad())
373 //printf("Track pt %f in HMPID acceptance phi %f \n ",pt,phi*TMath::RadToDeg() );
374 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->Fill(ptTrig, deltaPhi);
379 //fill different multiplicity histogram
382 for(Int_t im = 0; im<GetMultiBin(); im++)
384 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
386 fhTrigDeltaPhiCharged[im]->Fill(ptTrig,deltaPhi);
387 fhTrigDeltaEtaCharged[im]->Fill(ptTrig,deltaEta);
393 //____________________________________________________________________________________________________________________________________________________
394 Bool_t AliAnaParticleHadronCorrelation::FillChargedMCCorrelationHistograms(Float_t mcAssocPt, Float_t mcAssocPhi, Float_t mcAssocEta,
395 Float_t mcTrigPt, Float_t mcTrigPhi, Float_t mcTrigEta)
397 // Fill MC histograms independently of AOD or ESD
399 //Select only hadrons in pt range
400 if(mcAssocPt < fMinAssocPt || mcAssocPt > fMaxAssocPt) return kTRUE ; // exclude but continue
402 if(mcAssocPhi < 0) mcAssocPhi+=TMath::TwoPi();
404 //remove trigger itself for correlation when use charged triggers
405 if(TMath::Abs(mcAssocPt -mcTrigPt ) < 1e-6 &&
406 TMath::Abs(mcAssocPhi-mcTrigPhi) < 1e-6 &&
407 TMath::Abs(mcAssocEta-mcTrigEta) < 1e-6) return kTRUE ; // exclude but continue
410 if( fMakeAbsoluteLeading && mcAssocPt > mcTrigPt ) return kFALSE; // jump event
412 //jump out this event if near side associated partile pt larger than trigger
413 if( fMakeNearSideLeading && mcAssocPt > mcTrigPt &&
414 TMath::Abs(mcAssocPhi-mcTrigPhi)<TMath::PiOver2() ) return kFALSE; // jump event
416 Float_t mcdeltaPhi= mcTrigPhi-mcAssocPhi;
417 if(mcdeltaPhi <= -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
418 if(mcdeltaPhi > 3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
420 Float_t mcxE =-mcAssocPt/mcTrigPt*TMath::Cos(mcdeltaPhi);// -(mcAssocPx*pxprim+mcAssocPy*pyprim)/(mcTrigPt*mcTrigPt);
421 Float_t mchbpXE =-100 ;
422 if(mcxE > 0 ) mchbpXE = TMath::Log(1./mcxE);
424 Float_t mczT = mcAssocPt/mcTrigPt ;
425 Float_t mchbpZT =-100 ;
426 if(mczT > 0 ) mchbpZT = TMath::Log(1./mczT);
428 //Selection within angular range
429 if( mcdeltaPhi< -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
430 if( mcdeltaPhi>3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
432 Double_t mcpout = mcAssocPt*TMath::Sin(mcdeltaPhi) ;
435 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",
436 mcAssocPt,mcAssocPhi, mcTrigPhi,fDeltaPhiMinCut, mcdeltaPhi, fDeltaPhiMaxCut, GetMinPt());
439 fhMCEtaCharged ->Fill(mcAssocPt, mcAssocEta);
440 fhMCPhiCharged ->Fill(mcAssocPt, mcAssocPhi);
441 fhMCDeltaEtaCharged->Fill(mcTrigPt, mcTrigEta-mcAssocEta);
442 fhMCDeltaPhiCharged->Fill(mcTrigPt, mcdeltaPhi);
443 fhMCPtAssocDeltaPhi->Fill(mcAssocPt, mcdeltaPhi);
445 fhMCDeltaPhiDeltaEtaCharged->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
447 //delta phi cut for correlation
448 if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
450 fhMCDeltaPhiChargedPt->Fill(mcAssocPt,mcdeltaPhi);
451 fhMCPtXECharged ->Fill(mcTrigPt,mcxE);
452 fhMCPtHbpXECharged ->Fill(mcTrigPt,mchbpXE);
453 fhMCPtZTCharged ->Fill(mcTrigPt,mczT);
454 fhMCPtHbpZTCharged ->Fill(mcTrigPt,mchbpZT);
455 fhMCPtTrigPout ->Fill(mcTrigPt, mcpout) ;
459 if ( (mcdeltaPhi > fUeDeltaPhiMinCut) && (mcdeltaPhi < fUeDeltaPhiMaxCut) )
461 Double_t randomphi = gRandom->Uniform(TMath::Pi()/2,3*TMath::Pi()/2);
462 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
464 if(mcUexE < 0.) mcUexE = -mcUexE;
466 fhMCPtXEUeCharged->Fill(mcTrigPt,mcUexE);
467 if(mcUexE > 0) fhMCPtHbpXEUeCharged->Fill(mcTrigPt,TMath::Log(1/mcUexE));
469 fhMCUePart->Fill(mcTrigPt);
475 //___________________________________________________________________________________________________________________
476 void AliAnaParticleHadronCorrelation::FillChargedMomentumImbalanceHistograms(Float_t ptTrig, Float_t ptAssoc,
477 Float_t xE, Float_t hbpXE,
478 Float_t zT, Float_t hbpZT,
479 Float_t pout, Float_t deltaPhi,
480 Int_t nTracks, Int_t charge,
481 Int_t bin, Bool_t decay,
482 Int_t outTOF, Int_t mcTag)
485 // Fill mostly momentum imbalance related histograms
487 fhXECharged ->Fill(ptTrig , xE);
488 fhPtHbpXECharged ->Fill(ptTrig , hbpXE);
489 fhZTCharged ->Fill(ptTrig , zT);
490 fhPtHbpZTCharged ->Fill(ptTrig , hbpZT);
491 fhPtTrigPout ->Fill(ptTrig , pout) ;
492 fhPtTrigCharged ->Fill(ptTrig , ptAssoc) ;
493 if((deltaPhi > 5*TMath::Pi()/6.) && (deltaPhi < 7*TMath::Pi()/6.)) {
494 fhXECharged_Cone2 ->Fill(ptTrig , xE);
495 fhPtHbpXECharged_Cone2 ->Fill(ptTrig , hbpXE);
499 if(fFillPileUpHistograms)
503 fhXEChargedOtherBC ->Fill(ptTrig,xE);
504 fhZTChargedOtherBC ->Fill(ptTrig,zT);
505 fhPtTrigChargedOtherBC->Fill(ptTrig,ptAssoc);
509 fhXEChargedBC0 ->Fill(ptTrig,xE);
510 fhZTChargedBC0 ->Fill(ptTrig,zT);
511 fhPtTrigChargedBC0->Fill(ptTrig,ptAssoc);
514 Int_t vtxBC = GetReader()->GetVertexBC();
515 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
517 fhXEChargedVtxBC0 ->Fill(ptTrig,xE);
518 fhZTChargedVtxBC0 ->Fill(ptTrig,zT);
519 fhPtTrigChargedVtxBC0->Fill(ptTrig,ptAssoc);
522 if(GetReader()->IsPileUpFromSPD()) { fhXEChargedPileUp[0]->Fill(ptTrig,xE); fhZTChargedPileUp[0]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[0]->Fill(ptTrig,ptAssoc); }
523 if(GetReader()->IsPileUpFromEMCal()) { fhXEChargedPileUp[1]->Fill(ptTrig,xE); fhZTChargedPileUp[1]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[1]->Fill(ptTrig,ptAssoc); }
524 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEChargedPileUp[2]->Fill(ptTrig,xE); fhZTChargedPileUp[2]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[2]->Fill(ptTrig,ptAssoc); }
525 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEChargedPileUp[3]->Fill(ptTrig,xE); fhZTChargedPileUp[3]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[3]->Fill(ptTrig,ptAssoc); }
526 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEChargedPileUp[4]->Fill(ptTrig,xE); fhZTChargedPileUp[4]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[4]->Fill(ptTrig,ptAssoc); }
527 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEChargedPileUp[5]->Fill(ptTrig,xE); fhZTChargedPileUp[5]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[5]->Fill(ptTrig,ptAssoc); }
528 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEChargedPileUp[6]->Fill(ptTrig,xE); fhZTChargedPileUp[6]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[6]->Fill(ptTrig,ptAssoc); }
533 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
534 fhXEChargedMC [mcIndex]->Fill(ptTrig , xE );
537 if(fDecayTrigger && decay)
539 fhXEDecayCharged->Fill(ptTrig,xE);
540 fhZTDecayCharged->Fill(ptTrig,zT);
541 } // photon decay pi0/eta trigger
543 if(bin >= 0 )//away side
545 fhXEAssocPtBin[bin]->Fill(ptTrig, xE) ;
546 fhZTAssocPtBin[bin]->Fill(ptTrig, zT) ;
548 if(fDecayTrigger && decay)
550 fhXEDecayChargedAssocPtBin[bin]->Fill(ptTrig, xE);
551 fhZTDecayChargedAssocPtBin[bin]->Fill(ptTrig, zT);
557 fhXEPosCharged->Fill(ptTrig,xE) ;
558 fhZTPosCharged->Fill(ptTrig,zT) ;
562 fhXENegCharged->Fill(ptTrig,xE) ;
563 fhZTNegCharged->Fill(ptTrig,zT) ;
566 //fill different multiplicity histogram
569 for(Int_t im=0; im<GetMultiBin(); im++)
571 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
573 fhTrigXECorr[im]->Fill(ptTrig,xE);
574 fhTrigZTCorr[im]->Fill(ptTrig,zT);
577 } //multiplicity events selection
580 //_______________________________________________________________________________________________________________________
581 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventHistograms(Float_t ptTrig, Float_t ptAssoc,
582 Float_t deltaPhi, Int_t nTracks, Int_t outTOF)
584 // Fill underlying event histograms
586 fhDeltaPhiUeChargedPt->Fill(ptAssoc,deltaPhi);
588 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
589 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
590 Double_t uezT = ptAssoc/ptTrig;
592 if(uexE < 0.) uexE = -uexE;
594 fhXEUeCharged->Fill(ptTrig,uexE);
595 if(uexE > 0) fhPtHbpXEUeCharged->Fill(ptTrig,TMath::Log(1/uexE));
597 fhZTUeCharged->Fill(ptTrig,uezT);
598 if(uezT > 0) fhPtHbpZTUeCharged->Fill(ptTrig,TMath::Log(1/uezT));
602 if(fFillPileUpHistograms)
606 fhXEUeChargedOtherBC->Fill(ptTrig,uexE);
607 fhZTUeChargedOtherBC->Fill(ptTrig,uezT);
611 fhXEUeChargedBC0->Fill(ptTrig,uexE);
612 fhZTUeChargedBC0->Fill(ptTrig,uezT);
615 Int_t vtxBC = GetReader()->GetVertexBC();
616 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
618 fhXEUeChargedVtxBC0->Fill(ptTrig,uexE);
619 fhZTUeChargedVtxBC0->Fill(ptTrig,uezT);
622 if(GetReader()->IsPileUpFromSPD()) { fhXEUeChargedPileUp[0]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[0]->Fill(ptTrig,uezT);}
623 if(GetReader()->IsPileUpFromEMCal()) { fhXEUeChargedPileUp[1]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[1]->Fill(ptTrig,uezT);}
624 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEUeChargedPileUp[2]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[2]->Fill(ptTrig,uezT);}
625 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEUeChargedPileUp[3]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[3]->Fill(ptTrig,uezT);}
626 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEUeChargedPileUp[4]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[4]->Fill(ptTrig,uezT);}
627 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEUeChargedPileUp[5]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[5]->Fill(ptTrig,uezT);}
628 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEUeChargedPileUp[6]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[6]->Fill(ptTrig,uezT);}
633 for(Int_t im=0; im<GetMultiBin(); im++)
635 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
637 fhTrigXEUeCorr[im]->Fill(ptTrig,uexE); // xE? CHECK
638 fhTrigZTUeCorr[im]->Fill(ptTrig,uezT); // zT? CHECK
641 } //multiplicity events selection
644 //_____________________________________________________________________________________________________
645 void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventSidesHistograms(Float_t ptTrig,
649 // Fill underlying event histograms to the left and right of trigger
650 if((deltaPhi<-fUeDeltaPhiMinCut) || (deltaPhi >2*fUeDeltaPhiMaxCut))
652 fhDeltaPhiUeLeftCharged->Fill(ptAssoc,deltaPhi);
653 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
654 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
655 Double_t uezT = ptAssoc/ptTrig;
657 if(uexE < 0.) uexE = -uexE;
659 fhXEUeLeftCharged->Fill(ptTrig,uexE);
660 if(uexE > 0) fhPtHbpXEUeLeftCharged->Fill(ptTrig,TMath::Log(1/uexE));
662 fhZTUeLeftCharged->Fill(ptTrig,uezT);
663 if(uexE > 0) fhPtHbpZTUeLeftCharged->Fill(ptTrig,TMath::Log(1/uezT));
664 fhDeltaPhiUeLeftCharged->Fill(ptAssoc, deltaPhi);
667 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut))
669 fhDeltaPhiUeRightCharged->Fill(ptAssoc,deltaPhi);
670 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
671 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
672 Double_t uezT = ptAssoc/ptTrig;
674 if(uexE < 0.) uexE = -uexE;
676 fhXEUeRightCharged->Fill(ptTrig,uexE);
677 if(uexE > 0) fhPtHbpXEUeRightCharged->Fill(ptTrig,TMath::Log(1/uexE));
679 fhZTUeRightCharged->Fill(ptTrig,uezT);
680 if(uexE > 0) fhPtHbpZTUeRightCharged->Fill(ptTrig,TMath::Log(1/uezT));
681 fhDeltaPhiUeRightCharged->Fill(ptAssoc, deltaPhi);
684 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-TMath::Pi()/2))
686 fhDeltaPhiUeLeftDownCharged->Fill(ptAssoc,deltaPhi);
687 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
688 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
690 if(uexE < 0.) uexE = -uexE;
692 fhXEUeLeftDownCharged->Fill(ptTrig,uexE);
695 if((deltaPhi>2*fUeDeltaPhiMaxCut) && (deltaPhi <3*TMath::Pi()/2))
697 fhDeltaPhiUeLeftUpCharged->Fill(ptAssoc,deltaPhi);
698 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
699 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
701 if(uexE < 0.) uexE = -uexE;
703 fhXEUeLeftUpCharged->Fill(ptTrig,uexE);
706 if((deltaPhi > TMath::Pi()/2) && (deltaPhi < fUeDeltaPhiMaxCut))
708 fhDeltaPhiUeRightUpCharged->Fill(ptAssoc,deltaPhi);
709 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
710 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
712 if(uexE < 0.) uexE = -uexE;
714 fhXEUeRightUpCharged->Fill(ptTrig,uexE);
717 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < TMath::Pi()/2))
719 fhDeltaPhiUeRightDownCharged->Fill(ptAssoc,deltaPhi);
720 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
721 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
723 if(uexE < 0.) uexE = -uexE;
725 fhXEUeRightDownCharged->Fill(ptTrig,uexE);
729 //______________________________________________________________________________________________________________________________
730 void AliAnaParticleHadronCorrelation::FillDecayPhotonCorrelationHistograms(Float_t ptAssoc, Float_t phiAssoc,
731 TLorentzVector mom1, TLorentzVector mom2,
732 Bool_t bChargedOrNeutral)
734 // Do correlation with decay photons of triggered pi0 or eta
736 // Calculate the correlation parameters
737 Float_t ptDecay1 = mom1.Pt();
738 Float_t ptDecay2 = mom2.Pt();
740 Float_t zTDecay1 = -100, zTDecay2 = -100;
741 if(ptDecay1) zTDecay1 = ptAssoc/ptDecay1 ;
742 if(ptDecay2) zTDecay2 = ptAssoc/ptDecay2 ;
744 Float_t deltaPhiDecay1 = mom1.Phi()-phiAssoc;
745 if(deltaPhiDecay1< -TMath::PiOver2()) deltaPhiDecay1+=TMath::TwoPi();
746 if(deltaPhiDecay1>3*TMath::PiOver2()) deltaPhiDecay1-=TMath::TwoPi();
748 Float_t deltaPhiDecay2 = mom2.Phi()-phiAssoc;
749 if(deltaPhiDecay2< -TMath::PiOver2()) deltaPhiDecay2+=TMath::TwoPi();
750 if(deltaPhiDecay2>3*TMath::PiOver2()) deltaPhiDecay2-=TMath::TwoPi();
752 Float_t xEDecay1 =-zTDecay1*TMath::Cos(deltaPhiDecay1); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
753 Float_t xEDecay2 =-zTDecay2*TMath::Cos(deltaPhiDecay2); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
755 if(bChargedOrNeutral) // correlate with charges
757 fhDeltaPhiDecayCharged->Fill(ptDecay1, deltaPhiDecay1);
758 fhDeltaPhiDecayCharged->Fill(ptDecay2, deltaPhiDecay2);
760 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms( Charged corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
762 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
764 fhZTDecayCharged->Fill(ptDecay1,zTDecay1);
765 fhXEDecayCharged->Fill(ptDecay1,xEDecay1);
767 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
769 fhZTDecayCharged->Fill(ptDecay2,zTDecay2);
770 fhXEDecayCharged->Fill(ptDecay2,xEDecay2);
773 else // correlate with neutrals
775 fhDeltaPhiDecayCharged->Fill(ptDecay1, deltaPhiDecay1);
776 fhDeltaPhiDecayCharged->Fill(ptDecay2, deltaPhiDecay2);
778 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms(Neutral corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
780 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
782 fhZTDecayCharged->Fill(ptDecay1,zTDecay1);
783 fhXEDecayCharged->Fill(ptDecay1,xEDecay1);
785 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
787 fhZTDecayCharged->Fill(ptDecay2,zTDecay2);
788 fhXEDecayCharged->Fill(ptDecay2,xEDecay2);
793 //______________________________________________________________________________________________________________________________________________________
794 void AliAnaParticleHadronCorrelation::FillNeutralAngularCorrelationHistograms(Float_t ptAssoc, Float_t ptTrig,
795 Float_t phiAssoc, Float_t phiTrig, Float_t & deltaPhi,
796 Float_t etaAssoc, Float_t etaTrig)
798 // Fill angular correlation related histograms
800 Float_t deltaEta = etaTrig-etaAssoc;
801 deltaPhi = phiTrig-phiAssoc;
803 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
804 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
806 fhEtaNeutral ->Fill(ptAssoc,etaAssoc);
807 fhPhiNeutral ->Fill(ptAssoc,phiAssoc);
808 fhDeltaEtaNeutral->Fill(ptTrig ,deltaEta);
809 fhDeltaPhiNeutral->Fill(ptTrig ,deltaPhi);
811 if(ptAssoc > 2 ) fhDeltaPhiDeltaEtaNeutral->Fill(deltaPhi, deltaEta);
815 //_____________________________________________________________________________________________________________________________
816 void AliAnaParticleHadronCorrelation::FillNeutralUnderlyingEventSidesHistograms(Float_t ptTrig, Float_t ptAssoc,
817 Float_t xE, Float_t hbpXE,
818 Float_t zT, Float_t hbpZT,
821 // Fill underlying event histograms to the left and right of trigger
823 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-fUeDeltaPhiMaxCut))
825 fhDeltaPhiUeLeftNeutral->Fill(ptAssoc, deltaPhi);
826 fhXEUeLeftNeutral ->Fill(ptTrig , xE);
827 fhPtHbpXEUeLeftNeutral ->Fill(ptTrig , hbpXE);
828 fhZTUeLeftNeutral ->Fill(ptTrig , zT);
829 fhPtHbpZTUeLeftNeutral ->Fill(ptTrig , hbpZT);
832 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut))
834 fhDeltaPhiUeRightNeutral->Fill(ptAssoc, deltaPhi);
835 fhXEUeRightNeutral ->Fill(ptTrig , xE);
836 fhPtHbpXEUeRightNeutral ->Fill(ptTrig , hbpXE);
837 fhZTUeRightNeutral ->Fill(ptTrig , zT);
838 fhPtHbpZTUeRightNeutral ->Fill(ptTrig , hbpZT);
842 //______________________________________________________
843 void AliAnaParticleHadronCorrelation::FillEventMixPool()
845 // Fill the pool with tracks if requested
849 FillChargedEventMixPool();
851 if(OnlyIsolated() || fFillNeutralEventMixPool)
852 FillNeutralEventMixPool();
857 //_____________________________________________________________
858 void AliAnaParticleHadronCorrelation::FillChargedEventMixPool()
860 // Mixed event pool filling for tracks
862 if(fUseMixStoredInReader && GetReader()->GetLastTracksMixedEvent() == GetEventNumber())
864 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
865 return ; // pool filled previously for another trigger
868 Int_t nTracks = GetCTSTracks()->GetEntriesFast();
870 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
871 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
873 if(!inputHandler) return ;
875 // Do mixing only with MB event (or the chosen mask), if not skip
876 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
878 fhNtracksMB->Fill(nTracks);
880 Int_t eventBin = GetEventMixBin();
882 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
883 if(eventBin < 0) return;
885 TObjArray * mixEventTracks = new TObjArray;
887 if(fUseMixStoredInReader)
889 fListMixTrackEvents[eventBin] = GetReader()->GetListWithMixedEventsForTracks(eventBin);
892 if(!fListMixTrackEvents[eventBin]) fListMixTrackEvents[eventBin] = new TList();
894 //printf("%s ***** Pool Event bin : %d - nTracks %d\n",GetInputAODName().Data(),eventBin, GetCTSTracks()->GetEntriesFast());
896 TList * pool = fListMixTrackEvents[eventBin];
899 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
901 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
903 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
904 p3.SetXYZ(mom[0],mom[1],mom[2]);
905 Float_t pt = p3.Pt();
907 //Select only hadrons in pt range
908 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
910 AliAODPWG4Particle * mixedTrack = new AliAODPWG4Particle(mom[0],mom[1],mom[2],0);
911 mixedTrack->SetDetector("CTS");
912 mixedTrack->SetChargedBit(track->Charge()>0);
913 mixEventTracks->Add(mixedTrack);
916 //Set the event number where the last event was added, to avoid double pool filling
917 GetReader()->SetLastTracksMixedEvent(GetEventNumber());
919 //printf("Add event to pool with %d tracks \n ",mixEventTracks->GetEntries());
920 pool->AddFirst(mixEventTracks);
923 //printf("Pool size %d, max %d\n",pool->GetSize(), GetNMaxEvMix());
925 if(pool->GetSize() > GetNMaxEvMix())
927 TClonesArray * tmp = static_cast<TClonesArray*>(pool->Last()) ;
933 //_____________________________________________________________
934 void AliAnaParticleHadronCorrelation::FillNeutralEventMixPool()
936 // Mixed event pool filling for neutral clusters
937 // Right now only for EMCAL and in isolation case
939 //printf("FillNeutralEventMixPool for %s\n",GetInputAODName().Data());
941 TObjArray * pl = GetEMCALClusters();
942 //if (GetAODObjArrayName.Contains("PHOS") )pl = GetPHOSClusters();
943 //else pl = GetEMCALClusters();
945 Int_t nClusters = pl->GetEntriesFast();
947 if(fUseMixStoredInReader && GetReader()->GetLastCaloMixedEvent() == GetEventNumber())
949 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
950 return ; // pool filled previously for another trigger
953 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
954 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
956 if(!inputHandler) return ;
958 // Do mixing only with MB event (or the chosen mask), if not skip
959 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
961 fhNclustersMB->Fill(nClusters);
963 Int_t eventBin = GetEventMixBin();
965 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
966 if(eventBin < 0) return;
968 TObjArray * mixEventCalo = new TObjArray;
970 if(fUseMixStoredInReader)
972 fListMixCaloEvents[eventBin] = GetReader()->GetListWithMixedEventsForCalo(eventBin);
975 if(!fListMixCaloEvents[eventBin]) fListMixCaloEvents[eventBin] = new TList();
977 TList * poolCalo = fListMixCaloEvents[eventBin];
981 for(Int_t ipr = 0;ipr < nClusters ; ipr ++ )
983 AliVCluster * calo = (AliVCluster *) (pl->At(ipr)) ;
985 // remove matched clusters
986 if( IsTrackMatched( calo, GetReader()->GetInputEvent() ) ) continue ;
988 //Cluster momentum calculation
989 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
991 calo->GetMomentum(mom,GetVertex(0)) ;
992 }//Assume that come from vertex in straight line
995 Double_t vertex[]={0,0,0};
996 calo->GetMomentum(mom,vertex) ;
999 Float_t pt = mom.Pt();
1000 //Select only clusters in pt range
1001 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
1003 AliAODPWG4Particle * mixedCalo = new AliAODPWG4Particle(mom);
1004 mixedCalo->SetDetector("EMCAL");
1005 mixEventCalo->Add(mixedCalo);
1008 //Set the event number where the last event was added, to avoid double pool filling
1009 GetReader()->SetLastCaloMixedEvent(GetEventNumber());
1011 //printf("Add event to pool with %d clusters \n ",mixEventCalo->GetEntries());
1012 poolCalo->AddFirst(mixEventCalo);
1015 //printf("Pool size %d, max %d\n",poolCalo->GetSize(), GetNMaxEvMix());
1017 if(poolCalo->GetSize() > GetNMaxEvMix())
1018 {//Remove last event
1019 TClonesArray * tmp = static_cast<TClonesArray*>(poolCalo->Last()) ;
1020 poolCalo->RemoveLast() ;
1025 //____________________________________________________________
1026 TObjString* AliAnaParticleHadronCorrelation::GetAnalysisCuts()
1028 //Save parameters used for analysis
1029 TString parList ; //this will be list of parameters used for this analysis.
1030 const Int_t buffersize = 560;
1031 char onePar[buffersize] ;
1033 snprintf(onePar,buffersize,"--- AliAnaPaticleHadronCorrelation ---\n") ;
1035 snprintf(onePar,buffersize," Pt Trigger > %3.2f ", fMinTriggerPt) ;
1037 snprintf(onePar,buffersize," %3.2f < Pt associated < %3.2f ", fMinAssocPt, fMaxAssocPt) ;
1039 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-Hadron < %3.2f ", fDeltaPhiMinCut, fDeltaPhiMaxCut) ;
1041 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-UeHadron < %3.2f ", fUeDeltaPhiMinCut, fUeDeltaPhiMaxCut) ;
1043 snprintf(onePar,buffersize,"Isolated Trigger? %d\n", fSelectIsolated) ;
1045 snprintf(onePar,buffersize,"Several UE? %d\n", fMakeSeveralUE) ;
1047 snprintf(onePar,buffersize,"Name of AOD Pi0 Branch %s ", fPi0AODBranchName.Data());
1049 snprintf(onePar,buffersize,"Do Decay-hadron correlation ? pi0 %d, decay %d", fPi0Trigger, fDecayTrigger) ;
1051 snprintf(onePar,buffersize,"Select absolute leading for cluster triggers ? %d or Near Side Leading %d \n",
1052 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
1054 snprintf(onePar,buffersize,"Associated particle pt bins %d: ", fNAssocPtBins) ;
1056 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
1057 snprintf(onePar,buffersize,"bin %d = [%2.1f,%2.1f];", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
1061 //Get parameters set in base class.
1062 parList += GetBaseParametersList() ;
1064 //Get parameters set in FiducialCut class (not available yet)
1065 //parlist += GetFidCut()->GetFidCutParametersList()
1067 return new TObjString(parList) ;
1071 //________________________________________________________________
1072 TList * AliAnaParticleHadronCorrelation::GetCreateOutputObjects()
1075 // Create histograms to be saved in output file and
1076 // store them in fOutputContainer
1078 TList * outputContainer = new TList() ;
1079 outputContainer->SetName("CorrelationHistos") ;
1081 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();
1082 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();
1083 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();
1085 Int_t nMixBins = GetNCentrBin()*GetNZvertBin()*GetNRPBin();
1087 TString nameMC[] = {"Photon","Pi0","Pi0Decay","EtaDecay","OtherDecay","Electron","Hadron"};
1088 TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
1090 // For vz dependent histograms, if option ON
1092 if(fCorrelVzBin) nz = GetNZvertBin();
1096 fhPtInput = new TH1F("hPtInput","#it{p}_{T} distribution of input trigger particles", nptbins,ptmin,ptmax);
1097 fhPtInput->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1098 outputContainer->Add(fhPtInput);
1100 fhPtFidCut = new TH1F("hPtFidCut","#it{p}_{T} distribution of input trigger particles after fiducial cut", nptbins,ptmin,ptmax);
1101 fhPtFidCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1102 outputContainer->Add(fhPtFidCut);
1104 fhPtLeading = new TH1F("hPtLeading","#it{p}_{T} distribution of leading particles", nptbins,ptmin,ptmax);
1105 fhPtLeading->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1106 outputContainer->Add(fhPtLeading);
1110 for(Int_t i=0; i < 7; i++)
1112 fhPtLeadingMC[i] = new TH1F(Form("hPtLeading_MC%s",nameMC[i].Data()),
1113 Form("#it{p}_{T} distribution of leading particles, trigger origin is %s",nameMC[i].Data()),
1114 nptbins,ptmin,ptmax);
1115 fhPtLeadingMC[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1116 outputContainer->Add(fhPtLeadingMC[i]);
1122 fhPtLeadingVzBin = new TH2F("hPtLeadingVzBin","#it{p}_{T} distribution of leading particles vs vz bin", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
1123 fhPtLeadingVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1124 fhPtLeadingVzBin->SetYTitle("#it{v}_{#it{z}} bin");
1125 outputContainer->Add(fhPtLeadingVzBin);
1128 fhPtLeadingBin = new TH2F ("hPtLeadingBin","#it{p}_{T} distribution of leading particles", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
1129 fhPtLeadingBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1130 fhPtLeadingBin->SetYTitle("Bin");
1131 outputContainer->Add(fhPtLeadingBin);
1133 fhPhiLeading = new TH2F ("hPhiLeading","#phi distribution of leading Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
1134 fhPhiLeading->SetYTitle("#phi (rad)");
1135 outputContainer->Add(fhPhiLeading);
1137 fhEtaLeading = new TH2F ("hEtaLeading","#eta distribution of leading",nptbins,ptmin,ptmax, netabins,etamin,etamax);
1138 fhEtaLeading->SetYTitle("#eta ");
1139 outputContainer->Add(fhEtaLeading);
1141 fhPtLeadingCentrality = new TH2F("hPtLeadingCentrality","Leading particle #it{p}_{T} vs centrality",nptbins,ptmin,ptmax,100,0.,100) ;
1142 fhPtLeadingCentrality->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1143 fhPtLeadingCentrality->SetYTitle("Centrality (%)");
1144 outputContainer->Add(fhPtLeadingCentrality) ;
1146 fhPtLeadingEventPlane = new TH2F("hPtLeadingEventPlane","Leading particle #it{p}_{T} vs event plane angle",nptbins,ptmin,ptmax, 100,0.,TMath::Pi()) ;
1147 fhPtLeadingEventPlane->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1148 fhPtLeadingEventPlane->SetXTitle("EP angle (rad)");
1149 outputContainer->Add(fhPtLeadingEventPlane) ;
1151 fhLeadingEventPlaneCentrality = new TH2F("hLeadingEventPlane","Leading particle centrality vs event plane angle",100,0.,100,100,0.,TMath::Pi()) ;
1152 fhLeadingEventPlaneCentrality->SetXTitle("Centrality (%)");
1153 fhLeadingEventPlaneCentrality->SetYTitle("EP angle (rad)");
1154 outputContainer->Add(fhLeadingEventPlaneCentrality) ;
1156 //Correlation with charged hadrons
1157 if(GetReader()->IsCTSSwitchedOn())
1159 fhDeltaPhiDeltaEtaCharged = new TH2F
1160 ("hDeltaPhiDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}}",
1161 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1162 fhDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
1163 fhDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
1165 fhDeltaPhiDeltaEtaChargedPtA3GeV = new TH2F
1166 ("hDeltaPhiDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}, #it{p}_{TA}>3 GeV/#it{c}}",
1167 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1168 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetXTitle("#Delta #phi (rad)");
1169 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1171 fhPhiCharged = new TH2F
1172 ("hPhiCharged","#phi_{h^{#pm}} vs #it{p}_{T #pm}",
1173 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1174 fhPhiCharged->SetYTitle("#phi_{h^{#pm}} (rad)");
1175 fhPhiCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
1177 fhEtaCharged = new TH2F
1178 ("hEtaCharged","#eta_{h^{#pm}} vs #it{p}_{T #pm}",
1179 nptbins,ptmin,ptmax,netabins,etamin,etamax);
1180 fhEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
1181 fhEtaCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
1183 fhDeltaPhiCharged = new TH2F
1184 ("hDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
1185 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1186 fhDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
1187 fhDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1189 fhDeltaPhiChargedPtA3GeV = new TH2F
1190 ("hDeltaPhiChargedPtA3GeV","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}",
1191 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1192 fhDeltaPhiChargedPtA3GeV->SetYTitle("#Delta #phi (rad)");
1193 fhDeltaPhiChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1196 fhDeltaPhiChargedPt = new TH2F
1197 ("hDeltaPhiChargedPt","#phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}",
1198 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1199 fhDeltaPhiChargedPt->SetYTitle("#Delta #phi (rad)");
1200 fhDeltaPhiChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1202 fhDeltaPhiUeChargedPt = new TH2F
1203 ("hDeltaPhiUeChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}}",
1204 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1205 fhDeltaPhiUeChargedPt->SetYTitle("#Delta #phi (rad)");
1206 fhDeltaPhiUeChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1208 fhUePart = new TH1F("hUePart","UE particles distribution vs pt trig",
1209 nptbins,ptmin,ptmax);
1210 fhUePart->SetYTitle("dNch");
1211 fhUePart->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1214 fhDeltaEtaCharged = new TH2F
1215 ("hDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}",
1216 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1217 fhDeltaEtaCharged->SetYTitle("#Delta #eta");
1218 fhDeltaEtaCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1220 fhDeltaEtaChargedPtA3GeV = new TH2F
1221 ("hDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}",
1222 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1223 fhDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1224 fhDeltaEtaChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1227 new TH2F("hXECharged","#it{x}_{#it{E}} for charged tracks",
1228 nptbins,ptmin,ptmax,200,0.,2.);
1229 fhXECharged->SetYTitle("#it{x}_{#it{E}}");
1230 fhXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1233 new TH2F("hXECharged_Cone2","#it{x}_{#it{E}} for charged tracks in cone 2 (5#pi/6-7#pi/6)",
1234 nptbins,ptmin,ptmax,200,0.,2.);
1235 fhXECharged_Cone2->SetYTitle("#it{x}_{#it{E}}");
1236 fhXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1239 new TH2F("hXEUeCharged","#it{x}_{#it{E}} for Underlying Event",
1240 nptbins,ptmin,ptmax,200,0.,2.);
1241 fhXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
1242 fhXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1245 new TH2F("hXEPositiveCharged","#it{x}_{#it{E}} for positive charged tracks",
1246 nptbins,ptmin,ptmax,200,0.,2.);
1247 fhXEPosCharged->SetYTitle("#it{x}_{#it{E}}");
1248 fhXEPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1251 new TH2F("hXENegativeCharged","#it{x}_{#it{E}} for negative charged tracks",
1252 nptbins,ptmin,ptmax,200,0.,2.);
1253 fhXENegCharged->SetYTitle("#it{x}_{#it{E}}");
1254 fhXENegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1257 new TH2F("hHbpXECharged","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
1258 nptbins,ptmin,ptmax,200,0.,10.);
1259 fhPtHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1260 fhPtHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1262 fhPtHbpXECharged_Cone2 =
1263 new TH2F("hHbpXECharged_Cone2","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons in cone 2 (5#pi/6-7#pi/6)",
1264 nptbins,ptmin,ptmax,200,0.,10.);
1265 fhPtHbpXECharged_Cone2->SetYTitle("ln(1/#it{x}_{#it{E}})");
1266 fhPtHbpXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1268 fhPtHbpXEUeCharged =
1269 new TH2F("hHbpXEUeCharged","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons,Underlying Event",
1270 nptbins,ptmin,ptmax,200,0.,10.);
1271 fhPtHbpXEUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1272 fhPtHbpXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1275 new TH2F("hZTCharged","#it{z}_{T} for charged tracks",
1276 nptbins,ptmin,ptmax,200,0.,2.);
1277 fhZTCharged->SetYTitle("#it{z}_{T}");
1278 fhZTCharged->SetXTitle("#it{p}_{T trigger}");
1281 new TH2F("hZTUeCharged","#it{z}_{T} for Underlying Event",
1282 nptbins,ptmin,ptmax,200,0.,2.);
1283 fhZTUeCharged->SetYTitle("#it{z}_{T}");
1284 fhZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1287 new TH2F("hZTPositiveCharged","#it{z}_{T} for positive charged tracks",
1288 nptbins,ptmin,ptmax,200,0.,2.);
1289 fhZTPosCharged->SetYTitle("#it{z}_{T}");
1290 fhZTPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1293 new TH2F("hZTNegativeCharged","#it{z}_{T} for negative charged tracks",
1294 nptbins,ptmin,ptmax,200,0.,2.);
1295 fhZTNegCharged->SetYTitle("#it{z}_{T}");
1296 fhZTNegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1299 new TH2F("hHbpZTCharged","#xi = ln(1/#it{z}_{T}) with charged hadrons",
1300 nptbins,ptmin,ptmax,200,0.,10.);
1301 fhPtHbpZTCharged->SetYTitle("ln(1/#it{z}_{T})");
1302 fhPtHbpZTCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1304 fhPtHbpZTUeCharged =
1305 new TH2F("hHbpZTUeCharged","#xi = ln(1/#it{z}_{T}) with charged hadrons,Underlying Event",
1306 nptbins,ptmin,ptmax,200,0.,10.);
1307 fhPtHbpZTUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1308 fhPtHbpZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1311 new TH2F("hPtTrigPout","Pout with triggers",
1312 nptbins,ptmin,ptmax,2*nptbins,-ptmax,ptmax);
1313 fhPtTrigPout->SetYTitle("#it{p}_{out} (GeV/#it{c})");
1314 fhPtTrigPout->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1317 new TH2F("hPtTrigCharged","trigger and charged tracks pt distribution",
1318 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1319 fhPtTrigCharged->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1320 fhPtTrigCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1322 outputContainer->Add(fhDeltaPhiDeltaEtaCharged);
1323 outputContainer->Add(fhDeltaPhiDeltaEtaChargedPtA3GeV);
1324 outputContainer->Add(fhPhiCharged) ;
1325 outputContainer->Add(fhEtaCharged) ;
1326 outputContainer->Add(fhDeltaPhiCharged) ;
1327 outputContainer->Add(fhDeltaPhiChargedPtA3GeV) ;
1328 outputContainer->Add(fhDeltaEtaCharged) ;
1329 outputContainer->Add(fhDeltaEtaChargedPtA3GeV) ;
1330 outputContainer->Add(fhDeltaPhiChargedPt) ;
1331 outputContainer->Add(fhDeltaPhiUeChargedPt) ;
1332 outputContainer->Add(fhUePart);
1334 outputContainer->Add(fhXECharged) ;
1335 outputContainer->Add(fhXECharged_Cone2) ;
1338 for(Int_t i=0; i < 7; i++)
1341 fhDeltaPhiChargedMC[i] = new TH2F(Form("hDeltaPhiCharged_MC%s",nameMC[i].Data()),
1342 Form("#Delta #phi for charged tracks, trigger origin is %s",nameMC[i].Data()),
1343 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
1344 fhDeltaPhiChargedMC[i]->SetYTitle("#it{x}_{#it{E}}");
1345 fhDeltaPhiChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1346 outputContainer->Add(fhDeltaPhiChargedMC[i]) ;
1348 fhXEChargedMC[i] = new TH2F(Form("hXECharged_MC%s",nameMC[i].Data()),
1349 Form("#it{x}_{#it{E}} for charged tracks, trigger origin is %s",nameMC[i].Data()),
1350 nptbins,ptmin,ptmax,200,0.,2.);
1351 fhXEChargedMC[i]->SetYTitle("#it{x}_{#it{E}}");
1352 fhXEChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1353 outputContainer->Add(fhXEChargedMC[i]) ;
1357 outputContainer->Add(fhXEPosCharged) ;
1358 outputContainer->Add(fhXENegCharged) ;
1359 outputContainer->Add(fhXEUeCharged) ;
1360 outputContainer->Add(fhPtHbpXECharged) ;
1361 outputContainer->Add(fhPtHbpXECharged_Cone2) ;
1362 outputContainer->Add(fhPtHbpXEUeCharged) ;
1364 outputContainer->Add(fhZTCharged) ;
1365 outputContainer->Add(fhZTPosCharged) ;
1366 outputContainer->Add(fhZTNegCharged) ;
1367 outputContainer->Add(fhZTUeCharged) ;
1368 outputContainer->Add(fhPtHbpZTCharged) ;
1369 outputContainer->Add(fhPtHbpZTUeCharged) ;
1371 outputContainer->Add(fhPtTrigPout) ;
1372 outputContainer->Add(fhPtTrigCharged) ;
1374 if(fFillPileUpHistograms)
1376 fhDeltaPhiChargedOtherBC = new TH2F
1377 ("hDeltaPhiChargedOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC!=0",
1378 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1379 fhDeltaPhiChargedOtherBC->SetYTitle("#Delta #phi (rad)");
1380 fhDeltaPhiChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1382 fhDeltaPhiChargedPtA3GeVOtherBC = new TH2F
1383 ("hDeltaPhiChargedPtA3GeVOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC!=0",
1384 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1385 fhDeltaPhiChargedPtA3GeVOtherBC->SetYTitle("#Delta #phi (rad)");
1386 fhDeltaPhiChargedPtA3GeVOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1388 fhPtTrigChargedOtherBC =
1389 new TH2F("hPtTrigChargedOtherBC","trigger and charged tracks pt distribution, track BC!=0",
1390 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1391 fhPtTrigChargedOtherBC->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1392 fhPtTrigChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1394 fhXEChargedOtherBC =
1395 new TH2F("hXEChargedOtherBC","#it{x}_{#it{E}} for charged tracks, track BC!=0",
1396 nptbins,ptmin,ptmax,200,0.,2.);
1397 fhXEChargedOtherBC->SetYTitle("#it{x}_{#it{E}}");
1398 fhXEChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1400 fhXEUeChargedOtherBC =
1401 new TH2F("hXEUeChargedOtherBC","#it{x}_{#it{E}} for Underlying Event, track BC!=0",
1402 nptbins,ptmin,ptmax,200,0.,2.);
1403 fhXEUeChargedOtherBC->SetYTitle("#it{x}_{#it{E}}");
1404 fhXEUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1406 fhZTChargedOtherBC =
1407 new TH2F("hZTChargedOtherBC","#it{z}_{T} for charged tracks, track BC!=0",
1408 nptbins,ptmin,ptmax,200,0.,2.);
1409 fhZTChargedOtherBC->SetYTitle("#it{z}_{T}");
1410 fhZTChargedOtherBC->SetXTitle("#it{p}_{T trigger}");
1412 fhZTUeChargedOtherBC =
1413 new TH2F("hZTUeChargedOtherBC","#it{z}_{T} for Underlying Event, track BC!=0",
1414 nptbins,ptmin,ptmax,200,0.,2.);
1415 fhZTUeChargedOtherBC->SetYTitle("#it{z}_{T}");
1416 fhZTUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1418 outputContainer->Add(fhDeltaPhiChargedOtherBC) ;
1419 outputContainer->Add(fhDeltaPhiChargedPtA3GeVOtherBC) ;
1420 outputContainer->Add(fhXEChargedOtherBC) ;
1421 outputContainer->Add(fhXEUeChargedOtherBC) ;
1422 outputContainer->Add(fhZTChargedOtherBC) ;
1423 outputContainer->Add(fhZTUeChargedOtherBC) ;
1424 outputContainer->Add(fhPtTrigChargedOtherBC) ;
1426 fhDeltaPhiChargedBC0 = new TH2F
1427 ("hDeltaPhiChargedBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0",
1428 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1429 fhDeltaPhiChargedBC0->SetYTitle("#Delta #phi (rad)");
1430 fhDeltaPhiChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1432 fhDeltaPhiChargedPtA3GeVBC0 = new TH2F
1433 ("hDeltaPhiChargedPtA3GeVBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0",
1434 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1435 fhDeltaPhiChargedPtA3GeVBC0->SetYTitle("#Delta #phi (rad)");
1436 fhDeltaPhiChargedPtA3GeVBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1438 fhPtTrigChargedBC0 =
1439 new TH2F("hPtTrigChargedBC0","trigger and charged tracks pt distribution, track BC==0",
1440 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1441 fhPtTrigChargedBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1442 fhPtTrigChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1445 new TH2F("hXEChargedBC0","#it{x}_{#it{E}} for charged tracks, track BC==0",
1446 nptbins,ptmin,ptmax,200,0.,2.);
1447 fhXEChargedBC0->SetYTitle("#it{x}_{#it{E}}");
1448 fhXEChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1451 new TH2F("hXEUeChargedBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0",
1452 nptbins,ptmin,ptmax,200,0.,2.);
1453 fhXEUeChargedBC0->SetYTitle("#it{x}_{#it{E}}");
1454 fhXEUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1457 new TH2F("hZTChargedBC0","#it{z}_{T} for charged tracks, track BC==0",
1458 nptbins,ptmin,ptmax,200,0.,2.);
1459 fhZTChargedBC0->SetYTitle("#it{z}_{T}");
1460 fhZTChargedBC0->SetXTitle("#it{p}_{T trigger}");
1463 new TH2F("hZTUeChargedBC0","#it{z}_{T} for Underlying Event, track BC==0",
1464 nptbins,ptmin,ptmax,200,0.,2.);
1465 fhZTUeChargedBC0->SetYTitle("#it{z}_{T}");
1466 fhZTUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1468 outputContainer->Add(fhDeltaPhiChargedBC0) ;
1469 outputContainer->Add(fhDeltaPhiChargedPtA3GeVBC0) ;
1470 outputContainer->Add(fhXEChargedBC0) ;
1471 outputContainer->Add(fhXEUeChargedBC0) ;
1472 outputContainer->Add(fhZTChargedBC0) ;
1473 outputContainer->Add(fhZTUeChargedBC0) ;
1474 outputContainer->Add(fhPtTrigChargedBC0) ;
1476 fhPtLeadingVtxBC0 = new TH1F("hPtLeadingVtxBC0","#it{p}_{T} distribution of leading particles", nptbins,ptmin,ptmax);
1477 fhPtLeadingVtxBC0->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1479 fhDeltaPhiChargedVtxBC0 = new TH2F
1480 ("hDeltaPhiChargedVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0",
1481 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1482 fhDeltaPhiChargedVtxBC0->SetYTitle("#Delta #phi (rad)");
1483 fhDeltaPhiChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1485 fhDeltaPhiChargedPtA3GeVVtxBC0 = new TH2F
1486 ("hDeltaPhiChargedPtA3GeVVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0",
1487 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1488 fhDeltaPhiChargedPtA3GeVVtxBC0->SetYTitle("#Delta #phi (rad)");
1489 fhDeltaPhiChargedPtA3GeVVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1491 fhPtTrigChargedVtxBC0 =
1492 new TH2F("hPtTrigChargedVtxBC0","trigger and charged tracks pt distribution, track BC==0",
1493 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1494 fhPtTrigChargedVtxBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1495 fhPtTrigChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1498 new TH2F("hXEChargedVtxBC0","#it{x}_{#it{E}} for charged tracks, track BC==0",
1499 nptbins,ptmin,ptmax,200,0.,2.);
1500 fhXEChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}");
1501 fhXEChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1503 fhXEUeChargedVtxBC0 =
1504 new TH2F("hXEUeChargedVtxBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0",
1505 nptbins,ptmin,ptmax,200,0.,2.);
1506 fhXEUeChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}");
1507 fhXEUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1510 new TH2F("hZTChargedVtxBC0","#it{z}_{T} for charged tracks, track BC==0",
1511 nptbins,ptmin,ptmax,200,0.,2.);
1512 fhZTChargedVtxBC0->SetYTitle("#it{z}_{T}");
1513 fhZTChargedVtxBC0->SetXTitle("#it{p}_{T trigger}");
1515 fhZTUeChargedVtxBC0 =
1516 new TH2F("hZTUeChargedVtxBC0","#it{z}_{T} for Underlying Event, track BC==0",
1517 nptbins,ptmin,ptmax,200,0.,2.);
1518 fhZTUeChargedVtxBC0->SetYTitle("#it{z}_{T}");
1519 fhZTUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1521 outputContainer->Add(fhPtLeadingVtxBC0);
1522 outputContainer->Add(fhDeltaPhiChargedVtxBC0) ;
1523 outputContainer->Add(fhDeltaPhiChargedPtA3GeVVtxBC0) ;
1524 outputContainer->Add(fhXEChargedVtxBC0) ;
1525 outputContainer->Add(fhXEUeChargedVtxBC0) ;
1526 outputContainer->Add(fhZTChargedVtxBC0) ;
1527 outputContainer->Add(fhZTUeChargedVtxBC0) ;
1528 outputContainer->Add(fhPtTrigChargedVtxBC0) ;
1530 for(Int_t i = 0 ; i < 7 ; i++)
1532 fhPtLeadingPileUp[i] = new TH1F(Form("hPtLeadingPileUp%s",pileUpName[i].Data()),
1533 Form("#it{p}_{T} distribution of leading particles, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
1534 fhPtLeadingPileUp[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1535 outputContainer->Add(fhPtLeadingPileUp[i]);
1537 fhDeltaPhiChargedPileUp[i] = new TH2F(Form("hDeltaPhiChargedPileUp%s",pileUpName[i].Data()),
1538 Form("#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1539 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1540 fhDeltaPhiChargedPileUp[i]->SetYTitle("#Delta #phi (rad)");
1541 fhDeltaPhiChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1542 outputContainer->Add(fhDeltaPhiChargedPileUp[i]) ;
1544 fhDeltaPhiChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaPhiChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1545 Form("#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, %s Pile-Up event",pileUpName[i].Data()),
1546 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1547 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #phi (rad)");
1548 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1549 outputContainer->Add(fhDeltaPhiChargedPtA3GeVPileUp[i]) ;
1551 fhDeltaEtaChargedPileUp[i] = new TH2F(Form("hDeltaEtaChargedPileUp%s",pileUpName[i].Data()),
1552 Form("#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1553 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1554 fhDeltaEtaChargedPileUp[i]->SetYTitle("#Delta #eta");
1555 fhDeltaEtaChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1556 outputContainer->Add(fhDeltaEtaChargedPileUp[i]) ;
1558 fhDeltaEtaChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaEtaChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1559 Form("#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, %s Pile-Up event",pileUpName[i].Data()),
1560 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1561 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #eta");
1562 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1563 outputContainer->Add(fhDeltaEtaChargedPtA3GeVPileUp[i]) ;
1565 fhXEChargedPileUp[i] = new TH2F(Form("hXEChargedPileUp%s",pileUpName[i].Data()),
1566 Form("#it{x}_{#it{E}} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1567 nptbins,ptmin,ptmax,200,0.,2.);
1568 fhXEChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}");
1569 fhXEChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1570 outputContainer->Add(fhXEChargedPileUp[i]) ;
1572 fhXEUeChargedPileUp[i] = new TH2F(Form("hXEUeChargedPileUp%s",pileUpName[i].Data()),
1573 Form("#it{x}_{#it{E}} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1574 nptbins,ptmin,ptmax,200,0.,2.);
1575 fhXEUeChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}");
1576 fhXEUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1577 outputContainer->Add(fhXEUeChargedPileUp[i]) ;
1579 fhZTChargedPileUp[i] = new TH2F(Form("hZTChargedPileUp%s",pileUpName[i].Data()),
1580 Form("#it{z}_{T} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
1581 nptbins,ptmin,ptmax,200,0.,2.);
1582 fhZTChargedPileUp[i]->SetYTitle("#it{z}_{T}");
1583 fhZTChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1584 outputContainer->Add(fhZTChargedPileUp[i]) ;
1586 fhZTUeChargedPileUp[i] = new TH2F(Form("hZTUeChargedPileUp%s",pileUpName[i].Data()),
1587 Form("#it{z}_{T} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
1588 nptbins,ptmin,ptmax,200,0.,2.);
1589 fhZTUeChargedPileUp[i]->SetYTitle("#it{z}_{T}");
1590 fhZTUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1591 outputContainer->Add(fhZTUeChargedPileUp[i]) ;
1593 fhPtTrigChargedPileUp[i] = new TH2F(Form("hPtTrigChargedPileUp%s",pileUpName[i].Data()),
1594 Form("trigger and charged tracks pt distribution, %s Pile-Up event",pileUpName[i].Data()),
1595 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1596 fhPtTrigChargedPileUp[i]->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1597 fhPtTrigChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1598 outputContainer->Add(fhPtTrigChargedPileUp[i]) ;
1605 Int_t nMultiBins = GetMultiBin();
1606 fhTrigDeltaPhiCharged = new TH2F*[nMultiBins] ;
1607 fhTrigDeltaEtaCharged = new TH2F*[nMultiBins] ;
1608 fhTrigXECorr = new TH2F*[nMultiBins] ;
1609 fhTrigXEUeCorr = new TH2F*[nMultiBins] ;
1610 fhTrigZTCorr = new TH2F*[nMultiBins] ;
1611 fhTrigZTUeCorr = new TH2F*[nMultiBins] ;
1613 for(Int_t im=0; im<nMultiBins; im++)
1615 fhTrigDeltaPhiCharged[im] = new TH2F
1616 (Form("hTrigDeltaPhiCharged_%d",im),Form("hTrigDeltaPhiCharged_%d",im), nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1617 fhTrigDeltaPhiCharged[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1618 fhTrigDeltaPhiCharged[im]->SetYTitle("#Delta #phi (rad)");
1620 fhTrigDeltaEtaCharged[im] = new TH2F
1621 (Form("hTrigDeltaEtaCharged_%d",im),Form("hTrigDeltaEtaCharged_%d",im), nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
1622 fhTrigDeltaEtaCharged[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1623 fhTrigDeltaEtaCharged[im]->SetYTitle("#Delta #eta");
1625 fhTrigXECorr[im] = new TH2F
1626 (Form("hTrigXEPtCorr_%d",im),Form("hTrigXEPtCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
1627 fhTrigXECorr[im]->SetYTitle("#it{x}_{#it{E} trigger h^{#pm}}");
1628 fhTrigXECorr[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1630 fhTrigXEUeCorr[im] = new TH2F
1631 (Form("hTrigXEPtUeCorr_%d",im),Form("hTrigXEPtUeCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
1632 fhTrigXEUeCorr[im]->SetYTitle("#it{x}_{#it{E} trigger h^{#pm}}");
1633 fhTrigXEUeCorr[im]->SetXTitle("#it{p}_{T trigger}(GeV/#it{c})");
1635 fhTrigZTCorr[im] = new TH2F
1636 (Form("hTrigZTPtCorr_%d",im),Form("hTrigZTPtCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
1637 fhTrigZTCorr[im]->SetYTitle("#it{z}_{trigger h^{#pm}}");
1638 fhTrigZTCorr[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1640 fhTrigZTUeCorr[im] = new TH2F
1641 (Form("hTrigZTPtUeCorr_%d",im),Form("hTrigZTPtUeCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
1642 fhTrigZTUeCorr[im]->SetYTitle("#it{z}_{trigger h^{#pm}}");
1643 fhTrigZTUeCorr[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1645 outputContainer->Add(fhTrigDeltaPhiCharged[im]) ;
1646 outputContainer->Add(fhTrigDeltaEtaCharged[im]) ;
1647 outputContainer->Add(fhTrigXECorr[im]);
1648 outputContainer->Add(fhTrigXEUeCorr[im]);
1649 outputContainer->Add(fhTrigZTCorr[im]);
1650 outputContainer->Add(fhTrigZTUeCorr[im]);
1656 fhAssocPtBkg = new TH2F("hAssocPtBkg", " Trigger #it{p}_{T} vs associated hadron #it{p}_{T} from background",
1657 nptbins, ptmin, ptmax,nptbins,ptmin,ptmax);
1658 fhAssocPtBkg->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1659 fhAssocPtBkg->SetYTitle("#it{p}_{T associated} (GeV/#it{c})");
1660 outputContainer->Add(fhAssocPtBkg) ;
1662 fhDeltaPhiBrad = new TH2F("hDeltaPhiBrad","atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs #it{p}_{T trigger} ",
1663 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
1664 fhDeltaPhiBrad->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1665 fhDeltaPhiBrad->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
1666 outputContainer->Add(fhDeltaPhiBrad) ;
1669 fhDeltaPhiDeltaEtaAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1670 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1671 fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
1672 fhDeltaPhiAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
1673 fhXEAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1674 fhZTAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1677 fhDeltaPhiBradAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1679 if(fPi0Trigger || fDecayTrigger)
1681 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1682 fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
1683 fhXEAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1684 fhZTAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1685 fhXEDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1686 fhZTDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1687 fhDeltaPhiDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
1690 if(fHMPIDCorrelation)
1692 fhDeltaPhiAssocPtBinHMPID = new TH2F*[fNAssocPtBins*nz];
1693 fhDeltaPhiAssocPtBinHMPIDAcc= new TH2F*[fNAssocPtBins*nz];
1696 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
1698 for(Int_t z = 0 ; z < nz ; z++)
1704 sz = Form("_vz%d",z);
1705 tz = Form(", #it{v}_{#it{z}} bin %d",z);
1708 //printf("iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
1710 fhDeltaPhiDeltaEtaAssocPtBin[bin] = new TH2F(Form("hDeltaPhiDeltaEtaPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1711 Form("#Delta #phi vs #Delta #eta for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1712 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1713 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
1714 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetYTitle("#Delta #eta");
1716 fhDeltaPhiAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1717 Form("#Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1718 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1719 fhDeltaPhiAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1720 fhDeltaPhiAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
1722 fhDeltaPhiAssocPtBinDEta08[bin] = new TH2F(Form("hDeltaPhiDeltaEta0.8PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1723 Form("#Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, for #Delta #eta > 0.8", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1724 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1725 fhDeltaPhiAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1726 fhDeltaPhiAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
1728 fhDeltaPhiAssocPtBinDEta0[bin] = new TH2F(Form("hDeltaPhiDeltaEta0PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1729 Form("#Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, for #Delta #eta = 0.", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1730 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1731 fhDeltaPhiAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1732 fhDeltaPhiAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
1734 fhXEAssocPtBin[bin] = new TH2F(Form("hXEAssocPtBin%1.f_%1.f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1735 Form("#it{x}_{#it{E}} vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1736 nptbins, ptmin, ptmax,200, 0.0, 2.0);
1737 fhXEAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1738 fhXEAssocPtBin[bin]->SetYTitle("#it{x}_{#it{E}}");
1740 fhZTAssocPtBin[bin] = new TH2F(Form("hZTAssocPtBin%1.f_%1.f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1741 Form("#it{z}_{T} vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1742 nptbins, ptmin, ptmax,200, 0.0, 2.0);
1743 fhZTAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1744 fhZTAssocPtBin[bin]->SetYTitle("#it{z}_{T}");
1746 outputContainer->Add(fhDeltaPhiDeltaEtaAssocPtBin[bin]) ;
1747 outputContainer->Add(fhDeltaPhiAssocPtBin[bin]) ;
1748 outputContainer->Add(fhDeltaPhiAssocPtBinDEta08[bin]) ;
1749 outputContainer->Add(fhDeltaPhiAssocPtBinDEta0[bin]) ;
1750 outputContainer->Add(fhXEAssocPtBin[bin]);
1751 outputContainer->Add(fhZTAssocPtBin[bin]);
1753 if(fPi0Trigger || fDecayTrigger)
1755 fhDeltaPhiDecayChargedAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtDecayChargedAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1756 Form("#Delta #phi vs #it{p}_{T trigger} tagged as decay for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1757 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1758 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1759 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
1761 fhXEDecayChargedAssocPtBin[bin] = new TH2F(Form("hXEDecayChargedAssocPtBin%1.f_%1.f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1762 Form("#it{x}_{#it{E}} vs #it{p}_{T trigger} tagged as decay for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1763 nptbins, ptmin, ptmax,200, 0.0, 2.0);
1764 fhXEDecayChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1765 fhXEDecayChargedAssocPtBin[bin]->SetYTitle("#it{x}_{#it{E}}");
1767 fhZTDecayChargedAssocPtBin[bin] = new TH2F(Form("hZTDecayChargedAssocPtBin%1.f_%1.f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1768 Form("#it{z}_{T} vs #it{p}_{T trigger} tagged as decay for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1769 nptbins, ptmin, ptmax,200, 0.0, 2.0);
1770 fhZTDecayChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1771 fhZTDecayChargedAssocPtBin[bin]->SetYTitle("#it{z}_{T}");
1773 outputContainer->Add(fhDeltaPhiDecayChargedAssocPtBin[bin]) ;
1774 outputContainer->Add(fhXEDecayChargedAssocPtBin[bin]);
1775 outputContainer->Add(fhZTDecayChargedAssocPtBin[bin]);
1781 fhDeltaPhiBradAssocPtBin[bin] = new TH2F(Form("hDeltaPhiBradPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1782 Form("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1783 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
1784 fhDeltaPhiBradAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1785 fhDeltaPhiBradAssocPtBin[bin]->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
1786 outputContainer->Add(fhDeltaPhiBradAssocPtBin[bin]) ;
1789 if(fHMPIDCorrelation)
1791 fhDeltaPhiAssocPtBinHMPID[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPID", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1792 Form("#Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, with track having HMPID signal", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1793 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1794 fhDeltaPhiAssocPtBinHMPID[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})" );
1795 fhDeltaPhiAssocPtBinHMPID[bin]->SetYTitle("#Delta #phi (rad)");
1797 fhDeltaPhiAssocPtBinHMPIDAcc[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPIDAcc", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
1798 Form("#Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, with track within 5<phi<20 deg", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
1799 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1800 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1801 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetYTitle("#Delta #phi (rad)");
1803 outputContainer->Add(fhDeltaPhiAssocPtBinHMPID[bin]) ;
1804 outputContainer->Add(fhDeltaPhiAssocPtBinHMPIDAcc[bin]) ;
1810 if(fPi0Trigger || fDecayTrigger)
1814 fhPtPi0DecayRatio = new TH2F
1815 ("hPtPi0DecayRatio","#it{p}_{T} of #pi^{0} and the ratio of pt for two decay",
1816 nptbins,ptmin,ptmax, 100,0.,2.);
1817 fhPtPi0DecayRatio->SetXTitle("#it{p}_{T}^{#pi^{0}} (GeV/#it{c})");
1818 fhPtPi0DecayRatio->SetYTitle("#it{p}_{T}^{Decay}/#it{p}_{T}^{#pi^{0}}");
1819 outputContainer->Add(fhPtPi0DecayRatio) ;
1822 fhDeltaPhiDecayCharged = new TH2F
1823 ("hDeltaPhiDecayCharged","#phi_{Decay} - #phi_{h^{#pm}} vs #it{p}_{T Decay}",
1824 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1825 fhDeltaPhiDecayCharged->SetYTitle("#Delta #phi (rad)");
1826 fhDeltaPhiDecayCharged->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
1829 new TH2F("hXEDecayCharged","#it{x}_{#it{E}} Decay",
1830 nptbins,ptmin,ptmax,200,0.,2.);
1831 fhXEDecayCharged->SetYTitle("#it{x}_{#it{E}}");
1832 fhXEDecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
1835 new TH2F("hZTDecayCharged","#it{z}_{trigger h^{#pm}} = #it{p}_{T h^{#pm}} / #it{p}_{T Decay}",
1836 nptbins,ptmin,ptmax,200,0.,2.);
1837 fhZTDecayCharged->SetYTitle("#it{z}_{decay h^{#pm}}");
1838 fhZTDecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
1840 outputContainer->Add(fhDeltaPhiDecayCharged) ;
1841 outputContainer->Add(fhXEDecayCharged) ;
1842 outputContainer->Add(fhZTDecayCharged) ;
1847 fhDeltaPhiUeLeftCharged = new TH2F
1848 ("hDeltaPhiUeLeftChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left side range of trigger particles",
1849 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1850 fhDeltaPhiUeLeftCharged->SetYTitle("#Delta #phi (rad)");
1851 fhDeltaPhiUeLeftCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1852 outputContainer->Add(fhDeltaPhiUeLeftCharged) ;
1854 fhDeltaPhiUeRightCharged = new TH2F
1855 ("hDeltaPhiUeRightChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right side range of trigger particles",
1856 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1857 fhDeltaPhiUeRightCharged->SetYTitle("#Delta #phi (rad)");
1858 fhDeltaPhiUeRightCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1859 outputContainer->Add(fhDeltaPhiUeRightCharged) ;
1861 fhDeltaPhiUeLeftUpCharged = new TH2F
1862 ("hDeltaPhiUeLeftUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Up side range of trigger particles",
1863 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1864 fhDeltaPhiUeLeftUpCharged->SetYTitle("#Delta #phi (rad)");
1865 fhDeltaPhiUeLeftUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1866 outputContainer->Add(fhDeltaPhiUeLeftUpCharged) ;
1868 fhDeltaPhiUeRightUpCharged = new TH2F
1869 ("hDeltaPhiUeRightUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Up side range of trigger particles",
1870 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1871 fhDeltaPhiUeRightUpCharged->SetYTitle("#Delta #phi (rad)");
1872 fhDeltaPhiUeRightUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1873 outputContainer->Add(fhDeltaPhiUeRightUpCharged) ;
1875 fhDeltaPhiUeLeftDownCharged = new TH2F
1876 ("hDeltaPhiUeLeftDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Down side range of trigger particles",
1877 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1878 fhDeltaPhiUeLeftDownCharged->SetYTitle("#Delta #phi (rad)");
1879 fhDeltaPhiUeLeftDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1880 outputContainer->Add(fhDeltaPhiUeLeftDownCharged) ;
1882 fhDeltaPhiUeRightDownCharged = new TH2F
1883 ("hDeltaPhiUeRightDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Down side range of trigger particles",
1884 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1885 fhDeltaPhiUeRightDownCharged->SetYTitle("#Delta #phi (rad)");
1886 fhDeltaPhiUeRightDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1887 outputContainer->Add(fhDeltaPhiUeRightDownCharged) ;
1890 new TH2F("hXEUeChargedLeft","#it{x}_{#it{E}} with UE left side of trigger",
1891 nptbins,ptmin,ptmax,200,0.,2.);
1892 fhXEUeLeftCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1893 fhXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1894 outputContainer->Add(fhXEUeLeftCharged) ;
1896 fhXEUeRightCharged =
1897 new TH2F("hXEUeChargedRight","#it{x}_{#it{E} h^{#pm}} with UE right side of trigger",
1898 nptbins,ptmin,ptmax,200,0.,2.);
1899 fhXEUeRightCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1900 fhXEUeRightCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1901 outputContainer->Add(fhXEUeRightCharged) ;
1903 fhXEUeLeftUpCharged =
1904 new TH2F("hXEUeChargedLeftUp","#it{x}_{#it{E}} with UE left Up side of trigger",
1905 nptbins,ptmin,ptmax,200,0.,2.);
1906 fhXEUeLeftUpCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1907 fhXEUeLeftUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1908 outputContainer->Add(fhXEUeLeftUpCharged) ;
1910 fhXEUeRightUpCharged =
1911 new TH2F("hXEUeChargedRightUp","#it{x}_{#it{E} h^{#pm}} with UE right Up side of trigger",
1912 nptbins,ptmin,ptmax,200,0.,2.);
1913 fhXEUeRightUpCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1914 fhXEUeRightUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1915 outputContainer->Add(fhXEUeRightUpCharged) ;
1917 fhXEUeLeftDownCharged =
1918 new TH2F("hXEUeChargedLeftDown","#it{x}_{#it{E}} with UE left Down side of trigger",
1919 nptbins,ptmin,ptmax,200,0.,2.);
1920 fhXEUeLeftDownCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1921 fhXEUeLeftDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1922 outputContainer->Add(fhXEUeLeftDownCharged) ;
1924 fhXEUeRightDownCharged =
1925 new TH2F("hXEUeChargedRightDown","#it{x}_{#it{E} h^{#pm}} with UE right Down side of trigger",
1926 nptbins,ptmin,ptmax,200,0.,2.);
1927 fhXEUeRightDownCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1928 fhXEUeRightDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1929 outputContainer->Add(fhXEUeRightDownCharged) ;
1931 fhPtHbpXEUeLeftCharged =
1932 new TH2F("hHbpXEUeChargedLeft","#xi = ln(1/#it{x}_{#it{E}}) with charged UE left side of trigger",
1933 nptbins,ptmin,ptmax,200,0.,10.);
1934 fhPtHbpXEUeLeftCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1935 fhPtHbpXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1936 outputContainer->Add(fhPtHbpXEUeLeftCharged) ;
1938 fhPtHbpXEUeRightCharged =
1939 new TH2F("hHbpXEUeChargedRight","#xi = ln(1/#it{x}_{#it{E}}) with charged UE right side of trigger",
1940 nptbins,ptmin,ptmax,200,0.,10.);
1941 fhPtHbpXEUeRightCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1942 fhPtHbpXEUeRightCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1943 outputContainer->Add(fhPtHbpXEUeRightCharged) ;
1946 new TH2F("hZTUeChargedLeft","#it{z}_{trigger h^{#pm}} = #it{p}_{T Ueh^{#pm}} / #it{p}_{T trigger} with UE left side of trigger",
1947 nptbins,ptmin,ptmax,200,0.,2.);
1948 fhZTUeLeftCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1949 fhZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1950 outputContainer->Add(fhZTUeLeftCharged) ;
1952 fhZTUeRightCharged =
1953 new TH2F("hZTUeChargedRight","#it{z}_{trigger h^{#pm}} = #it{p}_{T Ueh^{#pm}} / #it{p}_{T trigger} with UE right side of trigger",
1954 nptbins,ptmin,ptmax,200,0.,2.);
1955 fhZTUeRightCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1956 fhZTUeRightCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1957 outputContainer->Add(fhZTUeRightCharged) ;
1959 fhPtHbpZTUeLeftCharged =
1960 new TH2F("hHbpZTUeChargedLeft","#xi = ln(1/#it{z}_{T}) with charged UE left side of trigger",
1961 nptbins,ptmin,ptmax,200,0.,10.);
1962 fhPtHbpZTUeLeftCharged->SetYTitle("ln(1/#it{z}_{T})");
1963 fhPtHbpZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1964 outputContainer->Add(fhPtHbpZTUeLeftCharged) ;
1966 fhPtHbpZTUeRightCharged =
1967 new TH2F("hHbpZTUeChargedRight","#xi = ln(1/#it{z}_{T}) with charged UE right side of trigger",
1968 nptbins,ptmin,ptmax,200,0.,10.);
1969 fhPtHbpZTUeRightCharged->SetYTitle("ln(1/#it{z}_{T})");
1970 fhPtHbpZTUeRightCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1971 outputContainer->Add(fhPtHbpZTUeRightCharged) ;
1974 } //Correlation with charged hadrons
1976 //Correlation with neutral hadrons
1979 fhDeltaPhiDeltaEtaNeutral = new TH2F
1980 ("hDeltaPhiDeltaEtaNeutral","#phi_{trigger} - #phi_{h^{0}} vs #eta_{trigger} - #eta_{h^{0}}",
1981 ndeltaphibins ,deltaphimin,deltaphimax, ndeltaetabins ,deltaetamin,deltaetamax);
1982 fhDeltaPhiDeltaEtaNeutral->SetXTitle("#Delta #phi (rad)");
1983 fhDeltaPhiDeltaEtaNeutral->SetYTitle("#Delta #eta");
1985 fhPhiNeutral = new TH2F
1986 ("hPhiNeutral","#phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}",
1987 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1988 fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)");
1989 fhPhiNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})");
1991 fhEtaNeutral = new TH2F
1992 ("hEtaNeutral","#eta_{#pi^{0}} vs #it{p}_{T #pi^{0}}",
1993 nptbins,ptmin,ptmax,netabins,etamin,etamax);
1994 fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)");
1995 fhEtaNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})");
1997 fhDeltaPhiNeutral = new TH2F
1998 ("hDeltaPhiNeutral","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T trigger}",
1999 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
2000 fhDeltaPhiNeutral->SetYTitle("#Delta #phi (rad)");
2001 fhDeltaPhiNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2003 fhDeltaPhiNeutralPt = new TH2F
2004 ("hDeltaPhiNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}",
2005 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2006 fhDeltaPhiNeutralPt->SetYTitle("#Delta #phi (rad)");
2007 fhDeltaPhiNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2009 fhDeltaPhiUeNeutralPt = new TH2F
2010 ("hDeltaPhiUeNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}",
2011 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2012 fhDeltaPhiUeNeutralPt->SetYTitle("#Delta #phi (rad)");
2013 fhDeltaPhiUeNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2015 fhDeltaEtaNeutral = new TH2F
2016 ("hDeltaEtaNeutral","#eta_{trigger} - #eta_{#pi^{0}} vs #it{p}_{T trigger}",
2017 nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
2018 fhDeltaEtaNeutral->SetYTitle("#Delta #eta");
2019 fhDeltaEtaNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2022 new TH2F("hXENeutral","#it{x}_{#it{E}} for #pi^{0} associated",
2023 nptbins,ptmin,ptmax,200,0.,2.);
2024 fhXENeutral->SetYTitle("#it{x}_{#it{E}}");
2025 fhXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2028 new TH2F("hXEUeNeutral","#it{x}_{#it{E}} for #pi^{0} associated",
2029 nptbins,ptmin,ptmax,200,0.,2.);
2030 fhXEUeNeutral->SetYTitle("#it{x}_{#it{E}}");
2031 fhXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2034 new TH2F("hHbpXENeutral","#xi = ln(1/#it{x}_{#it{E}})for #pi^{0} associated",
2035 nptbins,ptmin,ptmax,200,0.,10.);
2036 fhPtHbpXENeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2037 fhPtHbpXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2039 fhPtHbpXEUeNeutral =
2040 new TH2F("hHbpXEUeNeutral","#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2041 nptbins,ptmin,ptmax,200,0.,10.);
2042 fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2043 fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2046 new TH2F("hZTNeutral","#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated",
2047 nptbins,ptmin,ptmax,200,0.,2.);
2048 fhZTNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}");
2049 fhZTNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2052 new TH2F("hZTUeNeutral","#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated",
2053 nptbins,ptmin,ptmax,200,0.,2.);
2054 fhZTUeNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}");
2055 fhZTUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2058 new TH2F("hHbpZTNeutral","#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2059 nptbins,ptmin,ptmax,200,0.,10.);
2060 fhPtHbpZTNeutral->SetYTitle("ln(1/#it{z}_{T})");
2061 fhPtHbpZTNeutral->SetXTitle("#it{p}_{T trigger}");
2063 fhPtHbpZTUeNeutral =
2064 new TH2F("hHbpZTUeNeutral","#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
2065 nptbins,ptmin,ptmax,200,0.,10.);
2066 fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{z}_{T})");
2067 fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2069 outputContainer->Add(fhDeltaPhiDeltaEtaNeutral);
2070 outputContainer->Add(fhPhiNeutral) ;
2071 outputContainer->Add(fhEtaNeutral) ;
2072 outputContainer->Add(fhDeltaPhiNeutral) ;
2073 outputContainer->Add(fhDeltaPhiNeutralPt) ;
2074 outputContainer->Add(fhDeltaPhiUeNeutralPt) ;
2075 outputContainer->Add(fhDeltaEtaNeutral) ;
2076 outputContainer->Add(fhXENeutral) ;
2077 outputContainer->Add(fhXEUeNeutral) ;
2078 outputContainer->Add(fhPtHbpXENeutral) ;
2079 outputContainer->Add(fhPtHbpXEUeNeutral) ;
2080 outputContainer->Add(fhZTNeutral) ;
2081 outputContainer->Add(fhZTUeNeutral) ;
2082 outputContainer->Add(fhPtHbpZTNeutral) ;
2083 outputContainer->Add(fhPtHbpZTUeNeutral) ;
2085 if(fPi0Trigger || fDecayTrigger)
2087 fhDeltaPhiDecayNeutral = new TH2F
2088 ("hDeltaPhiDecayNeutral","#phi_{Decay} - #phi_{h^{0}} vs #it{p}_{T Decay}",
2089 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2090 fhDeltaPhiDecayNeutral->SetYTitle("#Delta #phi (rad)");
2091 fhDeltaPhiDecayNeutral->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
2094 new TH2F("hXEDecayNeutral","#it{x}_{#it{E}} for decay trigger",
2095 nptbins,ptmin,ptmax,200,0.,2.);
2096 fhXEDecayNeutral->SetYTitle("#it{x}_{#it{E}}");
2097 fhXEDecayNeutral->SetXTitle("#it{p}_{T decay}");
2100 new TH2F("hZTDecayNeutral","#it{z}_{trigger h^{0}} = #it{p}_{T h^{0}} / #it{p}_{T Decay}",
2101 nptbins,ptmin,ptmax,200,0.,2.);
2102 fhZTDecayNeutral->SetYTitle("#it{z}_{h^{0}}");
2103 fhZTDecayNeutral->SetXTitle("#it{p}_{T decay}");
2105 outputContainer->Add(fhDeltaPhiDecayNeutral) ;
2106 outputContainer->Add(fhXEDecayNeutral) ;
2107 outputContainer->Add(fhZTDecayNeutral) ;
2113 fhDeltaPhiUeLeftNeutral = new TH2F
2114 ("hDeltaPhiUeLeftNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs #it{p}_{T h^{0}} with neutral UE left side range of trigger particles",
2115 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2116 fhDeltaPhiUeLeftNeutral->SetYTitle("#Delta #phi (rad)");
2117 fhDeltaPhiUeLeftNeutral->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2118 outputContainer->Add(fhDeltaPhiUeLeftNeutral) ;
2120 fhDeltaPhiUeRightNeutral = new TH2F
2121 ("hDeltaPhiUeRightNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs #it{p}_{T Ueh^{0}} with neutral UE right side range of trigger particles",
2122 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2123 fhDeltaPhiUeRightNeutral->SetYTitle("#Delta #phi (rad)");
2124 fhDeltaPhiUeRightNeutral->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2125 outputContainer->Add(fhDeltaPhiUeRightNeutral) ;
2128 new TH2F("hXEUeNeutralLeft","#it{x}_{#it{E}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger",
2129 nptbins,ptmin,ptmax,140,0.,2.);
2130 fhXEUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2131 fhXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2132 outputContainer->Add(fhXEUeLeftNeutral) ;
2134 fhXEUeRightNeutral =
2135 new TH2F("hXEUeNeutralRight","#it{x}_{#it{E}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE right side of trigger",
2136 nptbins,ptmin,ptmax,200,0.,2.);
2137 fhXEUeRightNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2138 fhXEUeRightNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2139 outputContainer->Add(fhXEUeRightNeutral) ;
2141 fhPtHbpXEUeLeftNeutral =
2142 new TH2F("hHbpXEUeNeutralLeft","#xi = ln(1/#it{x}_{#it{E}}) with neutral UE left side of trigger",
2143 nptbins,ptmin,ptmax,200,0.,10.);
2144 fhPtHbpXEUeLeftNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2145 fhPtHbpXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2146 outputContainer->Add(fhPtHbpXEUeLeftNeutral) ;
2148 fhPtHbpXEUeRightNeutral =
2149 new TH2F("hHbpXEUeNeutralRight","#xi = ln(1/#it{x}_{#it{E}}) with neutral UE right side of trigger",
2150 nptbins,ptmin,ptmax,200,0.,10.);
2151 fhPtHbpXEUeRightNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2152 fhPtHbpXEUeRightNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2153 outputContainer->Add(fhPtHbpXEUeRightNeutral) ;
2156 new TH2F("hZTUeNeutralLeft","#it{z}_{trigger h^{0}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger",
2157 nptbins,ptmin,ptmax,140,0.,2.);
2158 fhZTUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2159 fhZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2160 outputContainer->Add(fhZTUeLeftNeutral) ;
2162 fhZTUeRightNeutral =
2163 new TH2F("hZTUeNeutralRight","#it{z}_{trigger h^{0}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE right side of trigger",
2164 nptbins,ptmin,ptmax,200,0.,2.);
2165 fhZTUeRightNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2166 fhZTUeRightNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2167 outputContainer->Add(fhZTUeRightNeutral) ;
2169 fhPtHbpZTUeLeftNeutral =
2170 new TH2F("hHbpZTUeNeutralLeft","#xi = ln(1/#it{z}_{T}) with neutral UE left side of trigger",
2171 nptbins,ptmin,ptmax,200,0.,10.);
2172 fhPtHbpZTUeLeftNeutral->SetYTitle("ln(1/#it{z}_{T})");
2173 fhPtHbpZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger}");
2174 outputContainer->Add(fhPtHbpZTUeLeftNeutral) ;
2176 fhPtHbpZTUeRightNeutral =
2177 new TH2F("hHbpZTUeNeutralRight","#xi = ln(1/#it{z}_{T}) with neutral UE right side of trigger",
2178 nptbins,ptmin,ptmax,200,0.,10.);
2179 fhPtHbpZTUeRightNeutral->SetYTitle("ln(1/#it{z}_{T})");
2180 fhPtHbpZTUeRightNeutral->SetXTitle("#it{p}_{T trigger}");
2181 outputContainer->Add(fhPtHbpZTUeRightNeutral) ;
2185 }//Correlation with neutral hadrons
2187 //if data is MC, fill more histograms
2190 fh2phiLeadingParticle=new TH2F("h2phiLeadingParticle","#phi resolustion for trigger particles",nptbins,ptmin,ptmax,100,-1,1);
2191 fh2phiLeadingParticle->GetXaxis()->SetTitle("#it{p}_{T gen Leading} (GeV/#it{c})");
2192 fh2phiLeadingParticle->GetYaxis()->SetTitle("(#phi_{rec}-#phi_{gen})/#phi_{gen}");
2194 fhMCPtLeading = new TH1F ("hMCPtLeading","MC : #it{p}_{T} distribution of leading particles", nptbins,ptmin,ptmax);
2195 fhMCPtLeading->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2197 fhMCPhiLeading = new TH2F ("hMCPhiLeading","MC : #phi distribution of leading Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2198 fhMCPhiLeading->SetYTitle("#phi (rad)");
2200 fhMCEtaLeading = new TH2F ("hMCEtaLeading","MC : #eta distribution of leading",nptbins,ptmin,ptmax, netabins,etamin,etamax);
2201 fhMCEtaLeading->SetYTitle("#eta ");
2204 fhMCEtaCharged = new TH2F
2205 ("hMCEtaCharged","MC #eta_{h^{#pm}} vs #it{p}_{T #pm}",
2206 nptbins,ptmin,ptmax,netabins,etamin,etamax);
2207 fhMCEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
2208 fhMCEtaCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
2210 fhMCPhiCharged = new TH2F
2211 ("hMCPhiCharged","#MC phi_{h^{#pm}} vs #it{p}_{T #pm}",
2212 200,ptmin,ptmax,nphibins,phimin,phimax);
2213 fhMCPhiCharged->SetYTitle("MC #phi_{h^{#pm}} (rad)");
2214 fhMCPhiCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
2216 fhMCDeltaPhiDeltaEtaCharged = new TH2F
2217 ("hMCDeltaPhiDeltaEtaCharged","#MC phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
2218 140,-2.,5.,200,-2,2);
2219 fhMCDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
2220 fhMCDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
2222 fhMCDeltaEtaCharged = new TH2F
2223 ("hMCDeltaEtaCharged","MC #eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger} and #it{p}_{T assoc}",
2224 nptbins,ptmin,ptmax,200,-2,2);
2225 fhMCDeltaEtaCharged->SetYTitle("#Delta #eta");
2226 fhMCDeltaEtaCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2228 fhMCDeltaPhiCharged = new TH2F
2229 ("hMCDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
2230 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2231 fhMCDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
2232 fhMCDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2234 fhMCDeltaPhiChargedPt = new TH2F
2235 ("hMCDeltaPhiChargedPt","MC #phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}",
2236 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2237 fhMCDeltaPhiChargedPt->SetYTitle("#Delta #phi (rad)");
2238 fhMCDeltaPhiChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
2241 new TH2F("hMCPtXECharged","#it{x}_{#it{E}}",
2242 nptbins,ptmin,ptmax,200,0.,2.);
2243 fhMCPtXECharged->SetYTitle("#it{x}_{#it{E}}");
2244 fhMCPtXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2247 new TH2F("hMCPtXEUeCharged","#it{x}_{#it{E}}",
2248 nptbins,ptmin,ptmax,200,0.,2.);
2249 fhMCPtXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
2250 fhMCPtXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2252 fhMCPtHbpXECharged =
2253 new TH2F("hMCHbpXECharged","MC #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
2254 nptbins,ptmin,ptmax,200,0.,10.);
2255 fhMCPtHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2256 fhMCPtHbpXECharged->SetXTitle("#it{p}_{T trigger}");
2258 fhMCPtHbpXEUeCharged =
2259 new TH2F("hMCPtHbpXEUeCharged","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons,Underlying Event",
2260 nptbins,ptmin,ptmax,200,0.,10.);
2261 fhMCPtHbpXEUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2262 fhMCPtHbpXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2265 new TH1F("hMCUePart","MC UE particles distribution vs pt trig",
2266 nptbins,ptmin,ptmax);
2267 fhMCUePart->SetYTitle("#it{dN}^{ch}");
2268 fhMCUePart->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2271 new TH2F("hMCPtZTCharged","#it{z}_{T}",
2272 nptbins,ptmin,ptmax,200,0.,2.);
2273 fhMCPtZTCharged->SetYTitle("#it{z}_{T}");
2274 fhMCPtZTCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2276 fhMCPtHbpZTCharged =
2277 new TH2F("hMCHbpZTCharged","MC #xi = ln(1/#it{z}_{T}) with charged hadrons",
2278 nptbins,ptmin,ptmax,200,0.,10.);
2279 fhMCPtHbpZTCharged->SetYTitle("ln(1/#it{z}_{T})");
2280 fhMCPtHbpZTCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2283 new TH2F("hMCPtTrigPout","AOD MC Pout with triggers",
2284 nptbins,ptmin,ptmax,2*nptbins,-ptmax,ptmax);
2285 fhMCPtTrigPout->SetYTitle("#it{p}_{out} (GeV/#it{c})");
2286 fhMCPtTrigPout->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2288 fhMCPtAssocDeltaPhi =
2289 new TH2F("hMCPtAssocDeltaPhi","AOD MC delta phi with associated charged hadrons",
2290 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2291 fhMCPtAssocDeltaPhi->SetYTitle("#Delta #phi (rad)");
2292 fhMCPtAssocDeltaPhi->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2294 outputContainer->Add(fh2phiLeadingParticle);
2295 outputContainer->Add(fhMCPtLeading);
2296 outputContainer->Add(fhMCPhiLeading);
2297 outputContainer->Add(fhMCEtaLeading);
2298 outputContainer->Add(fhMCDeltaPhiDeltaEtaCharged);
2299 outputContainer->Add(fhMCPhiCharged) ;
2300 outputContainer->Add(fhMCEtaCharged) ;
2301 outputContainer->Add(fhMCDeltaEtaCharged) ;
2302 outputContainer->Add(fhMCDeltaPhiCharged) ;
2304 outputContainer->Add(fhMCDeltaPhiChargedPt) ;
2305 outputContainer->Add(fhMCPtXECharged) ;
2306 outputContainer->Add(fhMCPtXEUeCharged) ;
2307 outputContainer->Add(fhMCPtZTCharged) ;
2308 outputContainer->Add(fhMCPtHbpXECharged) ;
2309 outputContainer->Add(fhMCPtHbpXEUeCharged);
2310 outputContainer->Add(fhMCUePart);
2311 outputContainer->Add(fhMCPtHbpZTCharged) ;
2312 outputContainer->Add(fhMCPtTrigPout) ;
2313 outputContainer->Add(fhMCPtAssocDeltaPhi) ;
2314 } //for MC histogram
2318 //create event containers
2320 if(!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForTracksExists()))
2322 Int_t nvz = GetNZvertBin();
2323 Int_t nrp = GetNRPBin();
2324 Int_t nce = GetNCentrBin();
2326 fListMixTrackEvents= new TList*[nvz*nrp*nce] ;
2328 for( Int_t ice = 0 ; ice < nce ; ice++ )
2330 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2332 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2334 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2336 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2337 // ic,iz, irp, bin);
2339 fListMixTrackEvents[bin] = new TList() ;
2340 fListMixTrackEvents[bin]->SetOwner(kFALSE);
2346 fhPtLeadingMixed = new TH1F ("hPtLeadingMixed","#it{p}_{T} distribution of leading particles, used for mixing", nptbins,ptmin,ptmax);
2347 fhPtLeadingMixed->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2351 fhPtLeadingMixedVzBin = new TH2F ("hPtLeadingMixedVzBin","#it{p}_{T} distribution of leading particles, used for mixing", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
2352 fhPtLeadingMixedVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2353 fhPtLeadingMixedVzBin->SetYTitle("#it{v}_{#it{z}} bin");
2354 outputContainer->Add(fhPtLeadingMixedVzBin);
2357 fhPtLeadingMixedBin = new TH2F ("hPtLeadingMixedBin","#it{p}_{T} distribution of leading particles vs mixing bin", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
2358 fhPtLeadingMixedBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2359 fhPtLeadingMixedBin->SetYTitle("Bin");
2361 fhPhiLeadingMixed = new TH2F ("hPhiLeadingMixed","#phi distribution of leading Particles, used for mixing",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2362 fhPhiLeadingMixed->SetYTitle("#phi (rad)");
2364 fhEtaLeadingMixed = new TH2F ("hEtaLeadingMixed","#eta distribution of leading, used for mixing",nptbins,ptmin,ptmax, netabins,etamin,etamax);
2365 fhEtaLeadingMixed->SetYTitle("#eta ");
2367 outputContainer->Add(fhPtLeadingMixed);
2368 outputContainer->Add(fhPtLeadingMixedBin);
2369 outputContainer->Add(fhPhiLeadingMixed);
2370 outputContainer->Add(fhEtaLeadingMixed);
2372 // Fill the cluster pool only in isolation analysis or if requested
2373 if( ( OnlyIsolated() || fFillNeutralEventMixPool) &&
2374 (!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForCaloExists())))
2376 Int_t nvz = GetNZvertBin();
2377 Int_t nrp = GetNRPBin();
2378 Int_t nce = GetNCentrBin();
2380 fListMixCaloEvents= new TList*[nvz*nrp*nce] ;
2382 for( Int_t ice = 0 ; ice < nce ; ice++ )
2384 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2386 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2388 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2390 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2391 // ic,iz, irp, bin);
2393 fListMixCaloEvents[bin] = new TList() ;
2394 fListMixCaloEvents[bin]->SetOwner(kFALSE);
2400 //Init the list in the reader if not done previously
2401 if(fUseMixStoredInReader)
2403 if( !GetReader()->ListWithMixedEventsForTracksExists() )
2404 GetReader()->SetListWithMixedEventsForTracks(fListMixTrackEvents);
2406 if( !GetReader()->ListWithMixedEventsForCaloExists() )
2407 GetReader()->SetListWithMixedEventsForCalo (fListMixCaloEvents );
2410 fhEventBin=new TH1I("hEventBin","Number of real events per bin(cen,vz,rp)",
2411 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2412 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2413 fhEventBin->SetXTitle("bin");
2414 outputContainer->Add(fhEventBin) ;
2416 fhEventMixBin=new TH1I("hEventMixBin","Number of events per bin(cen,vz,rp)",
2417 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2418 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2419 fhEventMixBin->SetXTitle("bin");
2420 outputContainer->Add(fhEventMixBin) ;
2422 fhNtracksMB=new TH1F("hNtracksMBEvent","Number of tracks w/ event trigger kMB",2000,0,2000);
2423 outputContainer->Add(fhNtracksMB);
2425 if(fFillNeutralEventMixPool || OnlyIsolated())
2427 fhNclustersMB=new TH1F("hNclustersMBEvent","Number of clusters w/ event trigger kMB",2000,0,2000);
2428 outputContainer->Add(fhNclustersMB);
2431 fhMixDeltaPhiCharged = new TH2F
2432 ("hMixDeltaPhiCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
2433 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2434 fhMixDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
2435 fhMixDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2436 outputContainer->Add(fhMixDeltaPhiCharged);
2438 fhMixDeltaPhiDeltaEtaCharged = new TH2F
2439 ("hMixDeltaPhiDeltaEtaCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
2440 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2441 fhMixDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
2442 fhMixDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
2443 outputContainer->Add(fhMixDeltaPhiDeltaEtaCharged);
2446 new TH2F("hMixXECharged","Mixed event : #it{x}_{#it{E}} for charged tracks",
2447 nptbins,ptmin,ptmax,200,0.,2.);
2448 fhMixXECharged->SetYTitle("#it{x}_{#it{E}}");
2449 fhMixXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2450 outputContainer->Add(fhMixXECharged);
2453 new TH2F("hMixXEUeCharged","Mixed event : #it{x}_{#it{E}} for charged tracks in Ue region",
2454 nptbins,ptmin,ptmax,200,0.,2.);
2455 fhMixXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
2456 fhMixXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2457 outputContainer->Add(fhMixXEUeCharged);
2460 new TH2F("hMixHbpXECharged","mixed event : #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
2461 nptbins,ptmin,ptmax,200,0.,10.);
2462 fhMixHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2463 fhMixHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2464 outputContainer->Add(fhMixHbpXECharged);
2466 fhMixDeltaPhiChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2467 fhMixDeltaPhiChargedAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
2468 fhMixDeltaPhiChargedAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
2469 fhMixDeltaPhiDeltaEtaChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2471 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2473 for(Int_t z = 0 ; z < nz ; z++)
2479 sz = Form("_vz%d",z);
2480 tz = Form(", #it{v}_{#it{z}} bin %d",z);
2483 //printf("MIX : iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
2485 fhMixDeltaPhiChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2486 Form("Mixed event #Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2487 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2488 fhMixDeltaPhiChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2489 fhMixDeltaPhiChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
2491 fhMixDeltaPhiChargedAssocPtBinDEta08[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0.8ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2492 Form("Mixed event #Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, for #Delta #eta > 0.8", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2493 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2494 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2495 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
2497 fhMixDeltaPhiChargedAssocPtBinDEta0[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2498 Form("Mixed event #Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, for #Delta #eta = 0", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2499 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2500 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2501 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
2503 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiDeltaEtaChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2504 Form("Mixed event #Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2505 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2506 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
2507 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetYTitle("#Delta #eta");
2509 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBin[bin]);
2510 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta08[bin]);
2511 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta0[bin]);
2512 outputContainer->Add(fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]);
2517 return outputContainer;
2521 //_________________________________________________________________________________________________
2522 Bool_t AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum(const AliAODPWG4Particle* trigger,
2523 TLorentzVector & mom1,
2524 TLorentzVector & mom2)
2526 // Get the momentum of the pi0/eta assigned decay photons
2527 // In case of pi0/eta trigger, we may want to check their decay correlation,
2528 // get their decay children
2530 Int_t indexPhoton1 = trigger->GetCaloLabel(0);
2531 Int_t indexPhoton2 = trigger->GetCaloLabel(1);
2532 Float_t ptTrig = trigger->Pt();
2534 if(indexPhoton1!=-1 || indexPhoton2!=-1) return kFALSE;
2537 printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - indexPhoton1 = %d, indexPhoton2 = %d \n", indexPhoton1, indexPhoton2);
2539 TObjArray * clusters = 0x0 ;
2540 if(trigger->GetDetector()=="EMCAL") clusters = GetEMCALClusters() ;
2541 else clusters = GetPHOSClusters() ;
2543 for(Int_t iclus = 0; iclus < clusters->GetEntriesFast(); iclus++)
2545 AliVCluster * photon = (AliVCluster*) (clusters->At(iclus));
2546 if(photon->GetID()==indexPhoton1)
2548 photon->GetMomentum(mom1,GetVertex(0)) ;
2549 if(ptTrig) fhPtPi0DecayRatio->Fill(ptTrig, mom1.Pt()/ptTrig);
2551 if(photon->GetID()==indexPhoton2)
2553 photon->GetMomentum(mom1,GetVertex(0)) ;
2554 if(ptTrig > 0) fhPtPi0DecayRatio->Fill(ptTrig, mom2.Pt()/ptTrig);
2557 if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - Photon1 = %f, Photon2 = %f \n", mom1.Pt(), mom2.Pt());
2565 //_____________________________________________________________
2566 Int_t AliAnaParticleHadronCorrelation::GetMCTagHistogramIndex(Int_t mcTag)
2568 // Index of MC histograms depending on MC origin
2570 if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPrompt) ||
2571 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCFragmentation)) return 0;
2572 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0)) return 1;
2573 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0Decay)) return 2;
2574 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEtaDecay)) return 3;
2575 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCOtherDecay)) return 4;
2576 else if(!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron)) return 5;
2581 //____________________________________________________
2582 void AliAnaParticleHadronCorrelation::InitParameters()
2585 //Initialize the parameters of the analysis.
2586 SetInputAODName("Particle");
2587 SetAODObjArrayName("Hadrons");
2588 AddToHistogramsName("AnaHadronCorr_");
2590 SetPtCutRange(0.,300);
2591 fDeltaPhiMinCut = 1.5 ;
2592 fDeltaPhiMaxCut = 4.5 ;
2593 fSelectIsolated = kFALSE;
2594 fMakeSeveralUE = kFALSE;
2595 fUeDeltaPhiMinCut = 1. ;
2596 fUeDeltaPhiMaxCut = 1.5 ;
2598 fNeutralCorr = kFALSE ;
2599 fPi0Trigger = kFALSE ;
2600 fDecayTrigger = kFALSE ;
2601 fHMPIDCorrelation = kFALSE ;
2603 fMakeAbsoluteLeading = kTRUE;
2604 fMakeNearSideLeading = kFALSE;
2607 fAssocPtBinLimit[0] = 0.2 ;
2608 fAssocPtBinLimit[1] = 0.5 ;
2609 fAssocPtBinLimit[2] = 1.0 ;
2610 fAssocPtBinLimit[3] = 2.0 ;
2611 fAssocPtBinLimit[4] = 3.0 ;
2612 fAssocPtBinLimit[5] = 4.0 ;
2613 fAssocPtBinLimit[6] = 5.0 ;
2614 fAssocPtBinLimit[7] = 6.0 ;
2615 fAssocPtBinLimit[8] = 7.0 ;
2616 fAssocPtBinLimit[9] = 8.0 ;
2617 fAssocPtBinLimit[10] = 9.0 ;
2618 fAssocPtBinLimit[11] = 10.0 ;
2619 fAssocPtBinLimit[12] = 12.0 ;
2620 fAssocPtBinLimit[13] = 14.0 ;
2621 fAssocPtBinLimit[14] = 16.0 ;
2622 fAssocPtBinLimit[15] = 20.0 ;
2623 fAssocPtBinLimit[16] = 30.0 ;
2624 fAssocPtBinLimit[17] = 40.0 ;
2625 fAssocPtBinLimit[18] = 50.0 ;
2626 fAssocPtBinLimit[19] = 200.0 ;
2628 fUseMixStoredInReader = kTRUE;
2633 fSelectLeadingHadronAngle = kFALSE;
2634 fMinLeadHadPhi = 150*TMath::DegToRad();
2635 fMaxLeadHadPhi = 210*TMath::DegToRad();
2638 fMaxLeadHadPt = 100;
2642 //__________________________________________________________
2643 void AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD()
2645 //Particle-Hadron Correlation Analysis, fill AODs
2647 if(!GetInputAODBranch())
2649 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data());
2653 if(strcmp(GetInputAODBranch()->GetClass()->GetName(), "AliAODPWG4ParticleCorrelation"))
2655 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());
2661 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - Begin hadron correlation analysis, fill AODs \n");
2662 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In particle branch aod entries %d\n", GetInputAODBranch()->GetEntriesFast());
2663 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In CTS aod entries %d\n", GetCTSTracks() ->GetEntriesFast());
2664 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In EMCAL aod entries %d\n", GetEMCALClusters()->GetEntriesFast());
2665 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In PHOS aod entries %d\n", GetPHOSClusters() ->GetEntriesFast());
2668 //Get the vertex and check it is not too large in z
2669 Double_t v[3] = {0,0,0}; //vertex ;
2670 GetReader()->GetVertex(v);
2671 if(!GetMixedEvent() && TMath::Abs(v[2]) > GetZvertexCut()) return ;
2673 //Loop on stored AOD particles, find leading trigger
2674 Double_t ptTrig = fMinTriggerPt ;
2675 fLeadingTriggerIndex = -1 ;
2676 Int_t naod = GetInputAODBranch()->GetEntriesFast() ;
2677 for(Int_t iaod = 0; iaod < naod ; iaod++)
2679 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
2681 // Vertex cut in case of mixing
2682 Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0));
2683 if(check == 0) continue;
2684 if(check == -1) return;
2686 // find the leading particles with highest momentum
2687 if (particle->Pt() > ptTrig)
2689 ptTrig = particle->Pt() ;
2690 fLeadingTriggerIndex = iaod ;
2692 }// finish search of leading trigger particle
2695 //Do correlation with leading particle
2696 if(fLeadingTriggerIndex >= 0)
2699 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(fLeadingTriggerIndex));
2701 //check if the particle is isolated or if we want to take the isolation into account
2702 if(OnlyIsolated() && !particle->IsIsolated()) return;
2704 //Make correlation with charged hadrons
2705 Bool_t okcharged = kTRUE;
2706 Bool_t okneutral = kTRUE;
2707 if(GetReader()->IsCTSSwitchedOn() )
2708 okcharged = MakeChargedCorrelation(particle, GetCTSTracks(),kFALSE);
2710 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); //For the future, foresee more possible pi0 lists
2711 if(fNeutralCorr && pi0list && pi0list->GetEntriesFast() > 0)
2712 okneutral = MakeNeutralCorrelation(particle, pi0list,kFALSE);
2714 }//Correlate leading
2716 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - End fill AODs \n");
2720 //_________________________________________________________________
2721 void AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms()
2723 //Particle-Hadron Correlation Analysis, fill histograms
2725 if(!GetInputAODBranch())
2727 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data());
2733 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Begin hadron correlation analysis, fill histograms \n");
2734 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In particle branch aod entries %d\n", GetInputAODBranch()->GetEntriesFast());
2737 //Get the vertex and check it is not too large in z
2738 Double_t v[3] = {0,0,0}; //vertex ;
2739 GetReader()->GetVertex(v);
2740 if(!GetMixedEvent() && TMath::Abs(v[2]) > GetZvertexCut()) return ;
2742 Float_t cen = GetEventCentrality();
2743 Float_t ep = GetEventPlaneAngle();
2745 //Loop on stored AOD particles, find leading
2746 Double_t ptTrig = fMinTriggerPt;
2747 if(fLeadingTriggerIndex < 0)
2749 //Search leading if not done before
2750 Int_t naod = GetInputAODBranch()->GetEntriesFast() ;
2751 for(Int_t iaod = 0; iaod < naod ; iaod++)
2752 { //loop on input trigger AOD file
2753 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
2755 // Vertex cut in case of mixing
2756 Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0));
2757 if(check == 0) continue;
2758 if(check == -1) return;
2760 //check if the particle is isolated or if we want to take the isolation into account
2761 if(OnlyIsolated() && !particle->IsIsolated()) continue;
2763 //find the leading particles with highest momentum
2764 if (particle->Pt() > ptTrig)
2766 ptTrig = particle->Pt() ;
2767 fLeadingTriggerIndex = iaod ;
2770 }// Finish search of leading trigger particle
2771 }// Search leading if not done before
2773 if(fLeadingTriggerIndex >= 0 )
2774 { //using trigger particle to do correlations
2776 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(fLeadingTriggerIndex));
2778 // check if it was a calorimeter cluster and if the SS cut was requested, if so, apply it
2779 Int_t clID1 = particle->GetCaloLabel(0) ;
2780 Int_t clID2 = particle->GetCaloLabel(1) ; // for photon clusters should not be set.
2781 //printf("Leading for for %s: id1 %d, id2 %d, min %f, max %f, det %s\n",
2782 // GetInputAODName().Data(),clID1,clID2,fM02MinCut,fM02MaxCut,(particle->GetDetector()).Data());
2784 if(clID1 > 0 && clID2 < 0 && fM02MaxCut > 0 && fM02MinCut > 0)
2787 TObjArray* clusters = 0x0;
2788 if (particle->GetDetector() == "EMCAL") clusters = GetEMCALClusters();
2789 else if(particle->GetDetector() == "PHOS" ) clusters = GetPHOSClusters();
2793 AliVCluster *cluster = FindCluster(clusters,clID1,iclus);
2794 Float_t m02 = cluster->GetM02();
2795 //printf("\t Check m02 = %2.2f\n",m02);
2796 if(m02 > fM02MaxCut || m02 < fM02MinCut)
2798 //printf("\t \t Not accepted\n");
2804 // Check if the particle is isolated or if we want to take the isolation into account
2805 if(OnlyIsolated() && !particle->IsIsolated()) return;
2807 Float_t pt = particle->Pt();
2808 fhPtInput->Fill(pt);
2810 // Check if trigger is in fiducial region
2811 if(IsFiducialCutOn())
2813 Bool_t in = GetFiducialCut()->IsInFiducialCut(*particle->Momentum(),particle->GetDetector()) ;
2817 fhPtFidCut->Fill(pt);
2819 // Make correlation with charged hadrons
2820 Bool_t okcharged = kTRUE;
2821 Bool_t okneutral = kTRUE;
2822 if(GetReader()->IsCTSSwitchedOn() )
2824 okcharged = MakeChargedCorrelation(particle, GetCTSTracks(),kTRUE);
2827 MakeMCChargedCorrelation(particle);
2831 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); //For the future, foresee more possible pi0 lists
2832 if(fNeutralCorr && pi0list)
2834 if(pi0list->GetEntriesFast() > 0)
2835 okneutral = MakeNeutralCorrelation(particle, pi0list,kTRUE);
2838 // Fill leading particle histogram if correlation went well and
2839 // no problem was found, like not absolute leading, or bad vertex in mixing.
2840 if(okcharged && okneutral)
2842 fhPtLeading->Fill(pt);
2843 fhPtLeadingBin->Fill(pt,GetEventMixBin());
2844 if(fCorrelVzBin) fhPtLeadingVzBin->Fill(pt,GetEventVzBin());
2846 if(fFillPileUpHistograms)
2848 Int_t vtxBC = GetReader()->GetVertexBC();
2849 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA) fhPtLeadingVtxBC0->Fill(pt);
2851 if(GetReader()->IsPileUpFromSPD()) fhPtLeadingPileUp[0]->Fill(pt);
2852 if(GetReader()->IsPileUpFromEMCal()) fhPtLeadingPileUp[1]->Fill(pt);
2853 if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtLeadingPileUp[2]->Fill(pt);
2854 if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtLeadingPileUp[3]->Fill(pt);
2855 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtLeadingPileUp[4]->Fill(pt);
2856 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtLeadingPileUp[5]->Fill(pt);
2857 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtLeadingPileUp[6]->Fill(pt);
2860 Float_t phi = particle->Phi();
2861 if(phi<0)phi+=TMath::TwoPi();
2862 fhPhiLeading->Fill(pt, phi);
2864 fhEtaLeading->Fill(pt, particle->Eta());
2865 //printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Leading particle : pt %f, eta %f, phi %f\n",particle->Pt(),particle->Eta(),phi);
2869 Int_t mcIndex = GetMCTagHistogramIndex(particle->GetTag());
2870 fhPtLeadingMC[mcIndex]->Fill(pt);
2873 fhPtLeadingCentrality ->Fill(pt,cen);
2874 fhPtLeadingEventPlane ->Fill(pt,ep);
2875 fhLeadingEventPlaneCentrality->Fill(cen,ep);
2877 }//ok charged && neutral
2880 //Reinit for next event
2881 fLeadingTriggerIndex = -1;
2883 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - End fill histograms \n");
2886 //___________________________________________________________________________________________________________
2887 Bool_t AliAnaParticleHadronCorrelation::MakeChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle,
2888 const TObjArray* pl, Bool_t bFillHisto)
2890 // Charged Hadron Correlation Analysis
2892 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Make trigger particle - charged hadron correlation \n");
2894 Float_t phiTrig = aodParticle->Phi();
2895 Float_t etaTrig = aodParticle->Eta();
2896 Float_t ptTrig = aodParticle->Pt();
2897 Bool_t decay = aodParticle->IsTagged();
2898 Int_t mcTag = aodParticle->GetTag();
2899 Double_t bz = GetReader()->GetInputEvent()->GetMagneticField();
2901 Float_t pt = -100. ;
2902 Float_t zT = -100. ;
2903 Float_t xE = -100. ;
2904 Float_t hbpXE = -100. ;
2905 Float_t hbpZT = -100. ;
2906 Float_t phi = -100. ;
2907 Float_t eta = -100. ;
2908 Float_t pout = -100. ;
2909 Float_t deltaPhi = -100. ;
2910 Float_t ptLeadHad = -100 ;
2911 Float_t phiLeadHad = -100 ;
2914 TLorentzVector photonMom ;
2915 TObjArray * reftracks = 0x0;
2917 Int_t nTracks = GetCTSTracks()->GetEntriesFast() ;
2919 // Mixed event settings
2920 Int_t evtIndex11 = -1 ; // cluster trigger or pi0 trigger
2921 Int_t evtIndex12 = -1 ; // pi0 trigger
2922 Int_t evtIndex13 = -1 ; // charged trigger
2924 Double_t v[3] = {0,0,0}; //vertex ;
2925 GetReader()->GetVertex(v);
2927 if (GetMixedEvent())
2929 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
2930 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
2931 evtIndex13 = GetMixedEvent()->EventIndex(aodParticle->GetTrackLabel(0)) ;
2934 // In case of pi0/eta trigger, we may want to check their decay correlation,
2935 // get their decay children
2936 TLorentzVector decayMom1;
2937 TLorentzVector decayMom2;
2938 Bool_t decayFound = kFALSE;
2939 if(fPi0Trigger && bFillHisto) decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
2941 //-----------------------------------------------------------------------
2942 // Track loop, select tracks with good pt, phi and fill AODs or histograms
2943 //-----------------------------------------------------------------------
2945 // select events where the leading particle in the opposite hemisphere to the trigger particle is
2946 // is in a window centered at 180 from the trigger
2947 // Find the leading hadron
2948 if(fSelectLeadingHadronAngle)
2950 for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ )
2952 AliVTrack * track = (AliVTrack *) (pl->At(ipr)) ;
2953 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
2954 p3.SetXYZ(mom[0],mom[1],mom[2]);
2958 if(pt > ptLeadHad && TMath::Abs(phi-phiTrig) > TMath::PiOver2())
2966 if( ptLeadHad < fMinLeadHadPt ||
2967 ptLeadHad > fMaxLeadHadPt ) return kFALSE;
2969 if( TMath::Abs(phiLeadHad-phiTrig) < fMinLeadHadPhi ||
2970 TMath::Abs(phiLeadHad-phiTrig) > fMaxLeadHadPhi ) return kFALSE;
2972 }// select leading hadron
2974 for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ )
2976 AliVTrack * track = (AliVTrack *) (pl->At(ipr)) ;
2978 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
2979 p3.SetXYZ(mom[0],mom[1],mom[2]);
2983 if(phi < 0) phi+=TMath::TwoPi();
2985 //Select only hadrons in pt range
2986 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
2988 //remove trigger itself for correlation when use charged triggers
2989 if( track->GetID() == aodParticle->GetTrackLabel(0) || track->GetID() == aodParticle->GetTrackLabel(1) ||
2990 track->GetID() == aodParticle->GetTrackLabel(2) || track->GetID() == aodParticle->GetTrackLabel(3) )
2993 //jump out this event if near side associated particle pt larger than trigger
2994 if (fMakeNearSideLeading)
2996 if(pt > ptTrig && TMath::Abs(phi-phiTrig) < TMath::PiOver2()) return kFALSE;
2998 //jump out this event if there is any other particle with pt larger than trigger
2999 else if(fMakeAbsoluteLeading)
3001 if(pt > ptTrig) return kFALSE;
3004 //Only for mixed event
3005 Int_t evtIndex2 = 0 ;
3006 if (GetMixedEvent())
3008 evtIndex2 = GetMixedEvent()->EventIndex(track->GetID()) ;
3009 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 || evtIndex13 == evtIndex2 ) // photon and track from different events
3012 if (TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut())
3021 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
3023 // Set the pt associated bin for the defined bins
3024 Int_t assocBin = -1;
3025 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3027 if(pt > fAssocPtBinLimit[i] && pt < fAssocPtBinLimit[i+1]) assocBin= i;
3030 // Assign to the histogram array a bin corresponding to a combination of pTa and vz bins
3036 nz = GetNZvertBin();
3037 vz = GetEventVzBin();
3040 Int_t bin = assocBin*nz+vz;
3042 //printf("assoc Bin = %d, vZ bin = %d, bin = %d \n", assocBin,GetEventVzBin(),bin);
3044 ULong_t status = track->GetStatus();
3045 Bool_t okTOF = ( (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ) ;
3046 //Double32_t tof = track->GetTOFsignal()*1e-3;
3047 Int_t trackBC = track->GetTOFBunchCrossing(bz);
3050 if (okTOF && trackBC!=0) outTOF = 1;
3051 else if(okTOF && trackBC==0) outTOF = 0;
3054 // calculate deltaPhi for later, shift when needed
3055 FillChargedAngularCorrelationHistograms(pt, ptTrig, bin, phi, phiTrig, deltaPhi,
3056 eta, etaTrig, decay, track->GetHMPIDsignal(),outTOF,nTracks,mcTag);
3058 // Imbalance zT/xE/pOut
3060 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
3063 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3064 //if(xE <0.)xE =-xE;
3065 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3068 pout = pt*TMath::Sin(deltaPhi) ;
3070 //delta phi cut for momentum imbalance correlation
3071 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
3074 FillChargedMomentumImbalanceHistograms(ptTrig, pt, xE, hbpXE, zT, hbpZT, pout, deltaPhi,
3075 nTracks, track->Charge(), bin, decay,outTOF,mcTag);
3079 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3082 FillChargedUnderlyingEventHistograms(ptTrig, pt, deltaPhi, nTracks,outTOF);
3084 fhUePart->Fill(ptTrig);
3088 if(fPi0Trigger && decayFound)
3089 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2, kTRUE) ;
3091 //several UE calculation
3092 if(fMakeSeveralUE) FillChargedUnderlyingEventSidesHistograms(ptTrig,pt,deltaPhi);
3100 reftracks = new TObjArray(0);
3101 TString trackname = Form("%s+Tracks", GetAODObjArrayName().Data());
3102 reftracks->SetName(trackname.Data());
3103 reftracks->SetOwner(kFALSE);
3106 reftracks->Add(track);
3108 }//aod particle loop
3111 //Fill AOD with reference tracks, if not filling histograms
3112 if(!bFillHisto && reftracks)
3114 aodParticle->AddObjArray(reftracks);
3117 //Own mixed event, add event and remove previous or fill the mixed histograms
3118 if(DoOwnMix() && bFillHisto)
3120 MakeChargedMixCorrelation(aodParticle);
3128 //_________________________________________________________________________________________________________
3129 void AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
3131 // Mix current trigger with tracks in another MB event
3133 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Make trigger particle - charged hadron mixed event correlation \n");
3135 if(GetMixedEvent()) return; // This is not the mixed event from general mixing frame
3137 // Get the event with similar caracteristics
3138 //printf("MakeChargedMixCorrelation for %s\n",GetInputAODName().Data());
3140 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
3142 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
3144 if(!inputHandler) return;
3146 if(!(inputHandler->IsEventSelected( ) & GetReader()->GetEventTriggerMask())) return;
3148 // Get the pool, check if it exits
3149 Int_t eventBin = GetEventMixBin();
3151 fhEventBin->Fill(eventBin);
3153 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
3154 if(eventBin < 0) return;
3157 TList * poolCalo = 0;
3158 if(fUseMixStoredInReader)
3160 pool = GetReader()->GetListWithMixedEventsForTracks(eventBin);
3161 if(OnlyIsolated() || fFillNeutralEventMixPool) poolCalo = GetReader()->GetListWithMixedEventsForCalo (eventBin);
3165 pool = fListMixTrackEvents[eventBin];
3166 if(OnlyIsolated() || fFillNeutralEventMixPool) poolCalo = fListMixCaloEvents [eventBin];
3171 if((OnlyIsolated() || fFillNeutralEventMixPool ) && !poolCalo &&
3172 (GetIsolationCut()->GetParticleTypeInCone()!=AliIsolationCut::AliIsolationCut::kOnlyCharged))
3173 printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Careful, cluster pool not available\n");
3175 Double_t ptTrig = aodParticle->Pt();
3176 Double_t etaTrig = aodParticle->Eta();
3177 Double_t phiTrig = aodParticle->Phi();
3178 if(phiTrig < 0.) phiTrig+=TMath::TwoPi();
3181 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Pool bin %d size %d, leading trigger pt=%f, phi=%f, eta=%f\n",
3182 eventBin,pool->GetSize(), ptTrig,phiTrig,etaTrig);
3184 Double_t ptAssoc = -999.;
3185 Double_t phiAssoc = -999.;
3186 Double_t etaAssoc = -999.;
3187 Double_t deltaPhi = -999.;
3188 Double_t deltaEta = -999.;
3189 Double_t xE = -999.;
3190 Double_t hbpXE = -999.;
3192 //Start from first event in pool except if in this same event the pool was filled
3194 if(GetReader()->GetLastTracksMixedEvent() == GetEventNumber()) ev0 = 1;
3196 for(Int_t ev=ev0; ev < pool->GetSize(); ev++)
3198 TObjArray* bgTracks = static_cast<TObjArray*>(pool->At(ev));
3199 TObjArray* bgCalo = 0;
3201 // Check if the particle is isolated in the mixed event, it not, do not fill the histograms
3202 if(OnlyIsolated() || fFillNeutralEventMixPool)
3204 if(pool->GetSize()!=poolCalo->GetSize())
3205 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Different size of calo and track pools\n");
3207 bgCalo = static_cast<TObjArray*>(poolCalo->At(ev));
3210 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Event %d in calo pool not available?\n",ev);
3214 Int_t n=0; Int_t nfrac = 0; Bool_t isolated = kFALSE; Float_t coneptsum = 0;
3215 GetIsolationCut()->MakeIsolationCut(bgTracks,bgCalo,
3216 GetReader(), GetCaloPID(),
3217 kFALSE, aodParticle, "",
3218 n,nfrac,coneptsum, isolated);
3220 //printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Isolated? %d - cone %f, ptthres %f",
3221 // isolated,GetIsolationCut()->GetConeSize(),GetIsolationCut()->GetPtThreshold());
3222 //if(bgTracks)printf(" - n track %d", bgTracks->GetEntriesFast());
3225 if(!isolated) continue ;
3229 fhEventMixBin->Fill(eventBin);
3231 Int_t nTracks=bgTracks->GetEntriesFast();
3232 //printf("\t Read Pool event %d, nTracks %d\n",ev,nTracks);
3234 //Check if it is leading if mixed event
3235 if(fMakeNearSideLeading || fMakeAbsoluteLeading)
3237 Bool_t leading = kTRUE;
3238 for(Int_t jlead = 0;jlead <nTracks; jlead++ )
3240 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(jlead) ;
3242 ptAssoc = track->Pt();
3243 phiAssoc = track->Phi() ;
3245 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3246 if (fMakeNearSideLeading)
3248 if(ptAssoc > ptTrig && TMath::Abs(phiAssoc-phiTrig) < TMath::PiOver2())
3254 //jump out this event if there is any other particle with pt larger than trigger
3255 else if(fMakeAbsoluteLeading)
3257 if(ptAssoc > ptTrig)
3265 if(fFillNeutralEventMixPool && bgCalo)
3267 Int_t nClusters=bgCalo->GetEntriesFast();
3268 TLorentzVector mom ;
3269 for(Int_t jlead = 0;jlead <nClusters; jlead++ )
3271 AliAODPWG4Particle *cluster= (AliAODPWG4Particle*) bgCalo->At(jlead) ;
3273 ptAssoc = cluster->Pt();
3274 phiAssoc = cluster->Phi() ;
3276 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3277 if (fMakeNearSideLeading)
3279 if(ptAssoc > ptTrig && TMath::Abs(phiAssoc-phiTrig) < TMath::PiOver2())
3285 //jump out this event if there is any other particle with pt larger than trigger
3286 else if(fMakeAbsoluteLeading)
3288 if(ptAssoc > ptTrig)
3297 if(!leading) continue; // not leading, check the next event in pool
3301 fhPtLeadingMixed ->Fill(ptTrig);
3302 fhPhiLeadingMixed ->Fill(ptTrig, phiTrig);
3303 fhEtaLeadingMixed ->Fill(ptTrig, etaTrig);
3304 fhPtLeadingMixedBin->Fill(ptTrig,eventBin);
3305 if(fCorrelVzBin)fhPtLeadingMixedVzBin->Fill(ptTrig, GetEventVzBin());
3307 for(Int_t j1 = 0;j1 <nTracks; j1++ )
3309 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(j1) ;
3311 if(!track) continue;
3313 ptAssoc = track->Pt();
3314 etaAssoc = track->Eta();
3315 phiAssoc = track->Phi() ;
3316 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
3318 if(IsFiducialCutOn())
3320 Bool_t in = GetFiducialCut()->IsInFiducialCut(*aodParticle->Momentum(),"CTS") ;
3324 deltaPhi = phiTrig-phiAssoc;
3325 if(deltaPhi < -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3326 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3327 deltaEta = etaTrig-etaAssoc;
3330 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation(): deltaPhi= %f, deltaEta=%f\n",deltaPhi, deltaEta);
3332 // Set the pt associated bin for the defined bins
3333 Int_t assocBin = -1;
3334 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3336 if(ptAssoc > fAssocPtBinLimit[i] && ptAssoc < fAssocPtBinLimit[i+1]) assocBin= i;
3339 // Assign to the histogram array a bin corresponding to a combination of pTa and vz bins
3345 nz = GetNZvertBin();
3346 vz = GetEventVzBin();
3349 Int_t bin = assocBin*nz+vz;
3351 fhMixDeltaPhiCharged ->Fill(ptTrig, deltaPhi);
3352 fhMixDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
3354 fhMixDeltaPhiCharged ->Fill(ptTrig, deltaPhi);
3355 fhMixDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
3357 xE =-ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3358 //if(xE <0.)xE =-xE;
3359 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3362 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
3364 fhMixXECharged->Fill(ptTrig,xE);
3365 fhMixHbpXECharged->Fill(ptTrig,hbpXE);
3368 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3370 //Underlying event region
3371 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
3372 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
3374 if(uexE < 0.) uexE = -uexE;
3376 fhMixXEUeCharged->Fill(ptTrig,uexE);
3379 if(bin < 0) continue ; // this pt bin was not considered
3381 if(TMath::Abs(deltaEta) > 0.8)
3382 fhMixDeltaPhiChargedAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
3383 if(TMath::Abs(deltaEta) < 0.01)
3384 fhMixDeltaPhiChargedAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
3386 fhMixDeltaPhiChargedAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
3387 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->Fill(deltaPhi, deltaEta);
3390 } // mixed event loop
3394 //________________________________________________________________________________________________________________
3395 Bool_t AliAnaParticleHadronCorrelation::MakeNeutralCorrelation(AliAODPWG4ParticleCorrelation * const aodParticle,
3396 const TObjArray* pi0list, Bool_t bFillHisto)
3398 // Neutral Pion Correlation Analysis
3399 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Make trigger particle - pi0 correlation, %d pi0's \n",
3400 pi0list->GetEntriesFast());
3402 Int_t evtIndex11 = 0 ;
3403 Int_t evtIndex12 = 0 ;
3404 if (GetMixedEvent())
3406 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
3407 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
3410 Float_t pt = -100. ;
3411 Float_t zT = -100. ;
3412 Float_t phi = -100. ;
3413 Float_t eta = -100. ;
3414 Float_t xE = -100. ;
3415 Float_t hbpXE= -100. ;
3416 Float_t hbpZT= -100. ;
3418 Float_t ptTrig = aodParticle->Pt();
3419 Float_t phiTrig = aodParticle->Phi();
3420 Float_t etaTrig = aodParticle->Eta();
3421 Float_t deltaPhi= -100. ;
3423 TLorentzVector photonMom ;
3425 // In case of pi0/eta trigger, we may want to check their decay correlation,
3426 // get their decay children
3427 TLorentzVector decayMom1;
3428 TLorentzVector decayMom2;
3429 Bool_t decayFound = kFALSE;
3430 if(fPi0Trigger && bFillHisto) decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
3432 TObjArray * refpi0 = 0x0;
3435 //Loop on stored AOD pi0
3437 Int_t naod = pi0list->GetEntriesFast();
3439 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillHistograms() - aod branch entries %d\n", naod);
3441 for(Int_t iaod = 0; iaod < naod ; iaod++)
3443 AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (pi0list->At(iaod));
3445 Int_t evtIndex2 = 0 ;
3446 Int_t evtIndex3 = 0 ;
3447 if (GetMixedEvent())
3449 evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(0)) ;
3450 evtIndex3 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(1)) ;
3452 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 ||
3453 evtIndex11 == evtIndex3 || evtIndex12 == evtIndex3) // trigger and pi0 are not from different events
3459 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
3461 //jump out this event if near side associated particle pt larger than trigger
3462 if (fMakeNearSideLeading)
3464 if(pt > ptTrig && TMath::Abs(phi-phiTrig) < TMath::PiOver2()) return kFALSE;
3466 //jump out this event if there is any other particle with pt larger than trigger
3467 else if(fMakeAbsoluteLeading)
3469 if(pt > ptTrig) return kFALSE;
3477 FillNeutralAngularCorrelationHistograms(pt, ptTrig, phi, phiTrig, deltaPhi, eta, etaTrig);
3480 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3482 //if(xE <0.)xE =-xE;
3487 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3488 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
3490 if(fPi0Trigger && decayFound)
3491 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2,kFALSE) ;
3493 //delta phi cut for correlation
3494 if( (deltaPhi > fDeltaPhiMinCut) && ( deltaPhi < fDeltaPhiMaxCut) )
3496 fhDeltaPhiNeutralPt->Fill(pt,deltaPhi);
3497 fhXENeutral ->Fill(ptTrig,xE);
3498 fhPtHbpXENeutral ->Fill(ptTrig,hbpXE);
3500 else if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3502 fhDeltaPhiUeNeutralPt->Fill(pt,deltaPhi);
3503 fhXEUeNeutral ->Fill(ptTrig,xE);
3504 fhPtHbpXEUeNeutral ->Fill(ptTrig,hbpXE);
3507 //several UE calculation
3508 if(fMakeSeveralUE) FillChargedUnderlyingEventSidesHistograms(ptTrig,pt,deltaPhi);
3516 refpi0 = new TObjArray(0);
3517 refpi0->SetName(GetAODObjArrayName()+"Pi0s");
3518 refpi0->SetOwner(kFALSE);
3521 }//put references in trigger AOD
3524 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Selected neutral for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
3531 //_________________________________________________________________________________________________________
3532 void AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
3534 // Charged Hadron Correlation Analysis with MC information
3537 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation() - Make trigger particle - charged hadron correlation in AOD MC level\n");
3539 AliStack * stack = 0x0 ;
3540 TParticle * primary = 0x0 ;
3541 TClonesArray * mcparticles0 = 0x0 ;
3542 TClonesArray * mcparticles = 0x0 ;
3543 AliAODMCParticle * aodprimary = 0x0 ;
3545 Double_t eprim = 0 ;
3546 Double_t ptprim = 0 ;
3547 Double_t phiprim = 0 ;
3548 Double_t etaprim = 0 ;
3550 Int_t iParticle = 0 ;
3551 Double_t charge = 0.;
3553 if(GetReader()->ReadStack())
3555 nTracks = GetMCStack()->GetNtrack() ;
3559 nTracks = GetReader()->GetAODMCParticles()->GetEntriesFast() ;
3561 //Int_t trackIndex[nTracks];
3563 Int_t label= aodParticle->GetLabel();
3566 if(GetDebug() > 0) printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** bad label ***: label %d \n", label);
3570 if(GetReader()->ReadStack())
3572 stack = GetMCStack() ;
3575 printf(" AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation- Stack not available, is the MC handler called? STOP\n");
3579 nTracks=stack->GetNprimary();
3580 if(label >= stack->GetNtrack())
3582 if(GetDebug() > 2) printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** large label ***: label %d, n tracks %d \n", label, stack->GetNtrack());
3586 primary = stack->Particle(label);
3589 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** no primary ***: label %d \n", label);
3595 eprim = primary->Energy();
3596 ptprim = primary->Pt();
3597 phiprim = primary->Phi();
3598 etaprim = primary->Eta();
3600 if(ptprim < 0.01 || eprim < 0.01) return ;
3602 for (iParticle = 0 ; iParticle < nTracks ; iParticle++)
3604 TParticle * particle = stack->Particle(iParticle);
3605 TLorentzVector momentum;
3607 //keep only final state particles
3608 if(particle->GetStatusCode()!=1) continue ;
3610 Int_t pdg = particle->GetPdgCode();
3612 charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
3614 particle->Momentum(momentum);
3616 //---------- Charged particles ----------------------
3619 //Particles in CTS acceptance
3620 Bool_t inCTS = GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
3622 if(TMath::Abs(pdg) == 11 && stack->Particle(particle->GetFirstMother())->GetPdgCode()==22) continue ;
3626 if( label!=iParticle) // avoid trigger particle
3628 if(!FillChargedMCCorrelationHistograms(particle->Pt(),particle->Phi(),particle->Eta(),ptprim,phiprim,etaprim)) return;
3630 }// in CTS acceptance
3633 } //when the leading particles could trace back to MC
3636 else if(GetReader()->ReadAODMCParticles())
3638 //Get the list of MC particles
3639 mcparticles0 = GetReader()->GetAODMCParticles();
3640 if(!mcparticles0) return;
3642 if(label >=mcparticles0->GetEntriesFast())
3645 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** large label ***: label %d, n tracks %d \n", label,mcparticles0->GetEntriesFast());
3650 aodprimary = (AliAODMCParticle*) mcparticles0->At(label);
3653 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** no AOD primary ***: label %d \n", label);
3659 ptprim = aodprimary->Pt();
3660 phiprim = aodprimary->Phi();
3661 etaprim = aodprimary->Eta();
3662 eprim = aodprimary->E();
3664 Bool_t lead = kFALSE;
3666 if(ptprim < 0.01 || eprim < 0.01) return ;
3668 mcparticles= GetReader()->GetAODMCParticles();
3669 for (iParticle = 0; iParticle < nTracks; iParticle++)
3671 AliAODMCParticle *part = (AliAODMCParticle*) mcparticles->At(iParticle);
3673 if (!part->IsPhysicalPrimary()) continue;
3675 Int_t pdg = part->GetPdgCode();
3676 charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
3677 TLorentzVector momentum(part->Px(),part->Py(),part->Pz(),part->E());
3681 if(part->Pt()> GetReader()->GetCTSPtMin())
3683 //Particles in CTS acceptance
3684 Bool_t inCTS = GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
3685 Int_t indexmother=part->GetMother();
3689 Int_t mPdg = ((AliAODMCParticle*) mcparticles->At(indexmother)) ->GetPdgCode();
3690 if(TMath::Abs(pdg) == 11 && mPdg == 22) continue;
3695 if( label!=iParticle) // avoid trigger particle
3697 if(!FillChargedMCCorrelationHistograms(part->Pt(),part->Phi(),part->Eta(),ptprim,phiprim,etaprim)) return;
3702 } //only charged particles
3703 } //MC particle loop
3706 fhMCPtLeading->Fill(ptprim);
3707 fhMCPhiLeading->Fill(ptprim,phiprim);
3708 fhMCEtaLeading->Fill(ptprim,etaprim);
3710 } //when the leading particles could trace back to MC
3714 //_____________________________________________________________________
3715 void AliAnaParticleHadronCorrelation::Print(const Option_t * opt) const
3718 //Print some relevant parameters set for the analysis
3722 printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
3723 AliAnaCaloTrackCorrBaseClass::Print(" ");
3724 printf("Pt trigger > %3.2f\n", fMinTriggerPt) ;
3725 printf("Pt associated hadron < %3.2f\n", fMaxAssocPt) ;
3726 printf("Pt associated hadron > %3.2f\n", fMinAssocPt) ;
3727 printf("Phi trigger particle-Hadron < %3.2f\n", fDeltaPhiMaxCut) ;
3728 printf("Phi trigger particle-Hadron > %3.2f\n", fDeltaPhiMinCut) ;
3729 printf("Phi trigger particle-UeHadron < %3.2f\n", fUeDeltaPhiMaxCut) ;
3730 printf("Phi trigger particle-UeHadron > %3.2f\n", fUeDeltaPhiMinCut) ;
3731 printf("Isolated Trigger? %d\n" , fSelectIsolated) ;
3732 printf("Several UE? %d\n" , fMakeSeveralUE) ;
3733 printf("Name of AOD Pi0 Branch %s \n", fPi0AODBranchName.Data());
3734 printf("Do Decay-hadron correlation ? %d\n", fPi0Trigger) ;
3735 printf("Select absolute leading for cluster triggers ? %d or Near Side %d\n",
3736 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
3737 printf("Trigger pt bins %d\n", fNAssocPtBins) ;
3738 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
3739 printf("\t bin %d = [%2.1f,%2.1f]\n", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
3744 //____________________________________________________________
3745 void AliAnaParticleHadronCorrelation::SetNAssocPtBins(Int_t n)
3747 // Set number of bins
3758 printf("n = larger than 19 or too small, set to 19 \n");
3763 //______________________________________________________________________________
3764 void AliAnaParticleHadronCorrelation::SetAssocPtBinLimit(Int_t ibin, Float_t pt)
3766 // Set the list of limits for the trigger pt bins
3768 if(ibin <= fNAssocPtBins || ibin >= 0)
3770 fAssocPtBinLimit[ibin] = pt ;
3774 printf("AliAnaParticleHadronCorrelation::SetAssocPtBinLimit() - bin number too large %d > %d or small, nothing done\n", ibin, fNAssocPtBins) ;