Added container for the list pool with events with tracks used for mixing
[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
18// Particle (for example direct gamma) must be found in a previous analysis
19//-- Author: Gustavo Conesa (LNF-INFN)
20
21// Modified by Yaxian Mao:
22// 1. add the UE subtraction for corrlation study
23// 2. change the correlation variable
24// 3. Only use leading particle(cluster/track) as trigger for correlation (2010/07/02)
25// 4. Make decay photon-hadron correlations where decay contribute pi0 mass (2010/09/09)
26// 5. fill the pout to extract kt at the end, also to study charge asymmetry(2010/10/06)
045396c8 27// 6. Add the possibility for event selection analysis based on vertex and multiplicity bins (10/10/2010)
28// 7. change the way of delta phi cut for UE study due to memory issue (reduce histograms)
29// 8. Add the possibility to request the absolute leading particle at the near side or not, set trigger bins, general clean-up (08/2011)
e09cf5ef 30//////////////////////////////////////////////////////////////////////////////
31
32
33// --- ROOT system ---
34//#include "TClonesArray.h"
907b38cd 35#include <TClass.h>
36#include <TMath.h>
37#include <TH2F.h>
38#include <TDatabasePDG.h>
e09cf5ef 39
40//---- ANALYSIS system ----
41#include "AliNeutralMesonSelection.h"
42#include "AliAnaParticleHadronCorrelation.h"
43#include "AliCaloTrackReader.h"
e09cf5ef 44#include "AliAODPWG4ParticleCorrelation.h"
45#include "AliFiducialCut.h"
46#include "AliVTrack.h"
47#include "AliVCluster.h"
48#include "AliMCAnalysisUtils.h"
49#include "TParticle.h"
50#include "AliStack.h"
51#include "AliAODMCParticle.h"
52#include "AliMixedEvent.h"
029dea5a 53#include "AliAnalysisManager.h"
54#include "AliInputEventHandler.h"
2e876d85 55#include "AliEventplane.h"
e09cf5ef 56
57ClassImp(AliAnaParticleHadronCorrelation)
58
59
05d0d05d 60//___________________________________________________________________
e09cf5ef 61 AliAnaParticleHadronCorrelation::AliAnaParticleHadronCorrelation():
745913ae 62 AliAnaCaloTrackCorrBaseClass(),
66e64043 63 fMinTriggerPt(0.),
64 fMaxAssocPt(1000.), fMinAssocPt(0.),
05d0d05d 65 fDeltaPhiMaxCut(0.), fDeltaPhiMinCut(0.),
66 fSelectIsolated(0), fMakeSeveralUE(0),
67 fUeDeltaPhiMaxCut(0.), fUeDeltaPhiMinCut(0.),
68 fPi0AODBranchName(""), fNeutralCorr(0),
907b38cd 69 fPi0Trigger(0), fDecayTrigger(0),
3f150b4b 70 fMakeAbsoluteLeading(0), fMakeNearSideLeading(0),
907b38cd 71 fLeadingTriggerIndex(-1), fHMPIDCorrelation(0), fFillBradHisto(0),
05d0d05d 72 fNAssocPtBins(0), fAssocPtBinLimit(),
2e876d85 73 fListMixEvents(), fIsPoolEvent(0),
05d0d05d 74 //Histograms
75 fhPtLeading(0), fhPhiLeading(0),
76 fhEtaLeading(0), fhDeltaPhiDeltaEtaCharged(0),
77 fhPhiCharged(0), fhEtaCharged(0),
78 fhDeltaPhiCharged(0), fhDeltaEtaCharged(0),
79 fhDeltaPhiChargedPt(0), fhDeltaPhiUeChargedPt(0),
3f150b4b 80 fhXECharged(0), fhXEUeCharged(0),
81 fhXEPosCharged(0), fhXENegCharged(0),
82 fhPtHbpXECharged(0), fhPtHbpXEUeCharged(0),
83 fhZTCharged(0), fhZTUeCharged(0),
84 fhZTPosCharged(0), fhZTNegCharged(0),
85 fhPtHbpZTCharged(0), fhPtHbpZTUeCharged(0),
05d0d05d 86 fhDeltaPhiUeLeftCharged(0), fhDeltaPhiUeRightCharged(0),
3f150b4b 87 fhXEUeLeftCharged(0), fhXEUeRightCharged(0),
88 fhPtHbpXEUeLeftCharged(0), fhPtHbpXEUeRightCharged(0),
89 fhZTUeLeftCharged(0), fhZTUeRightCharged(0),
90 fhPtHbpZTUeLeftCharged(0), fhPtHbpZTUeRightCharged(0),
05d0d05d 91 fhPtTrigPout(0), fhPtTrigCharged(0),
92 fhTrigDeltaPhiCharged(0x0), fhTrigDeltaEtaCharged(0x0),
3f150b4b 93 fhTrigXECorr(0x0), fhTrigXEUeCorr(0x0),
94 fhTrigZTCorr(0x0), fhTrigZTUeCorr(0x0),
907b38cd 95 fhAssocPtBkg(0),
96 fhDeltaPhiAssocPtBin(0), fhDeltaPhiAssocPtBinHMPID(0), fhDeltaPhiAssocPtBinHMPIDAcc(0),
66e64043 97 fhDeltaPhiBradAssocPtBin(0), fhDeltaPhiBrad(0),
907b38cd 98 fhXEAssocPtBin(0), fhZTAssocPtBin(0),
e09cf5ef 99 fhDeltaPhiDeltaEtaNeutral(0),
05d0d05d 100 fhPhiNeutral(0), fhEtaNeutral(0),
101 fhDeltaPhiNeutral(0), fhDeltaEtaNeutral(0),
102 fhDeltaPhiNeutralPt(0), fhDeltaPhiUeNeutralPt(0),
3f150b4b 103 fhXENeutral(0), fhXEUeNeutral(0),
104 fhPtHbpXENeutral(0), fhPtHbpXEUeNeutral(0),
105 fhZTNeutral(0), fhZTUeNeutral(0),
106 fhPtHbpZTNeutral(0), fhPtHbpZTUeNeutral(0),
05d0d05d 107 fhDeltaPhiUeLeftNeutral(0), fhDeltaPhiUeRightNeutral(0),
3f150b4b 108 fhXEUeLeftNeutral(0), fhXEUeRightNeutral(0),
109 fhPtHbpXEUeLeftNeutral(0), fhPtHbpXEUeRightNeutral(0),
110 fhZTUeLeftNeutral(0), fhZTUeRightNeutral(0),
111 fhPtHbpZTUeLeftNeutral(0), fhPtHbpZTUeRightNeutral(0),
e09cf5ef 112 fhPtPi0DecayRatio(0),
3f150b4b 113 fhDeltaPhiDecayCharged(0), fhXEDecayCharged(0), fhZTDecayCharged(0),
114 fhDeltaPhiDecayNeutral(0), fhXEDecayNeutral(0), fhZTDecayNeutral(0),
907b38cd 115 fhDeltaPhiDecayChargedAssocPtBin(0),
116 fhXEDecayChargedAssocPtBin(0), fhZTDecayChargedAssocPtBin(0),
045396c8 117 fh2phiLeadingParticle(0x0),
05d0d05d 118 fhMCEtaCharged(0), fhMCPhiCharged(0),
119 fhMCDeltaEtaCharged(0), fhMCDeltaPhiCharged(0x0),
120 fhMCDeltaPhiDeltaEtaCharged(0), fhMCDeltaPhiChargedPt(0),
3f150b4b 121 fhMCPtXECharged(0), fhMCPtHbpXECharged(0),
122 fhMCPtZTCharged(0), fhMCPtHbpZTCharged(0),
029dea5a 123 fhMCPtTrigPout(0), fhMCPtAssocDeltaPhi(0),
124 //Mixing
125 fhNEventsTrigger(0),
126 fhNtracksAll(0), fhNtracksTrigger(0),
2e876d85 127 fhNtracksMB(0),
029dea5a 128 fhMixDeltaPhiCharged(0), fhMixDeltaPhiDeltaEtaCharged(0),
2e876d85 129 fhMixDeltaPhiChargedAssocPtBin(),fhMixDeltaPhiDeltaEtaChargedAssocPtBin(0),
130 fhEventBin(0), fhEventMixBin(0)
029dea5a 131{
e09cf5ef 132 //Default Ctor
029dea5a 133
e09cf5ef 134 //Initialize parameters
135 InitParameters();
136}
137
029dea5a 138//_________________________________________________________________
139AliAnaParticleHadronCorrelation::~AliAnaParticleHadronCorrelation()
140{
141 // Remove event containers
142
2e876d85 143 if(DoOwnMix() && fListMixEvents)
029dea5a 144 {
145 for(Int_t iz=0; iz < GetNZvertBin(); iz++)
146 {
147 for(Int_t ic=0; ic < GetNCentrBin(); ic++)
148 {
2e876d85 149 for(Int_t irp=0; irp<GetNRPBin(); irp++)
150 {
151 Int_t bin = GetEventMixBin(ic, iz, irp);
152 fListMixEvents[bin]->Delete() ;
153 delete fListMixEvents[bin] ;
154 }
029dea5a 155 }
156 }
157
158 delete[] fListMixEvents;
159
160 }
161}
162
907b38cd 163//______________________________________________________________________________________________________________________________________________________
164void AliAnaParticleHadronCorrelation::FillChargedAngularCorrelationHistograms(const Float_t ptAssoc, const Float_t ptTrig, const Int_t assocBin,
165 const Float_t phiAssoc, const Float_t phiTrig, Float_t & deltaPhi,
166 const Float_t etaAssoc, const Float_t etaTrig,
167 const Bool_t decay, const Float_t hmpidSignal, const Int_t nTracks)
168{
169 // Fill angular correlation related histograms
170
171 Float_t deltaEta = etaTrig-etaAssoc;
172 deltaPhi = phiTrig-phiAssoc;
173 Float_t deltaPhiOrg = deltaPhi;
174
175 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
176 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
177
178 fhEtaCharged ->Fill(ptAssoc,etaAssoc);
179 fhPhiCharged ->Fill(ptAssoc,phiAssoc);
180 fhDeltaEtaCharged->Fill(ptTrig ,deltaEta);
181 fhDeltaPhiCharged->Fill(ptTrig ,deltaPhi);
182
183 if(ptAssoc > 2 ) fhDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
184
185 if(fDecayTrigger && decay) fhDeltaPhiDecayCharged ->Fill(ptTrig , deltaPhi);
186
187 Double_t dphiBrad = -100;
188 if(fFillBradHisto)
189 {
190 dphiBrad = atan2(sin(deltaPhiOrg), cos(deltaPhiOrg))/TMath::Pi();//-1 to 1
191 if(TMath::Abs(dphiBrad)>0.325 && TMath::Abs(dphiBrad)<0.475) //Hardcoded values, BAD, FIXME
192 {
193 fhAssocPtBkg->Fill(ptTrig, ptAssoc);
194 }
195
196 if(dphiBrad<-1./3) dphiBrad += 2;
197 fhDeltaPhiBrad->Fill(ptTrig, dphiBrad);
198 }
199
200 // Fill histograms in bins of associated particle pT
201 if(assocBin>=0)
202 {
203 fhDeltaPhiAssocPtBin[assocBin]->Fill(ptTrig, deltaPhi);
204 if (fFillBradHisto) fhDeltaPhiBradAssocPtBin [assocBin]->Fill(ptTrig, dphiBrad);
205 if(fDecayTrigger && decay) fhDeltaPhiDecayChargedAssocPtBin[assocBin]->Fill(ptTrig, deltaPhi);
206
207 if(fHMPIDCorrelation)
208 {
209 if( hmpidSignal > 0 )
210 {
211 //printf("Track pt %f with HMPID signal %f \n",pt,hmpidSignal);
212 fhDeltaPhiAssocPtBinHMPID[assocBin]->Fill(ptTrig, deltaPhi);
213 }
214
215 if(phiAssoc > 5*TMath::DegToRad() && phiAssoc < 20*TMath::DegToRad())
216 {
217 //printf("Track pt %f in HMPID acceptance phi %f \n ",pt,phi*TMath::RadToDeg() );
218 fhDeltaPhiAssocPtBinHMPIDAcc[assocBin]->Fill(ptTrig, deltaPhi);
219 }
220 }
221 }
222
223 //fill different multiplicity histogram
224 if(DoEventSelect())
225 {
226 for(Int_t im = 0; im<GetMultiBin(); im++)
227 {
228 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
229 {
230 fhTrigDeltaPhiCharged[im]->Fill(ptTrig,deltaPhi);
231 fhTrigDeltaEtaCharged[im]->Fill(ptTrig,deltaEta);
232 }
233 }
234 }
235}
236
237//____________________________________________________________________________________________________________________________________________________
238Bool_t AliAnaParticleHadronCorrelation::FillChargedMCCorrelationHistograms(const Float_t mcAssocPt, Float_t mcAssocPhi, const Float_t mcAssocEta,
239 const Float_t mcTrigPt, const Float_t mcTrigPhi, const Float_t mcTrigEta)
240{
241 // Fill MC histograms independently of AOD or ESD
242
243 //Select only hadrons in pt range
244 if(mcAssocPt < fMinAssocPt || mcAssocPt > fMaxAssocPt) return kTRUE ; // exclude but continue
245
246 if(mcAssocPhi < 0) mcAssocPhi+=TMath::TwoPi();
247
248 //remove trigger itself for correlation when use charged triggers
249 if(TMath::Abs(mcAssocPt -mcTrigPt ) < 1e-6 &&
250 TMath::Abs(mcAssocPhi-mcTrigPhi) < 1e-6 &&
251 TMath::Abs(mcAssocEta-mcTrigEta) < 1e-6) return kTRUE ; // exclude but continue
252
253 // Absolute leading?
254 if( fMakeAbsoluteLeading && mcAssocPt > mcTrigPt ) return kFALSE; // jump event
255
256 //jump out this event if near side associated partile pt larger than trigger
257 if( fMakeNearSideLeading && mcAssocPt > mcTrigPt &&
258 TMath::Abs(mcAssocPhi-mcTrigPhi)<TMath::PiOver2() ) return kFALSE; // jump event
259
260 Float_t mcdeltaPhi= mcTrigPhi-mcAssocPhi;
261 if(mcdeltaPhi <= -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
262 if(mcdeltaPhi > 3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
263
264 Float_t mcxE =-mcAssocPt/mcTrigPt*TMath::Cos(mcdeltaPhi);// -(mcAssocPx*pxprim+mcAssocPy*pyprim)/(mcTrigPt*mcTrigPt);
265 Float_t mchbpXE =-100 ;
2e876d85 266 if(mcxE > 0 ) mchbpXE = TMath::Log10(1./mcxE);
907b38cd 267
268 Float_t mczT = mcAssocPt/mcTrigPt ;
269 Float_t mchbpZT =-100 ;
2e876d85 270 if(mczT > 0 ) mchbpZT = TMath::Log10(1./mczT);
907b38cd 271
272 //Selection within angular range
273 if( mcdeltaPhi< -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
274 if( mcdeltaPhi>3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
275
276 Double_t mcpout = mcAssocPt*TMath::Sin(mcdeltaPhi) ;
277
278 if(GetDebug() > 0 )
279 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation() - Charged hadron: track Pt %f, track Phi %f, phi trigger %f. Cuts: delta phi %2.2f < %2.2f < %2.2f, pT min %2.2f \n",
280 mcAssocPt,mcAssocPhi, mcTrigPhi,fDeltaPhiMinCut, mcdeltaPhi, fDeltaPhiMaxCut, GetMinPt());
281
282 // Fill Histograms
283 fhMCEtaCharged ->Fill(mcAssocPt, mcAssocEta);
284 fhMCPhiCharged ->Fill(mcAssocPt, mcAssocPhi);
285 fhMCDeltaEtaCharged->Fill(mcTrigPt, mcTrigEta-mcAssocEta);
286 fhMCDeltaPhiCharged->Fill(mcTrigPt, mcdeltaPhi);
287 fhMCPtAssocDeltaPhi->Fill(mcAssocPt, mcdeltaPhi);
288
289 fhMCDeltaPhiDeltaEtaCharged->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
290
291 //delta phi cut for correlation
292 if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
293 {
294 fhMCDeltaPhiChargedPt->Fill(mcAssocPt,mcdeltaPhi);
295 fhMCPtXECharged ->Fill(mcTrigPt,mcxE);
296 fhMCPtHbpXECharged ->Fill(mcTrigPt,mchbpXE);
297 fhMCPtZTCharged ->Fill(mcTrigPt,mczT);
298 fhMCPtHbpZTCharged ->Fill(mcTrigPt,mchbpZT);
299 fhMCPtTrigPout ->Fill(mcTrigPt, mcpout) ;
300 }
301
302 return kTRUE;
303}
304
305//___________________________________________________________________________________________________________________
306void AliAnaParticleHadronCorrelation::FillChargedMomentumImbalanceHistograms(const Float_t ptTrig, const Float_t ptAssoc,
307 const Float_t xE, const Float_t hbpXE,
308 const Float_t zT, const Float_t hbpZT,
309 const Float_t pout, const Float_t deltaPhi,
310 const Int_t nTracks, const Int_t charge,
311 const Int_t assocBin, const Bool_t decay )
312
313{
314 // Fill mostly momentum imbalance related histograms
315
316 fhDeltaPhiChargedPt ->Fill(ptAssoc, deltaPhi);
317 fhXECharged ->Fill(ptTrig , xE);
318 fhPtHbpXECharged ->Fill(ptTrig , hbpXE);
319 fhZTCharged ->Fill(ptTrig , zT);
320 fhPtHbpZTCharged ->Fill(ptTrig , hbpZT);
321 fhPtTrigPout ->Fill(ptTrig , pout) ;
322 fhPtTrigCharged ->Fill(ptTrig , ptAssoc) ;
323
324 if(fDecayTrigger && decay)
325 {
326 fhXEDecayCharged->Fill(ptTrig,xE);
327 fhZTDecayCharged->Fill(ptTrig,zT);
328 } // photon decay pi0/eta trigger
329
330 if(assocBin >= 0 )//away side
331 {
332 fhXEAssocPtBin[assocBin]->Fill(ptTrig, xE) ;
333 fhZTAssocPtBin[assocBin]->Fill(ptTrig, zT) ;
334
335 if(fDecayTrigger && decay)
336 {
337 fhXEDecayChargedAssocPtBin[assocBin]->Fill(ptTrig, xE);
338 fhZTDecayChargedAssocPtBin[assocBin]->Fill(ptTrig, zT);
339 }
340 }
341
342 if(charge > 0)
343 {
344 fhXEPosCharged->Fill(ptTrig,xE) ;
345 fhZTPosCharged->Fill(ptTrig,zT) ;
346 }
347 else
348 {
349 fhXENegCharged->Fill(ptTrig,xE) ;
350 fhZTNegCharged->Fill(ptTrig,zT) ;
351 }
352
353 //fill different multiplicity histogram
354 if(DoEventSelect())
355 {
356 for(Int_t im=0; im<GetMultiBin(); im++)
357 {
358 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
359 {
360 fhTrigXECorr[im]->Fill(ptTrig,xE);
361 fhTrigZTCorr[im]->Fill(ptTrig,zT);
362 }
363 }
364 } //multiplicity events selection
365}
366
367//_______________________________________________________________________________________________________________________
368void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventHistograms(const Float_t ptTrig, const Float_t ptAssoc,
369 const Float_t deltaPhi, const Int_t nTracks)
370{
371 // Fill underlying event histograms
372
373 fhDeltaPhiUeChargedPt->Fill(ptAssoc,deltaPhi);
374
375 Double_t randomphi = gRandom->Uniform(TMath::Pi()/2,3*TMath::Pi()/2);
376 Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
377 Double_t uezT = ptAssoc/ptTrig;
378
379 if(uexE < 0.) uexE = -uexE;
380
381 fhXEUeCharged->Fill(ptTrig,uexE);
2e876d85 382 if(uexE > 0) fhPtHbpXEUeCharged->Fill(ptTrig,TMath::Log10(1/uexE));
907b38cd 383
384 fhZTUeCharged->Fill(ptTrig,uezT);
2e876d85 385 if(uexE > 0) fhPtHbpZTUeCharged->Fill(ptTrig,TMath::Log10(1/uezT));
907b38cd 386
387 if(DoEventSelect())
388 {
389 for(Int_t im=0; im<GetMultiBin(); im++)
390 {
391 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
392 {
393 fhTrigXEUeCorr[im]->Fill(ptTrig,uexE); // xE? CHECK
394 fhTrigZTUeCorr[im]->Fill(ptTrig,uezT); // zT? CHECK
395 }
396 }
397 } //multiplicity events selection
398}
399
400//___________________________________________________________________________________________________________________________
401void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventSidesHistograms(const Float_t ptTrig, const Float_t ptAssoc,
402 const Float_t xE, const Float_t hbpXE,
403 const Float_t zT, const Float_t hbpZT,
404 const Float_t deltaPhi)
405{
406 // Fill underlying event histograms to the left and right of trigger
407
408 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-fUeDeltaPhiMaxCut))
409 {
410 fhDeltaPhiUeLeftCharged->Fill(ptAssoc, deltaPhi);
411 fhXEUeLeftCharged ->Fill(ptTrig , xE);
412 fhPtHbpXEUeLeftCharged ->Fill(ptTrig , hbpXE);
413 fhZTUeLeftCharged ->Fill(ptTrig , zT);
414 fhPtHbpZTUeLeftCharged ->Fill(ptTrig , hbpZT);
415 }
416
417 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut))
418 {
419 fhDeltaPhiUeRightCharged->Fill(ptAssoc, deltaPhi);
420 fhXEUeRightCharged ->Fill(ptTrig , xE);
421 fhPtHbpXEUeRightCharged ->Fill(ptTrig , hbpXE);
422 fhZTUeRightCharged ->Fill(ptTrig , zT);
423 fhPtHbpZTUeRightCharged ->Fill(ptTrig , hbpZT);
424 }
425}
426
427//______________________________________________________________________________________________________________________________
428void AliAnaParticleHadronCorrelation::FillDecayPhotonCorrelationHistograms(const Float_t ptAssoc, const Float_t phiAssoc,
429 const TLorentzVector mom1, const TLorentzVector mom2,
430 const Bool_t bChargedOrNeutral)
431{
432 // Do correlation with decay photons of triggered pi0 or eta
433
434 // Calculate the correlation parameters
435 Float_t ptDecay1 = mom1.Pt();
436 Float_t ptDecay2 = mom2.Pt();
437
438 Float_t zTDecay1 = -100, zTDecay2 = -100;
439 if(ptDecay1) zTDecay1 = ptAssoc/ptDecay1 ;
440 if(ptDecay2) zTDecay2 = ptAssoc/ptDecay2 ;
441
442 Float_t deltaPhiDecay1 = mom1.Phi()-phiAssoc;
443 if(deltaPhiDecay1< -TMath::PiOver2()) deltaPhiDecay1+=TMath::TwoPi();
444 if(deltaPhiDecay1>3*TMath::PiOver2()) deltaPhiDecay1-=TMath::TwoPi();
445
446 Float_t deltaPhiDecay2 = mom2.Phi()-phiAssoc;
447 if(deltaPhiDecay2< -TMath::PiOver2()) deltaPhiDecay2+=TMath::TwoPi();
448 if(deltaPhiDecay2>3*TMath::PiOver2()) deltaPhiDecay2-=TMath::TwoPi();
449
450 Float_t xEDecay1 =-zTDecay1*TMath::Cos(deltaPhiDecay1); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
451 Float_t xEDecay2 =-zTDecay2*TMath::Cos(deltaPhiDecay2); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
452
453 if(bChargedOrNeutral) // correlate with charges
454 {
455 fhDeltaPhiDecayCharged->Fill(ptDecay1, deltaPhiDecay1);
456 fhDeltaPhiDecayCharged->Fill(ptDecay2, deltaPhiDecay2);
457
2e876d85 458 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms( Charged corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
907b38cd 459
460 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
461 {
462 fhZTDecayCharged->Fill(ptDecay1,zTDecay1);
463 fhXEDecayCharged->Fill(ptDecay1,xEDecay1);
464 }
465 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
466 {
467 fhZTDecayCharged->Fill(ptDecay2,zTDecay2);
468 fhXEDecayCharged->Fill(ptDecay2,xEDecay2);
469 }
470 }
471 else // correlate with neutrals
472 {
473 fhDeltaPhiDecayCharged->Fill(ptDecay1, deltaPhiDecay1);
474 fhDeltaPhiDecayCharged->Fill(ptDecay2, deltaPhiDecay2);
475
2e876d85 476 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms(Neutral corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
907b38cd 477
478 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
479 {
480 fhZTDecayCharged->Fill(ptDecay1,zTDecay1);
481 fhXEDecayCharged->Fill(ptDecay1,xEDecay1);
482 }
483 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
484 {
485 fhZTDecayCharged->Fill(ptDecay2,zTDecay2);
486 fhXEDecayCharged->Fill(ptDecay2,xEDecay2);
487 }
488 }
489}
490
491//______________________________________________________________________________________________________________________________________________________
492void AliAnaParticleHadronCorrelation::FillNeutralAngularCorrelationHistograms(const Float_t ptAssoc, const Float_t ptTrig,
493 const Float_t phiAssoc, const Float_t phiTrig, Float_t & deltaPhi,
494 const Float_t etaAssoc, const Float_t etaTrig)
495{
496 // Fill angular correlation related histograms
497
498 Float_t deltaEta = etaTrig-etaAssoc;
499 deltaPhi = phiTrig-phiAssoc;
500
501 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
502 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
503
504 fhEtaNeutral ->Fill(ptAssoc,etaAssoc);
505 fhPhiNeutral ->Fill(ptAssoc,phiAssoc);
506 fhDeltaEtaNeutral->Fill(ptTrig ,deltaEta);
507 fhDeltaPhiNeutral->Fill(ptTrig ,deltaPhi);
508
509 if(ptAssoc > 2 ) fhDeltaPhiDeltaEtaNeutral->Fill(deltaPhi, deltaEta);
510
511}
512
513//_____________________________________________________________________________________________________________________________
514void AliAnaParticleHadronCorrelation::FillNeutralUnderlyingEventSidesHistograms(const Float_t ptTrig, const Float_t ptAssoc,
515 const Float_t xE, const Float_t hbpXE,
516 const Float_t zT, const Float_t hbpZT,
517 const Float_t deltaPhi)
518{
519 // Fill underlying event histograms to the left and right of trigger
520
521 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-fUeDeltaPhiMaxCut))
522 {
523 fhDeltaPhiUeLeftNeutral->Fill(ptAssoc, deltaPhi);
524 fhXEUeLeftNeutral ->Fill(ptTrig , xE);
525 fhPtHbpXEUeLeftNeutral ->Fill(ptTrig , hbpXE);
526 fhZTUeLeftNeutral ->Fill(ptTrig , zT);
527 fhPtHbpZTUeLeftNeutral ->Fill(ptTrig , hbpZT);
528 }
529
530 if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut))
531 {
532 fhDeltaPhiUeRightNeutral->Fill(ptAssoc, deltaPhi);
533 fhXEUeRightNeutral ->Fill(ptTrig , xE);
534 fhPtHbpXEUeRightNeutral ->Fill(ptTrig , hbpXE);
535 fhZTUeRightNeutral ->Fill(ptTrig , zT);
536 fhPtHbpZTUeRightNeutral ->Fill(ptTrig , hbpZT);
537 }
538}
539
029dea5a 540//_____________________________________________________________
541void AliAnaParticleHadronCorrelation::FillChargedEventMixPool()
542{
543 // Mixed event init
544
2e876d85 545 //printf("FillChargedEventMixPool for %s\n",GetInputAODName().Data());
546 fIsPoolEvent = kFALSE;
547
029dea5a 548 Int_t nTracks = GetCTSTracks()->GetEntriesFast();
549
550 fhNtracksAll->Fill(nTracks);
551
552 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
553 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
554
c6b4facc 555 if(!inputHandler) return ;
556
029dea5a 557 if(inputHandler->IsEventSelected( ) & GetReader()->GetEventTriggerMask())
558 {
559 fhNtracksTrigger->Fill(nTracks);
560 }
561
2e876d85 562 if(inputHandler->IsEventSelected( ) & AliVEvent::kMB)
029dea5a 563 {
564
2e876d85 565 fhNtracksMB->Fill(nTracks);
029dea5a 566
567 TObjArray * mixEventTracks = new TObjArray;
568
2e876d85 569 Int_t eventBin = GetEventMixBin();
570 //printf("***** Pool Event bin : %d - nTracks %d\n",eventBin, GetCTSTracks()->GetEntriesFast());
571
572 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
573 if(eventBin < 0) return;
029dea5a 574
2e876d85 575 if(!fListMixEvents[eventBin]) fListMixEvents[eventBin] = new TList();
029dea5a 576
2e876d85 577 TList * pool = fListMixEvents[eventBin];
029dea5a 578
579 TVector3 p3;
580 for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
581 {
582 AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
583
584 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
585 p3.SetXYZ(mom[0],mom[1],mom[2]);
586 Float_t pt = p3.Pt();
587
588 //Select only hadrons in pt range
589 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
590
591 AliAODPWG4Particle * mixedTrack = new AliAODPWG4Particle(mom[0],mom[1],mom[2],0);
592 mixedTrack->SetDetector("CTS");
593 mixedTrack->SetChargedBit(track->Charge()>0);
594
595 mixEventTracks->Add(mixedTrack);
596 }
597
598 pool->AddFirst(mixEventTracks);
599 mixEventTracks = 0;
2e876d85 600 //printf("Pool size %d, max %d\n",pool->GetSize(), GetNMaxEvMix());
601
602 if(pool->GetSize() > GetNMaxEvMix())
029dea5a 603 {//Remove last event
604 TClonesArray * tmp = static_cast<TClonesArray*>(pool->Last()) ;
605 pool->RemoveLast() ;
606 delete tmp ;
607 }
608
2e876d85 609 fIsPoolEvent = kTRUE;
610
029dea5a 611 } // MB event
612
613}
614
05d0d05d 615//____________________________________________________________
616TObjString* AliAnaParticleHadronCorrelation::GetAnalysisCuts()
617{
618 //Save parameters used for analysis
619 TString parList ; //this will be list of parameters used for this analysis.
620 const Int_t buffersize = 560;
621 char onePar[buffersize] ;
622
623 snprintf(onePar,buffersize,"--- AliAnaPaticleHadronCorrelation ---\n") ;
624 parList+=onePar ;
66e64043 625 snprintf(onePar,buffersize," Pt Trigger > %3.2f ", fMinTriggerPt) ;
05d0d05d 626 parList+=onePar ;
66e64043 627 snprintf(onePar,buffersize," %3.2f < Pt associated < %3.2f ", fMinAssocPt, fMaxAssocPt) ;
05d0d05d 628 parList+=onePar ;
66e64043 629 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-Hadron < %3.2f ", fDeltaPhiMinCut, fDeltaPhiMaxCut) ;
05d0d05d 630 parList+=onePar ;
66e64043 631 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-UeHadron < %3.2f ", fUeDeltaPhiMinCut, fUeDeltaPhiMaxCut) ;
05d0d05d 632 parList+=onePar ;
66e64043 633 snprintf(onePar,buffersize,"Isolated Trigger? %d\n", fSelectIsolated) ;
05d0d05d 634 parList+=onePar ;
66e64043 635 snprintf(onePar,buffersize,"Several UE? %d\n", fMakeSeveralUE) ;
05d0d05d 636 parList+=onePar ;
66e64043 637 snprintf(onePar,buffersize,"Name of AOD Pi0 Branch %s ", fPi0AODBranchName.Data());
05d0d05d 638 parList+=onePar ;
907b38cd 639 snprintf(onePar,buffersize,"Do Decay-hadron correlation ? pi0 %d, decay %d", fPi0Trigger, fDecayTrigger) ;
05d0d05d 640 parList+=onePar ;
3f150b4b 641 snprintf(onePar,buffersize,"Select absolute leading for cluster triggers ? %d or Near Side Leading %d \n",
642 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
05d0d05d 643 parList+=onePar ;
644 snprintf(onePar,buffersize,"Associated particle pt bins %d: ", fNAssocPtBins) ;
645 parList+=onePar ;
646 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
647 snprintf(onePar,buffersize,"bin %d = [%2.1f,%2.1f];", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
648 }
649 parList+=onePar ;
650
651 //Get parameters set in base class.
652 parList += GetBaseParametersList() ;
653
05d0d05d 654 //Get parameters set in FiducialCut class (not available yet)
655 //parlist += GetFidCut()->GetFidCutParametersList()
656
657 return new TObjString(parList) ;
658
659}
660
661//________________________________________________________________
e09cf5ef 662TList * AliAnaParticleHadronCorrelation::GetCreateOutputObjects()
663{
664
665 // Create histograms to be saved in output file and
666 // store them in fOutputContainer
029dea5a 667
e09cf5ef 668 TList * outputContainer = new TList() ;
669 outputContainer->SetName("CorrelationHistos") ;
670
62f2fe4d 671 Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); Int_t ndeltaphibins = GetHistogramRanges()->GetHistoDeltaPhiBins(); Int_t ndeltaetabins = GetHistogramRanges()->GetHistoDeltaEtaBins();
672 Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); Float_t deltaphimax = GetHistogramRanges()->GetHistoDeltaPhiMax(); Float_t deltaetamax = GetHistogramRanges()->GetHistoDeltaEtaMax();
673 Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin(); Float_t deltaphimin = GetHistogramRanges()->GetHistoDeltaPhiMin(); Float_t deltaetamin = GetHistogramRanges()->GetHistoDeltaEtaMin();
e09cf5ef 674
e09cf5ef 675 fhPtLeading = new TH1F ("hPtLeading","p_T distribution of leading particles", nptbins,ptmin,ptmax);
676 fhPtLeading->SetXTitle("p_{T}^{trig} (GeV/c)");
677
678 fhPhiLeading = new TH2F ("hPhiLeading","#phi distribution of leading Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
679 fhPhiLeading->SetYTitle("#phi (rad)");
680
681 fhEtaLeading = new TH2F ("hEtaLeading","#eta distribution of leading",nptbins,ptmin,ptmax, netabins,etamin,etamax);
682 fhEtaLeading->SetYTitle("#eta ");
045396c8 683
e09cf5ef 684 outputContainer->Add(fhPtLeading);
685 outputContainer->Add(fhPhiLeading);
686 outputContainer->Add(fhEtaLeading);
687
688 //Correlation with charged hadrons
547c2f01 689 if(GetReader()->IsCTSSwitchedOn())
690 {
e09cf5ef 691 fhDeltaPhiDeltaEtaCharged = new TH2F
62f2fe4d 692 ("hDeltaPhiDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}}",
693 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax);
e09cf5ef 694 fhDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi");
695 fhDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
696
697 fhPhiCharged = new TH2F
babcbc9d 698 ("hPhiCharged","#phi_{h^{#pm}} vs p_{T #pm}",
e09cf5ef 699 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
700 fhPhiCharged->SetYTitle("#phi_{h^{#pm}} (rad)");
701 fhPhiCharged->SetXTitle("p_{T #pm} (GeV/c)");
702
703 fhEtaCharged = new TH2F
babcbc9d 704 ("hEtaCharged","#eta_{h^{#pm}} vs p_{T #pm}",
e09cf5ef 705 nptbins,ptmin,ptmax,netabins,etamin,etamax);
706 fhEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
707 fhEtaCharged->SetXTitle("p_{T #pm} (GeV/c)");
708
709 fhDeltaPhiCharged = new TH2F
babcbc9d 710 ("hDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}",
62f2fe4d 711 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
e09cf5ef 712 fhDeltaPhiCharged->SetYTitle("#Delta #phi");
713 fhDeltaPhiCharged->SetXTitle("p_{T trigger} (GeV/c)");
714
715 fhDeltaPhiChargedPt = new TH2F
babcbc9d 716 ("hDeltaPhiChargedPt","#phi_{trigger} - #phi_{#h^{#pm}} vs p_{T h^{#pm}}",
62f2fe4d 717 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
e09cf5ef 718 fhDeltaPhiChargedPt->SetYTitle("#Delta #phi");
719 fhDeltaPhiChargedPt->SetXTitle("p_{T h^{#pm}} (GeV/c)");
720
721 fhDeltaPhiUeChargedPt = new TH2F
babcbc9d 722 ("hDeltaPhiUeChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}}",
62f2fe4d 723 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
e09cf5ef 724 fhDeltaPhiUeChargedPt->SetYTitle("#Delta #phi");
725 fhDeltaPhiUeChargedPt->SetXTitle("p_{T h^{#pm}} (GeV/c)");
726
727 fhDeltaEtaCharged = new TH2F
babcbc9d 728 ("hDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger}",
62f2fe4d 729 nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax);
e09cf5ef 730 fhDeltaEtaCharged->SetYTitle("#Delta #eta");
731 fhDeltaEtaCharged->SetXTitle("p_{T trigger} (GeV/c)");
732
3f150b4b 733 fhXECharged =
734 new TH2F("hXECharged","x_{E} for charged tracks",
e09cf5ef 735 nptbins,ptmin,ptmax,200,0.,2.);
3f150b4b 736 fhXECharged->SetYTitle("x_{E}");
737 fhXECharged->SetXTitle("p_{T trigger}");
e09cf5ef 738
3f150b4b 739 fhXEUeCharged =
740 new TH2F("hXEUeCharged","x_{E} for Underlying Event",
e09cf5ef 741 nptbins,ptmin,ptmax,200,0.,2.);
3f150b4b 742 fhXEUeCharged->SetYTitle("x_{E}");
743 fhXEUeCharged->SetXTitle("p_{T trigger}");
e09cf5ef 744
3f150b4b 745 fhXEPosCharged =
746 new TH2F("hXEPositiveCharged","x_{E} for positive charged tracks",
e09cf5ef 747 nptbins,ptmin,ptmax,200,0.,2.);
3f150b4b 748 fhXEPosCharged->SetYTitle("x_{E}");
749 fhXEPosCharged->SetXTitle("p_{T trigger}");
e09cf5ef 750
3f150b4b 751 fhXENegCharged =
752 new TH2F("hXENegativeCharged","x_{E} for negative charged tracks",
e09cf5ef 753 nptbins,ptmin,ptmax,200,0.,2.);
3f150b4b 754 fhXENegCharged->SetYTitle("x_{E}");
755 fhXENegCharged->SetXTitle("p_{T trigger}");
e09cf5ef 756
3f150b4b 757 fhPtHbpXECharged =
758 new TH2F("hHbpXECharged","#xi = ln(1/x_{E}) with charged hadrons",
e09cf5ef 759 nptbins,ptmin,ptmax,200,0.,10.);
3f150b4b 760 fhPtHbpXECharged->SetYTitle("ln(1/x_{E})");
761 fhPtHbpXECharged->SetXTitle("p_{T trigger}");
e09cf5ef 762
3f150b4b 763 fhPtHbpXEUeCharged =
764 new TH2F("hHbpXEUeCharged","#xi = ln(1/x_{E}) with charged hadrons,Underlying Event",
e09cf5ef 765 nptbins,ptmin,ptmax,200,0.,10.);
3f150b4b 766 fhPtHbpXEUeCharged->SetYTitle("ln(1/x_{E})");
767 fhPtHbpXEUeCharged->SetXTitle("p_{T trigger}");
768
769 fhZTCharged =
770 new TH2F("hZTCharged","z_{T} for charged tracks",
771 nptbins,ptmin,ptmax,200,0.,2.);
772 fhZTCharged->SetYTitle("z_{T}");
773 fhZTCharged->SetXTitle("p_{T trigger}");
774
775 fhZTUeCharged =
776 new TH2F("hZTUeCharged","z_{T} for Underlying Event",
777 nptbins,ptmin,ptmax,200,0.,2.);
778 fhZTUeCharged->SetYTitle("z_{T}");
779 fhZTUeCharged->SetXTitle("p_{T trigger}");
780
781 fhZTPosCharged =
782 new TH2F("hZTPositiveCharged","z_{T} for positive charged tracks",
783 nptbins,ptmin,ptmax,200,0.,2.);
784 fhZTPosCharged->SetYTitle("z_{T}");
785 fhZTPosCharged->SetXTitle("p_{T trigger}");
786
787 fhZTNegCharged =
788 new TH2F("hZTNegativeCharged","z_{T} for negative charged tracks",
789 nptbins,ptmin,ptmax,200,0.,2.);
790 fhZTNegCharged->SetYTitle("z_{T}");
791 fhZTNegCharged->SetXTitle("p_{T trigger}");
792
793 fhPtHbpZTCharged =
794 new TH2F("hHbpZTCharged","#xi = ln(1/z_{T}) with charged hadrons",
795 nptbins,ptmin,ptmax,200,0.,10.);
796 fhPtHbpZTCharged->SetYTitle("ln(1/z_{T})");
797 fhPtHbpZTCharged->SetXTitle("p_{T trigger}");
798
799 fhPtHbpZTUeCharged =
800 new TH2F("hHbpZTUeCharged","#xi = ln(1/z_{T}) with charged hadrons,Underlying Event",
801 nptbins,ptmin,ptmax,200,0.,10.);
802 fhPtHbpZTUeCharged->SetYTitle("ln(1/x_{E})");
803 fhPtHbpZTUeCharged->SetXTitle("p_{T trigger}");
e09cf5ef 804
805 fhPtTrigPout =
babcbc9d 806 new TH2F("hPtTrigPout","Pout with triggers",
e09cf5ef 807 nptbins,ptmin,ptmax,2*nptbins,-ptmax,ptmax);
808 fhPtTrigPout->SetYTitle("p_{out} (GeV/c)");
809 fhPtTrigPout->SetXTitle("p_{T trigger} (GeV/c)");
810
e09cf5ef 811 fhPtTrigCharged =
babcbc9d 812 new TH2F("hPtTrigCharged","trgger and charged tracks pt distribution",
e09cf5ef 813 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
814 fhPtTrigCharged->SetYTitle("p_{T h^{#pm}} (GeV/c)");
815 fhPtTrigCharged->SetXTitle("p_{T trigger} (GeV/c)");
816
817 outputContainer->Add(fhDeltaPhiDeltaEtaCharged);
818 outputContainer->Add(fhPhiCharged) ;
819 outputContainer->Add(fhEtaCharged) ;
820 outputContainer->Add(fhDeltaPhiCharged) ;
821 outputContainer->Add(fhDeltaEtaCharged) ;
822 outputContainer->Add(fhDeltaPhiChargedPt) ;
823 outputContainer->Add(fhDeltaPhiUeChargedPt) ;
050ad675 824
3f150b4b 825 outputContainer->Add(fhXECharged) ;
826 outputContainer->Add(fhXEPosCharged) ;
827 outputContainer->Add(fhXENegCharged) ;
828 outputContainer->Add(fhXEUeCharged) ;
829 outputContainer->Add(fhPtHbpXECharged) ;
830 outputContainer->Add(fhPtHbpXEUeCharged) ;
050ad675 831
3f150b4b 832 outputContainer->Add(fhZTCharged) ;
833 outputContainer->Add(fhZTPosCharged) ;
834 outputContainer->Add(fhZTNegCharged) ;
835 outputContainer->Add(fhZTUeCharged) ;
836 outputContainer->Add(fhPtHbpZTCharged) ;
837 outputContainer->Add(fhPtHbpZTUeCharged) ;
838
e09cf5ef 839 outputContainer->Add(fhPtTrigPout) ;
e09cf5ef 840 outputContainer->Add(fhPtTrigCharged) ;
841
547c2f01 842 if(DoEventSelect())
843 {
e09cf5ef 844 Int_t nMultiBins = GetMultiBin();
845 fhTrigDeltaPhiCharged = new TH2F*[nMultiBins] ;
846 fhTrigDeltaEtaCharged = new TH2F*[nMultiBins] ;
3f150b4b 847 fhTrigXECorr = new TH2F*[nMultiBins] ;
848 fhTrigXEUeCorr = new TH2F*[nMultiBins] ;
849 fhTrigZTCorr = new TH2F*[nMultiBins] ;
850 fhTrigZTUeCorr = new TH2F*[nMultiBins] ;
851
852 for(Int_t im=0; im<nMultiBins; im++)
853 {
e09cf5ef 854 fhTrigDeltaPhiCharged[im] = new TH2F
62f2fe4d 855 (Form("hTrigDeltaPhiCharged_%d",im),Form("hTrigDeltaPhiCharged_%d",im), nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
e09cf5ef 856 fhTrigDeltaPhiCharged[im]->SetXTitle("p_{T trigger} (GeV/c)");
857 fhTrigDeltaPhiCharged[im]->SetYTitle("#Delta #phi");
3f150b4b 858
e09cf5ef 859 fhTrigDeltaEtaCharged[im] = new TH2F
62f2fe4d 860 (Form("hTrigDeltaEtaCharged_%d",im),Form("hTrigDeltaEtaCharged_%d",im), nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
e09cf5ef 861 fhTrigDeltaEtaCharged[im]->SetXTitle("p_{T trigger} (GeV/c)");
862 fhTrigDeltaEtaCharged[im]->SetYTitle("#Delta #eta");
3f150b4b 863
864 fhTrigXECorr[im] = new TH2F
865 (Form("hTrigXEPtCorr_%d",im),Form("hTrigXEPtCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
866 fhTrigXECorr[im]->SetYTitle("x_{E trigger h^{#pm}}");
867 fhTrigXECorr[im]->SetXTitle("p_{T trigger}");
868
869 fhTrigXEUeCorr[im] = new TH2F
870 (Form("hTrigXEPtUeCorr_%d",im),Form("hTrigXEPtUeCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
871 fhTrigXEUeCorr[im]->SetYTitle("x_{E trigger h^{#pm}}");
872 fhTrigXEUeCorr[im]->SetXTitle("p_{T trigger}");
873
874 fhTrigZTCorr[im] = new TH2F
875 (Form("hTrigZTPtCorr_%d",im),Form("hTrigZTPtCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
876 fhTrigZTCorr[im]->SetYTitle("z_{trigger h^{#pm}}");
877 fhTrigZTCorr[im]->SetXTitle("p_{T trigger}");
878
879 fhTrigZTUeCorr[im] = new TH2F
880 (Form("hTrigZTPtUeCorr_%d",im),Form("hTrigZTPtUeCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
881 fhTrigZTUeCorr[im]->SetYTitle("z_{trigger h^{#pm}}");
882 fhTrigZTUeCorr[im]->SetXTitle("p_{T trigger}");
045396c8 883
e09cf5ef 884 outputContainer->Add(fhTrigDeltaPhiCharged[im]) ;
885 outputContainer->Add(fhTrigDeltaEtaCharged[im]) ;
3f150b4b 886 outputContainer->Add(fhTrigXECorr[im]);
887 outputContainer->Add(fhTrigXEUeCorr[im]);
888 outputContainer->Add(fhTrigZTCorr[im]);
889 outputContainer->Add(fhTrigZTUeCorr[im]);
045396c8 890 }
891 }
892
907b38cd 893 if(fFillBradHisto)
894 {
895 fhAssocPtBkg = new TH2F("hAssocPtBkg", " Trigger p_{T} vs associated hadron p_{T} from background",
896 nptbins, ptmin, ptmax,nptbins,ptmin,ptmax);
897 fhAssocPtBkg->SetXTitle("p_{T trigger}");
898 fhAssocPtBkg->SetYTitle("p_{T associated}");
899 outputContainer->Add(fhAssocPtBkg) ;
900
901 fhDeltaPhiBrad = new TH2F("hDeltaPhiBrad","atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs p_{T trigger} ",
902 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
903 fhDeltaPhiBrad->SetXTitle("p_{T trigger}");
904 fhDeltaPhiBrad->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
905 outputContainer->Add(fhDeltaPhiBrad) ;
906 }
66e64043 907
05d0d05d 908 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins] ;
05d0d05d 909 fhXEAssocPtBin = new TH2F*[fNAssocPtBins] ;
3f150b4b 910 fhZTAssocPtBin = new TH2F*[fNAssocPtBins] ;
911
907b38cd 912 if(fFillBradHisto)
913 fhDeltaPhiBradAssocPtBin = new TH2F*[fNAssocPtBins] ;
914
915 if(fPi0Trigger || fDecayTrigger)
916 {
917 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins] ;
918 fhXEAssocPtBin = new TH2F*[fNAssocPtBins] ;
919 fhZTAssocPtBin = new TH2F*[fNAssocPtBins] ;
920 fhXEDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins] ;
921 fhZTDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins] ;
922 fhDeltaPhiDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins] ;
923 }
050ad675 924
907b38cd 925 if(fHMPIDCorrelation)
926 {
927 fhDeltaPhiAssocPtBinHMPID = new TH2F*[fNAssocPtBins] ;
928 fhDeltaPhiAssocPtBinHMPIDAcc= new TH2F*[fNAssocPtBins] ;
929 }
930
babcbc9d 931 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
932 {
933 fhDeltaPhiAssocPtBin[i] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
05d0d05d 934 Form("#Delta #phi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
62f2fe4d 935 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
05d0d05d 936 fhDeltaPhiAssocPtBin[i]->SetXTitle("p_{T trigger}");
937 fhDeltaPhiAssocPtBin[i]->SetYTitle("#Delta #phi");
907b38cd 938
babcbc9d 939 fhXEAssocPtBin[i] = new TH2F(Form("hXEAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
66e64043 940 Form("x_{E} vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
3f150b4b 941 nptbins, ptmin, ptmax,200, 0.0, 2.0);
05d0d05d 942 fhXEAssocPtBin[i]->SetXTitle("p_{T trigger}");
943 fhXEAssocPtBin[i]->SetYTitle("x_{E}");
944
3f150b4b 945 fhZTAssocPtBin[i] = new TH2F(Form("hZTAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
946 Form("z_{T} vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
947 nptbins, ptmin, ptmax,200, 0.0, 2.0);
948 fhZTAssocPtBin[i]->SetXTitle("p_{T trigger}");
949 fhZTAssocPtBin[i]->SetYTitle("z_{T}");
950
05d0d05d 951 outputContainer->Add(fhDeltaPhiAssocPtBin[i]) ;
05d0d05d 952 outputContainer->Add(fhXEAssocPtBin[i]);
3f150b4b 953 outputContainer->Add(fhZTAssocPtBin[i]);
907b38cd 954
955 if(fPi0Trigger || fDecayTrigger)
956 {
957 fhDeltaPhiDecayChargedAssocPtBin[i] = new TH2F(Form("hDeltaPhiPtDecayChargedAssocPt%2.1f_%2.1f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
958 Form("#Delta #phi vs p_{T trigger} tagged as decay for associated p_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
62f2fe4d 959 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
907b38cd 960 fhDeltaPhiDecayChargedAssocPtBin[i]->SetXTitle("p_{T trigger}");
961 fhDeltaPhiDecayChargedAssocPtBin[i]->SetYTitle("#Delta #phi");
962
963 fhXEDecayChargedAssocPtBin[i] = new TH2F(Form("hXEDecayChargedAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
964 Form("x_{E} vs p_{T trigger} tagged as decay for associated p_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
965 nptbins, ptmin, ptmax,200, 0.0, 2.0);
966 fhXEDecayChargedAssocPtBin[i]->SetXTitle("p_{T trigger}");
967 fhXEDecayChargedAssocPtBin[i]->SetYTitle("x_{E}");
968
969 fhZTDecayChargedAssocPtBin[i] = new TH2F(Form("hZTDecayChargedAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
970 Form("z_{T} vs p_{T trigger} tagged as decay for associated p_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
971 nptbins, ptmin, ptmax,200, 0.0, 2.0);
972 fhZTDecayChargedAssocPtBin[i]->SetXTitle("p_{T trigger}");
973 fhZTDecayChargedAssocPtBin[i]->SetYTitle("z_{T}");
974
975 outputContainer->Add(fhDeltaPhiDecayChargedAssocPtBin[i]) ;
976 outputContainer->Add(fhXEDecayChargedAssocPtBin[i]);
977 outputContainer->Add(fhZTDecayChargedAssocPtBin[i]);
978
979 }
980
981 if(fFillBradHisto)
982 {
983 fhDeltaPhiBradAssocPtBin[i] = new TH2F(Form("hDeltaPhiBradPtAssocPt%2.1f_%2.1f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
984 Form("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
985 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
986 fhDeltaPhiBradAssocPtBin[i]->SetXTitle("p_{T trigger}");
987 fhDeltaPhiBradAssocPtBin[i]->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
988 outputContainer->Add(fhDeltaPhiBradAssocPtBin[i]) ;
989 }
990
991 if(fHMPIDCorrelation)
992 {
993 fhDeltaPhiAssocPtBinHMPID[i] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1fHMPID", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
994 Form("#Delta #phi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f], with track having HMPID signal", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
62f2fe4d 995 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
907b38cd 996 fhDeltaPhiAssocPtBinHMPID[i]->SetXTitle("p_{T trigger}");
997 fhDeltaPhiAssocPtBinHMPID[i]->SetYTitle("#Delta #phi");
998
999 fhDeltaPhiAssocPtBinHMPIDAcc[i] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1fHMPIDAcc", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
1000 Form("#Delta #phi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f], with track within 5<phi<20 deg", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
62f2fe4d 1001 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
907b38cd 1002 fhDeltaPhiAssocPtBinHMPIDAcc[i]->SetXTitle("p_{T trigger}");
1003 fhDeltaPhiAssocPtBinHMPIDAcc[i]->SetYTitle("#Delta #phi");
1004
1005 outputContainer->Add(fhDeltaPhiAssocPtBinHMPID[i]) ;
1006 outputContainer->Add(fhDeltaPhiAssocPtBinHMPIDAcc[i]) ;
1007
1008 }
e09cf5ef 1009 }
045396c8 1010
907b38cd 1011 if(fPi0Trigger || fDecayTrigger)
547c2f01 1012 {
907b38cd 1013 if(fPi0Trigger)
1014 {
1015 fhPtPi0DecayRatio = new TH2F
1016 ("hPtPi0DecayRatio","p_T of #pi^{0} and the ratio of pt for two decay",
1017 nptbins,ptmin,ptmax, 100,0.,2.);
1018 fhPtPi0DecayRatio->SetXTitle("p_{T}^{#pi^{0}} (GeV/c)");
1019 fhPtPi0DecayRatio->SetYTitle("p_{T}^{Decay}/p_{T}^{#pi^{0}}");
050ad675 1020 outputContainer->Add(fhPtPi0DecayRatio) ;
907b38cd 1021 }
e09cf5ef 1022
1023 fhDeltaPhiDecayCharged = new TH2F
babcbc9d 1024 ("hDeltaPhiDecayCharged","#phi_{Decay} - #phi_{h^{#pm}} vs p_{T Decay}",
62f2fe4d 1025 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
e09cf5ef 1026 fhDeltaPhiDecayCharged->SetYTitle("#Delta #phi");
1027 fhDeltaPhiDecayCharged->SetXTitle("p_{T Decay} (GeV/c)");
1028
3f150b4b 1029 fhXEDecayCharged =
1030 new TH2F("hXEDecayCharged","x_{E} Decay",
1031 nptbins,ptmin,ptmax,200,0.,2.);
1032 fhXEDecayCharged->SetYTitle("x_{E}");
1033 fhXEDecayCharged->SetXTitle("p_{T decay}");
1034
1035 fhZTDecayCharged =
1036 new TH2F("hZTDecayCharged","z_{trigger h^{#pm}} = p_{T h^{#pm}} / p_{T Decay}",
e09cf5ef 1037 nptbins,ptmin,ptmax,200,0.,2.);
3f150b4b 1038 fhZTDecayCharged->SetYTitle("z_{decay h^{#pm}}");
1039 fhZTDecayCharged->SetXTitle("p_{T decay}");
e09cf5ef 1040
e09cf5ef 1041 outputContainer->Add(fhDeltaPhiDecayCharged) ;
3f150b4b 1042 outputContainer->Add(fhXEDecayCharged) ;
1043 outputContainer->Add(fhZTDecayCharged) ;
e09cf5ef 1044 }
1045
547c2f01 1046 if(fMakeSeveralUE)
1047 {
e09cf5ef 1048 fhDeltaPhiUeLeftCharged = new TH2F
babcbc9d 1049 ("hDeltaPhiUeLeftChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE left side range of trigger particles",
62f2fe4d 1050 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
e09cf5ef 1051 fhDeltaPhiUeLeftCharged->SetYTitle("#Delta #phi");
1052 fhDeltaPhiUeLeftCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1053 outputContainer->Add(fhDeltaPhiUeLeftCharged) ;
1054
1055 fhDeltaPhiUeRightCharged = new TH2F
babcbc9d 1056 ("hDeltaPhiUeRightChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE right side range of trigger particles",
62f2fe4d 1057 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
e09cf5ef 1058 fhDeltaPhiUeRightCharged->SetYTitle("#Delta #phi");
1059 fhDeltaPhiUeRightCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1060 outputContainer->Add(fhDeltaPhiUeRightCharged) ;
1061
3f150b4b 1062 fhXEUeLeftCharged =
1063 new TH2F("hXEUeChargedLeft","x_{E} with UE left side of trigger",
e09cf5ef 1064 nptbins,ptmin,ptmax,200,0.,2.);
3f150b4b 1065 fhXEUeLeftCharged->SetYTitle("x_{E Ueh^{#pm}}");
1066 fhXEUeLeftCharged->SetXTitle("p_{T trigger}");
1067 outputContainer->Add(fhXEUeLeftCharged) ;
e09cf5ef 1068
3f150b4b 1069 fhXEUeRightCharged =
1070 new TH2F("hXEUeChargedRight","x_{E h^{#pm}} with UE right side of trigger",
e09cf5ef 1071 nptbins,ptmin,ptmax,200,0.,2.);
3f150b4b 1072 fhXEUeRightCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
1073 fhXEUeRightCharged->SetXTitle("p_{T trigger}");
1074 outputContainer->Add(fhXEUeRightCharged) ;
1075
1076 fhPtHbpXEUeLeftCharged =
1077 new TH2F("hHbpXEUeChargedLeft","#xi = ln(1/x_{E}) with charged UE left side of trigger",
1078 nptbins,ptmin,ptmax,200,0.,10.);
1079 fhPtHbpXEUeLeftCharged->SetYTitle("ln(1/x_{E})");
1080 fhPtHbpXEUeLeftCharged->SetXTitle("p_{T trigger}");
1081 outputContainer->Add(fhPtHbpXEUeLeftCharged) ;
e09cf5ef 1082
3f150b4b 1083 fhPtHbpXEUeRightCharged =
1084 new TH2F("hHbpXEUeChargedRight","#xi = ln(1/x_{E}) with charged UE right side of trigger",
e09cf5ef 1085 nptbins,ptmin,ptmax,200,0.,10.);
3f150b4b 1086 fhPtHbpXEUeRightCharged->SetYTitle("ln(1/x_{E})");
1087 fhPtHbpXEUeRightCharged->SetXTitle("p_{T trigger}");
1088 outputContainer->Add(fhPtHbpXEUeRightCharged) ;
1089
1090 fhZTUeLeftCharged =
1091 new TH2F("hZTUeChargedLeft","z_{trigger h^{#pm}} = p_{T Ueh^{#pm}} / p_{T trigger} with UE left side of trigger",
1092 nptbins,ptmin,ptmax,200,0.,2.);
1093 fhZTUeLeftCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
1094 fhZTUeLeftCharged->SetXTitle("p_{T trigger}");
1095 outputContainer->Add(fhZTUeLeftCharged) ;
1096
1097 fhZTUeRightCharged =
1098 new TH2F("hZTUeChargedRight","z_{trigger h^{#pm}} = p_{T Ueh^{#pm}} / p_{T trigger} with UE right side of trigger",
1099 nptbins,ptmin,ptmax,200,0.,2.);
1100 fhZTUeRightCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
1101 fhZTUeRightCharged->SetXTitle("p_{T trigger}");
1102 outputContainer->Add(fhZTUeRightCharged) ;
e09cf5ef 1103
3f150b4b 1104 fhPtHbpZTUeLeftCharged =
1105 new TH2F("hHbpZTUeChargedLeft","#xi = ln(1/z_{T}) with charged UE left side of trigger",
e09cf5ef 1106 nptbins,ptmin,ptmax,200,0.,10.);
3f150b4b 1107 fhPtHbpZTUeLeftCharged->SetYTitle("ln(1/z_{T})");
1108 fhPtHbpZTUeLeftCharged->SetXTitle("p_{T trigger}");
1109 outputContainer->Add(fhPtHbpZTUeLeftCharged) ;
1110
1111 fhPtHbpZTUeRightCharged =
1112 new TH2F("hHbpZTUeChargedRight","#xi = ln(1/z_{T}) with charged UE right side of trigger",
1113 nptbins,ptmin,ptmax,200,0.,10.);
1114 fhPtHbpZTUeRightCharged->SetYTitle("ln(1/z_{T})");
1115 fhPtHbpZTUeRightCharged->SetXTitle("p_{T trigger}");
1116 outputContainer->Add(fhPtHbpZTUeRightCharged) ;
e09cf5ef 1117
1118 }
1119 } //Correlation with charged hadrons
050ad675 1120
e09cf5ef 1121 //Correlation with neutral hadrons
547c2f01 1122 if(fNeutralCorr)
1123 {
e09cf5ef 1124 fhDeltaPhiDeltaEtaNeutral = new TH2F
babcbc9d 1125 ("hDeltaPhiDeltaEtaNeutral","#phi_{trigger} - #phi_{h^{0}} vs #eta_{trigger} - #eta_{h^{0}}",
62f2fe4d 1126 ndeltaphibins ,deltaphimin,deltaphimax, ndeltaetabins ,deltaetamin,deltaetamax);
e09cf5ef 1127 fhDeltaPhiDeltaEtaNeutral->SetXTitle("#Delta #phi");
1128 fhDeltaPhiDeltaEtaNeutral->SetYTitle("#Delta #eta");
1129
1130 fhPhiNeutral = new TH2F
babcbc9d 1131 ("hPhiNeutral","#phi_{#pi^{0}} vs p_{T #pi^{0}}",
e09cf5ef 1132 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1133 fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)");
1134 fhPhiNeutral->SetXTitle("p_{T #pi^{0}} (GeV/c)");
1135
1136 fhEtaNeutral = new TH2F
babcbc9d 1137 ("hEtaNeutral","#eta_{#pi^{0}} vs p_{T #pi^{0}}",
e09cf5ef 1138 nptbins,ptmin,ptmax,netabins,etamin,etamax);
1139 fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)");
1140 fhEtaNeutral->SetXTitle("p_{T #pi^{0}} (GeV/c)");
1141
1142 fhDeltaPhiNeutral = new TH2F
babcbc9d 1143 ("hDeltaPhiNeutral","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T trigger}",
e09cf5ef 1144 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1145 fhDeltaPhiNeutral->SetYTitle("#Delta #phi");
1146 fhDeltaPhiNeutral->SetXTitle("p_{T trigger} (GeV/c)");
1147
1148 fhDeltaPhiNeutralPt = new TH2F
babcbc9d 1149 ("hDeltaPhiNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T #pi^{0}}}",
62f2fe4d 1150 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
e09cf5ef 1151 fhDeltaPhiNeutralPt->SetYTitle("#Delta #phi");
1152 fhDeltaPhiNeutralPt->SetXTitle("p_{T h^{0}} (GeV/c)");
1153
1154 fhDeltaPhiUeNeutralPt = new TH2F
babcbc9d 1155 ("hDeltaPhiUeNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T #pi^{0}}}",
62f2fe4d 1156 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
e09cf5ef 1157 fhDeltaPhiUeNeutralPt->SetYTitle("#Delta #phi");
1158 fhDeltaPhiUeNeutralPt->SetXTitle("p_{T h^{0}} (GeV/c)");
1159
1160 fhDeltaEtaNeutral = new TH2F
babcbc9d 1161 ("hDeltaEtaNeutral","#eta_{trigger} - #eta_{#pi^{0}} vs p_{T trigger}",
62f2fe4d 1162 nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax);
e09cf5ef 1163 fhDeltaEtaNeutral->SetYTitle("#Delta #eta");
1164 fhDeltaEtaNeutral->SetXTitle("p_{T trigger} (GeV/c)");
1165
3f150b4b 1166 fhXENeutral =
1167 new TH2F("hXENeutral","x_{E} for #pi^{0} associated",
e09cf5ef 1168 nptbins,ptmin,ptmax,200,0.,2.);
3f150b4b 1169 fhXENeutral->SetYTitle("x_{E}");
1170 fhXENeutral->SetXTitle("p_{T trigger}");
e09cf5ef 1171
3f150b4b 1172 fhXEUeNeutral =
1173 new TH2F("hXEUeNeutral","x_{E} for #pi^{0} associated",
e09cf5ef 1174 nptbins,ptmin,ptmax,200,0.,2.);
3f150b4b 1175 fhXEUeNeutral->SetYTitle("x_{E}");
1176 fhXEUeNeutral->SetXTitle("p_{T trigger}");
e09cf5ef 1177
3f150b4b 1178 fhPtHbpXENeutral =
1179 new TH2F("hHbpXENeutral","#xi = ln(1/x_{E})for #pi^{0} associated",
e09cf5ef 1180 nptbins,ptmin,ptmax,200,0.,10.);
3f150b4b 1181 fhPtHbpXENeutral->SetYTitle("ln(1/x_{E})");
1182 fhPtHbpXENeutral->SetXTitle("p_{T trigger}");
e09cf5ef 1183
3f150b4b 1184 fhPtHbpXEUeNeutral =
1185 new TH2F("hHbpXEUeNeutral","#xi = ln(1/x_{E}) for #pi^{0} associated",
e09cf5ef 1186 nptbins,ptmin,ptmax,200,0.,10.);
3f150b4b 1187 fhPtHbpXEUeNeutral->SetYTitle("ln(1/x_{E})");
1188 fhPtHbpXEUeNeutral->SetXTitle("p_{T trigger}");
1189
1190 fhZTNeutral =
1191 new TH2F("hZTNeutral","z_{trigger #pi} = p_{T #pi^{0}} / p_{T trigger} for #pi^{0} associated",
1192 nptbins,ptmin,ptmax,200,0.,2.);
1193 fhZTNeutral->SetYTitle("z_{trigger #pi^{0}}");
1194 fhZTNeutral->SetXTitle("p_{T trigger}");
e09cf5ef 1195
3f150b4b 1196 fhZTUeNeutral =
1197 new TH2F("hZTUeNeutral","z_{trigger #pi} = p_{T #pi^{0}} / p_{T trigger} for #pi^{0} associated",
1198 nptbins,ptmin,ptmax,200,0.,2.);
1199 fhZTUeNeutral->SetYTitle("z_{trigger #pi^{0}}");
1200 fhZTUeNeutral->SetXTitle("p_{T trigger}");
1201
1202 fhPtHbpZTNeutral =
1203 new TH2F("hHbpZTNeutral","#xi = ln(1/x_{E}) for #pi^{0} associated",
1204 nptbins,ptmin,ptmax,200,0.,10.);
1205 fhPtHbpZTNeutral->SetYTitle("ln(1/z_{T})");
1206 fhPtHbpZTNeutral->SetXTitle("p_{T trigger}");
1207
1208 fhPtHbpZTUeNeutral =
1209 new TH2F("hHbpZTUeNeutral","#xi = ln(1/x_{E}) for #pi^{0} associated",
1210 nptbins,ptmin,ptmax,200,0.,10.);
1211 fhPtHbpXEUeNeutral->SetYTitle("ln(1/z_{T})");
1212 fhPtHbpXEUeNeutral->SetXTitle("p_{T trigger}");
e09cf5ef 1213
1214 outputContainer->Add(fhDeltaPhiDeltaEtaNeutral);
1215 outputContainer->Add(fhPhiNeutral) ;
1216 outputContainer->Add(fhEtaNeutral) ;
1217 outputContainer->Add(fhDeltaPhiNeutral) ;
1218 outputContainer->Add(fhDeltaPhiNeutralPt) ;
1219 outputContainer->Add(fhDeltaPhiUeNeutralPt) ;
1220 outputContainer->Add(fhDeltaEtaNeutral) ;
3f150b4b 1221 outputContainer->Add(fhXENeutral) ;
1222 outputContainer->Add(fhXEUeNeutral) ;
1223 outputContainer->Add(fhPtHbpXENeutral) ;
1224 outputContainer->Add(fhPtHbpXEUeNeutral) ;
1225 outputContainer->Add(fhZTNeutral) ;
1226 outputContainer->Add(fhZTUeNeutral) ;
1227 outputContainer->Add(fhPtHbpZTNeutral) ;
1228 outputContainer->Add(fhPtHbpZTUeNeutral) ;
e09cf5ef 1229
907b38cd 1230 if(fPi0Trigger || fDecayTrigger)
babcbc9d 1231 {
e09cf5ef 1232 fhDeltaPhiDecayNeutral = new TH2F
babcbc9d 1233 ("hDeltaPhiDecayNeutral","#phi_{Decay} - #phi_{h^{0}} vs p_{T Decay}",
62f2fe4d 1234 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
e09cf5ef 1235 fhDeltaPhiDecayNeutral->SetYTitle("#Delta #phi");
1236 fhDeltaPhiDecayNeutral->SetXTitle("p_{T Decay} (GeV/c)");
1237
3f150b4b 1238 fhXEDecayNeutral =
1239 new TH2F("hXEDecayNeutral","x_{E} for decay trigger",
1240 nptbins,ptmin,ptmax,200,0.,2.);
1241 fhXEDecayNeutral->SetYTitle("x_{E}");
1242 fhXEDecayNeutral->SetXTitle("p_{T decay}");
1243
1244 fhZTDecayNeutral =
1245 new TH2F("hZTDecayNeutral","z_{trigger h^{0}} = p_{T h^{0}} / p_{T Decay}",
e09cf5ef 1246 nptbins,ptmin,ptmax,200,0.,2.);
3f150b4b 1247 fhZTDecayNeutral->SetYTitle("z_{h^{0}}");
1248 fhZTDecayNeutral->SetXTitle("p_{T decay}");
e09cf5ef 1249
1250 outputContainer->Add(fhDeltaPhiDecayNeutral) ;
3f150b4b 1251 outputContainer->Add(fhXEDecayNeutral) ;
1252 outputContainer->Add(fhZTDecayNeutral) ;
1253
e09cf5ef 1254 }
1255
547c2f01 1256 if(fMakeSeveralUE)
1257 {
e09cf5ef 1258 fhDeltaPhiUeLeftNeutral = new TH2F
babcbc9d 1259 ("hDeltaPhiUeLeftNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs p_{T h^{0}} with neutral UE left side range of trigger particles",
62f2fe4d 1260 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
e09cf5ef 1261 fhDeltaPhiUeLeftNeutral->SetYTitle("#Delta #phi");
1262 fhDeltaPhiUeLeftNeutral->SetXTitle("p_{T h^{0}} (GeV/c)");
1263 outputContainer->Add(fhDeltaPhiUeLeftNeutral) ;
1264
1265 fhDeltaPhiUeRightNeutral = new TH2F
babcbc9d 1266 ("hDeltaPhiUeRightNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs p_{T Ueh^{0}} with neutral UE right side range of trigger particles",
62f2fe4d 1267 nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
e09cf5ef 1268 fhDeltaPhiUeRightNeutral->SetYTitle("#Delta #phi");
1269 fhDeltaPhiUeRightNeutral->SetXTitle("p_{T h^{0}} (GeV/c)");
1270 outputContainer->Add(fhDeltaPhiUeRightNeutral) ;
1271
3f150b4b 1272 fhXEUeLeftNeutral =
1273 new TH2F("hXEUeNeutralLeft","x_{E} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE left side of trigger",
1274 nptbins,ptmin,ptmax,140,0.,2.);
1275 fhXEUeLeftNeutral->SetYTitle("z_{trigger Ueh^{0}}");
1276 fhXEUeLeftNeutral->SetXTitle("p_{T trigger}");
1277 outputContainer->Add(fhXEUeLeftNeutral) ;
1278
1279 fhXEUeRightNeutral =
1280 new TH2F("hXEUeNeutralRight","x_{E} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE right side of trigger",
1281 nptbins,ptmin,ptmax,200,0.,2.);
1282 fhXEUeRightNeutral->SetYTitle("z_{trigger Ueh^{0}}");
1283 fhXEUeRightNeutral->SetXTitle("p_{T trigger}");
1284 outputContainer->Add(fhXEUeRightNeutral) ;
1285
1286 fhPtHbpXEUeLeftNeutral =
1287 new TH2F("hHbpXEUeNeutralLeft","#xi = ln(1/x_{E}) with neutral UE left side of trigger",
1288 nptbins,ptmin,ptmax,200,0.,10.);
1289 fhPtHbpXEUeLeftNeutral->SetYTitle("ln(1/x_{E})");
1290 fhPtHbpXEUeLeftNeutral->SetXTitle("p_{T trigger}");
1291 outputContainer->Add(fhPtHbpXEUeLeftNeutral) ;
1292
1293 fhPtHbpXEUeRightNeutral =
1294 new TH2F("hHbpXEUeNeutralRight","#xi = ln(1/x_{E}) with neutral UE right side of trigger",
1295 nptbins,ptmin,ptmax,200,0.,10.);
1296 fhPtHbpXEUeRightNeutral->SetYTitle("ln(1/x_{E})");
1297 fhPtHbpXEUeRightNeutral->SetXTitle("p_{T trigger}");
1298 outputContainer->Add(fhPtHbpXEUeRightNeutral) ;
1299
1300 fhZTUeLeftNeutral =
1301 new TH2F("hZTUeNeutralLeft","z_{trigger h^{0}} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE left side of trigger",
e09cf5ef 1302 nptbins,ptmin,ptmax,140,0.,2.);
3f150b4b 1303 fhZTUeLeftNeutral->SetYTitle("z_{trigger Ueh^{0}}");
1304 fhZTUeLeftNeutral->SetXTitle("p_{T trigger}");
1305 outputContainer->Add(fhZTUeLeftNeutral) ;
e09cf5ef 1306
3f150b4b 1307 fhZTUeRightNeutral =
1308 new TH2F("hZTUeNeutralRight","z_{trigger h^{0}} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE right side of trigger",
e09cf5ef 1309 nptbins,ptmin,ptmax,200,0.,2.);
3f150b4b 1310 fhZTUeRightNeutral->SetYTitle("z_{trigger Ueh^{0}}");
1311 fhZTUeRightNeutral->SetXTitle("p_{T trigger}");
1312 outputContainer->Add(fhZTUeRightNeutral) ;
e09cf5ef 1313
3f150b4b 1314 fhPtHbpZTUeLeftNeutral =
1315 new TH2F("hHbpZTUeNeutralLeft","#xi = ln(1/z_{T}) with neutral UE left side of trigger",
e09cf5ef 1316 nptbins,ptmin,ptmax,200,0.,10.);
3f150b4b 1317 fhPtHbpZTUeLeftNeutral->SetYTitle("ln(1/z_{T})");
1318 fhPtHbpZTUeLeftNeutral->SetXTitle("p_{T trigger}");
1319 outputContainer->Add(fhPtHbpZTUeLeftNeutral) ;
e09cf5ef 1320
3f150b4b 1321 fhPtHbpZTUeRightNeutral =
1322 new TH2F("hHbpZTUeNeutralRight","#xi = ln(1/z_{T}) with neutral UE right side of trigger",
e09cf5ef 1323 nptbins,ptmin,ptmax,200,0.,10.);
3f150b4b 1324 fhPtHbpZTUeRightNeutral->SetYTitle("ln(1/z_{T})");
1325 fhPtHbpZTUeRightNeutral->SetXTitle("p_{T trigger}");
1326 outputContainer->Add(fhPtHbpZTUeRightNeutral) ;
e09cf5ef 1327
1328 }
fe871b21 1329
1330 }//Correlation with neutral hadrons
1331
1332 //if data is MC, fill more histograms
babcbc9d 1333 if(IsDataMC())
1334 {
1335 fh2phiLeadingParticle=new TH2F("h2phiLeadingParticle","#phi resolustion for trigger particles",nptbins,ptmin,ptmax,100,-1,1);
fe871b21 1336 fh2phiLeadingParticle->GetXaxis()->SetTitle("p_{T gen Leading} (GeV/c)");
1337 fh2phiLeadingParticle->GetYaxis()->SetTitle("(#phi_{rec}-#phi_{gen})/#phi_{gen}");
e09cf5ef 1338
fe871b21 1339 fhMCEtaCharged = new TH2F
babcbc9d 1340 ("hMCEtaCharged","MC #eta_{h^{#pm}} vs p_{T #pm}",
fe871b21 1341 nptbins,ptmin,ptmax,netabins,etamin,etamax);
1342 fhMCEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
1343 fhMCEtaCharged->SetXTitle("p_{T #pm} (GeV/c)");
1344
1345 fhMCPhiCharged = new TH2F
babcbc9d 1346 ("hMCPhiCharged","#MC phi_{h^{#pm}} vs p_{T #pm}",
fe871b21 1347 200,ptmin,ptmax,nphibins,phimin,phimax);
1348 fhMCPhiCharged->SetYTitle("MC #phi_{h^{#pm}} (rad)");
1349 fhMCPhiCharged->SetXTitle("p_{T #pm} (GeV/c)");
1350
1351 fhMCDeltaPhiDeltaEtaCharged = new TH2F
babcbc9d 1352 ("hMCDeltaPhiDeltaEtaCharged","#MC phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
fe871b21 1353 140,-2.,5.,200,-2,2);
1354 fhMCDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi");
1355 fhMCDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
1356
1357 fhMCDeltaEtaCharged = new TH2F
babcbc9d 1358 ("hMCDeltaEtaCharged","MC #eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger} and p_{T assoc}",
fe871b21 1359 nptbins,ptmin,ptmax,200,-2,2);
1360 fhMCDeltaEtaCharged->SetYTitle("#Delta #eta");
1361 fhMCDeltaEtaCharged->SetXTitle("p_{T trigger} (GeV/c)");
1362
1363 fhMCDeltaPhiCharged = new TH2F
babcbc9d 1364 ("hMCDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}",
62f2fe4d 1365 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
fe871b21 1366 fhMCDeltaPhiCharged->SetYTitle("#Delta #phi");
1367 fhMCDeltaPhiCharged->SetXTitle("p_{T trigger} (GeV/c)");
1368
1369 fhMCDeltaPhiChargedPt = new TH2F
babcbc9d 1370 ("hMCDeltaPhiChargedPt","MC #phi_{trigger} - #phi_{#h^{#pm}} vs p_{T h^{#pm}}",
62f2fe4d 1371 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
fe871b21 1372 fhMCDeltaPhiChargedPt->SetYTitle("#Delta #phi");
1373 fhMCDeltaPhiChargedPt->SetXTitle("p_{T h^{#pm}} (GeV/c)");
1374
3f150b4b 1375 fhMCPtXECharged =
1376 new TH2F("hMCPtXECharged","x_{E}",
fe871b21 1377 nptbins,ptmin,ptmax,200,0.,2.);
3f150b4b 1378 fhMCPtXECharged->SetYTitle("x_{E}");
1379 fhMCPtXECharged->SetXTitle("p_{T trigger}");
fe871b21 1380
3f150b4b 1381 fhMCPtHbpXECharged =
1382 new TH2F("hMCHbpXECharged","MC #xi = ln(1/x_{E}) with charged hadrons",
fe871b21 1383 nptbins,ptmin,ptmax,200,0.,10.);
3f150b4b 1384 fhMCPtHbpXECharged->SetYTitle("ln(1/x_{E})");
1385 fhMCPtHbpXECharged->SetXTitle("p_{T trigger}");
1386
1387 fhMCPtZTCharged =
1388 new TH2F("hMCPtZTCharged","z_{T}",
1389 nptbins,ptmin,ptmax,200,0.,2.);
1390 fhMCPtZTCharged->SetYTitle("z_{T}");
1391 fhMCPtZTCharged->SetXTitle("p_{T trigger}");
1392
1393 fhMCPtHbpZTCharged =
1394 new TH2F("hMCHbpZTCharged","MC #xi = ln(1/z_{T}) with charged hadrons",
1395 nptbins,ptmin,ptmax,200,0.,10.);
1396 fhMCPtHbpZTCharged->SetYTitle("ln(1/z_{T})");
1397 fhMCPtHbpZTCharged->SetXTitle("p_{T trigger}");
fe871b21 1398
1399 fhMCPtTrigPout =
babcbc9d 1400 new TH2F("hMCPtTrigPout","AOD MC Pout with triggers",
fe871b21 1401 nptbins,ptmin,ptmax,2*nptbins,-ptmax,ptmax);
1402 fhMCPtTrigPout->SetYTitle("p_{out} (GeV/c)");
1403 fhMCPtTrigPout->SetXTitle("p_{T trigger} (GeV/c)");
1404
1405 fhMCPtAssocDeltaPhi =
babcbc9d 1406 new TH2F("hMCPtAssocDeltaPhi","AOD MC delta phi with associated charged hadrons",
62f2fe4d 1407 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
fe871b21 1408 fhMCPtAssocDeltaPhi->SetYTitle("#Delta #phi");
1409 fhMCPtAssocDeltaPhi->SetXTitle("p_{T trigger} (GeV/c)");
1410
1411 outputContainer->Add(fh2phiLeadingParticle);
fe871b21 1412 outputContainer->Add(fhMCDeltaPhiDeltaEtaCharged);
1413 outputContainer->Add(fhMCPhiCharged) ;
1414 outputContainer->Add(fhMCEtaCharged) ;
1415 outputContainer->Add(fhMCDeltaEtaCharged) ;
1416 outputContainer->Add(fhMCDeltaPhiCharged) ;
1417
1418 outputContainer->Add(fhMCDeltaPhiChargedPt) ;
3f150b4b 1419 outputContainer->Add(fhMCPtXECharged) ;
1420 outputContainer->Add(fhMCPtZTCharged) ;
1421 outputContainer->Add(fhMCPtHbpXECharged) ;
1422 outputContainer->Add(fhMCPtHbpZTCharged) ;
fe871b21 1423 outputContainer->Add(fhMCPtTrigPout) ;
1424 outputContainer->Add(fhMCPtAssocDeltaPhi) ;
1425 } //for MC histogram
1426
2e876d85 1427 if(DoOwnMix())
029dea5a 1428 {
1429 //create event containers
2e876d85 1430 fListMixEvents= new TList*[GetNCentrBin()*GetNZvertBin()*GetNRPBin()] ;
029dea5a 1431
2e876d85 1432 for(Int_t ic=0; ic<GetNCentrBin(); ic++)
1433 {
1434 for(Int_t iz=0; iz<GetNZvertBin(); iz++)
1435 {
1436 for(Int_t irp=0; irp<GetNRPBin(); irp++)
1437 {
1438 //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n",
1439 // ic,iz, irp, ic*GetNZvertBin()*GetNRPBin()+iz*GetNRPBin()+irp,GetNZvertBin()*GetNRPBin()*GetNCentrBin());
1440 fListMixEvents[ic*GetNZvertBin()*GetNRPBin()+iz*GetNRPBin()+irp] = new TList() ;
1441 fListMixEvents[ic*GetNZvertBin()*GetNRPBin()+iz*GetNRPBin()+irp]->SetOwner(kFALSE);
1442 }
029dea5a 1443 }
1444 }
1445
2e876d85 1446 fhEventBin=new TH1I("hEventBin","Number of real events per bin(cen,vz,rp)",
1447 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
1448 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
1449 fhEventBin->SetXTitle("bin");
1450 outputContainer->Add(fhEventBin) ;
1451
1452 fhEventMixBin=new TH1I("hEventMixBin","Number of events per bin(cen,vz,rp)",
1453 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0,
1454 GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ;
1455 fhEventMixBin->SetXTitle("bin");
1456 outputContainer->Add(fhEventMixBin) ;
1457
029dea5a 1458 fhNtracksAll=new TH1F("hNtracksAll","Number of tracks w/o event trigger",2000,0,2000);
1459 outputContainer->Add(fhNtracksAll);
1460
1461 fhNtracksTrigger=new TH1F("hNtracksTriggerEvent","Number of tracks w/ event trigger",2000,0,2000);
1462 outputContainer->Add(fhNtracksTrigger);
1463
2e876d85 1464 fhNtracksMB=new TH1F("hNtracksMBEvent","Number of tracks w/ event trigger kMB",2000,0,2000);
1465 outputContainer->Add(fhNtracksMB);
029dea5a 1466
1467 fhMixDeltaPhiCharged = new TH2F
1468 ("hMixDeltaPhiCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}",
62f2fe4d 1469 nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax);
029dea5a 1470 fhMixDeltaPhiCharged->SetYTitle("#Delta #phi");
1471 fhMixDeltaPhiCharged->SetXTitle("p_{T trigger} (GeV/c)");
1472 outputContainer->Add(fhMixDeltaPhiCharged);
1473
1474 fhMixDeltaPhiDeltaEtaCharged = new TH2F
1475 ("hMixDeltaPhiDeltaEtaCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
62f2fe4d 1476 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
029dea5a 1477 fhMixDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi");
1478 fhMixDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
1479 outputContainer->Add(fhMixDeltaPhiDeltaEtaCharged);
1480
1481 fhMixDeltaPhiChargedAssocPtBin = new TH2F*[fNAssocPtBins] ;
1482 fhMixDeltaPhiDeltaEtaChargedAssocPtBin = new TH2F*[fNAssocPtBins] ;
1483
1484 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
1485 {
1486 fhMixDeltaPhiChargedAssocPtBin[i] = new TH2F(Form("hMixDeltaPhiChargedAssocPtBin%2.1f_%2.1f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
1487 Form("Mixed event #Delta #phi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
62f2fe4d 1488 nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax);
029dea5a 1489 fhMixDeltaPhiChargedAssocPtBin[i]->SetXTitle("p_{T trigger}");
1490 fhMixDeltaPhiChargedAssocPtBin[i]->SetYTitle("#Delta #phi");
1491
1492 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[i] = new TH2F(Form("hMixDeltaPhiDeltaEtaChargedAssocPtBin%2.1f_%2.1f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
1493 Form("Mixed event #Delta #phi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
62f2fe4d 1494 ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax);
029dea5a 1495 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[i]->SetXTitle("#Delta #phi");
1496 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[i]->SetYTitle("#Delta #eta");
1497
1498 outputContainer->Add(fhMixDeltaPhiChargedAssocPtBin[i]);
1499 outputContainer->Add(fhMixDeltaPhiDeltaEtaChargedAssocPtBin[i]);
1500
050ad675 1501 }
029dea5a 1502 }
050ad675 1503
e09cf5ef 1504 return outputContainer;
1505
1506}
1507
907b38cd 1508//_________________________________________________________________________________________________
1509Bool_t AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum(const AliAODPWG4Particle* trigger,
1510 TLorentzVector & mom1,
1511 TLorentzVector & mom2)
1512{
1513 // Get the momentum of the pi0/eta assigned decay photons
1514 // In case of pi0/eta trigger, we may want to check their decay correlation,
1515 // get their decay children
1516
1517 Int_t indexPhoton1 = trigger->GetCaloLabel(0);
1518 Int_t indexPhoton2 = trigger->GetCaloLabel(1);
1519 Float_t ptTrig = trigger->Pt();
1520
1521 if(indexPhoton1!=-1 || indexPhoton2!=-1) return kFALSE;
1522
1523 if(GetDebug() > 1)
1524 printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - indexPhoton1 = %d, indexPhoton2 = %d \n", indexPhoton1, indexPhoton2);
1525
1526 TObjArray * clusters = 0x0 ;
1527 if(trigger->GetDetector()=="EMCAL") clusters = GetEMCALClusters() ;
1528 else clusters = GetPHOSClusters() ;
1529
1530 for(Int_t iclus = 0; iclus < clusters->GetEntriesFast(); iclus++)
1531 {
1532 AliVCluster * photon = (AliVCluster*) (clusters->At(iclus));
1533 if(photon->GetID()==indexPhoton1)
1534 {
1535 photon->GetMomentum(mom1,GetVertex(0)) ;
1536 if(ptTrig) fhPtPi0DecayRatio->Fill(ptTrig, mom1.Pt()/ptTrig);
1537 }
1538 if(photon->GetID()==indexPhoton2)
1539 {
1540 photon->GetMomentum(mom1,GetVertex(0)) ;
1541 if(ptTrig > 0) fhPtPi0DecayRatio->Fill(ptTrig, mom2.Pt()/ptTrig);
1542 }
1543
1544 if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - Photon1 = %f, Photon2 = %f \n", mom1.Pt(), mom2.Pt());
1545
1546 } //cluster loop
1547
1548 return kTRUE;
1549
1550}
1551
05d0d05d 1552//____________________________________________________
e09cf5ef 1553void AliAnaParticleHadronCorrelation::InitParameters()
1554{
1555
1556 //Initialize the parameters of the analysis.
1557 SetInputAODName("PWG4Particle");
1558 SetAODObjArrayName("Hadrons");
1559 AddToHistogramsName("AnaHadronCorr_");
045396c8 1560
e09cf5ef 1561 SetPtCutRange(0.,300);
045396c8 1562 fDeltaPhiMinCut = 1.5 ;
1563 fDeltaPhiMaxCut = 4.5 ;
1564 fSelectIsolated = kFALSE;
1565 fMakeSeveralUE = kFALSE;
1566 fUeDeltaPhiMinCut = 1. ;
1567 fUeDeltaPhiMaxCut = 1.5 ;
907b38cd 1568
045396c8 1569 fNeutralCorr = kFALSE ;
1570 fPi0Trigger = kFALSE ;
907b38cd 1571 fDecayTrigger = kFALSE ;
1572 fHMPIDCorrelation = kFALSE ;
045396c8 1573
3f150b4b 1574 fMakeAbsoluteLeading = kTRUE;
1575 fMakeNearSideLeading = kFALSE;
1576
050ad675 1577 fNAssocPtBins = 9 ;
1578 fAssocPtBinLimit[0] = 0.2 ;
1579 fAssocPtBinLimit[1] = 2.0 ;
1580 fAssocPtBinLimit[2] = 4.0 ;
1581 fAssocPtBinLimit[3] = 6.0 ;
1582 fAssocPtBinLimit[4] = 8.0 ;
1583 fAssocPtBinLimit[5] = 10. ;
1584 fAssocPtBinLimit[6] = 12. ;
1585 fAssocPtBinLimit[7] = 15. ;
1586 fAssocPtBinLimit[8] = 25. ;
1587 fAssocPtBinLimit[9] = 50. ;
045396c8 1588
e09cf5ef 1589}
1590
05d0d05d 1591//__________________________________________________________
e09cf5ef 1592void AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD()
1593{
1594 //Particle-Hadron Correlation Analysis, fill AODs
1595
547c2f01 1596 if(!GetInputAODBranch())
1597 {
e09cf5ef 1598 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data());
1599 abort();
1600 }
1601
547c2f01 1602 if(strcmp(GetInputAODBranch()->GetClass()->GetName(), "AliAODPWG4ParticleCorrelation"))
1603 {
e09cf5ef 1604 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - Wrong type of AOD object, change AOD class name in input AOD: It should be <AliAODPWG4ParticleCorrelation> and not <%s> \n",GetInputAODBranch()->GetClass()->GetName());
1605 abort();
1606 }
1607
1608 if(GetDebug() > 1){
1609 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - Begin hadron correlation analysis, fill AODs \n");
1610 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In particle branch aod entries %d\n", GetInputAODBranch()->GetEntriesFast());
66e64043 1611 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In CTS aod entries %d\n", GetCTSTracks() ->GetEntriesFast());
e09cf5ef 1612 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In EMCAL aod entries %d\n", GetEMCALClusters()->GetEntriesFast());
66e64043 1613 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In PHOS aod entries %d\n", GetPHOSClusters() ->GetEntriesFast());
e09cf5ef 1614 }
1615
045396c8 1616 //Get the vertex and check it is not too large in z
1617 Double_t v[3] = {0,0,0}; //vertex ;
1618 GetReader()->GetVertex(v);
1619 if(!GetMixedEvent() && TMath::Abs(v[2]) > GetZvertexCut()) return ;
1620
029dea5a 1621 // Fill the pool with tracks if requested
2e876d85 1622 if(DoOwnMix()) FillChargedEventMixPool();
029dea5a 1623
045396c8 1624 //Loop on stored AOD particles, find leading trigger
66e64043 1625 Double_t ptTrig = fMinTriggerPt ;
045396c8 1626 fLeadingTriggerIndex = -1 ;
1627 Int_t naod = GetInputAODBranch()->GetEntriesFast() ;
04f7a616 1628 for(Int_t iaod = 0; iaod < naod ; iaod++)
1629 {
e09cf5ef 1630 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
045396c8 1631
04f7a616 1632 // Vertex cut in case of mixing
1633 Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0));
1634 if(check == 0) continue;
1635 if(check == -1) return;
1636
045396c8 1637 // find the leading particles with highest momentum
547c2f01 1638 if (particle->Pt() > ptTrig)
1639 {
045396c8 1640 ptTrig = particle->Pt() ;
1641 fLeadingTriggerIndex = iaod ;
1642 }
1643 }// finish search of leading trigger particle
e09cf5ef 1644
66e64043 1645
e09cf5ef 1646 //Do correlation with leading particle
547c2f01 1647 if(fLeadingTriggerIndex >= 0)
1648 {
e09cf5ef 1649
045396c8 1650 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(fLeadingTriggerIndex));
1651
1652 //check if the particle is isolated or if we want to take the isolation into account
1653 if(OnlyIsolated() && !particle->IsIsolated()) return;
1654
e09cf5ef 1655 //Make correlation with charged hadrons
045396c8 1656 Bool_t okcharged = kTRUE;
1657 Bool_t okneutral = kTRUE;
e09cf5ef 1658 if(GetReader()->IsCTSSwitchedOn() )
045396c8 1659 okcharged = MakeChargedCorrelation(particle, GetCTSTracks(),kFALSE);
e09cf5ef 1660
1661 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); //For the future, foresee more possible pi0 lists
1662 if(fNeutralCorr && pi0list && pi0list->GetEntriesFast() > 0)
045396c8 1663 okneutral = MakeNeutralCorrelation(particle, pi0list,kFALSE);
e09cf5ef 1664
1665 }//Correlate leading
1666
1667 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - End fill AODs \n");
1668
1669}
1670
05d0d05d 1671//_________________________________________________________________
e09cf5ef 1672void AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms()
1673{
1674 //Particle-Hadron Correlation Analysis, fill histograms
1675
3f150b4b 1676 if(!GetInputAODBranch())
1677 {
e09cf5ef 1678 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data());
1679 abort();
1680 }
1681
3f150b4b 1682 if(GetDebug() > 1)
1683 {
e09cf5ef 1684 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Begin hadron correlation analysis, fill histograms \n");
1685 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In particle branch aod entries %d\n", GetInputAODBranch()->GetEntriesFast());
1686 }
babcbc9d 1687
e09cf5ef 1688 //Get the vertex and check it is not too large in z
1689 Double_t v[3] = {0,0,0}; //vertex ;
1690 GetReader()->GetVertex(v);
1691 if(!GetMixedEvent() && TMath::Abs(v[2]) > GetZvertexCut()) return ;
1692
1693 //Loop on stored AOD particles, find leading
66e64043 1694 Double_t ptTrig = fMinTriggerPt;
04f7a616 1695 if(fLeadingTriggerIndex < 0)
1696 {
1697 //Search leading if not done before
045396c8 1698 Int_t naod = GetInputAODBranch()->GetEntriesFast() ;
547c2f01 1699 for(Int_t iaod = 0; iaod < naod ; iaod++)
1700 { //loop on input trigger AOD file
045396c8 1701 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
04f7a616 1702
1703 // Vertex cut in case of mixing
1704 Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0));
1705 if(check == 0) continue;
1706 if(check == -1) return;
1707
045396c8 1708 //check if the particle is isolated or if we want to take the isolation into account
1709 if(OnlyIsolated() && !particle->IsIsolated()) continue;
e09cf5ef 1710
045396c8 1711 //find the leading particles with highest momentum
547c2f01 1712 if (particle->Pt() > ptTrig)
1713 {
045396c8 1714 ptTrig = particle->Pt() ;
1715 fLeadingTriggerIndex = iaod ;
e09cf5ef 1716 }
547c2f01 1717
1718 }// Finish search of leading trigger particle
1719 }// Search leading if not done before
045396c8 1720
547c2f01 1721 if(fLeadingTriggerIndex >= 0 )
1722 { //using trigger particle to do correlations
1723
045396c8 1724 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(fLeadingTriggerIndex));
06d3bad7 1725
547c2f01 1726 // Check if trigger is in fiducial region
1727 if(IsFiducialCutOn())
1728 {
1729 Bool_t in = GetFiducialCut()->IsInFiducialCut(*particle->Momentum(),particle->GetDetector()) ;
1730 if(! in ) return ;
1731 }
1732
1733 // Check if the particle is isolated or if we want to take the isolation into account
045396c8 1734 if(OnlyIsolated() && !particle->IsIsolated()) return;
e09cf5ef 1735
547c2f01 1736 // Make correlation with charged hadrons
045396c8 1737 Bool_t okcharged = kTRUE;
1738 Bool_t okneutral = kTRUE;
547c2f01 1739 if(GetReader()->IsCTSSwitchedOn() )
1740 {
045396c8 1741 okcharged = MakeChargedCorrelation(particle, GetCTSTracks(),kTRUE);
547c2f01 1742 if(IsDataMC())
1743 {
045396c8 1744 MakeMCChargedCorrelation(particle);
1745 }
a5f1e836 1746 }
1747
e09cf5ef 1748 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); //For the future, foresee more possible pi0 lists
547c2f01 1749 if(fNeutralCorr && pi0list)
1750 {
a5f1e836 1751 if(pi0list->GetEntriesFast() > 0)
1752 okneutral = MakeNeutralCorrelation(particle, pi0list,kTRUE);
1753 }
e09cf5ef 1754
045396c8 1755 // Fill leading particle histogram if correlation went well and
1756 // no problem was found, like not absolute leading, or bad vertex in mixing.
547c2f01 1757 if(okcharged && okneutral)
1758 {
045396c8 1759 fhPtLeading->Fill(particle->Pt());
1760 Float_t phi = particle->Phi();
1761 if(phi<0)phi+=TMath::TwoPi();
1762 fhPhiLeading->Fill(particle->Pt(), phi);
1763 fhEtaLeading->Fill(particle->Pt(), particle->Eta());
1764 }//ok charged && neutral
e09cf5ef 1765 }//Aod branch loop
1766
045396c8 1767 //Reinit for next event
1768 fLeadingTriggerIndex = -1;
e09cf5ef 1769
045396c8 1770 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - End fill histograms \n");
e09cf5ef 1771}
1772
c5693f62 1773//___________________________________________________________________________________________________________
045396c8 1774Bool_t AliAnaParticleHadronCorrelation::MakeChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle,
c5693f62 1775 const TObjArray* pl, const Bool_t bFillHisto)
e09cf5ef 1776{
1777 // Charged Hadron Correlation Analysis
907b38cd 1778 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Make trigger particle - charged hadron correlation \n");
1779
1780 Float_t phiTrig = aodParticle->Phi();
1781 Float_t etaTrig = aodParticle->Eta();
1782 Float_t ptTrig = aodParticle->Pt();
1783 Bool_t decay = aodParticle->IsTagged();
1784
1785 Float_t pt = -100. ;
1786 Float_t zT = -100. ;
1787 Float_t xE = -100. ;
1788 Float_t hbpXE = -100. ;
1789 Float_t hbpZT = -100. ;
1790 Float_t phi = -100. ;
1791 Float_t eta = -100. ;
1792 Float_t pout = -100. ;
1793 Float_t deltaPhi = -100. ;
e09cf5ef 1794
907b38cd 1795 TVector3 p3;
1796 TLorentzVector photonMom ;
1797 TObjArray * reftracks = 0x0;
1798 Int_t nrefs = 0;
1799 Int_t nTracks = GetCTSTracks()->GetEntriesFast() ;
1800
1801 // Mixed event settings
1802 Int_t evtIndex11 = -1 ; // cluster trigger or pi0 trigger
045396c8 1803 Int_t evtIndex12 = -1 ; // pi0 trigger
1804 Int_t evtIndex13 = -1 ; // charged trigger
045396c8 1805
1806 Double_t v[3] = {0,0,0}; //vertex ;
e09cf5ef 1807 GetReader()->GetVertex(v);
e09cf5ef 1808
04f7a616 1809 if (GetMixedEvent())
1810 {
e09cf5ef 1811 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
1812 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
1813 evtIndex13 = GetMixedEvent()->EventIndex(aodParticle->GetTrackLabel(0)) ;
1814 }
1815
907b38cd 1816 // In case of pi0/eta trigger, we may want to check their decay correlation,
1817 // get their decay children
1818 TLorentzVector decayMom1;
1819 TLorentzVector decayMom2;
1820 Bool_t decayFound = kFALSE;
1821 if(fPi0Trigger && bFillHisto) decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
1822
1823 //-----------------------------------------------------------------------
e09cf5ef 1824 //Track loop, select tracks with good pt, phi and fill AODs or histograms
907b38cd 1825 //-----------------------------------------------------------------------
1826
547c2f01 1827 for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ )
1828 {
e09cf5ef 1829 AliVTrack * track = (AliVTrack *) (pl->At(ipr)) ;
045396c8 1830
e09cf5ef 1831 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
1832 p3.SetXYZ(mom[0],mom[1],mom[2]);
1833 pt = p3.Pt();
e09cf5ef 1834 eta = p3.Eta();
1835 phi = p3.Phi() ;
1836 if(phi < 0) phi+=TMath::TwoPi();
045396c8 1837
e09cf5ef 1838 //Select only hadrons in pt range
66e64043 1839 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
1840
e09cf5ef 1841 //remove trigger itself for correlation when use charged triggers
1842 if( track->GetID() == aodParticle->GetTrackLabel(0) || track->GetID() == aodParticle->GetTrackLabel(1) ||
66e64043 1843 track->GetID() == aodParticle->GetTrackLabel(2) || track->GetID() == aodParticle->GetTrackLabel(3) )
045396c8 1844 continue ;
1845
045396c8 1846 //jump out this event if near side associated particle pt larger than trigger
3f150b4b 1847 if (fMakeNearSideLeading)
547c2f01 1848 {
3f150b4b 1849 if(pt > ptTrig && TMath::Abs(phi-phiTrig) < TMath::PiOver2()) return kFALSE;
1850 }
1851 //jump out this event if there is any other particle with pt larger than trigger
1852 else if(fMakeAbsoluteLeading)
1853 {
1854 if(pt > ptTrig) return kFALSE;
045396c8 1855 }
1856
1857 //Only for mixed event
1858 Int_t evtIndex2 = 0 ;
04f7a616 1859 if (GetMixedEvent())
1860 {
045396c8 1861 evtIndex2 = GetMixedEvent()->EventIndex(track->GetID()) ;
1862 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 || evtIndex13 == evtIndex2 ) // photon and track from different events
1863 continue ;
1864 //vertex cut
1865 if (TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut())
1866 return kFALSE;
1867 }
1868
045396c8 1869 // Fill Histograms
3f150b4b 1870 if(bFillHisto)
907b38cd 1871 {
66e64043 1872
907b38cd 1873 if(GetDebug() > 2 ) printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
1874
1875 // Set the pt associated bin for the defined bins
1876 Int_t assocBin = -1;
1877 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
547c2f01 1878 {
907b38cd 1879 if(pt > fAssocPtBinLimit[i] && pt < fAssocPtBinLimit[i+1]) assocBin= i;
1880 }
66e64043 1881
907b38cd 1882 // Azimuthal Angle
1883 // calculate deltaPhi for later, shift when needed
1884 FillChargedAngularCorrelationHistograms(pt, ptTrig, assocBin, phi, phiTrig, deltaPhi,
1885 eta, etaTrig, decay, track->GetHMPIDsignal(),nTracks);
05d0d05d 1886
907b38cd 1887 // Imbalance zT/xE/pOut
1888 zT = pt/ptTrig ;
2e876d85 1889 if(zT > 0 ) hbpZT = TMath::Log10(1./zT);
907b38cd 1890 else hbpZT =-100;
e09cf5ef 1891
907b38cd 1892 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
1893 //if(xE <0.)xE =-xE;
2e876d85 1894 if(xE > 0 ) hbpXE = TMath::Log10(1./xE);
907b38cd 1895 else hbpXE =-100;
1896
1897 pout = pt*TMath::Sin(deltaPhi) ;
66e64043 1898
907b38cd 1899 //delta phi cut for momentum imbalance correlation
547c2f01 1900 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
1901 {
3f150b4b 1902
907b38cd 1903 FillChargedMomentumImbalanceHistograms(ptTrig, pt, xE, hbpXE, zT, hbpZT, pout, deltaPhi,
1904 nTracks, track->Charge(), assocBin, decay);
3f150b4b 1905
907b38cd 1906 }
547c2f01 1907 else if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
1908 { //UE study
3f150b4b 1909
907b38cd 1910 FillChargedUnderlyingEventHistograms(ptTrig, pt, deltaPhi, nTracks);
3f150b4b 1911
907b38cd 1912 }
e09cf5ef 1913
907b38cd 1914 if(fPi0Trigger && decayFound)
1915 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2, kTRUE) ;
e09cf5ef 1916
1917 //several UE calculation
907b38cd 1918 if(fMakeSeveralUE) FillChargedUnderlyingEventSidesHistograms(ptTrig,pt,xE,hbpXE,zT,hbpZT,deltaPhi);
1919
e09cf5ef 1920 } //Fill histogram
547c2f01 1921 else
1922 {
e09cf5ef 1923 nrefs++;
547c2f01 1924 if(nrefs==1)
1925 {
e09cf5ef 1926 reftracks = new TObjArray(0);
045396c8 1927 TString trackname = Form("%s+Tracks", GetAODObjArrayName().Data());
1928 reftracks->SetName(trackname.Data());
029dea5a 1929 reftracks->SetOwner(kFALSE);
e09cf5ef 1930 }
029dea5a 1931
e09cf5ef 1932 reftracks->Add(track);
029dea5a 1933
e09cf5ef 1934 }//aod particle loop
1935 }// track loop
1936
1937 //Fill AOD with reference tracks, if not filling histograms
547c2f01 1938 if(!bFillHisto && reftracks)
1939 {
e09cf5ef 1940 aodParticle->AddObjArray(reftracks);
1941 }
1942
029dea5a 1943 //Own mixed event, add event and remove previous or fill the mixed histograms
2e876d85 1944 if(DoOwnMix() && bFillHisto)
029dea5a 1945 {
1946 MakeChargedMixCorrelation(aodParticle);
1947 }
1948
045396c8 1949 return kTRUE;
e09cf5ef 1950
1951}
1952
029dea5a 1953
1954//______________________________________________________________________________________________________________________
1955void AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
1956{
2e876d85 1957 // Mix current trigger with tracks in another MB event
029dea5a 1958
2e876d85 1959 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Make trigger particle - charged hadron mixed event correlation \n");
029dea5a 1960
1961 if(GetMixedEvent()) return; // This is not the mixed event from general mixing frame
1962
029dea5a 1963 // Get the event with similar caracteristics
2e876d85 1964 //printf("MakeChargedMixCorrelation for %s\n",GetInputAODName().Data());
1965
1966 AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager();
1967 AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler());
1968
1969 if(!(inputHandler->IsEventSelected( ) & GetReader()->GetEventTriggerMask())) return;
029dea5a 1970
1971 // Get the pool, check if it exits
2e876d85 1972 Int_t eventBin = GetEventMixBin();
1973
1974 fhEventBin->Fill(eventBin);
029dea5a 1975
2e876d85 1976 //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing
1977 if(eventBin < 0) return;
029dea5a 1978
2e876d85 1979 TList * pool = fListMixEvents[eventBin];
1980
1981 if(!pool) return ;
029dea5a 1982
1983 Double_t ptTrig = aodParticle->Pt();
1984 Double_t etaTrig = aodParticle->Eta();
1985 Double_t phiTrig = aodParticle->Phi();
1986 if(phiTrig < 0.) phiTrig+=TMath::TwoPi();
1987
2e876d85 1988 if(GetDebug() > 1)
1989 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Pool bin %d size %d, Pool event? %d, leading trigger pt=%f, phi=%f, eta=%f\n",
1990 eventBin,pool->GetSize(), fIsPoolEvent, ptTrig,phiTrig,etaTrig);
029dea5a 1991
1992 Double_t ptAssoc = -999.;
2e876d85 1993 Double_t phiAssoc = -999.;
029dea5a 1994 Double_t etaAssoc = -999.;
1995 Double_t deltaPhi = -999.;
1996 Double_t deltaEta = -999.;
1997
2e876d85 1998 //Start from first event in pool except if in this same event the pool was filled
1999 for(Int_t ev=fIsPoolEvent; ev < pool->GetSize(); ev++)
029dea5a 2000 {
2001 TObjArray* bgTracks = static_cast<TObjArray*>(pool->At(ev));
2002
2e876d85 2003 fhEventMixBin->Fill(eventBin);
029dea5a 2004
2e876d85 2005 Int_t nTracks=bgTracks->GetEntriesFast();
2006 //printf("\t Read Pool event %d, nTracks %d\n",ev,nTracks);
2007
029dea5a 2008 for(Int_t j1 = 0;j1 <nTracks; j1++ )
2009 {
2010 AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(j1) ;
2011
2012 if(!track) continue;
2013
2014 ptAssoc = track->Pt();
2015 etaAssoc = track->Eta();
2016 phiAssoc = track->Phi() ;
2017 if(phiAssoc < 0) phiAssoc+=TMath::TwoPi();
2e876d85 2018
029dea5a 2019 if(IsFiducialCutOn())
2020 {
2021 Bool_t in = GetFiducialCut()->IsInFiducialCut(*aodParticle->Momentum(),"CTS") ;
2022 if(!in) continue ;
2023 }
2024
2025 deltaPhi = phiTrig-phiAssoc;
2026 if(deltaPhi < -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
2027 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
2028 deltaEta = etaTrig-etaAssoc;
2029
2030 if(GetDebug()>0)
2031 printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation(): deltaPhi= %f, deltaEta=%f\n",deltaPhi, deltaEta);
2032
2033 // Set the pt associated bin for the defined bins
2034 Int_t assocBin = -1;
2035 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
2036 {
2037 if(ptAssoc > fAssocPtBinLimit[i] && ptAssoc < fAssocPtBinLimit[i+1]) assocBin= i;
2038 }
2039
2040 fhMixDeltaPhiCharged ->Fill(ptTrig, deltaPhi);
2041 fhMixDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta);
2042
2043 if(assocBin < 0) continue ; // this pt bin was not considered
2044
2045 fhMixDeltaPhiChargedAssocPtBin[assocBin] ->Fill(ptTrig, deltaPhi);
2046 fhMixDeltaPhiDeltaEtaChargedAssocPtBin[assocBin]->Fill(deltaPhi, deltaEta);
2047
2048 } // track loop
2049 } // mixed event loop
2050}
2051
2052
05d0d05d 2053//________________________________________________________________________________________________________________
045396c8 2054Bool_t AliAnaParticleHadronCorrelation::MakeNeutralCorrelation(AliAODPWG4ParticleCorrelation * const aodParticle,
c5693f62 2055 const TObjArray* pi0list, const Bool_t bFillHisto)
e09cf5ef 2056{
2057 // Neutral Pion Correlation Analysis
907b38cd 2058 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Make trigger particle - pi0 correlation, %d pi0's \n",
2059 pi0list->GetEntriesFast());
e09cf5ef 2060
2061 Int_t evtIndex11 = 0 ;
2062 Int_t evtIndex12 = 0 ;
04f7a616 2063 if (GetMixedEvent())
2064 {
e09cf5ef 2065 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
2066 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
2067 }
2068
907b38cd 2069 Float_t pt = -100. ;
2070 Float_t zT = -100. ;
2071 Float_t phi = -100. ;
2072 Float_t eta = -100. ;
2073 Float_t xE = -100. ;
2074 Float_t hbpXE= -100. ;
2075 Float_t hbpZT= -100. ;
2076
2077 Float_t ptTrig = aodParticle->Pt();
2078 Float_t phiTrig = aodParticle->Phi();
2079 Float_t etaTrig = aodParticle->Eta();
2080 Float_t deltaPhi= -100. ;
3f150b4b 2081
045396c8 2082 TLorentzVector photonMom ;
2083
907b38cd 2084 // In case of pi0/eta trigger, we may want to check their decay correlation,
2085 // get their decay children
2086 TLorentzVector decayMom1;
2087 TLorentzVector decayMom2;
2088 Bool_t decayFound = kFALSE;
2089 if(fPi0Trigger && bFillHisto) decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
e09cf5ef 2090
907b38cd 2091 TObjArray * refpi0 = 0x0;
2092 Int_t nrefs = 0;
e09cf5ef 2093
2094 //Loop on stored AOD pi0
547c2f01 2095
e09cf5ef 2096 Int_t naod = pi0list->GetEntriesFast();
045396c8 2097 if(GetDebug() > 0)
2098 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillHistograms() - aod branch entries %d\n", naod);
547c2f01 2099
2100 for(Int_t iaod = 0; iaod < naod ; iaod++)
2101 {
e09cf5ef 2102 AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (pi0list->At(iaod));
2103
2104 Int_t evtIndex2 = 0 ;
2105 Int_t evtIndex3 = 0 ;
04f7a616 2106 if (GetMixedEvent())
2107 {
e09cf5ef 2108 evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(0)) ;
2109 evtIndex3 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(1)) ;
2110
045396c8 2111 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 ||
2112 evtIndex11 == evtIndex3 || evtIndex12 == evtIndex3) // trigger and pi0 are not from different events
e09cf5ef 2113 continue ;
2114 }
907b38cd 2115
e09cf5ef 2116 pt = pi0->Pt();
907b38cd 2117
66e64043 2118 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
2119
907b38cd 2120 //jump out this event if near side associated particle pt larger than trigger
2121 if (fMakeNearSideLeading)
2122 {
2123 if(pt > ptTrig && TMath::Abs(phi-phiTrig) < TMath::PiOver2()) return kFALSE;
2124 }
2125 //jump out this event if there is any other particle with pt larger than trigger
2126 else if(fMakeAbsoluteLeading)
2127 {
2128 if(pt > ptTrig) return kFALSE;
2129 }
e09cf5ef 2130
547c2f01 2131 if(bFillHisto)
2132 {
e09cf5ef 2133 phi = pi0->Phi() ;
2134 eta = pi0->Eta() ;
907b38cd 2135
2136 FillNeutralAngularCorrelationHistograms(pt, ptTrig, phi, phiTrig, deltaPhi, eta, etaTrig);
2137
3f150b4b 2138 zT = pt/ptTrig ;
2139 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
2140
66e64043 2141 //if(xE <0.)xE =-xE;
e09cf5ef 2142
3f150b4b 2143 hbpXE = -100;
2144 hbpZT = -100;
907b38cd 2145
2e876d85 2146 if(xE > 0 ) hbpXE = TMath::Log10(1./xE);
2147 if(zT > 0 ) hbpZT = TMath::Log10(1./zT);
e09cf5ef 2148
907b38cd 2149 if(fPi0Trigger && decayFound)
2150 FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2,kFALSE) ;
e09cf5ef 2151
2152 //delta phi cut for correlation
547c2f01 2153 if( (deltaPhi > fDeltaPhiMinCut) && ( deltaPhi < fDeltaPhiMaxCut) )
2154 {
045396c8 2155 fhDeltaPhiNeutralPt->Fill(pt,deltaPhi);
3f150b4b 2156 fhXENeutral ->Fill(ptTrig,xE);
2157 fhPtHbpXENeutral ->Fill(ptTrig,hbpXE);
e09cf5ef 2158 }
907b38cd 2159 else if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
547c2f01 2160 {
045396c8 2161 fhDeltaPhiUeNeutralPt->Fill(pt,deltaPhi);
3f150b4b 2162 fhXEUeNeutral ->Fill(ptTrig,xE);
2163 fhPtHbpXEUeNeutral ->Fill(ptTrig,hbpXE);
e09cf5ef 2164 }
907b38cd 2165
e09cf5ef 2166 //several UE calculation
907b38cd 2167 if(fMakeSeveralUE) FillChargedUnderlyingEventSidesHistograms(ptTrig,pt,xE,hbpXE,zT,hbpZT,deltaPhi);
2168
e09cf5ef 2169 }
547c2f01 2170 else
2171 {
e09cf5ef 2172 nrefs++;
547c2f01 2173 if(nrefs==1)
2174 {
e09cf5ef 2175 refpi0 = new TObjArray(0);
2176 refpi0->SetName(GetAODObjArrayName()+"Pi0s");
2177 refpi0->SetOwner(kFALSE);
2178 }
2179 refpi0->Add(pi0);
2180 }//put references in trigger AOD
045396c8 2181
2182 if(GetDebug() > 2 )
2183 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Selected neutral for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
2184
2185 }//loop
2186
2187 return kTRUE;
2188}
2189
05d0d05d 2190//_________________________________________________________________________________________________________
045396c8 2191void AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
2192{
2193 // Charged Hadron Correlation Analysis with MC information
a426f453 2194
045396c8 2195 if(GetDebug()>1)
2196 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation() - Make trigger particle - charged hadron correlation in AOD MC level\n");
2197
2198 AliStack * stack = 0x0 ;
2199 TParticle * primary = 0x0 ;
2200 TClonesArray * mcparticles0 = 0x0 ;
2201 TClonesArray * mcparticles = 0x0 ;
2202 AliAODMCParticle * aodprimary = 0x0 ;
2203
2204 Double_t eprim = 0 ;
2205 Double_t ptprim = 0 ;
2206 Double_t phiprim = 0 ;
2207 Double_t etaprim = 0 ;
045396c8 2208 Int_t nTracks = 0 ;
2209 Int_t iParticle = 0 ;
2210 Double_t charge = 0.;
66e64043 2211
547c2f01 2212 if(GetReader()->ReadStack())
2213 {
045396c8 2214 nTracks = GetMCStack()->GetNtrack() ;
2215 }
547c2f01 2216 else
2217 {
2218 nTracks = GetReader()->GetAODMCParticles()->GetEntriesFast() ;
2219 }
045396c8 2220 //Int_t trackIndex[nTracks];
2221
2222 Int_t label= aodParticle->GetLabel();
a426f453 2223 if(label < 0)
2224 {
2225 if(GetDebug() > 0) printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** bad label ***: label %d \n", label);
045396c8 2226 return;
2227 }
2228
547c2f01 2229 if(GetReader()->ReadStack())
2230 {
045396c8 2231 stack = GetMCStack() ;
2e876d85 2232 if(!stack)
2233 {
045396c8 2234 printf(" AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation- Stack not available, is the MC handler called? STOP\n");
2235 abort();
2236 }
2237
2238 nTracks=stack->GetNprimary();
547c2f01 2239 if(label >= stack->GetNtrack())
2240 {
045396c8 2241 if(GetDebug() > 2) printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** large label ***: label %d, n tracks %d \n", label, stack->GetNtrack());
2242 return ;
2243 }
547c2f01 2244
045396c8 2245 primary = stack->Particle(label);
547c2f01 2246 if(!primary)
2247 {
045396c8 2248 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** no primary ***: label %d \n", label);
2249 return;
2250 }
2251
547c2f01 2252 if(primary)
2253 {
2747966a 2254 eprim = primary->Energy();
2255 ptprim = primary->Pt();
2256 phiprim = primary->Phi();
2257 etaprim = primary->Eta();
2747966a 2258
2259 if(ptprim < 0.01 || eprim < 0.01) return ;
2260
547c2f01 2261 for (iParticle = 0 ; iParticle < nTracks ; iParticle++)
2262 {
045396c8 2263 TParticle * particle = stack->Particle(iParticle);
2264 TLorentzVector momentum;
3f150b4b 2265
045396c8 2266 //keep only final state particles
2267 if(particle->GetStatusCode()!=1) continue ;
3f150b4b 2268
2269 Int_t pdg = particle->GetPdgCode();
2270
045396c8 2271 charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
3f150b4b 2272
045396c8 2273 particle->Momentum(momentum);
2274
2275 //---------- Charged particles ----------------------
547c2f01 2276 if(charge != 0)
2277 {
045396c8 2278 //Particles in CTS acceptance
2279 Bool_t inCTS = GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
3f150b4b 2280
045396c8 2281 if(TMath::Abs(pdg) == 11 && stack->Particle(particle->GetFirstMother())->GetPdgCode()==22) continue ;
3f150b4b 2282
66e64043 2283 if(inCTS)
045396c8 2284 {
907b38cd 2285 if( label!=iParticle) // avoid trigger particle
2286 {
2287 if(!FillChargedMCCorrelationHistograms(particle->Pt(),particle->Phi(),particle->Eta(),ptprim,phiprim,etaprim)) return;
2288 }
2289 }// in CTS acceptance
2290 }// charged
045396c8 2291 } //track loop
2292 } //when the leading particles could trace back to MC
2293 } //ESD MC
547c2f01 2294 else if(GetReader()->ReadAODMCParticles())
2295 {
045396c8 2296 //Get the list of MC particles
2297 mcparticles0 = GetReader()->GetAODMCParticles(0);
2298 if(!mcparticles0) return;
547c2f01 2299 if(label >=mcparticles0->GetEntriesFast())
2300 {
045396c8 2301 if(GetDebug() > 2)
2302 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** large label ***: label %d, n tracks %d \n", label,mcparticles0->GetEntriesFast());
2303 return;
2304 }
2305 //Get the particle
2306 aodprimary = (AliAODMCParticle*) mcparticles0->At(label);
547c2f01 2307 if(!aodprimary)
2308 {
045396c8 2309 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** no AOD primary ***: label %d \n", label);
2310 return;
2311 }
2312
547c2f01 2313 if(aodprimary)
2314 {
2747966a 2315 ptprim = aodprimary->Pt();
2316 phiprim = aodprimary->Phi();
2317 etaprim = aodprimary->Eta();
2747966a 2318
2319 if(ptprim < 0.01 || eprim < 0.01) return ;
2320
045396c8 2321 mcparticles= GetReader()->GetAODMCParticles();
907b38cd 2322 for (Int_t i = 0; i < nTracks; i++)
547c2f01 2323 {
045396c8 2324 AliAODMCParticle *part = (AliAODMCParticle*) mcparticles->At(i);
2325 if (!part->IsPhysicalPrimary()) continue;
2326 Int_t pdg = part->GetPdgCode();
2327 charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
2328 TLorentzVector momentum(part->Px(),part->Py(),part->Pz(),part->E());
547c2f01 2329 if(charge != 0)
2330 {
2331 if(part->Pt()> GetReader()->GetCTSPtMin())
2332 {
045396c8 2333 //Particles in CTS acceptance
2334 Bool_t inCTS = GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
2335 Int_t indexmother=part->GetMother();
2336 if(indexmother>-1)
2337 {
2338 Int_t mPdg = ((AliAODMCParticle*) mcparticles->At(indexmother)) ->GetPdgCode();
2339 if(TMath::Abs(pdg) == 11 && mPdg == 22) continue;
2340 }
547c2f01 2341
66e64043 2342 if(inCTS)
045396c8 2343 {
907b38cd 2344 if( label!=iParticle) // avoid trigger particle
2345 {
2346 if(!FillChargedMCCorrelationHistograms(part->Pt(),part->Phi(),part->Eta(),ptprim,phiprim,etaprim)) return;
2347 }
2348 } // in acceptance
2349 } // min pt cut
045396c8 2350 } //only charged particles
2351 } //MC particle loop
2352 } //when the leading particles could trace back to MC
2353 }// AOD MC
e09cf5ef 2354}
045396c8 2355
05d0d05d 2356//_____________________________________________________________________
2357void AliAnaParticleHadronCorrelation::Print(const Option_t * opt) const
2358{
2359
2360 //Print some relevant parameters set for the analysis
2361 if(! opt)
2362 return;
2363
2364 printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
745913ae 2365 AliAnaCaloTrackCorrBaseClass::Print(" ");
66e64043 2366 printf("Pt trigger > %3.2f\n", fMinTriggerPt) ;
2367 printf("Pt associated hadron < %3.2f\n", fMaxAssocPt) ;
2368 printf("Pt associated hadron > %3.2f\n", fMinAssocPt) ;
2369 printf("Phi trigger particle-Hadron < %3.2f\n", fDeltaPhiMaxCut) ;
2370 printf("Phi trigger particle-Hadron > %3.2f\n", fDeltaPhiMinCut) ;
2371 printf("Phi trigger particle-UeHadron < %3.2f\n", fUeDeltaPhiMaxCut) ;
2372 printf("Phi trigger particle-UeHadron > %3.2f\n", fUeDeltaPhiMinCut) ;
2373 printf("Isolated Trigger? %d\n" , fSelectIsolated) ;
2374 printf("Several UE? %d\n" , fMakeSeveralUE) ;
2375 printf("Name of AOD Pi0 Branch %s \n", fPi0AODBranchName.Data());
05d0d05d 2376 printf("Do Decay-hadron correlation ? %d\n", fPi0Trigger) ;
3f150b4b 2377 printf("Select absolute leading for cluster triggers ? %d or Near Side %d\n",
2378 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
05d0d05d 2379 printf("Trigger pt bins %d\n", fNAssocPtBins) ;
2380 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
2381 printf("\t bin %d = [%2.1f,%2.1f]\n", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
2382 }
2383
2384}
2385
2386//____________________________________________________________
2387void AliAnaParticleHadronCorrelation::SetNAssocPtBins(Int_t n)
045396c8 2388{
2389 // Set number of bins
e09cf5ef 2390
05d0d05d 2391 fNAssocPtBins = n ;
2392
2393
045396c8 2394 if(n < 10 && n > 0)
2395 {
05d0d05d 2396 fNAssocPtBins = n ;
045396c8 2397 }
2398 else
2399 {
2400 printf("n = larger than 9 or too small, set to 9 \n");
05d0d05d 2401 fNAssocPtBins = 9;
045396c8 2402 }
2403}
e09cf5ef 2404
05d0d05d 2405//______________________________________________________________________________
2406void AliAnaParticleHadronCorrelation::SetAssocPtBinLimit(Int_t ibin, Float_t pt)
045396c8 2407{
2408 // Set the list of limits for the trigger pt bins
2409
05d0d05d 2410 if(ibin <= fNAssocPtBins || ibin >= 0)
045396c8 2411 {
05d0d05d 2412 fAssocPtBinLimit[ibin] = pt ;
045396c8 2413 }
2e876d85 2414 else
2415 {
05d0d05d 2416 printf("AliAnaParticleHadronCorrelation::SetAssocPtBinLimit() - bin number too large %d > %d or small, nothing done\n", ibin, fNAssocPtBins) ;
045396c8 2417 }
2418}
2419