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 **************************************************************************/
17 //_________________________________________________________________________
18 // Class for the analysis of particle - hadron correlations
19 // Particle (for example direct gamma) must be found in a previous analysis
20 //-- Author: Gustavo Conesa (LNF-INFN)
22 // Modified by Yaxian Mao:
23 // 1. add the UE subtraction for corrlation study
24 // 2. change the correlation variable
25 // 3. Only use leading particle(cluster/track) as trigger for correlation (2010/07/02)
26 // 4. Make decay photon-hadron correlations where decay contribute pi0 mass (2010/09/09)
27 // 5. fill the pout to extract kt at the end, also to study charge asymmetry(2010/10/06)
28 //////////////////////////////////////////////////////////////////////////////
31 // --- ROOT system ---
32 //#include "TClonesArray.h"
37 //---- ANALYSIS system ----
38 #include "AliNeutralMesonSelection.h"
39 #include "AliAnaParticleHadronCorrelation.h"
40 #include "AliCaloTrackReader.h"
41 #include "AliCaloPID.h"
42 #include "AliAODPWG4ParticleCorrelation.h"
43 #include "AliFiducialCut.h"
44 #include "AliAODTrack.h"
45 #include "AliVCluster.h"
46 #include "AliMCAnalysisUtils.h"
47 #include "TParticle.h"
49 #include "AliAODMCParticle.h"
50 #include "AliMixedEvent.h"
52 ClassImp(AliAnaParticleHadronCorrelation)
55 //____________________________________________________________________________
56 AliAnaParticleHadronCorrelation::AliAnaParticleHadronCorrelation():
57 AliAnaPartCorrBaseClass(),
58 fDeltaPhiMaxCut(0.), fDeltaPhiMinCut(0.), fSelectIsolated(0),
59 fMakeSeveralUE(0), fUeDeltaPhiMaxCut(0.), fUeDeltaPhiMinCut(0.),
60 fPi0AODBranchName(""),fNeutralCorr(0), fPi0Trigger(0),
61 // fMultiBin(0),fNZvertBin(0),fNrpBin(0),fZvtxCut(0.),
62 // fUseSelectEvent(kFALSE),
63 // fhNclustersNtracks(0), //fhVertex(0),
64 fhPtLeading(0),fhPhiLeading(0),fhEtaLeading(0),
65 fhDeltaPhiDeltaEtaCharged(0),
66 fhPhiCharged(0), fhEtaCharged(0),
69 fhDeltaPhiChargedPt(0),
70 fhDeltaPhiUeChargedPt(0),
71 fhPtImbalanceCharged(0),
72 fhPtImbalanceUeCharged(0),
73 fhPtImbalancePosCharged(0),fhPtImbalanceNegCharged(0),
74 fhPtHbpCharged(0), fhPtHbpUeCharged(0),
75 fhDeltaPhiUeLeftCharged(0),fhDeltaPhiUeRightCharged(0),
76 fhPtImbalanceUeLeftCharged(0),fhPtImbalanceUeRightCharged(0),
77 fhPtHbpUeLeftCharged(0),fhPtHbpUeRightCharged(0),
78 fhPoutPtTrigPtAssoc(0), fhUePoutPtTrigPtAssoc(0),
80 fhTrigDeltaPhiDeltaEtaCharged(0x0), fhTrigCorr(0x0),fhTrigUeCorr(0x0),
81 fhDeltaPhiDeltaEtaNeutral(0),
82 fhPhiNeutral(0), fhEtaNeutral(0),
83 fhDeltaPhiNeutral(0), fhDeltaEtaNeutral(0),
84 fhDeltaPhiNeutralPt(0),fhDeltaPhiUeNeutralPt(0),
85 fhPtImbalanceNeutral(0),fhPtImbalanceUeNeutral(0),
86 fhPtHbpNeutral(0), fhPtHbpUeNeutral(0),
87 fhDeltaPhiUeLeftNeutral(0),fhDeltaPhiUeRightNeutral(0),
88 fhPtImbalanceUeLeftNeutral(0),fhPtImbalanceUeRightNeutral(0),
89 fhPtHbpUeLeftNeutral(0),fhPtHbpUeRightNeutral(0),
91 fhDeltaPhiDecayCharged(0),
92 fhPtImbalanceDecayCharged(0),
93 fhDeltaPhiDecayNeutral(0),
94 fhPtImbalanceDecayNeutral(0)
98 //Initialize parameters
102 //________________________________________________________________________
103 TList * AliAnaParticleHadronCorrelation::GetCreateOutputObjects()
106 // Create histograms to be saved in output file and
107 // store them in fOutputContainer
108 TList * outputContainer = new TList() ;
109 outputContainer->SetName("CorrelationHistos") ;
111 Int_t nptbins = GetHistoPtBins();
112 Int_t nphibins = GetHistoPhiBins();
113 Int_t netabins = GetHistoEtaBins();
114 Float_t ptmax = GetHistoPtMax();
115 Float_t phimax = GetHistoPhiMax();
116 Float_t etamax = GetHistoEtaMax();
117 Float_t ptmin = GetHistoPtMin();
118 Float_t phimin = GetHistoPhiMin();
119 Float_t etamin = GetHistoEtaMin();
122 // fhNclustersNtracks = new TH2F ("Multiplicity","Neutral cluster and charged track multiplicity",1000, 0., 1000.,1000, 0., 1000.);
123 // fhNclustersNtracks->SetYTitle("# of tracks");
124 // fhNclustersNtracks->SetXTitle("# of clusters");
126 fhPtLeading = new TH1F ("hPtLeading","p_T distribution of leading particles", nptbins,ptmin,ptmax);
127 fhPtLeading->SetXTitle("p_{T}^{trig} (GeV/c)");
129 fhPhiLeading = new TH2F ("hPhiLeading","#phi distribution of leading Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
130 fhPhiLeading->SetYTitle("#phi (rad)");
132 fhEtaLeading = new TH2F ("hEtaLeading","#eta distribution of leading",nptbins,ptmin,ptmax, netabins,etamin,etamax);
133 fhEtaLeading->SetYTitle("#eta ");
134 // outputContainer->Add(fhNclustersNtracks);
135 outputContainer->Add(fhPtLeading);
136 outputContainer->Add(fhPhiLeading);
137 outputContainer->Add(fhEtaLeading);
139 //Correlation with charged hadrons
140 if(GetReader()->IsCTSSwitchedOn()) {
141 fhDeltaPhiDeltaEtaCharged = new TH2F
142 ("DeltaPhiDeltaEtaCharged","#phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
143 140,-2.,5.,200,-2,2);
144 fhDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi");
145 fhDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
147 fhPhiCharged = new TH2F
148 ("PhiCharged","#phi_{h^{#pm}} vs p_{T #pm}",
149 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
150 fhPhiCharged->SetYTitle("#phi_{h^{#pm}} (rad)");
151 fhPhiCharged->SetXTitle("p_{T #pm} (GeV/c)");
153 fhEtaCharged = new TH2F
154 ("EtaCharged","#eta_{h^{#pm}} vs p_{T #pm}",
155 nptbins,ptmin,ptmax,netabins,etamin,etamax);
156 fhEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)");
157 fhEtaCharged->SetXTitle("p_{T #pm} (GeV/c)");
159 fhDeltaPhiCharged = new TH2F
160 ("DeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}",
161 nptbins,ptmin,ptmax,140,-2.,5.);
162 fhDeltaPhiCharged->SetYTitle("#Delta #phi");
163 fhDeltaPhiCharged->SetXTitle("p_{T trigger} (GeV/c)");
165 fhDeltaPhiChargedPt = new TH2F
166 ("DeltaPhiChargedPt","#phi_{trigger} - #phi_{#h^{#pm}} vs p_{T h^{#pm}}",
167 nptbins,ptmin,ptmax,140,-2.,5.);
168 fhDeltaPhiChargedPt->SetYTitle("#Delta #phi");
169 fhDeltaPhiChargedPt->SetXTitle("p_{T h^{#pm}} (GeV/c)");
171 fhDeltaPhiUeChargedPt = new TH2F
172 ("DeltaPhiUeChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}}",
173 nptbins,ptmin,ptmax,140,-2.,5.);
174 fhDeltaPhiUeChargedPt->SetYTitle("#Delta #phi");
175 fhDeltaPhiUeChargedPt->SetXTitle("p_{T h^{#pm}} (GeV/c)");
177 fhDeltaEtaCharged = new TH2F
178 ("DeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger}",
179 nptbins,ptmin,ptmax,200,-2,2);
180 fhDeltaEtaCharged->SetYTitle("#Delta #eta");
181 fhDeltaEtaCharged->SetXTitle("p_{T trigger} (GeV/c)");
183 fhPtImbalanceCharged =
184 new TH2F("CorrelationCharged","z_{trigger h^{#pm}} = p_{T h^{#pm}} / p_{T trigger}",
185 nptbins,ptmin,ptmax,200,0.,2.);
186 fhPtImbalanceCharged->SetYTitle("z_{trigger h^{#pm}}");
187 fhPtImbalanceCharged->SetXTitle("p_{T trigger}");
189 fhPtImbalanceUeCharged =
190 new TH2F("CorrelationUeCharged","z_{trigger h^{#pm}} = p_{T Ueh^{#pm}} / p_{T trigger}",
191 nptbins,ptmin,ptmax,200,0.,2.);
192 fhPtImbalanceUeCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
193 fhPtImbalanceUeCharged->SetXTitle("p_{T trigger}");
195 fhPtImbalancePosCharged =
196 new TH2F("CorrelationPositiveCharged","z_{trigger h^{+}} = p_{T h^{+}} / p_{T trigger}",
197 nptbins,ptmin,ptmax,200,0.,2.);
198 fhPtImbalancePosCharged->SetYTitle("z_{trigger h^{+}}");
199 fhPtImbalancePosCharged->SetXTitle("p_{T trigger}");
201 fhPtImbalanceNegCharged =
202 new TH2F("CorrelationNegativeCharged","z_{trigger h^{-}} = p_{T h^{-}} / p_{T trigger}",
203 nptbins,ptmin,ptmax,200,0.,2.);
204 fhPtImbalanceNegCharged->SetYTitle("z_{trigger h^{-}}");
205 fhPtImbalanceNegCharged->SetXTitle("p_{T trigger}");
208 new TH2F("HbpCharged","#xi = ln(1/x_{E}) with charged hadrons",
209 nptbins,ptmin,ptmax,200,0.,10.);
210 fhPtHbpCharged->SetYTitle("ln(1/x_{E})");
211 fhPtHbpCharged->SetXTitle("p_{T trigger}");
214 new TH2F("HbpUeCharged","#xi = ln(1/x_{E}) with charged hadrons",
215 nptbins,ptmin,ptmax,200,0.,10.);
216 fhPtHbpUeCharged->SetYTitle("ln(1/x_{E})");
217 fhPtHbpUeCharged->SetXTitle("p_{T trigger}");
219 fhPoutPtTrigPtAssoc =
220 new TH3D("PoutPtTrigPtAssoc","Pout with charged hadrons",
221 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax,2*nptbins,-ptmax,ptmax);
222 fhPoutPtTrigPtAssoc->SetZTitle("p_{out} (GeV/c)");
223 fhPoutPtTrigPtAssoc->SetYTitle("p_{T associated} (GeV/c)");
224 fhPoutPtTrigPtAssoc->SetXTitle("p_{T trigger} (GeV/c)");
226 fhUePoutPtTrigPtAssoc =
227 new TH3D("UePoutPtTrigPtAssoc"," UE Pout with charged hadrons",
228 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax,2*nptbins,-ptmax,ptmax);
229 fhUePoutPtTrigPtAssoc->SetZTitle("p_{out} (GeV/c)");
230 fhUePoutPtTrigPtAssoc->SetYTitle("p_{T associated} (GeV/c)");
231 fhUePoutPtTrigPtAssoc->SetXTitle("p_{T trigger} (GeV/c)");
234 new TH2F("PtTrigCharged","trgger and charged tracks pt distribution",
235 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
236 fhPtTrigCharged->SetYTitle("p_{T asso} (GeV/c)");
237 fhPtTrigCharged->SetXTitle("p_{T trigger} (GeV/c)");
239 outputContainer->Add(fhDeltaPhiDeltaEtaCharged);
240 outputContainer->Add(fhPhiCharged) ;
241 outputContainer->Add(fhEtaCharged) ;
242 outputContainer->Add(fhDeltaPhiCharged) ;
243 outputContainer->Add(fhDeltaEtaCharged) ;
244 outputContainer->Add(fhDeltaPhiChargedPt) ;
245 outputContainer->Add(fhDeltaPhiUeChargedPt) ;
246 outputContainer->Add(fhPtImbalanceCharged) ;
247 outputContainer->Add(fhPtImbalancePosCharged) ;
248 outputContainer->Add(fhPtImbalanceNegCharged) ;
249 outputContainer->Add(fhPtImbalanceUeCharged) ;
250 outputContainer->Add(fhPtHbpCharged) ;
251 outputContainer->Add(fhPtHbpUeCharged) ;
252 outputContainer->Add(fhPoutPtTrigPtAssoc) ;
253 outputContainer->Add(fhUePoutPtTrigPtAssoc) ;
254 outputContainer->Add(fhPtTrigCharged) ;
257 Int_t nMultiBins = GetMultiBin();
258 fhTrigDeltaPhiDeltaEtaCharged = new TH3D*[nMultiBins] ;
259 fhTrigCorr = new TH2F*[nMultiBins];
260 fhTrigUeCorr = new TH2F*[nMultiBins];
261 for(Int_t im=0; im<nMultiBins; im++){
262 fhTrigDeltaPhiDeltaEtaCharged[im] = new TH3D
263 (Form("fhTrigDeltaPhiDeltaEtaCharged_%d",im),Form("fhTrigDeltaPhiDeltaEtaCharged_%d",im), nptbins,ptmin,ptmax, 140,-2.,5., 200,-2,2);
264 fhTrigDeltaPhiDeltaEtaCharged[im]->SetXTitle("p_{T trigger} (GeV/c)");
265 fhTrigDeltaPhiDeltaEtaCharged[im]->SetYTitle("#Delta #phi");
266 fhTrigDeltaPhiDeltaEtaCharged[im]->SetZTitle("#Delta #eta");
267 fhTrigCorr[im] = new TH2F
268 (Form("fhTrigPtCorr_%d",im),Form("fhTrigPtCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
269 fhTrigCorr[im]->SetYTitle("z_{trigger h^{#pm}}");
270 fhTrigCorr[im]->SetXTitle("p_{T trigger}");
271 fhTrigUeCorr[im] = new TH2F
272 (Form("fhTrigPtUeCorr_%d",im),Form("fhTrigPtUeCorr_%d",im), nptbins,ptmin,ptmax,200,0.,2.);
273 fhTrigUeCorr[im]->SetYTitle("z_{trigger h^{#pm}}");
274 fhTrigUeCorr[im]->SetXTitle("p_{T trigger}");
276 outputContainer->Add(fhTrigDeltaPhiDeltaEtaCharged[im]) ;
277 outputContainer->Add(fhTrigCorr[im]);
278 outputContainer->Add(fhTrigUeCorr[im]);
284 fhPtPi0DecayRatio = new TH2F
285 ("hPtPi0DecayRatio","p_T of #pi^{0} and the ratio of pt for two decay",
286 nptbins,ptmin,ptmax, 100,0.,2.);
287 fhPtPi0DecayRatio->SetXTitle("p_{T}^{#pi^{0}} (GeV/c)");
288 fhPtPi0DecayRatio->SetYTitle("p_{T}^{Decay}/p_{T}^{#pi^{0}}");
290 fhDeltaPhiDecayCharged = new TH2F
291 ("DeltaPhiDecayCharged","#phi_{Decay} - #phi_{h^{#pm}} vs p_{T Decay}",
292 nptbins,ptmin,ptmax,140,-2.,5.);
293 fhDeltaPhiDecayCharged->SetYTitle("#Delta #phi");
294 fhDeltaPhiDecayCharged->SetXTitle("p_{T Decay} (GeV/c)");
296 fhPtImbalanceDecayCharged =
297 new TH2F("CorrelationDecayCharged","z_{trigger h^{#pm}} = p_{T h^{#pm}} / p_{T Decay}",
298 nptbins,ptmin,ptmax,200,0.,2.);
299 fhPtImbalanceDecayCharged->SetYTitle("z_{decay h^{#pm}}");
300 fhPtImbalanceDecayCharged->SetXTitle("p_{T decay}");
302 outputContainer->Add(fhPtPi0DecayRatio) ;
303 outputContainer->Add(fhDeltaPhiDecayCharged) ;
304 outputContainer->Add(fhPtImbalanceDecayCharged) ;
309 fhDeltaPhiUeLeftCharged = new TH2F
310 ("DeltaPhiUeLeftChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE left side range of trigger particles",
311 nptbins,ptmin,ptmax,140,-2.,5.);
312 fhDeltaPhiUeLeftCharged->SetYTitle("#Delta #phi");
313 fhDeltaPhiUeLeftCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
314 outputContainer->Add(fhDeltaPhiUeLeftCharged) ;
316 fhDeltaPhiUeRightCharged = new TH2F
317 ("DeltaPhiUeRightChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE right side range of trigger particles",
318 nptbins,ptmin,ptmax,140,-2.,5.);
319 fhDeltaPhiUeRightCharged->SetYTitle("#Delta #phi");
320 fhDeltaPhiUeRightCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)");
321 outputContainer->Add(fhDeltaPhiUeRightCharged) ;
323 fhPtImbalanceUeLeftCharged =
324 new TH2F("CorrelationUeChargedLeft","z_{trigger h^{#pm}} = p_{T Ueh^{#pm}} / p_{T trigger} with UE left side of trigger",
325 nptbins,ptmin,ptmax,200,0.,2.);
326 fhPtImbalanceUeLeftCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
327 fhPtImbalanceUeLeftCharged->SetXTitle("p_{T trigger}");
328 outputContainer->Add(fhPtImbalanceUeLeftCharged) ;
330 fhPtImbalanceUeRightCharged =
331 new TH2F("CorrelationUeChargedRight","z_{trigger h^{#pm}} = p_{T Ueh^{#pm}} / p_{T trigger} with UE right side of trigger",
332 nptbins,ptmin,ptmax,200,0.,2.);
333 fhPtImbalanceUeRightCharged->SetYTitle("z_{trigger Ueh^{#pm}}");
334 fhPtImbalanceUeRightCharged->SetXTitle("p_{T trigger}");
335 outputContainer->Add(fhPtImbalanceUeRightCharged) ;
337 fhPtHbpUeLeftCharged =
338 new TH2F("HbpUeChargedLeft","#xi = ln(1/x_{E}) with charged UE left side of trigger",
339 nptbins,ptmin,ptmax,200,0.,10.);
340 fhPtHbpUeLeftCharged->SetYTitle("ln(1/x_{E})");
341 fhPtHbpUeLeftCharged->SetXTitle("p_{T trigger}");
342 outputContainer->Add(fhPtHbpUeLeftCharged) ;
344 fhPtHbpUeRightCharged =
345 new TH2F("HbpUeChargedRight","#xi = ln(1/x_{E}) with charged UE right side of trigger",
346 nptbins,ptmin,ptmax,200,0.,10.);
347 fhPtHbpUeRightCharged->SetYTitle("ln(1/x_{E})");
348 fhPtHbpUeRightCharged->SetXTitle("p_{T trigger}");
349 outputContainer->Add(fhPtHbpUeRightCharged) ;
352 } //Correlation with charged hadrons
354 //Correlation with neutral hadrons
357 fhDeltaPhiDeltaEtaNeutral = new TH2F
358 ("DeltaPhiDeltaEtaNeutral","#phi_{trigger} - #phi_{h^{0}} vs #eta_{trigger} - #eta_{h^{0}}",
359 140,-2.,5.,200,-2,2);
360 fhDeltaPhiDeltaEtaNeutral->SetXTitle("#Delta #phi");
361 fhDeltaPhiDeltaEtaNeutral->SetYTitle("#Delta #eta");
363 fhPhiNeutral = new TH2F
364 ("PhiNeutral","#phi_{#pi^{0}} vs p_{T #pi^{0}}",
365 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
366 fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)");
367 fhPhiNeutral->SetXTitle("p_{T #pi^{0}} (GeV/c)");
369 fhEtaNeutral = new TH2F
370 ("EtaNeutral","#eta_{#pi^{0}} vs p_{T #pi^{0}}",
371 nptbins,ptmin,ptmax,netabins,etamin,etamax);
372 fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)");
373 fhEtaNeutral->SetXTitle("p_{T #pi^{0}} (GeV/c)");
375 fhDeltaPhiNeutral = new TH2F
376 ("DeltaPhiNeutral","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T trigger}",
377 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
378 fhDeltaPhiNeutral->SetYTitle("#Delta #phi");
379 fhDeltaPhiNeutral->SetXTitle("p_{T trigger} (GeV/c)");
381 fhDeltaPhiNeutralPt = new TH2F
382 ("DeltaPhiNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T #pi^{0}}}",
383 nptbins,ptmin,ptmax,140,-2.,5.);
384 fhDeltaPhiNeutralPt->SetYTitle("#Delta #phi");
385 fhDeltaPhiNeutralPt->SetXTitle("p_{T h^{0}} (GeV/c)");
387 fhDeltaPhiUeNeutralPt = new TH2F
388 ("DeltaPhiUeNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T #pi^{0}}}",
389 nptbins,ptmin,ptmax,140,-2.,5.);
390 fhDeltaPhiUeNeutralPt->SetYTitle("#Delta #phi");
391 fhDeltaPhiUeNeutralPt->SetXTitle("p_{T h^{0}} (GeV/c)");
393 fhDeltaEtaNeutral = new TH2F
394 ("DeltaEtaNeutral","#eta_{trigger} - #eta_{#pi^{0}} vs p_{T trigger}",
395 nptbins,ptmin,ptmax,200,-2,2);
396 fhDeltaEtaNeutral->SetYTitle("#Delta #eta");
397 fhDeltaEtaNeutral->SetXTitle("p_{T trigger} (GeV/c)");
399 fhPtImbalanceNeutral =
400 new TH2F("CorrelationNeutral","z_{trigger #pi} = p_{T #pi^{0}} / p_{T trigger}",
401 nptbins,ptmin,ptmax,200,0.,2.);
402 fhPtImbalanceNeutral->SetYTitle("z_{trigger #pi^{0}}");
403 fhPtImbalanceNeutral->SetXTitle("p_{T trigger}");
405 fhPtImbalanceUeNeutral =
406 new TH2F("CorrelationUeNeutral","z_{trigger #pi} = p_{T #pi^{0}} / p_{T trigger}",
407 nptbins,ptmin,ptmax,200,0.,2.);
408 fhPtImbalanceUeNeutral->SetYTitle("z_{trigger #pi^{0}}");
409 fhPtImbalanceUeNeutral->SetXTitle("p_{T trigger}");
412 new TH2F("HbpNeutral","#xi = ln(1/x_{E}) with neutral particles",
413 nptbins,ptmin,ptmax,200,0.,10.);
414 fhPtHbpNeutral->SetYTitle("ln(1/x_{E})");
415 fhPtHbpNeutral->SetXTitle("p_{T trigger}");
418 new TH2F("HbpUeNeutral","#xi = ln(1/x_{E}) with neutral particles",
419 nptbins,ptmin,ptmax,200,0.,10.);
420 fhPtHbpUeNeutral->SetYTitle("ln(1/x_{E})");
421 fhPtHbpUeNeutral->SetXTitle("p_{T trigger}");
424 outputContainer->Add(fhDeltaPhiDeltaEtaNeutral);
425 outputContainer->Add(fhPhiNeutral) ;
426 outputContainer->Add(fhEtaNeutral) ;
427 outputContainer->Add(fhDeltaPhiNeutral) ;
428 outputContainer->Add(fhDeltaPhiNeutralPt) ;
429 outputContainer->Add(fhDeltaPhiUeNeutralPt) ;
430 outputContainer->Add(fhDeltaEtaNeutral) ;
431 outputContainer->Add(fhPtImbalanceNeutral) ;
432 outputContainer->Add(fhPtImbalanceUeNeutral) ;
433 outputContainer->Add(fhPtHbpNeutral) ;
434 outputContainer->Add(fhPtHbpUeNeutral) ;
437 fhDeltaPhiDecayNeutral = new TH2F
438 ("DeltaPhiDecayNeutral","#phi_{Decay} - #phi_{h^{0}} vs p_{T Decay}",
439 nptbins,ptmin,ptmax,140,-2.,5.);
440 fhDeltaPhiDecayNeutral->SetYTitle("#Delta #phi");
441 fhDeltaPhiDecayNeutral->SetXTitle("p_{T Decay} (GeV/c)");
443 fhPtImbalanceDecayNeutral =
444 new TH2F("CorrelationDecayNeutral","z_{trigger h^{0}} = p_{T h^{0}} / p_{T Decay}",
445 nptbins,ptmin,ptmax,200,0.,2.);
446 fhPtImbalanceDecayNeutral->SetYTitle("z_{decay h^{0}}");
447 fhPtImbalanceDecayNeutral->SetXTitle("p_{T decay}");
449 outputContainer->Add(fhDeltaPhiDecayNeutral) ;
450 outputContainer->Add(fhPtImbalanceDecayNeutral) ;
455 fhDeltaPhiUeLeftNeutral = new TH2F
456 ("DeltaPhiUeLeftNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs p_{T h^{0}} with neutral UE left side range of trigger particles",
457 nptbins,ptmin,ptmax,140,-2.,5.);
458 fhDeltaPhiUeLeftNeutral->SetYTitle("#Delta #phi");
459 fhDeltaPhiUeLeftNeutral->SetXTitle("p_{T h^{0}} (GeV/c)");
460 outputContainer->Add(fhDeltaPhiUeLeftNeutral) ;
462 fhDeltaPhiUeRightNeutral = new TH2F
463 ("DeltaPhiUeRightNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs p_{T Ueh^{0}} with neutral UE right side range of trigger particles",
464 nptbins,ptmin,ptmax,140,-2.,5.);
465 fhDeltaPhiUeRightNeutral->SetYTitle("#Delta #phi");
466 fhDeltaPhiUeRightNeutral->SetXTitle("p_{T h^{0}} (GeV/c)");
467 outputContainer->Add(fhDeltaPhiUeRightNeutral) ;
469 fhPtImbalanceUeLeftNeutral =
470 new TH2F("CorrelationUeNeutralLeft","z_{trigger h^{0}} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE left side of trigger",
471 nptbins,ptmin,ptmax,140,0.,2.);
472 fhPtImbalanceUeLeftNeutral->SetYTitle("z_{trigger Ueh^{0}}");
473 fhPtImbalanceUeLeftNeutral->SetXTitle("p_{T trigger}");
474 outputContainer->Add(fhPtImbalanceUeLeftNeutral) ;
476 fhPtImbalanceUeRightNeutral =
477 new TH2F("CorrelationUeNeutralRight","z_{trigger h^{0}} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE right side of trigger",
478 nptbins,ptmin,ptmax,200,0.,2.);
479 fhPtImbalanceUeRightNeutral->SetYTitle("z_{trigger Ueh^{0}}");
480 fhPtImbalanceUeRightNeutral->SetXTitle("p_{T trigger}");
481 outputContainer->Add(fhPtImbalanceUeRightNeutral) ;
483 fhPtHbpUeLeftNeutral =
484 new TH2F("HbpUeNeutralLeft","#xi = ln(1/x_{E}) with neutral UE left side of trigger",
485 nptbins,ptmin,ptmax,200,0.,10.);
486 fhPtHbpUeLeftNeutral->SetYTitle("ln(1/x_{E})");
487 fhPtHbpUeLeftNeutral->SetXTitle("p_{T trigger}");
488 outputContainer->Add(fhPtHbpUeLeftNeutral) ;
490 fhPtHbpUeRightNeutral =
491 new TH2F("HbpUeNeutralRight","#xi = ln(1/x_{E}) with neutral UE right side of trigger",
492 nptbins,ptmin,ptmax,200,0.,10.);
493 fhPtHbpUeRightNeutral->SetYTitle("ln(1/x_{E})");
494 fhPtHbpUeRightNeutral->SetXTitle("p_{T trigger}");
495 outputContainer->Add(fhPtHbpUeRightNeutral) ;
499 //Keep neutral meson selection histograms if requiered
500 //Setting done in AliNeutralMesonSelection
501 if(GetNeutralMesonSelection()){
502 TList * nmsHistos = GetNeutralMesonSelection()->GetCreateOutputObjects() ;
503 if(GetNeutralMesonSelection()->AreNeutralMesonSelectionHistosKept())
504 for(Int_t i = 0; i < nmsHistos->GetEntries(); i++) outputContainer->Add(nmsHistos->At(i)) ;
508 }//Correlation with neutral hadrons
510 return outputContainer;
514 //____________________________________________________________________________
515 void AliAnaParticleHadronCorrelation::InitParameters()
518 //Initialize the parameters of the analysis.
519 SetInputAODName("PWG4Particle");
520 SetAODObjArrayName("Hadrons");
521 AddToHistogramsName("AnaHadronCorr_");
523 SetPtCutRange(0.,300);
524 fDeltaPhiMinCut = 1.5 ;
525 fDeltaPhiMaxCut = 4.5 ;
526 fSelectIsolated = kFALSE;
527 fMakeSeveralUE = kFALSE;
528 fUeDeltaPhiMinCut = 1. ;
529 fUeDeltaPhiMaxCut = 1.5 ;
530 fNeutralCorr = kFALSE ;
531 fPi0Trigger = kFALSE ;
535 //__________________________________________________________________
536 void AliAnaParticleHadronCorrelation::Print(const Option_t * opt) const
539 //Print some relevant parameters set for the analysis
543 printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
544 AliAnaPartCorrBaseClass::Print(" ");
546 printf("Phi trigger particle-Hadron < %3.2f\n", fDeltaPhiMaxCut) ;
547 printf("Phi trigger particle-Hadron > %3.2f\n", fDeltaPhiMinCut) ;
548 printf("Isolated Trigger? %d\n", fSelectIsolated) ;
549 printf("Phi trigger particle-UeHadron < %3.2f\n", fUeDeltaPhiMaxCut) ;
550 printf("Phi trigger particle-UeHadron > %3.2f\n", fUeDeltaPhiMinCut) ;
551 printf("Several UE? %d\n", fMakeSeveralUE) ;
552 printf("Name of AOD Pi0 Branch %s \n",fPi0AODBranchName.Data());
553 printf("Do Decay-hadron correlation ? %d\n", fPi0Trigger) ;
558 //__________________________________________________________________
559 TObjString* AliAnaParticleHadronCorrelation::GetAnalysisCuts()
561 //Save parameters used for analysis
562 TString parList ; //this will be list of parameters used for this analysis.
563 const Int_t buffersize = 255;
564 char onePar[buffersize] ;
566 snprintf(onePar,buffersize,"--- AliAnaPaticleHadronCorrelation ---\n") ;
568 snprintf(onePar,buffersize,"Phi trigger particle-Hadron < %3.2f ", fDeltaPhiMaxCut) ;
570 snprintf(onePar,buffersize,"Phi trigger particle-Hadron > %3.2f ", fDeltaPhiMinCut) ;
572 snprintf(onePar,buffersize,"Isolated Trigger? %d\n", fSelectIsolated) ;
574 snprintf(onePar,buffersize,"Phi trigger particle-UeHadron < %3.2f ", fUeDeltaPhiMaxCut) ;
576 snprintf(onePar,buffersize,"Phi trigger particle-UeHadron > %3.2f ", fUeDeltaPhiMinCut) ;
578 snprintf(onePar,buffersize,"Several UE? %d\n", fMakeSeveralUE) ;
580 snprintf(onePar,buffersize,"Name of AOD Pi0 Branch %s ",fPi0AODBranchName.Data());
582 snprintf(onePar,buffersize,"Do Decay-hadron correlation ? %d", fPi0Trigger) ;
585 //Get parameters set in base class.
586 parList += GetBaseParametersList() ;
588 //Get parameters set in PID class.
589 //parList += GetCaloPID()->GetPIDParametersList() ;
591 //Get parameters set in FiducialCut class (not available yet)
592 //parlist += GetFidCut()->GetFidCutParametersList()
594 return new TObjString(parList) ;
599 //____________________________________________________________________________
600 void AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD()
602 //Particle-Hadron Correlation Analysis, fill AODs
604 if(!GetInputAODBranch()){
605 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data());
609 if(strcmp(GetInputAODBranch()->GetClass()->GetName(), "AliAODPWG4ParticleCorrelation")){
610 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());
615 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - Begin hadron correlation analysis, fill AODs \n");
616 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In particle branch aod entries %d\n", GetInputAODBranch()->GetEntriesFast());
617 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In CTS aod entries %d\n", GetCTSTracks()->GetEntriesFast());
618 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In EMCAL aod entries %d\n", GetEMCALClusters()->GetEntriesFast());
619 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In PHOS aod entries %d\n", GetPHOSClusters()->GetEntriesFast());
622 //Loop on stored AOD particles, trigger
623 Double_t ptTrig = 0.;
624 Int_t trigIndex = -1;
625 Int_t naod = GetInputAODBranch()->GetEntriesFast();
626 //fhNclustersNtracks->Fill(naod, GetCTSTracks()->GetEntriesFast());
627 for(Int_t iaod = 0; iaod < naod ; iaod++){
628 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
629 //find the leading particles with highest momentum
630 if (particle->Pt()>ptTrig) {
631 ptTrig = particle->Pt() ;
636 //Do correlation with leading particle
639 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(trigIndex));
640 //Make correlation with charged hadrons
641 if(GetReader()->IsCTSSwitchedOn() )
642 MakeChargedCorrelation(particle, GetCTSTracks(),kFALSE);
644 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); //For the future, foresee more possible pi0 lists
645 if(fNeutralCorr && pi0list && pi0list->GetEntriesFast() > 0)
646 MakeNeutralCorrelation(particle, pi0list,kFALSE);
650 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - End fill AODs \n");
654 //____________________________________________________________________________
655 void AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms()
657 //Particle-Hadron Correlation Analysis, fill histograms
659 if(!GetInputAODBranch()){
660 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data());
665 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Begin hadron correlation analysis, fill histograms \n");
666 printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In particle branch aod entries %d\n", GetInputAODBranch()->GetEntriesFast());
669 //Get the vertex and check it is not too large in z
670 Double_t v[3] = {0,0,0}; //vertex ;
671 GetReader()->GetVertex(v);
672 if(!GetMixedEvent() && TMath::Abs(v[2]) > GetZvertexCut()) return ;
674 //Loop on stored AOD particles, find leading
675 Int_t naod = GetInputAODBranch()->GetEntriesFast();
676 // if(naod!=0)fhVertex->Fill(v[0],v[1],v[2]);
677 Double_t ptTrig = 0.;
678 Int_t trigIndex = -1 ;
679 for(Int_t iaod = 0; iaod < naod ; iaod++){ //loop on input trigger AOD file
680 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
681 //vertex cut in case of mixing
682 if (GetMixedEvent()) {
685 if (particle->GetCaloLabel(0) >= 0 ){
686 id=particle->GetCaloLabel(0);
687 if(id >= 0 )evt= GetMixedEvent()-> EventIndexForCaloCluster(id) ;
689 else if(particle->GetTrackLabel(0) >= 0 ){
690 id=particle->GetTrackLabel(0);
691 if(id >= 0 )evt= GetMixedEvent()->EventIndex(id) ;
695 if (TMath::Abs(GetVertex(evt)[2]) > GetZvertexCut())
699 //check if the particle is isolated or if we want to take the isolation into account
700 if(OnlyIsolated() && !particle->IsIsolated()) continue;
701 //check if inside the vertex cut
702 //find the leading particles with highest momentum
703 if (particle->Pt()>ptTrig) {
704 ptTrig = particle->Pt() ;
707 }//finish searching for leading trigger particle
708 if(trigIndex!=-1){ //using trigger partilce to do correlations
709 AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(trigIndex));
711 if (GetMixedEvent()) {
714 if (particle->GetCaloLabel(0) >= 0 ){
715 id=particle->GetCaloLabel(0);
716 if(id >= 0 )evt= GetMixedEvent()-> EventIndexForCaloCluster(id) ;
718 else if(particle->GetTrackLabel(0) >= 0 ){
719 id=particle->GetTrackLabel(0);
720 if(id >= 0 )evt= GetMixedEvent()->EventIndex(id) ;
724 if (TMath::Abs(GetVertex(evt)[2]) > GetZvertexCut())
728 //Fill leading particle histogram
729 fhPtLeading->Fill(particle->Pt());
730 Float_t phi = particle->Phi();
731 if(phi<0)phi+=TMath::TwoPi();
732 fhPhiLeading->Fill(particle->Pt(), phi);
733 fhEtaLeading->Fill(particle->Pt(), particle->Eta());
735 //Make correlation with charged hadrons
736 if(GetReader()->IsCTSSwitchedOn() )
737 MakeChargedCorrelation(particle, GetCTSTracks(),kTRUE);
739 TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); //For the future, foresee more possible pi0 lists
740 if(fNeutralCorr && pi0list && pi0list->GetEntriesFast() > 0)
741 MakeNeutralCorrelation(particle, pi0list,kTRUE);
745 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - End fill histograms \n");
749 //____________________________________________________________________________
750 void AliAnaParticleHadronCorrelation::MakeChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle, TObjArray* const pl, const Bool_t bFillHisto)
752 // Charged Hadron Correlation Analysis
753 if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Make trigger particle - charged hadron correlation \n");
755 Int_t evtIndex11 = -1 ; //cluster trigger or pi0 trigger
756 Int_t evtIndex12 = -1 ; // pi0 trigger
757 Int_t evtIndex13 = -1 ; // charged trigger
758 Int_t indexPhoton1 = -1 ;
759 Int_t indexPhoton2 = -1 ;
760 Double_t v[3] = {0,0,0}; //vertex ;
761 GetReader()->GetVertex(v);
762 if(!GetMixedEvent() && TMath::Abs(v[2]) > GetZvertexCut()) return ;
764 Int_t nTracks = GetCTSTracks()->GetEntriesFast() ;
766 if (GetMixedEvent()) {
767 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
768 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
769 evtIndex13 = GetMixedEvent()->EventIndex(aodParticle->GetTrackLabel(0)) ;
772 Double_t ptTrig = aodParticle->Pt();
773 Double_t pxTrig = aodParticle->Px();
774 Double_t pyTrig = aodParticle->Py();
776 Double_t phiTrig = aodParticle->Phi();
777 Double_t etaTrig = aodParticle->Eta();
782 Double_t rat = -100.;
784 Double_t cosi = -100.;
785 Double_t phi = -100. ;
786 Double_t eta = -100. ;
789 TObjArray * reftracks = 0x0;
792 Double_t ptDecay1 = 0. ;
793 Double_t pxDecay1 = 0. ;
794 Double_t pyDecay1 = 0. ;
795 Double_t phiDecay1 = 0. ;
796 Double_t ptDecay2 = 0. ;
797 Double_t pxDecay2 = 0. ;
798 Double_t pyDecay2 = 0. ;
799 Double_t phiDecay2 = 0. ;
801 Double_t ratDecay1 = -100.;
802 Double_t ratDecay2 = -100.;
803 Float_t deltaphi = -100. ;
804 Float_t deltaphiDecay1 = -100. ;
805 Float_t deltaphiDecay2 = -100. ;
806 TObjArray * clusters = 0x0 ;
807 TLorentzVector photonMom ;
810 indexPhoton1 = aodParticle->GetCaloLabel (0);
811 indexPhoton2 = aodParticle->GetCaloLabel (1);
812 if(GetDebug() > 1)printf("indexPhoton1 = %d, indexPhoton2 = %d \n", indexPhoton1, indexPhoton2);
814 if(indexPhoton1!=-1 && indexPhoton2!=-1){
815 if(aodParticle->GetDetector()=="EMCAL") clusters = GetEMCALClusters() ;
816 else clusters = GetPHOSClusters() ;
817 for(Int_t iclus = 0; iclus < clusters->GetEntriesFast(); iclus++){
818 AliVCluster * photon = (AliVCluster*) (clusters->At(iclus));
819 photon->GetMomentum(photonMom,GetVertex(0)) ;
820 if(photon->GetID()==indexPhoton1) {
821 ptDecay1 = photonMom.Pt();
822 pxDecay1 = photonMom.Px();
823 pyDecay1 = photonMom.Py();
824 phiDecay1 = photonMom.Phi();
825 if(ptTrig && bFillHisto) fhPtPi0DecayRatio->Fill(ptTrig, ptDecay1/ptTrig);
827 if(photon->GetID()==indexPhoton2) {
828 ptDecay2 = photonMom.Pt();
829 pxDecay2 = photonMom.Px();
830 pyDecay2 = photonMom.Py();
831 phiDecay2 = photonMom.Phi();
832 if(ptTrig && bFillHisto) fhPtPi0DecayRatio->Fill(ptTrig, ptDecay2/ptTrig);
834 if(GetDebug() > 1)printf("Photon1 = %f, Photon2 = %f \n", ptDecay1, ptDecay2);
836 } //index of decay photons found
838 } //make decay-hadron correlation
840 //Track loop, select tracks with good pt, phi and fill AODs or histograms
841 //Int_t currentIndex = -1 ;
842 for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ ){
843 AliAODTrack * track = (AliAODTrack *) (pl->At(ipr)) ;
845 //check if inside the vertex cut
846 //printf("charge = %d\n", track->Charge());
847 Int_t evtIndex2 = 0 ;
848 if (GetMixedEvent()) {
849 evtIndex2 = GetMixedEvent()->EventIndex(track->GetID()) ;
850 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 || evtIndex13 == evtIndex2 ) // photon and track from different events
853 if (TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut())
855 // if(currentIndex == evtIndex2) // tracks from different event
857 // currentIndex = evtIndex2 ;
859 Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
860 p3.SetXYZ(mom[0],mom[1],mom[2]);
866 if(phi < 0) phi+=TMath::TwoPi();
868 //Select only hadrons in pt range
869 if(pt < GetMinPt() || pt > GetMaxPt()) continue ;
870 //remove trigger itself for correlation when use charged triggers
871 if(track->GetID()==aodParticle->GetTrackLabel(0) && pt==ptTrig && phi==phiTrig && eta==etaTrig)
873 if(IsFiducialCutOn()){
874 Bool_t in = GetFiducialCut()->IsInFiducialCut(mom,"CTS") ;
877 //jumped out this event if near side associated partile pt larger than trigger
878 if(pt > ptTrig && TMath::Abs(phi-phiTrig)<TMath::PiOver2()) break ;
880 xE = -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
882 cosi = TMath::Log(1/xE);
883 // printf("rat = %f, xE = %f, cosi =%f \n", rat, xE, cosi);
884 // printf("phi = %f \n", phi);
887 if(indexPhoton1!=-1 && indexPhoton2!=-1){
888 if(ptDecay1) ratDecay1 = pt/ptDecay1 ;
889 if(ptDecay2) ratDecay2 = pt/ptDecay2 ;
890 deltaphiDecay1 = phiDecay1-phi;
891 deltaphiDecay2 = phiDecay2-phi;
892 if(deltaphiDecay1< -TMath::PiOver2()) deltaphiDecay1+=TMath::TwoPi();
893 if(deltaphiDecay1>3*TMath::PiOver2()) deltaphiDecay1-=TMath::TwoPi();
894 if(deltaphiDecay2< -TMath::PiOver2()) deltaphiDecay2+=TMath::TwoPi();
895 if(deltaphiDecay2>3*TMath::PiOver2()) deltaphiDecay2-=TMath::TwoPi();
897 } //do decay-hadron correlation
899 //Selection within angular range
900 deltaphi = phiTrig-phi;
901 if(deltaphi< -TMath::PiOver2()) deltaphi+=TMath::TwoPi();
902 if(deltaphi>3*TMath::PiOver2()) deltaphi-=TMath::TwoPi();
904 Double_t pout = pt*TMath::Sin(deltaphi) ;
907 printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Charged hadron: pt %f, phi %f, phi trigger %f. Cuts: delta phi %2.2f < %2.2f < %2.2f, pT min %2.2f \n",
908 pt,phi, phiTrig,fDeltaPhiMinCut, deltaphi, fDeltaPhiMaxCut, GetMinPt());
912 fhEtaCharged->Fill(pt,eta);
913 fhPhiCharged->Fill(pt,phi);
914 fhDeltaEtaCharged->Fill(ptTrig,aodParticle->Eta()-eta);
915 fhDeltaPhiCharged->Fill(ptTrig, deltaphi);
916 fhDeltaPhiDeltaEtaCharged->Fill(deltaphi,aodParticle->Eta()-eta);
918 if(GetDebug() > 2 ) printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
919 //fill different multiplicity histogram
921 for(Int_t im=0; im<GetMultiBin(); im++){
922 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))fhTrigDeltaPhiDeltaEtaCharged[im]->Fill(ptTrig,deltaphi,aodParticle->Eta()-eta);
925 //delta phi cut for correlation
926 if( (deltaphi > fDeltaPhiMinCut) && ( deltaphi < fDeltaPhiMaxCut) ) {
927 fhDeltaPhiChargedPt->Fill(pt,deltaphi);
928 fhPtImbalanceCharged->Fill(ptTrig,xE);
929 fhPtHbpCharged->Fill(ptTrig,cosi);
930 fhPoutPtTrigPtAssoc->Fill(ptTrig, pt, pout) ;
931 fhPtTrigCharged->Fill(ptTrig, pt) ;
932 if(track->Charge()>0) fhPtImbalancePosCharged->Fill(ptTrig,xE) ;
933 else fhPtImbalanceNegCharged->Fill(ptTrig,xE) ;
934 //fill different multiplicity histogram
936 for(Int_t im=0; im<GetMultiBin(); im++){
937 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
938 fhTrigCorr[im]->Fill(ptTrig,xE);
940 } //multiplicity events selection
941 } //delta phi cut for correlation
943 fhDeltaPhiUeChargedPt->Fill(pt,deltaphi);
944 fhUePoutPtTrigPtAssoc->Fill(ptTrig, pt, pout) ;
945 fhPtImbalanceUeCharged->Fill(ptTrig,xE);
946 fhPtHbpUeCharged->Fill(ptTrig,cosi);
948 for(Int_t im=0; im<GetMultiBin(); im++){
949 if(nTracks < ( GetMaxMulti() - GetMinMulti() )/GetMultiBin()*(im+1))
950 fhTrigUeCorr[im]->Fill(ptTrig,xE);
952 } //multiplicity events selection
957 if(indexPhoton1!=-1 && indexPhoton2!=-1){
958 fhDeltaPhiDecayCharged->Fill(ptDecay1, deltaphiDecay1);
959 fhDeltaPhiDecayCharged->Fill(ptDecay2, deltaphiDecay2);
960 if(GetDebug() > 1)printf("deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaphiDecay1, deltaphiDecay2);
961 if( (deltaphiDecay1 > fDeltaPhiMinCut) && ( deltaphiDecay1 < fDeltaPhiMaxCut) )
962 fhPtImbalanceDecayCharged->Fill(ptDecay1,ratDecay1);
963 if( (deltaphiDecay2 > fDeltaPhiMinCut) && ( deltaphiDecay2 < fDeltaPhiMaxCut) )
964 fhPtImbalanceDecayCharged->Fill(ptDecay2,ratDecay2);
965 if(GetDebug() > 1)printf("ratPhoton1 = %f, ratPhoton2 = %f \n", pt/ptDecay1, pt/ptDecay2);
966 } //index of decay photons found
967 } //make decay-hadron correlation
969 //several UE calculation
971 if((deltaphi<-fUeDeltaPhiMinCut) && (deltaphi >-fUeDeltaPhiMaxCut)){
972 fhDeltaPhiUeLeftCharged->Fill(pt,deltaphi);
973 fhPtImbalanceUeLeftCharged->Fill(ptTrig,rat);
974 fhPtHbpUeLeftCharged->Fill(ptTrig,cosi);
976 if((deltaphi>fUeDeltaPhiMinCut) && (deltaphi <fUeDeltaPhiMaxCut)){
977 fhDeltaPhiUeRightCharged->Fill(pt,deltaphi);
978 fhPtImbalanceUeRightCharged->Fill(ptTrig,rat);
979 fhPtHbpUeRightCharged->Fill(ptTrig,cosi);
982 } //several UE calculation
988 reftracks = new TObjArray(0);
989 reftracks->SetName(GetAODObjArrayName()+"Tracks");
990 reftracks->SetOwner(kFALSE);
992 reftracks->Add(track);
996 //Fill AOD with reference tracks, if not filling histograms
997 if(!bFillHisto && reftracks) {
998 aodParticle->AddObjArray(reftracks);
1007 //____________________________________________________________________________
1008 //void AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillAOD(AliAODPWG4ParticleCorrelation* const aodParticle,TObjArray* const pl, TString detector)
1010 // // Neutral Pion Correlation Analysis, find pi0, put them in new output aod, if correlation cuts passed
1011 // if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillAOD() - Make trigger particle - neutral hadron correlation \n");
1013 // if(!NewOutputAOD()){
1014 // printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillAOD() - Output aod not created, set AOD class name and branch name in the configuration file, STOP! \n");
1018 // Double_t phiTrig = aodParticle->Phi();
1020 // TLorentzVector gammai;
1021 // TLorentzVector gammaj;
1023 // //Get vertex for photon momentum calculation
1025 // if(GetReader()->GetDataType()!= AliCaloTrackReader::kMC)
1027 // for (Int_t iev = 0; iev < GetNMixedEvent(); iev++) {
1028 // if (!GetMixedEvent())
1029 // GetReader()->GetVertex(GetVertex(iev));
1031 // GetMixedEvent()->GetVertexOfEvent(iev)->GetXYZ(GetVertex(iev));
1034 // Double_t vertex2[] = {0.0,0.0,0.0} ; //vertex of second input aod
1035 // if(GetReader()->GetDataType()!= AliCaloTrackReader::kMC)
1037 // if(GetReader()->GetSecondInputAODTree()) GetReader()->GetSecondInputAODVertex(vertex2);
1040 // //Cluster loop, select pairs with good pt, phi and fill AODs or histograms
1041 // //Int_t iEvent= GetReader()->GetEventNumber() ;
1042 // Int_t nclus = pl->GetEntriesFast();
1043 // for(Int_t iclus = 0;iclus < nclus ; iclus ++ ){
1044 // AliVCluster * calo = (AliVCluster *) (pl->At(iclus)) ;
1046 // Int_t evtIndex1 = 0 ;
1047 // if (GetMixedEvent()) {
1048 // evtIndex1=GetMixedEvent()->EventIndexForCaloCluster(calo->GetID()) ;
1052 // //Input from second AOD?
1053 // Int_t inputi = 0;
1054 // if (aodParticle->GetDetector() == "EMCAL" && GetReader()->GetEMCALClustersNormalInputEntries() <= iclus)
1056 // else if(aodParticle->GetDetector() == "PHOS" && GetReader()->GetPHOSClustersNormalInputEntries() <= iclus)
1059 // //Cluster selection, not charged, with photon or pi0 id and in fiducial cut
1062 // //if (inputi == 0 && !SelectCluster(calo, GetVertex(evtIndex1), gammai, pdg))
1065 // else if(inputi == 1 && !SelectCluster(calo, vertex2, gammai, pdg))
1068 // if(GetDebug() > 2)
1069 // printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillAOD() - Neutral cluster in %s: pt %f, phi %f, phi trigger %f. Cuts: delta phi min %2.2f, max %2.2f, pT min %2.2f \n",
1070 // detector.Data(), gammai.Pt(),gammai.Phi(),phiTrig,fDeltaPhiMinCut, fDeltaPhiMaxCut, GetMinPt());
1072 // //2 gamma overlapped, found with PID
1073 // if(pdg == AliCaloPID::kPi0){
1075 // //Select only hadrons in pt range
1076 // if(gammai.Pt() < GetMinPt() || gammai.Pt() > GetMaxPt())
1079 // //Selection within angular range
1080 // Float_t phi = gammai.Phi();
1081 // if(phi < 0) phi+=TMath::TwoPi();
1082 // //Float_t deltaphi = TMath::Abs(phiTrig-phi);
1083 // //if( (deltaphi < fDeltaPhiMinCut) || ( deltaphi > fDeltaPhiMaxCut) ) continue ;
1085 // AliAODPWG4Particle pi0 = AliAODPWG4Particle(gammai);
1086 // //pi0.SetLabel(calo->GetLabel());
1087 // pi0.SetPdg(AliCaloPID::kPi0);
1088 // pi0.SetDetector(detector);
1091 // pi0.SetTag(GetMCAnalysisUtils()->CheckOrigin(calo->GetLabel(),GetReader(),inputi));
1092 // if(GetDebug() > 0) printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillAOD() - Origin of candidate %d\n",pi0.GetTag());
1093 // }//Work with stack also
1094 // //Set the indeces of the original caloclusters
1095 // pi0.SetCaloLabel(calo->GetID(),-1);
1096 // AddAODParticle(pi0);
1098 // if(GetDebug() > 2)
1099 // printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillAOD() - Correlated with selected pi0 (pid): pt %f, phi %f\n",pi0.Pt(),pi0.Phi());
1103 // //Make invariant mass analysis
1104 // else if(pdg == AliCaloPID::kPhoton){
1105 // //Search the photon companion in case it comes from a Pi0 decay
1106 // //Apply several cuts to select the good pair;
1107 // for(Int_t jclus = iclus+1; jclus < pl->GetEntries() ; jclus ++ ){
1108 // AliVCluster * calo2 = (AliVCluster *) (pl->At(jclus)) ;
1109 // Int_t evtIndex2 = 0 ;
1110 // if (GetMixedEvent()) {
1111 // evtIndex2=GetMixedEvent()->EventIndexForCaloCluster(calo->GetID()) ;
1113 // if (GetMixedEvent() && (evtIndex1 == evtIndex2))
1116 // //Input from second AOD?
1117 // Int_t inputj = 0;
1118 // if (aodParticle->GetDetector() == "EMCAL" && GetReader()->GetEMCALClustersNormalInputEntries() <= jclus)
1120 // else if(aodParticle->GetDetector() == "PHOS" && GetReader()->GetPHOSClustersNormalInputEntries() <= jclus)
1123 // //Cluster selection, not charged with photon or pi0 id and in fiducial cut
1126 // //if (inputj == 0 && !SelectCluster(calo2, GetVertex(evtIndex2), gammaj, pdgj))
1130 // else if(inputj == 1 && !SelectCluster(calo2, vertex2, gammaj, pdgj))
1133 // //if(!SelectCluster(calo2,GetVertex(evtIndex2), gammaj, pdgj))
1137 // if(pdgj == AliCaloPID::kPhoton ){
1139 // if((gammai+gammaj).Pt() < GetMinPt() || (gammai+gammaj).Pt() > GetMaxPt())
1142 // //Selection within angular range
1143 // Float_t phi = (gammai+gammaj).Phi();
1144 // if(phi < 0) phi+=TMath::TwoPi();
1145 // //Float_t deltaphi = TMath::Abs(phiTrig-phi);
1146 // //if( (deltaphi < fDeltaPhiMinCut) || ( deltaphi > fDeltaPhiMaxCut) ) continue ;
1148 // //Select good pair (aperture and invariant mass)
1149 // if(GetNeutralMesonSelection()->SelectPair(gammai, gammaj)){
1151 // if(GetDebug() > 2 ) printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillAOD() - Neutral Hadron Correlation: AOD Selected gamma pair: pt %2.2f, phi %2.2f, eta %2.2f, M %2.3f\n",
1152 // (gammai+gammaj).Pt(),(gammai+gammaj).Phi(),(gammai+gammaj).Eta(), (gammai+gammaj).M());
1154 // TLorentzVector pi0mom = gammai+gammaj;
1155 // AliAODPWG4Particle pi0 = AliAODPWG4Particle(pi0mom);
1156 // //pi0.SetLabel(calo->GetLabel());
1157 // pi0.SetPdg(AliCaloPID::kPi0);
1158 // pi0.SetDetector(detector);
1160 // //Check origin of the candidates
1162 // Int_t label1 = calo->GetLabel();
1163 // Int_t label2 = calo2->GetLabel();
1164 // Int_t tag1 = GetMCAnalysisUtils()->CheckOrigin(label1, GetReader(), inputi);
1165 // Int_t tag2 = GetMCAnalysisUtils()->CheckOrigin(label2, GetReader(), inputj);
1167 // if(GetDebug() > 0)
1168 // printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillAOD() - Origin of: photon1 %d; photon2 %d \n",tag1, tag2);
1169 // if(GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCPi0Decay) && GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCPi0Decay)){
1171 // //Check if pi0 mother is the same
1172 // if(GetReader()->ReadStack()){
1173 // TParticle * mother1 = GetMCStack()->Particle(label1);//photon in kine tree
1174 // label1 = mother1->GetFirstMother();
1175 // //mother1 = GetMCStack()->Particle(label1);//pi0
1177 // TParticle * mother2 = GetMCStack()->Particle(label2);//photon in kine tree
1178 // label2 = mother2->GetFirstMother();
1179 // //mother2 = GetMCStack()->Particle(label2);//pi0
1181 // else if(GetReader()->ReadAODMCParticles()){
1182 // AliAODMCParticle * mother1 = (AliAODMCParticle *) (GetReader()->GetAODMCParticles(inputi))->At(label1);//photon in kine tree
1183 // label1 = mother1->GetMother();
1184 // //mother1 = GetMCStack()->Particle(label1);//pi0
1185 // AliAODMCParticle * mother2 = (AliAODMCParticle *) (GetReader()->GetAODMCParticles(inputj))->At(label2);//photon in kine tree
1186 // label2 = mother2->GetMother();
1187 // //mother2 = GetMCStack()->Particle(label2);//pi0
1190 // //printf("mother1 %d, mother2 %d\n",label1,label2);
1191 // if(label1 == label2)
1192 // GetMCAnalysisUtils()->SetTagBit(tag,AliMCAnalysisUtils::kMCPi0);
1194 // }//Work with mc information also
1196 // //Set the indeces of the original caloclusters
1197 // pi0.SetCaloLabel(calo->GetID(), calo2->GetID());
1198 // AddAODParticle(pi0);
1202 // }//if pair of gammas
1207 // if(GetDebug() > 1)
1208 // printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillAOD() - End, %d pi0's found \n",GetOutputAODBranch()->GetEntriesFast());
1211 //____________________________________________________________________________
1212 void AliAnaParticleHadronCorrelation::MakeNeutralCorrelation(AliAODPWG4ParticleCorrelation * const aodParticle, TObjArray* pi0list, const Bool_t bFillHisto)
1214 // Neutral Pion Correlation Analysis
1215 if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Make trigger particle - pi0 correlation, %d pi0's \n",pi0list->GetEntriesFast());
1217 Int_t evtIndex11 = 0 ;
1218 Int_t evtIndex12 = 0 ;
1219 if (GetMixedEvent()) {
1220 evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ;
1221 evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ;
1224 Double_t pt = -100.;
1225 Double_t px = -100.;
1226 Double_t py = -100.;
1227 Double_t rat = -100.;
1228 Double_t phi = -100.;
1229 Double_t eta = -100.;
1230 Double_t xE = -100.;
1231 Double_t cosi = -100.;
1233 Double_t ptTrig = aodParticle->Pt();
1234 Double_t phiTrig = aodParticle->Phi();
1235 Double_t etaTrig = aodParticle->Eta();
1236 Double_t pxTrig = aodParticle->Px();
1237 Double_t pyTrig = aodParticle->Py();
1240 Int_t indexPhoton1 = -1 ;
1241 Int_t indexPhoton2 = -1 ;
1242 Double_t ptDecay1 = 0. ;
1243 Double_t pxDecay1 = 0. ;
1244 Double_t pyDecay1 = 0. ;
1245 Double_t phiDecay1 = 0. ;
1246 Double_t ptDecay2 = 0. ;
1247 Double_t pxDecay2 = 0. ;
1248 Double_t pyDecay2 = 0. ;
1249 Double_t phiDecay2 = 0. ;
1251 Double_t ratDecay1 = -100.;
1252 Double_t ratDecay2 = -100.;
1253 Float_t deltaphi = -100. ;
1254 Float_t deltaphiDecay1 = -100. ;
1255 Float_t deltaphiDecay2 = -100. ;
1256 TObjArray * clusters = 0x0 ;
1257 TLorentzVector photonMom ;
1259 indexPhoton1 = aodParticle->GetCaloLabel (0);
1260 indexPhoton2 = aodParticle->GetCaloLabel (1);
1261 if(GetDebug() > 1)printf("indexPhoton1 = %d, indexPhoton2 = %d \n", indexPhoton1, indexPhoton2);
1263 if(indexPhoton1!=-1 && indexPhoton2!=-1){
1264 if(aodParticle->GetDetector()=="EMCAL") clusters = GetEMCALClusters() ;
1265 else clusters = GetPHOSClusters() ;
1266 for(Int_t iclus = 0; iclus < clusters->GetEntriesFast(); iclus++){
1267 AliVCluster * photon = (AliVCluster*) (clusters->At(iclus));
1268 photon->GetMomentum(photonMom,GetVertex(0)) ;
1269 if(photon->GetID()==indexPhoton1) {
1270 ptDecay1 = photonMom.Pt();
1271 pxDecay1 = photonMom.Px();
1272 pyDecay1 = photonMom.Py();
1273 phiDecay1 = photonMom.Phi();
1275 if(photon->GetID()==indexPhoton2) {
1276 ptDecay2 = photonMom.Pt();
1277 pxDecay2 = photonMom.Px();
1278 pyDecay2 = photonMom.Py();
1279 phiDecay2 = photonMom.Phi();
1281 if(GetDebug() > 1)printf("Photon1 = %f, Photon2 = %f \n", ptDecay1, ptDecay2);
1283 } //index of decay photons found
1284 if(ptTrig && bFillHisto) fhPtPi0DecayRatio->Fill(ptTrig, ptDecay1/ptTrig, ptDecay2/ptTrig);
1285 } //make decay-hadron correlation
1287 TObjArray * refpi0 =0x0;
1290 //Loop on stored AOD pi0
1291 Int_t naod = pi0list->GetEntriesFast();
1292 if(GetDebug() > 0) printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillHistograms() - aod branch entries %d\n", naod);
1293 for(Int_t iaod = 0; iaod < naod ; iaod++){
1294 AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (pi0list->At(iaod));
1296 Int_t evtIndex2 = 0 ;
1297 Int_t evtIndex3 = 0 ;
1298 if (GetMixedEvent()) {
1299 evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(0)) ;
1300 evtIndex3 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(1)) ;
1302 if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 || evtIndex11 == evtIndex3 || evtIndex12 == evtIndex3) // trigger and pi0 are not from different events
1306 //Int_t pdg = pi0->GetPdg();
1307 //if(pdg != AliCaloPID::kPi0) continue;
1312 if(pt < GetMinPt() || pt > GetMaxPt()) continue ;
1313 //jumped out this event if near side associated partile pt larger than trigger
1314 if(pt > ptTrig && TMath::Abs(phi-phiTrig)<TMath::PiOver2()) break ;
1316 //Selection within angular range
1318 //Float_t deltaphi = TMath::Abs(phiTrig-phi);
1319 //if( (deltaphi < fDeltaPhiMinCut) || ( deltaphi > fDeltaPhiMaxCut) ) continue ;
1323 deltaphi = phiTrig-phi;
1324 if(deltaphi<-TMath::PiOver2()) deltaphi+=TMath::TwoPi();
1325 if(deltaphi>3*TMath::PiOver2()) deltaphi-=TMath::TwoPi();
1330 xE = -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
1332 cosi = TMath::Log(1/xE);
1335 if(indexPhoton1!=-1 && indexPhoton2!=-1){
1336 if(ptDecay1) ratDecay1 = pt/ptDecay1 ;
1337 if(ptDecay2) ratDecay2 = pt/ptDecay2 ;
1338 deltaphiDecay1 = phiDecay1-phi;
1339 deltaphiDecay2 = phiDecay2-phi;
1340 if(deltaphiDecay1< -TMath::PiOver2()) deltaphiDecay1+=TMath::TwoPi();
1341 if(deltaphiDecay1>3*TMath::PiOver2()) deltaphiDecay1-=TMath::TwoPi();
1342 if(deltaphiDecay2< -TMath::PiOver2()) deltaphiDecay2+=TMath::TwoPi();
1343 if(deltaphiDecay2>3*TMath::PiOver2()) deltaphiDecay2-=TMath::TwoPi();
1344 fhDeltaPhiDecayNeutral->Fill(ptDecay1, deltaphiDecay1);
1345 fhDeltaPhiDecayNeutral->Fill(ptDecay2, deltaphiDecay2);
1346 if(GetDebug() > 1)printf("deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaphiDecay1, deltaphiDecay2);
1347 if( (deltaphiDecay1 > fDeltaPhiMinCut) && ( deltaphiDecay1 < fDeltaPhiMaxCut) )
1348 fhPtImbalanceDecayNeutral->Fill(ptDecay1,ratDecay1);
1349 if( (deltaphiDecay2 > fDeltaPhiMinCut) && ( deltaphiDecay2 < fDeltaPhiMaxCut) )
1350 fhPtImbalanceDecayNeutral->Fill(ptDecay2,ratDecay2);
1351 if(GetDebug() > 1)printf("ratPhoton1 = %f, ratPhoton2 = %f \n", pt/ptDecay1, pt/ptDecay2);
1353 } //do decay-hadron correlation
1355 fhEtaNeutral->Fill(pt,eta);
1356 fhPhiNeutral->Fill(pt,phi);
1357 fhDeltaEtaNeutral->Fill(ptTrig,etaTrig-eta);
1358 fhDeltaPhiNeutral->Fill(ptTrig,deltaphi);
1359 fhDeltaPhiDeltaEtaNeutral->Fill(deltaphi,etaTrig-eta);
1361 //delta phi cut for correlation
1362 if( (deltaphi > fDeltaPhiMinCut) && ( deltaphi < fDeltaPhiMaxCut) ) {
1363 fhDeltaPhiNeutralPt->Fill(pt,deltaphi);
1364 fhPtImbalanceNeutral->Fill(ptTrig,rat);
1365 fhPtHbpNeutral->Fill(ptTrig,cosi);
1368 fhDeltaPhiUeNeutralPt->Fill(pt,deltaphi);
1369 fhPtImbalanceUeNeutral->Fill(ptTrig,rat);
1370 fhPtHbpUeNeutral->Fill(ptTrig,cosi);
1372 //several UE calculation
1374 if((deltaphi<-fUeDeltaPhiMinCut) && (deltaphi >-fUeDeltaPhiMaxCut)){
1375 fhDeltaPhiUeLeftNeutral->Fill(pt,deltaphi);
1376 fhPtImbalanceUeLeftNeutral->Fill(ptTrig,rat);
1377 fhPtHbpUeLeftNeutral->Fill(ptTrig,cosi);
1379 if((deltaphi>fUeDeltaPhiMinCut) && (deltaphi <fUeDeltaPhiMaxCut)){
1380 fhDeltaPhiUeRightNeutral->Fill(pt,deltaphi);
1381 fhPtImbalanceUeRightNeutral->Fill(ptTrig,rat);
1382 fhPtHbpUeRightNeutral->Fill(ptTrig,cosi);
1384 } //several UE calculation
1389 refpi0 = new TObjArray(0);
1390 refpi0->SetName(GetAODObjArrayName()+"Pi0s");
1391 refpi0->SetOwner(kFALSE);
1394 }//put references in trigger AOD
1396 //if(GetDebug() > 2 ) printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Selected neutral for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
1402 //____________________________________________________________________________
1403 //Bool_t AliAnaParticleHadronCorrelation::SelectCluster(AliVCluster * calo, Double_t *vertex, TLorentzVector & mom, Int_t & pdg) {
1404 // //Select cluster depending on its pid and acceptance selections
1406 // //Skip matched clusters with tracks
1407 // if(IsTrackMatched(calo)) return kFALSE;
1409 // TString detector = "";
1410 // if (calo->IsPHOS()) detector= "PHOS";
1411 // else if(calo->IsEMCAL()) detector= "EMCAL";
1414 // calo->GetMomentum(mom,vertex);//Assume that come from vertex in straight line
1415 // pdg = AliCaloPID::kPhoton;
1416 // if(IsCaloPIDOn()){
1417 // //Get most probable PID, 2 options check PID weights (in MC this option is mandatory)
1418 // //or redo PID, recommended option for EMCal.
1420 // if(!IsCaloPIDRecalculationOn() || GetReader()->GetDataType() == AliCaloTrackReader::kMC )
1421 // pdg = GetCaloPID()->GetPdg(detector,calo->GetPID(),mom.E());//PID with weights
1423 // pdg = GetCaloPID()->GetPdg(detector,mom,calo);//PID recalculated
1425 // if(GetDebug() > 5) printf("AliAnaParticleHadronCorrelation::SelectCluster() - PDG of identified particle %d\n",pdg);
1427 // //If it does not pass pid, skip
1428 // if(pdg != AliCaloPID::kPhoton && pdg != AliCaloPID::kPi0) {
1433 // //Check acceptance selection
1434 // if(IsFiducialCutOn()){
1435 // Bool_t in = GetFiducialCut()->IsInFiducialCut(mom,detector) ;
1436 // if(! in ) return kFALSE ;
1439 // if(GetDebug() > 5) printf("AliAnaParticleHadronCorrelation::SelectCluster() - Correlation photon selection cuts passed: pT %3.2f, pdg %d\n",mom.Pt(), pdg);