1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 //_________________________________________________________________________
17 // Class for the analysis of particle - hadron correlations
18 // Particle (for example direct gamma) must be found in a previous analysis
19 //-- Author: Gustavo Conesa (LNF-INFN)
21 // Modified by Yaxian Mao:
22 // 1. add the UE subtraction for corrlation study
23 // 2. change the correlation variable
24 // 3. Only use leading particle(cluster/track) as trigger for correlation (2010/07/02)
25 // 4. Make decay photon-hadron correlations where decay contribute pi0 mass (2010/09/09)
26 // 5. fill the pout to extract kt at the end, also to study charge asymmetry(2010/10/06)
27 // 6. Add the possibility for event selection analysis based on vertex and multiplicity bins (10/10/2010)
28 // 7. change the way of delta phi cut for UE study due to memory issue (reduce histograms)
29 // 8. Add the possibility to request the absolute leading particle at the near side or not, set trigger bins, general clean-up (08/2011)
30 //////////////////////////////////////////////////////////////////////////////
33 // --- ROOT system ---
34 //#include "TClonesArray.h"
38 #include "TDatabasePDG.h"
40 //---- ANALYSIS system ----
41 #include "AliNeutralMesonSelection.h"
42 #include "AliAnaParticleHadronCorrelation.h"
43 #include "AliCaloTrackReader.h"
44 #include "AliCaloPID.h"
45 #include "AliAODPWG4ParticleCorrelation.h"
46 #include "AliFiducialCut.h"
47 #include "AliVTrack.h"
48 #include "AliVCluster.h"
49 #include "AliMCAnalysisUtils.h"
50 #include "TParticle.h"
52 #include "AliAODMCParticle.h"
53 #include "AliMixedEvent.h"
55 ClassImp(AliAnaParticleHadronCorrelation)
58 //___________________________________________________________________
59 AliAnaParticleHadronCorrelation::AliAnaParticleHadronCorrelation():
60 AliAnaCaloTrackCorrBaseClass(),
62 fMaxAssocPt(1000.), fMinAssocPt(0.),
63 fDeltaPhiMaxCut(0.), fDeltaPhiMinCut(0.),
64 fSelectIsolated(0), fMakeSeveralUE(0),
65 fUeDeltaPhiMaxCut(0.), fUeDeltaPhiMinCut(0.),
66 fPi0AODBranchName(""), fNeutralCorr(0),
68 fMakeAbsoluteLeading(0), fMakeNearSideLeading(0),
69 fLeadingTriggerIndex(-1),
70 fNAssocPtBins(0), fAssocPtBinLimit(),
72 fhPtLeading(0), fhPhiLeading(0),
73 fhEtaLeading(0), fhDeltaPhiDeltaEtaCharged(0),
74 fhPhiCharged(0), fhEtaCharged(0),
75 fhDeltaPhiCharged(0), fhDeltaEtaCharged(0),
76 fhDeltaPhiChargedPt(0), fhDeltaPhiUeChargedPt(0),
77 fhXECharged(0), fhXEUeCharged(0),
78 fhXEPosCharged(0), fhXENegCharged(0),
79 fhPtHbpXECharged(0), fhPtHbpXEUeCharged(0),
80 fhZTCharged(0), fhZTUeCharged(0),
81 fhZTPosCharged(0), fhZTNegCharged(0),
82 fhPtHbpZTCharged(0), fhPtHbpZTUeCharged(0),
83 fhDeltaPhiUeLeftCharged(0), fhDeltaPhiUeRightCharged(0),
84 fhXEUeLeftCharged(0), fhXEUeRightCharged(0),
85 fhPtHbpXEUeLeftCharged(0), fhPtHbpXEUeRightCharged(0),
86 fhZTUeLeftCharged(0), fhZTUeRightCharged(0),
87 fhPtHbpZTUeLeftCharged(0), fhPtHbpZTUeRightCharged(0),
88 fhPtTrigPout(0), fhPtTrigCharged(0),
89 fhTrigDeltaPhiCharged(0x0), fhTrigDeltaEtaCharged(0x0),
90 fhTrigXECorr(0x0), fhTrigXEUeCorr(0x0),
91 fhTrigZTCorr(0x0), fhTrigZTUeCorr(0x0),
92 fhAssocPt(0), fhAssocPtBkg(0),
93 fhDeltaPhiAssocPtBin(0), fhDeltaPhiAssocPtBinHMPID(0),fhDeltaPhiAssocPtBinHMPIDAcc(0),
94 fhDeltaPhiBradAssocPtBin(0), fhDeltaPhiBrad(0),
95 fhXEAssocPtBin(0), fhXE(0),
96 fhZTAssocPtBin(0), fhZT(0),
97 fhDeltaPhiDeltaEtaNeutral(0),
98 fhPhiNeutral(0), fhEtaNeutral(0),
99 fhDeltaPhiNeutral(0), fhDeltaEtaNeutral(0),
100 fhDeltaPhiNeutralPt(0), fhDeltaPhiUeNeutralPt(0),
101 fhXENeutral(0), fhXEUeNeutral(0),
102 fhPtHbpXENeutral(0), fhPtHbpXEUeNeutral(0),
103 fhZTNeutral(0), fhZTUeNeutral(0),
104 fhPtHbpZTNeutral(0), fhPtHbpZTUeNeutral(0),
105 fhDeltaPhiUeLeftNeutral(0), fhDeltaPhiUeRightNeutral(0),
106 fhXEUeLeftNeutral(0), fhXEUeRightNeutral(0),
107 fhPtHbpXEUeLeftNeutral(0), fhPtHbpXEUeRightNeutral(0),
108 fhZTUeLeftNeutral(0), fhZTUeRightNeutral(0),
109 fhPtHbpZTUeLeftNeutral(0), fhPtHbpZTUeRightNeutral(0),
110 fhPtPi0DecayRatio(0),
111 fhDeltaPhiDecayCharged(0), fhXEDecayCharged(0), fhZTDecayCharged(0),
112 fhDeltaPhiDecayNeutral(0), fhXEDecayNeutral(0), fhZTDecayNeutral(0),
113 fh2phiLeadingParticle(0x0),
115 fhMCEtaCharged(0), fhMCPhiCharged(0),
116 fhMCDeltaEtaCharged(0), fhMCDeltaPhiCharged(0x0),
117 fhMCDeltaPhiDeltaEtaCharged(0), fhMCDeltaPhiChargedPt(0),
118 fhMCPtXECharged(0), fhMCPtHbpXECharged(0),
119 fhMCPtZTCharged(0), fhMCPtHbpZTCharged(0),
121 fhMCPtAssocDeltaPhi(0)
125 //Initialize parameters
129 //____________________________________________________________
130 TObjString* AliAnaParticleHadronCorrelation::GetAnalysisCuts()
132 //Save parameters used for analysis
133 TString parList ; //this will be list of parameters used for this analysis.
134 const Int_t buffersize = 560;
135 char onePar[buffersize] ;
137 snprintf(onePar,buffersize,"--- AliAnaPaticleHadronCorrelation ---\n") ;
139 snprintf(onePar,buffersize," Pt Trigger > %3.2f ", fMinTriggerPt) ;
141 snprintf(onePar,buffersize," %3.2f < Pt associated < %3.2f ", fMinAssocPt, fMaxAssocPt) ;
143 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-Hadron < %3.2f ", fDeltaPhiMinCut, fDeltaPhiMaxCut) ;
145 snprintf(onePar,buffersize," %3.2f < Phi trigger particle-UeHadron < %3.2f ", fUeDeltaPhiMinCut, fUeDeltaPhiMaxCut) ;
147 snprintf(onePar,buffersize,"Isolated Trigger? %d\n", fSelectIsolated) ;
149 snprintf(onePar,buffersize,"Several UE? %d\n", fMakeSeveralUE) ;
151 snprintf(onePar,buffersize,"Name of AOD Pi0 Branch %s ", fPi0AODBranchName.Data());
153 snprintf(onePar,buffersize,"Do Decay-hadron correlation ? %d", fPi0Trigger) ;
155 snprintf(onePar,buffersize,"Select absolute leading for cluster triggers ? %d or Near Side Leading %d \n",
156 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
158 snprintf(onePar,buffersize,"Associated particle pt bins %d: ", fNAssocPtBins) ;
160 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
161 snprintf(onePar,buffersize,"bin %d = [%2.1f,%2.1f];", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
165 //Get parameters set in base class.
166 parList += GetBaseParametersList() ;
168 //Get parameters set in PID class.
169 //parList += GetCaloPID()->GetPIDParametersList() ;
171 //Get parameters set in FiducialCut class (not available yet)
172 //parlist += GetFidCut()->GetFidCutParametersList()
174 return new TObjString(parList) ;
178 //________________________________________________________________
179 TList * AliAnaParticleHadronCorrelation::GetCreateOutputObjects()
182 // Create histograms to be saved in output file and
183 // store them in fOutputContainer
184 TList * outputContainer = new TList() ;
185 outputContainer->SetName("CorrelationHistos") ;
187 Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Int_t netabins = GetHistogramRanges()->GetHistoEtaBins();
188 Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax();
189 Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin();
191 fhPtLeading = new TH1F ("hPtLeading","p_T distribution of leading particles", nptbins,ptmin,ptmax);
192 fhPtLeading->SetXTitle("p_{T}^{trig} (GeV/c)");
194 fhPhiLeading = new TH2F ("hPhiLeading","#phi distribution of leading Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
195 fhPhiLeading->SetYTitle("#phi (rad)");
197 fhEtaLeading = new TH2F ("hEtaLeading","#eta distribution of leading",nptbins,ptmin,ptmax, netabins,etamin,etamax);
198 fhEtaLeading->SetYTitle("#eta ");
200 outputContainer->Add(fhPtLeading);
201 outputContainer->Add(fhPhiLeading);
202 outputContainer->Add(fhEtaLeading);
204 //Correlation with charged hadrons
205 if(GetReader()->IsCTSSwitchedOn())
207 fhDeltaPhiDeltaEtaCharged = new TH2F
208 ("hDeltaPhiDeltaEtaCharged","#phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
209 140,-2.,5.,200,-2,2);
210 fhDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi");
211 fhDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
213 fhPhiCharged = new TH2F
214 ("hPhiCharged","#phi_{h^{#pm}} vs p_{T #pm}",
215 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
216 fhPhiCharged->SetYTitle("#phi_{h^{#pm}} (rad)");
217 fhPhiCharged->SetXTitle("p_{T #pm} (GeV/c)");
219 fhEtaCharged = new TH2F
220 ("hEtaCharged","#eta_{h^{#pm}} vs p_{T #pm}",
221 nptbins,ptmin,ptmax,netabins,etamin,etamax);
222 fhEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
223 fhEtaCharged->SetXTitle("p_{T #pm} (GeV/c)");
225 fhDeltaPhiCharged = new TH2F
226 ("hDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}",
227 nptbins,ptmin,ptmax,140,-2.,5.);
228 fhDeltaPhiCharged->SetYTitle("#Delta #phi");
229 fhDeltaPhiCharged->SetXTitle("p_{T trigger} (GeV/c)");
231 fhDeltaPhiChargedPt = new TH2F
232 ("hDeltaPhiChargedPt","#phi_{trigger} - #phi_{#h^{#pm}} vs p_{T h^{#pm}}",
233 nptbins,ptmin,ptmax,140,-2.,5.);
234 fhDeltaPhiChargedPt->SetYTitle("#Delta #phi");
235 fhDeltaPhiChargedPt->SetXTitle("p_{T h^{#pm}} (GeV/c)");
237 fhDeltaPhiUeChargedPt = new TH2F
238 ("hDeltaPhiUeChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}}",
239 nptbins,ptmin,ptmax,140,-2.,5.);
240 fhDeltaPhiUeChargedPt->SetYTitle("#Delta #phi");
241 fhDeltaPhiUeChargedPt->SetXTitle("p_{T h^{#pm}} (GeV/c)");
243 fhDeltaEtaCharged = new TH2F
244 ("hDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger}",
245 nptbins,ptmin,ptmax,200,-2,2);
246 fhDeltaEtaCharged->SetYTitle("#Delta #eta");
247 fhDeltaEtaCharged->SetXTitle("p_{T trigger} (GeV/c)");
250 new TH2F("hXECharged","x_{E} for charged tracks",
251 nptbins,ptmin,ptmax,200,0.,2.);
252 fhXECharged->SetYTitle("x_{E}");
253 fhXECharged->SetXTitle("p_{T trigger}");
256 new TH2F("hXEUeCharged","x_{E} for Underlying Event",
257 nptbins,ptmin,ptmax,200,0.,2.);
258 fhXEUeCharged->SetYTitle("x_{E}");
259 fhXEUeCharged->SetXTitle("p_{T trigger}");
262 new TH2F("hXEPositiveCharged","x_{E} for positive charged tracks",
263 nptbins,ptmin,ptmax,200,0.,2.);
264 fhXEPosCharged->SetYTitle("x_{E}");
265 fhXEPosCharged->SetXTitle("p_{T trigger}");
268 new TH2F("hXENegativeCharged","x_{E} for negative charged tracks",
269 nptbins,ptmin,ptmax,200,0.,2.);
270 fhXENegCharged->SetYTitle("x_{E}");
271 fhXENegCharged->SetXTitle("p_{T trigger}");
274 new TH2F("hHbpXECharged","#xi = ln(1/x_{E}) with charged hadrons",
275 nptbins,ptmin,ptmax,200,0.,10.);
276 fhPtHbpXECharged->SetYTitle("ln(1/x_{E})");
277 fhPtHbpXECharged->SetXTitle("p_{T trigger}");
280 new TH2F("hHbpXEUeCharged","#xi = ln(1/x_{E}) with charged hadrons,Underlying Event",
281 nptbins,ptmin,ptmax,200,0.,10.);
282 fhPtHbpXEUeCharged->SetYTitle("ln(1/x_{E})");
283 fhPtHbpXEUeCharged->SetXTitle("p_{T trigger}");
286 new TH2F("hZTCharged","z_{T} for charged tracks",
287 nptbins,ptmin,ptmax,200,0.,2.);
288 fhZTCharged->SetYTitle("z_{T}");
289 fhZTCharged->SetXTitle("p_{T trigger}");
292 new TH2F("hZTUeCharged","z_{T} for Underlying Event",
293 nptbins,ptmin,ptmax,200,0.,2.);
294 fhZTUeCharged->SetYTitle("z_{T}");
295 fhZTUeCharged->SetXTitle("p_{T trigger}");
298 new TH2F("hZTPositiveCharged","z_{T} for positive charged tracks",
299 nptbins,ptmin,ptmax,200,0.,2.);
300 fhZTPosCharged->SetYTitle("z_{T}");
301 fhZTPosCharged->SetXTitle("p_{T trigger}");
304 new TH2F("hZTNegativeCharged","z_{T} for negative charged tracks",
305 nptbins,ptmin,ptmax,200,0.,2.);
306 fhZTNegCharged->SetYTitle("z_{T}");
307 fhZTNegCharged->SetXTitle("p_{T trigger}");
310 new TH2F("hHbpZTCharged","#xi = ln(1/z_{T}) with charged hadrons",
311 nptbins,ptmin,ptmax,200,0.,10.);
312 fhPtHbpZTCharged->SetYTitle("ln(1/z_{T})");
313 fhPtHbpZTCharged->SetXTitle("p_{T trigger}");
316 new TH2F("hHbpZTUeCharged","#xi = ln(1/z_{T}) with charged hadrons,Underlying Event",
317 nptbins,ptmin,ptmax,200,0.,10.);
318 fhPtHbpZTUeCharged->SetYTitle("ln(1/x_{E})");
319 fhPtHbpZTUeCharged->SetXTitle("p_{T trigger}");
322 new TH2F("hPtTrigPout","Pout with triggers",
323 nptbins,ptmin,ptmax,2*nptbins,-ptmax,ptmax);
324 fhPtTrigPout->SetYTitle("p_{out} (GeV/c)");
325 fhPtTrigPout->SetXTitle("p_{T trigger} (GeV/c)");
328 new TH2F("hPtTrigCharged","trgger and charged tracks pt distribution",
329 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
330 fhPtTrigCharged->SetYTitle("p_{T h^{#pm}} (GeV/c)");
331 fhPtTrigCharged->SetXTitle("p_{T trigger} (GeV/c)");
333 outputContainer->Add(fhDeltaPhiDeltaEtaCharged);
334 outputContainer->Add(fhPhiCharged) ;
335 outputContainer->Add(fhEtaCharged) ;
336 outputContainer->Add(fhDeltaPhiCharged) ;
337 outputContainer->Add(fhDeltaEtaCharged) ;
338 outputContainer->Add(fhDeltaPhiChargedPt) ;
339 outputContainer->Add(fhDeltaPhiUeChargedPt) ;
341 outputContainer->Add(fhXECharged) ;
342 outputContainer->Add(fhXEPosCharged) ;
343 outputContainer->Add(fhXENegCharged) ;
344 outputContainer->Add(fhXEUeCharged) ;
345 outputContainer->Add(fhPtHbpXECharged) ;
346 outputContainer->Add(fhPtHbpXEUeCharged) ;
348 outputContainer->Add(fhZTCharged) ;
349 outputContainer->Add(fhZTPosCharged) ;
350 outputContainer->Add(fhZTNegCharged) ;
351 outputContainer->Add(fhZTUeCharged) ;
352 outputContainer->Add(fhPtHbpZTCharged) ;
353 outputContainer->Add(fhPtHbpZTUeCharged) ;
355 outputContainer->Add(fhPtTrigPout) ;
356 outputContainer->Add(fhPtTrigCharged) ;
360 Int_t nMultiBins = GetMultiBin();
361 fhTrigDeltaPhiCharged = new TH2F*[nMultiBins] ;
362 fhTrigDeltaEtaCharged = new TH2F*[nMultiBins] ;
363 fhTrigXECorr = new TH2F*[nMultiBins] ;
364 fhTrigXEUeCorr = new TH2F*[nMultiBins] ;
365 fhTrigZTCorr = new TH2F*[nMultiBins] ;
366 fhTrigZTUeCorr = new TH2F*[nMultiBins] ;
368 for(Int_t im=0; im<nMultiBins; im++)
370 fhTrigDeltaPhiCharged[im] = new TH2F
371 (Form("hTrigDeltaPhiCharged_%d",im),Form("hTrigDeltaPhiCharged_%d",im), nptbins,ptmin,ptmax, 140,-2.,5.);
372 fhTrigDeltaPhiCharged[im]->SetXTitle("p_{T trigger} (GeV/c)");
373 fhTrigDeltaPhiCharged[im]->SetYTitle("#Delta #phi");
375 fhTrigDeltaEtaCharged[im] = new TH2F
376 (Form("hTrigDeltaEtaCharged_%d",im),Form("hTrigDeltaEtaCharged_%d",im), nptbins,ptmin,ptmax, 200,-2,2);
377 fhTrigDeltaEtaCharged[im]->SetXTitle("p_{T trigger} (GeV/c)");
378 fhTrigDeltaEtaCharged[im]->SetYTitle("#Delta #eta");
380 fhTrigXECorr[im] = new TH2F
381 (Form("hTrigXEPtCorr_%d",im),Form("hTrigXEPtCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
382 fhTrigXECorr[im]->SetYTitle("x_{E trigger h^{#pm}}");
383 fhTrigXECorr[im]->SetXTitle("p_{T trigger}");
385 fhTrigXEUeCorr[im] = new TH2F
386 (Form("hTrigXEPtUeCorr_%d",im),Form("hTrigXEPtUeCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
387 fhTrigXEUeCorr[im]->SetYTitle("x_{E trigger h^{#pm}}");
388 fhTrigXEUeCorr[im]->SetXTitle("p_{T trigger}");
390 fhTrigZTCorr[im] = new TH2F
391 (Form("hTrigZTPtCorr_%d",im),Form("hTrigZTPtCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
392 fhTrigZTCorr[im]->SetYTitle("z_{trigger h^{#pm}}");
393 fhTrigZTCorr[im]->SetXTitle("p_{T trigger}");
395 fhTrigZTUeCorr[im] = new TH2F
396 (Form("hTrigZTPtUeCorr_%d",im),Form("hTrigZTPtUeCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
397 fhTrigZTUeCorr[im]->SetYTitle("z_{trigger h^{#pm}}");
398 fhTrigZTUeCorr[im]->SetXTitle("p_{T trigger}");
400 outputContainer->Add(fhTrigDeltaPhiCharged[im]) ;
401 outputContainer->Add(fhTrigDeltaEtaCharged[im]) ;
402 outputContainer->Add(fhTrigXECorr[im]);
403 outputContainer->Add(fhTrigXEUeCorr[im]);
404 outputContainer->Add(fhTrigZTCorr[im]);
405 outputContainer->Add(fhTrigZTUeCorr[im]);
409 fhAssocPt = new TH2F("hAssocPt", " Trigger p_{T} vs associated hadron p_{T}",
410 nptbins, ptmin, ptmax,nptbins,ptmin,ptmax);
411 fhAssocPt->SetXTitle("p_{T trigger}");
412 fhAssocPt->SetYTitle("p_{T associated}");
413 outputContainer->Add(fhAssocPt) ;
415 fhAssocPtBkg = new TH2F("hAssocPtBkg", " Trigger p_{T} vs associated hadron p_{T} from background",
416 nptbins, ptmin, ptmax,nptbins,ptmin,ptmax);
417 fhAssocPtBkg->SetXTitle("p_{T trigger}");
418 fhAssocPtBkg->SetYTitle("p_{T associated}");
419 outputContainer->Add(fhAssocPtBkg) ;
421 fhDeltaPhiBrad = new TH2F("hDeltaPhiBrad","atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs p_{T trigger} ",
422 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
423 fhDeltaPhiBrad->SetXTitle("p_{T trigger}");
424 fhDeltaPhiBrad->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
425 outputContainer->Add(fhDeltaPhiBrad) ;
427 fhXE = new TH2F("hXE", "x_{E} vs p_{T trigger}",
428 nptbins, ptmin, ptmax,200, 0.0, 2.0);
429 fhXE->SetXTitle("p_{T trigger}");
430 fhXE->SetYTitle("x_{E}");
431 outputContainer->Add(fhXE);
433 fhZT = new TH2F("hZT", "z_{T} vs p_{T trigger}",
434 nptbins, ptmin, ptmax,200, 0.0, 2.0);
435 fhZT->SetXTitle("p_{T trigger}");
436 fhZT->SetYTitle("z_{T}");
437 outputContainer->Add(fhZT);
439 fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins] ;
440 fhDeltaPhiAssocPtBinHMPID= new TH2F*[fNAssocPtBins] ;
441 fhDeltaPhiAssocPtBinHMPIDAcc= new TH2F*[fNAssocPtBins] ;
442 fhDeltaPhiBradAssocPtBin = new TH2F*[fNAssocPtBins] ;
443 fhXEAssocPtBin = new TH2F*[fNAssocPtBins] ;
444 fhZTAssocPtBin = new TH2F*[fNAssocPtBins] ;
446 for(Int_t i = 0 ; i < fNAssocPtBins ; i++)
448 fhDeltaPhiAssocPtBin[i] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
449 Form("#Delta #phi vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
450 nptbins, ptmin, ptmax,140,-2.,5.);
451 fhDeltaPhiAssocPtBin[i]->SetXTitle("p_{T trigger}");
452 fhDeltaPhiAssocPtBin[i]->SetYTitle("#Delta #phi");
454 fhDeltaPhiAssocPtBinHMPID[i] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1fHMPID", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
455 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]),
456 nptbins, ptmin, ptmax,140,-2.,5.);
457 fhDeltaPhiAssocPtBinHMPID[i]->SetXTitle("p_{T trigger}");
458 fhDeltaPhiAssocPtBinHMPID[i]->SetYTitle("#Delta #phi");
460 fhDeltaPhiAssocPtBinHMPIDAcc[i] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1fHMPIDAcc", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
461 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]),
462 nptbins, ptmin, ptmax,140,-2.,5.);
463 fhDeltaPhiAssocPtBinHMPIDAcc[i]->SetXTitle("p_{T trigger}");
464 fhDeltaPhiAssocPtBinHMPIDAcc[i]->SetYTitle("#Delta #phi");
466 fhDeltaPhiBradAssocPtBin[i] = new TH2F(Form("hDeltaPhiBradPtAssocPt%2.1f_%2.1f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
467 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]),
468 nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0);
469 fhDeltaPhiBradAssocPtBin[i]->SetXTitle("p_{T trigger}");
470 fhDeltaPhiBradAssocPtBin[i]->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi");
473 fhXEAssocPtBin[i] = new TH2F(Form("hXEAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
474 Form("x_{E} vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
475 nptbins, ptmin, ptmax,200, 0.0, 2.0);
476 fhXEAssocPtBin[i]->SetXTitle("p_{T trigger}");
477 fhXEAssocPtBin[i]->SetYTitle("x_{E}");
479 fhZTAssocPtBin[i] = new TH2F(Form("hZTAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
480 Form("z_{T} vs p_{T trigger} for associated p_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]),
481 nptbins, ptmin, ptmax,200, 0.0, 2.0);
482 fhZTAssocPtBin[i]->SetXTitle("p_{T trigger}");
483 fhZTAssocPtBin[i]->SetYTitle("z_{T}");
485 outputContainer->Add(fhDeltaPhiAssocPtBin[i]) ;
486 outputContainer->Add(fhDeltaPhiAssocPtBinHMPID[i]) ;
487 outputContainer->Add(fhDeltaPhiAssocPtBinHMPIDAcc[i]) ;
488 outputContainer->Add(fhDeltaPhiBradAssocPtBin[i]) ;
489 outputContainer->Add(fhXEAssocPtBin[i]);
490 outputContainer->Add(fhZTAssocPtBin[i]);
495 fhPtPi0DecayRatio = new TH2F
496 ("hPtPi0DecayRatio","p_T of #pi^{0} and the ratio of pt for two decay",
497 nptbins,ptmin,ptmax, 100,0.,2.);
498 fhPtPi0DecayRatio->SetXTitle("p_{T}^{#pi^{0}} (GeV/c)");
499 fhPtPi0DecayRatio->SetYTitle("p_{T}^{Decay}/p_{T}^{#pi^{0}}");
501 fhDeltaPhiDecayCharged = new TH2F
502 ("hDeltaPhiDecayCharged","#phi_{Decay} - #phi_{h^{#pm}} vs p_{T Decay}",
503 nptbins,ptmin,ptmax,140,-2.,5.);
504 fhDeltaPhiDecayCharged->SetYTitle("#Delta #phi");
505 fhDeltaPhiDecayCharged->SetXTitle("p_{T Decay} (GeV/c)");
508 new TH2F("hXEDecayCharged","x_{E} Decay",
509 nptbins,ptmin,ptmax,200,0.,2.);
510 fhXEDecayCharged->SetYTitle("x_{E}");
511 fhXEDecayCharged->SetXTitle("p_{T decay}");
514 new TH2F("hZTDecayCharged","z_{trigger h^{#pm}} = p_{T h^{#pm}} / p_{T Decay}",
515 nptbins,ptmin,ptmax,200,0.,2.);
516 fhZTDecayCharged->SetYTitle("z_{decay h^{#pm}}");
517 fhZTDecayCharged->SetXTitle("p_{T decay}");
519 outputContainer->Add(fhPtPi0DecayRatio) ;
520 outputContainer->Add(fhDeltaPhiDecayCharged) ;
521 outputContainer->Add(fhXEDecayCharged) ;
522 outputContainer->Add(fhZTDecayCharged) ;
527 fhDeltaPhiUeLeftCharged = new TH2F
528 ("hDeltaPhiUeLeftChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE left side range of trigger particles",
529 nptbins,ptmin,ptmax,140,-2.,5.);
530 fhDeltaPhiUeLeftCharged->SetYTitle("#Delta #phi");
531 fhDeltaPhiUeLeftCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
532 outputContainer->Add(fhDeltaPhiUeLeftCharged) ;
534 fhDeltaPhiUeRightCharged = new TH2F
535 ("hDeltaPhiUeRightChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE right side range of trigger particles",
536 nptbins,ptmin,ptmax,140,-2.,5.);
537 fhDeltaPhiUeRightCharged->SetYTitle("#Delta #phi");
538 fhDeltaPhiUeRightCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
539 outputContainer->Add(fhDeltaPhiUeRightCharged) ;
542 new TH2F("hXEUeChargedLeft","x_{E} with UE left side of trigger",
543 nptbins,ptmin,ptmax,200,0.,2.);
544 fhXEUeLeftCharged->SetYTitle("x_{E Ueh^{#pm}}");
545 fhXEUeLeftCharged->SetXTitle("p_{T trigger}");
546 outputContainer->Add(fhXEUeLeftCharged) ;
549 new TH2F("hXEUeChargedRight","x_{E h^{#pm}} with UE right side of trigger",
550 nptbins,ptmin,ptmax,200,0.,2.);
551 fhXEUeRightCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
552 fhXEUeRightCharged->SetXTitle("p_{T trigger}");
553 outputContainer->Add(fhXEUeRightCharged) ;
555 fhPtHbpXEUeLeftCharged =
556 new TH2F("hHbpXEUeChargedLeft","#xi = ln(1/x_{E}) with charged UE left side of trigger",
557 nptbins,ptmin,ptmax,200,0.,10.);
558 fhPtHbpXEUeLeftCharged->SetYTitle("ln(1/x_{E})");
559 fhPtHbpXEUeLeftCharged->SetXTitle("p_{T trigger}");
560 outputContainer->Add(fhPtHbpXEUeLeftCharged) ;
562 fhPtHbpXEUeRightCharged =
563 new TH2F("hHbpXEUeChargedRight","#xi = ln(1/x_{E}) with charged UE right side of trigger",
564 nptbins,ptmin,ptmax,200,0.,10.);
565 fhPtHbpXEUeRightCharged->SetYTitle("ln(1/x_{E})");
566 fhPtHbpXEUeRightCharged->SetXTitle("p_{T trigger}");
567 outputContainer->Add(fhPtHbpXEUeRightCharged) ;
570 new TH2F("hZTUeChargedLeft","z_{trigger h^{#pm}} = p_{T Ueh^{#pm}} / p_{T trigger} with UE left side of trigger",
571 nptbins,ptmin,ptmax,200,0.,2.);
572 fhZTUeLeftCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
573 fhZTUeLeftCharged->SetXTitle("p_{T trigger}");
574 outputContainer->Add(fhZTUeLeftCharged) ;
577 new TH2F("hZTUeChargedRight","z_{trigger h^{#pm}} = p_{T Ueh^{#pm}} / p_{T trigger} with UE right side of trigger",
578 nptbins,ptmin,ptmax,200,0.,2.);
579 fhZTUeRightCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
580 fhZTUeRightCharged->SetXTitle("p_{T trigger}");
581 outputContainer->Add(fhZTUeRightCharged) ;
583 fhPtHbpZTUeLeftCharged =
584 new TH2F("hHbpZTUeChargedLeft","#xi = ln(1/z_{T}) with charged UE left side of trigger",
585 nptbins,ptmin,ptmax,200,0.,10.);
586 fhPtHbpZTUeLeftCharged->SetYTitle("ln(1/z_{T})");
587 fhPtHbpZTUeLeftCharged->SetXTitle("p_{T trigger}");
588 outputContainer->Add(fhPtHbpZTUeLeftCharged) ;
590 fhPtHbpZTUeRightCharged =
591 new TH2F("hHbpZTUeChargedRight","#xi = ln(1/z_{T}) with charged UE right side of trigger",
592 nptbins,ptmin,ptmax,200,0.,10.);
593 fhPtHbpZTUeRightCharged->SetYTitle("ln(1/z_{T})");
594 fhPtHbpZTUeRightCharged->SetXTitle("p_{T trigger}");
595 outputContainer->Add(fhPtHbpZTUeRightCharged) ;
598 } //Correlation with charged hadrons
600 //Correlation with neutral hadrons
603 fhDeltaPhiDeltaEtaNeutral = new TH2F
604 ("hDeltaPhiDeltaEtaNeutral","#phi_{trigger} - #phi_{h^{0}} vs #eta_{trigger} - #eta_{h^{0}}",
605 140,-2.,5.,200,-2,2);
606 fhDeltaPhiDeltaEtaNeutral->SetXTitle("#Delta #phi");
607 fhDeltaPhiDeltaEtaNeutral->SetYTitle("#Delta #eta");
609 fhPhiNeutral = new TH2F
610 ("hPhiNeutral","#phi_{#pi^{0}} vs p_{T #pi^{0}}",
611 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
612 fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)");
613 fhPhiNeutral->SetXTitle("p_{T #pi^{0}} (GeV/c)");
615 fhEtaNeutral = new TH2F
616 ("hEtaNeutral","#eta_{#pi^{0}} vs p_{T #pi^{0}}",
617 nptbins,ptmin,ptmax,netabins,etamin,etamax);
618 fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)");
619 fhEtaNeutral->SetXTitle("p_{T #pi^{0}} (GeV/c)");
621 fhDeltaPhiNeutral = new TH2F
622 ("hDeltaPhiNeutral","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T trigger}",
623 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
624 fhDeltaPhiNeutral->SetYTitle("#Delta #phi");
625 fhDeltaPhiNeutral->SetXTitle("p_{T trigger} (GeV/c)");
627 fhDeltaPhiNeutralPt = new TH2F
628 ("hDeltaPhiNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T #pi^{0}}}",
629 nptbins,ptmin,ptmax,140,-2.,5.);
630 fhDeltaPhiNeutralPt->SetYTitle("#Delta #phi");
631 fhDeltaPhiNeutralPt->SetXTitle("p_{T h^{0}} (GeV/c)");
633 fhDeltaPhiUeNeutralPt = new TH2F
634 ("hDeltaPhiUeNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T #pi^{0}}}",
635 nptbins,ptmin,ptmax,140,-2.,5.);
636 fhDeltaPhiUeNeutralPt->SetYTitle("#Delta #phi");
637 fhDeltaPhiUeNeutralPt->SetXTitle("p_{T h^{0}} (GeV/c)");
639 fhDeltaEtaNeutral = new TH2F
640 ("hDeltaEtaNeutral","#eta_{trigger} - #eta_{#pi^{0}} vs p_{T trigger}",
641 nptbins,ptmin,ptmax,200,-2,2);
642 fhDeltaEtaNeutral->SetYTitle("#Delta #eta");
643 fhDeltaEtaNeutral->SetXTitle("p_{T trigger} (GeV/c)");
646 new TH2F("hXENeutral","x_{E} for #pi^{0} associated",
647 nptbins,ptmin,ptmax,200,0.,2.);
648 fhXENeutral->SetYTitle("x_{E}");
649 fhXENeutral->SetXTitle("p_{T trigger}");
652 new TH2F("hXEUeNeutral","x_{E} for #pi^{0} associated",
653 nptbins,ptmin,ptmax,200,0.,2.);
654 fhXEUeNeutral->SetYTitle("x_{E}");
655 fhXEUeNeutral->SetXTitle("p_{T trigger}");
658 new TH2F("hHbpXENeutral","#xi = ln(1/x_{E})for #pi^{0} associated",
659 nptbins,ptmin,ptmax,200,0.,10.);
660 fhPtHbpXENeutral->SetYTitle("ln(1/x_{E})");
661 fhPtHbpXENeutral->SetXTitle("p_{T trigger}");
664 new TH2F("hHbpXEUeNeutral","#xi = ln(1/x_{E}) for #pi^{0} associated",
665 nptbins,ptmin,ptmax,200,0.,10.);
666 fhPtHbpXEUeNeutral->SetYTitle("ln(1/x_{E})");
667 fhPtHbpXEUeNeutral->SetXTitle("p_{T trigger}");
670 new TH2F("hZTNeutral","z_{trigger #pi} = p_{T #pi^{0}} / p_{T trigger} for #pi^{0} associated",
671 nptbins,ptmin,ptmax,200,0.,2.);
672 fhZTNeutral->SetYTitle("z_{trigger #pi^{0}}");
673 fhZTNeutral->SetXTitle("p_{T trigger}");
676 new TH2F("hZTUeNeutral","z_{trigger #pi} = p_{T #pi^{0}} / p_{T trigger} for #pi^{0} associated",
677 nptbins,ptmin,ptmax,200,0.,2.);
678 fhZTUeNeutral->SetYTitle("z_{trigger #pi^{0}}");
679 fhZTUeNeutral->SetXTitle("p_{T trigger}");
682 new TH2F("hHbpZTNeutral","#xi = ln(1/x_{E}) for #pi^{0} associated",
683 nptbins,ptmin,ptmax,200,0.,10.);
684 fhPtHbpZTNeutral->SetYTitle("ln(1/z_{T})");
685 fhPtHbpZTNeutral->SetXTitle("p_{T trigger}");
688 new TH2F("hHbpZTUeNeutral","#xi = ln(1/x_{E}) for #pi^{0} associated",
689 nptbins,ptmin,ptmax,200,0.,10.);
690 fhPtHbpXEUeNeutral->SetYTitle("ln(1/z_{T})");
691 fhPtHbpXEUeNeutral->SetXTitle("p_{T trigger}");
693 outputContainer->Add(fhDeltaPhiDeltaEtaNeutral);
694 outputContainer->Add(fhPhiNeutral) ;
695 outputContainer->Add(fhEtaNeutral) ;
696 outputContainer->Add(fhDeltaPhiNeutral) ;
697 outputContainer->Add(fhDeltaPhiNeutralPt) ;
698 outputContainer->Add(fhDeltaPhiUeNeutralPt) ;
699 outputContainer->Add(fhDeltaEtaNeutral) ;
700 outputContainer->Add(fhXENeutral) ;
701 outputContainer->Add(fhXEUeNeutral) ;
702 outputContainer->Add(fhPtHbpXENeutral) ;
703 outputContainer->Add(fhPtHbpXEUeNeutral) ;
704 outputContainer->Add(fhZTNeutral) ;
705 outputContainer->Add(fhZTUeNeutral) ;
706 outputContainer->Add(fhPtHbpZTNeutral) ;
707 outputContainer->Add(fhPtHbpZTUeNeutral) ;
711 fhDeltaPhiDecayNeutral = new TH2F
712 ("hDeltaPhiDecayNeutral","#phi_{Decay} - #phi_{h^{0}} vs p_{T Decay}",
713 nptbins,ptmin,ptmax,140,-2.,5.);
714 fhDeltaPhiDecayNeutral->SetYTitle("#Delta #phi");
715 fhDeltaPhiDecayNeutral->SetXTitle("p_{T Decay} (GeV/c)");
718 new TH2F("hXEDecayNeutral","x_{E} for decay trigger",
719 nptbins,ptmin,ptmax,200,0.,2.);
720 fhXEDecayNeutral->SetYTitle("x_{E}");
721 fhXEDecayNeutral->SetXTitle("p_{T decay}");
724 new TH2F("hZTDecayNeutral","z_{trigger h^{0}} = p_{T h^{0}} / p_{T Decay}",
725 nptbins,ptmin,ptmax,200,0.,2.);
726 fhZTDecayNeutral->SetYTitle("z_{h^{0}}");
727 fhZTDecayNeutral->SetXTitle("p_{T decay}");
729 outputContainer->Add(fhDeltaPhiDecayNeutral) ;
730 outputContainer->Add(fhXEDecayNeutral) ;
731 outputContainer->Add(fhZTDecayNeutral) ;
737 fhDeltaPhiUeLeftNeutral = new TH2F
738 ("hDeltaPhiUeLeftNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs p_{T h^{0}} with neutral UE left side range of trigger particles",
739 nptbins,ptmin,ptmax,140,-2.,5.);
740 fhDeltaPhiUeLeftNeutral->SetYTitle("#Delta #phi");
741 fhDeltaPhiUeLeftNeutral->SetXTitle("p_{T h^{0}} (GeV/c)");
742 outputContainer->Add(fhDeltaPhiUeLeftNeutral) ;
744 fhDeltaPhiUeRightNeutral = new TH2F
745 ("hDeltaPhiUeRightNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs p_{T Ueh^{0}} with neutral UE right side range of trigger particles",
746 nptbins,ptmin,ptmax,140,-2.,5.);
747 fhDeltaPhiUeRightNeutral->SetYTitle("#Delta #phi");
748 fhDeltaPhiUeRightNeutral->SetXTitle("p_{T h^{0}} (GeV/c)");
749 outputContainer->Add(fhDeltaPhiUeRightNeutral) ;
752 new TH2F("hXEUeNeutralLeft","x_{E} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE left side of trigger",
753 nptbins,ptmin,ptmax,140,0.,2.);
754 fhXEUeLeftNeutral->SetYTitle("z_{trigger Ueh^{0}}");
755 fhXEUeLeftNeutral->SetXTitle("p_{T trigger}");
756 outputContainer->Add(fhXEUeLeftNeutral) ;
759 new TH2F("hXEUeNeutralRight","x_{E} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE right side of trigger",
760 nptbins,ptmin,ptmax,200,0.,2.);
761 fhXEUeRightNeutral->SetYTitle("z_{trigger Ueh^{0}}");
762 fhXEUeRightNeutral->SetXTitle("p_{T trigger}");
763 outputContainer->Add(fhXEUeRightNeutral) ;
765 fhPtHbpXEUeLeftNeutral =
766 new TH2F("hHbpXEUeNeutralLeft","#xi = ln(1/x_{E}) with neutral UE left side of trigger",
767 nptbins,ptmin,ptmax,200,0.,10.);
768 fhPtHbpXEUeLeftNeutral->SetYTitle("ln(1/x_{E})");
769 fhPtHbpXEUeLeftNeutral->SetXTitle("p_{T trigger}");
770 outputContainer->Add(fhPtHbpXEUeLeftNeutral) ;
772 fhPtHbpXEUeRightNeutral =
773 new TH2F("hHbpXEUeNeutralRight","#xi = ln(1/x_{E}) with neutral UE right side of trigger",
774 nptbins,ptmin,ptmax,200,0.,10.);
775 fhPtHbpXEUeRightNeutral->SetYTitle("ln(1/x_{E})");
776 fhPtHbpXEUeRightNeutral->SetXTitle("p_{T trigger}");
777 outputContainer->Add(fhPtHbpXEUeRightNeutral) ;
780 new TH2F("hZTUeNeutralLeft","z_{trigger h^{0}} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE left side of trigger",
781 nptbins,ptmin,ptmax,140,0.,2.);
782 fhZTUeLeftNeutral->SetYTitle("z_{trigger Ueh^{0}}");
783 fhZTUeLeftNeutral->SetXTitle("p_{T trigger}");
784 outputContainer->Add(fhZTUeLeftNeutral) ;
787 new TH2F("hZTUeNeutralRight","z_{trigger h^{0}} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE right side of trigger",
788 nptbins,ptmin,ptmax,200,0.,2.);
789 fhZTUeRightNeutral->SetYTitle("z_{trigger Ueh^{0}}");
790 fhZTUeRightNeutral->SetXTitle("p_{T trigger}");
791 outputContainer->Add(fhZTUeRightNeutral) ;
793 fhPtHbpZTUeLeftNeutral =
794 new TH2F("hHbpZTUeNeutralLeft","#xi = ln(1/z_{T}) with neutral UE left side of trigger",
795 nptbins,ptmin,ptmax,200,0.,10.);
796 fhPtHbpZTUeLeftNeutral->SetYTitle("ln(1/z_{T})");
797 fhPtHbpZTUeLeftNeutral->SetXTitle("p_{T trigger}");
798 outputContainer->Add(fhPtHbpZTUeLeftNeutral) ;
800 fhPtHbpZTUeRightNeutral =
801 new TH2F("hHbpZTUeNeutralRight","#xi = ln(1/z_{T}) with neutral UE right side of trigger",
802 nptbins,ptmin,ptmax,200,0.,10.);
803 fhPtHbpZTUeRightNeutral->SetYTitle("ln(1/z_{T})");
804 fhPtHbpZTUeRightNeutral->SetXTitle("p_{T trigger}");
805 outputContainer->Add(fhPtHbpZTUeRightNeutral) ;
809 }//Correlation with neutral hadrons
811 //if data is MC, fill more histograms
814 fh2phiLeadingParticle=new TH2F("h2phiLeadingParticle","#phi resolustion for trigger particles",nptbins,ptmin,ptmax,100,-1,1);
815 fh2phiLeadingParticle->GetXaxis()->SetTitle("p_{T gen Leading} (GeV/c)");
816 fh2phiLeadingParticle->GetYaxis()->SetTitle("(#phi_{rec}-#phi_{gen})/#phi_{gen}");
818 fhMCLeadingCount=new TH1F("hMCLeadingTriggerCount","MCLeadingTriggerCount",nptbins,ptmin,ptmax);
819 fhMCLeadingCount->SetXTitle("p_{T trig}");
821 fhMCEtaCharged = new TH2F
822 ("hMCEtaCharged","MC #eta_{h^{#pm}} vs p_{T #pm}",
823 nptbins,ptmin,ptmax,netabins,etamin,etamax);
824 fhMCEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
825 fhMCEtaCharged->SetXTitle("p_{T #pm} (GeV/c)");
827 fhMCPhiCharged = new TH2F
828 ("hMCPhiCharged","#MC phi_{h^{#pm}} vs p_{T #pm}",
829 200,ptmin,ptmax,nphibins,phimin,phimax);
830 fhMCPhiCharged->SetYTitle("MC #phi_{h^{#pm}} (rad)");
831 fhMCPhiCharged->SetXTitle("p_{T #pm} (GeV/c)");
833 fhMCDeltaPhiDeltaEtaCharged = new TH2F
834 ("hMCDeltaPhiDeltaEtaCharged","#MC phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
835 140,-2.,5.,200,-2,2);
836 fhMCDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi");
837 fhMCDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
839 fhMCDeltaEtaCharged = new TH2F
840 ("hMCDeltaEtaCharged","MC #eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger} and p_{T assoc}",
841 nptbins,ptmin,ptmax,200,-2,2);
842 fhMCDeltaEtaCharged->SetYTitle("#Delta #eta");
843 fhMCDeltaEtaCharged->SetXTitle("p_{T trigger} (GeV/c)");
845 fhMCDeltaPhiCharged = new TH2F
846 ("hMCDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}",
847 nptbins,ptmin,ptmax,140,-2.,5.);
848 fhMCDeltaPhiCharged->SetYTitle("#Delta #phi");
849 fhMCDeltaPhiCharged->SetXTitle("p_{T trigger} (GeV/c)");
851 fhMCDeltaPhiChargedPt = new TH2F
852 ("hMCDeltaPhiChargedPt","MC #phi_{trigger} - #phi_{#h^{#pm}} vs p_{T h^{#pm}}",
853 nptbins,ptmin,ptmax,140,-2.,5.);
854 fhMCDeltaPhiChargedPt->SetYTitle("#Delta #phi");
855 fhMCDeltaPhiChargedPt->SetXTitle("p_{T h^{#pm}} (GeV/c)");
858 new TH2F("hMCPtXECharged","x_{E}",
859 nptbins,ptmin,ptmax,200,0.,2.);
860 fhMCPtXECharged->SetYTitle("x_{E}");
861 fhMCPtXECharged->SetXTitle("p_{T trigger}");
864 new TH2F("hMCHbpXECharged","MC #xi = ln(1/x_{E}) with charged hadrons",
865 nptbins,ptmin,ptmax,200,0.,10.);
866 fhMCPtHbpXECharged->SetYTitle("ln(1/x_{E})");
867 fhMCPtHbpXECharged->SetXTitle("p_{T trigger}");
870 new TH2F("hMCPtZTCharged","z_{T}",
871 nptbins,ptmin,ptmax,200,0.,2.);
872 fhMCPtZTCharged->SetYTitle("z_{T}");
873 fhMCPtZTCharged->SetXTitle("p_{T trigger}");
876 new TH2F("hMCHbpZTCharged","MC #xi = ln(1/z_{T}) with charged hadrons",
877 nptbins,ptmin,ptmax,200,0.,10.);
878 fhMCPtHbpZTCharged->SetYTitle("ln(1/z_{T})");
879 fhMCPtHbpZTCharged->SetXTitle("p_{T trigger}");
882 new TH2F("hMCPtTrigPout","AOD MC Pout with triggers",
883 nptbins,ptmin,ptmax,2*nptbins,-ptmax,ptmax);
884 fhMCPtTrigPout->SetYTitle("p_{out} (GeV/c)");
885 fhMCPtTrigPout->SetXTitle("p_{T trigger} (GeV/c)");
887 fhMCPtAssocDeltaPhi =
888 new TH2F("hMCPtAssocDeltaPhi","AOD MC delta phi with associated charged hadrons",
889 nptbins,ptmin,ptmax,140,-2.,5.);
890 fhMCPtAssocDeltaPhi->SetYTitle("#Delta #phi");
891 fhMCPtAssocDeltaPhi->SetXTitle("p_{T trigger} (GeV/c)");
893 outputContainer->Add(fh2phiLeadingParticle);
894 outputContainer->Add(fhMCLeadingCount);
895 outputContainer->Add(fhMCDeltaPhiDeltaEtaCharged);
896 outputContainer->Add(fhMCPhiCharged) ;
897 outputContainer->Add(fhMCEtaCharged) ;
898 outputContainer->Add(fhMCDeltaEtaCharged) ;
899 outputContainer->Add(fhMCDeltaPhiCharged) ;
901 outputContainer->Add(fhMCDeltaPhiChargedPt) ;
902 outputContainer->Add(fhMCPtXECharged) ;
903 outputContainer->Add(fhMCPtZTCharged) ;
904 outputContainer->Add(fhMCPtHbpXECharged) ;
905 outputContainer->Add(fhMCPtHbpZTCharged) ;
906 outputContainer->Add(fhMCPtTrigPout) ;
907 outputContainer->Add(fhMCPtAssocDeltaPhi) ;
910 return outputContainer;
914 //____________________________________________________
915 void AliAnaParticleHadronCorrelation::InitParameters()
918 //Initialize the parameters of the analysis.
919 SetInputAODName("PWG4Particle");
920 SetAODObjArrayName("Hadrons");
921 AddToHistogramsName("AnaHadronCorr_");
923 SetPtCutRange(0.,300);
924 fDeltaPhiMinCut = 1.5 ;
925 fDeltaPhiMaxCut = 4.5 ;
926 fSelectIsolated = kFALSE;
927 fMakeSeveralUE = kFALSE;
928 fUeDeltaPhiMinCut = 1. ;
929 fUeDeltaPhiMaxCut = 1.5 ;
930 fNeutralCorr = kFALSE ;
931 fPi0Trigger = kFALSE ;
933 fMakeAbsoluteLeading = kTRUE;
934 fMakeNearSideLeading = kFALSE;
937 fAssocPtBinLimit[0] = 1.5 ;
938 fAssocPtBinLimit[1] = 3. ;
939 fAssocPtBinLimit[2] = 5. ;
940 fAssocPtBinLimit[3] = 7. ;
941 fAssocPtBinLimit[4] = 9. ;
942 fAssocPtBinLimit[5] = 12. ;
943 fAssocPtBinLimit[6] = 15. ;
944 fAssocPtBinLimit[7] = 20. ;
945 fAssocPtBinLimit[8] = 100.;
946 fAssocPtBinLimit[9] = 200.;
950 //__________________________________________________________
951 void AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD()
953 //Particle-Hadron Correlation Analysis, fill AODs
955 if(!GetInputAODBranch())
957 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data());
961 if(strcmp(GetInputAODBranch()->GetClass()->GetName(), "AliAODPWG4ParticleCorrelation"))
963 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());
968 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - Begin hadron correlation analysis, fill AODs \n");
969 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In particle branch aod entries %d\n", GetInputAODBranch()->GetEntriesFast());
970 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In CTS aod entries %d\n", GetCTSTracks() ->GetEntriesFast());
971 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In EMCAL aod entries %d\n", GetEMCALClusters()->GetEntriesFast());
972 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In PHOS aod entries %d\n", GetPHOSClusters() ->GetEntriesFast());
975 //Get the vertex and check it is not too large in z
976 Double_t v[3] = {0,0,0}; //vertex ;
977 GetReader()->GetVertex(v);
978 if(!GetMixedEvent() && TMath::Abs(v[2]) > GetZvertexCut()) return ;
980 //Loop on stored AOD particles, find leading trigger
981 Double_t ptTrig = fMinTriggerPt ;
982 fLeadingTriggerIndex = -1 ;
983 Int_t naod = GetInputAODBranch()->GetEntriesFast() ;
984 for(Int_t iaod = 0; iaod < naod ; iaod++)
986 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
988 // Vertex cut in case of mixing
989 Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0));
990 if(check == 0) continue;
991 if(check == -1) return;
993 // find the leading particles with highest momentum
994 if (particle->Pt() > ptTrig)
996 ptTrig = particle->Pt() ;
997 fLeadingTriggerIndex = iaod ;
999 }// finish search of leading trigger particle
1002 //Do correlation with leading particle
1003 if(fLeadingTriggerIndex >= 0)
1006 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(fLeadingTriggerIndex));
1008 //check if the particle is isolated or if we want to take the isolation into account
1009 if(OnlyIsolated() && !particle->IsIsolated()) return;
1011 //Make correlation with charged hadrons
1012 Bool_t okcharged = kTRUE;
1013 Bool_t okneutral = kTRUE;
1014 if(GetReader()->IsCTSSwitchedOn() )
1015 okcharged = MakeChargedCorrelation(particle, GetCTSTracks(),kFALSE);
1017 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); //For the future, foresee more possible pi0 lists
1018 if(fNeutralCorr && pi0list && pi0list->GetEntriesFast() > 0)
1019 okneutral = MakeNeutralCorrelation(particle, pi0list,kFALSE);
1021 }//Correlate leading
1023 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - End fill AODs \n");
1027 //_________________________________________________________________
1028 void AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms()
1030 //Particle-Hadron Correlation Analysis, fill histograms
1032 if(!GetInputAODBranch())
1034 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data());
1040 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Begin hadron correlation analysis, fill histograms \n");
1041 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In particle branch aod entries %d\n", GetInputAODBranch()->GetEntriesFast());
1044 //Get the vertex and check it is not too large in z
1045 Double_t v[3] = {0,0,0}; //vertex ;
1046 GetReader()->GetVertex(v);
1047 if(!GetMixedEvent() && TMath::Abs(v[2]) > GetZvertexCut()) return ;
1049 //Loop on stored AOD particles, find leading
1050 Double_t ptTrig = fMinTriggerPt;
1051 if(fLeadingTriggerIndex < 0)
1053 //Search leading if not done before
1054 Int_t naod = GetInputAODBranch()->GetEntriesFast() ;
1055 for(Int_t iaod = 0; iaod < naod ; iaod++)
1056 { //loop on input trigger AOD file
1057 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
1059 // Vertex cut in case of mixing
1060 Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0));
1061 if(check == 0) continue;
1062 if(check == -1) return;
1064 //check if the particle is isolated or if we want to take the isolation into account
1065 if(OnlyIsolated() && !particle->IsIsolated()) continue;
1067 //find the leading particles with highest momentum
1068 if (particle->Pt() > ptTrig)
1070 ptTrig = particle->Pt() ;
1071 fLeadingTriggerIndex = iaod ;
1074 }// Finish search of leading trigger particle
1075 }// Search leading if not done before
1077 if(fLeadingTriggerIndex >= 0 )
1078 { //using trigger particle to do correlations
1080 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(fLeadingTriggerIndex));
1082 // Check if trigger is in fiducial region
1083 if(IsFiducialCutOn())
1085 Bool_t in = GetFiducialCut()->IsInFiducialCut(*particle->Momentum(),particle->GetDetector()) ;
1089 // Check if the particle is isolated or if we want to take the isolation into account
1090 if(OnlyIsolated() && !particle->IsIsolated()) return;
1092 // Make correlation with charged hadrons
1093 Bool_t okcharged = kTRUE;
1094 Bool_t okneutral = kTRUE;
1095 if(GetReader()->IsCTSSwitchedOn() )
1097 okcharged = MakeChargedCorrelation(particle, GetCTSTracks(),kTRUE);
1100 MakeMCChargedCorrelation(particle);
1104 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); //For the future, foresee more possible pi0 lists
1105 if(fNeutralCorr && pi0list)
1107 if(pi0list->GetEntriesFast() > 0)
1108 okneutral = MakeNeutralCorrelation(particle, pi0list,kTRUE);
1111 // Fill leading particle histogram if correlation went well and
1112 // no problem was found, like not absolute leading, or bad vertex in mixing.
1113 if(okcharged && okneutral)
1115 fhPtLeading->Fill(particle->Pt());
1116 Float_t phi = particle->Phi();
1117 if(phi<0)phi+=TMath::TwoPi();
1118 fhPhiLeading->Fill(particle->Pt(), phi);
1119 fhEtaLeading->Fill(particle->Pt(), particle->Eta());
1120 }//ok charged && neutral
1123 //Reinit for next event
1124 fLeadingTriggerIndex = -1;
1126 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - End fill histograms \n");
1129 //___________________________________________________________________________________________________________
1130 Bool_t AliAnaParticleHadronCorrelation::MakeChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle,
1131 const TObjArray* pl, const Bool_t bFillHisto)
1133 // Charged Hadron Correlation Analysis
1134 if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Make trigger particle - charged hadron correlation \n");
1136 Int_t evtIndex11 = -1 ; //cluster trigger or pi0 trigger
1137 Int_t evtIndex12 = -1 ; // pi0 trigger
1138 Int_t evtIndex13 = -1 ; // charged trigger
1139 Int_t indexPhoton1 = -1 ;
1140 Int_t indexPhoton2 = -1 ;
1142 Double_t v[3] = {0,0,0}; //vertex ;
1143 GetReader()->GetVertex(v);
1145 if (GetMixedEvent())
1147 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
1148 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
1149 evtIndex13 = GetMixedEvent()->EventIndex(aodParticle->GetTrackLabel(0)) ;
1152 Double_t phiTrig = aodParticle->Phi();
1153 Double_t ptTrig = aodParticle->Pt();
1155 Double_t pt = -100. ;
1156 Double_t px = -100. ;
1157 Double_t py = -100. ;
1158 Double_t zT = -100. ;
1159 Double_t xE = -100. ;
1160 Double_t hbpXE = -100. ;
1161 Double_t hbpZT = -100. ;
1162 Double_t phi = -100. ;
1163 Double_t eta = -100. ;
1164 Double_t pout = -100. ;
1166 Double_t ptDecay1 = 0. ;
1167 Double_t pxDecay1 = 0. ;
1168 Double_t pyDecay1 = 0. ;
1169 Double_t phiDecay1 = 0. ;
1170 Double_t ptDecay2 = 0. ;
1171 Double_t pxDecay2 = 0. ;
1172 Double_t pyDecay2 = 0. ;
1173 Double_t phiDecay2 = 0. ;
1175 Double_t ratDecay1 = -100. ;
1176 Double_t ratDecay2 = -100. ;
1177 Double_t deltaPhi = -100. ;
1178 Double_t deltaPhiOrg = -100. ;
1179 Double_t deltaPhiDecay1 = -100. ;
1180 Double_t deltaPhiDecay2 = -100. ;
1183 TLorentzVector photonMom ;
1184 TObjArray * clusters = 0x0 ;
1185 TObjArray * reftracks = 0x0;
1187 Int_t nTracks = GetCTSTracks()->GetEntriesFast() ;
1191 indexPhoton1 = aodParticle->GetCaloLabel (0);
1192 indexPhoton2 = aodParticle->GetCaloLabel (1);
1193 if(GetDebug() > 1)printf("indexPhoton1 = %d, indexPhoton2 = %d \n", indexPhoton1, indexPhoton2);
1195 if(indexPhoton1!=-1 && indexPhoton2!=-1)
1197 if(aodParticle->GetDetector()=="EMCAL") clusters = GetEMCALClusters() ;
1198 else clusters = GetPHOSClusters() ;
1200 for(Int_t iclus = 0; iclus < clusters->GetEntriesFast(); iclus++)
1202 AliVCluster * photon = (AliVCluster*) (clusters->At(iclus));
1203 photon->GetMomentum(photonMom,GetVertex(0)) ;
1204 if(photon->GetID()==indexPhoton1)
1206 ptDecay1 = photonMom.Pt();
1207 pxDecay1 = photonMom.Px();
1208 pyDecay1 = photonMom.Py();
1209 phiDecay1 = photonMom.Phi();
1210 if(ptTrig && bFillHisto) fhPtPi0DecayRatio->Fill(ptTrig, ptDecay1/ptTrig);
1212 if(photon->GetID()==indexPhoton2)
1214 ptDecay2 = photonMom.Pt();
1215 pxDecay2 = photonMom.Px();
1216 pyDecay2 = photonMom.Py();
1217 phiDecay2 = photonMom.Phi();
1218 if(ptTrig && bFillHisto) fhPtPi0DecayRatio->Fill(ptTrig, ptDecay2/ptTrig);
1221 if(GetDebug() > 1)printf("Photon1 = %f, Photon2 = %f \n", ptDecay1, ptDecay2);
1224 } //index of decay photons found
1225 } //make decay-hadron correlation
1227 //Track loop, select tracks with good pt, phi and fill AODs or histograms
1228 for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ )
1230 AliVTrack * track = (AliVTrack *) (pl->At(ipr)) ;
1232 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
1233 p3.SetXYZ(mom[0],mom[1],mom[2]);
1239 if(phi < 0) phi+=TMath::TwoPi();
1241 //Select only hadrons in pt range
1242 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
1244 //remove trigger itself for correlation when use charged triggers
1245 if( track->GetID() == aodParticle->GetTrackLabel(0) || track->GetID() == aodParticle->GetTrackLabel(1) ||
1246 track->GetID() == aodParticle->GetTrackLabel(2) || track->GetID() == aodParticle->GetTrackLabel(3) )
1249 //jump out this event if near side associated particle pt larger than trigger
1250 if (fMakeNearSideLeading)
1252 if(pt > ptTrig && TMath::Abs(phi-phiTrig) < TMath::PiOver2()) return kFALSE;
1254 //jump out this event if there is any other particle with pt larger than trigger
1255 else if(fMakeAbsoluteLeading)
1257 if(pt > ptTrig) return kFALSE;
1260 //Only for mixed event
1261 Int_t evtIndex2 = 0 ;
1262 if (GetMixedEvent())
1264 evtIndex2 = GetMixedEvent()->EventIndex(track->GetID()) ;
1265 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 || evtIndex13 == evtIndex2 ) // photon and track from different events
1268 if (TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut())
1274 if(indexPhoton1!=-1 && indexPhoton2!=-1)
1276 if(ptDecay1) ratDecay1 = pt/ptDecay1 ;
1277 if(ptDecay2) ratDecay2 = pt/ptDecay2 ;
1278 deltaPhiDecay1 = phiDecay1-phi;
1279 deltaPhiDecay2 = phiDecay2-phi;
1280 if(deltaPhiDecay1< -TMath::PiOver2()) deltaPhiDecay1+=TMath::TwoPi();
1281 if(deltaPhiDecay1>3*TMath::PiOver2()) deltaPhiDecay1-=TMath::TwoPi();
1282 if(deltaPhiDecay2< -TMath::PiOver2()) deltaPhiDecay2+=TMath::TwoPi();
1283 if(deltaPhiDecay2>3*TMath::PiOver2()) deltaPhiDecay2-=TMath::TwoPi();
1285 } //do decay-hadron correlation
1287 //Selection within angular range
1288 deltaPhi = phiTrig-phi;
1289 deltaPhiOrg = deltaPhi;
1290 if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
1291 if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
1295 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
1297 pout = pt*TMath::Sin(deltaPhi) ;
1299 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
1300 //if(xE <0.)xE =-xE;
1302 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
1305 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Charged hadron: pt %f, phi %f, phi trigger %f. Cuts: delta phi %2.2f < %2.2f < %2.2f, pT Trig min %2.2f \n",
1306 pt,phi, phiTrig,fDeltaPhiMinCut, deltaPhi, fDeltaPhiMaxCut, fMinTriggerPt);
1311 Int_t assocBin = -1;
1312 for(Int_t i = 0 ; i < fNAssocPtBins ; i++){
1313 if(pt > fAssocPtBinLimit[i] && pt < fAssocPtBinLimit[i+1]) assocBin= i;
1316 fhAssocPt->Fill(ptTrig,pt);
1318 //if(xE >= 1 ) printf("pTTrig = %f, pTHadron = %f, xE = %f\n",ptTrig,pt, xE);
1319 fhXE->Fill(ptTrig, xE) ;
1320 fhZT->Fill(ptTrig, zT) ;
1322 if(TMath::Cos(deltaPhi) < 0 && assocBin >= 0 )//away side
1324 fhXEAssocPtBin[assocBin]->Fill(ptTrig, xE) ;
1325 fhZTAssocPtBin[assocBin]->Fill(ptTrig, zT) ;
1328 //Hardcoded values, BAD, FIXME
1329 Double_t dphiBrad = atan2(sin(deltaPhiOrg), cos(deltaPhiOrg))/TMath::Pi();//-1 to 1
1330 if(TMath::Abs(dphiBrad)>0.325 && TMath::Abs(dphiBrad)<0.475)
1332 fhAssocPtBkg->Fill(ptTrig, pt);
1335 if(dphiBrad<-1./3) dphiBrad += 2;
1336 fhDeltaPhiBrad->Fill(ptTrig, dphiBrad);
1340 fhDeltaPhiBradAssocPtBin[assocBin]->Fill(ptTrig, dphiBrad);
1341 fhDeltaPhiAssocPtBin [assocBin]->Fill(ptTrig, deltaPhi);
1342 if(track->GetHMPIDsignal()>0)
1344 //printf("Track pt %f with HMPID signal %f \n",pt,track->GetHMPIDsignal());
1345 fhDeltaPhiAssocPtBinHMPID[assocBin]->Fill(ptTrig, deltaPhi);
1348 if(phi > 5*TMath::DegToRad() && phi < 20*TMath::DegToRad()){
1349 //printf("Track pt %f in HMPID acceptance phi %f \n ",pt,phi*TMath::RadToDeg() );
1350 fhDeltaPhiAssocPtBinHMPIDAcc[assocBin]->Fill(ptTrig, deltaPhi);
1355 fhEtaCharged ->Fill(pt,eta);
1356 fhPhiCharged ->Fill(pt,phi);
1357 fhDeltaEtaCharged->Fill(ptTrig,aodParticle->Eta()-eta);
1358 fhDeltaPhiCharged->Fill(ptTrig, deltaPhi);
1359 if(pt > 2 ) fhDeltaPhiDeltaEtaCharged->Fill(deltaPhi,aodParticle->Eta()-eta);
1361 if(GetDebug() > 2 ) printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
1362 //fill different multiplicity histogram
1365 for(Int_t im=0; im<GetMultiBin(); im++){
1366 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1)){
1367 fhTrigDeltaPhiCharged[im]->Fill(ptTrig,deltaPhi);
1368 fhTrigDeltaEtaCharged[im]->Fill(ptTrig,aodParticle->Eta()-eta);
1373 //delta phi cut for correlation
1374 if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) )
1376 fhDeltaPhiChargedPt ->Fill(pt ,deltaPhi);
1377 fhXECharged ->Fill(ptTrig, xE);
1378 fhPtHbpXECharged ->Fill(ptTrig, hbpXE);
1379 fhZTCharged ->Fill(ptTrig, zT);
1380 fhPtHbpZTCharged ->Fill(ptTrig, hbpZT);
1381 fhPtTrigPout ->Fill(ptTrig, pout) ;
1382 fhPtTrigCharged ->Fill(ptTrig, pt) ;
1384 if(track->Charge() > 0)
1386 fhXEPosCharged->Fill(ptTrig,xE) ;
1387 fhZTPosCharged->Fill(ptTrig,zT) ;
1391 fhXENegCharged->Fill(ptTrig,xE) ;
1392 fhZTNegCharged->Fill(ptTrig,zT) ;
1395 //fill different multiplicity histogram
1398 for(Int_t im=0; im<GetMultiBin(); im++)
1400 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
1402 fhTrigXECorr[im]->Fill(ptTrig,xE);
1403 fhTrigZTCorr[im]->Fill(ptTrig,zT);
1406 } //multiplicity events selection
1407 } //delta phi cut for correlation
1408 else if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) )
1410 fhDeltaPhiUeChargedPt->Fill(pt,deltaPhi);
1412 Double_t randomphi = gRandom->Uniform(TMath::Pi()/2,3*TMath::Pi()/2);
1413 Double_t uexE = -(pt/ptTrig)*TMath::Cos(randomphi);
1414 Double_t uezT = pt/ptTrig;
1416 if(uexE < 0.) uexE = -uexE;
1418 if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - xe = %f, uexE = %f \n", xE, uexE);
1420 fhXEUeCharged->Fill(ptTrig,uexE);
1421 if(uexE>0)fhPtHbpXEUeCharged->Fill(ptTrig,TMath::Log(1/uexE));
1423 fhZTUeCharged->Fill(ptTrig,uezT);
1424 if(uexE>0)fhPtHbpZTUeCharged->Fill(ptTrig,TMath::Log(1/uezT));
1428 for(Int_t im=0; im<GetMultiBin(); im++)
1430 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
1432 fhTrigXEUeCorr[im]->Fill(ptTrig,xE);
1433 fhTrigZTUeCorr[im]->Fill(ptTrig,zT);
1436 } //multiplicity events selection
1442 if(indexPhoton1!=-1 && indexPhoton2!=-1)
1444 fhDeltaPhiDecayCharged->Fill(ptDecay1, deltaPhiDecay1);
1445 fhDeltaPhiDecayCharged->Fill(ptDecay2, deltaPhiDecay2);
1447 if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
1449 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
1450 fhXEDecayCharged->Fill(ptDecay1,ratDecay1);
1452 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
1453 fhXEDecayCharged->Fill(ptDecay2,ratDecay2);
1455 if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - ratPhoton1 = %f, ratPhoton2 = %f \n", pt/ptDecay1, pt/ptDecay2);
1457 } //index of decay photons found
1458 } //make decay-hadron correlation
1460 //several UE calculation
1463 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-fUeDeltaPhiMaxCut))
1465 fhDeltaPhiUeLeftCharged->Fill(pt ,deltaPhi);
1466 fhXEUeLeftCharged ->Fill(ptTrig,xE);
1467 fhPtHbpXEUeLeftCharged ->Fill(ptTrig,hbpXE);
1468 fhZTUeLeftCharged ->Fill(ptTrig,zT);
1469 fhPtHbpZTUeLeftCharged ->Fill(ptTrig,hbpZT);
1472 if((deltaPhi>fUeDeltaPhiMinCut) && (deltaPhi <fUeDeltaPhiMaxCut))
1474 fhDeltaPhiUeRightCharged->Fill(pt ,deltaPhi);
1475 fhXEUeRightCharged ->Fill(ptTrig,xE);
1476 fhPtHbpXEUeRightCharged ->Fill(ptTrig,hbpXE);
1477 fhZTUeRightCharged ->Fill(ptTrig,zT);
1478 fhPtHbpZTUeRightCharged ->Fill(ptTrig,hbpZT);
1480 } //several UE calculation
1488 reftracks = new TObjArray(0);
1489 TString trackname = Form("%s+Tracks", GetAODObjArrayName().Data());
1490 reftracks->SetName(trackname.Data());
1491 reftracks->SetOwner(kFALSE);
1493 reftracks->Add(track);
1494 }//aod particle loop
1497 //Fill AOD with reference tracks, if not filling histograms
1498 if(!bFillHisto && reftracks)
1500 aodParticle->AddObjArray(reftracks);
1507 //________________________________________________________________________________________________________________
1508 Bool_t AliAnaParticleHadronCorrelation::MakeNeutralCorrelation(AliAODPWG4ParticleCorrelation * const aodParticle,
1509 const TObjArray* pi0list, const Bool_t bFillHisto)
1511 // Neutral Pion Correlation Analysis
1512 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Make trigger particle - pi0 correlation, %d pi0's \n",pi0list->GetEntriesFast());
1514 Int_t evtIndex11 = 0 ;
1515 Int_t evtIndex12 = 0 ;
1516 if (GetMixedEvent())
1518 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
1519 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
1522 Double_t pt = -100. ;
1523 Double_t px = -100. ;
1524 Double_t py = -100. ;
1525 Double_t zT = -100. ;
1526 Double_t phi = -100. ;
1527 Double_t eta = -100. ;
1528 Double_t xE = -100. ;
1529 Double_t hbpXE= -100. ;
1530 Double_t hbpZT= -100. ;
1532 Double_t ptTrig = aodParticle->Pt();
1533 Double_t phiTrig = aodParticle->Phi();
1534 Double_t etaTrig = aodParticle->Eta();
1535 //Double_t pxTrig = aodParticle->Px();
1536 //Double_t pyTrig = aodParticle->Py();
1538 Int_t indexPhoton1 =-1 ;
1539 Int_t indexPhoton2 =-1 ;
1540 Double_t ptDecay1 = 0. ;
1541 Double_t pxDecay1 = 0. ;
1542 Double_t pyDecay1 = 0. ;
1543 Double_t phiDecay1 = 0. ;
1544 Double_t ptDecay2 = 0. ;
1545 Double_t pxDecay2 = 0. ;
1546 Double_t pyDecay2 = 0. ;
1547 Double_t phiDecay2 = 0. ;
1549 Double_t ratDecay1 = -100. ;
1550 Double_t ratDecay2 = -100. ;
1551 Double_t deltaPhi = -100. ;
1552 Double_t deltaPhiDecay1 = -100. ;
1553 Double_t deltaPhiDecay2 = -100. ;
1555 TObjArray * clusters = 0x0 ;
1556 TLorentzVector photonMom ;
1559 indexPhoton1 = aodParticle->GetCaloLabel (0);
1560 indexPhoton2 = aodParticle->GetCaloLabel (1);
1562 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillHistograms() - indexPhoton1 = %d, indexPhoton2 = %d \n", indexPhoton1, indexPhoton2);
1564 if(indexPhoton1!=-1 && indexPhoton2!=-1)
1566 if(aodParticle->GetDetector()=="EMCAL") clusters = GetEMCALClusters() ;
1567 else clusters = GetPHOSClusters() ;
1569 for(Int_t iclus = 0; iclus < clusters->GetEntriesFast(); iclus++)
1571 AliVCluster * photon = (AliVCluster*) (clusters->At(iclus));
1572 photon->GetMomentum(photonMom,GetVertex(0)) ;
1573 if(photon->GetID()==indexPhoton1)
1575 ptDecay1 = photonMom.Pt();
1576 pxDecay1 = photonMom.Px();
1577 pyDecay1 = photonMom.Py();
1578 phiDecay1 = photonMom.Phi();
1581 if(photon->GetID()==indexPhoton2)
1583 ptDecay2 = photonMom.Pt();
1584 pxDecay2 = photonMom.Px();
1585 pyDecay2 = photonMom.Py();
1586 phiDecay2 = photonMom.Phi();
1590 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillHistograms() - Photon1 = %f, Photon2 = %f \n", ptDecay1, ptDecay2);
1593 } //index of decay photons found
1595 if(ptTrig && bFillHisto) fhPtPi0DecayRatio->Fill(ptTrig, ptDecay1/ptTrig, ptDecay2/ptTrig);
1597 } //make decay-hadron correlation
1599 TObjArray * refpi0 =0x0;
1602 //Loop on stored AOD pi0
1604 Int_t naod = pi0list->GetEntriesFast();
1606 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillHistograms() - aod branch entries %d\n", naod);
1608 for(Int_t iaod = 0; iaod < naod ; iaod++)
1610 AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (pi0list->At(iaod));
1612 Int_t evtIndex2 = 0 ;
1613 Int_t evtIndex3 = 0 ;
1614 if (GetMixedEvent())
1616 evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(0)) ;
1617 evtIndex3 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(1)) ;
1619 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 ||
1620 evtIndex11 == evtIndex3 || evtIndex12 == evtIndex3) // trigger and pi0 are not from different events
1624 //Int_t pdg = pi0->GetPdg();
1625 //if(pdg != AliCaloPID::kPi0) continue;
1631 if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
1633 //jumped out this event if near side associated particle pt larger than trigger
1634 if(pt > ptTrig && TMath::Abs(phi-phiTrig)<TMath::PiOver2()) break ;
1636 //Selection within angular range
1638 //Float_t deltaPhi = TMath::Abs(phiTrig-phi);
1639 //if( (deltaPhi < fDeltaPhiMinCut) || ( deltaPhi > fDeltaPhiMaxCut) ) continue ;
1644 deltaPhi = phiTrig-phi;
1645 if(deltaPhi<-TMath::PiOver2()) deltaPhi+=TMath::TwoPi();
1646 if(deltaPhi>3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
1652 xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
1654 //if(xE <0.)xE =-xE;
1659 if(xE > 0 ) hbpXE = TMath::Log(1./xE);
1660 if(zT > 0 ) hbpZT = TMath::Log(1./zT);
1664 if(indexPhoton1!=-1 && indexPhoton2!=-1)
1666 if(ptDecay1) ratDecay1 = pt/ptDecay1 ;
1667 if(ptDecay2) ratDecay2 = pt/ptDecay2 ;
1668 deltaPhiDecay1 = phiDecay1-phi;
1669 deltaPhiDecay2 = phiDecay2-phi;
1670 if(deltaPhiDecay1< -TMath::PiOver2()) deltaPhiDecay1+=TMath::TwoPi();
1671 if(deltaPhiDecay1>3*TMath::PiOver2()) deltaPhiDecay1-=TMath::TwoPi();
1672 if(deltaPhiDecay2< -TMath::PiOver2()) deltaPhiDecay2+=TMath::TwoPi();
1673 if(deltaPhiDecay2>3*TMath::PiOver2()) deltaPhiDecay2-=TMath::TwoPi();
1674 fhDeltaPhiDecayNeutral->Fill(ptDecay1, deltaPhiDecay1);
1675 fhDeltaPhiDecayNeutral->Fill(ptDecay2, deltaPhiDecay2);
1676 if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
1677 if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
1678 fhXEDecayNeutral->Fill(ptDecay1,ratDecay1);
1679 if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) )
1680 fhXEDecayNeutral->Fill(ptDecay2,ratDecay2);
1681 if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - ratPhoton1 = %f, ratPhoton2 = %f \n", pt/ptDecay1, pt/ptDecay2);
1683 } //do decay-hadron correlation
1685 fhEtaNeutral ->Fill(pt,eta);
1686 fhPhiNeutral ->Fill(pt,phi);
1687 fhDeltaEtaNeutral ->Fill(ptTrig,etaTrig-eta);
1688 fhDeltaPhiNeutral ->Fill(ptTrig,deltaPhi);
1689 fhDeltaPhiDeltaEtaNeutral->Fill(deltaPhi,etaTrig-eta);
1691 //delta phi cut for correlation
1692 if( (deltaPhi > fDeltaPhiMinCut) && ( deltaPhi < fDeltaPhiMaxCut) )
1694 fhDeltaPhiNeutralPt->Fill(pt,deltaPhi);
1695 fhXENeutral ->Fill(ptTrig,xE);
1696 fhPtHbpXENeutral ->Fill(ptTrig,hbpXE);
1700 fhDeltaPhiUeNeutralPt->Fill(pt,deltaPhi);
1701 fhXEUeNeutral ->Fill(ptTrig,xE);
1702 fhPtHbpXEUeNeutral ->Fill(ptTrig,hbpXE);
1704 //several UE calculation
1706 if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-fUeDeltaPhiMaxCut))
1708 fhDeltaPhiUeLeftNeutral->Fill(pt,deltaPhi);
1709 fhXEUeLeftNeutral ->Fill(ptTrig,xE);
1710 fhPtHbpXEUeLeftNeutral ->Fill(ptTrig,hbpXE);
1712 if((deltaPhi>fUeDeltaPhiMinCut) && (deltaPhi <fUeDeltaPhiMaxCut))
1714 fhDeltaPhiUeRightNeutral->Fill(pt,deltaPhi);
1715 fhXEUeRightNeutral ->Fill(ptTrig,xE);
1716 fhPtHbpXEUeRightNeutral ->Fill(ptTrig,hbpXE);
1718 } //several UE calculation
1725 refpi0 = new TObjArray(0);
1726 refpi0->SetName(GetAODObjArrayName()+"Pi0s");
1727 refpi0->SetOwner(kFALSE);
1730 }//put references in trigger AOD
1733 printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Selected neutral for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
1740 //_________________________________________________________________________________________________________
1741 void AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
1743 // Charged Hadron Correlation Analysis with MC information
1745 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation() - Make trigger particle - charged hadron correlation in AOD MC level\n");
1747 AliStack * stack = 0x0 ;
1748 TParticle * primary = 0x0 ;
1749 TClonesArray * mcparticles0 = 0x0 ;
1750 TClonesArray * mcparticles = 0x0 ;
1751 AliAODMCParticle * aodprimary = 0x0 ;
1753 Double_t eprim = 0 ;
1754 Double_t ptprim = 0 ;
1755 Double_t phiprim = 0 ;
1756 Double_t etaprim = 0 ;
1757 Double_t pxprim = 0 ;
1758 Double_t pyprim = 0 ;
1759 Double_t pzprim = 0 ;
1761 Int_t iParticle = 0 ;
1762 Double_t charge = 0.;
1764 Double_t mczT =-100 ;
1765 Double_t mcxE =-100 ;
1766 Double_t mchbpXE =-100 ;
1767 Double_t mchbpZT =-100 ;
1768 Double_t mcdeltaPhi = -100. ;
1770 //Track loop, select tracks with good pt, phi and fill AODs or histograms
1771 //Int_t currentIndex = -1 ;
1772 Double_t mcTrackPt = 0 ;
1773 Double_t mcTrackPhi = 0 ;
1774 Double_t mcTrackEta = 0 ;
1775 Double_t mcTrackPx = 0 ;
1776 Double_t mcTrackPy = 0 ;
1777 Double_t mcTrackPz = 0 ;
1779 if(GetReader()->ReadStack())
1781 nTracks = GetMCStack()->GetNtrack() ;
1785 nTracks = GetReader()->GetAODMCParticles()->GetEntriesFast() ;
1787 //Int_t trackIndex[nTracks];
1789 Int_t label= aodParticle->GetLabel();
1791 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** bad label ***: label %d \n", label);
1795 if(GetReader()->ReadStack())
1797 stack = GetMCStack() ;
1799 printf(" AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation- Stack not available, is the MC handler called? STOP\n");
1803 nTracks=stack->GetNprimary();
1804 if(label >= stack->GetNtrack())
1806 if(GetDebug() > 2) printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** large label ***: label %d, n tracks %d \n", label, stack->GetNtrack());
1810 primary = stack->Particle(label);
1813 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** no primary ***: label %d \n", label);
1819 eprim = primary->Energy();
1820 ptprim = primary->Pt();
1821 phiprim = primary->Phi();
1822 etaprim = primary->Eta();
1823 pxprim = primary->Px();
1824 pyprim = primary->Py();
1825 pzprim = primary->Pz();
1827 if(ptprim < 0.01 || eprim < 0.01) return ;
1829 for (iParticle = 0 ; iParticle < nTracks ; iParticle++)
1831 TParticle * particle = stack->Particle(iParticle);
1832 TLorentzVector momentum;
1834 //keep only final state particles
1835 if(particle->GetStatusCode()!=1) continue ;
1837 Int_t pdg = particle->GetPdgCode();
1839 charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
1841 particle->Momentum(momentum);
1843 //---------- Charged particles ----------------------
1846 //Particles in CTS acceptance
1847 Bool_t inCTS = GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
1849 if(TMath::Abs(pdg) == 11 && stack->Particle(particle->GetFirstMother())->GetPdgCode()==22) continue ;
1853 mcTrackPt = particle->Pt();
1854 mcTrackPhi = particle->Phi();
1855 mcTrackEta = particle->Eta();
1856 mcTrackPx = particle->Px();
1857 mcTrackPy = particle->Py();
1858 mcTrackPz = particle->Pz();
1859 if(mcTrackPhi < 0) mcTrackPhi+=TMath::TwoPi();
1861 //Select only hadrons in pt range
1862 if(mcTrackPt < fMinAssocPt || mcTrackPt > fMaxAssocPt) continue ;
1864 //remove trigger itself for correlation when use charged triggers
1865 if(label==iParticle &&
1866 TMath::Abs(mcTrackPt -ptprim ) < 1e-6 &&
1867 TMath::Abs(mcTrackPhi-phiprim) < 1e-6 &&
1868 TMath::Abs(mcTrackEta-etaprim) < 1e-6)
1871 //jumped out this event if near side associated partile pt larger than trigger
1872 if( mcTrackPt > ptprim && TMath::Abs(mcTrackPhi-phiprim) < TMath::PiOver2())
1875 mcdeltaPhi= phiprim-mcTrackPhi;
1876 if(mcdeltaPhi <= -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
1877 if(mcdeltaPhi > 3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
1879 mcdeltaPhi = phiprim-mcTrackPhi;
1880 mczT = mcTrackPt/ptprim ;
1881 mcxE =-mcTrackPt/ptprim*TMath::Cos(mcdeltaPhi);// -(mcTrackPx*pxprim+mcTrackPy*pyprim)/(ptprim*ptprim);
1884 if(mcxE > 0 ) mchbpXE = TMath::Log(1./mcxE);
1885 if(mczT > 0 ) mchbpZT = TMath::Log(1./mczT);
1887 // printf("rat = %f, xE = %f, cosi =%f \n", rat, xE, cosi);
1888 // printf("phi = %f \n", phi);
1890 //Selection within angular range
1891 if( mcdeltaPhi< -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
1892 if( mcdeltaPhi>3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
1893 Double_t mcpout = mcTrackPt*TMath::Sin(mcdeltaPhi) ;
1895 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",
1896 mcTrackPt,mcTrackPhi, phiprim,fDeltaPhiMinCut, mcdeltaPhi, fDeltaPhiMaxCut, GetMinPt());
1898 fhMCEtaCharged->Fill(mcTrackPt,mcTrackEta);
1899 fhMCPhiCharged->Fill(mcTrackPt,mcTrackPhi);
1900 fhMCDeltaEtaCharged->Fill(ptprim,etaprim-mcTrackEta);
1901 fhMCDeltaPhiCharged->Fill(ptprim,mcdeltaPhi);
1902 fhMCPtAssocDeltaPhi->Fill(mcTrackPt, mcdeltaPhi);
1903 fhMCDeltaPhiDeltaEtaCharged->Fill(mcdeltaPhi,etaprim-mcTrackEta);
1905 //delta phi cut for correlation
1906 if( (mcdeltaPhi > fDeltaPhiMinCut) && ( mcdeltaPhi < fDeltaPhiMaxCut) ) {
1907 fhMCDeltaPhiChargedPt->Fill(mcTrackPt,mcdeltaPhi);
1908 fhMCPtXECharged ->Fill(ptprim,mcxE);
1909 fhMCPtHbpXECharged ->Fill(ptprim,mchbpXE);
1910 fhMCPtZTCharged ->Fill(ptprim,mczT);
1911 fhMCPtHbpZTCharged ->Fill(ptprim,mchbpZT);
1912 fhMCPtTrigPout ->Fill(ptprim, mcpout) ;
1913 }//delta phi cut for correlation
1914 } //tracks after cuts
1917 } //when the leading particles could trace back to MC
1919 else if(GetReader()->ReadAODMCParticles())
1921 //Get the list of MC particles
1922 mcparticles0 = GetReader()->GetAODMCParticles(0);
1923 if(!mcparticles0) return;
1924 if(label >=mcparticles0->GetEntriesFast())
1927 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** large label ***: label %d, n tracks %d \n", label,mcparticles0->GetEntriesFast());
1931 aodprimary = (AliAODMCParticle*) mcparticles0->At(label);
1934 printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation *** no AOD primary ***: label %d \n", label);
1940 ptprim = aodprimary->Pt();
1941 phiprim = aodprimary->Phi();
1942 etaprim = aodprimary->Eta();
1943 pxprim = aodprimary->Px();
1944 pyprim = aodprimary->Py();
1945 pzprim = aodprimary->Pz();
1947 if(ptprim < 0.01 || eprim < 0.01) return ;
1949 mcparticles= GetReader()->GetAODMCParticles();
1950 for (Int_t i=0; i<nTracks;i++)
1952 AliAODMCParticle *part = (AliAODMCParticle*) mcparticles->At(i);
1953 if (!part->IsPhysicalPrimary()) continue;
1954 Int_t pdg = part->GetPdgCode();
1955 charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
1956 TLorentzVector momentum(part->Px(),part->Py(),part->Pz(),part->E());
1959 if(part->Pt()> GetReader()->GetCTSPtMin())
1961 //Particles in CTS acceptance
1962 Bool_t inCTS = GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
1963 Int_t indexmother=part->GetMother();
1966 Int_t mPdg = ((AliAODMCParticle*) mcparticles->At(indexmother)) ->GetPdgCode();
1967 if(TMath::Abs(pdg) == 11 && mPdg == 22) continue;
1972 mcTrackPt =part->Pt();
1973 mcTrackPhi =part->Phi();
1974 mcTrackEta =part->Eta();
1975 mcTrackPx =part->Px();
1976 mcTrackPy =part->Py();
1977 mcTrackPz =part->Pz();
1978 if(mcTrackPhi < 0) mcTrackPhi+=TMath::TwoPi();
1980 //Select only hadrons in pt range
1981 if(mcTrackPt < GetMinPt() || mcTrackPt > GetMaxPt()) continue ;
1983 //remove trigger itself for correlation when use charged triggers
1985 TMath::Abs(mcTrackPt -ptprim ) < 1e-6 &&
1986 TMath::Abs(mcTrackPhi-phiprim) < 1e-6 &&
1987 TMath::Abs(mcTrackEta-etaprim) < 1e-6) continue ;
1989 //jumped out this event if near side associated partile pt larger than trigger
1990 if( mcTrackPt> ptprim && TMath::Abs(mcTrackPhi-phiprim)<TMath::PiOver2())
1993 mcdeltaPhi= phiprim-mcTrackPhi;
1994 if(mcdeltaPhi <= -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
1995 if(mcdeltaPhi > 3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
1997 mczT = mcTrackPt/ptprim ;
1998 mcxE =-mcTrackPt/ptprim*TMath::Cos(mcdeltaPhi);// -(mcTrackPx*pxprim+mcTrackPy*pyprim)/(ptprim*ptprim);
2001 if(mcxE > 0 ) mchbpXE = TMath::Log(1./mcxE);
2002 if(mczT > 0 ) mchbpZT = TMath::Log(1./mczT);
2004 //Selection within angular range
2005 if( mcdeltaPhi< -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi();
2006 if( mcdeltaPhi>3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi();
2007 Double_t mcpout = mcTrackPt*TMath::Sin(mcdeltaPhi) ;
2009 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",
2010 mcTrackPt,mcTrackPhi, phiprim,fDeltaPhiMinCut, mcdeltaPhi, fDeltaPhiMaxCut, GetMinPt());
2014 fhMCEtaCharged ->Fill(mcTrackPt,mcTrackEta);
2015 fhMCPhiCharged ->Fill(mcTrackPt,mcTrackPhi);
2016 fhMCDeltaEtaCharged->Fill(ptprim,etaprim-mcTrackEta);
2017 fhMCDeltaPhiCharged->Fill(ptprim,mcdeltaPhi);
2018 fhMCPtAssocDeltaPhi->Fill(mcTrackPt, mcdeltaPhi);
2019 fhMCDeltaPhiDeltaEtaCharged->Fill(mcdeltaPhi,etaprim-mcTrackEta);
2021 //delta phi cut for correlation
2022 if( (mcdeltaPhi > fDeltaPhiMinCut) && ( mcdeltaPhi < fDeltaPhiMaxCut) ) {
2023 fhMCDeltaPhiChargedPt ->Fill(mcTrackPt,mcdeltaPhi);
2024 fhMCPtXECharged ->Fill(ptprim,mcxE);
2025 fhMCPtHbpXECharged ->Fill(ptprim,mchbpXE);
2026 fhMCPtZTCharged ->Fill(ptprim,mczT);
2027 fhMCPtHbpZTCharged ->Fill(ptprim,mchbpZT);
2028 fhMCPtTrigPout ->Fill(ptprim, mcpout) ;
2029 }//delta phi cut for correlation
2031 } //tracks after cuts
2033 } //with minimum pt cut
2034 } //only charged particles
2035 } //MC particle loop
2036 } //when the leading particles could trace back to MC
2040 //_____________________________________________________________________
2041 void AliAnaParticleHadronCorrelation::Print(const Option_t * opt) const
2044 //Print some relevant parameters set for the analysis
2048 printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
2049 AliAnaCaloTrackCorrBaseClass::Print(" ");
2050 printf("Pt trigger > %3.2f\n", fMinTriggerPt) ;
2051 printf("Pt associated hadron < %3.2f\n", fMaxAssocPt) ;
2052 printf("Pt associated hadron > %3.2f\n", fMinAssocPt) ;
2053 printf("Phi trigger particle-Hadron < %3.2f\n", fDeltaPhiMaxCut) ;
2054 printf("Phi trigger particle-Hadron > %3.2f\n", fDeltaPhiMinCut) ;
2055 printf("Phi trigger particle-UeHadron < %3.2f\n", fUeDeltaPhiMaxCut) ;
2056 printf("Phi trigger particle-UeHadron > %3.2f\n", fUeDeltaPhiMinCut) ;
2057 printf("Isolated Trigger? %d\n" , fSelectIsolated) ;
2058 printf("Several UE? %d\n" , fMakeSeveralUE) ;
2059 printf("Name of AOD Pi0 Branch %s \n", fPi0AODBranchName.Data());
2060 printf("Do Decay-hadron correlation ? %d\n", fPi0Trigger) ;
2061 printf("Select absolute leading for cluster triggers ? %d or Near Side %d\n",
2062 fMakeAbsoluteLeading, fMakeNearSideLeading) ;
2063 printf("Trigger pt bins %d\n", fNAssocPtBins) ;
2064 for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) {
2065 printf("\t bin %d = [%2.1f,%2.1f]\n", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ;
2070 //____________________________________________________________
2071 void AliAnaParticleHadronCorrelation::SetNAssocPtBins(Int_t n)
2073 // Set number of bins
2084 printf("n = larger than 9 or too small, set to 9 \n");
2089 //______________________________________________________________________________
2090 void AliAnaParticleHadronCorrelation::SetAssocPtBinLimit(Int_t ibin, Float_t pt)
2092 // Set the list of limits for the trigger pt bins
2094 if(ibin <= fNAssocPtBins || ibin >= 0)
2096 fAssocPtBinLimit[ibin] = pt ;
2099 printf("AliAnaParticleHadronCorrelation::SetAssocPtBinLimit() - bin number too large %d > %d or small, nothing done\n", ibin, fNAssocPtBins) ;