]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.cxx
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWGGA / CaloTrackCorrelations / AliAnaParticleHadronCorrelation.cxx
CommitLineData
e09cf5ef 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
e09cf5ef 15
16//_________________________________________________________________________
17// Class for the analysis of particle - hadron correlations
55c20a99 18// Particle (for example direct gamma) must be found
19// in a previous analysis
20//
21//-- Author: Gustavo Conesa (LNF-INFN) (LPSC-IN2P3-CNRS)
b6afb6b1 22// Yaxian Mao (LPSC-IN2P3-CNRS) and (CNWU) first usable implementation.
23// Xiangrong Zhu (CNWU), implementtion of own mixing.
e09cf5ef 24//////////////////////////////////////////////////////////////////////////////
25
26
27// --- ROOT system ---
28//#include "TClonesArray.h"
907b38cd 29#include <TClass.h>
30#include <TMath.h>
31#include <TH2F.h>
32#include <TDatabasePDG.h>
e09cf5ef 33
34//---- ANALYSIS system ----
35#include "AliNeutralMesonSelection.h"
36#include "AliAnaParticleHadronCorrelation.h"
37#include "AliCaloTrackReader.h"
e09cf5ef 38#include "AliAODPWG4ParticleCorrelation.h"
39#include "AliFiducialCut.h"
40#include "AliVTrack.h"
41#include "AliVCluster.h"
42#include "AliMCAnalysisUtils.h"
43#include "TParticle.h"
44#include "AliStack.h"
45#include "AliAODMCParticle.h"
46#include "AliMixedEvent.h"
029dea5a 47#include "AliAnalysisManager.h"
48#include "AliInputEventHandler.h"
2e876d85 49#include "AliEventplane.h"
e09cf5ef 50
51ClassImp(AliAnaParticleHadronCorrelation)
52
53
05d0d05d 54//___________________________________________________________________
e09cf5ef 55 AliAnaParticleHadronCorrelation::AliAnaParticleHadronCorrelation():
745913ae 56 AliAnaCaloTrackCorrBaseClass(),
f3c47a7f 57 fFillAODWithReferences(0), fCheckLeadingWithNeutralClusters(0),
1f8591af 58 fMaxAssocPt(1000.), fMinAssocPt(0.),
05d0d05d 59 fDeltaPhiMaxCut(0.), fDeltaPhiMinCut(0.),
60 fSelectIsolated(0), fMakeSeveralUE(0),
61 fUeDeltaPhiMaxCut(0.), fUeDeltaPhiMinCut(0.),
62 fPi0AODBranchName(""), fNeutralCorr(0),
907b38cd 63 fPi0Trigger(0), fDecayTrigger(0),
e7d2373d 64 fNDecayBits(0), fDecayBits(),
3f150b4b 65 fMakeAbsoluteLeading(0), fMakeNearSideLeading(0),
907b38cd 66 fLeadingTriggerIndex(-1), fHMPIDCorrelation(0), fFillBradHisto(0),
05d0d05d 67 fNAssocPtBins(0), fAssocPtBinLimit(),
7d306daf 68 fCorrelVzBin(0),
2bb7ac98 69 fListMixTrackEvents(), fListMixCaloEvents(),
70 fUseMixStoredInReader(0), fFillNeutralEventMixPool(0),
b1f720a7 71 fM02MaxCut(0), fM02MinCut(0),
98604e3a 72 fSelectLeadingHadronAngle(0), fFillLeadHadOppositeHisto(0),
f7408d50 73 fMinLeadHadPhi(0), fMaxLeadHadPhi(0),
74 fMinLeadHadPt(0), fMaxLeadHadPt(0),
a22f3f34 75 fFillEtaGapsHisto(1), fFillMomImbalancePtAssocBinsHisto(0),
be2df971 76 fMCGenTypeMin(0), fMCGenTypeMax(0),
349eb23d 77 fTrackVector(), fMomentum(),
78 fDecayMom1(), fDecayMom2(),
05d0d05d 79 //Histograms
bef61a43 80 fhPtTriggerInput(0), fhPtTriggerSSCut(0),
81 fhPtTriggerIsoCut(0), fhPtTriggerFidCut(0),
55c20a99 82 fhPtTrigger(0), fhPtTriggerVtxBC0(0),
83 fhPtTriggerVzBin(0), fhPtTriggerBin(0),
84 fhPhiTrigger(0), fhEtaTrigger(0),
85 fhPtTriggerMC(),
48c5da66 86 fhPtDecayTrigger(), fhPtDecayTriggerMC(),
55c20a99 87 fhPtTriggerCentrality(0), fhPtTriggerEventPlane(0),
88 fhTriggerEventPlaneCentrality(0),
89 fhPtTriggerMixed(0), fhPtTriggerMixedVzBin(0), fhPtTriggerMixedBin(0),
90 fhPhiTriggerMixed(0), fhEtaTriggerMixed(0),
91 fhPtLeadingOppositeHadron(0), fhPtDiffPhiLeadingOppositeHadron(0), fhPtDiffEtaLeadingOppositeHadron(0),
98604e3a 92 fhPtNoLeadingOppositeHadron(0), fhEtaPhiNoLeadingOppositeHadron(0),
d0b625bc 93 fhDeltaPhiDeltaEtaCharged(0),
05d0d05d 94 fhPhiCharged(0), fhEtaCharged(0),
95 fhDeltaPhiCharged(0), fhDeltaEtaCharged(0),
96 fhDeltaPhiChargedPt(0), fhDeltaPhiUeChargedPt(0),
9623bf34 97 fhUePart(0),
f7408d50 98 fhXECharged(0), fhXECharged_Cone2(0), fhXEUeCharged(0),
3f150b4b 99 fhXEPosCharged(0), fhXENegCharged(0),
f7408d50 100 fhPtHbpXECharged(0), fhPtHbpXECharged_Cone2(0), fhPtHbpXEUeCharged(0),
3f150b4b 101 fhZTCharged(0), fhZTUeCharged(0),
102 fhZTPosCharged(0), fhZTNegCharged(0),
103 fhPtHbpZTCharged(0), fhPtHbpZTUeCharged(0),
b1f720a7 104 fhXEChargedMC(), fhDeltaPhiChargedMC(),
105 fhDeltaPhiDeltaEtaChargedPtA3GeV(0),
106 fhDeltaPhiChargedPtA3GeV(0), fhDeltaEtaChargedPtA3GeV(0),
107 //Pile-Up
17af6e24 108 fhDeltaPhiChargedPileUp(), fhDeltaEtaChargedPileUp(),
fedea415 109 fhDeltaPhiChargedPtA3GeVPileUp(), fhDeltaEtaChargedPtA3GeVPileUp(),
110 fhXEChargedPileUp(), fhXEUeChargedPileUp(),
17af6e24 111 fhZTChargedPileUp(), fhZTUeChargedPileUp(),
112 fhPtTrigChargedPileUp(),
fedea415 113 fhDeltaPhiChargedOtherBC(), fhDeltaPhiChargedPtA3GeVOtherBC(),
114 fhXEChargedOtherBC(), fhXEUeChargedOtherBC(),
115 fhZTChargedOtherBC(), fhZTUeChargedOtherBC(),
116 fhPtTrigChargedOtherBC(),
2a9171b5 117 fhDeltaPhiChargedBC0(), fhDeltaPhiChargedPtA3GeVBC0(),
118 fhXEChargedBC0(), fhXEUeChargedBC0(),
119 fhZTChargedBC0(), fhZTUeChargedBC0(),
120 fhPtTrigChargedBC0(),
cc944149 121 fhDeltaPhiChargedVtxBC0(), fhDeltaPhiChargedPtA3GeVVtxBC0(),
122 fhXEChargedVtxBC0(), fhXEUeChargedVtxBC0(),
123 fhZTChargedVtxBC0(), fhZTUeChargedVtxBC0(),
124 fhPtTrigChargedVtxBC0(),
6ed1ad3e 125 fhDeltaPhiUeLeftCharged(0),
8cc41381 126 fhDeltaPhiUeLeftUpCharged(0), fhDeltaPhiUeRightUpCharged(0),
127 fhDeltaPhiUeLeftDownCharged(0), fhDeltaPhiUeRightDownCharged(0),
6ed1ad3e 128 fhXEUeLeftCharged(0),
8cc41381 129 fhXEUeLeftUpCharged(0), fhXEUeRightUpCharged(0),
130 fhXEUeLeftDownCharged(0), fhXEUeRightDownCharged(0),
6ed1ad3e 131 fhPtHbpXEUeLeftCharged(0), fhZTUeLeftCharged(0),
132 fhPtHbpZTUeLeftCharged(0),
05d0d05d 133 fhPtTrigPout(0), fhPtTrigCharged(0),
d4a8ff9a 134 fhDeltaPhiChargedMult(0x0), fhDeltaEtaChargedMult(0x0),
135 fhXEMult(0x0), fhXEUeMult(0x0),
136 fhZTMult(0x0), fhZTUeMult(0x0),
8cc41381 137 fhAssocPtBkg(0), fhDeltaPhiDeltaEtaAssocPtBin(0),
138 fhDeltaPhiAssocPtBin(0),
139 fhDeltaPhiAssocPtBinDEta08(0), fhDeltaPhiAssocPtBinDEta0(0),
2013f378 140 fhDeltaPhiAssocPtBinHMPID(0), fhDeltaPhiAssocPtBinHMPIDAcc(0),
66e64043 141 fhDeltaPhiBradAssocPtBin(0), fhDeltaPhiBrad(0),
a22f3f34 142 fhXEAssocPtBin(0), fhZTAssocPtBin(0),
143 fhXEVZ(0), fhZTVZ(0),
144 fhDeltaPhiDeltaEtaNeutral(0),
05d0d05d 145 fhPhiNeutral(0), fhEtaNeutral(0),
146 fhDeltaPhiNeutral(0), fhDeltaEtaNeutral(0),
147 fhDeltaPhiNeutralPt(0), fhDeltaPhiUeNeutralPt(0),
3f150b4b 148 fhXENeutral(0), fhXEUeNeutral(0),
149 fhPtHbpXENeutral(0), fhPtHbpXEUeNeutral(0),
150 fhZTNeutral(0), fhZTUeNeutral(0),
151 fhPtHbpZTNeutral(0), fhPtHbpZTUeNeutral(0),
6ed1ad3e 152 fhDeltaPhiUeLeftNeutral(0), fhXEUeLeftNeutral(0),
153 fhPtHbpXEUeLeftNeutral(0), fhZTUeLeftNeutral(0),
154 fhPtHbpZTUeLeftNeutral(0), fhPtPi0DecayRatio(0),
e7d2373d 155 fhDeltaPhiPi0DecayCharged(0), fhXEPi0DecayCharged(0), fhZTPi0DecayCharged(0),
156 fhDeltaPhiPi0DecayNeutral(0), fhXEPi0DecayNeutral(0), fhZTPi0DecayNeutral(0),
157 fhDeltaPhiDecayCharged(), fhXEDecayCharged(), fhZTDecayCharged(),
158 fhDeltaPhiDecayChargedAssocPtBin(),
be2df971 159 fhMCPtTrigger(), fhMCPhiTrigger(), fhMCEtaTrigger(),
160 fhMCPtTriggerNotLeading(), fhMCPhiTriggerNotLeading(), fhMCEtaTriggerNotLeading(),
161 fhMCEtaCharged(), fhMCPhiCharged(),
162 fhMCDeltaEtaCharged(), fhMCDeltaPhiCharged(),
163 fhMCDeltaPhiDeltaEtaCharged(), fhMCDeltaPhiChargedPt(),
164 fhMCPtXECharged(), fhMCPtXEUeCharged(),
165 fhMCPtXEUeLeftCharged(),
166 fhMCPtHbpXECharged(), fhMCPtHbpXEUeCharged(),
167 fhMCPtHbpXEUeLeftCharged(),
168 fhMCUePart(),
169 fhMCPtZTCharged(), fhMCPtZTUeCharged(),
170 fhMCPtZTUeLeftCharged(),
171 fhMCPtHbpZTCharged(), fhMCPtHbpZTUeCharged(),
172 fhMCPtHbpZTUeLeftCharged(),
173 fhMCPtTrigPout(), fhMCPtAssocDeltaPhi(),
029dea5a 174 //Mixing
31864468 175 fhNEventsTrigger(0), fhNtracksMB(0), fhNclustersMB(0),
029dea5a 176 fhMixDeltaPhiCharged(0), fhMixDeltaPhiDeltaEtaCharged(0),
18838011 177 fhMixXECharged(0), fhMixXEUeCharged(0), fhMixHbpXECharged(0),
2013f378 178 fhMixDeltaPhiChargedAssocPtBin(),
179 fhMixDeltaPhiChargedAssocPtBinDEta08(),
8cc41381 180 fhMixDeltaPhiChargedAssocPtBinDEta0(),
2013f378 181 fhMixDeltaPhiDeltaEtaChargedAssocPtBin(),
efb540af 182 fhEventBin(0), fhEventMixBin(0), fhEventMBBin(0)
029dea5a 183{
8cc41381 184 //Default Ctor
029dea5a 185
e09cf5ef 186 //Initialize parameters
187 InitParameters();
764ab1f4 188
0ff0cd12 189 for(Int_t i = 0; i < fgkNmcTypes; i++)
764ab1f4 190 {
55c20a99 191 fhPtTriggerMC[i] = 0;
764ab1f4 192 fhXEChargedMC[i] = 0;
b1f720a7 193 fhDeltaPhiChargedMC[i] = 0;
48c5da66 194 for(Int_t ib = 0; ib < 4; ib++) fhPtDecayTriggerMC[ib][i] = 0;
764ab1f4 195 }
48c5da66 196
197 for(Int_t ib = 0; ib < 4; ib++) fhPtDecayTrigger[ib] = 0;
198
17af6e24 199 for(Int_t i = 0; i < 7; i++)
200 {
55c20a99 201 fhPtTriggerPileUp [i] = 0 ;
17af6e24 202 fhDeltaPhiChargedPileUp [i] = 0 ; fhDeltaEtaChargedPileUp [i] = 0 ;
203 fhXEChargedPileUp [i] = 0 ; fhXEUeChargedPileUp [i] = 0 ;
204 fhZTChargedPileUp [i] = 0 ; fhZTUeChargedPileUp [i] = 0 ;
205 fhPtTrigChargedPileUp [i] = 0 ;
206 fhDeltaPhiChargedPtA3GeVPileUp[i] = 0 ; fhDeltaEtaChargedPtA3GeVPileUp[i] = 0 ;
17af6e24 207 }
208
e09cf5ef 209}
210
029dea5a 211//_________________________________________________________________
2bb7ac98 212AliAnaParticleHadronCorrelation::~AliAnaParticleHadronCorrelation()
029dea5a 213{
214 // Remove event containers
215
d07ffd54 216 if(DoOwnMix())
217 {
218 if(fListMixTrackEvents)
219 {
220 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
029dea5a 221 {
d07ffd54 222 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
223 {
224 for(Int_t irp=0; irp<GetNRPBin(); irp++)
225 {
226 Int_t bin = GetEventMixBin(ic, iz, irp);
227 fListMixTrackEvents[bin]->Delete() ;
228 delete fListMixTrackEvents[bin] ;
229 }
230 }
029dea5a 231 }
232 }
d07ffd54 233
234 delete[] fListMixTrackEvents;
235
236 if(fListMixCaloEvents)
237 {
238 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
239 {
240 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
241 {
242 for(Int_t irp=0; irp<GetNRPBin(); irp++)
243 {
244 Int_t bin = GetEventMixBin(ic, iz, irp);
245 fListMixCaloEvents[bin]->Delete() ;
246 delete fListMixCaloEvents[bin] ;
247 }
248 }
249 }
250 }
251
252 delete[] fListMixCaloEvents;
029dea5a 253
254 }
255}
256
b6afb6b1 257//__________________________________________________________________________________________________________________________________________
22ad7981 258void AliAnaParticleHadronCorrelation::FillChargedAngularCorrelationHistograms(Float_t ptAssoc, Float_t ptTrig, Int_t bin,
6ed1ad3e 259 Float_t phiAssoc, Float_t phiTrig, Float_t deltaPhi,
22ad7981 260 Float_t etaAssoc, Float_t etaTrig,
e7d2373d 261 Int_t decayTag, Float_t hmpidSignal, Int_t outTOF,
d4a8ff9a 262 Int_t cen, Int_t mcTag)
907b38cd 263{
264 // Fill angular correlation related histograms
265
266 Float_t deltaEta = etaTrig-etaAssoc;
6ed1ad3e 267 Float_t deltaPhiOrg = phiTrig-phiAssoc;
907b38cd 268
b1f720a7 269 fhEtaCharged ->Fill(ptAssoc,etaAssoc);
270 fhPhiCharged ->Fill(ptAssoc,phiAssoc);
271 fhDeltaEtaCharged ->Fill(ptTrig ,deltaEta);
272 fhDeltaPhiCharged ->Fill(ptTrig ,deltaPhi);
273 fhDeltaPhiChargedPt->Fill(ptAssoc, deltaPhi);
274 fhDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
275
276 if(ptAssoc > 3 )
277 {
278 fhDeltaEtaChargedPtA3GeV ->Fill(ptTrig ,deltaEta);
279 fhDeltaPhiChargedPtA3GeV ->Fill(ptTrig ,deltaPhi);
280 fhDeltaPhiDeltaEtaChargedPtA3GeV->Fill(deltaPhi, deltaEta);
281 }
907b38cd 282
b1f720a7 283 // Pile up studies
17af6e24 284
0cea6003 285 if(IsPileUpAnalysisOn())
b1f720a7 286 {
2a9171b5 287 if (outTOF==1)
fedea415 288 {
560498d1 289 fhDeltaPhiChargedOtherBC->Fill(ptTrig ,deltaPhi) ;
fedea415 290 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVOtherBC->Fill(ptTrig ,deltaPhi) ;
291 }
2a9171b5 292 else if(outTOF==0)
293 {
294 fhDeltaPhiChargedBC0->Fill(ptTrig ,deltaPhi) ;
295 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVBC0->Fill(ptTrig ,deltaPhi) ;
296 }
fedea415 297
cc944149 298 Int_t vtxBC = GetReader()->GetVertexBC();
299 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
300 {
301 fhDeltaPhiChargedVtxBC0->Fill(ptTrig ,deltaPhi) ;
302 if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVVtxBC0->Fill(ptTrig ,deltaPhi) ;
303 }
304
17af6e24 305 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
306 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
307 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
308 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
309 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
310 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
311 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
312
b1f720a7 313 if(ptAssoc > 3 )
314 {
17af6e24 315 if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaPhi) ; }
316 if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaPhi) ; }
317 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaPhi) ; }
318 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaPhi) ; }
319 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaPhi) ; }
320 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaPhi) ; }
321 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaPhi) ; }
b1f720a7 322 }
323 }
324
325 if(IsDataMC())
326 {
327 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
328 fhDeltaPhiChargedMC[mcIndex]->Fill(ptTrig , deltaPhi);
e23c7107 329 if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) && mcIndex==2 )
4a296f4a 330 fhDeltaPhiChargedMC[7]->Fill(ptTrig , deltaPhi);
331 }
907b38cd 332
e7d2373d 333 if(fDecayTrigger && decayTag > 0)
334 {
335 for(Int_t ibit = 0; ibit<fNDecayBits; ibit++)
336 {
337 if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit])) fhDeltaPhiDecayCharged[ibit]->Fill(ptTrig,deltaPhi);
338 }
339 }
907b38cd 340
341 Double_t dphiBrad = -100;
342 if(fFillBradHisto)
343 {
344 dphiBrad = atan2(sin(deltaPhiOrg), cos(deltaPhiOrg))/TMath::Pi();//-1 to 1
2af40966 345 if( TMath::Abs(dphiBrad) > 0.325 && TMath::Abs(dphiBrad) < 0.475 ) //Hardcoded values, BAD, FIXME
907b38cd 346 {
347 fhAssocPtBkg->Fill(ptTrig, ptAssoc);
348 }
349
2af40966 350 if( dphiBrad < -1./3 ) dphiBrad += 2;
907b38cd 351 fhDeltaPhiBrad->Fill(ptTrig, dphiBrad);
352 }
353
354 // Fill histograms in bins of associated particle pT
8cc41381 355 if(bin>=0)
907b38cd 356 {
8cc41381 357 fhDeltaPhiDeltaEtaAssocPtBin [bin]->Fill(deltaPhi,deltaEta);
358
359 fhDeltaPhiAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
2013f378 360
a22f3f34 361 if(fFillEtaGapsHisto)
362 {
363 if(TMath::Abs(deltaEta)> 0.8)
364 fhDeltaPhiAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
365
366 if(TMath::Abs(deltaEta)< 0.01)
367 fhDeltaPhiAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
368 }
2013f378 369
370 if (fFillBradHisto)
8cc41381 371 fhDeltaPhiBradAssocPtBin [bin]->Fill(ptTrig, dphiBrad);
2013f378 372
e7d2373d 373 if(fDecayTrigger && decayTag > 0 && fNDecayBits > 0 &&
374 GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[0]))
8cc41381 375 fhDeltaPhiDecayChargedAssocPtBin[bin]->Fill(ptTrig, deltaPhi);
907b38cd 376
377 if(fHMPIDCorrelation)
378 {
379 if( hmpidSignal > 0 )
380 {
381 //printf("Track pt %f with HMPID signal %f \n",pt,hmpidSignal);
8cc41381 382 fhDeltaPhiAssocPtBinHMPID[bin]->Fill(ptTrig, deltaPhi);
907b38cd 383 }
384
385 if(phiAssoc > 5*TMath::DegToRad() && phiAssoc < 20*TMath::DegToRad())
386 {
387 //printf("Track pt %f in HMPID acceptance phi %f \n ",pt,phi*TMath::RadToDeg() );
8cc41381 388 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->Fill(ptTrig, deltaPhi);
907b38cd 389 }
390 }
391 }
392
d4a8ff9a 393 //fill different multiplicity/centrality histogram
0cea6003 394 if(IsHighMultiplicityAnalysisOn() && cen >= 0 && cen < GetNCentrBin())
907b38cd 395 {
d4a8ff9a 396 fhDeltaPhiChargedMult[cen]->Fill(ptTrig,deltaPhi);
397 fhDeltaEtaChargedMult[cen]->Fill(ptTrig,deltaEta);
907b38cd 398 }
399}
400
55c20a99 401//___________________________________________________________________________________________________________________________________
402Bool_t AliAnaParticleHadronCorrelation::FillChargedMCCorrelationHistograms(Float_t mcAssocPt, Float_t mcAssocPhi, Float_t mcAssocEta,
be2df971 403 Float_t mcTrigPt, Float_t mcTrigPhi, Float_t mcTrigEta,
4a296f4a 404 Int_t histoIndex, Bool_t lostDecayPair)
907b38cd 405{
406 // Fill MC histograms independently of AOD or ESD
407
63ac03db 408 Bool_t lead = kTRUE;
907b38cd 409
63ac03db 410 // In case we requested the trigger to be a leading particle,
411 // check if this is true at the MC level.
412 // Not sure if it is correct to skip or not skip this.
413 // Absolute leading?
414 if( fMakeAbsoluteLeading && mcAssocPt > mcTrigPt ) lead = kFALSE; // skip event
415
416 // Skip this event if near side associated particle pt larger than trigger
98604e3a 417 if( mcAssocPhi < 0 ) mcAssocPhi+=TMath::TwoPi();
418
419 Float_t mcdeltaPhi= mcTrigPhi-mcAssocPhi;
420 if(mcdeltaPhi <= -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
421 if(mcdeltaPhi > 3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
422
423 if( fMakeNearSideLeading)
424 {
425 if( mcAssocPt > mcTrigPt && mcdeltaPhi < TMath::PiOver2() ) lead = kFALSE; // skip event
426 }
be2df971 427
63ac03db 428 //
429 // Select only hadrons in pt range
430 if ( mcAssocPt < fMinAssocPt || mcAssocPt > fMaxAssocPt ) return lead ; // exclude but continue
431 if ( mcAssocPt < GetReader()->GetCTSPtMin()) return lead ;
432
907b38cd 433
63ac03db 434 //
435 // Remove trigger itself for correlation when use charged triggers
907b38cd 436 if(TMath::Abs(mcAssocPt -mcTrigPt ) < 1e-6 &&
98604e3a 437 mcdeltaPhi < 1e-6 &&
63ac03db 438 TMath::Abs(mcAssocEta-mcTrigEta) < 1e-6) return lead ; // exclude but continue
907b38cd 439
907b38cd 440 Float_t mcxE =-mcAssocPt/mcTrigPt*TMath::Cos(mcdeltaPhi);// -(mcAssocPx*pxprim+mcAssocPy*pyprim)/(mcTrigPt*mcTrigPt);
441 Float_t mchbpXE =-100 ;
f16872ec 442 if(mcxE > 0 ) mchbpXE = TMath::Log(1./mcxE);
907b38cd 443
444 Float_t mczT = mcAssocPt/mcTrigPt ;
445 Float_t mchbpZT =-100 ;
f16872ec 446 if(mczT > 0 ) mchbpZT = TMath::Log(1./mczT);
907b38cd 447
907b38cd 448 Double_t mcpout = mcAssocPt*TMath::Sin(mcdeltaPhi) ;
449
2db10729 450 AliDebug(1,Form("Charged hadron: track Pt %f, track Phi %f, phi trigger %f. Cuts: delta phi %2.2f < %2.2f < %2.2f",
451 mcAssocPt,mcAssocPhi, mcTrigPhi,fDeltaPhiMinCut, mcdeltaPhi, fDeltaPhiMaxCut));
452
907b38cd 453
454 // Fill Histograms
be2df971 455 fhMCEtaCharged [histoIndex]->Fill(mcAssocPt, mcAssocEta);
456 fhMCPhiCharged [histoIndex]->Fill(mcAssocPt, mcAssocPhi);
457 fhMCDeltaEtaCharged[histoIndex]->Fill(mcTrigPt , mcTrigEta-mcAssocEta);
458 fhMCDeltaPhiCharged[histoIndex]->Fill(mcTrigPt , mcdeltaPhi);
459 fhMCPtAssocDeltaPhi[histoIndex]->Fill(mcAssocPt, mcdeltaPhi);
907b38cd 460
be2df971 461 fhMCDeltaPhiDeltaEtaCharged[histoIndex]->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
907b38cd 462
463 //delta phi cut for correlation
464 if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
465 {
be2df971 466 fhMCDeltaPhiChargedPt[histoIndex]->Fill(mcAssocPt,mcdeltaPhi);
467 fhMCPtXECharged [histoIndex]->Fill(mcTrigPt, mcxE);
468 fhMCPtHbpXECharged [histoIndex]->Fill(mcTrigPt, mchbpXE);
469 fhMCPtZTCharged [histoIndex]->Fill(mcTrigPt, mczT);
470 fhMCPtHbpZTCharged [histoIndex]->Fill(mcTrigPt, mchbpZT);
471 fhMCPtTrigPout [histoIndex]->Fill(mcTrigPt, mcpout) ;
907b38cd 472 }
9623bf34 473
4a296f4a 474 if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
475 {
476 fhMCEtaCharged [7]->Fill(mcAssocPt, mcAssocEta);
477 fhMCPhiCharged [7]->Fill(mcAssocPt, mcAssocPhi);
478 fhMCDeltaEtaCharged[7]->Fill(mcTrigPt , mcTrigEta-mcAssocEta);
479 fhMCDeltaPhiCharged[7]->Fill(mcTrigPt , mcdeltaPhi);
480 fhMCPtAssocDeltaPhi[7]->Fill(mcAssocPt, mcdeltaPhi);
481
482 fhMCDeltaPhiDeltaEtaCharged[7]->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
483
484 //delta phi cut for correlation
485 if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
486 {
487 fhMCDeltaPhiChargedPt[7]->Fill(mcAssocPt,mcdeltaPhi);
488 fhMCPtXECharged [7]->Fill(mcTrigPt, mcxE);
489 fhMCPtHbpXECharged [7]->Fill(mcTrigPt, mchbpXE);
490 fhMCPtZTCharged [7]->Fill(mcTrigPt, mczT);
491 fhMCPtHbpZTCharged [7]->Fill(mcTrigPt, mchbpZT);
492 fhMCPtTrigPout [7]->Fill(mcTrigPt, mcpout) ;
493 }
494 }
495
6ed1ad3e 496 // Underlying event
9623bf34 497
6ed1ad3e 498 // Right
c78eef61 499 if ( (mcdeltaPhi > fUeDeltaPhiMinCut) && (mcdeltaPhi < fUeDeltaPhiMaxCut) )
500 {
501 //Double_t randomphi = gRandom->Uniform(TMath::Pi()/2,3*TMath::Pi()/2);
502 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
503 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
504 Double_t mcUezT = mcAssocPt/mcTrigPt;
6ed1ad3e 505
2af40966 506 if(mcUexE < 0.)
2db10729 507 AliWarning(Form("Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
508 mcUexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
2af40966 509
be2df971 510 fhMCPtXEUeCharged[histoIndex]->Fill(mcTrigPt,mcUexE);
511 if(mcUexE > 0) fhMCPtHbpXEUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
6ed1ad3e 512
be2df971 513 fhMCPtZTUeCharged[histoIndex]->Fill(mcTrigPt,mcUezT);
514 if(mcUezT > 0) fhMCPtHbpZTUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
c78eef61 515
be2df971 516 fhMCUePart[histoIndex]->Fill(mcTrigPt);
4a296f4a 517
518 if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
519 {
520 fhMCPtXEUeCharged[7]->Fill(mcTrigPt,mcUexE);
521 if(mcUexE > 0) fhMCPtHbpXEUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
522
523 fhMCPtZTUeCharged[7]->Fill(mcTrigPt,mcUezT);
524 if(mcUezT > 0) fhMCPtHbpZTUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
525
526 fhMCUePart[7]->Fill(mcTrigPt);
527 }
c78eef61 528 }
6ed1ad3e 529
530 if(fMakeSeveralUE)
c78eef61 531 {
6ed1ad3e 532 // Left
533 if((mcdeltaPhi<-fUeDeltaPhiMinCut) || (mcdeltaPhi >2*fUeDeltaPhiMaxCut))
534 {
535 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
536 Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi);
537 Double_t mcUezT = mcAssocPt/mcTrigPt;
538
2af40966 539 if(mcUexE < 0.)
2db10729 540 AliWarning(Form("Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
541 mcUexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
6ed1ad3e 542
be2df971 543 fhMCPtXEUeLeftCharged[histoIndex]->Fill(mcTrigPt,mcUexE);
544 if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
6ed1ad3e 545
be2df971 546 fhMCPtZTUeLeftCharged[histoIndex]->Fill(mcTrigPt,mcUezT);
f3c4fca3 547 if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
4a296f4a 548
549 if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
550 {
551 fhMCPtXEUeLeftCharged[7]->Fill(mcTrigPt,mcUexE);
552 if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged[7]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
553
554 fhMCPtZTUeLeftCharged[7]->Fill(mcTrigPt,mcUezT);
555 if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[7]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
556 }
6ed1ad3e 557 }
c78eef61 558 }
907b38cd 559
63ac03db 560 return lead;
6ed1ad3e 561}
907b38cd 562
563//___________________________________________________________________________________________________________________
22ad7981 564void AliAnaParticleHadronCorrelation::FillChargedMomentumImbalanceHistograms(Float_t ptTrig, Float_t ptAssoc,
b6afb6b1 565 Float_t deltaPhi,
d4a8ff9a 566 Int_t cen, Int_t charge,
e7d2373d 567 Int_t bin, Int_t decayTag,
22ad7981 568 Int_t outTOF, Int_t mcTag)
907b38cd 569
570{
571 // Fill mostly momentum imbalance related histograms
572
f3c4fca3 573 Float_t zT = ptAssoc/ptTrig ;
574 Float_t xE =-ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
575 Float_t pout = ptAssoc*TMath::Sin(deltaPhi) ;
2af40966 576
577 if(xE < 0.)
2db10729 578 AliWarning(Form("Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
579 xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
2af40966 580
f3c4fca3 581 Float_t hbpXE = -100;
582 Float_t hbpZT = -100;
583
b6afb6b1 584 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
f3c4fca3 585 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
b6afb6b1 586
727a309a 587 fhXECharged ->Fill(ptTrig , xE);
907b38cd 588 fhPtHbpXECharged ->Fill(ptTrig , hbpXE);
589 fhZTCharged ->Fill(ptTrig , zT);
590 fhPtHbpZTCharged ->Fill(ptTrig , hbpZT);
591 fhPtTrigPout ->Fill(ptTrig , pout) ;
592 fhPtTrigCharged ->Fill(ptTrig , ptAssoc) ;
b6afb6b1 593 if((deltaPhi > 5*TMath::Pi()/6.) && (deltaPhi < 7*TMath::Pi()/6.))
594 {
727a309a 595 fhXECharged_Cone2 ->Fill(ptTrig , xE);
596 fhPtHbpXECharged_Cone2 ->Fill(ptTrig , hbpXE);
597 }
907b38cd 598
f3c4fca3 599 // MC
600 if(IsDataMC())
601 {
602 Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
603 fhXEChargedMC[mcIndex]->Fill(ptTrig , xE);
e23c7107 604 if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) && mcIndex==2 )
4a296f4a 605 fhXEChargedMC[7]->Fill(ptTrig , xE);
f3c4fca3 606 }
607
b1f720a7 608 // Pile up studies
0cea6003 609 if(IsPileUpAnalysisOn())
b1f720a7 610 {
2a9171b5 611 if (outTOF==1)
fedea415 612 {
613 fhXEChargedOtherBC ->Fill(ptTrig,xE);
614 fhZTChargedOtherBC ->Fill(ptTrig,zT);
615 fhPtTrigChargedOtherBC->Fill(ptTrig,ptAssoc);
616 }
2a9171b5 617 else if(outTOF==0)
618 {
619 fhXEChargedBC0 ->Fill(ptTrig,xE);
620 fhZTChargedBC0 ->Fill(ptTrig,zT);
621 fhPtTrigChargedBC0->Fill(ptTrig,ptAssoc);
622 }
623
cc944149 624 Int_t vtxBC = GetReader()->GetVertexBC();
625 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
626 {
627 fhXEChargedVtxBC0 ->Fill(ptTrig,xE);
628 fhZTChargedVtxBC0 ->Fill(ptTrig,zT);
629 fhPtTrigChargedVtxBC0->Fill(ptTrig,ptAssoc);
630 }
631
fedea415 632 if(GetReader()->IsPileUpFromSPD()) { fhXEChargedPileUp[0]->Fill(ptTrig,xE); fhZTChargedPileUp[0]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[0]->Fill(ptTrig,ptAssoc); }
633 if(GetReader()->IsPileUpFromEMCal()) { fhXEChargedPileUp[1]->Fill(ptTrig,xE); fhZTChargedPileUp[1]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[1]->Fill(ptTrig,ptAssoc); }
634 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEChargedPileUp[2]->Fill(ptTrig,xE); fhZTChargedPileUp[2]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[2]->Fill(ptTrig,ptAssoc); }
635 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEChargedPileUp[3]->Fill(ptTrig,xE); fhZTChargedPileUp[3]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[3]->Fill(ptTrig,ptAssoc); }
636 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEChargedPileUp[4]->Fill(ptTrig,xE); fhZTChargedPileUp[4]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[4]->Fill(ptTrig,ptAssoc); }
637 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEChargedPileUp[5]->Fill(ptTrig,xE); fhZTChargedPileUp[5]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[5]->Fill(ptTrig,ptAssoc); }
638 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEChargedPileUp[6]->Fill(ptTrig,xE); fhZTChargedPileUp[6]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[6]->Fill(ptTrig,ptAssoc); }
b1f720a7 639 }
640
e7d2373d 641 if(fDecayTrigger && decayTag > 0)
642 {
643 for(Int_t ibit = 0; ibit<fNDecayBits; ibit++)
644 {
645 if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit]))
646 {
647 fhXEDecayCharged[ibit]->Fill(ptTrig,xE);
648 fhZTDecayCharged[ibit]->Fill(ptTrig,zT);
649 }
650 }
651 } // photon decay pi0/eta trigger
907b38cd 652
a22f3f34 653 if(bin >= 0 && fFillMomImbalancePtAssocBinsHisto)//away side
907b38cd 654 {
8cc41381 655 fhXEAssocPtBin[bin]->Fill(ptTrig, xE) ;
656 fhZTAssocPtBin[bin]->Fill(ptTrig, zT) ;
907b38cd 657 }
658
a22f3f34 659 if(fCorrelVzBin)
660 {
661 Int_t vz = GetEventVzBin();
662 fhXEVZ[vz]->Fill(ptTrig, xE) ;
663 fhZTVZ[vz]->Fill(ptTrig, zT) ;
664 }
665
907b38cd 666 if(charge > 0)
667 {
668 fhXEPosCharged->Fill(ptTrig,xE) ;
669 fhZTPosCharged->Fill(ptTrig,zT) ;
670 }
671 else
672 {
673 fhXENegCharged->Fill(ptTrig,xE) ;
674 fhZTNegCharged->Fill(ptTrig,zT) ;
675 }
676
d4a8ff9a 677 //fill different multiplicity/centrality histogram
0cea6003 678 if(IsHighMultiplicityAnalysisOn() && cen >= 0 && cen < GetNCentrBin())
907b38cd 679 {
d4a8ff9a 680 fhXEMult[cen]->Fill(ptTrig,xE);
681 fhZTMult[cen]->Fill(ptTrig,zT);
682 } //multiplicity/centrality events selection
907b38cd 683}
684
685//_______________________________________________________________________________________________________________________
22ad7981 686void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventHistograms(Float_t ptTrig, Float_t ptAssoc,
d4a8ff9a 687 Float_t deltaPhi, Int_t cen, Int_t outTOF)
907b38cd 688{
689 // Fill underlying event histograms
690
6ed1ad3e 691 fhUePart->Fill(ptTrig);
692
907b38cd 693 fhDeltaPhiUeChargedPt->Fill(ptAssoc,deltaPhi);
694
08f220c8 695 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
907b38cd 696 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
697 Double_t uezT = ptAssoc/ptTrig;
698
2af40966 699 if(uexE < 0.)
2db10729 700 AliWarning(Form("Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
701 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
6ed1ad3e 702
907b38cd 703 fhXEUeCharged->Fill(ptTrig,uexE);
f16872ec 704 if(uexE > 0) fhPtHbpXEUeCharged->Fill(ptTrig,TMath::Log(1/uexE));
907b38cd 705
706 fhZTUeCharged->Fill(ptTrig,uezT);
76fc98bb 707 if(uezT > 0) fhPtHbpZTUeCharged->Fill(ptTrig,TMath::Log(1/uezT));
907b38cd 708
b1f720a7 709 // Pile up studies
17af6e24 710
0cea6003 711 if(IsPileUpAnalysisOn())
b1f720a7 712 {
2a9171b5 713 if (outTOF==1)
fedea415 714 {
715 fhXEUeChargedOtherBC->Fill(ptTrig,uexE);
716 fhZTUeChargedOtherBC->Fill(ptTrig,uezT);
717 }
2a9171b5 718 else if(outTOF==0)
719 {
720 fhXEUeChargedBC0->Fill(ptTrig,uexE);
721 fhZTUeChargedBC0->Fill(ptTrig,uezT);
722 }
fedea415 723
cc944149 724 Int_t vtxBC = GetReader()->GetVertexBC();
725 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA)
726 {
727 fhXEUeChargedVtxBC0->Fill(ptTrig,uexE);
728 fhZTUeChargedVtxBC0->Fill(ptTrig,uezT);
729 }
730
17af6e24 731 if(GetReader()->IsPileUpFromSPD()) { fhXEUeChargedPileUp[0]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[0]->Fill(ptTrig,uezT);}
732 if(GetReader()->IsPileUpFromEMCal()) { fhXEUeChargedPileUp[1]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[1]->Fill(ptTrig,uezT);}
733 if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEUeChargedPileUp[2]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[2]->Fill(ptTrig,uezT);}
734 if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEUeChargedPileUp[3]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[3]->Fill(ptTrig,uezT);}
735 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEUeChargedPileUp[4]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[4]->Fill(ptTrig,uezT);}
736 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEUeChargedPileUp[5]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[5]->Fill(ptTrig,uezT);}
737 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEUeChargedPileUp[6]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[6]->Fill(ptTrig,uezT);}
738 }
b1f720a7 739
d4a8ff9a 740 //fill different multiplicity/centrality histogram
0cea6003 741 if(IsHighMultiplicityAnalysisOn() && cen >= 0 && cen < GetNCentrBin())
907b38cd 742 {
d4a8ff9a 743 fhXEUeMult[cen]->Fill(ptTrig,uexE);
744 fhZTUeMult[cen]->Fill(ptTrig,uezT);
745 }
907b38cd 746}
747
8cc41381 748//_____________________________________________________________________________________________________
22ad7981 749void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventSidesHistograms(Float_t ptTrig,
750 Float_t ptAssoc,
751 Float_t deltaPhi)
907b38cd 752{
6ed1ad3e 753 // Fill underlying event histograms to the left and right of trigger
754 // Right cone is the default UE.
755
08f220c8 756 if((deltaPhi<-fUeDeltaPhiMinCut) || (deltaPhi >2*fUeDeltaPhiMaxCut))
6ed1ad3e 757 {
758 fhDeltaPhiUeLeftCharged->Fill(ptAssoc,deltaPhi);
08f220c8 759 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
760 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
761 Double_t uezT = ptAssoc/ptTrig;
6ed1ad3e 762
2af40966 763 if(uexE < 0.)
2db10729 764 AliWarning(Form("Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
765 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
08f220c8 766
767 fhXEUeLeftCharged->Fill(ptTrig,uexE);
768 if(uexE > 0) fhPtHbpXEUeLeftCharged->Fill(ptTrig,TMath::Log(1/uexE));
6ed1ad3e 769
08f220c8 770 fhZTUeLeftCharged->Fill(ptTrig,uezT);
f3c4fca3 771 if(uezT > 0) fhPtHbpZTUeLeftCharged->Fill(ptTrig,TMath::Log(1/uezT));
772
907b38cd 773 fhDeltaPhiUeLeftCharged->Fill(ptAssoc, deltaPhi);
907b38cd 774 }
775
8cc41381 776 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-TMath::Pi()/2))
6ed1ad3e 777 {
778 fhDeltaPhiUeLeftDownCharged->Fill(ptAssoc,deltaPhi);
8cc41381 779 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
780 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
781
2af40966 782 if(uexE < 0.)
2db10729 783 AliWarning(Form("Careful!!, negative xE %2.2f for left-down UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
784 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
8cc41381 785
786 fhXEUeLeftDownCharged->Fill(ptTrig,uexE);
787 }
788
789 if((deltaPhi>2*fUeDeltaPhiMaxCut) && (deltaPhi <3*TMath::Pi()/2))
6ed1ad3e 790 {
791 fhDeltaPhiUeLeftUpCharged->Fill(ptAssoc,deltaPhi);
8cc41381 792 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
793 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
794
2af40966 795 if(uexE < 0.)
2db10729 796 AliWarning(Form("Careful!!, negative xE %2.2f for left-up UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
797 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
8cc41381 798
799 fhXEUeLeftUpCharged->Fill(ptTrig,uexE);
800 }
801
802 if((deltaPhi > TMath::Pi()/2) && (deltaPhi < fUeDeltaPhiMaxCut))
6ed1ad3e 803 {
804 fhDeltaPhiUeRightUpCharged->Fill(ptAssoc,deltaPhi);
8cc41381 805 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
806 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
807
2af40966 808 if(uexE < 0.)
2db10729 809 AliWarning(Form("Careful!!, negative xE %2.2f for right-up UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
810 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
8cc41381 811
812 fhXEUeRightUpCharged->Fill(ptTrig,uexE);
813 }
814
815 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < TMath::Pi()/2))
6ed1ad3e 816 {
817 fhDeltaPhiUeRightDownCharged->Fill(ptAssoc,deltaPhi);
8cc41381 818 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
819 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
820
2af40966 821 if(uexE < 0.)
2db10729 822 AliWarning(Form("Careful!!, negative xE %2.2f for right-down UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
823 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
8cc41381 824
825 fhXEUeRightDownCharged->Fill(ptTrig,uexE);
6ed1ad3e 826 }
907b38cd 827}
828
349eb23d 829//_____________________________________________________________________________________________________________________________________
830void AliAnaParticleHadronCorrelation::FillDecayPhotonCorrelationHistograms(Float_t ptAssoc, Float_t phiAssoc, Bool_t bChargedOrNeutral)
907b38cd 831{
832 // Do correlation with decay photons of triggered pi0 or eta
833
834 // Calculate the correlation parameters
349eb23d 835 Float_t ptDecay1 = fDecayMom1.Pt();
836 Float_t ptDecay2 = fDecayMom2.Pt();
907b38cd 837
838 Float_t zTDecay1 = -100, zTDecay2 = -100;
5a04739d 839 if(ptDecay1 > 0) zTDecay1 = ptAssoc/ptDecay1 ;
840 if(ptDecay2 > 0) zTDecay2 = ptAssoc/ptDecay2 ;
907b38cd 841
349eb23d 842 Float_t deltaPhiDecay1 = fDecayMom1.Phi()-phiAssoc;
907b38cd 843 if(deltaPhiDecay1< -TMath::PiOver2()) deltaPhiDecay1+=TMath::TwoPi();
844 if(deltaPhiDecay1>3*TMath::PiOver2()) deltaPhiDecay1-=TMath::TwoPi();
845
349eb23d 846 Float_t deltaPhiDecay2 = fDecayMom2.Phi()-phiAssoc;
907b38cd 847 if(deltaPhiDecay2< -TMath::PiOver2()) deltaPhiDecay2+=TMath::TwoPi();
848 if(deltaPhiDecay2>3*TMath::PiOver2()) deltaPhiDecay2-=TMath::TwoPi();
849
850 Float_t xEDecay1 =-zTDecay1*TMath::Cos(deltaPhiDecay1); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
851 Float_t xEDecay2 =-zTDecay2*TMath::Cos(deltaPhiDecay2); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
852
853 if(bChargedOrNeutral) // correlate with charges
854 {
e7d2373d 855 fhDeltaPhiPi0DecayCharged->Fill(ptDecay1, deltaPhiDecay1);
856 fhDeltaPhiPi0DecayCharged->Fill(ptDecay2, deltaPhiDecay2);
907b38cd 857
2db10729 858 AliDebug(2,Form("deltaPhoton1 = %f, deltaPhoton2 = %f", deltaPhiDecay1, deltaPhiDecay2));
907b38cd 859
860 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
861 {
e7d2373d 862 fhZTPi0DecayCharged->Fill(ptDecay1,zTDecay1);
863 fhXEPi0DecayCharged->Fill(ptDecay1,xEDecay1);
907b38cd 864 }
865 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
866 {
e7d2373d 867 fhZTPi0DecayCharged->Fill(ptDecay2,zTDecay2);
868 fhXEPi0DecayCharged->Fill(ptDecay2,xEDecay2);
907b38cd 869 }
870 }
871 else // correlate with neutrals
872 {
e7d2373d 873 fhDeltaPhiPi0DecayNeutral->Fill(ptDecay1, deltaPhiDecay1);
874 fhDeltaPhiPi0DecayNeutral->Fill(ptDecay2, deltaPhiDecay2);
907b38cd 875
2db10729 876 AliDebug(2,Form("deltaPhoton1 = %f, deltaPhoton2 = %f", deltaPhiDecay1, deltaPhiDecay2));
907b38cd 877
878 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
879 {
e7d2373d 880 fhZTPi0DecayNeutral->Fill(ptDecay1,zTDecay1);
881 fhXEPi0DecayNeutral->Fill(ptDecay1,xEDecay1);
907b38cd 882 }
883 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
884 {
e7d2373d 885 fhZTPi0DecayNeutral->Fill(ptDecay2,zTDecay2);
886 fhXEPi0DecayNeutral->Fill(ptDecay2,xEDecay2);
907b38cd 887 }
888 }
889}
890
907b38cd 891//_____________________________________________________________________________________________________________________________
22ad7981 892void AliAnaParticleHadronCorrelation::FillNeutralUnderlyingEventSidesHistograms(Float_t ptTrig, Float_t ptAssoc,
fe69395f 893 Float_t zT, Float_t hbpZT,
22ad7981 894 Float_t deltaPhi)
907b38cd 895{
6ed1ad3e 896 // Fill underlying event histograms to the left of trigger
897 // Right is the default case
907b38cd 898
fe69395f 899 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
900
901 Float_t xE =-ptAssoc/ptTrig*TMath::Cos(randomphi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
902 Float_t hbpXE = -100;
903 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
904
907b38cd 905 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-fUeDeltaPhiMaxCut))
fe69395f 906 {
907b38cd 907 fhDeltaPhiUeLeftNeutral->Fill(ptAssoc, deltaPhi);
908 fhXEUeLeftNeutral ->Fill(ptTrig , xE);
909 fhPtHbpXEUeLeftNeutral ->Fill(ptTrig , hbpXE);
910 fhZTUeLeftNeutral ->Fill(ptTrig , zT);
911 fhPtHbpZTUeLeftNeutral ->Fill(ptTrig , hbpZT);
912 }
907b38cd 913}
914
31864468 915//______________________________________________________
916void AliAnaParticleHadronCorrelation::FillEventMixPool()
917{
225ad4bd 918 // Fill the pool with tracks or clusters if requested
31864468 919
225ad4bd 920 if ( !DoOwnMix() ) return;
921
922 FillChargedEventMixPool();
923
924 // Do the cluster pool filling only if requested
925 // or in case of isolation cut using clusters in the cone.
926 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
927
928 if( !fFillNeutralEventMixPool && !isoCase) return;
31864468 929
225ad4bd 930 FillNeutralEventMixPool();
31864468 931}
932
029dea5a 933//_____________________________________________________________
934void AliAnaParticleHadronCorrelation::FillChargedEventMixPool()
935{
d07ffd54 936 // Mixed event pool filling for tracks
31864468 937
7ed3a248 938 if(fUseMixStoredInReader && GetReader()->GetLastTracksMixedEvent() == GetEventNumber())
939 {
940 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
941 return ; // pool filled previously for another trigger
942 }
943
029dea5a 944 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
945 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
946
c6b4facc 947 if(!inputHandler) return ;
31864468 948
d07ffd54 949 // Do mixing only with MB event (or the chosen mask), if not skip
950 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
951
d07ffd54 952 Int_t eventBin = GetEventMixBin();
953
954 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
955 if(eventBin < 0) return;
956
efb540af 957 fhEventMBBin->Fill(eventBin);
958
d07ffd54 959 TObjArray * mixEventTracks = new TObjArray;
960
961 if(fUseMixStoredInReader)
029dea5a 962 {
d07ffd54 963 fListMixTrackEvents[eventBin] = GetReader()->GetListWithMixedEventsForTracks(eventBin);
964 }
965
966 if(!fListMixTrackEvents[eventBin]) fListMixTrackEvents[eventBin] = new TList();
967
968 //printf("%s ***** Pool Event bin : %d - nTracks %d\n",GetInputAODName().Data(),eventBin, GetCTSTracks()->GetEntriesFast());
969
970 TList * pool = fListMixTrackEvents[eventBin];
971
d07ffd54 972 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
973 {
974 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
029dea5a 975
349eb23d 976 fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz());
977 Float_t pt = fTrackVector.Pt();
2e876d85 978
d07ffd54 979 //Select only hadrons in pt range
980 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
029dea5a 981
349eb23d 982 AliAODPWG4Particle * mixedTrack = new AliAODPWG4Particle(track->Px(),track->Py(),track->Pz(),0);
cb67d5f1 983 mixedTrack->SetDetectorTag(kCTS);
d07ffd54 984 mixedTrack->SetChargedBit(track->Charge()>0);
985 mixEventTracks->Add(mixedTrack);
986 }
987
7aaa6c97 988 fhNtracksMB->Fill(mixEventTracks->GetEntriesFast(),eventBin);
989
d07ffd54 990 //Set the event number where the last event was added, to avoid double pool filling
991 GetReader()->SetLastTracksMixedEvent(GetEventNumber());
992
993 //printf("Add event to pool with %d tracks \n ",mixEventTracks->GetEntries());
994 pool->AddFirst(mixEventTracks);
995 mixEventTracks = 0;
996
997 //printf("Pool size %d, max %d\n",pool->GetSize(), GetNMaxEvMix());
998
999 if(pool->GetSize() > GetNMaxEvMix())
1000 {//Remove last event
1001 TClonesArray * tmp = static_cast<TClonesArray*>(pool->Last()) ;
1002 pool->RemoveLast() ;
1003 delete tmp ;
1004 }
1005}
1006
1007//_____________________________________________________________
1008void AliAnaParticleHadronCorrelation::FillNeutralEventMixPool()
1009{
1010 // Mixed event pool filling for neutral clusters
1011 // Right now only for EMCAL and in isolation case
1012
1013 //printf("FillNeutralEventMixPool for %s\n",GetInputAODName().Data());
1014
1015 if(fUseMixStoredInReader && GetReader()->GetLastCaloMixedEvent() == GetEventNumber())
1016 {
1017 //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data());
1018 return ; // pool filled previously for another trigger
1019 }
1020
6bae06a4 1021 TObjArray * pl = GetEMCALClusters();
1022 //if (GetAODObjArrayName.Contains("PHOS") )pl = GetPHOSClusters();
1023 //else pl = GetEMCALClusters();
1024
d07ffd54 1025 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
1026 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
1027
1028 if(!inputHandler) return ;
31864468 1029
d07ffd54 1030 // Do mixing only with MB event (or the chosen mask), if not skip
1031 if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ;
1032
d07ffd54 1033 Int_t eventBin = GetEventMixBin();
1034
1035 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
1036 if(eventBin < 0) return;
1037
1038 TObjArray * mixEventCalo = new TObjArray;
1039
1040 if(fUseMixStoredInReader)
1041 {
1042 fListMixCaloEvents[eventBin] = GetReader()->GetListWithMixedEventsForCalo(eventBin);
1043 }
1044
1045 if(!fListMixCaloEvents[eventBin]) fListMixCaloEvents[eventBin] = new TList();
1046
1047 TList * poolCalo = fListMixCaloEvents[eventBin];
1048
7aaa6c97 1049 for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ )
d07ffd54 1050 {
1051 AliVCluster * calo = (AliVCluster *) (pl->At(ipr)) ;
1052
1053 // remove matched clusters
1054 if( IsTrackMatched( calo, GetReader()->GetInputEvent() ) ) continue ;
283f989c 1055
2bb7ac98 1056 //Cluster momentum calculation
d07ffd54 1057 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
283f989c 1058 {
349eb23d 1059 calo->GetMomentum(fMomentum,GetVertex(0)) ;
d07ffd54 1060 }//Assume that come from vertex in straight line
1061 else
029dea5a 1062 {
d07ffd54 1063 Double_t vertex[]={0,0,0};
349eb23d 1064 calo->GetMomentum(fMomentum,vertex) ;
029dea5a 1065 }
1066
349eb23d 1067 Float_t pt = fMomentum.Pt();
d07ffd54 1068 //Select only clusters in pt range
1069 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
2e876d85 1070
349eb23d 1071 AliAODPWG4Particle * mixedCalo = new AliAODPWG4Particle(fMomentum);
cb67d5f1 1072 mixedCalo->SetDetectorTag(kEMCAL);
d07ffd54 1073 mixEventCalo->Add(mixedCalo);
1074 }
1075
7aaa6c97 1076 fhNclustersMB->Fill(mixEventCalo->GetEntriesFast(),eventBin);
1077
d07ffd54 1078 //Set the event number where the last event was added, to avoid double pool filling
1079 GetReader()->SetLastCaloMixedEvent(GetEventNumber());
1080
1081 //printf("Add event to pool with %d clusters \n ",mixEventCalo->GetEntries());
1082 poolCalo->AddFirst(mixEventCalo);
1083 mixEventCalo = 0;
1084
1085 //printf("Pool size %d, max %d\n",poolCalo->GetSize(), GetNMaxEvMix());
029dea5a 1086
d07ffd54 1087 if(poolCalo->GetSize() > GetNMaxEvMix())
1088 {//Remove last event
1089 TClonesArray * tmp = static_cast<TClonesArray*>(poolCalo->Last()) ;
1090 poolCalo->RemoveLast() ;
1091 delete tmp ;
1092 }
029dea5a 1093}
1094
6b013448 1095//_________________________________________________________________________________________________________________
1096Bool_t AliAnaParticleHadronCorrelation::FindLeadingOppositeHadronInWindow(AliAODPWG4ParticleCorrelation * particle)
1097{
1098 // Select events where the leading charged particle in the opposite hemisphere
1099 // to the trigger particle is in a window centered at 180 from the trigger
1100
6b013448 1101 Float_t etaTrig = particle->Eta();
1102 Float_t ptTrig = particle->Pt();
98604e3a 1103 Float_t phiTrig = particle->Phi();
1104 if(phiTrig < 0 ) phiTrig+= TMath::TwoPi();
1105
1106 Float_t ptLeadHad = 0 ;
1107 Float_t dphiLeadHad= -100 ;
6b013448 1108 Float_t phiLeadHad = -100 ;
1109 Float_t etaLeadHad = -100 ;
98604e3a 1110 Int_t nTrack = 0;
98604e3a 1111
6b013448 1112 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
1113 {
1114 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
1115
349eb23d 1116 fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz());
6b013448 1117
349eb23d 1118 Float_t pt = fTrackVector.Pt();
1119 Float_t phi = fTrackVector.Phi() ;
6b013448 1120 if(phi < 0 ) phi+= TMath::TwoPi();
1121
98604e3a 1122 Float_t deltaPhi = phiTrig-phi;
1123 //
1124 // Calculate deltaPhi shift so that for the particles on the opposite side
1125 // it is defined between 90 and 270 degrees
1126 // Shift [-360,-90] to [0, 270]
1127 // and [270,360] to [-90,0]
1128 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
1129 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
1130
1131 if(pt > ptLeadHad && deltaPhi > TMath::PiOver2()) // in opposite hemisphere
6b013448 1132 {
1133 ptLeadHad = pt ;
1134 phiLeadHad = phi;
98604e3a 1135 dphiLeadHad= deltaPhi;
349eb23d 1136 etaLeadHad = fTrackVector.Eta();
98604e3a 1137 nTrack++;
6b013448 1138 }
1139 }// track loop
1140
98604e3a 1141 if(fFillLeadHadOppositeHisto)
1142 {
1143 if(nTrack == 0)
1144 {
1145 fhPtNoLeadingOppositeHadron ->Fill(ptTrig);
1146 fhEtaPhiNoLeadingOppositeHadron->Fill(etaTrig,phiTrig);
1147 }
1148 else
1149 {
1150 fhPtLeadingOppositeHadron ->Fill(ptTrig, ptLeadHad);
1151 fhPtDiffPhiLeadingOppositeHadron->Fill(ptTrig,dphiLeadHad);
1152 fhPtDiffEtaLeadingOppositeHadron->Fill(ptTrig, etaLeadHad-etaTrig);
1153 }
1154 }
6b013448 1155
2db10729 1156
1157 AliDebug(1,Form("pT %2.2f, phi %2.2f, eta %2.2f, nTracks away %d, total tracks %d",
1158 ptLeadHad,phiLeadHad*TMath::RadToDeg(),etaLeadHad,nTrack, GetTrackMultiplicity()));
1159 AliDebug(1,Form("\t pT trig %2.2f, Dphi (trigger-hadron) %2.2f, Deta (trigger-hadron) %2.2f",
1160 ptTrig, dphiLeadHad*TMath::RadToDeg(), etaLeadHad-etaTrig));
1161 AliDebug(1,Form("\t cuts pT: min %2.2f, max %2.2f; DPhi: min %2.2f, max %2.2f",
1162 fMinLeadHadPt,fMaxLeadHadPt,fMinLeadHadPhi*TMath::RadToDeg(),fMaxLeadHadPhi*TMath::RadToDeg()));
1163
6b013448 1164
98604e3a 1165 // reject the trigger if the leading hadron is not in the requested pt or phi window and
1166
1167 if( nTrack == 0 ) return kFALSE; // No track found in opposite hemisphere
1168
1169 if( ptLeadHad < fMinLeadHadPt || ptLeadHad > fMaxLeadHadPt ) return kFALSE;
6b013448 1170
1171 //printf("Accept leading hadron pT \n");
1172
98604e3a 1173 if( dphiLeadHad < fMinLeadHadPhi || dphiLeadHad > fMaxLeadHadPhi ) return kFALSE;
6b013448 1174
1175 //printf("Accept leading hadron phi \n");
1176
98604e3a 1177
6b013448 1178 return kTRUE ;
1179}
1180
05d0d05d 1181//____________________________________________________________
1182TObjString* AliAnaParticleHadronCorrelation::GetAnalysisCuts()
1183{
1184 //Save parameters used for analysis
1185 TString parList ; //this will be list of parameters used for this analysis.
1186 const Int_t buffersize = 560;
1187 char onePar[buffersize] ;
1188
81796cfc 1189 snprintf(onePar,buffersize,"--- AliAnaPaticleHadronCorrelation ---:") ;
05d0d05d 1190 parList+=onePar ;
81796cfc 1191 snprintf(onePar,buffersize," %3.2f < Pt associated < %3.2f; ", fMinAssocPt, fMaxAssocPt) ;
05d0d05d 1192 parList+=onePar ;
81796cfc 1193 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-Hadron < %3.2f; ", fDeltaPhiMinCut, fDeltaPhiMaxCut) ;
05d0d05d 1194 parList+=onePar ;
81796cfc 1195 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-UeHadron < %3.2f; ", fUeDeltaPhiMinCut, fUeDeltaPhiMaxCut) ;
05d0d05d 1196 parList+=onePar ;
81796cfc 1197 snprintf(onePar,buffersize,"Isolated Trigger? %d;", fSelectIsolated) ;
05d0d05d 1198 parList+=onePar ;
81796cfc 1199 snprintf(onePar,buffersize,"Several UE? %d;", fMakeSeveralUE) ;
05d0d05d 1200 parList+=onePar ;
81796cfc 1201 snprintf(onePar,buffersize,"Name of AOD Pi0 Branch %s;", fPi0AODBranchName.Data());
05d0d05d 1202 parList+=onePar ;
81796cfc 1203 snprintf(onePar,buffersize,"Do Decay-hadron correlation ? pi0 %d, decay %d;", fPi0Trigger, fDecayTrigger) ;
05d0d05d 1204 parList+=onePar ;
81796cfc 1205 snprintf(onePar,buffersize,"Select absolute leading for cluster triggers ? %d or Near Side Leading %d;",
3f150b4b 1206 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
05d0d05d 1207 parList+=onePar ;
1208 snprintf(onePar,buffersize,"Associated particle pt bins %d: ", fNAssocPtBins) ;
1209 parList+=onePar ;
1210 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
1211 snprintf(onePar,buffersize,"bin %d = [%2.1f,%2.1f];", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
1212 }
1213 parList+=onePar ;
1214
1215 //Get parameters set in base class.
1216 parList += GetBaseParametersList() ;
1217
05d0d05d 1218 //Get parameters set in FiducialCut class (not available yet)
1219 //parlist += GetFidCut()->GetFidCutParametersList()
1220
1221 return new TObjString(parList) ;
1222
1223}
1224
1225//________________________________________________________________
e09cf5ef 1226TList * AliAnaParticleHadronCorrelation::GetCreateOutputObjects()
c8ad7ead 1227{
c8ad7ead 1228 // Create histograms to be saved in output file and
e09cf5ef 1229 // store them in fOutputContainer
029dea5a 1230
c8ad7ead 1231 TList * outputContainer = new TList() ;
1232 outputContainer->SetName("CorrelationHistos") ;
e09cf5ef 1233
7aaa6c97 1234 Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Int_t netabins = GetHistogramRanges()->GetHistoEtaBins();
1235 Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax();
1236 Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin();
1237
1238 Int_t ndeltaphibins = GetHistogramRanges()->GetHistoDeltaPhiBins(); Int_t ndeltaetabins = GetHistogramRanges()->GetHistoDeltaEtaBins();
1239 Float_t deltaphimax = GetHistogramRanges()->GetHistoDeltaPhiMax(); Float_t deltaetamax = GetHistogramRanges()->GetHistoDeltaEtaMax();
1240 Float_t deltaphimin = GetHistogramRanges()->GetHistoDeltaPhiMin(); Float_t deltaetamin = GetHistogramRanges()->GetHistoDeltaEtaMin();
1241
1242 Int_t ntrbins = GetHistogramRanges()->GetHistoTrackMultiplicityBins(); Int_t nclbins = GetHistogramRanges()->GetHistoNClustersBins();
1243 Int_t trmax = GetHistogramRanges()->GetHistoTrackMultiplicityMax(); Int_t clmax = GetHistogramRanges()->GetHistoNClustersMax();
1244 Int_t trmin = GetHistogramRanges()->GetHistoTrackMultiplicityMin(); Int_t clmin = GetHistogramRanges()->GetHistoNClustersMin();
1245
1246 Int_t nxeztbins = GetHistogramRanges()->GetHistoRatioBins(); Int_t nhbpbins = GetHistogramRanges()->GetHistoHBPBins();
1247 Float_t xeztmax = GetHistogramRanges()->GetHistoRatioMax(); Float_t hbpmax = GetHistogramRanges()->GetHistoHBPMax();
1248 Float_t xeztmin = GetHistogramRanges()->GetHistoRatioMin(); Float_t hbpmin = GetHistogramRanges()->GetHistoHBPMin();
e09cf5ef 1249
d0b625bc 1250 Int_t nMixBins = GetNCentrBin()*GetNZvertBin()*GetNRPBin();
1251
4a296f4a 1252 TString nameMC[] = {"Photon","Pi0","Pi0Decay","EtaDecay","OtherDecay","Electron","Hadron","Pi0DecayLostPair"};
17af6e24 1253 TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
c8ad7ead 1254
7d306daf 1255 // For vz dependent histograms, if option ON
1256 Int_t nz = 1 ;
1257 if(fCorrelVzBin) nz = GetNZvertBin();
1258 TString sz = "" ;
1259 TString tz = "" ;
1260
de9949a4 1261 // Fill histograms for neutral clusters in mixing?
1262 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
1263 Bool_t neutralMix = fFillNeutralEventMixPool || isoCase ;
1264
55c20a99 1265 fhPtTriggerInput = new TH1F("hPtTriggerInput","Input trigger #it{p}_{T}", nptbins,ptmin,ptmax);
bef61a43 1266 fhPtTriggerInput->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1267 outputContainer->Add(fhPtTriggerInput);
c8ad7ead 1268
bef61a43 1269 if( fM02MaxCut > 0 && fM02MinCut > 0 )
1270 {
1271 fhPtTriggerSSCut = new TH1F("hPtTriggerSSCut","Trigger #it{p}_{T} after #lambda^{2}_{0} cut", nptbins,ptmin,ptmax);
1272 fhPtTriggerSSCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1273 outputContainer->Add(fhPtTriggerSSCut);
1274 }
1275
1276 if( OnlyIsolated() )
1277 {
6c9e3fb5 1278 fhPtTriggerIsoCut = new TH1F("hPtTriggerIsoCut","Trigger #it{p}_{T} after isolation (and #lambda^{2}_{0} cut)", nptbins,ptmin,ptmax);
bef61a43 1279 fhPtTriggerIsoCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1280 outputContainer->Add(fhPtTriggerIsoCut);
1281 }
1282
1283 fhPtTriggerFidCut = new TH1F("hPtTriggerFidCut","Trigger #it{p}_{T} after fiducial (isolation and #lambda^{2}_{0}) cut", nptbins,ptmin,ptmax);
1284 fhPtTriggerFidCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1285 outputContainer->Add(fhPtTriggerFidCut);
c8ad7ead 1286
6c9e3fb5 1287 fhPtTrigger = new TH1F("hPtTrigger","#it{p}_{T} distribution of trigger particles (after opposite hadron leading cut and rest)", nptbins,ptmin,ptmax);
55c20a99 1288 fhPtTrigger->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1289 outputContainer->Add(fhPtTrigger);
c8ad7ead 1290
764ab1f4 1291 if(IsDataMC())
1292 {
0ff0cd12 1293 for(Int_t i=0; i < fgkNmcTypes; i++)
764ab1f4 1294 {
55c20a99 1295 fhPtTriggerMC[i] = new TH1F(Form("hPtTrigger_MC%s",nameMC[i].Data()),
1296 Form("#it{p}_{T} distribution of trigger particles, trigger origin is %s",nameMC[i].Data()),
c8ad7ead 1297 nptbins,ptmin,ptmax);
55c20a99 1298 fhPtTriggerMC[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1299 outputContainer->Add(fhPtTriggerMC[i]);
764ab1f4 1300 }
1301 }
1302
48c5da66 1303 if(fDecayTrigger)
1304 {
1305 for(Int_t ibit = 0; ibit < fNDecayBits; ibit++)
1306 {
1307 fhPtDecayTrigger[ibit] = new TH1F(Form("hPtDecayTrigger_bit%d",fDecayBits[ibit]),
1308 Form("#it{p}_{T} distribution of trigger particles, decay Bit %d",fDecayBits[ibit]),
1309 nptbins,ptmin,ptmax);
1310 fhPtDecayTrigger[ibit]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1311 outputContainer->Add(fhPtDecayTrigger[ibit]);
1312
1313 if(IsDataMC())
1314 {
0ff0cd12 1315 for(Int_t i=0; i < fgkNmcTypes; i++)
48c5da66 1316 {
1317 fhPtDecayTriggerMC[ibit][i] = new TH1F(Form("hPtDecayTrigger_bit%d_MC%s",fDecayBits[ibit], nameMC[i].Data()),
1318 Form("#it{p}_{T} distribution of trigger particles, decay Bit %d, trigger origin is %s",fDecayBits[ibit], nameMC[i].Data()),
1319 nptbins,ptmin,ptmax);
1320 fhPtDecayTriggerMC[ibit][i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1321 outputContainer->Add(fhPtDecayTriggerMC[ibit][i]);
1322 }
1323 }
1324 }
1325 }
1326
7d306daf 1327 if(fCorrelVzBin)
1328 {
55c20a99 1329 fhPtTriggerVzBin = new TH2F("hPtTriggerVzBin","#it{p}_{T} distribution of trigger particles vs vz bin", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
1330 fhPtTriggerVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1331 fhPtTriggerVzBin->SetYTitle("#it{v}_{#it{z}} bin");
1332 outputContainer->Add(fhPtTriggerVzBin);
7d306daf 1333 }
1334
55c20a99 1335 fhPtTriggerBin = new TH2F ("hPtTriggerBin","#it{p}_{T} distribution of trigger particles", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
1336 fhPtTriggerBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1337 fhPtTriggerBin->SetYTitle("Bin");
1338 outputContainer->Add(fhPtTriggerBin);
c8ad7ead 1339
55c20a99 1340 fhPhiTrigger = new TH2F ("hPhiTrigger","#phi distribution of trigger Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
1341 fhPhiTrigger->SetYTitle("#phi (rad)");
1342 outputContainer->Add(fhPhiTrigger);
c8ad7ead 1343
55c20a99 1344 fhEtaTrigger = new TH2F ("hEtaTrigger","#eta distribution of trigger",nptbins,ptmin,ptmax, netabins,etamin,etamax);
1345 fhEtaTrigger->SetYTitle("#eta ");
1346 outputContainer->Add(fhEtaTrigger);
e09cf5ef 1347
0cea6003 1348 if(IsHighMultiplicityAnalysisOn())
b6afb6b1 1349 {
1350 fhPtTriggerCentrality = new TH2F("hPtTriggerCentrality","Trigger particle #it{p}_{T} vs centrality",nptbins,ptmin,ptmax,100,0.,100) ;
1351 fhPtTriggerCentrality->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1352 fhPtTriggerCentrality->SetYTitle("Centrality (%)");
1353 outputContainer->Add(fhPtTriggerCentrality) ;
1354
1355 fhPtTriggerEventPlane = new TH2F("hPtTriggerEventPlane","Trigger particle #it{p}_{T} vs event plane angle",nptbins,ptmin,ptmax, 100,0.,TMath::Pi()) ;
1356 fhPtTriggerEventPlane->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1357 fhPtTriggerEventPlane->SetXTitle("EP angle (rad)");
1358 outputContainer->Add(fhPtTriggerEventPlane) ;
1359
1360 fhTriggerEventPlaneCentrality = new TH2F("hTriggerEventPlaneCentrality","Trigger particle centrality vs event plane angle",100,0.,100,100,0.,TMath::Pi()) ;
1361 fhTriggerEventPlaneCentrality->SetXTitle("Centrality (%)");
1362 fhTriggerEventPlaneCentrality->SetYTitle("EP angle (rad)");
1363 outputContainer->Add(fhTriggerEventPlaneCentrality) ;
1364 }
a22f3f34 1365
55c20a99 1366 // Leading hadron in oposite side
98604e3a 1367 if(fFillLeadHadOppositeHisto)
55c20a99 1368 {
1369 fhPtLeadingOppositeHadron = new TH2F("hPtTriggerPtLeadingOppositeHadron","Leading hadron opposite to trigger vs trigger #it{p}_{T}",
1370 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1371 fhPtLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1372 fhPtLeadingOppositeHadron->SetYTitle("#it{p}_{T}^{lead hadron} (GeV/#it{c})");
1373 outputContainer->Add(fhPtLeadingOppositeHadron);
98604e3a 1374
1375 fhPtNoLeadingOppositeHadron = new TH1F("hPtTriggerNoLeadingOppositeHadron","No Leading hadron opposite to trigger #it{p}_{T}",
1376 nptbins,ptmin,ptmax);
1377 fhPtNoLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1378 outputContainer->Add(fhPtNoLeadingOppositeHadron);
1379
1380 fhEtaPhiNoLeadingOppositeHadron = new TH2F("hEtaPhiTriggerNoLeadingOppositeHadron","No Leading hadron opposite to trigger #eta:#phi",
1381 netabins,etamin,etamax,nphibins,phimin,phimax);
1382 fhEtaPhiNoLeadingOppositeHadron->SetXTitle("#eta");
1383 fhEtaPhiNoLeadingOppositeHadron->SetYTitle("#phi");
1384 outputContainer->Add(fhEtaPhiNoLeadingOppositeHadron);
1385
55c20a99 1386
1387 fhPtDiffPhiLeadingOppositeHadron = new TH2F("hPtTriggerDiffPhiTriggerLeadingOppositeHadron","#phi_{trigger}-#phi_{leading opposite hadron} vs #it{p}_{T}^{trig}",
98604e3a 1388 nptbins,ptmin,ptmax,ndeltaphibins,deltaphimin,deltaphimax);
55c20a99 1389 fhPtDiffPhiLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1390 fhPtDiffPhiLeadingOppositeHadron->SetYTitle("#phi_{trigger}-#phi_{leading opposite hadron} (rad)");
1391 outputContainer->Add(fhPtDiffPhiLeadingOppositeHadron);
1392
1393 fhPtDiffEtaLeadingOppositeHadron = new TH2F("hPtTriggerDiffEtaTriggerPhiLeadingOppositeHadron","#eta_{trigger}-#eta_{leading opposite hadron} vs #it{p}_{T}^{trig}",
1394 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1395 fhPtDiffEtaLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1396 fhPtDiffEtaLeadingOppositeHadron->SetYTitle("#eta_{trigger}-#eta_{leading opposite hadron}");
1397 outputContainer->Add(fhPtDiffEtaLeadingOppositeHadron);
1398 }
68cd2624 1399
e09cf5ef 1400 //Correlation with charged hadrons
c8ad7ead 1401
1402 fhDeltaPhiDeltaEtaCharged = new TH2F
1403 ("hDeltaPhiDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}}",
1404 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1405 fhDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
1406 fhDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
1407
1408 fhDeltaPhiDeltaEtaChargedPtA3GeV = new TH2F
1409 ("hDeltaPhiDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}, #it{p}_{TA}>3 GeV/#it{c}}",
1410 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
1411 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetXTitle("#Delta #phi (rad)");
1412 fhDeltaPhiDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1413
1414 fhPhiCharged = new TH2F
1415 ("hPhiCharged","#phi_{h^{#pm}} vs #it{p}_{T #pm}",
2af40966 1416 nptbins,ptmin,ptmax,180,0,TMath::TwoPi());
c8ad7ead 1417 fhPhiCharged->SetYTitle("#phi_{h^{#pm}} (rad)");
1418 fhPhiCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
1419
1420 fhEtaCharged = new TH2F
1421 ("hEtaCharged","#eta_{h^{#pm}} vs #it{p}_{T #pm}",
2af40966 1422 nptbins,ptmin,ptmax,100,-1.,1.);
c8ad7ead 1423 fhEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
1424 fhEtaCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
1425
1426 fhDeltaPhiCharged = new TH2F
1427 ("hDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
1428 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1429 fhDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
1430 fhDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1431
1432 fhDeltaPhiChargedPtA3GeV = new TH2F
1433 ("hDeltaPhiChargedPtA3GeV","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}",
1434 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1435 fhDeltaPhiChargedPtA3GeV->SetYTitle("#Delta #phi (rad)");
1436 fhDeltaPhiChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1437
1438
1439 fhDeltaPhiChargedPt = new TH2F
1440 ("hDeltaPhiChargedPt","#phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}",
1441 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1442 fhDeltaPhiChargedPt->SetYTitle("#Delta #phi (rad)");
1443 fhDeltaPhiChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1444
c8ad7ead 1445 fhDeltaEtaCharged = new TH2F
1446 ("hDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}",
1447 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1448 fhDeltaEtaCharged->SetYTitle("#Delta #eta");
1449 fhDeltaEtaCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1450
1451 fhDeltaEtaChargedPtA3GeV = new TH2F
1452 ("hDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}",
1453 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1454 fhDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta");
1455 fhDeltaEtaChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1456
1457 fhXECharged =
1458 new TH2F("hXECharged","#it{x}_{#it{E}} for charged tracks",
7aaa6c97 1459 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1460 fhXECharged->SetYTitle("#it{x}_{#it{E}}");
1461 fhXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1462
1463 fhXECharged_Cone2 =
1464 new TH2F("hXECharged_Cone2","#it{x}_{#it{E}} for charged tracks in cone 2 (5#pi/6-7#pi/6)",
7aaa6c97 1465 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1466 fhXECharged_Cone2->SetYTitle("#it{x}_{#it{E}}");
1467 fhXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1468
c8ad7ead 1469 fhXEPosCharged =
1470 new TH2F("hXEPositiveCharged","#it{x}_{#it{E}} for positive charged tracks",
7aaa6c97 1471 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1472 fhXEPosCharged->SetYTitle("#it{x}_{#it{E}}");
1473 fhXEPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1474
1475 fhXENegCharged =
1476 new TH2F("hXENegativeCharged","#it{x}_{#it{E}} for negative charged tracks",
7aaa6c97 1477 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1478 fhXENegCharged->SetYTitle("#it{x}_{#it{E}}");
1479 fhXENegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1480
1481 fhPtHbpXECharged =
1482 new TH2F("hHbpXECharged","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
7aaa6c97 1483 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
c8ad7ead 1484 fhPtHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1485 fhPtHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1486
1487 fhPtHbpXECharged_Cone2 =
1488 new TH2F("hHbpXECharged_Cone2","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons in cone 2 (5#pi/6-7#pi/6)",
7aaa6c97 1489 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
c8ad7ead 1490 fhPtHbpXECharged_Cone2->SetYTitle("ln(1/#it{x}_{#it{E}})");
1491 fhPtHbpXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1492
c8ad7ead 1493 fhZTCharged =
1494 new TH2F("hZTCharged","#it{z}_{T} for charged tracks",
7aaa6c97 1495 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1496 fhZTCharged->SetYTitle("#it{z}_{T}");
1497 fhZTCharged->SetXTitle("#it{p}_{T trigger}");
1498
c8ad7ead 1499 fhZTPosCharged =
1500 new TH2F("hZTPositiveCharged","#it{z}_{T} for positive charged tracks",
7aaa6c97 1501 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1502 fhZTPosCharged->SetYTitle("#it{z}_{T}");
1503 fhZTPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1504
1505 fhZTNegCharged =
1506 new TH2F("hZTNegativeCharged","#it{z}_{T} for negative charged tracks",
7aaa6c97 1507 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1508 fhZTNegCharged->SetYTitle("#it{z}_{T}");
1509 fhZTNegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1510
1511 fhPtHbpZTCharged =
1512 new TH2F("hHbpZTCharged","#xi = ln(1/#it{z}_{T}) with charged hadrons",
7aaa6c97 1513 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
c8ad7ead 1514 fhPtHbpZTCharged->SetYTitle("ln(1/#it{z}_{T})");
1515 fhPtHbpZTCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1516
c8ad7ead 1517 fhPtTrigPout =
1518 new TH2F("hPtTrigPout","Pout with triggers",
441f378e 1519 nptbins,ptmin,ptmax,nptbins,-1.*ptmax/2.,ptmax/2.);
c8ad7ead 1520 fhPtTrigPout->SetYTitle("#it{p}_{out} (GeV/#it{c})");
1521 fhPtTrigPout->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1522
1523 fhPtTrigCharged =
1524 new TH2F("hPtTrigCharged","trigger and charged tracks pt distribution",
1525 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1526 fhPtTrigCharged->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1527 fhPtTrigCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1528
1529 outputContainer->Add(fhDeltaPhiDeltaEtaCharged);
1530 outputContainer->Add(fhDeltaPhiDeltaEtaChargedPtA3GeV);
1531 outputContainer->Add(fhPhiCharged) ;
1532 outputContainer->Add(fhEtaCharged) ;
1533 outputContainer->Add(fhDeltaPhiCharged) ;
1534 outputContainer->Add(fhDeltaPhiChargedPtA3GeV) ;
1535 outputContainer->Add(fhDeltaEtaCharged) ;
1536 outputContainer->Add(fhDeltaEtaChargedPtA3GeV) ;
1537 outputContainer->Add(fhDeltaPhiChargedPt) ;
c8ad7ead 1538
1539 outputContainer->Add(fhXECharged) ;
1540 outputContainer->Add(fhXECharged_Cone2) ;
6ed1ad3e 1541
c8ad7ead 1542 if(IsDataMC())
547c2f01 1543 {
0ff0cd12 1544 for(Int_t i=0; i < fgkNmcTypes; i++)
c8ad7ead 1545 {
1546
1547 fhDeltaPhiChargedMC[i] = new TH2F(Form("hDeltaPhiCharged_MC%s",nameMC[i].Data()),
1548 Form("#Delta #phi for charged tracks, trigger origin is %s",nameMC[i].Data()),
1549 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
1550 fhDeltaPhiChargedMC[i]->SetYTitle("#it{x}_{#it{E}}");
1551 fhDeltaPhiChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1552 outputContainer->Add(fhDeltaPhiChargedMC[i]) ;
1553
1554 fhXEChargedMC[i] = new TH2F(Form("hXECharged_MC%s",nameMC[i].Data()),
1555 Form("#it{x}_{#it{E}} for charged tracks, trigger origin is %s",nameMC[i].Data()),
7aaa6c97 1556 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1557 fhXEChargedMC[i]->SetYTitle("#it{x}_{#it{E}}");
1558 fhXEChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1559 outputContainer->Add(fhXEChargedMC[i]) ;
1560 }
1561 }
1562
1563 outputContainer->Add(fhXEPosCharged) ;
1564 outputContainer->Add(fhXENegCharged) ;
c8ad7ead 1565 outputContainer->Add(fhPtHbpXECharged) ;
1566 outputContainer->Add(fhPtHbpXECharged_Cone2) ;
c8ad7ead 1567
1568 outputContainer->Add(fhZTCharged) ;
1569 outputContainer->Add(fhZTPosCharged) ;
1570 outputContainer->Add(fhZTNegCharged) ;
c8ad7ead 1571 outputContainer->Add(fhPtHbpZTCharged) ;
c8ad7ead 1572
1573 outputContainer->Add(fhPtTrigPout) ;
1574 outputContainer->Add(fhPtTrigCharged) ;
1575
6ed1ad3e 1576 TString right = "";
1577 if(fMakeSeveralUE) right = "Right";
1578
1579 fhUePart = new TH1F("hUePart","UE particles distribution vs pt trig",
1580 nptbins,ptmin,ptmax);
1581 fhUePart->SetYTitle("dNch");
1582 fhUePart->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1583
1584 fhDeltaPhiUeChargedPt = new TH2F
1585 (Form("hDeltaPhiUe%sChargedPt",right.Data()),"#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}}",
1586 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1587 fhDeltaPhiUeChargedPt->SetYTitle("#Delta #phi (rad)");
1588 fhDeltaPhiUeChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1589
1590 fhXEUeCharged =
1591 new TH2F(Form("hXEUeCharged%s",right.Data()),"#it{x}_{#it{E}} for Underlying Event",
7aaa6c97 1592 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
6ed1ad3e 1593 fhXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
1594 fhXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1595
1596 fhPtHbpXEUeCharged =
1597 new TH2F(Form("hHbpXEUeCharged%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for Underlying Event",
7aaa6c97 1598 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
6ed1ad3e 1599 fhPtHbpXEUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1600 fhPtHbpXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1601
1602 fhZTUeCharged =
1603 new TH2F(Form("hZTUeCharged%s",right.Data()),"#it{z}_{T} for Underlying Event",
7aaa6c97 1604 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
6ed1ad3e 1605 fhZTUeCharged->SetYTitle("#it{z}_{T}");
1606 fhZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1607
1608 fhPtHbpZTUeCharged =
1609 new TH2F(Form("hHbpZTUeCharged%s",right.Data()),"#xi = ln(1/#it{z}_{T}) for Underlying Event",
7aaa6c97 1610 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
6ed1ad3e 1611 fhPtHbpZTUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1612 fhPtHbpZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1613
1614 outputContainer->Add(fhUePart);
1615 outputContainer->Add(fhDeltaPhiUeChargedPt) ;
1616 outputContainer->Add(fhXEUeCharged) ;
1617 outputContainer->Add(fhPtHbpXEUeCharged) ;
1618 outputContainer->Add(fhZTUeCharged) ;
1619 outputContainer->Add(fhPtHbpZTUeCharged) ;
1620
1621 if(fMakeSeveralUE)
1622 {
1623 fhDeltaPhiUeLeftCharged = new TH2F
1624 ("hDeltaPhiUeLeftChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left side range of trigger particles",
1625 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1626 fhDeltaPhiUeLeftCharged->SetYTitle("#Delta #phi (rad)");
1627 fhDeltaPhiUeLeftCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1628 outputContainer->Add(fhDeltaPhiUeLeftCharged) ;
1629
1630 fhDeltaPhiUeLeftUpCharged = new TH2F
1631 ("hDeltaPhiUeLeftUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Up side range of trigger particles",
1632 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1633 fhDeltaPhiUeLeftUpCharged->SetYTitle("#Delta #phi (rad)");
1634 fhDeltaPhiUeLeftUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1635 outputContainer->Add(fhDeltaPhiUeLeftUpCharged) ;
1636
1637 fhDeltaPhiUeRightUpCharged = new TH2F
1638 ("hDeltaPhiUeRightUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Up side range of trigger particles",
1639 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1640 fhDeltaPhiUeRightUpCharged->SetYTitle("#Delta #phi (rad)");
1641 fhDeltaPhiUeRightUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1642 outputContainer->Add(fhDeltaPhiUeRightUpCharged) ;
1643
1644 fhDeltaPhiUeLeftDownCharged = new TH2F
1645 ("hDeltaPhiUeLeftDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Down side range of trigger particles",
1646 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1647 fhDeltaPhiUeLeftDownCharged->SetYTitle("#Delta #phi (rad)");
1648 fhDeltaPhiUeLeftDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1649 outputContainer->Add(fhDeltaPhiUeLeftDownCharged) ;
1650
1651 fhDeltaPhiUeRightDownCharged = new TH2F
1652 ("hDeltaPhiUeRightDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Down side range of trigger particles",
1653 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1654 fhDeltaPhiUeRightDownCharged->SetYTitle("#Delta #phi (rad)");
1655 fhDeltaPhiUeRightDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1656 outputContainer->Add(fhDeltaPhiUeRightDownCharged) ;
1657
1658 fhXEUeLeftCharged =
1659 new TH2F("hXEUeChargedLeft","#it{x}_{#it{E}} with UE left side of trigger",
7aaa6c97 1660 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
6ed1ad3e 1661 fhXEUeLeftCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1662 fhXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1663 outputContainer->Add(fhXEUeLeftCharged) ;
1664
1665 fhXEUeLeftUpCharged =
1666 new TH2F("hXEUeChargedLeftUp","#it{x}_{#it{E}} with UE left Up side of trigger",
7aaa6c97 1667 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
6ed1ad3e 1668 fhXEUeLeftUpCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1669 fhXEUeLeftUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1670 outputContainer->Add(fhXEUeLeftUpCharged) ;
1671
1672 fhXEUeRightUpCharged =
1673 new TH2F("hXEUeChargedRightUp","#it{x}_{#it{E} h^{#pm}} with UE right Up side of trigger",
7aaa6c97 1674 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
6ed1ad3e 1675 fhXEUeRightUpCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1676 fhXEUeRightUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1677 outputContainer->Add(fhXEUeRightUpCharged) ;
1678
1679 fhXEUeLeftDownCharged =
1680 new TH2F("hXEUeChargedLeftDown","#it{x}_{#it{E}} with UE left Down side of trigger",
7aaa6c97 1681 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
6ed1ad3e 1682 fhXEUeLeftDownCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}");
1683 fhXEUeLeftDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1684 outputContainer->Add(fhXEUeLeftDownCharged) ;
1685
1686 fhXEUeRightDownCharged =
1687 new TH2F("hXEUeChargedRightDown","#it{x}_{#it{E} h^{#pm}} with UE right Down side of trigger",
7aaa6c97 1688 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
6ed1ad3e 1689 fhXEUeRightDownCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1690 fhXEUeRightDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1691 outputContainer->Add(fhXEUeRightDownCharged) ;
1692
1693 fhPtHbpXEUeLeftCharged =
1694 new TH2F("hHbpXEUeChargedLeft","#xi = ln(1/#it{x}_{#it{E}}) with charged UE left side of trigger",
7aaa6c97 1695 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
6ed1ad3e 1696 fhPtHbpXEUeLeftCharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
1697 fhPtHbpXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1698 outputContainer->Add(fhPtHbpXEUeLeftCharged) ;
1699
1700 fhZTUeLeftCharged =
1701 new TH2F("hZTUeChargedLeft","#it{z}_{trigger h^{#pm}} = #it{p}_{T Ueh^{#pm}} / #it{p}_{T trigger} with UE left side of trigger",
7aaa6c97 1702 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
6ed1ad3e 1703 fhZTUeLeftCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}");
1704 fhZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1705 outputContainer->Add(fhZTUeLeftCharged) ;
1706
1707 fhPtHbpZTUeLeftCharged =
1708 new TH2F("hHbpZTUeChargedLeft","#xi = ln(1/#it{z}_{T}) with charged UE left side of trigger",
7aaa6c97 1709 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
6ed1ad3e 1710 fhPtHbpZTUeLeftCharged->SetYTitle("ln(1/#it{z}_{T})");
1711 fhPtHbpZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1712 outputContainer->Add(fhPtHbpZTUeLeftCharged) ;
1713 }
1714
0cea6003 1715 if(IsPileUpAnalysisOn())
c8ad7ead 1716 {
1717 fhDeltaPhiChargedOtherBC = new TH2F
1718 ("hDeltaPhiChargedOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC!=0",
62f2fe4d 1719 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
c8ad7ead 1720 fhDeltaPhiChargedOtherBC->SetYTitle("#Delta #phi (rad)");
1721 fhDeltaPhiChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
e09cf5ef 1722
c8ad7ead 1723 fhDeltaPhiChargedPtA3GeVOtherBC = new TH2F
1724 ("hDeltaPhiChargedPtA3GeVOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC!=0",
b1f720a7 1725 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
c8ad7ead 1726 fhDeltaPhiChargedPtA3GeVOtherBC->SetYTitle("#Delta #phi (rad)");
1727 fhDeltaPhiChargedPtA3GeVOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
b1f720a7 1728
c8ad7ead 1729 fhPtTrigChargedOtherBC =
1730 new TH2F("hPtTrigChargedOtherBC","trigger and charged tracks pt distribution, track BC!=0",
1731 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1732 fhPtTrigChargedOtherBC->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1733 fhPtTrigChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1734
1735 fhXEChargedOtherBC =
1736 new TH2F("hXEChargedOtherBC","#it{x}_{#it{E}} for charged tracks, track BC!=0",
7aaa6c97 1737 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1738 fhXEChargedOtherBC->SetYTitle("#it{x}_{#it{E}}");
1739 fhXEChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1740
1741 fhXEUeChargedOtherBC =
1742 new TH2F("hXEUeChargedOtherBC","#it{x}_{#it{E}} for Underlying Event, track BC!=0",
7aaa6c97 1743 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1744 fhXEUeChargedOtherBC->SetYTitle("#it{x}_{#it{E}}");
1745 fhXEUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1746
1747 fhZTChargedOtherBC =
1748 new TH2F("hZTChargedOtherBC","#it{z}_{T} for charged tracks, track BC!=0",
7aaa6c97 1749 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1750 fhZTChargedOtherBC->SetYTitle("#it{z}_{T}");
1751 fhZTChargedOtherBC->SetXTitle("#it{p}_{T trigger}");
1752
1753 fhZTUeChargedOtherBC =
1754 new TH2F("hZTUeChargedOtherBC","#it{z}_{T} for Underlying Event, track BC!=0",
7aaa6c97 1755 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1756 fhZTUeChargedOtherBC->SetYTitle("#it{z}_{T}");
1757 fhZTUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1758
1759 outputContainer->Add(fhDeltaPhiChargedOtherBC) ;
1760 outputContainer->Add(fhDeltaPhiChargedPtA3GeVOtherBC) ;
1761 outputContainer->Add(fhXEChargedOtherBC) ;
1762 outputContainer->Add(fhXEUeChargedOtherBC) ;
1763 outputContainer->Add(fhZTChargedOtherBC) ;
1764 outputContainer->Add(fhZTUeChargedOtherBC) ;
1765 outputContainer->Add(fhPtTrigChargedOtherBC) ;
1766
1767 fhDeltaPhiChargedBC0 = new TH2F
1768 ("hDeltaPhiChargedBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0",
62f2fe4d 1769 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
c8ad7ead 1770 fhDeltaPhiChargedBC0->SetYTitle("#Delta #phi (rad)");
1771 fhDeltaPhiChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
e09cf5ef 1772
c8ad7ead 1773 fhDeltaPhiChargedPtA3GeVBC0 = new TH2F
1774 ("hDeltaPhiChargedPtA3GeVBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0",
62f2fe4d 1775 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
c8ad7ead 1776 fhDeltaPhiChargedPtA3GeVBC0->SetYTitle("#Delta #phi (rad)");
1777 fhDeltaPhiChargedPtA3GeVBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1778
1779 fhPtTrigChargedBC0 =
1780 new TH2F("hPtTrigChargedBC0","trigger and charged tracks pt distribution, track BC==0",
1781 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1782 fhPtTrigChargedBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1783 fhPtTrigChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1784
1785 fhXEChargedBC0 =
1786 new TH2F("hXEChargedBC0","#it{x}_{#it{E}} for charged tracks, track BC==0",
7aaa6c97 1787 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1788 fhXEChargedBC0->SetYTitle("#it{x}_{#it{E}}");
1789 fhXEChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1790
1791 fhXEUeChargedBC0 =
1792 new TH2F("hXEUeChargedBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0",
7aaa6c97 1793 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1794 fhXEUeChargedBC0->SetYTitle("#it{x}_{#it{E}}");
1795 fhXEUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1796
1797 fhZTChargedBC0 =
1798 new TH2F("hZTChargedBC0","#it{z}_{T} for charged tracks, track BC==0",
7aaa6c97 1799 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1800 fhZTChargedBC0->SetYTitle("#it{z}_{T}");
1801 fhZTChargedBC0->SetXTitle("#it{p}_{T trigger}");
1802
1803 fhZTUeChargedBC0 =
1804 new TH2F("hZTUeChargedBC0","#it{z}_{T} for Underlying Event, track BC==0",
7aaa6c97 1805 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1806 fhZTUeChargedBC0->SetYTitle("#it{z}_{T}");
1807 fhZTUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1808
1809 outputContainer->Add(fhDeltaPhiChargedBC0) ;
1810 outputContainer->Add(fhDeltaPhiChargedPtA3GeVBC0) ;
1811 outputContainer->Add(fhXEChargedBC0) ;
1812 outputContainer->Add(fhXEUeChargedBC0) ;
1813 outputContainer->Add(fhZTChargedBC0) ;
1814 outputContainer->Add(fhZTUeChargedBC0) ;
1815 outputContainer->Add(fhPtTrigChargedBC0) ;
1816
55c20a99 1817 fhPtTriggerVtxBC0 = new TH1F("hPtTriggerVtxBC0","#it{p}_{T} distribution of trigger particles", nptbins,ptmin,ptmax);
1818 fhPtTriggerVtxBC0->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
c8ad7ead 1819
1820 fhDeltaPhiChargedVtxBC0 = new TH2F
1821 ("hDeltaPhiChargedVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0",
1822 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1823 fhDeltaPhiChargedVtxBC0->SetYTitle("#Delta #phi (rad)");
1824 fhDeltaPhiChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1825
1826 fhDeltaPhiChargedPtA3GeVVtxBC0 = new TH2F
1827 ("hDeltaPhiChargedPtA3GeVVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0",
1828 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1829 fhDeltaPhiChargedPtA3GeVVtxBC0->SetYTitle("#Delta #phi (rad)");
1830 fhDeltaPhiChargedPtA3GeVVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
3f150b4b 1831
c8ad7ead 1832 fhPtTrigChargedVtxBC0 =
1833 new TH2F("hPtTrigChargedVtxBC0","trigger and charged tracks pt distribution, track BC==0",
1834 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1835 fhPtTrigChargedVtxBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1836 fhPtTrigChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1837
1838 fhXEChargedVtxBC0 =
1839 new TH2F("hXEChargedVtxBC0","#it{x}_{#it{E}} for charged tracks, track BC==0",
7aaa6c97 1840 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1841 fhXEChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}");
1842 fhXEChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1843
1844 fhXEUeChargedVtxBC0 =
1845 new TH2F("hXEUeChargedVtxBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0",
7aaa6c97 1846 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1847 fhXEUeChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}");
1848 fhXEUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
e09cf5ef 1849
c8ad7ead 1850 fhZTChargedVtxBC0 =
1851 new TH2F("hZTChargedVtxBC0","#it{z}_{T} for charged tracks, track BC==0",
7aaa6c97 1852 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1853 fhZTChargedVtxBC0->SetYTitle("#it{z}_{T}");
1854 fhZTChargedVtxBC0->SetXTitle("#it{p}_{T trigger}");
1855
1856 fhZTUeChargedVtxBC0 =
1857 new TH2F("hZTUeChargedVtxBC0","#it{z}_{T} for Underlying Event, track BC==0",
7aaa6c97 1858 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1859 fhZTUeChargedVtxBC0->SetYTitle("#it{z}_{T}");
1860 fhZTUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1861
55c20a99 1862 outputContainer->Add(fhPtTriggerVtxBC0);
c8ad7ead 1863 outputContainer->Add(fhDeltaPhiChargedVtxBC0) ;
1864 outputContainer->Add(fhDeltaPhiChargedPtA3GeVVtxBC0) ;
1865 outputContainer->Add(fhXEChargedVtxBC0) ;
1866 outputContainer->Add(fhXEUeChargedVtxBC0) ;
1867 outputContainer->Add(fhZTChargedVtxBC0) ;
1868 outputContainer->Add(fhZTUeChargedVtxBC0) ;
1869 outputContainer->Add(fhPtTrigChargedVtxBC0) ;
1870
1871 for(Int_t i = 0 ; i < 7 ; i++)
b1f720a7 1872 {
55c20a99 1873 fhPtTriggerPileUp[i] = new TH1F(Form("hPtTriggerPileUp%s",pileUpName[i].Data()),
1874 Form("#it{p}_{T} distribution of trigger particles, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
1875 fhPtTriggerPileUp[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
1876 outputContainer->Add(fhPtTriggerPileUp[i]);
c8ad7ead 1877
1878 fhDeltaPhiChargedPileUp[i] = new TH2F(Form("hDeltaPhiChargedPileUp%s",pileUpName[i].Data()),
1879 Form("#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1880 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1881 fhDeltaPhiChargedPileUp[i]->SetYTitle("#Delta #phi (rad)");
1882 fhDeltaPhiChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1883 outputContainer->Add(fhDeltaPhiChargedPileUp[i]) ;
1884
1885 fhDeltaPhiChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaPhiChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1886 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()),
1887 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1888 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #phi (rad)");
1889 fhDeltaPhiChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1890 outputContainer->Add(fhDeltaPhiChargedPtA3GeVPileUp[i]) ;
1891
1892 fhDeltaEtaChargedPileUp[i] = new TH2F(Form("hDeltaEtaChargedPileUp%s",pileUpName[i].Data()),
1893 Form("#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()),
1894 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1895 fhDeltaEtaChargedPileUp[i]->SetYTitle("#Delta #eta");
1896 fhDeltaEtaChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1897 outputContainer->Add(fhDeltaEtaChargedPileUp[i]) ;
1898
1899 fhDeltaEtaChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaEtaChargedPtA3GeVPileUp%s",pileUpName[i].Data()),
1900 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()),
1901 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
1902 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #eta");
1903 fhDeltaEtaChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1904 outputContainer->Add(fhDeltaEtaChargedPtA3GeVPileUp[i]) ;
1905
1906 fhXEChargedPileUp[i] = new TH2F(Form("hXEChargedPileUp%s",pileUpName[i].Data()),
1907 Form("#it{x}_{#it{E}} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
7aaa6c97 1908 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1909 fhXEChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}");
1910 fhXEChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1911 outputContainer->Add(fhXEChargedPileUp[i]) ;
1912
1913 fhXEUeChargedPileUp[i] = new TH2F(Form("hXEUeChargedPileUp%s",pileUpName[i].Data()),
1914 Form("#it{x}_{#it{E}} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
7aaa6c97 1915 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1916 fhXEUeChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}");
1917 fhXEUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1918 outputContainer->Add(fhXEUeChargedPileUp[i]) ;
1919
1920 fhZTChargedPileUp[i] = new TH2F(Form("hZTChargedPileUp%s",pileUpName[i].Data()),
1921 Form("#it{z}_{T} for charged tracks, %s Pile-Up event",pileUpName[i].Data()),
7aaa6c97 1922 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1923 fhZTChargedPileUp[i]->SetYTitle("#it{z}_{T}");
1924 fhZTChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1925 outputContainer->Add(fhZTChargedPileUp[i]) ;
1926
1927 fhZTUeChargedPileUp[i] = new TH2F(Form("hZTUeChargedPileUp%s",pileUpName[i].Data()),
1928 Form("#it{z}_{T} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()),
7aaa6c97 1929 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
c8ad7ead 1930 fhZTUeChargedPileUp[i]->SetYTitle("#it{z}_{T}");
1931 fhZTUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1932 outputContainer->Add(fhZTUeChargedPileUp[i]) ;
1933
1934 fhPtTrigChargedPileUp[i] = new TH2F(Form("hPtTrigChargedPileUp%s",pileUpName[i].Data()),
1935 Form("trigger and charged tracks pt distribution, %s Pile-Up event",pileUpName[i].Data()),
1936 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1937 fhPtTrigChargedPileUp[i]->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
1938 fhPtTrigChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1939 outputContainer->Add(fhPtTrigChargedPileUp[i]) ;
2a9171b5 1940
c8ad7ead 1941 }
1942 }
a22f3f34 1943
0cea6003 1944 if(IsHighMultiplicityAnalysisOn())
c8ad7ead 1945 {
d4a8ff9a 1946 Int_t nMultiBins = GetNCentrBin();
1947 fhDeltaPhiChargedMult = new TH2F*[nMultiBins] ;
1948 fhDeltaEtaChargedMult = new TH2F*[nMultiBins] ;
1949 fhXEMult = new TH2F*[nMultiBins] ;
1950 fhXEUeMult = new TH2F*[nMultiBins] ;
1951 fhZTMult = new TH2F*[nMultiBins] ;
1952 fhZTUeMult = new TH2F*[nMultiBins] ;
c8ad7ead 1953
1954 for(Int_t im=0; im<nMultiBins; im++)
1955 {
d4a8ff9a 1956 fhDeltaPhiChargedMult[im] = new TH2F
1957 (Form("hDeltaPhiCharged_Mult%d",im),Form("#Delta #phi charged Mult bin %d",im), nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
1958 fhDeltaPhiChargedMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1959 fhDeltaPhiChargedMult[im]->SetYTitle("#Delta #phi (rad)");
c8ad7ead 1960
d4a8ff9a 1961 fhDeltaEtaChargedMult[im] = new TH2F
1962 (Form("hDeltaEtaCharged_Mult%d",im),Form("#Delta #eta charged Mult bin %d",im), nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
1963 fhDeltaEtaChargedMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
1964 fhDeltaEtaChargedMult[im]->SetYTitle("#Delta #eta");
c8ad7ead 1965
d4a8ff9a 1966 fhXEMult[im] = new TH2F
7aaa6c97 1967 (Form("hXECharged_Mult%d",im),Form("#it{x}_{E} charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
d4a8ff9a 1968 fhXEMult[im]->SetYTitle("#it{x}_{E}");
1969 fhXEMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
c8ad7ead 1970
d4a8ff9a 1971 fhXEUeMult[im] = new TH2F
7aaa6c97 1972 (Form("hXEUeCharged_Mult%d",im),Form("#it{x}_{E} UE charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
d4a8ff9a 1973 fhXEUeMult[im]->SetYTitle("#it{x}_{E}");
1974 fhXEUeMult[im]->SetXTitle("#it{p}_{T trigger}(GeV/#it{c})");
c8ad7ead 1975
d4a8ff9a 1976 fhZTMult[im] = new TH2F
7aaa6c97 1977 (Form("hZTCharged_Mult%d",im),Form("#it{z}_{T} charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
d4a8ff9a 1978 fhZTMult[im]->SetYTitle("#it{z}_{T}");
1979 fhZTMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
c8ad7ead 1980
d4a8ff9a 1981 fhZTUeMult[im] = new TH2F
7aaa6c97 1982 (Form("hZTUeCharged_Mult%d",im),Form("#it{z}_{T} UE charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
d4a8ff9a 1983 fhZTUeMult[im]->SetYTitle("#it{z}_{T}");
1984 fhZTUeMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
c8ad7ead 1985
d4a8ff9a 1986 outputContainer->Add(fhDeltaPhiChargedMult[im]) ;
1987 outputContainer->Add(fhDeltaEtaChargedMult[im]) ;
1988 outputContainer->Add(fhXEMult [im]);
1989 outputContainer->Add(fhXEUeMult[im]);
1990 outputContainer->Add(fhZTMult [im]);
1991 outputContainer->Add(fhZTUeMult[im]);
c8ad7ead 1992 }
1993 }
1994
1995 if(fFillBradHisto)
1996 {
1997 fhAssocPtBkg = new TH2F("hAssocPtBkg", " Trigger #it{p}_{T} vs associated hadron #it{p}_{T} from background",
1998 nptbins, ptmin, ptmax,nptbins,ptmin,ptmax);
1999 fhAssocPtBkg->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2000 fhAssocPtBkg->SetYTitle("#it{p}_{T associated} (GeV/#it{c})");
2001 outputContainer->Add(fhAssocPtBkg) ;
2002
2003 fhDeltaPhiBrad = new TH2F("hDeltaPhiBrad","atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs #it{p}_{T trigger} ",
2004 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
2005 fhDeltaPhiBrad->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2006 fhDeltaPhiBrad->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
2007 outputContainer->Add(fhDeltaPhiBrad) ;
2008 }
2009
2010 fhDeltaPhiDeltaEtaAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2011 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2012 fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
2013 fhDeltaPhiAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
a22f3f34 2014 if(fFillMomImbalancePtAssocBinsHisto)
2015 {
2016 fhXEAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2017 fhZTAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2018 }
2019
2020 if(fCorrelVzBin)
2021 {
2022 fhXEVZ = new TH2F*[nz];
2023 fhZTVZ = new TH2F*[nz];
2024 }
c8ad7ead 2025
2026 if(fFillBradHisto)
2027 fhDeltaPhiBradAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2028
e7d2373d 2029
2030 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2031 if(fFillEtaGapsHisto)fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
2032 if(fDecayTrigger) fhDeltaPhiDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2033
c8ad7ead 2034
2035 if(fHMPIDCorrelation)
2036 {
2037 fhDeltaPhiAssocPtBinHMPID = new TH2F*[fNAssocPtBins*nz];
2038 fhDeltaPhiAssocPtBinHMPIDAcc= new TH2F*[fNAssocPtBins*nz];
2039 }
a22f3f34 2040
c8ad7ead 2041 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2042 {
2043 for(Int_t z = 0 ; z < nz ; z++)
2044 {
2045 Int_t bin = i*nz+z;
2a9171b5 2046
c8ad7ead 2047 if(fCorrelVzBin)
2048 {
2049 sz = Form("_vz%d",z);
2050 tz = Form(", #it{v}_{#it{z}} bin %d",z);
2051 }
cc944149 2052
c8ad7ead 2053 //printf("iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
cc944149 2054
c8ad7ead 2055 fhDeltaPhiDeltaEtaAssocPtBin[bin] = new TH2F(Form("hDeltaPhiDeltaEtaPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2056 Form("#Delta #phi vs #Delta #eta for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2057 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
2058 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
2059 fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetYTitle("#Delta #eta");
cc944149 2060
c8ad7ead 2061 fhDeltaPhiAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2062 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()),
2063 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2064 fhDeltaPhiAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2065 fhDeltaPhiAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
cc944149 2066
c8ad7ead 2067 outputContainer->Add(fhDeltaPhiDeltaEtaAssocPtBin[bin]) ;
2068 outputContainer->Add(fhDeltaPhiAssocPtBin[bin]) ;
a22f3f34 2069
2070 if(fFillEtaGapsHisto)
2071 {
2072 fhDeltaPhiAssocPtBinDEta08[bin] = new TH2F(Form("hDeltaPhiDeltaEta0.8PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2073 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()),
2074 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2075 fhDeltaPhiAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2076 fhDeltaPhiAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
2077
2078 fhDeltaPhiAssocPtBinDEta0[bin] = new TH2F(Form("hDeltaPhiDeltaEta0PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()),
2079 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()),
2080 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2081 fhDeltaPhiAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2082 fhDeltaPhiAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
2083
2084 outputContainer->Add(fhDeltaPhiAssocPtBinDEta08[bin]) ;
2085 outputContainer->Add(fhDeltaPhiAssocPtBinDEta0[bin]) ;
2086 }
2a9171b5 2087
e7d2373d 2088 if(fDecayTrigger)
17af6e24 2089 {
e7d2373d 2090 fhDeltaPhiDecayChargedAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtDecayChargedAssocPt%2.1f_%2.1f%s_bit%d", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data(),fDecayBits[0]),
2091 Form("#Delta #phi vs #it{p}_{T trigger} tagged as decay for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, Bit %d", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data(),fDecayBits[0]),
c8ad7ead 2092 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2093 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2094 fhDeltaPhiDecayChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
17af6e24 2095
c8ad7ead 2096 outputContainer->Add(fhDeltaPhiDecayChargedAssocPtBin[bin]) ;
17af6e24 2097 }
3f150b4b 2098
c8ad7ead 2099 if(fFillBradHisto)
3f150b4b 2100 {
c8ad7ead 2101 fhDeltaPhiBradAssocPtBin[bin] = new TH2F(Form("hDeltaPhiBradPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2102 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()),
2103 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
2104 fhDeltaPhiBradAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2105 fhDeltaPhiBradAssocPtBin[bin]->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
2106 outputContainer->Add(fhDeltaPhiBradAssocPtBin[bin]) ;
2107 }
2108
2109 if(fHMPIDCorrelation)
2110 {
2111 fhDeltaPhiAssocPtBinHMPID[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPID", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2112 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()),
2113 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2114 fhDeltaPhiAssocPtBinHMPID[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})" );
2115 fhDeltaPhiAssocPtBinHMPID[bin]->SetYTitle("#Delta #phi (rad)");
3f150b4b 2116
c8ad7ead 2117 fhDeltaPhiAssocPtBinHMPIDAcc[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPIDAcc", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2118 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()),
2119 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2120 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2121 fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetYTitle("#Delta #phi (rad)");
3f150b4b 2122
6d9932e2 2123 outputContainer->Add(fhDeltaPhiAssocPtBinHMPID [bin]) ;
c8ad7ead 2124 outputContainer->Add(fhDeltaPhiAssocPtBinHMPIDAcc[bin]) ;
045396c8 2125 }
2126 }
c8ad7ead 2127 }
2128
a22f3f34 2129 if(fFillMomImbalancePtAssocBinsHisto)
2130 {
2131 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2132 {
2133 fhXEAssocPtBin[i] = new TH2F(Form("hXEAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
2134 Form("#it{x}_{#it{E}} vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
2135 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2136 fhXEAssocPtBin[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2137 fhXEAssocPtBin[i]->SetYTitle("#it{x}_{#it{E}}");
2138
2139 fhZTAssocPtBin[i] = new TH2F(Form("hZTAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
2140 Form("#it{z}_{T} vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
2141 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2142 fhZTAssocPtBin[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2143 fhZTAssocPtBin[i]->SetYTitle("#it{z}_{T}");
2144
2145
2146 outputContainer->Add(fhXEAssocPtBin[i]);
2147 outputContainer->Add(fhZTAssocPtBin[i]);
2148 }
2149 }
2150
2151 if(fCorrelVzBin)
2152 {
2153 for(Int_t z = 0 ; z < nz ; z++)
2154 {
2155 sz = Form("_vz%d",z);
2156 tz = Form(", #it{v}_{#it{z}} bin %d",z);
2157
2158 fhXEVZ[z] = new TH2F(Form("hXE%s", sz.Data()),
2159 Form("#it{x}_{#it{E}} vs #it{p}_{T trigger}%s", tz.Data()),
2160 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2161 fhXEVZ[z]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2162 fhXEVZ[z]->SetYTitle("#it{x}_{#it{E}}");
2163
2164 fhZTVZ[z] = new TH2F(Form("hZT%s",sz.Data()),
2165 Form("#it{z}_{T} vs #it{p}_{T trigger}%s", tz.Data()),
2166 nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax);
2167 fhZTVZ[z]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2168 fhZTVZ[z]->SetYTitle("#it{z}_{T}");
2169
2170 outputContainer->Add(fhXEVZ[z]);
2171 outputContainer->Add(fhZTVZ[z]);
2172 }
2173 }
2174
e7d2373d 2175
2176 if(fPi0Trigger)
c8ad7ead 2177 {
e7d2373d 2178 fhPtPi0DecayRatio = new TH2F
2179 ("hPtPi0DecayRatio","#it{p}_{T} of #pi^{0} and the ratio of pt for two decay",
2180 nptbins,ptmin,ptmax, 100,0.,2.);
2181 fhPtPi0DecayRatio->SetXTitle("#it{p}_{T}^{#pi^{0}} (GeV/#it{c})");
2182 fhPtPi0DecayRatio->SetYTitle("#it{p}_{T}^{Decay}/#it{p}_{T}^{#pi^{0}}");
2183 outputContainer->Add(fhPtPi0DecayRatio) ;
3f150b4b 2184
e7d2373d 2185 fhDeltaPhiPi0DecayCharged = new TH2F
2186 ("hDeltaPhiPi0DecayCharged","#phi_{Decay} - #phi_{h^{#pm}} vs #it{p}_{T Decay}",
c8ad7ead 2187 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
e7d2373d 2188 fhDeltaPhiPi0DecayCharged->SetYTitle("#Delta #phi (rad)");
2189 fhDeltaPhiPi0DecayCharged->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
907b38cd 2190
e7d2373d 2191 fhXEPi0DecayCharged =
2192 new TH2F("hXEPi0DecayCharged","#it{x}_{#it{E}} Decay",
7aaa6c97 2193 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
e7d2373d 2194 fhXEPi0DecayCharged->SetYTitle("#it{x}_{#it{E}}");
2195 fhXEPi0DecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
907b38cd 2196
e7d2373d 2197 fhZTPi0DecayCharged =
2198 new TH2F("hZTPi0DecayCharged","#it{z}_{trigger h^{#pm}} = #it{p}_{T h^{#pm}} / #it{p}_{T Decay}",
7aaa6c97 2199 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
e7d2373d 2200 fhZTPi0DecayCharged->SetYTitle("#it{z}_{decay h^{#pm}}");
2201 fhZTPi0DecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
045396c8 2202
e7d2373d 2203 outputContainer->Add(fhDeltaPhiPi0DecayCharged) ;
2204 outputContainer->Add(fhXEPi0DecayCharged) ;
2205 outputContainer->Add(fhZTPi0DecayCharged) ;
2206 }
2207
2208 if(fDecayTrigger)
2209 {
2210 for(Int_t ibit = 0; ibit< fNDecayBits; ibit++)
2211 {
2212 fhDeltaPhiDecayCharged[ibit] = new TH2F
2213 (Form("hDeltaPhiDecayCharged_bit%d",fDecayBits[ibit]),
2214 Form("#phi_{Decay} - #phi_{h^{#pm}} vs #it{p}_{T Decay}, Bit %d",fDecayBits[ibit]),
2215 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2216 fhDeltaPhiDecayCharged[ibit]->SetYTitle("#Delta #phi (rad)");
2217 fhDeltaPhiDecayCharged[ibit]->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
2218
2219 fhXEDecayCharged[ibit] =
2220 new TH2F(Form("hXEDecayCharged_bit%d",fDecayBits[ibit]),
2221 Form("#it{x}_{#it{E}} Decay, Bit %d",fDecayBits[ibit]),
2222 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2223 fhXEDecayCharged[ibit]->SetYTitle("#it{x}_{#it{E}}");
2224 fhXEDecayCharged[ibit]->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2225
2226 fhZTDecayCharged[ibit] =
2227 new TH2F(Form("hZTDecayCharged_bit%d",fDecayBits[ibit]),
2228 Form("#it{z}_{trigger h^{#pm}} = #it{p}_{T h^{#pm}} / #it{p}_{T Decay}, Bit %d",fDecayBits[ibit]),
2229 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2230 fhZTDecayCharged[ibit]->SetYTitle("#it{z}_{decay h^{#pm}}");
2231 fhZTDecayCharged[ibit]->SetXTitle("#it{p}_{T decay} (GeV/#it{c})");
2232
2233 outputContainer->Add(fhDeltaPhiDecayCharged[ibit]) ;
2234 outputContainer->Add(fhXEDecayCharged[ibit]) ;
2235 outputContainer->Add(fhZTDecayCharged[ibit]) ;
2236 }
c8ad7ead 2237 }
2238
6ed1ad3e 2239 //Correlation with neutral hadrons
2240 if(fNeutralCorr)
547c2f01 2241 {
e09cf5ef 2242 fhDeltaPhiDeltaEtaNeutral = new TH2F
babcbc9d 2243 ("hDeltaPhiDeltaEtaNeutral","#phi_{trigger} - #phi_{h^{0}} vs #eta_{trigger} - #eta_{h^{0}}",
c8ad7ead 2244 ndeltaphibins ,deltaphimin,deltaphimax, ndeltaetabins ,deltaetamin,deltaetamax);
2bb7ac98 2245 fhDeltaPhiDeltaEtaNeutral->SetXTitle("#Delta #phi (rad)");
c8ad7ead 2246 fhDeltaPhiDeltaEtaNeutral->SetYTitle("#Delta #eta");
e09cf5ef 2247
2248 fhPhiNeutral = new TH2F
858212dd 2249 ("hPhiNeutral","#phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}",
2af40966 2250 nptbins,ptmin,ptmax,180,0,TMath::TwoPi());
e09cf5ef 2251 fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)");
858212dd 2252 fhPhiNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})");
e09cf5ef 2253
2254 fhEtaNeutral = new TH2F
858212dd 2255 ("hEtaNeutral","#eta_{#pi^{0}} vs #it{p}_{T #pi^{0}}",
2af40966 2256 nptbins,ptmin,ptmax,200,-1.,1.);
e09cf5ef 2257 fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)");
858212dd 2258 fhEtaNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})");
e09cf5ef 2259
2260 fhDeltaPhiNeutral = new TH2F
858212dd 2261 ("hDeltaPhiNeutral","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T trigger}",
2af40966 2262 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2bb7ac98 2263 fhDeltaPhiNeutral->SetYTitle("#Delta #phi (rad)");
858212dd 2264 fhDeltaPhiNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
e09cf5ef 2265
2266 fhDeltaPhiNeutralPt = new TH2F
858212dd 2267 ("hDeltaPhiNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}",
c8ad7ead 2268 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2bb7ac98 2269 fhDeltaPhiNeutralPt->SetYTitle("#Delta #phi (rad)");
858212dd 2270 fhDeltaPhiNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
e09cf5ef 2271
e09cf5ef 2272 fhDeltaEtaNeutral = new TH2F
858212dd 2273 ("hDeltaEtaNeutral","#eta_{trigger} - #eta_{#pi^{0}} vs #it{p}_{T trigger}",
c8ad7ead 2274 nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
e09cf5ef 2275 fhDeltaEtaNeutral->SetYTitle("#Delta #eta");
858212dd 2276 fhDeltaEtaNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
e09cf5ef 2277
c8ad7ead 2278 fhXENeutral =
858212dd 2279 new TH2F("hXENeutral","#it{x}_{#it{E}} for #pi^{0} associated",
7aaa6c97 2280 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
858212dd 2281 fhXENeutral->SetYTitle("#it{x}_{#it{E}}");
2282 fhXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
e09cf5ef 2283
c8ad7ead 2284 fhPtHbpXENeutral =
858212dd 2285 new TH2F("hHbpXENeutral","#xi = ln(1/#it{x}_{#it{E}})for #pi^{0} associated",
7aaa6c97 2286 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
858212dd 2287 fhPtHbpXENeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2288 fhPtHbpXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
e09cf5ef 2289
c8ad7ead 2290 fhZTNeutral =
858212dd 2291 new TH2F("hZTNeutral","#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated",
7aaa6c97 2292 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
858212dd 2293 fhZTNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}");
2294 fhZTNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
e09cf5ef 2295
c8ad7ead 2296 fhPtHbpZTNeutral =
858212dd 2297 new TH2F("hHbpZTNeutral","#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
7aaa6c97 2298 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
858212dd 2299 fhPtHbpZTNeutral->SetYTitle("ln(1/#it{z}_{T})");
2300 fhPtHbpZTNeutral->SetXTitle("#it{p}_{T trigger}");
3f150b4b 2301
c8ad7ead 2302 outputContainer->Add(fhDeltaPhiDeltaEtaNeutral);
2303 outputContainer->Add(fhPhiNeutral) ;
2304 outputContainer->Add(fhEtaNeutral) ;
2305 outputContainer->Add(fhDeltaPhiNeutral) ;
2306 outputContainer->Add(fhDeltaPhiNeutralPt) ;
c8ad7ead 2307 outputContainer->Add(fhDeltaEtaNeutral) ;
3f150b4b 2308 outputContainer->Add(fhXENeutral) ;
3f150b4b 2309 outputContainer->Add(fhPtHbpXENeutral) ;
3f150b4b 2310 outputContainer->Add(fhZTNeutral) ;
3f150b4b 2311 outputContainer->Add(fhPtHbpZTNeutral) ;
e09cf5ef 2312
6ed1ad3e 2313 fhDeltaPhiUeNeutralPt = new TH2F
2314 (Form("hDeltaPhiUe%sNeutralPt",right.Data()),"#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}",
2315 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2316 fhDeltaPhiUeNeutralPt->SetYTitle("#Delta #phi (rad)");
2317 fhDeltaPhiUeNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
2318
2319 fhXEUeNeutral =
2320 new TH2F(Form("hXEUeNeutral%s",right.Data()),"#it{x}_{#it{E}} for #pi^{0} associated",
7aaa6c97 2321 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
6ed1ad3e 2322 fhXEUeNeutral->SetYTitle("#it{x}_{#it{E}}");
2323 fhXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2324
2325 fhPtHbpXEUeNeutral =
2326 new TH2F(Form("hHbpXEUeNeutral%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
7aaa6c97 2327 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
6ed1ad3e 2328 fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2329 fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2330
2331 fhZTUeNeutral =
2332 new TH2F(Form("hZTUeNeutral%s",right.Data()),"#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated",
7aaa6c97 2333 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
6ed1ad3e 2334 fhZTUeNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}");
2335 fhZTUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
e09cf5ef 2336
6ed1ad3e 2337 fhPtHbpZTUeNeutral =
2338 new TH2F(Form("hHbpZTUeNeutral%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated",
7aaa6c97 2339 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
6ed1ad3e 2340 fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{z}_{T})");
2341 fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2342
2343 outputContainer->Add(fhDeltaPhiUeNeutralPt) ;
2344 outputContainer->Add(fhXEUeNeutral) ;
2345 outputContainer->Add(fhPtHbpXEUeNeutral) ;
2346 outputContainer->Add(fhZTUeNeutral) ;
2347 outputContainer->Add(fhPtHbpZTUeNeutral) ;
2348
547c2f01 2349 if(fMakeSeveralUE)
c8ad7ead 2350 {
e09cf5ef 2351 fhDeltaPhiUeLeftNeutral = new TH2F
858212dd 2352 ("hDeltaPhiUeLeftNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs #it{p}_{T h^{0}} with neutral UE left side range of trigger particles",
c8ad7ead 2353 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2bb7ac98 2354 fhDeltaPhiUeLeftNeutral->SetYTitle("#Delta #phi (rad)");
858212dd 2355 fhDeltaPhiUeLeftNeutral->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})");
e09cf5ef 2356 outputContainer->Add(fhDeltaPhiUeLeftNeutral) ;
2357
c8ad7ead 2358 fhXEUeLeftNeutral =
858212dd 2359 new TH2F("hXEUeNeutralLeft","#it{x}_{#it{E}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger",
7aaa6c97 2360 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
858212dd 2361 fhXEUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2362 fhXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
3f150b4b 2363 outputContainer->Add(fhXEUeLeftNeutral) ;
2364
c8ad7ead 2365 fhPtHbpXEUeLeftNeutral =
858212dd 2366 new TH2F("hHbpXEUeNeutralLeft","#xi = ln(1/#it{x}_{#it{E}}) with neutral UE left side of trigger",
7aaa6c97 2367 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
858212dd 2368 fhPtHbpXEUeLeftNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})");
2369 fhPtHbpXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
3f150b4b 2370 outputContainer->Add(fhPtHbpXEUeLeftNeutral) ;
2371
c8ad7ead 2372 fhZTUeLeftNeutral =
858212dd 2373 new TH2F("hZTUeNeutralLeft","#it{z}_{trigger h^{0}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger",
7aaa6c97 2374 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
858212dd 2375 fhZTUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}");
2376 fhZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
3f150b4b 2377 outputContainer->Add(fhZTUeLeftNeutral) ;
e09cf5ef 2378
c8ad7ead 2379 fhPtHbpZTUeLeftNeutral =
858212dd 2380 new TH2F("hHbpZTUeNeutralLeft","#xi = ln(1/#it{z}_{T}) with neutral UE left side of trigger",
7aaa6c97 2381 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
858212dd 2382 fhPtHbpZTUeLeftNeutral->SetYTitle("ln(1/#it{z}_{T})");
2383 fhPtHbpZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger}");
3f150b4b 2384 outputContainer->Add(fhPtHbpZTUeLeftNeutral) ;
6ed1ad3e 2385 }
2386
e7d2373d 2387 if(fPi0Trigger)
6ed1ad3e 2388 {
e7d2373d 2389 fhDeltaPhiPi0DecayNeutral = new TH2F
2390 ("hDeltaPhiPi0DecayNeutral","#phi_{Decay} - #phi_{h^{0}} vs #it{p}_{T Decay}",
6ed1ad3e 2391 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
e7d2373d 2392 fhDeltaPhiPi0DecayNeutral->SetYTitle("#Delta #phi (rad)");
2393 fhDeltaPhiPi0DecayNeutral->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})");
e09cf5ef 2394
e7d2373d 2395 fhXEPi0DecayNeutral =
2396 new TH2F("hXEPi0DecayNeutral","#it{x}_{#it{E}} for decay trigger",
7aaa6c97 2397 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
e7d2373d 2398 fhXEPi0DecayNeutral->SetYTitle("#it{x}_{#it{E}}");
2399 fhXEPi0DecayNeutral->SetXTitle("#it{p}_{T decay}");
6ed1ad3e 2400
e7d2373d 2401 fhZTPi0DecayNeutral =
2402 new TH2F("hZTPi0DecayNeutral","#it{z}_{trigger h^{0}} = #it{p}_{T h^{0}} / #it{p}_{T Decay}",
7aaa6c97 2403 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
e7d2373d 2404 fhZTPi0DecayNeutral->SetYTitle("#it{z}_{h^{0}}");
2405 fhZTPi0DecayNeutral->SetXTitle("#it{p}_{T decay}");
e09cf5ef 2406
e7d2373d 2407 outputContainer->Add(fhDeltaPhiPi0DecayNeutral) ;
2408 outputContainer->Add(fhXEPi0DecayNeutral) ;
2409 outputContainer->Add(fhZTPi0DecayNeutral) ;
c8ad7ead 2410 }
fe871b21 2411 }//Correlation with neutral hadrons
2412
be2df971 2413 // If data is MC, fill more histograms, depending on origin
babcbc9d 2414 if(IsDataMC())
2415 {
be2df971 2416 for(Int_t i= fMCGenTypeMin; i <= fMCGenTypeMax; i++)
6ed1ad3e 2417 {
be2df971 2418 fhMCPtTrigger[i] = new TH1F (Form("hMCPtTrigger_%s",nameMC[i].Data()),
2419 Form("MC %s: generated trigger #it{p}_{T}",nameMC[i].Data()),
2420 nptbins,ptmin,ptmax);
2421 fhMCPtTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
6ed1ad3e 2422
be2df971 2423 fhMCPhiTrigger[i] = new TH2F (Form("hMCPhiTrigger_%s",nameMC[i].Data()),
2424 Form("MC %s: generated trigger #phi",nameMC[i].Data()),
2425 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2426 fhMCPhiTrigger[i]->SetYTitle("#phi (rad)");
2427 fhMCPhiTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
6ed1ad3e 2428
be2df971 2429 fhMCEtaTrigger[i] = new TH2F (Form("hMCEtaTrigger_%s",nameMC[i].Data()),
2430 Form("MC %s: generated trigger #eta",nameMC[i].Data()),
2431 nptbins,ptmin,ptmax, netabins,etamin,etamax);
2432 fhMCEtaTrigger[i]->SetYTitle("#eta");
2433 fhMCEtaTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
6ed1ad3e 2434
be2df971 2435 if(fMakeAbsoluteLeading || fMakeNearSideLeading)
2436 {
2437 fhMCPtTriggerNotLeading[i] = new TH1F (Form("hMCPtTriggerNotLeading_%s",nameMC[i].Data()),
2438 Form("MC %s: generated trigger #it{p}_{T}, when not leading of primaries",nameMC[i].Data()),
2439 nptbins,ptmin,ptmax);
2440 fhMCPtTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2441
2442 fhMCPhiTriggerNotLeading[i] = new TH2F (Form("hMCPhiTriggerNotLeading_%s",nameMC[i].Data()),
2443 Form("MC %s: generated trigger #phi, when not leading of primaries",nameMC[i].Data()),
2444 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2445 fhMCPhiTriggerNotLeading[i]->SetYTitle("#phi (rad)");
2446 fhMCPhiTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2447
2448
2449 fhMCEtaTriggerNotLeading[i] = new TH2F (Form("hMCEtaTriggerNotLeading_%s",nameMC[i].Data()),
2450 Form("MC %s: generated triogger #eta, when not leading of primaries",nameMC[i].Data()),
2451 nptbins,ptmin,ptmax, netabins,etamin,etamax);
2452 fhMCEtaTriggerNotLeading[i]->SetYTitle("#eta ");
2453 fhMCEtaTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2454 }
2455
2456 fhMCEtaCharged[i] = new TH2F (Form("hMCEtaCharged_%s",nameMC[i].Data()),
2457 Form("MC %s: #eta_{h^{#pm}} vs #it{p}_{T #pm}",nameMC[i].Data()),
2458 nptbins,ptmin,ptmax,100,-1.,1.);
2459 fhMCEtaCharged[i]->SetYTitle("#eta_{h^{#pm}} (rad)");
2460 fhMCEtaCharged[i]->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
2461
2462 fhMCPhiCharged[i] = new TH2F(Form("hMCPhiCharged_%s",nameMC[i].Data()),
2463 Form("MC %s: phi_{h^{#pm}} vs #it{p}_{T #pm}",nameMC[i].Data()),
2464 nptbins,ptmin,ptmax,180,0,TMath::TwoPi());
2465 fhMCPhiCharged[i]->SetYTitle("MC #phi_{h^{#pm}} (rad)");
2466 fhMCPhiCharged[i]->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})");
2467
2468 fhMCDeltaPhiDeltaEtaCharged[i] = new TH2F (Form("hMCDeltaPhiDeltaEtaCharged_%s",nameMC[i].Data()),
2469 Form("MC %s: phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",nameMC[i].Data()),
2470 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2471 fhMCDeltaPhiDeltaEtaCharged[i]->SetXTitle("#Delta #phi (rad)");
2472 fhMCDeltaPhiDeltaEtaCharged[i]->SetYTitle("#Delta #eta");
2473
2474 fhMCDeltaEtaCharged[i] = new TH2F (Form("hMCDeltaEtaCharged_%s",nameMC[i].Data()),
2475 Form("MC %s: #eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger} and #it{p}_{T assoc}",nameMC[i].Data()),
2476 nptbins,ptmin,ptmax,ndeltaetabins ,deltaetamin,deltaetamax);
2477 fhMCDeltaEtaCharged[i]->SetYTitle("#Delta #eta");
2478 fhMCDeltaEtaCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2479
2480 fhMCDeltaPhiCharged[i] = new TH2F (Form("hMCDeltaPhiCharged_%s",nameMC[i].Data()),
2481 Form("MC %s: #phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",nameMC[i].Data()),
2482 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2483 fhMCDeltaPhiCharged[i]->SetYTitle("#Delta #phi (rad)");
2484 fhMCDeltaPhiCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2485
2486 fhMCDeltaPhiChargedPt[i] = new TH2F (Form("hMCDeltaPhiChargedPt_%s",nameMC[i].Data()),
2487 Form("MC %s: #phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}",nameMC[i].Data()),
2488 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2489 fhMCDeltaPhiChargedPt[i]->SetYTitle("#Delta #phi (rad)");
2490 fhMCDeltaPhiChargedPt[i]->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})");
2491
2492 fhMCPtXECharged[i] = new TH2F (Form("hMCPtXECharged_%s",nameMC[i].Data()),
2493 Form("MC %s: #it{x}_{#it{E}} with charged hadrons",nameMC[i].Data()),
2494 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2495 fhMCPtXECharged[i]->SetYTitle("#it{x}_{#it{E}}");
2496 fhMCPtXECharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2497
2498 fhMCPtHbpXECharged[i] = new TH2F(Form("hMCHbpXECharged_%s",nameMC[i].Data()),
2499 Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",nameMC[i].Data()),
2500 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2501 fhMCPtHbpXECharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})");
2502 fhMCPtHbpXECharged[i]->SetXTitle("#it{p}_{T trigger}");
2503
2504 fhMCPtZTCharged[i] = new TH2F(Form("hMCPtZTCharged_%s",nameMC[i].Data()),
2505 Form("MC %s: #it{z}_{T} with charged hadrons",nameMC[i].Data()),
2506 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2507 fhMCPtZTCharged[i]->SetYTitle("#it{z}_{T}");
2508 fhMCPtZTCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2509
2510 fhMCPtHbpZTCharged[i] = new TH2F(Form("hMCHbpZTCharged_%s",nameMC[i].Data()),
2511 Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons",nameMC[i].Data()),
2512 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2513 fhMCPtHbpZTCharged[i]->SetYTitle("ln(1/#it{z}_{T})");
2514 fhMCPtHbpZTCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2515
2516 fhMCPtTrigPout[i] = new TH2F(Form("hMCPtTrigPout_%s",nameMC[i].Data()),
2517 Form("MC %s: #it{p}_{out} with triggers",nameMC[i].Data()),
2518 nptbins,ptmin,ptmax,nptbins,-1.*ptmax/2.,ptmax/2.);
2519 fhMCPtTrigPout[i]->SetYTitle("#it{p}_{out} (GeV/#it{c})");
2520 fhMCPtTrigPout[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2521
2522 fhMCPtAssocDeltaPhi[i] = new TH2F(Form("hMCPtAssocDeltaPhi_%s",nameMC[i].Data()),
2523 Form("MC %s: #Delta #phi with associated charged hadrons",nameMC[i].Data()),
2524 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2525 fhMCPtAssocDeltaPhi[i]->SetYTitle("#Delta #phi (rad)");
2526 fhMCPtAssocDeltaPhi[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
f2d29137 2527
be2df971 2528 outputContainer->Add(fhMCPtTrigger[i]);
2529 outputContainer->Add(fhMCPhiTrigger[i]);
2530 outputContainer->Add(fhMCEtaTrigger[i]);
f2d29137 2531
be2df971 2532 if(fMakeAbsoluteLeading || fMakeNearSideLeading)
2533 {
2534 outputContainer->Add(fhMCPtTriggerNotLeading[i]);
2535 outputContainer->Add(fhMCPhiTriggerNotLeading[i]);
2536 outputContainer->Add(fhMCEtaTriggerNotLeading[i]);
2537 }
6ed1ad3e 2538
be2df971 2539 outputContainer->Add(fhMCDeltaPhiDeltaEtaCharged[i]);
2540 outputContainer->Add(fhMCPhiCharged[i]) ;
2541 outputContainer->Add(fhMCEtaCharged[i]) ;
2542 outputContainer->Add(fhMCDeltaEtaCharged[i]) ;
2543 outputContainer->Add(fhMCDeltaPhiCharged[i]) ;
2544
2545 outputContainer->Add(fhMCDeltaPhiChargedPt[i]) ;
2546 outputContainer->Add(fhMCPtXECharged[i]) ;
2547 outputContainer->Add(fhMCPtZTCharged[i]) ;
2548 outputContainer->Add(fhMCPtHbpXECharged[i]) ;
2549 outputContainer->Add(fhMCPtHbpZTCharged[i]) ;
2550 outputContainer->Add(fhMCPtTrigPout[i]) ;
2551 outputContainer->Add(fhMCPtAssocDeltaPhi[i]) ;
2552
2553 // Underlying event
2554
2555 fhMCUePart[i] =
2556 new TH1F(Form("hMCUePart_%s",nameMC[i].Data()),
2557 Form("MC %s: UE particles distribution vs #it{p}_{T trigger}",nameMC[i].Data()),
2558 nptbins,ptmin,ptmax);
2559 fhMCUePart[i]->SetYTitle("#it{dN}^{ch}");
2560 fhMCUePart[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2561
2562 fhMCPtXEUeCharged[i] =
349eb23d 2563 new TH2F(Form("hMCPtXEUeCharged%s_%s",right.Data(),nameMC[i].Data()),
2564 Form("MC %s: #it{x}_{#it{E}} with charged hadrons, Underlying Event %s",nameMC[i].Data(),right.Data()),
7aaa6c97 2565 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
be2df971 2566 fhMCPtXEUeCharged[i]->SetYTitle("#it{x}_{#it{E}}");
2567 fhMCPtXEUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
6ed1ad3e 2568
be2df971 2569 fhMCPtHbpXEUeCharged[i] =
349eb23d 2570 new TH2F(Form("hMCPtHbpXEUeCharged%s_%s",right.Data(),nameMC[i].Data()),
2571 Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, Underlying Event %s",nameMC[i].Data(),right.Data()),
7aaa6c97 2572 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
be2df971 2573 fhMCPtHbpXEUeCharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})");
2574 fhMCPtHbpXEUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
6ed1ad3e 2575
be2df971 2576 fhMCPtZTUeCharged[i] =
349eb23d 2577 new TH2F(Form("hMCPtZTUeCharged%s_%s",right.Data(),nameMC[i].Data()),
2578 Form("MC %s: #it{z}_{T} with charged hadrons, Underlying Event %s",nameMC[i].Data(),right.Data()),
be2df971 2579 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2580 fhMCPtZTUeCharged[i]->SetYTitle("#it{z}_{T}");
2581 fhMCPtZTUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
6ed1ad3e 2582
be2df971 2583 fhMCPtHbpZTUeCharged[i] =
349eb23d 2584 new TH2F(Form("hMCPtHbpZTUeCharged%s_%s",right.Data(),nameMC[i].Data()),
2585 Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons, Underlying Event %s",nameMC[i].Data(),right.Data()),
be2df971 2586 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2587 fhMCPtHbpZTUeCharged[i]->SetYTitle("ln(1/#it{z}_{T})");
2588 fhMCPtHbpZTUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2589
2590 outputContainer->Add(fhMCUePart[i]);
2591 outputContainer->Add(fhMCPtXEUeCharged[i]) ;
2592 outputContainer->Add(fhMCPtZTUeCharged[i]) ;
2593 outputContainer->Add(fhMCPtHbpZTUeCharged[i]);
2594 outputContainer->Add(fhMCPtHbpXEUeCharged[i]);
2595
2596 if(fMakeSeveralUE)
2597 {
2598 fhMCPtXEUeLeftCharged[i] = new TH2F(Form("hMCPtXEUeChargedLeft_%s",nameMC[i].Data()),
2599 Form("MC %s: #it{x}_{#it{E}} with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2600 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2601 fhMCPtXEUeLeftCharged[i]->SetYTitle("#it{x}_{#it{E}}");
2602 fhMCPtXEUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2603
2604 fhMCPtHbpXEUeLeftCharged[i] = new TH2F(Form("hMCPtHbpXEUeChargedLeft_%s",nameMC[i].Data()),
2605 Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2606 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2607 fhMCPtHbpXEUeLeftCharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})");
2608 fhMCPtHbpXEUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2609
2610 fhMCPtZTUeLeftCharged[i] = new TH2F(Form("hMCPtZTUeChargedLeft_%s",nameMC[i].Data()),
2611 Form("MC %s: #it{z}_{T} with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2612 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
2613 fhMCPtZTUeLeftCharged[i]->SetYTitle("#it{z}_{T}");
2614 fhMCPtZTUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2615
2616 fhMCPtHbpZTUeLeftCharged[i] = new TH2F(Form("hMCPtHbpZTUeChargedLeft_%s",nameMC[i].Data()),
2617 Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()),
2618 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
2619 fhMCPtHbpZTUeLeftCharged[i]->SetYTitle("ln(1/#it{z}_{T})");
2620 fhMCPtHbpZTUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2621
2622 outputContainer->Add(fhMCPtXEUeLeftCharged[i]) ;
2623 outputContainer->Add(fhMCPtZTUeLeftCharged[i]) ;
2624 outputContainer->Add(fhMCPtHbpXEUeLeftCharged[i]);
2625 outputContainer->Add(fhMCPtHbpZTUeLeftCharged[i]) ;
2626
2627 }
f2d29137 2628 }
fe871b21 2629 } //for MC histogram
2630
2e876d85 2631 if(DoOwnMix())
029dea5a 2632 {
2633 //create event containers
029dea5a 2634
c8ad7ead 2635 if(!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForTracksExists()))
2e876d85 2636 {
d07ffd54 2637 Int_t nvz = GetNZvertBin();
2638 Int_t nrp = GetNRPBin();
2639 Int_t nce = GetNCentrBin();
283f989c 2640
d07ffd54 2641 fListMixTrackEvents= new TList*[nvz*nrp*nce] ;
2642
2643 for( Int_t ice = 0 ; ice < nce ; ice++ )
2644 {
2645 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2646 {
2647 for( Int_t irp = 0 ; irp < nrp ; irp++ )
2648 {
2649 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2650
2651 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
2652 // ic,iz, irp, bin);
2653
2654 fListMixTrackEvents[bin] = new TList() ;
2655 fListMixTrackEvents[bin]->SetOwner(kFALSE);
2656 }
2657 }
c8ad7ead 2658 }
d07ffd54 2659 }
d0b625bc 2660
55c20a99 2661 fhPtTriggerMixed = new TH1F ("hPtTriggerMixed","#it{p}_{T} distribution of trigger particles, used for mixing", nptbins,ptmin,ptmax);
2662 fhPtTriggerMixed->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
c8ad7ead 2663
7d306daf 2664 if(fCorrelVzBin)
2665 {
55c20a99 2666 fhPtTriggerMixedVzBin = new TH2F ("hPtTriggerMixedVzBin","#it{p}_{T} distribution of trigger particles, used for mixing", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin());
2667 fhPtTriggerMixedVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2668 fhPtTriggerMixedVzBin->SetYTitle("#it{v}_{#it{z}} bin");
2669 outputContainer->Add(fhPtTriggerMixedVzBin);
7d306daf 2670 }
2671
55c20a99 2672 fhPtTriggerMixedBin = new TH2F ("hPtTriggerMixedBin","#it{p}_{T} distribution of trigger particles vs mixing bin", nptbins,ptmin,ptmax,nMixBins,0,nMixBins);
2673 fhPtTriggerMixedBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
2674 fhPtTriggerMixedBin->SetYTitle("Bin");
c8ad7ead 2675
55c20a99 2676 fhPhiTriggerMixed = new TH2F ("hPhiTriggerMixed","#phi distribution of trigger Particles, used for mixing",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2677 fhPhiTriggerMixed->SetYTitle("#phi (rad)");
d0b625bc 2678
55c20a99 2679 fhEtaTriggerMixed = new TH2F ("hEtaTriggerMixed","#eta distribution of trigger, used for mixing",nptbins,ptmin,ptmax, netabins,etamin,etamax);
2680 fhEtaTriggerMixed->SetYTitle("#eta ");
d0b625bc 2681
55c20a99 2682 outputContainer->Add(fhPtTriggerMixed);
2683 outputContainer->Add(fhPtTriggerMixedBin);
2684 outputContainer->Add(fhPhiTriggerMixed);
2685 outputContainer->Add(fhEtaTriggerMixed);
d0b625bc 2686
2bb7ac98 2687 // Fill the cluster pool only in isolation analysis or if requested
de9949a4 2688 if( neutralMix && (!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForCaloExists())))
d07ffd54 2689 {
7ed3a248 2690 Int_t nvz = GetNZvertBin();
2691 Int_t nrp = GetNRPBin();
2692 Int_t nce = GetNCentrBin();
2693
d07ffd54 2694 fListMixCaloEvents= new TList*[nvz*nrp*nce] ;
7ed3a248 2695
2696 for( Int_t ice = 0 ; ice < nce ; ice++ )
2e876d85 2697 {
7ed3a248 2698 for( Int_t ivz = 0 ; ivz < nvz ; ivz++ )
2e876d85 2699 {
7ed3a248 2700 for( Int_t irp = 0 ; irp < nrp ; irp++ )
283f989c 2701 {
7ed3a248 2702 Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp;
2703
da3c40f7 2704 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
7ed3a248 2705 // ic,iz, irp, bin);
2706
d07ffd54 2707 fListMixCaloEvents[bin] = new TList() ;
2708 fListMixCaloEvents[bin]->SetOwner(kFALSE);
283f989c 2709 }
2e876d85 2710 }
c8ad7ead 2711 }
283f989c 2712 }
2713
2714 //Init the list in the reader if not done previously
d07ffd54 2715 if(fUseMixStoredInReader)
283f989c 2716 {
c8ad7ead 2717 if( !GetReader()->ListWithMixedEventsForTracksExists() )
d07ffd54 2718 GetReader()->SetListWithMixedEventsForTracks(fListMixTrackEvents);
2719
c8ad7ead 2720 if( !GetReader()->ListWithMixedEventsForCaloExists() )
d07ffd54 2721 GetReader()->SetListWithMixedEventsForCalo (fListMixCaloEvents );
283f989c 2722 }
029dea5a 2723
efb540af 2724 fhEventBin=new TH1I("hEventBin","Number of triggers per bin(cen,vz,rp)",
c8ad7ead 2725 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2e876d85 2726 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
7aaa6c97 2727 fhEventBin->SetXTitle("event bin");
2e876d85 2728 outputContainer->Add(fhEventBin) ;
283f989c 2729
efb540af 2730 fhEventMixBin=new TH1I("hEventMixBin","Number of triggers mixed per event bin(cen,vz,rp)",
2e876d85 2731 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2732 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
7aaa6c97 2733 fhEventMixBin->SetXTitle("event bin");
2e876d85 2734 outputContainer->Add(fhEventMixBin) ;
efb540af 2735
2736 fhEventMBBin=new TH1I("hEventMBBin","Number of min bias events per bin(cen,vz,rp)",
2737 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2738 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2739 fhEventMBBin->SetXTitle("event bin");
2740 outputContainer->Add(fhEventMBBin) ;
2741
7aaa6c97 2742 fhNtracksMB=new TH2F("hNtracksMBEvent","Number of filtered tracks in MB event per event bin",ntrbins,trmin,trmax,
2743 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2744 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2745 fhNtracksMB->SetYTitle("event bin");
2746 fhNtracksMB->SetXTitle("#it{N}_{track}");
2e876d85 2747 outputContainer->Add(fhNtracksMB);
7aaa6c97 2748
de9949a4 2749 if( neutralMix )
2bb7ac98 2750 {
7aaa6c97 2751 fhNclustersMB=new TH2F("hNclustersMBEvent","Number of filtered clusters in MB events per event bin",nclbins,clmin,clmax,
2752 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
2753 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
2754 fhNclustersMB->SetYTitle("event bin");
2755 fhNclustersMB->SetXTitle("#it{N}_{cluster}");
2bb7ac98 2756 outputContainer->Add(fhNclustersMB);
2757 }
2758
029dea5a 2759 fhMixDeltaPhiCharged = new TH2F
858212dd 2760 ("hMixDeltaPhiCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",
c8ad7ead 2761 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
2bb7ac98 2762 fhMixDeltaPhiCharged->SetYTitle("#Delta #phi (rad)");
858212dd 2763 fhMixDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
029dea5a 2764 outputContainer->Add(fhMixDeltaPhiCharged);
283f989c 2765
029dea5a 2766 fhMixDeltaPhiDeltaEtaCharged = new TH2F
2767 ("hMixDeltaPhiDeltaEtaCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
c8ad7ead 2768 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2bb7ac98 2769 fhMixDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)");
029dea5a 2770 fhMixDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
2771 outputContainer->Add(fhMixDeltaPhiDeltaEtaCharged);
283f989c 2772
c8ad7ead 2773 fhMixXECharged =
858212dd 2774 new TH2F("hMixXECharged","Mixed event : #it{x}_{#it{E}} for charged tracks",
7aaa6c97 2775 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
858212dd 2776 fhMixXECharged->SetYTitle("#it{x}_{#it{E}}");
2777 fhMixXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
08f220c8 2778 outputContainer->Add(fhMixXECharged);
18838011 2779
2780 fhMixXEUeCharged =
858212dd 2781 new TH2F("hMixXEUeCharged","Mixed event : #it{x}_{#it{E}} for charged tracks in Ue region",
7aaa6c97 2782 nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
858212dd 2783 fhMixXEUeCharged->SetYTitle("#it{x}_{#it{E}}");
2784 fhMixXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
18838011 2785 outputContainer->Add(fhMixXEUeCharged);
c8ad7ead 2786
18838011 2787 fhMixHbpXECharged =
858212dd 2788 new TH2F("hMixHbpXECharged","mixed event : #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",
7aaa6c97 2789 nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
858212dd 2790 fhMixHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})");
2791 fhMixHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
08f220c8 2792 outputContainer->Add(fhMixHbpXECharged);
c8ad7ead 2793
7d306daf 2794 fhMixDeltaPhiChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
2795 fhMixDeltaPhiChargedAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz];
2796 fhMixDeltaPhiChargedAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz];
2797 fhMixDeltaPhiDeltaEtaChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz];
283f989c 2798
029dea5a 2799 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
c8ad7ead 2800 {
7d306daf 2801 for(Int_t z = 0 ; z < nz ; z++)
8cc41381 2802 {
7d306daf 2803 Int_t bin = i*nz+z;
8cc41381 2804
7d306daf 2805 if(fCorrelVzBin)
2806 {
d71a7d1f 2807 sz = Form("_vz%d",z);
858212dd 2808 tz = Form(", #it{v}_{#it{z}} bin %d",z);
7d306daf 2809 }
2810
2811 //printf("MIX : iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data());
2812
c8ad7ead 2813 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiDeltaEtaChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2814 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()),
2815 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
2bb7ac98 2816 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)");
8cc41381 2817 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetYTitle("#Delta #eta");
2818
8cc41381 2819 outputContainer->Add(fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]);
a22f3f34 2820
2821 fhMixDeltaPhiChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2822 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()),
2823 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2824 fhMixDeltaPhiChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2825 fhMixDeltaPhiChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)");
2826
2827 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBin[bin]);
2828
2829 if(fFillEtaGapsHisto)
2830 {
2831 fhMixDeltaPhiChargedAssocPtBinDEta08[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0.8ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2832 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()),
2833 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2834 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2835 fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)");
2836
2837 fhMixDeltaPhiChargedAssocPtBinDEta0[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()),
2838 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()),
2839 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
2840 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
2841 fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)");
2842
2843 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta08[bin]);
2844 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta0[bin]);
2845 }
8cc41381 2846 }
c8ad7ead 2847 }
029dea5a 2848 }
7d306daf 2849
e09cf5ef 2850 return outputContainer;
2851
2852}
2853
55bf1615 2854//_____________________________________________________________________________________________________________________
2855Bool_t AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum(Int_t indexPhoton1, Int_t indexPhoton2, Int_t idetector)
907b38cd 2856{
2857 // Get the momentum of the pi0/eta assigned decay photons
c8ad7ead 2858 // In case of pi0/eta trigger, we may want to check their decay correlation,
907b38cd 2859 // get their decay children
2860
907b38cd 2861 if(indexPhoton1!=-1 || indexPhoton2!=-1) return kFALSE;
2862
2db10729 2863 AliDebug(1,Form("indexPhoton1 = %d, indexPhoton2 = %d", indexPhoton1, indexPhoton2));
907b38cd 2864
c8ad7ead 2865 TObjArray * clusters = 0x0 ;
55bf1615 2866 if(idetector==kEMCAL) clusters = GetEMCALClusters() ;
2867 else clusters = GetPHOSClusters() ;
907b38cd 2868
2869 for(Int_t iclus = 0; iclus < clusters->GetEntriesFast(); iclus++)
2870 {
6d9932e2 2871 AliVCluster * photon = (AliVCluster*) (clusters->At(iclus));
2872
349eb23d 2873 if(photon->GetID()==indexPhoton1) photon->GetMomentum(fDecayMom1,GetVertex(0)) ;
2874 if(photon->GetID()==indexPhoton2) photon->GetMomentum(fDecayMom2,GetVertex(0)) ;
907b38cd 2875
2db10729 2876 AliDebug(1,Form("Photon1 = %f, Photon2 = %f", fDecayMom1.Pt(), fDecayMom2.Pt()));
907b38cd 2877
2878 } //cluster loop
2879
2880 return kTRUE;
2881
2882}
2883
b1f720a7 2884//_____________________________________________________________
22ad7981 2885Int_t AliAnaParticleHadronCorrelation::GetMCTagHistogramIndex(Int_t mcTag)
b1f720a7 2886{
2887 // Index of MC histograms depending on MC origin
2888
2889 if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPrompt) ||
2890 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCFragmentation)) return 0;
2891 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0)) return 1;
2892 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0Decay)) return 2;
be2df971 2893 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) ||
2894 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEtaDecay)) return 3;
b1f720a7 2895 else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCOtherDecay)) return 4;
2896 else if(!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron)) return 5;
2897 else return 6;
2898
2899}
2900
c8ad7ead 2901//_________________________________________
2902void AliAnaParticleHadronCorrelation::Init()
2903{
2904 //Init
2905 //Do some checks
2906
2907 if(!GetReader()->IsCTSSwitchedOn())
2db10729 2908 AliFatal("STOP!: You want to use CTS tracks in analysis but not read!! \n!!Check the configuration file!!");
c8ad7ead 2909}
2910
05d0d05d 2911//____________________________________________________
e09cf5ef 2912void AliAnaParticleHadronCorrelation::InitParameters()
2913{
2914
2915 //Initialize the parameters of the analysis.
e4c0a0eb 2916 SetInputAODName("Particle");
e09cf5ef 2917 SetAODObjArrayName("Hadrons");
2918 AddToHistogramsName("AnaHadronCorr_");
045396c8 2919
e09cf5ef 2920 SetPtCutRange(0.,300);
b6afb6b1 2921 fDeltaPhiMinCut = TMath::DegToRad()*120.;
2922 fDeltaPhiMaxCut = TMath::DegToRad()*240. ;
045396c8 2923 fSelectIsolated = kFALSE;
2924 fMakeSeveralUE = kFALSE;
b6afb6b1 2925 fUeDeltaPhiMinCut = TMath::DegToRad()*60.;
2926 fUeDeltaPhiMaxCut = TMath::DegToRad()*120 ;
907b38cd 2927
045396c8 2928 fNeutralCorr = kFALSE ;
2929 fPi0Trigger = kFALSE ;
907b38cd 2930 fDecayTrigger = kFALSE ;
2931 fHMPIDCorrelation = kFALSE ;
045396c8 2932
3f150b4b 2933 fMakeAbsoluteLeading = kTRUE;
2934 fMakeNearSideLeading = kFALSE;
2935
050ad675 2936 fNAssocPtBins = 9 ;
2937 fAssocPtBinLimit[0] = 0.2 ;
f85f4afb 2938 fAssocPtBinLimit[1] = 0.5 ;
2939 fAssocPtBinLimit[2] = 1.0 ;
2940 fAssocPtBinLimit[3] = 2.0 ;
2941 fAssocPtBinLimit[4] = 3.0 ;
2942 fAssocPtBinLimit[5] = 4.0 ;
2943 fAssocPtBinLimit[6] = 5.0 ;
2944 fAssocPtBinLimit[7] = 6.0 ;
2945 fAssocPtBinLimit[8] = 7.0 ;
2946 fAssocPtBinLimit[9] = 8.0 ;
2947 fAssocPtBinLimit[10] = 9.0 ;
2948 fAssocPtBinLimit[11] = 10.0 ;
2949 fAssocPtBinLimit[12] = 12.0 ;
2950 fAssocPtBinLimit[13] = 14.0 ;
2951 fAssocPtBinLimit[14] = 16.0 ;
2952 fAssocPtBinLimit[15] = 20.0 ;
2953 fAssocPtBinLimit[16] = 30.0 ;
2954 fAssocPtBinLimit[17] = 40.0 ;
2955 fAssocPtBinLimit[18] = 50.0 ;
2956 fAssocPtBinLimit[19] = 200.0 ;
2957
283f989c 2958 fUseMixStoredInReader = kTRUE;
2959
e4c0a0eb 2960 fM02MinCut = -1 ;
2961 fM02MaxCut = -1 ;
2962
f7408d50 2963 fSelectLeadingHadronAngle = kFALSE;
0cea6003 2964 fFillLeadHadOppositeHisto = kFALSE;
f7408d50 2965 fMinLeadHadPhi = 150*TMath::DegToRad();
2966 fMaxLeadHadPhi = 210*TMath::DegToRad();
2967
2968 fMinLeadHadPt = 1;
2969 fMaxLeadHadPt = 100;
2970
be2df971 2971 fMCGenTypeMin = 0;
2972 fMCGenTypeMax = 6;
2973
e7d2373d 2974 fNDecayBits = 1;
2975 fDecayBits[0] = AliNeutralMesonSelection::kPi0;
2976 fDecayBits[1] = AliNeutralMesonSelection::kEta;
2977 fDecayBits[2] = AliNeutralMesonSelection::kPi0Side;
2978 fDecayBits[3] = AliNeutralMesonSelection::kEtaSide;
e09cf5ef 2979}
2980
f3c47a7f 2981//_________________________________________________________________________
2982Bool_t AliAnaParticleHadronCorrelation::IsTriggerTheEventLeadingParticle()
c8ad7ead 2983{
f3c47a7f 2984 // Check if the what of the selected triggers is leading particle comparing
2985 // with all the triggers, all the tracks or all the clusters (if requested for the clusters).
e09cf5ef 2986
1f8591af 2987 Double_t ptTrig = GetMinPt();
c8ad7ead 2988 Double_t phiTrig = 0 ;
f3c47a7f 2989 fLeadingTriggerIndex =-1 ;
2990 Int_t index =-1 ;
2991 AliAODPWG4ParticleCorrelation* pLeading = 0;
2992
2b65bd0e 2993 // Loop on stored AOD particles, find leading trigger on the selected list, with at least min pT.
f3c47a7f 2994
c8ad7ead 2995 for(Int_t iaod = 0; iaod < GetInputAODBranch()->GetEntriesFast() ; iaod++)
04f7a616 2996 {
e09cf5ef 2997 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
1f8591af 2998 particle->SetLeadingParticle(kFALSE); // set it later
2999
04f7a616 3000 // Vertex cut in case of mixing
3001 Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0));
3002 if(check == 0) continue;
c8ad7ead 3003 if(check == -1) return kFALSE; // not sure if it is correct.
3004
045396c8 3005 // find the leading particles with highest momentum
c8ad7ead 3006 if (particle->Pt() > ptTrig)
547c2f01 3007 {
f3c47a7f 3008 ptTrig = particle->Pt() ;
3009 phiTrig = particle->Phi();
3010 index = iaod ;
3011 pLeading = particle ;
045396c8 3012 }
c8ad7ead 3013 }// finish search of leading trigger particle on the AOD branch.
66e64043 3014
f3c47a7f 3015 if(index < 0) return kFALSE;
3016
3017 //printf("AOD leading pT %2.2f, ID %d\n", pLeading->Pt(),pLeading->GetCaloLabel(0));
7a12c958 3018
c8ad7ead 3019 if(phiTrig < 0 ) phiTrig += TMath::TwoPi();
7a12c958 3020
c8ad7ead 3021 // Compare if it is the leading of all tracks
e09cf5ef 3022
f3c47a7f 3023 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
c8ad7ead 3024 {
f3c47a7f 3025 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
3026
3027 if(track->GetID() == pLeading->GetTrackLabel(0) || track->GetID() == pLeading->GetTrackLabel(1) ||
3028 track->GetID() == pLeading->GetTrackLabel(2) || track->GetID() == pLeading->GetTrackLabel(3) ) continue ;
c8ad7ead 3029
349eb23d 3030 fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz());
3031 Float_t pt = fTrackVector.Pt();
3032 Float_t phi = fTrackVector.Phi() ;
c8ad7ead 3033 if(phi < 0) phi+=TMath::TwoPi();
3034
3035 //jump out this event if near side associated particle pt larger than trigger
3036 if (fMakeNearSideLeading)
3037 {
98604e3a 3038 Float_t deltaPhi = phiTrig-phi;
3039 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3040 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3041
3042 if(pt > ptTrig && deltaPhi < TMath::PiOver2()) return kFALSE;
c8ad7ead 3043 }
3044 //jump out this event if there is any other particle with pt larger than trigger
2b65bd0e 3045 else
c8ad7ead 3046 {
f3c47a7f 3047 if(pt > ptTrig) return kFALSE ;
c8ad7ead 3048 }
3049 }// track loop
3050
2b65bd0e 3051 // Compare if it is leading of all calorimeter clusters
3052
f3c47a7f 3053 if(fCheckLeadingWithNeutralClusters)
2b65bd0e 3054 {
f3c47a7f 3055 // Select the calorimeter cluster list
3056 TObjArray * nePl = 0x0;
1290eee4 3057 if (pLeading->GetDetectorTag() == kPHOS )
f3c47a7f 3058 nePl = GetPHOSClusters();
3059 else
3060 nePl = GetEMCALClusters();
2b65bd0e 3061
f3c47a7f 3062 if(!nePl) return kTRUE; // Do the selection just with the tracks if no calorimeter is available.
2b65bd0e 3063
f3c47a7f 3064 for(Int_t ipr = 0;ipr < nePl->GetEntriesFast() ; ipr ++ )
2b65bd0e 3065 {
f3c47a7f 3066 AliVCluster * cluster = (AliVCluster *) (nePl->At(ipr)) ;
3067
3068 if(cluster->GetID() == pLeading->GetCaloLabel(0) || cluster->GetID() == pLeading->GetCaloLabel(1) ) continue ;
3069
349eb23d 3070 cluster->GetMomentum(fMomentum,GetVertex(0));
f3c47a7f 3071
349eb23d 3072 Float_t pt = fMomentum.Pt();
3073 Float_t phi = fMomentum.Phi() ;
f3c47a7f 3074 if(phi < 0) phi+=TMath::TwoPi();
3075
3076 if(IsTrackMatched(cluster,GetReader()->GetInputEvent())) continue ; // avoid charged clusters, already covered by tracks, or cluster merging with track.
3077
3078 //jump out this event if near side associated particle pt larger than trigger
3079 // not really needed for calorimeter, unless DCal is included
3080 if (fMakeNearSideLeading)
3081 {
98604e3a 3082 Float_t deltaPhi = phiTrig-phi;
3083 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3084 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3085
3086 if(pt > ptTrig && deltaPhi < TMath::PiOver2()) return kFALSE ;
f3c47a7f 3087 }
3088 //jump out this event if there is any other particle with pt larger than trigger
3089 else
3090 {
3091 if(pt > ptTrig) return kFALSE ;
3092 }
3093 }// cluster loop
3094 } // check neutral clusters
3095
3096 fLeadingTriggerIndex = index ;
1f8591af 3097 pLeading->SetLeadingParticle(kTRUE);
3098
2db10729 3099 AliDebug(1,Form("\t particle AOD with index %d is leading with pT %2.2f", fLeadingTriggerIndex, pLeading->Pt()));
2b65bd0e 3100
c8ad7ead 3101 return kTRUE;
e09cf5ef 3102
3103}
3104
05d0d05d 3105//_________________________________________________________________
8e8bfd92 3106void AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms()
e09cf5ef 3107{
3108 //Particle-Hadron Correlation Analysis, fill histograms
3109
3f150b4b 3110 if(!GetInputAODBranch())
3111 {
2db10729 3112 AliFatal(Form("No input particles in AOD with name branch < %s >, STOP",GetInputAODName().Data()));
7a12c958 3113 return ; // coverity
e09cf5ef 3114 }
3115
c8ad7ead 3116 Int_t naod = GetInputAODBranch()->GetEntriesFast();
3117 if( naod == 0 )
3118 {
2db10729 3119 AliWarning("No particle AOD found!");
c8ad7ead 3120 return ; // no trigger particles found.
3121 }
3122
2db10729 3123 AliDebug(1,Form("Begin hadron correlation analysis, fill histograms"));
3124 AliDebug(1,Form("n particle branch aod entries %d", naod));
3125 AliDebug(1,Form("In CTS aod entries %d",GetCTSTracks()->GetEntriesFast()));
7a12c958 3126
1f8591af 3127 //------------------------------------------------------
55c20a99 3128 // Find leading trigger if analysis request only leading,
3129 // if there is no leading trigger, then skip the event
8e8bfd92 3130
1f8591af 3131 Int_t iaod = 0 ;
3132 if( fMakeAbsoluteLeading || fMakeNearSideLeading )
7a12c958 3133 {
1f8591af 3134 Bool_t leading = IsTriggerTheEventLeadingParticle();
7d306daf 3135
2db10729 3136 AliDebug(1,Form("AOD Leading trigger? %d, with index %d",leading,fLeadingTriggerIndex));
1f8591af 3137
3138 if(!leading)
547c2f01 3139 {
2db10729 3140 AliDebug(1,"Leading was requested and not found");
1f8591af 3141 return ;
3142 }
3143 else
3144 {
3145 // Select only the leading in the trigger AOD loop
8d7fba83 3146 naod = fLeadingTriggerIndex+1 ;
3147 iaod = fLeadingTriggerIndex ;
9623bf34 3148 }
7a12c958 3149 }
7a12c958 3150
8e8bfd92 3151 //------------------------------------------------------
3152 // Get event multiplicity and bins
3153
1f8591af 3154 Float_t cen = GetEventCentrality();
3155 Float_t ep = GetEventPlaneAngle();
0cea6003 3156 if(IsHighMultiplicityAnalysisOn()) fhTriggerEventPlaneCentrality->Fill(cen,ep);
1f8591af 3157
3158 Int_t mixEventBin = GetEventMixBin();
3159 Int_t vzbin = GetEventVzBin();
55c20a99 3160
8e8bfd92 3161 //------------------------------------------------------
3162 // Loop on trigger AOD
3163
1f8591af 3164 for( iaod = 0; iaod < naod; iaod++ )
7a12c958 3165 {
1f8591af 3166 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
3167
8e8bfd92 3168 //
3169 // Trigger particle selection criteria:
3170 //
1f8591af 3171 Float_t pt = particle->Pt();
8e8bfd92 3172
1f8591af 3173 if(pt < GetMinPt() || pt > GetMaxPt() ) continue ;
3174
3175 fhPtTriggerInput->Fill(pt);
3176
8e8bfd92 3177 //
3178 // check if it was a calorimeter cluster
3179 // and if the shower shape cut was requested apply it.
3180 // Not needed if already done at the particle identification level,
3181 // but for isolation studies, it is preferred not to remove so we do it here
3182 //
1f8591af 3183 Int_t clID1 = particle->GetCaloLabel(0) ;
3184 Int_t clID2 = particle->GetCaloLabel(1) ; // for photon clusters should not be set.
2db10729 3185 AliDebug(1,Form("%s Trigger : id1 %d, id2 %d, min %f, max %f, det %d",
3186 GetInputAODName().Data(),clID1,clID2,fM02MinCut,fM02MaxCut,particle->GetDetectorTag()));
1f8591af 3187
1f8591af 3188 if(clID1 > 0 && clID2 < 0 && fM02MaxCut > 0 && fM02MinCut > 0)
3189 {
c12a38d9 3190// Int_t iclus = -1;
3191// TObjArray* clusters = 0x0;
1290eee4 3192// if (particle->GetDetectorTag() == kEMCAL) clusters = GetEMCALClusters();
3193// else if(particle->GetDetectorTag() == kPHOS ) clusters = GetPHOSClusters();
c12a38d9 3194//
3195// if(clusters)
3196// {
3197// AliVCluster *cluster = FindCluster(clusters,clID1,iclus);
3198// Float_t m02 = cluster->GetM02();
3199// if(m02 > fM02MaxCut || m02 < fM02MinCut) continue ;
3200// }
3201
3202 Float_t m02 = particle->GetM02();
3203 if(m02 > fM02MaxCut || m02 < fM02MinCut) continue ;
1f8591af 3204
3205 fhPtTriggerSSCut->Fill(pt);
3206 }
3207
8e8bfd92 3208 //
1f8591af 3209 // Check if the particle is isolated or if we want to take the isolation into account
8e8bfd92 3210 // This bool is set in AliAnaParticleIsolation
3211 //
1f8591af 3212 if(OnlyIsolated())
3213 {
3214 if( !particle->IsIsolated() ) continue;
3215 fhPtTriggerIsoCut->Fill(pt);
3216 }
3217
8e8bfd92 3218 //
1f8591af 3219 // Check if trigger is in fiducial region
8e8bfd92 3220 //
1f8591af 3221 if(IsFiducialCutOn())
3222 {
1290eee4 3223 Bool_t in = GetFiducialCut()->IsInFiducialCut(particle->Eta(),particle->Phi(),particle->GetDetectorTag()) ;
1f8591af 3224 if(! in ) continue ;
3225 }
3226
3227 fhPtTriggerFidCut->Fill(pt);
3228
8e8bfd92 3229 //---------------------------------------
3230 // Make correlation
1f8591af 3231
6b013448 3232 // Find the leading hadron in the opposite hemisphere to the triggeer
3233 // and accept the trigger if leading is in defined window.
3234 Bool_t okLeadHad = kTRUE;
98604e3a 3235 if(fSelectLeadingHadronAngle || fFillLeadHadOppositeHisto)
3236 {
6b013448 3237 okLeadHad = FindLeadingOppositeHadronInWindow(particle);
98604e3a 3238 if(!okLeadHad && fSelectLeadingHadronAngle) continue;
3239 }
6b013448 3240
5267de40 3241 //
6b013448 3242 // Charged particles correlation
5267de40 3243 //
3244 MakeChargedCorrelation(particle);
3245
3246 // MC
be2df971 3247 Int_t mcIndex = -1;
4a296f4a 3248 Int_t mcTag = particle->GetTag();
3249 Bool_t lostDecayPair = kFALSE;
1f8591af 3250 if(IsDataMC())
be2df971 3251 {
4a296f4a 3252 mcIndex = GetMCTagHistogramIndex(mcTag);
e23c7107 3253 lostDecayPair = GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost);
4a296f4a 3254 MakeMCChargedCorrelation(particle->GetLabel(), mcIndex,lostDecayPair);
be2df971 3255 }
1f8591af 3256
5267de40 3257 // Do own mixed event with charged,
3258 // add event and remove previous or fill the mixed histograms
3259 if(DoOwnMix())
3260 MakeChargedMixCorrelation(particle);
3261
3262 //
6b013448 3263 // Neutral particles correlation
5267de40 3264 //
8e8bfd92 3265 if(fNeutralCorr)
bf01409a 3266 MakeNeutralCorrelation(particle);
1f8591af 3267
b6afb6b1 3268 //----------------------------------------------------------------
bf01409a 3269 // Fill trigger pT related histograms if not absolute leading
df77176b 3270
8e8bfd92 3271 //
55c20a99 3272 // pT of the trigger, vs trigger origin if MC
8e8bfd92 3273 //
55c20a99 3274 fhPtTrigger->Fill(pt);
0ff0cd12 3275 if(IsDataMC() && mcIndex >=0 && mcIndex < fgkNmcTypes)
4a296f4a 3276 {
55c20a99 3277 fhPtTriggerMC[mcIndex]->Fill(pt);
4a296f4a 3278 if( lostDecayPair && mcIndex==2 )
3279 fhPtTriggerMC[7]->Fill(pt);
3280 }
1f8591af 3281
48c5da66 3282 if(fDecayTrigger)
3283 {
c12a38d9 3284 Int_t decayTag = particle->DecayTag();
3285 if(decayTag < 0) decayTag = 0;
3286
3287 for(Int_t ibit = 0; ibit<fNDecayBits; ibit++)
48c5da66 3288 {
c12a38d9 3289 if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit]))
48c5da66 3290 {
c12a38d9 3291 fhPtDecayTrigger[ibit]->Fill(pt);
3292
3293 if(IsDataMC() && mcIndex >=0 && mcIndex < fgkNmcTypes)
48c5da66 3294 {
c12a38d9 3295 fhPtDecayTriggerMC[ibit][mcIndex]->Fill(pt);
3296 if(lostDecayPair && mcIndex==2 )
3297 fhPtDecayTriggerMC[ibit][7]->Fill(pt);
48c5da66 3298 }
c12a38d9 3299 }// check bit
3300 }// bit loop
48c5da66 3301 }
3302
8e8bfd92 3303 //
55c20a99 3304 // Acceptance of the trigger
8e8bfd92 3305 //
1f8591af 3306 Float_t phi = particle->Phi();
2af40966 3307 if( phi < 0 ) phi+=TMath::TwoPi();
55c20a99 3308 fhPhiTrigger->Fill(pt, phi);
1f8591af 3309
55c20a99 3310 fhEtaTrigger->Fill(pt, particle->Eta());
3311 //printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Trigger particle : pt %f, eta %f, phi %f\n",particle->Pt(),particle->Eta(),phi);
1f8591af 3312
3313 //----------------------------------
3314 // Trigger particle pT vs event bins
3315
55c20a99 3316 fhPtTriggerBin->Fill(pt,mixEventBin);
1f8591af 3317 if(fCorrelVzBin)
55c20a99 3318 fhPtTriggerVzBin->Fill(pt,vzbin);
1f8591af 3319
0cea6003 3320 if(IsHighMultiplicityAnalysisOn())
b6afb6b1 3321 {
3322 fhPtTriggerCentrality->Fill(pt,cen);
3323 fhPtTriggerEventPlane->Fill(pt,ep);
3324 }
1f8591af 3325
3326 //----------------------------------
3327 // Trigger particle pT vs pile-up
3328
0cea6003 3329 if(IsPileUpAnalysisOn())
1f8591af 3330 {
3331 Int_t vtxBC = GetReader()->GetVertexBC();
55c20a99 3332 if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA) fhPtTriggerVtxBC0->Fill(pt);
3333
3334 if(GetReader()->IsPileUpFromSPD()) fhPtTriggerPileUp[0]->Fill(pt);
3335 if(GetReader()->IsPileUpFromEMCal()) fhPtTriggerPileUp[1]->Fill(pt);
3336 if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtTriggerPileUp[2]->Fill(pt);
3337 if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtTriggerPileUp[3]->Fill(pt);
3338 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtTriggerPileUp[4]->Fill(pt);
3339 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtTriggerPileUp[5]->Fill(pt);
3340 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtTriggerPileUp[6]->Fill(pt);
1f8591af 3341 }
df77176b 3342 } // AOD trigger loop
e09cf5ef 3343
045396c8 3344 //Reinit for next event
3345 fLeadingTriggerIndex = -1;
e09cf5ef 3346
2db10729 3347 AliDebug(1,"End fill histograms");
e09cf5ef 3348}
3349
5267de40 3350//_______________________________________________________________________________________________________
3351void AliAnaParticleHadronCorrelation::MakeChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
e09cf5ef 3352{
3353 // Charged Hadron Correlation Analysis
2db10729 3354 AliDebug(1,"Make trigger particle - charged hadron correlation");
907b38cd 3355
3356 Float_t phiTrig = aodParticle->Phi();
3357 Float_t etaTrig = aodParticle->Eta();
3358 Float_t ptTrig = aodParticle->Pt();
b1f720a7 3359 Int_t mcTag = aodParticle->GetTag();
fedea415 3360 Double_t bz = GetReader()->GetInputEvent()->GetMagneticField();
3361
e7d2373d 3362
3363 Int_t decayTag = 0;
3364 if(fDecayTrigger)
3365 {
3366 //decay = aodParticle->IsTagged();
c12a38d9 3367 decayTag = aodParticle->DecayTag();
3368 if(decayTag < 0) decayTag = 0;
e7d2373d 3369// printf("Correlation: pT %2.2f, BTag %d, Tagged %d\n",ptTrig, decayTag, aodParticle->IsTagged());
3370// printf("\t check bit Pi0 %d, Eta %d, Pi0Side %d, EtaSide %d\n",
3371// GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kPi0),
3372// GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kEta),
3373// GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kPi0Side),
3374// GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kEtaSide));
3375 }
3376
907b38cd 3377 Float_t pt = -100. ;
907b38cd 3378 Float_t phi = -100. ;
3379 Float_t eta = -100. ;
907b38cd 3380 Float_t deltaPhi = -100. ;
e09cf5ef 3381
907b38cd 3382 TObjArray * reftracks = 0x0;
3383 Int_t nrefs = 0;
907b38cd 3384
3385 // Mixed event settings
3386 Int_t evtIndex11 = -1 ; // cluster trigger or pi0 trigger
045396c8 3387 Int_t evtIndex12 = -1 ; // pi0 trigger
3388 Int_t evtIndex13 = -1 ; // charged trigger
045396c8 3389
04f7a616 3390 if (GetMixedEvent())
3391 {
e09cf5ef 3392 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
3393 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
3394 evtIndex13 = GetMixedEvent()->EventIndex(aodParticle->GetTrackLabel(0)) ;
3395 }
3396
98604e3a 3397 // Track multiplicity or cent bin
3398 Int_t cenbin = 0;
0cea6003 3399 if(IsHighMultiplicityAnalysisOn()) cenbin = GetEventCentralityBin();
98604e3a 3400
6d9932e2 3401 //
98604e3a 3402 // In case of pi0/eta trigger, we may want to check their decay correlation,
907b38cd 3403 // get their decay children
6d9932e2 3404 //
349eb23d 3405
907b38cd 3406 Bool_t decayFound = kFALSE;
6d9932e2 3407 if( fPi0Trigger )
3408 {
349eb23d 3409 decayFound = GetDecayPhotonMomentum(aodParticle->GetCaloLabel(0),aodParticle->GetCaloLabel(1),aodParticle->GetDetectorTag());
6d9932e2 3410 if(decayFound)
3411 {
349eb23d 3412 fhPtPi0DecayRatio->Fill(ptTrig, fDecayMom1.Pt()/ptTrig);
3413 fhPtPi0DecayRatio->Fill(ptTrig, fDecayMom2.Pt()/ptTrig);
6d9932e2 3414 }
3415 }
3416
907b38cd 3417 //-----------------------------------------------------------------------
f7408d50 3418 // Track loop, select tracks with good pt, phi and fill AODs or histograms
907b38cd 3419 //-----------------------------------------------------------------------
f7408d50 3420
8e8bfd92 3421 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
547c2f01 3422 {
8e8bfd92 3423 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
045396c8 3424
349eb23d 3425 fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz());
3426 pt = fTrackVector.Pt();
3427 eta = fTrackVector.Eta();
3428 phi = fTrackVector.Phi() ;
e09cf5ef 3429 if(phi < 0) phi+=TMath::TwoPi();
045396c8 3430
e09cf5ef 3431 //Select only hadrons in pt range
66e64043 3432 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
3433
e09cf5ef 3434 //remove trigger itself for correlation when use charged triggers
3435 if( track->GetID() == aodParticle->GetTrackLabel(0) || track->GetID() == aodParticle->GetTrackLabel(1) ||
66e64043 3436 track->GetID() == aodParticle->GetTrackLabel(2) || track->GetID() == aodParticle->GetTrackLabel(3) )
045396c8 3437 continue ;
3438
b6afb6b1 3439 //Only for mixed event frame
045396c8 3440 Int_t evtIndex2 = 0 ;
04f7a616 3441 if (GetMixedEvent())
3442 {
045396c8 3443 evtIndex2 = GetMixedEvent()->EventIndex(track->GetID()) ;
3444 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 || evtIndex13 == evtIndex2 ) // photon and track from different events
3445 continue ;
3446 //vertex cut
3447 if (TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut())
5267de40 3448 continue;
045396c8 3449 }
3450
2db10729 3451 AliDebug(2,Form("Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f",pt,phi,eta));
2b65bd0e 3452
b6afb6b1 3453 // ------------------------------
3454 // Track type bin or bits setting
3455 //
3456
3457 //
3458 // * Set the pt associated bin for the defined bins *
3459 //
2b65bd0e 3460 Int_t assocBin = -1;
3461 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3462 {
3463 if(pt > fAssocPtBinLimit[i] && pt < fAssocPtBinLimit[i+1]) assocBin= i;
3464 }
3465
b6afb6b1 3466 //
3467 // * Assign to the histogram array a bin corresponding
3468 // to a combination of pTa and vz bins *
3469 //
2b65bd0e 3470 Int_t nz = 1;
3471 Int_t vz = 0;
3472
3473 if(fCorrelVzBin)
3474 {
3475 nz = GetNZvertBin();
3476 vz = GetEventVzBin();
3477 }
3478
3479 Int_t bin = assocBin*nz+vz;
3480
3481 //printf("assoc Bin = %d, vZ bin = %d, bin = %d \n", assocBin,GetEventVzBin(),bin);
3482
b6afb6b1 3483 //
3484 // * Get the status of the TOF bit *
3485 //
2b65bd0e 3486 ULong_t status = track->GetStatus();
3487 Bool_t okTOF = ( (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ) ;
3488 //Double32_t tof = track->GetTOFsignal()*1e-3;
3489 Int_t trackBC = track->GetTOFBunchCrossing(bz);
3490
3491 Int_t outTOF = -1;
3492 if (okTOF && trackBC!=0) outTOF = 1;
3493 else if(okTOF && trackBC==0) outTOF = 0;
3494
b6afb6b1 3495 //----------------
3496 // Fill Histograms
d4a8ff9a 3497
b6afb6b1 3498 //
3499 // Azimuthal Angle histograms
3500 //
2af40966 3501
6ed1ad3e 3502 deltaPhi = phiTrig-phi;
2af40966 3503
3504 //
3505 // Calculate deltaPhi shift so that for the particles on the opposite side
3506 // it is defined between 90 and 270 degrees
3507 // Shift [-360,-90] to [0, 270]
3508 // and [270,360] to [-90,0]
6ed1ad3e 3509 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3510 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3511
2b65bd0e 3512 FillChargedAngularCorrelationHistograms(pt, ptTrig, bin, phi, phiTrig, deltaPhi,
e7d2373d 3513 eta, etaTrig, decayTag, track->GetHMPIDsignal(),
d4a8ff9a 3514 outTOF, cenbin, mcTag);
2af40966 3515
b6afb6b1 3516 //
3517 // Imbalance zT/xE/pOut histograms
3518 //
2b65bd0e 3519
b6afb6b1 3520 //
3521 // Delta phi cut for momentum imbalance correlation
3522 //
2b65bd0e 3523 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
d4a8ff9a 3524 FillChargedMomentumImbalanceHistograms(ptTrig, pt, deltaPhi, cenbin, track->Charge(),
e7d2373d 3525 assocBin, decayTag, outTOF, mcTag);
b6afb6b1 3526
6ed1ad3e 3527 //
3528 // Underlying event, right side, default case
3529 //
2b65bd0e 3530 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
d4a8ff9a 3531 FillChargedUnderlyingEventHistograms(ptTrig, pt, deltaPhi, cenbin, outTOF);
2b65bd0e 3532
b6afb6b1 3533 //
3534 // Several UE calculation, in different perpendicular regions, up to 6:
3535 // left, right, upper-left, lower left, upper-right, lower-right
3536 //
3537 if(fMakeSeveralUE)
3538 FillChargedUnderlyingEventSidesHistograms(ptTrig,pt,deltaPhi);
3539
3540 //
2b65bd0e 3541 if(fPi0Trigger && decayFound)
349eb23d 3542 FillDecayPhotonCorrelationHistograms(pt, phi, kTRUE) ;
2b65bd0e 3543
b6afb6b1 3544 //
3545 // Add track reference to array
3546 //
2b65bd0e 3547 if(fFillAODWithReferences)
547c2f01 3548 {
e09cf5ef 3549 nrefs++;
547c2f01 3550 if(nrefs==1)
3551 {
e09cf5ef 3552 reftracks = new TObjArray(0);
2b65bd0e 3553 TString trackname = Form("%sTracks", GetAODObjArrayName().Data());
045396c8 3554 reftracks->SetName(trackname.Data());
2b65bd0e 3555 reftracks->SetOwner(kFALSE);
e09cf5ef 3556 }
029dea5a 3557
e09cf5ef 3558 reftracks->Add(track);
2b65bd0e 3559 }// reference track to AOD
e09cf5ef 3560 }// track loop
3561
3562 //Fill AOD with reference tracks, if not filling histograms
2b65bd0e 3563 if(fFillAODWithReferences && reftracks)
547c2f01 3564 {
e09cf5ef 3565 aodParticle->AddObjArray(reftracks);
3566 }
e09cf5ef 3567
3568}
3569
7ed3a248 3570//_________________________________________________________________________________________________________
3571void AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
029dea5a 3572{
2e876d85 3573 // Mix current trigger with tracks in another MB event
029dea5a 3574
2db10729 3575 AliDebug(1,Form("Make trigger particle - charged hadron mixed event correlation"));
029dea5a 3576
3577 if(GetMixedEvent()) return; // This is not the mixed event from general mixing frame
3578
029dea5a 3579 // Get the event with similar caracteristics
2e876d85 3580 //printf("MakeChargedMixCorrelation for %s\n",GetInputAODName().Data());
3581
3582 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
c52aeef5 3583
2e876d85 3584 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
c52aeef5 3585
3586 if(!inputHandler) return;
3587
2e876d85 3588 if(!(inputHandler->IsEventSelected( ) & GetReader()->GetEventTriggerMask())) return;
efb540af 3589
029dea5a 3590 // Get the pool, check if it exits
2e876d85 3591 Int_t eventBin = GetEventMixBin();
029dea5a 3592
d4a8ff9a 3593 //Check that the bin exists, if not (bad determination of RP, ntrality or vz bin) do nothing
2e876d85 3594 if(eventBin < 0) return;
de9949a4 3595
3596 fhEventBin->Fill(eventBin);
029dea5a 3597
de9949a4 3598 // get neutral clusters pool?
3599 Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged);
3600 Bool_t neutralMix = fFillNeutralEventMixPool || isoCase ;
3601
d07ffd54 3602 TList * pool = 0;
3603 TList * poolCalo = 0;
3604 if(fUseMixStoredInReader)
3605 {
3606 pool = GetReader()->GetListWithMixedEventsForTracks(eventBin);
de9949a4 3607 if(neutralMix) poolCalo = GetReader()->GetListWithMixedEventsForCalo (eventBin);
d07ffd54 3608 }
3609 else
3610 {
3611 pool = fListMixTrackEvents[eventBin];
de9949a4 3612 if(neutralMix) poolCalo = fListMixCaloEvents [eventBin];
d07ffd54 3613 }
3614
2e876d85 3615 if(!pool) return ;
029dea5a 3616
de9949a4 3617 if( neutralMix && !poolCalo )
2db10729 3618 AliWarning("Careful, cluster pool not available");
d07ffd54 3619
029dea5a 3620 Double_t ptTrig = aodParticle->Pt();
3621 Double_t etaTrig = aodParticle->Eta();
3622 Double_t phiTrig = aodParticle->Phi();
3623 if(phiTrig < 0.) phiTrig+=TMath::TwoPi();
3624
2db10729 3625 AliDebug(1,Form("Pool bin %d size %d, trigger trigger pt=%f, phi=%f, eta=%f",
3626 eventBin,pool->GetSize(), ptTrig,phiTrig,etaTrig));
029dea5a 3627
3628 Double_t ptAssoc = -999.;
2e876d85 3629 Double_t phiAssoc = -999.;
029dea5a 3630 Double_t etaAssoc = -999.;
3631 Double_t deltaPhi = -999.;
3632 Double_t deltaEta = -999.;
2af40966 3633 Double_t xE = -999.;
3634
efb540af 3635 // Start from first event in pool except if in this same event the pool was filled
283f989c 3636 Int_t ev0 = 0;
3637 if(GetReader()->GetLastTracksMixedEvent() == GetEventNumber()) ev0 = 1;
7ed3a248 3638
283f989c 3639 for(Int_t ev=ev0; ev < pool->GetSize(); ev++)
029dea5a 3640 {
efb540af 3641 //
3642 // Recover the lists of tracks or clusters
3643 //
029dea5a 3644 TObjArray* bgTracks = static_cast<TObjArray*>(pool->At(ev));
2bb7ac98 3645 TObjArray* bgCalo = 0;
3646
efb540af 3647 // Recover the clusters list if requested
de9949a4 3648 if( neutralMix && poolCalo )
7ed3a248 3649 {
d07ffd54 3650 if(pool->GetSize()!=poolCalo->GetSize())
2db10729 3651 AliWarning("Different size of calo and track pools");
d07ffd54 3652
2bb7ac98 3653 bgCalo = static_cast<TObjArray*>(poolCalo->At(ev));
d07ffd54 3654
2db10729 3655 if(!bgCalo) AliDebug(1,Form("Event %d in calo pool not available?",ev));
7ed3a248 3656 }
3657
efb540af 3658 //
3659 // Isolate the trigger in the mixed event with mixed tracks and clusters
3660 //
3661 if( OnlyIsolated() )
3662 {
3c12e375 3663 Int_t n=0, nfrac = 0;
3664 Bool_t isolated = kFALSE;
3665 Float_t coneptsum = 0, coneptlead = 0;
efb540af 3666 GetIsolationCut()->MakeIsolationCut(bgTracks,bgCalo,
3667 GetReader(), GetCaloPID(),
3668 kFALSE, aodParticle, "",
3c12e375 3669 n,nfrac,coneptsum,coneptlead,isolated);
efb540af 3670
3671 //printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Isolated? %d - cone %f, ptthres %f",
3672 // isolated,GetIsolationCut()->GetConeSize(),GetIsolationCut()->GetPtThreshold());
3673 //if(bgTracks)printf(" - n track %d", bgTracks->GetEntriesFast());
3674 //printf("\n");
3675
3676 if(!isolated) continue ;
3677 }
029dea5a 3678
efb540af 3679 //
3680 // Check if the trigger is leading of mixed event
3681 //
2e876d85 3682 Int_t nTracks=bgTracks->GetEntriesFast();
2e876d85 3683
d0b625bc 3684 if(fMakeNearSideLeading || fMakeAbsoluteLeading)
3685 {
3686 Bool_t leading = kTRUE;
efb540af 3687 for(Int_t jlead = 0;jlead < nTracks; jlead++ )
d0b625bc 3688 {
3689 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(jlead) ;
3690
3691 ptAssoc = track->Pt();
3692 phiAssoc = track->Phi() ;
d0b625bc 3693 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
32e92d8b 3694
d0b625bc 3695 if (fMakeNearSideLeading)
3696 {
98604e3a 3697 deltaPhi = phiTrig-phiAssoc;
3698 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3699 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3700
3701 if(ptAssoc > ptTrig && deltaPhi < TMath::PiOver2())
d0b625bc 3702 {
3703 leading = kFALSE;
3704 break;
3705 }
3706 }
3707 //jump out this event if there is any other particle with pt larger than trigger
3708 else if(fMakeAbsoluteLeading)
3709 {
3710 if(ptAssoc > ptTrig)
3711 {
3712 leading = kFALSE;
d0b625bc 3713 break;
3714 }
3715 }
3716 }
2bb7ac98 3717
efb540af 3718 if( !neutralMix && fCheckLeadingWithNeutralClusters )
2db10729 3719 AliWarning("Leading of clusters requested but no clusters in mixed event");
efb540af 3720
3721 if(neutralMix && fCheckLeadingWithNeutralClusters && bgCalo)
2bb7ac98 3722 {
3723 Int_t nClusters=bgCalo->GetEntriesFast();
2bb7ac98 3724 for(Int_t jlead = 0;jlead <nClusters; jlead++ )
3725 {
152c5ca9 3726 AliAODPWG4Particle *cluster= (AliAODPWG4Particle*) bgCalo->At(jlead) ;
2bb7ac98 3727
152c5ca9 3728 ptAssoc = cluster->Pt();
3729 phiAssoc = cluster->Phi() ;
2bb7ac98 3730 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
32e92d8b 3731
2bb7ac98 3732 if (fMakeNearSideLeading)
3733 {
98604e3a 3734 deltaPhi = phiTrig-phiAssoc;
3735 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3736 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3737
3738 if(ptAssoc > ptTrig && deltaPhi < TMath::PiOver2())
2bb7ac98 3739 {
3740 leading = kFALSE;
3741 break;
3742 }
3743 }
3744 //jump out this event if there is any other particle with pt larger than trigger
3745 else if(fMakeAbsoluteLeading)
3746 {
3747 if(ptAssoc > ptTrig)
3748 {
3749 leading = kFALSE;
3750 break;
3751 }
3752 }
3753 }
3754 }
3755
d0b625bc 3756 if(!leading) continue; // not leading, check the next event in pool
3757 }
3758
32e92d8b 3759 //
3760 // Fill histograms for selected triggers
3761 //
3762
efb540af 3763 fhEventMixBin->Fill(eventBin);
3764
3765 //printf("\t Read Pool event %d, nTracks %d\n",ev,nTracks);
3766
55c20a99 3767 fhPtTriggerMixed ->Fill(ptTrig);
3768 fhPhiTriggerMixed ->Fill(ptTrig, phiTrig);
3769 fhEtaTriggerMixed ->Fill(ptTrig, etaTrig);
3770 fhPtTriggerMixedBin->Fill(ptTrig,eventBin);
3771 if(fCorrelVzBin)fhPtTriggerMixedVzBin->Fill(ptTrig, GetEventVzBin());
d0b625bc 3772
32e92d8b 3773 //
3774 // Correlation histograms
3775 //
029dea5a 3776 for(Int_t j1 = 0;j1 <nTracks; j1++ )
3777 {
3778 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(j1) ;
3779
3780 if(!track) continue;
3781
3782 ptAssoc = track->Pt();
3783 etaAssoc = track->Eta();
3784 phiAssoc = track->Phi() ;
3785 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
029dea5a 3786
3787 deltaPhi = phiTrig-phiAssoc;
3788 if(deltaPhi < -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3789 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
3790 deltaEta = etaTrig-etaAssoc;
3791
2db10729 3792 AliDebug(1,Form("deltaPhi= %f, deltaEta=%f",deltaPhi, deltaEta));
029dea5a 3793
32e92d8b 3794 // Angular correlation
2af40966 3795 fhMixDeltaPhiCharged ->Fill(ptTrig, deltaPhi);
08f220c8 3796 fhMixDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
3797
2af40966 3798 //
32e92d8b 3799 // Momentum imbalance
2af40966 3800 //
18838011 3801 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
08f220c8 3802 {
2af40966 3803 xE = -ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
3804
3805 if(xE < 0.)
2db10729 3806 AliWarning(Form("Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
3807 xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
2af40966 3808
7d306daf 3809 fhMixXECharged->Fill(ptTrig,xE);
2af40966 3810 if(xE > 0 ) fhMixHbpXECharged->Fill(ptTrig, TMath::Log(1./xE));
08f220c8 3811 }
18838011 3812
2af40966 3813 //
3814 // Underlying event momentum imbalance
3815 //
18838011 3816 if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
3817 {
3818 //Underlying event region
3819 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
3820 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
3821
2af40966 3822 if(uexE < 0.)
2db10729 3823 AliWarning(Form("Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
3824 uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
18838011 3825
3826 fhMixXEUeCharged->Fill(ptTrig,uexE);
3827 }
3828
32e92d8b 3829 // Set the pt associated bin for the defined bins
3830 Int_t assocBin = -1;
3831 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
3832 {
3833 if(ptAssoc > fAssocPtBinLimit[i] && ptAssoc < fAssocPtBinLimit[i+1]) assocBin= i;
3834 }
3835
3836 //
3837 // Assign to the histogram array a bin corresponding to a combination of pTa and vz bins
3838 //
3839 Int_t nz = 1;
3840 Int_t vz = 0;
3841
3842 if(fCorrelVzBin)
3843 {
3844 nz = GetNZvertBin();
3845 vz = GetEventVzBin();
3846 }
3847
3848 Int_t bin = assocBin*nz+vz;
3849
8cc41381 3850 if(bin < 0) continue ; // this pt bin was not considered
029dea5a 3851
a22f3f34 3852 fhMixDeltaPhiChargedAssocPtBin [bin]->Fill(ptTrig, deltaPhi);
3853 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->Fill(deltaPhi, deltaEta);
029dea5a 3854
a22f3f34 3855 if(fFillEtaGapsHisto)
3856 {
3857 if(TMath::Abs(deltaEta) > 0.8)
2af40966 3858 fhMixDeltaPhiChargedAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi);
a22f3f34 3859 if(TMath::Abs(deltaEta) < 0.01)
2af40966 3860 fhMixDeltaPhiChargedAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi);
a22f3f34 3861 }
3862
029dea5a 3863 } // track loop
3864 } // mixed event loop
3865}
3866
3867
bf01409a 3868//_______________________________________________________________________________________________________
3869void AliAnaParticleHadronCorrelation::MakeNeutralCorrelation(AliAODPWG4ParticleCorrelation * aodParticle)
e09cf5ef 3870{
3871 // Neutral Pion Correlation Analysis
8e8bfd92 3872
3873 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); // For the future, foresee more possible pi0 lists
bf01409a 3874 if(!pi0list) return ;
8e8bfd92 3875
3876 Int_t npi0 = pi0list->GetEntriesFast();
bf01409a 3877 if(npi0 == 0) return ;
8e8bfd92 3878
2db10729 3879 AliDebug(1,Form("Particle - pi0 correlation, %d pi0's",npi0));
e09cf5ef 3880
3881 Int_t evtIndex11 = 0 ;
3882 Int_t evtIndex12 = 0 ;
04f7a616 3883 if (GetMixedEvent())
3884 {
e09cf5ef 3885 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
3886 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
3887 }
3888
907b38cd 3889 Float_t pt = -100. ;
24f5f633 3890 Float_t zT = -100. ;
907b38cd 3891 Float_t phi = -100. ;
3892 Float_t eta = -100. ;
3893 Float_t xE = -100. ;
3894 Float_t hbpXE= -100. ;
24f5f633 3895 Float_t hbpZT= -100. ;
907b38cd 3896
3897 Float_t ptTrig = aodParticle->Pt();
3898 Float_t phiTrig = aodParticle->Phi();
3899 Float_t etaTrig = aodParticle->Eta();
3900 Float_t deltaPhi= -100. ;
6ed1ad3e 3901 Float_t deltaEta= -100. ;
045396c8 3902
907b38cd 3903 // In case of pi0/eta trigger, we may want to check their decay correlation,
3904 // get their decay children
349eb23d 3905
907b38cd 3906 Bool_t decayFound = kFALSE;
349eb23d 3907 if(fPi0Trigger) decayFound = GetDecayPhotonMomentum(aodParticle->GetCaloLabel(0),aodParticle->GetCaloLabel(1),aodParticle->GetDetectorTag());
e09cf5ef 3908
907b38cd 3909 TObjArray * refpi0 = 0x0;
3910 Int_t nrefs = 0;
e09cf5ef 3911
3912 //Loop on stored AOD pi0
547c2f01 3913
8e8bfd92 3914 for(Int_t iaod = 0; iaod < npi0 ; iaod++)
547c2f01 3915 {
e09cf5ef 3916 AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (pi0list->At(iaod));
3917
3918 Int_t evtIndex2 = 0 ;
3919 Int_t evtIndex3 = 0 ;
04f7a616 3920 if (GetMixedEvent())
3921 {
e09cf5ef 3922 evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(0)) ;
3923 evtIndex3 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(1)) ;
3924
045396c8 3925 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 ||
3926 evtIndex11 == evtIndex3 || evtIndex12 == evtIndex3) // trigger and pi0 are not from different events
e09cf5ef 3927 continue ;
3928 }
907b38cd 3929
e09cf5ef 3930 pt = pi0->Pt();
6ed1ad3e 3931
66e64043 3932 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
3933
521ef81f 3934 //remove trigger itself for correlation when use charged triggers
3935 if(aodParticle->GetCaloLabel(0) >= 0 &&
3936 (pi0->GetCaloLabel(0) == aodParticle->GetCaloLabel(0) || pi0->GetCaloLabel(1) == aodParticle->GetCaloLabel(0))) continue ;
3937
3938 if( aodParticle->GetCaloLabel(1) >= 0 &&
3939 (pi0->GetCaloLabel(0) == aodParticle->GetCaloLabel(1) || pi0->GetCaloLabel(1) == aodParticle->GetCaloLabel(1))) continue ;
3940
df77176b 3941 //
3942 // Angular correlations
3943 //
6ed1ad3e 3944 phi = pi0->Phi() ;
3945 eta = pi0->Eta() ;
3946 deltaEta = etaTrig-eta;
3947 deltaPhi = phiTrig-phi;
3948 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
3949 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
2b65bd0e 3950
6ed1ad3e 3951 fhEtaNeutral ->Fill(pt , eta );
3952 fhPhiNeutral ->Fill(pt , phi );
3953 fhDeltaEtaNeutral->Fill(ptTrig, deltaEta);
3954 fhDeltaPhiNeutral->Fill(ptTrig, deltaPhi);
3955
3956 if(pt > 2 ) fhDeltaPhiDeltaEtaNeutral->Fill(deltaPhi, deltaEta);
3957
df77176b 3958 //
3959 // Momentum imbalance
3960 //
24f5f633 3961 zT = pt/ptTrig ;
2b65bd0e 3962
24f5f633 3963 hbpZT = -100;
df77176b 3964 hbpXE = -100;
3965
24f5f633 3966 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
2b65bd0e 3967
2b65bd0e 3968 //delta phi cut for correlation
3969 if( (deltaPhi > fDeltaPhiMinCut) && ( deltaPhi < fDeltaPhiMaxCut) )
907b38cd 3970 {
df77176b 3971 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
2af40966 3972
3973 if(xE < 0.)
2db10729 3974 AliWarning(Form("Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
3975 xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
2af40966 3976
df77176b 3977 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3978
2b65bd0e 3979 fhDeltaPhiNeutralPt->Fill(pt,deltaPhi);
3980 fhXENeutral ->Fill(ptTrig,xE);
3981 fhPtHbpXENeutral ->Fill(ptTrig,hbpXE);
df77176b 3982 fhZTNeutral ->Fill(ptTrig,zT);
3983 fhPtHbpZTNeutral ->Fill(ptTrig,hbpZT);
907b38cd 3984 }
2b65bd0e 3985 else if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
907b38cd 3986 {
df77176b 3987 // Randomize angle for xE calculation
3988 Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut);
3989
3990 xE = -(pt/ptTrig)*TMath::Cos(randomphi);
3991 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
3992
2b65bd0e 3993 fhDeltaPhiUeNeutralPt->Fill(pt,deltaPhi);
df77176b 3994 fhZTUeNeutral ->Fill(ptTrig,zT);
3995 fhPtHbpZTUeNeutral ->Fill(ptTrig,hbpZT);
2b65bd0e 3996 fhXEUeNeutral ->Fill(ptTrig,xE);
3997 fhPtHbpXEUeNeutral ->Fill(ptTrig,hbpXE);
907b38cd 3998 }
24f5f633 3999
df77176b 4000 // Several UE calculation, not sure it is useful
4001 // with partical calorimter acceptance
fe69395f 4002 if(fMakeSeveralUE) FillNeutralUnderlyingEventSidesHistograms(ptTrig,pt,zT,hbpZT,deltaPhi);
2b65bd0e 4003
df77176b 4004 //
4005 // Decay photon correlations
4006 //
4007 if(fPi0Trigger && decayFound)
349eb23d 4008 FillDecayPhotonCorrelationHistograms(pt, phi, kFALSE) ;
df77176b 4009
2b65bd0e 4010 if(fFillAODWithReferences)
547c2f01 4011 {
e09cf5ef 4012 nrefs++;
547c2f01 4013 if(nrefs==1)
4014 {
e09cf5ef 4015 refpi0 = new TObjArray(0);
4016 refpi0->SetName(GetAODObjArrayName()+"Pi0s");
4017 refpi0->SetOwner(kFALSE);
4018 }
4019 refpi0->Add(pi0);
2db10729 4020 } // put references in trigger AOD
045396c8 4021
2db10729 4022 AliDebug(1,Form("Selected pi0: pt %2.2f, phi %2.2f, eta %2.2f",pt,phi,eta));
045396c8 4023
4024 }//loop
4025
2b65bd0e 4026 //Fill AOD with reference tracks, if not filling histograms
4027 if(fFillAODWithReferences && refpi0)
4028 {
4029 aodParticle->AddObjArray(refpi0);
4030 }
045396c8 4031}
4032
4a296f4a 4033//__________________________________________________________________________________________________________________
4034void AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(Int_t label, Int_t histoIndex, Bool_t lostDecayPair)
d07cdf32 4035{
045396c8 4036 // Charged Hadron Correlation Analysis with MC information
a426f453 4037
2db10729 4038 AliDebug(1,"Make trigger particle - charged hadron correlation in AOD MC level");
045396c8 4039
f2d29137 4040 if( label < 0 )
4041 {
2db10729 4042 AliDebug(1,Form(" *** bad label ***: label %d", label));
f2d29137 4043 return;
4044 }
4045
be2df971 4046 // Do MC correlation for a given particle type range.
4047 // Types defined in GetMCTagHistogramIndex:
4048 // 0 direct gamma; 1 pi0; 2 pi0 decay; 3 eta decay; 4 other decay; 5 electron; 6 other (hadron)
4049 if(histoIndex < fMCGenTypeMin || histoIndex > fMCGenTypeMax) return ;
4050
045396c8 4051 AliStack * stack = 0x0 ;
d07cdf32 4052 TParticle * primary = 0x0 ;
045396c8 4053 TClonesArray * mcparticles = 0x0 ;
d07cdf32 4054 AliAODMCParticle * aodprimary = 0x0 ;
045396c8 4055
4056 Double_t eprim = 0 ;
4057 Double_t ptprim = 0 ;
4058 Double_t phiprim = 0 ;
4059 Double_t etaprim = 0 ;
d07cdf32 4060 Int_t nTracks = 0 ;
045396c8 4061 Int_t iParticle = 0 ;
a9023d3b 4062
f2d29137 4063 Bool_t leadTrig = kTRUE;
045396c8 4064
d07cdf32 4065 if( GetReader()->ReadStack() )
547c2f01 4066 {
045396c8 4067 stack = GetMCStack() ;
d07cdf32 4068 if(!stack)
2e876d85 4069 {
d07cdf32 4070 AliFatal("Stack not available, is the MC handler called? STOP");
4071 return;
045396c8 4072 }
4073
d07cdf32 4074 //nTracks = stack->GetNtrack() ;
4075 nTracks = stack->GetNprimary();
4076 if( label >= stack->GetNtrack() )
547c2f01 4077 {
d07cdf32 4078 if(GetDebug() > 2)
4079 AliInfo(Form("*** large label ***: label %d, n tracks %d", label, stack->GetNtrack()));
045396c8 4080 return ;
4081 }
547c2f01 4082
045396c8 4083 primary = stack->Particle(label);
d07cdf32 4084 if ( !primary )
547c2f01 4085 {
d07cdf32 4086 AliInfo(Form(" *** no primary ***: label %d", label));
045396c8 4087 return;
4088 }
4089
d07cdf32 4090 eprim = primary->Energy();
4091 ptprim = primary->Pt();
d07cdf32 4092 etaprim = primary->Eta();
63ac03db 4093 phiprim = primary->Phi();
4094 if(phiprim < 0) phiprim+=TMath::TwoPi();
4095
d07cdf32 4096 if(ptprim < 0.01 || eprim < 0.01) return ;
4097
4098 for (iParticle = 0 ; iParticle < nTracks ; iParticle++)
547c2f01 4099 {
d07cdf32 4100 TParticle * particle = stack->Particle(iParticle);
2747966a 4101
d07cdf32 4102 //keep only final state particles
4103 if( particle->GetStatusCode() != 1 ) continue ;
f2d29137 4104
d07cdf32 4105 //---------- Charged particles ----------------------
4106 Int_t pdg = particle->GetPdgCode();
4107 Int_t charge = (Int_t) TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
4108 if(charge == 0) continue;
4109
349eb23d 4110 particle->Momentum(fMomentum);
d07cdf32 4111
4112 //Particles in CTS acceptance, make sure to use the same selection as in the reader
349eb23d 4113 Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(fMomentum.Eta(),fMomentum.Phi(),kCTS);
4114 //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,fMomentum.Pt(),fMomentum.Eta(),fMomentum.Phi()*TMath::RadToDeg());
d07cdf32 4115 if( !inCTS ) continue;
4116
4117 // Remove conversions
4118 if ( TMath::Abs(pdg) == 11 && stack->Particle(particle->GetFirstMother())->GetPdgCode() == 22 ) continue ;
4119
4120 if ( label == iParticle ) continue; // avoid trigger particle
4121
63ac03db 4122 Float_t phi = particle->Phi();
4123 if(phi < 0) phi+=TMath::TwoPi();
4124
4a296f4a 4125 Bool_t lead = FillChargedMCCorrelationHistograms(particle->Pt(),phi,particle->Eta(),ptprim,phiprim,etaprim,histoIndex,lostDecayPair);
f2d29137 4126 if(!lead) leadTrig = kFALSE;
4127 //if ( !lead && (fMakeAbsoluteLeading || fMakeNearSideLeading) ) return;
d07cdf32 4128
4129 } //track loop
4130
045396c8 4131 } //ESD MC
a9023d3b 4132
d07cdf32 4133 else if( GetReader()->ReadAODMCParticles() )
547c2f01 4134 {
045396c8 4135 //Get the list of MC particles
d07cdf32 4136 mcparticles = GetReader()->GetAODMCParticles();
4137 if( !mcparticles ) return;
a9023d3b 4138
d07cdf32 4139 nTracks = mcparticles->GetEntriesFast() ;
4140
4141 if( label >= nTracks )
547c2f01 4142 {
d07cdf32 4143 if(GetDebug() > 2)
4144 AliInfo(Form(" *** large label ***: label %d, n tracks %d", label,nTracks));
045396c8 4145 return;
4146 }
a9023d3b 4147
045396c8 4148 //Get the particle
d07cdf32 4149 aodprimary = (AliAODMCParticle*) mcparticles->At(label);
4150 if( !aodprimary )
547c2f01 4151 {
d07cdf32 4152 AliInfo(Form(" *** no AOD primary ***: label %d", label));
045396c8 4153 return;
4154 }
a9023d3b 4155
63ac03db 4156 eprim = aodprimary->E();
d07cdf32 4157 ptprim = aodprimary->Pt();
d07cdf32 4158 etaprim = aodprimary->Eta();
63ac03db 4159 phiprim = aodprimary->Phi();
4160 if(phiprim < 0) phiprim+=TMath::TwoPi();
4161
d07cdf32 4162 if(ptprim < 0.01 || eprim < 0.01) return ;
4163
4164 for (iParticle = 0; iParticle < nTracks; iParticle++)
547c2f01 4165 {
d07cdf32 4166 AliAODMCParticle *part = (AliAODMCParticle*) mcparticles->At(iParticle);
a9023d3b 4167
d07cdf32 4168 if (!part->IsPhysicalPrimary() ) continue; // same as part->GetStatus() !=1
2747966a 4169
d07cdf32 4170 if ( part->Charge() == 0 ) continue;
a9023d3b 4171
349eb23d 4172 fMomentum.SetPxPyPzE(part->Px(),part->Py(),part->Pz(),part->E());
d07cdf32 4173
4174 //Particles in CTS acceptance, make sure to use the same selection as in the reader
349eb23d 4175 Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(fMomentum.Eta(),fMomentum.Phi(),kCTS);
4176 //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,fMomentum.Pt(),fMomentum.Eta(),fMomentum.Phi()*TMath::RadToDeg());
d07cdf32 4177 if( !inCTS ) continue;
4178
4179 // Remove conversions
4180 Int_t indexmother = part->GetMother();
4181 if ( indexmother > -1 )
a9023d3b 4182 {
d07cdf32 4183 Int_t pdg = part->GetPdgCode();
4184 Int_t mPdg = ((AliAODMCParticle*) mcparticles->At(indexmother)) ->GetPdgCode();
4185 if (TMath::Abs(pdg) == 11 && mPdg == 22) continue;
a9023d3b 4186 }
d07cdf32 4187
4188 if ( label == iParticle ) continue; // avoid trigger particle
4189
63ac03db 4190 Float_t phi = part->Phi();
4191 if(phi < 0) phi+=TMath::TwoPi();
4192
4a296f4a 4193 Bool_t lead = FillChargedMCCorrelationHistograms(part->Pt(),phi,part->Eta(),ptprim,phiprim,etaprim, histoIndex,lostDecayPair);
f2d29137 4194 if(!lead) leadTrig = kFALSE;
4195 //if ( !lead && (fMakeAbsoluteLeading || fMakeNearSideLeading)) return;
d07cdf32 4196
4197 } //MC particle loop
045396c8 4198 }// AOD MC
d07cdf32 4199
55c20a99 4200 // Trigger MC particle histograms
f2d29137 4201 //if (!lead && (fMakeAbsoluteLeading || fMakeNearSideLeading)) return;
55c20a99 4202
be2df971 4203 fhMCPtTrigger [histoIndex]->Fill(ptprim);
4204 fhMCPhiTrigger[histoIndex]->Fill(ptprim,phiprim);
4205 fhMCEtaTrigger[histoIndex]->Fill(ptprim,etaprim);
55c20a99 4206
4a296f4a 4207 if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
4208 {
4209 fhMCPtTrigger [7]->Fill(ptprim);
4210 fhMCPhiTrigger[7]->Fill(ptprim,phiprim);
4211 fhMCEtaTrigger[7]->Fill(ptprim,etaprim);
4212 }
4213
f2d29137 4214 if(!leadTrig && (fMakeAbsoluteLeading || fMakeNearSideLeading) )
4215 {
2db10729 4216 AliDebug(1,Form("Not leading primary trigger: pT %2.2f, phi %2.2f, eta %2.2f",
4217 ptprim,phiprim*TMath::RadToDeg(),etaprim));
f2d29137 4218
be2df971 4219 fhMCPtTriggerNotLeading [histoIndex]->Fill(ptprim);
4220 fhMCPhiTriggerNotLeading[histoIndex]->Fill(ptprim,phiprim);
4221 fhMCEtaTriggerNotLeading[histoIndex]->Fill(ptprim,etaprim);
4a296f4a 4222
4223 if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
4224 {
4225 fhMCPtTriggerNotLeading [7]->Fill(ptprim);
4226 fhMCPhiTriggerNotLeading[7]->Fill(ptprim,phiprim);
4227 fhMCEtaTriggerNotLeading[7]->Fill(ptprim,etaprim);
4228 }
f2d29137 4229 }
e09cf5ef 4230}
045396c8 4231
05d0d05d 4232//_____________________________________________________________________
4233void AliAnaParticleHadronCorrelation::Print(const Option_t * opt) const
4234{
4235
4236 //Print some relevant parameters set for the analysis
4237 if(! opt)
4238 return;
4239
4240 printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
745913ae 4241 AliAnaCaloTrackCorrBaseClass::Print(" ");
1f8591af 4242 printf("Pt trigger > %2.2f; < %2.2f\n", GetMinPt() , GetMaxPt()) ;
4243 printf("Pt associa > %2.2f; < %2.2f\n", fMinAssocPt, fMaxAssocPt) ;
4244 printf("Phi trigger particle-Hadron < %3.2f\n", fDeltaPhiMaxCut) ;
66e64043 4245 printf("Phi trigger particle-Hadron > %3.2f\n", fDeltaPhiMinCut) ;
4246 printf("Phi trigger particle-UeHadron < %3.2f\n", fUeDeltaPhiMaxCut) ;
4247 printf("Phi trigger particle-UeHadron > %3.2f\n", fUeDeltaPhiMinCut) ;
4248 printf("Isolated Trigger? %d\n" , fSelectIsolated) ;
4249 printf("Several UE? %d\n" , fMakeSeveralUE) ;
4250 printf("Name of AOD Pi0 Branch %s \n", fPi0AODBranchName.Data());
05d0d05d 4251 printf("Do Decay-hadron correlation ? %d\n", fPi0Trigger) ;
3f150b4b 4252 printf("Select absolute leading for cluster triggers ? %d or Near Side %d\n",
4253 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
05d0d05d 4254 printf("Trigger pt bins %d\n", fNAssocPtBins) ;
4255 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
4256 printf("\t bin %d = [%2.1f,%2.1f]\n", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
4257 }
4258
4259}
4260
4261//____________________________________________________________
4262void AliAnaParticleHadronCorrelation::SetNAssocPtBins(Int_t n)
045396c8 4263{
4264 // Set number of bins
e09cf5ef 4265
b6afb6b1 4266 fNAssocPtBins = n ;
05d0d05d 4267
f85f4afb 4268 if(n < 20 && n > 0)
045396c8 4269 {
05d0d05d 4270 fNAssocPtBins = n ;
045396c8 4271 }
4272 else
4273 {
2db10729 4274 AliWarning("n = larger than 19 or too small, set to 19");
f85f4afb 4275 fNAssocPtBins = 19;
045396c8 4276 }
4277}
e09cf5ef 4278
05d0d05d 4279//______________________________________________________________________________
4280void AliAnaParticleHadronCorrelation::SetAssocPtBinLimit(Int_t ibin, Float_t pt)
045396c8 4281{
4282 // Set the list of limits for the trigger pt bins
4283
05d0d05d 4284 if(ibin <= fNAssocPtBins || ibin >= 0)
045396c8 4285 {
05d0d05d 4286 fAssocPtBinLimit[ibin] = pt ;
045396c8 4287 }
2e876d85 4288 else
4289 {
2db10729 4290 AliWarning(Form("Bin number too large %d > %d or small, nothing done", ibin, fNAssocPtBins)) ;
045396c8 4291 }
4292}
4293