]>
Commit | Line | Data |
---|---|---|
1c5acb87 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | /* $Id: $ */ | |
16 | ||
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) | |
dd4871cd | 21 | |
22 | // Modified by Yaxian Mao: | |
23 | // 1. add the UE subtraction for corrlation study | |
24 | // 2. change the correlation variable | |
e6b5d324 | 25 | // 3. Only use leading particle(cluster/track) as trigger for correlation (2010/07/02) |
1c5acb87 | 26 | ////////////////////////////////////////////////////////////////////////////// |
27 | ||
28 | ||
29 | // --- ROOT system --- | |
30 | #include "TH2F.h" | |
477d6cee | 31 | #include "TClonesArray.h" |
9415d854 | 32 | #include "TClass.h" |
dd4871cd | 33 | #include "TMath.h" |
1c5acb87 | 34 | |
35 | //---- ANALYSIS system ---- | |
1c5acb87 | 36 | #include "AliNeutralMesonSelection.h" |
37 | #include "AliAnaParticleHadronCorrelation.h" | |
38 | #include "AliCaloTrackReader.h" | |
39 | #include "AliCaloPID.h" | |
40 | #include "AliAODPWG4ParticleCorrelation.h" | |
ff45398a | 41 | #include "AliFiducialCut.h" |
477d6cee | 42 | #include "AliAODTrack.h" |
0ae57829 | 43 | #include "AliVCluster.h" |
9415d854 | 44 | #include "AliMCAnalysisUtils.h" |
45 | #include "TParticle.h" | |
46 | #include "AliStack.h" | |
591cc579 | 47 | #include "AliAODMCParticle.h" |
c8fe2783 | 48 | #include "AliMixedEvent.h" |
1c5acb87 | 49 | |
50 | ClassImp(AliAnaParticleHadronCorrelation) | |
51 | ||
52 | ||
53 | //____________________________________________________________________________ | |
dde5a268 | 54 | AliAnaParticleHadronCorrelation::AliAnaParticleHadronCorrelation(): |
1c5acb87 | 55 | AliAnaPartCorrBaseClass(), |
dde5a268 | 56 | fDeltaPhiMaxCut(0.), fDeltaPhiMinCut(0.), fSelectIsolated(0), |
57 | fMakeSeveralUE(0), fUeDeltaPhiMaxCut(0.), fUeDeltaPhiMinCut(0.), | |
e6b5d324 | 58 | fhPtLeading(0),fhPhiLeading(0),fhEtaLeading(0), |
b6991fc4 | 59 | fhDeltaPhiDeltaEtaCharged(0),fhDeltaPhiDeltaEtaNeutral(0), |
477d6cee | 60 | fhPhiCharged(0), fhPhiNeutral(0), fhEtaCharged(0), fhEtaNeutral(0), |
1c5acb87 | 61 | fhDeltaPhiCharged(0), fhDeltaPhiNeutral(0), |
62 | fhDeltaEtaCharged(0), fhDeltaEtaNeutral(0), | |
123fc3bd | 63 | fhDeltaPhiChargedPt(0), fhDeltaPhiNeutralPt(0), |
64 | fhDeltaPhiUeChargedPt(0), fhDeltaPhiUeNeutralPt(0), | |
dde5a268 | 65 | fhPtImbalanceNeutral(0), fhPtImbalanceCharged(0), |
123fc3bd | 66 | fhPtImbalanceUeCharged(0),fhPtImbalanceUeNeutral(0), |
dd4871cd | 67 | fhPtHbpCharged(0), fhPtHbpUeCharged(0), |
68 | fhPtHbpNeutral(0), fhPtHbpUeNeutral(0), | |
123fc3bd | 69 | fhDeltaPhiUeLeftCharged(0),fhDeltaPhiUeRightCharged(0), |
70 | fhDeltaPhiUeLeftNeutral(0),fhDeltaPhiUeRightNeutral(0), | |
71 | fhPtImbalanceUeLeftCharged(0),fhPtImbalanceUeRightCharged(0), | |
dd4871cd | 72 | fhPtImbalanceUeLeftNeutral(0),fhPtImbalanceUeRightNeutral(0), |
73 | fhPtHbpUeLeftCharged(0),fhPtHbpUeRightCharged(0), | |
74 | fhPtHbpUeLeftNeutral(0),fhPtHbpUeRightNeutral(0) | |
1c5acb87 | 75 | { |
76 | //Default Ctor | |
477d6cee | 77 | |
1c5acb87 | 78 | //Initialize parameters |
79 | InitParameters(); | |
80 | } | |
78219bac | 81 | /* |
1c5acb87 | 82 | //____________________________________________________________________________ |
dde5a268 | 83 | AliAnaParticleHadronCorrelation::AliAnaParticleHadronCorrelation(const AliAnaParticleHadronCorrelation & g): |
1c5acb87 | 84 | AliAnaPartCorrBaseClass(g), |
85 | fDeltaPhiMaxCut(g.fDeltaPhiMaxCut), fDeltaPhiMinCut(g.fDeltaPhiMinCut), | |
6639984f | 86 | fSelectIsolated(g.fSelectIsolated), |
dde5a268 | 87 | fMakeSeveralUE(g.fMakeSeveralUE), fUeDeltaPhiMaxCut(g.fUeDeltaPhiMaxCut), |
88 | fUeDeltaPhiMinCut(g.fUeDeltaPhiMinCut), | |
e6b5d324 | 89 | fhPtLeading(g.fhPtLeading),fhPhiLeading(g.fhPhiLeading),fhEtaLeading(g.fhEtaLeading), |
90 | fhDeltaPhiDeltaEtaCharged(g.fhDeltaPhiDeltaEtaCharged),fhDeltaPhiDeltaEtaNeutral(g.fhDeltaPhiDeltaEtaNeutral), | |
1c5acb87 | 91 | fhPhiCharged(g.fhPhiCharged), fhPhiNeutral(g.fhPhiNeutral), |
92 | fhEtaCharged(g.fhEtaCharged), fhEtaNeutral(g.fhEtaNeutral), | |
93 | fhDeltaPhiCharged(g.fhDeltaPhiCharged), | |
94 | fhDeltaPhiNeutral(g.fhDeltaPhiNeutral), | |
95 | fhDeltaEtaCharged(g.fhDeltaEtaCharged), | |
96 | fhDeltaEtaNeutral(g.fhDeltaEtaNeutral), | |
dde5a268 | 97 | fhDeltaPhiChargedPt(g.fhDeltaPhiChargedPt), |
1c5acb87 | 98 | fhDeltaPhiNeutralPt(g.fhDeltaPhiNeutralPt), |
dde5a268 | 99 | fhDeltaPhiUeChargedPt(g.fhDeltaPhiUeChargedPt), |
123fc3bd | 100 | fhDeltaPhiUeNeutralPt(g.fhDeltaPhiUeNeutralPt), |
1c5acb87 | 101 | fhPtImbalanceNeutral(g.fhPtImbalanceNeutral), |
dde5a268 | 102 | fhPtImbalanceCharged(g.fhPtImbalanceCharged), |
103 | fhPtImbalanceUeCharged(g.fhPtImbalanceUeCharged), | |
123fc3bd | 104 | fhPtImbalanceUeNeutral(g.fhPtImbalanceUeNeutral), |
dd4871cd | 105 | fhPtHbpCharged(g.fhPtHbpCharged), |
106 | fhPtHbpUeCharged(g.fhPtHbpUeCharged), | |
107 | fhPtHbpNeutral(g.fhPtHbpNeutral), | |
108 | fhPtHbpUeNeutral(g.fhPtHbpUeNeutral), | |
123fc3bd | 109 | fhDeltaPhiUeLeftCharged(g.fhDeltaPhiUeLeftCharged), |
110 | fhDeltaPhiUeRightCharged(g.fhDeltaPhiUeRightCharged), | |
111 | fhDeltaPhiUeLeftNeutral(g.fhDeltaPhiUeLeftNeutral), | |
112 | fhDeltaPhiUeRightNeutral(g.fhDeltaPhiUeRightNeutral), | |
dde5a268 | 113 | fhPtImbalanceUeLeftCharged(g.fhPtImbalanceUeLeftCharged), |
123fc3bd | 114 | fhPtImbalanceUeRightCharged(g.fhPtImbalanceUeRightCharged), |
115 | fhPtImbalanceUeLeftNeutral(g.fhPtImbalanceUeLeftNeutral), | |
dd4871cd | 116 | fhPtImbalanceUeRightNeutral(g.fhPtImbalanceUeRightNeutral), |
117 | fhPtHbpUeLeftCharged(g.fhPtHbpUeLeftCharged), | |
118 | fhPtHbpUeRightCharged(g.fhPtHbpUeRightCharged), | |
119 | fhPtHbpUeLeftNeutral(g.fhPtHbpUeLeftNeutral), | |
120 | fhPtHbpUeRightNeutral(g.fhPtHbpUeRightNeutral) | |
1c5acb87 | 121 | { |
122 | // cpy ctor | |
477d6cee | 123 | |
1c5acb87 | 124 | } |
125 | ||
126 | //_________________________________________________________________________ | |
127 | AliAnaParticleHadronCorrelation & AliAnaParticleHadronCorrelation::operator = (const AliAnaParticleHadronCorrelation & source) | |
128 | { | |
129 | // assignment operator | |
477d6cee | 130 | |
1c5acb87 | 131 | if(this == &source)return *this; |
132 | ((AliAnaPartCorrBaseClass *)this)->operator=(source); | |
133 | ||
134 | fDeltaPhiMaxCut = source.fDeltaPhiMaxCut ; | |
135 | fDeltaPhiMinCut = source.fDeltaPhiMinCut ; | |
6639984f | 136 | fSelectIsolated = source.fSelectIsolated ; |
dde5a268 | 137 | fMakeSeveralUE = source.fMakeSeveralUE ; |
138 | fUeDeltaPhiMaxCut = source.fUeDeltaPhiMaxCut ; | |
e6b5d324 | 139 | fUeDeltaPhiMinCut = source.fUeDeltaPhiMinCut ; |
140 | fhPtLeading = source.fhPtLeading; | |
141 | fhPhiLeading = source.fhPhiLeading; | |
142 | fhEtaLeading = source.fhEtaLeading; | |
143 | fhDeltaPhiDeltaEtaCharged = source.fhDeltaPhiDeltaEtaCharged ; | |
144 | fhDeltaPhiDeltaEtaNeutral = source.fhDeltaPhiDeltaEtaNeutral ; | |
1c5acb87 | 145 | fhPhiCharged = source.fhPhiCharged ; fhPhiNeutral = source.fhPhiNeutral ; |
146 | fhEtaCharged = source.fhEtaCharged ; fhEtaNeutral = source.fhEtaNeutral ; | |
147 | fhDeltaPhiCharged = source.fhDeltaPhiCharged ; | |
148 | fhDeltaPhiNeutral = source.fhDeltaPhiNeutral ; | |
1c5acb87 | 149 | fhDeltaEtaCharged = source.fhDeltaEtaCharged ; |
150 | fhDeltaEtaNeutral = source.fhDeltaEtaNeutral ; | |
151 | fhDeltaPhiChargedPt = source.fhDeltaPhiChargedPt ; | |
dde5a268 | 152 | fhDeltaPhiNeutralPt = source.fhDeltaPhiNeutralPt ; |
153 | fhDeltaPhiUeChargedPt = source.fhDeltaPhiUeChargedPt ; | |
123fc3bd | 154 | fhDeltaPhiUeNeutralPt = source.fhDeltaPhiUeNeutralPt ; |
1c5acb87 | 155 | fhPtImbalanceNeutral = source.fhPtImbalanceNeutral ; |
156 | fhPtImbalanceCharged = source.fhPtImbalanceCharged ; | |
dd4871cd | 157 | fhPtImbalanceUeCharged = source.fhPtImbalanceUeCharged ; |
123fc3bd | 158 | fhPtImbalanceUeNeutral = source.fhPtImbalanceUeNeutral ; |
dd4871cd | 159 | fhPtHbpCharged = source.fhPtHbpCharged ; |
160 | fhPtHbpUeCharged = source.fhPtHbpUeCharged; | |
161 | fhPtHbpNeutral = source.fhPtHbpNeutral ; | |
162 | fhPtHbpUeNeutral = source.fhPtHbpUeNeutral; | |
123fc3bd | 163 | fhDeltaPhiUeLeftCharged = source.fhDeltaPhiUeLeftCharged ; |
164 | fhDeltaPhiUeRightCharged = source.fhDeltaPhiUeRightCharged ; | |
165 | fhDeltaPhiUeLeftNeutral = source.fhDeltaPhiUeLeftNeutral ; | |
166 | fhDeltaPhiUeRightNeutral = source.fhDeltaPhiUeRightNeutral ; | |
dde5a268 | 167 | fhPtImbalanceUeLeftCharged = source.fhPtImbalanceUeLeftCharged ; |
168 | fhPtImbalanceUeRightCharged = source.fhPtImbalanceUeRightCharged ; | |
123fc3bd | 169 | fhPtImbalanceUeLeftNeutral = source.fhPtImbalanceUeLeftNeutral ; |
170 | fhPtImbalanceUeRightNeutral = source.fhPtImbalanceUeRightNeutral ; | |
dd4871cd | 171 | fhPtHbpUeLeftCharged = source.fhPtHbpUeLeftCharged ; |
172 | fhPtHbpUeRightCharged = source.fhPtHbpUeRightCharged ; | |
173 | fhPtHbpUeLeftNeutral = source.fhPtHbpUeLeftNeutral ; | |
174 | fhPtHbpUeRightNeutral = source.fhPtHbpUeRightNeutral ; | |
175 | ||
1c5acb87 | 176 | return *this; |
177 | ||
178 | } | |
78219bac | 179 | */ |
1c5acb87 | 180 | //________________________________________________________________________ |
181 | TList * AliAnaParticleHadronCorrelation::GetCreateOutputObjects() | |
182 | { | |
477d6cee | 183 | |
184 | // Create histograms to be saved in output file and | |
185 | // store them in fOutputContainer | |
186 | TList * outputContainer = new TList() ; | |
187 | outputContainer->SetName("CorrelationHistos") ; | |
188 | ||
5a2dbc3c | 189 | Int_t nptbins = GetHistoPtBins(); |
190 | Int_t nphibins = GetHistoPhiBins(); | |
191 | Int_t netabins = GetHistoEtaBins(); | |
477d6cee | 192 | Float_t ptmax = GetHistoPtMax(); |
193 | Float_t phimax = GetHistoPhiMax(); | |
194 | Float_t etamax = GetHistoEtaMax(); | |
195 | Float_t ptmin = GetHistoPtMin(); | |
196 | Float_t phimin = GetHistoPhiMin(); | |
197 | Float_t etamin = GetHistoEtaMin(); | |
e6b5d324 | 198 | |
199 | fhPtLeading = new TH1F ("hPtLeading","p_T distribution of leading particles", nptbins,ptmin,ptmax); | |
200 | fhPtLeading->SetXTitle("p_{T}^{trig} (GeV/c)"); | |
201 | ||
202 | fhPhiLeading = new TH2F ("hPhiLeading","#phi distribution of leading Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax); | |
203 | fhPhiLeading->SetYTitle("#phi (rad)"); | |
204 | ||
205 | fhEtaLeading = new TH2F ("hEtaLeading","#eta distribution of leading",nptbins,ptmin,ptmax, netabins,etamin,etamax); | |
206 | fhEtaLeading->SetYTitle("#eta "); | |
207 | outputContainer->Add(fhPtLeading); | |
208 | outputContainer->Add(fhPhiLeading); | |
209 | outputContainer->Add(fhEtaLeading); | |
477d6cee | 210 | |
211 | //Correlation with charged hadrons | |
212 | if(GetReader()->IsCTSSwitchedOn()) { | |
c8fe2783 | 213 | fhDeltaPhiDeltaEtaCharged = new TH2F |
214 | ("DeltaPhiDeltaEtaCharged","#phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}", | |
215 | 140,-2.,5.,200,-2,2); | |
216 | fhDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi"); | |
217 | fhDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta"); | |
218 | ||
477d6cee | 219 | fhPhiCharged = new TH2F |
dd4871cd | 220 | ("PhiCharged","#phi_{h^{#pm}} vs p_{T #pm}", |
477d6cee | 221 | nptbins,ptmin,ptmax,nphibins,phimin,phimax); |
222 | fhPhiCharged->SetYTitle("#phi_{h^{#pm}} (rad)"); | |
dd4871cd | 223 | fhPhiCharged->SetXTitle("p_{T #pm} (GeV/c)"); |
477d6cee | 224 | |
225 | fhEtaCharged = new TH2F | |
dd4871cd | 226 | ("EtaCharged","#eta_{h^{#pm}} vs p_{T #pm}", |
477d6cee | 227 | nptbins,ptmin,ptmax,netabins,etamin,etamax); |
228 | fhEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)"); | |
dd4871cd | 229 | fhEtaCharged->SetXTitle("p_{T #pm} (GeV/c)"); |
477d6cee | 230 | |
231 | fhDeltaPhiCharged = new TH2F | |
232 | ("DeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}", | |
4df35693 | 233 | nptbins,ptmin,ptmax,140,-2.,5.); |
477d6cee | 234 | fhDeltaPhiCharged->SetYTitle("#Delta #phi"); |
235 | fhDeltaPhiCharged->SetXTitle("p_{T trigger} (GeV/c)"); | |
236 | ||
237 | fhDeltaPhiChargedPt = new TH2F | |
9415d854 | 238 | ("DeltaPhiChargedPt","#phi_{trigger} - #phi_{#h^{#pm}} vs p_{T h^{#pm}}", |
4df35693 | 239 | nptbins,ptmin,ptmax,140,-2.,5.); |
477d6cee | 240 | fhDeltaPhiChargedPt->SetYTitle("#Delta #phi"); |
241 | fhDeltaPhiChargedPt->SetXTitle("p_{T h^{#pm}} (GeV/c)"); | |
dde5a268 | 242 | |
243 | fhDeltaPhiUeChargedPt = new TH2F | |
244 | ("DeltaPhiUeChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}}", | |
4df35693 | 245 | nptbins,ptmin,ptmax,140,-2.,5.); |
dde5a268 | 246 | fhDeltaPhiUeChargedPt->SetYTitle("#Delta #phi"); |
247 | fhDeltaPhiUeChargedPt->SetXTitle("p_{T h^{#pm}} (GeV/c)"); | |
477d6cee | 248 | |
249 | fhDeltaEtaCharged = new TH2F | |
250 | ("DeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger}", | |
251 | nptbins,ptmin,ptmax,200,-2,2); | |
252 | fhDeltaEtaCharged->SetYTitle("#Delta #eta"); | |
253 | fhDeltaEtaCharged->SetXTitle("p_{T trigger} (GeV/c)"); | |
254 | ||
255 | fhPtImbalanceCharged = | |
256 | new TH2F("CorrelationCharged","z_{trigger h^{#pm}} = p_{T h^{#pm}} / p_{T trigger}", | |
4df35693 | 257 | nptbins,ptmin,ptmax,200,0.,2.); |
477d6cee | 258 | fhPtImbalanceCharged->SetYTitle("z_{trigger h^{#pm}}"); |
259 | fhPtImbalanceCharged->SetXTitle("p_{T trigger}"); | |
260 | ||
dde5a268 | 261 | fhPtImbalanceUeCharged = |
262 | new TH2F("CorrelationUeCharged","z_{trigger h^{#pm}} = p_{T Ueh^{#pm}} / p_{T trigger}", | |
4df35693 | 263 | nptbins,ptmin,ptmax,200,0.,2.); |
dde5a268 | 264 | fhPtImbalanceUeCharged->SetYTitle("z_{trigger Ueh^{#pm}}"); |
265 | fhPtImbalanceUeCharged->SetXTitle("p_{T trigger}"); | |
266 | ||
dd4871cd | 267 | fhPtHbpCharged = |
268 | new TH2F("HbpCharged","#xi = ln(1/x_{E}) with charged hadrons", | |
4df35693 | 269 | nptbins,ptmin,ptmax,200,0.,10.); |
dd4871cd | 270 | fhPtHbpCharged->SetYTitle("ln(1/x_{E})"); |
271 | fhPtHbpCharged->SetXTitle("p_{T trigger}"); | |
272 | ||
273 | fhPtHbpUeCharged = | |
274 | new TH2F("HbpUeCharged","#xi = ln(1/x_{E}) with charged hadrons", | |
4df35693 | 275 | nptbins,ptmin,ptmax,200,0.,10.); |
dd4871cd | 276 | fhPtHbpUeCharged->SetYTitle("ln(1/x_{E})"); |
277 | fhPtHbpUeCharged->SetXTitle("p_{T trigger}"); | |
b6991fc4 | 278 | |
c8fe2783 | 279 | outputContainer->Add(fhDeltaPhiDeltaEtaCharged); |
477d6cee | 280 | outputContainer->Add(fhPhiCharged) ; |
281 | outputContainer->Add(fhEtaCharged) ; | |
282 | outputContainer->Add(fhDeltaPhiCharged) ; | |
283 | outputContainer->Add(fhDeltaEtaCharged) ; | |
477d6cee | 284 | outputContainer->Add(fhDeltaPhiChargedPt) ; |
dde5a268 | 285 | outputContainer->Add(fhDeltaPhiUeChargedPt) ; |
286 | outputContainer->Add(fhPtImbalanceCharged) ; | |
287 | outputContainer->Add(fhPtImbalanceUeCharged) ; | |
dd4871cd | 288 | outputContainer->Add(fhPtHbpCharged) ; |
289 | outputContainer->Add(fhPtHbpUeCharged) ; | |
dde5a268 | 290 | if(fMakeSeveralUE){ |
123fc3bd | 291 | fhDeltaPhiUeLeftCharged = new TH2F |
dde5a268 | 292 | ("DeltaPhiUeLeftChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE left side range of trigger particles", |
4df35693 | 293 | nptbins,ptmin,ptmax,140,-2.,5.); |
123fc3bd | 294 | fhDeltaPhiUeLeftCharged->SetYTitle("#Delta #phi"); |
295 | fhDeltaPhiUeLeftCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)"); | |
296 | outputContainer->Add(fhDeltaPhiUeLeftCharged) ; | |
dde5a268 | 297 | |
123fc3bd | 298 | fhDeltaPhiUeRightCharged = new TH2F |
dde5a268 | 299 | ("DeltaPhiUeRightChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs p_{T Ueh^{#pm}} with UE right side range of trigger particles", |
4df35693 | 300 | nptbins,ptmin,ptmax,140,-2.,5.); |
123fc3bd | 301 | fhDeltaPhiUeRightCharged->SetYTitle("#Delta #phi"); |
302 | fhDeltaPhiUeRightCharged->SetXTitle("p_{T h^{#pm}} (GeV/c)"); | |
303 | outputContainer->Add(fhDeltaPhiUeRightCharged) ; | |
dde5a268 | 304 | |
305 | fhPtImbalanceUeLeftCharged = | |
306 | new TH2F("CorrelationUeChargedLeft","z_{trigger h^{#pm}} = p_{T Ueh^{#pm}} / p_{T trigger} with UE left side of trigger", | |
4df35693 | 307 | nptbins,ptmin,ptmax,200,0.,2.); |
dde5a268 | 308 | fhPtImbalanceUeLeftCharged->SetYTitle("z_{trigger Ueh^{#pm}}"); |
309 | fhPtImbalanceUeLeftCharged->SetXTitle("p_{T trigger}"); | |
310 | outputContainer->Add(fhPtImbalanceUeLeftCharged) ; | |
311 | ||
312 | fhPtImbalanceUeRightCharged = | |
313 | new TH2F("CorrelationUeChargedRight","z_{trigger h^{#pm}} = p_{T Ueh^{#pm}} / p_{T trigger} with UE right side of trigger", | |
4df35693 | 314 | nptbins,ptmin,ptmax,200,0.,2.); |
dde5a268 | 315 | fhPtImbalanceUeRightCharged->SetYTitle("z_{trigger Ueh^{#pm}}"); |
316 | fhPtImbalanceUeRightCharged->SetXTitle("p_{T trigger}"); | |
317 | outputContainer->Add(fhPtImbalanceUeRightCharged) ; | |
dd4871cd | 318 | |
319 | fhPtHbpUeLeftCharged = | |
320 | new TH2F("HbpUeChargedLeft","#xi = ln(1/x_{E}) with charged UE left side of trigger", | |
4df35693 | 321 | nptbins,ptmin,ptmax,200,0.,10.); |
dd4871cd | 322 | fhPtHbpUeLeftCharged->SetYTitle("ln(1/x_{E})"); |
323 | fhPtHbpUeLeftCharged->SetXTitle("p_{T trigger}"); | |
324 | outputContainer->Add(fhPtHbpUeLeftCharged) ; | |
325 | ||
326 | fhPtHbpUeRightCharged = | |
327 | new TH2F("HbpUeChargedRight","#xi = ln(1/x_{E}) with charged UE right side of trigger", | |
4df35693 | 328 | nptbins,ptmin,ptmax,200,0.,10.); |
dd4871cd | 329 | fhPtHbpUeRightCharged->SetYTitle("ln(1/x_{E})"); |
330 | fhPtHbpUeRightCharged->SetXTitle("p_{T trigger}"); | |
331 | outputContainer->Add(fhPtHbpUeRightCharged) ; | |
332 | ||
dde5a268 | 333 | } |
477d6cee | 334 | } //Correlation with charged hadrons |
335 | ||
336 | //Correlation with neutral hadrons | |
337 | if(GetReader()->IsEMCALSwitchedOn() || GetReader()->IsPHOSSwitchedOn()){ | |
338 | ||
c8fe2783 | 339 | fhDeltaPhiDeltaEtaNeutral = new TH2F |
340 | ("DeltaPhiDeltaEtaNeutral","#phi_{trigger} - #phi_{h^{0}} vs #eta_{trigger} - #eta_{h^{0}}", | |
341 | 140,-2.,5.,200,-2,2); | |
342 | fhDeltaPhiDeltaEtaNeutral->SetXTitle("#Delta #phi"); | |
343 | fhDeltaPhiDeltaEtaNeutral->SetYTitle("#Delta #eta"); | |
b6991fc4 | 344 | |
477d6cee | 345 | fhPhiNeutral = new TH2F |
dd4871cd | 346 | ("PhiNeutral","#phi_{#pi^{0}} vs p_{T #pi^{0}}", |
477d6cee | 347 | nptbins,ptmin,ptmax,nphibins,phimin,phimax); |
348 | fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)"); | |
dd4871cd | 349 | fhPhiNeutral->SetXTitle("p_{T #pi^{0}} (GeV/c)"); |
477d6cee | 350 | |
351 | fhEtaNeutral = new TH2F | |
dd4871cd | 352 | ("EtaNeutral","#eta_{#pi^{0}} vs p_{T #pi^{0}}", |
477d6cee | 353 | nptbins,ptmin,ptmax,netabins,etamin,etamax); |
354 | fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)"); | |
dd4871cd | 355 | fhEtaNeutral->SetXTitle("p_{T #pi^{0}} (GeV/c)"); |
477d6cee | 356 | |
357 | fhDeltaPhiNeutral = new TH2F | |
358 | ("DeltaPhiNeutral","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T trigger}", | |
359 | nptbins,ptmin,ptmax,nphibins,phimin,phimax); | |
360 | fhDeltaPhiNeutral->SetYTitle("#Delta #phi"); | |
361 | fhDeltaPhiNeutral->SetXTitle("p_{T trigger} (GeV/c)"); | |
362 | ||
363 | fhDeltaPhiNeutralPt = new TH2F | |
364 | ("DeltaPhiNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T #pi^{0}}}", | |
4df35693 | 365 | nptbins,ptmin,ptmax,140,-2.,5.); |
477d6cee | 366 | fhDeltaPhiNeutralPt->SetYTitle("#Delta #phi"); |
de8a210f | 367 | fhDeltaPhiNeutralPt->SetXTitle("p_{T h^{0}} (GeV/c)"); |
123fc3bd | 368 | |
369 | fhDeltaPhiUeNeutralPt = new TH2F | |
370 | ("DeltaPhiUeNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T #pi^{0}}}", | |
4df35693 | 371 | nptbins,ptmin,ptmax,140,-2.,5.); |
123fc3bd | 372 | fhDeltaPhiUeNeutralPt->SetYTitle("#Delta #phi"); |
de8a210f | 373 | fhDeltaPhiUeNeutralPt->SetXTitle("p_{T h^{0}} (GeV/c)"); |
477d6cee | 374 | |
375 | fhDeltaEtaNeutral = new TH2F | |
376 | ("DeltaEtaNeutral","#eta_{trigger} - #eta_{#pi^{0}} vs p_{T trigger}", | |
377 | nptbins,ptmin,ptmax,200,-2,2); | |
378 | fhDeltaEtaNeutral->SetYTitle("#Delta #eta"); | |
379 | fhDeltaEtaNeutral->SetXTitle("p_{T trigger} (GeV/c)"); | |
380 | ||
381 | fhPtImbalanceNeutral = | |
382 | new TH2F("CorrelationNeutral","z_{trigger #pi} = p_{T #pi^{0}} / p_{T trigger}", | |
4df35693 | 383 | nptbins,ptmin,ptmax,200,0.,2.); |
477d6cee | 384 | fhPtImbalanceNeutral->SetYTitle("z_{trigger #pi^{0}}"); |
385 | fhPtImbalanceNeutral->SetXTitle("p_{T trigger}"); | |
123fc3bd | 386 | |
387 | fhPtImbalanceUeNeutral = | |
388 | new TH2F("CorrelationUeNeutral","z_{trigger #pi} = p_{T #pi^{0}} / p_{T trigger}", | |
4df35693 | 389 | nptbins,ptmin,ptmax,200,0.,2.); |
123fc3bd | 390 | fhPtImbalanceUeNeutral->SetYTitle("z_{trigger #pi^{0}}"); |
391 | fhPtImbalanceUeNeutral->SetXTitle("p_{T trigger}"); | |
c8fe2783 | 392 | |
393 | fhPtHbpNeutral = | |
dd4871cd | 394 | new TH2F("HbpNeutral","#xi = ln(1/x_{E}) with neutral particles", |
c8fe2783 | 395 | nptbins,ptmin,ptmax,200,0.,10.); |
396 | fhPtHbpNeutral->SetYTitle("ln(1/x_{E})"); | |
397 | fhPtHbpNeutral->SetXTitle("p_{T trigger}"); | |
398 | ||
399 | fhPtHbpUeNeutral = | |
dd4871cd | 400 | new TH2F("HbpUeNeutral","#xi = ln(1/x_{E}) with neutral particles", |
c8fe2783 | 401 | nptbins,ptmin,ptmax,200,0.,10.); |
402 | fhPtHbpUeNeutral->SetYTitle("ln(1/x_{E})"); | |
403 | fhPtHbpUeNeutral->SetXTitle("p_{T trigger}"); | |
404 | ||
405 | ||
406 | outputContainer->Add(fhDeltaPhiDeltaEtaNeutral); | |
477d6cee | 407 | outputContainer->Add(fhPhiNeutral) ; |
408 | outputContainer->Add(fhEtaNeutral) ; | |
409 | outputContainer->Add(fhDeltaPhiNeutral) ; | |
123fc3bd | 410 | outputContainer->Add(fhDeltaPhiNeutralPt) ; |
411 | outputContainer->Add(fhDeltaPhiUeNeutralPt) ; | |
477d6cee | 412 | outputContainer->Add(fhDeltaEtaNeutral) ; |
413 | outputContainer->Add(fhPtImbalanceNeutral) ; | |
dd4871cd | 414 | outputContainer->Add(fhPtImbalanceUeNeutral) ; |
c8fe2783 | 415 | outputContainer->Add(fhPtHbpNeutral) ; |
416 | outputContainer->Add(fhPtHbpUeNeutral) ; | |
123fc3bd | 417 | |
418 | if(fMakeSeveralUE){ | |
419 | fhDeltaPhiUeLeftNeutral = new TH2F | |
dd4871cd | 420 | ("DeltaPhiUeLeftNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs p_{T h^{0}} with neutral UE left side range of trigger particles", |
4df35693 | 421 | nptbins,ptmin,ptmax,140,-2.,5.); |
123fc3bd | 422 | fhDeltaPhiUeLeftNeutral->SetYTitle("#Delta #phi"); |
423 | fhDeltaPhiUeLeftNeutral->SetXTitle("p_{T h^{0}} (GeV/c)"); | |
424 | outputContainer->Add(fhDeltaPhiUeLeftNeutral) ; | |
425 | ||
426 | fhDeltaPhiUeRightNeutral = new TH2F | |
dd4871cd | 427 | ("DeltaPhiUeRightNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs p_{T Ueh^{0}} with neutral UE right side range of trigger particles", |
4df35693 | 428 | nptbins,ptmin,ptmax,140,-2.,5.); |
123fc3bd | 429 | fhDeltaPhiUeRightNeutral->SetYTitle("#Delta #phi"); |
430 | fhDeltaPhiUeRightNeutral->SetXTitle("p_{T h^{0}} (GeV/c)"); | |
431 | outputContainer->Add(fhDeltaPhiUeRightNeutral) ; | |
432 | ||
433 | fhPtImbalanceUeLeftNeutral = | |
dd4871cd | 434 | new TH2F("CorrelationUeNeutralLeft","z_{trigger h^{0}} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE left side of trigger", |
4df35693 | 435 | nptbins,ptmin,ptmax,140,0.,2.); |
123fc3bd | 436 | fhPtImbalanceUeLeftNeutral->SetYTitle("z_{trigger Ueh^{0}}"); |
437 | fhPtImbalanceUeLeftNeutral->SetXTitle("p_{T trigger}"); | |
438 | outputContainer->Add(fhPtImbalanceUeLeftNeutral) ; | |
439 | ||
440 | fhPtImbalanceUeRightNeutral = | |
dd4871cd | 441 | new TH2F("CorrelationUeNeutralRight","z_{trigger h^{0}} = p_{T Ueh^{0}} / p_{T trigger} with neutral UE right side of trigger", |
4df35693 | 442 | nptbins,ptmin,ptmax,200,0.,2.); |
123fc3bd | 443 | fhPtImbalanceUeRightNeutral->SetYTitle("z_{trigger Ueh^{0}}"); |
444 | fhPtImbalanceUeRightNeutral->SetXTitle("p_{T trigger}"); | |
445 | outputContainer->Add(fhPtImbalanceUeRightNeutral) ; | |
dd4871cd | 446 | |
c8fe2783 | 447 | fhPtHbpUeLeftNeutral = |
dd4871cd | 448 | new TH2F("HbpUeNeutralLeft","#xi = ln(1/x_{E}) with neutral UE left side of trigger", |
c8fe2783 | 449 | nptbins,ptmin,ptmax,200,0.,10.); |
450 | fhPtHbpUeLeftNeutral->SetYTitle("ln(1/x_{E})"); | |
451 | fhPtHbpUeLeftNeutral->SetXTitle("p_{T trigger}"); | |
452 | outputContainer->Add(fhPtHbpUeLeftNeutral) ; | |
453 | ||
454 | fhPtHbpUeRightNeutral = | |
dd4871cd | 455 | new TH2F("HbpUeNeutralRight","#xi = ln(1/x_{E}) with neutral UE right side of trigger", |
c8fe2783 | 456 | nptbins,ptmin,ptmax,200,0.,10.); |
457 | fhPtHbpUeRightNeutral->SetYTitle("ln(1/x_{E})"); | |
458 | fhPtHbpUeRightNeutral->SetXTitle("p_{T trigger}"); | |
459 | outputContainer->Add(fhPtHbpUeRightNeutral) ; | |
460 | ||
123fc3bd | 461 | } |
462 | ||
477d6cee | 463 | //Keep neutral meson selection histograms if requiered |
464 | //Setting done in AliNeutralMesonSelection | |
465 | if(GetNeutralMesonSelection()){ | |
466 | TList * nmsHistos = GetNeutralMesonSelection()->GetCreateOutputObjects() ; | |
467 | if(GetNeutralMesonSelection()->AreNeutralMesonSelectionHistosKept()) | |
468 | for(Int_t i = 0; i < nmsHistos->GetEntries(); i++) outputContainer->Add(nmsHistos->At(i)) ; | |
a14fd526 | 469 | delete nmsHistos; |
477d6cee | 470 | } |
a3aebfff | 471 | |
477d6cee | 472 | }//Correlation with neutral hadrons |
473 | ||
474 | return outputContainer; | |
a3aebfff | 475 | |
1c5acb87 | 476 | } |
477 | ||
477d6cee | 478 | //____________________________________________________________________________ |
1c5acb87 | 479 | void AliAnaParticleHadronCorrelation::InitParameters() |
480 | { | |
477d6cee | 481 | |
1c5acb87 | 482 | //Initialize the parameters of the analysis. |
a3aebfff | 483 | SetInputAODName("PWG4Particle"); |
591cc579 | 484 | SetAODObjArrayName("Hadrons"); |
a3aebfff | 485 | AddToHistogramsName("AnaHadronCorr_"); |
486 | ||
9415d854 | 487 | //Correlation with neutrals |
488 | //SetOutputAODClassName("AliAODPWG4Particle"); | |
489 | //SetOutputAODName("Pi0Correlated"); | |
490 | ||
dde5a268 | 491 | SetPtCutRange(0.,300); |
1c5acb87 | 492 | fDeltaPhiMinCut = 1.5 ; |
493 | fDeltaPhiMaxCut = 4.5 ; | |
6639984f | 494 | fSelectIsolated = kFALSE; |
dde5a268 | 495 | fMakeSeveralUE = kFALSE; |
496 | fUeDeltaPhiMinCut = 1. ; | |
497 | fUeDeltaPhiMaxCut = 1.5 ; | |
1c5acb87 | 498 | } |
499 | ||
500 | //__________________________________________________________________ | |
501 | void AliAnaParticleHadronCorrelation::Print(const Option_t * opt) const | |
502 | { | |
503 | ||
504 | //Print some relevant parameters set for the analysis | |
505 | if(! opt) | |
506 | return; | |
507 | ||
a3aebfff | 508 | printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ; |
509 | AliAnaPartCorrBaseClass::Print(" "); | |
510 | ||
1c5acb87 | 511 | printf("Phi trigger particle-Hadron < %3.2f\n", fDeltaPhiMaxCut) ; |
512 | printf("Phi trigger particle-Hadron > %3.2f\n", fDeltaPhiMinCut) ; | |
6639984f | 513 | printf("Isolated Trigger? %d\n", fSelectIsolated) ; |
dde5a268 | 514 | printf("Phi trigger particle-UeHadron < %3.2f\n", fUeDeltaPhiMaxCut) ; |
515 | printf("Phi trigger particle-UeHadron > %3.2f\n", fUeDeltaPhiMinCut) ; | |
516 | printf("Several UE? %d\n", fMakeSeveralUE) ; | |
1c5acb87 | 517 | } |
518 | ||
519 | //____________________________________________________________________________ | |
520 | void AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() | |
521 | { | |
c8fe2783 | 522 | //Particle-Hadron Correlation Analysis, fill AODs |
477d6cee | 523 | |
524 | if(!GetInputAODBranch()){ | |
591cc579 | 525 | printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data()); |
477d6cee | 526 | abort(); |
527 | } | |
9415d854 | 528 | |
529 | if(strcmp(GetInputAODBranch()->GetClass()->GetName(), "AliAODPWG4ParticleCorrelation")){ | |
c8fe2783 | 530 | 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()); |
531 | abort(); | |
9415d854 | 532 | } |
533 | ||
477d6cee | 534 | if(GetDebug() > 1){ |
a3aebfff | 535 | printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - Begin hadron correlation analysis, fill AODs \n"); |
536 | printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In particle branch aod entries %d\n", GetInputAODBranch()->GetEntriesFast()); | |
537 | printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In CTS aod entries %d\n", GetAODCTS()->GetEntriesFast()); | |
538 | printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In EMCAL aod entries %d\n", GetAODEMCAL()->GetEntriesFast()); | |
539 | printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - In PHOS aod entries %d\n", GetAODPHOS()->GetEntriesFast()); | |
477d6cee | 540 | } |
541 | ||
c8fe2783 | 542 | //Loop on stored AOD particles, trigger |
b6991fc4 | 543 | Double_t ptTrig = 0.; |
544 | Int_t trigIndex = -1; | |
477d6cee | 545 | Int_t naod = GetInputAODBranch()->GetEntriesFast(); |
546 | for(Int_t iaod = 0; iaod < naod ; iaod++){ | |
547 | AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod)); | |
c8fe2783 | 548 | //find the leading particles with highest momentum |
549 | if (particle->Pt()>ptTrig) { | |
550 | ptTrig = particle->Pt() ; | |
551 | trigIndex = iaod ; | |
552 | } | |
b6991fc4 | 553 | }//Aod branch loop |
554 | ||
c8fe2783 | 555 | //Do correlation with leading particle |
b6991fc4 | 556 | if(trigIndex!=-1){ |
557 | ||
c8fe2783 | 558 | AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(trigIndex)); |
559 | //Make correlation with charged hadrons | |
560 | if(GetReader()->IsCTSSwitchedOn() ) | |
561 | MakeChargedCorrelation(particle, GetAODCTS(),kFALSE); | |
477d6cee | 562 | |
c8fe2783 | 563 | //Make correlation with neutral pions |
564 | //Trigger particle in PHOS, correlation with EMCAL | |
477d6cee | 565 | if(particle->GetDetector()=="PHOS" && GetReader()->IsEMCALSwitchedOn() && GetAODEMCAL()->GetEntriesFast() > 0) |
9415d854 | 566 | MakeNeutralCorrelationFillAOD(particle, GetAODEMCAL(),"EMCAL"); |
c8fe2783 | 567 | //Trigger particle in EMCAL, correlation with PHOS |
477d6cee | 568 | else if(particle->GetDetector()=="EMCAL" && GetReader()->IsPHOSSwitchedOn() && GetAODPHOS()->GetEntriesFast() > 0) |
9415d854 | 569 | MakeNeutralCorrelationFillAOD(particle, GetAODPHOS(),"PHOS"); |
c8fe2783 | 570 | //Trigger particle in CTS, correlation with PHOS, EMCAL and CTS |
477d6cee | 571 | else if(particle->GetDetector()=="CTS" ){ |
572 | if(GetReader()->IsPHOSSwitchedOn() && GetAODPHOS()->GetEntriesFast() > 0) | |
c8fe2783 | 573 | MakeNeutralCorrelationFillAOD(particle, GetAODPHOS(),"PHOS"); |
477d6cee | 574 | if(GetReader()->IsEMCALSwitchedOn() && GetAODEMCAL()->GetEntriesFast() > 0) |
c8fe2783 | 575 | MakeNeutralCorrelationFillAOD(particle, GetAODEMCAL(),"EMCAL"); |
477d6cee | 576 | } |
c8fe2783 | 577 | |
578 | ||
b6991fc4 | 579 | }//Correlate leading |
c8fe2783 | 580 | |
a3aebfff | 581 | if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - End fill AODs \n"); |
477d6cee | 582 | |
1c5acb87 | 583 | } |
584 | ||
585 | //____________________________________________________________________________ | |
586 | void AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() | |
587 | { | |
477d6cee | 588 | //Particle-Hadron Correlation Analysis, fill histograms |
589 | ||
590 | if(!GetInputAODBranch()){ | |
591cc579 | 591 | printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data()); |
477d6cee | 592 | abort(); |
593 | } | |
9415d854 | 594 | |
477d6cee | 595 | if(GetDebug() > 1){ |
a3aebfff | 596 | printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Begin hadron correlation analysis, fill histograms \n"); |
597 | printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In particle branch aod entries %d\n", GetInputAODBranch()->GetEntriesFast()); | |
477d6cee | 598 | } |
9415d854 | 599 | |
b6991fc4 | 600 | //Loop on stored AOD particles, find leading |
477d6cee | 601 | Int_t naod = GetInputAODBranch()->GetEntriesFast(); |
b6991fc4 | 602 | Double_t ptTrig = 0.; |
603 | Int_t trigIndex = -1 ; | |
e6b5d324 | 604 | for(Int_t iaod = 0; iaod < naod ; iaod++){ //loop on input trigger AOD file |
9415d854 | 605 | AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod)); |
606 | ||
607 | //check if the particle is isolated or if we want to take the isolation into account | |
608 | if(OnlyIsolated() && !particle->IsIsolated()) continue; | |
e6b5d324 | 609 | //find the leading particles with highest momentum |
610 | if (particle->Pt()>ptTrig) { | |
611 | ptTrig = particle->Pt() ; | |
612 | trigIndex = iaod ; | |
613 | } | |
614 | }//finish searching for leading trigger particle | |
b6991fc4 | 615 | |
616 | if(trigIndex!=-1){ //using trigger partilce to do correlations | |
e6b5d324 | 617 | AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(trigIndex)); |
b6991fc4 | 618 | |
c8fe2783 | 619 | //Fill leading particle histogram |
620 | fhPtLeading->Fill(particle->Pt()); | |
621 | Float_t phi = particle->Phi(); | |
622 | if(phi<0)phi+=TMath::TwoPi(); | |
623 | fhPhiLeading->Fill(particle->Pt(), phi); | |
624 | fhEtaLeading->Fill(particle->Pt(), particle->Eta()); | |
625 | ||
9415d854 | 626 | //Make correlation with charged hadrons |
591cc579 | 627 | TObjArray * reftracks = particle->GetObjArray(GetAODObjArrayName()+"Tracks"); |
9415d854 | 628 | if(reftracks){ |
e6b5d324 | 629 | if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Leading %d, In Track Refs entries %d\n", trigIndex, reftracks->GetEntriesFast()); |
9415d854 | 630 | if(reftracks->GetEntriesFast() > 0) MakeChargedCorrelation(particle, reftracks,kTRUE); |
631 | } | |
a70a8477 | 632 | |
9415d854 | 633 | //Make correlation with neutral pions |
634 | if(GetOutputAODBranch() && GetOutputAODBranch()->GetEntriesFast() > 0){ | |
e6b5d324 | 635 | if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Leading %d, In Cluster Refs entries %d\n",trigIndex, GetOutputAODBranch()->GetEntriesFast()); |
9415d854 | 636 | MakeNeutralCorrelationFillHistograms(particle); |
637 | } | |
638 | ||
477d6cee | 639 | }//Aod branch loop |
640 | ||
a3aebfff | 641 | if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - End fill histograms \n"); |
477d6cee | 642 | |
1c5acb87 | 643 | } |
644 | ||
645 | //____________________________________________________________________________ | |
233e0df8 | 646 | void AliAnaParticleHadronCorrelation::MakeChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle, TObjArray* const pl, const Bool_t bFillHisto) |
1c5acb87 | 647 | { |
c8fe2783 | 648 | // Charged Hadron Correlation Analysis |
649 | if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Make trigger particle - charged hadron correlation \n"); | |
dde5a268 | 650 | |
c8fe2783 | 651 | Int_t evtIndex11 = 0 ; |
652 | Int_t evtIndex12 = 0 ; | |
653 | if (GetMixedEvent()) { | |
654 | evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ; | |
655 | evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ; | |
656 | } | |
657 | ||
658 | Double_t ptTrig = aodParticle->Pt(); | |
659 | Double_t pxTrig = aodParticle->Px(); | |
660 | Double_t pyTrig = aodParticle->Py(); | |
661 | ||
662 | Double_t phiTrig = aodParticle->Phi(); | |
663 | ||
664 | Double_t pt = -100.; | |
665 | Double_t px = -100.; | |
666 | Double_t py = -100.; | |
667 | Double_t rat = -100.; | |
668 | Double_t xE = -100.; | |
669 | Double_t cosi = -100.; | |
670 | Double_t phi = -100. ; | |
671 | Double_t eta = -100. ; | |
672 | TVector3 p3; | |
b6991fc4 | 673 | |
c8fe2783 | 674 | TObjArray * reftracks =0x0; |
675 | Int_t nrefs = 0; | |
a33b76ed | 676 | |
c8fe2783 | 677 | //Track loop, select tracks with good pt, phi and fill AODs or histograms |
678 | //Int_t currentIndex = -1 ; | |
679 | for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ ){ | |
680 | AliAODTrack * track = (AliAODTrack *) (pl->At(ipr)) ; | |
681 | Int_t evtIndex2 = 0 ; | |
682 | if (GetMixedEvent()) { | |
683 | evtIndex2 = GetMixedEvent()->EventIndex(track->GetID()) ; | |
684 | if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2) // photon and track from different events | |
685 | continue ; | |
686 | // if(currentIndex == evtIndex2) // tracks from different event | |
687 | // continue ; | |
688 | // currentIndex = evtIndex2 ; | |
689 | } | |
690 | if(track->GetID()==aodParticle->GetTrackLabel(0)) | |
691 | continue ; | |
692 | if(track->Pt()>ptTrig) | |
693 | continue ; | |
694 | Double_t mom[3] = {track->Px(),track->Py(),track->Pz()}; | |
695 | p3.SetXYZ(mom[0],mom[1],mom[2]); | |
696 | pt = p3.Pt(); | |
697 | px = p3.Px(); | |
698 | py = p3.Py(); | |
699 | eta = p3.Eta(); | |
700 | phi = p3.Phi() ; | |
701 | if(phi < 0) phi+=TMath::TwoPi(); | |
702 | rat = pt/ptTrig ; | |
703 | xE = -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig); | |
704 | if(xE <0.)xE =-xE; | |
705 | cosi = TMath::Log(1/xE); | |
706 | // printf("rat = %f, xE = %f, cosi =%f \n", rat, xE, cosi); | |
707 | // printf("phi = %f \n", phi); | |
dde5a268 | 708 | |
c8fe2783 | 709 | if(IsFiducialCutOn()){ |
710 | Bool_t in = GetFiducialCut()->IsInFiducialCut(mom,"CTS") ; | |
711 | if(! in ) continue ; | |
712 | } | |
713 | ||
714 | //Select only hadrons in pt range | |
715 | if(pt < GetMinPt() || pt > GetMaxPt()) continue ; | |
dde5a268 | 716 | |
c8fe2783 | 717 | //Selection within angular range |
718 | Float_t deltaphi = phiTrig-phi; | |
719 | if(deltaphi< -TMath::PiOver2()) deltaphi+=TMath::TwoPi(); | |
720 | if(deltaphi>3*TMath::PiOver2()) deltaphi-=TMath::TwoPi(); | |
dde5a268 | 721 | |
c8fe2783 | 722 | if(GetDebug() > 2) |
723 | 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", | |
724 | pt,phi, phiTrig,fDeltaPhiMinCut, deltaphi, fDeltaPhiMaxCut, GetMinPt()); | |
dde5a268 | 725 | |
c8fe2783 | 726 | if(bFillHisto){ |
727 | // Fill Histograms | |
728 | fhEtaCharged->Fill(pt,eta); | |
729 | fhPhiCharged->Fill(pt,phi); | |
730 | fhDeltaEtaCharged->Fill(ptTrig,aodParticle->Eta()-eta); | |
731 | fhDeltaPhiCharged->Fill(ptTrig, deltaphi); | |
732 | fhDeltaPhiDeltaEtaCharged->Fill(deltaphi,aodParticle->Eta()-eta); | |
733 | ||
734 | if(GetDebug() > 2 ) printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta); | |
735 | ||
736 | //delta phi cut for correlation | |
737 | if( (deltaphi > fDeltaPhiMinCut) && ( deltaphi < fDeltaPhiMaxCut) ) { | |
738 | fhDeltaPhiChargedPt->Fill(pt,deltaphi); | |
739 | fhPtImbalanceCharged->Fill(ptTrig,rat); | |
740 | fhPtHbpCharged->Fill(ptTrig,cosi); | |
741 | } | |
123fc3bd | 742 | else { |
c8fe2783 | 743 | fhDeltaPhiUeChargedPt->Fill(pt,deltaphi); |
744 | fhPtImbalanceUeCharged->Fill(ptTrig,rat); | |
745 | fhPtHbpUeCharged->Fill(ptTrig,cosi); | |
123fc3bd | 746 | } |
c8fe2783 | 747 | //several UE calculation |
dde5a268 | 748 | if(fMakeSeveralUE){ |
c8fe2783 | 749 | if((deltaphi<-fUeDeltaPhiMinCut) && (deltaphi >-fUeDeltaPhiMaxCut)){ |
750 | fhDeltaPhiUeLeftCharged->Fill(pt,deltaphi); | |
751 | fhPtImbalanceUeLeftCharged->Fill(ptTrig,rat); | |
752 | fhPtHbpUeLeftCharged->Fill(ptTrig,cosi); | |
753 | } | |
754 | if((deltaphi>fUeDeltaPhiMinCut) && (deltaphi <fUeDeltaPhiMaxCut)){ | |
755 | fhDeltaPhiUeRightCharged->Fill(pt,deltaphi); | |
756 | fhPtImbalanceUeRightCharged->Fill(ptTrig,rat); | |
757 | fhPtHbpUeRightCharged->Fill(ptTrig,cosi); | |
758 | ||
759 | } | |
dde5a268 | 760 | } //several UE calculation |
c8fe2783 | 761 | |
762 | } | |
763 | else{ | |
764 | nrefs++; | |
765 | if(nrefs==1){ | |
766 | reftracks = new TObjArray(0); | |
767 | reftracks->SetName(GetAODObjArrayName()+"Tracks"); | |
768 | reftracks->SetOwner(kFALSE); | |
769 | } | |
770 | reftracks->Add(track); | |
771 | }//aod particle loop | |
772 | }// track loop | |
9415d854 | 773 | |
c8fe2783 | 774 | //Fill AOD with reference tracks, if not filling histograms |
775 | if(!bFillHisto && reftracks) { | |
776 | aodParticle->AddObjArray(reftracks); | |
777 | } | |
778 | ||
779 | //delete reftracks; | |
9415d854 | 780 | |
1c5acb87 | 781 | } |
9415d854 | 782 | |
c8fe2783 | 783 | //____________________________________________________________________________ |
233e0df8 | 784 | void AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillAOD(AliAODPWG4ParticleCorrelation* const aodParticle,TObjArray* const pl, TString detector) |
1c5acb87 | 785 | { |
c8fe2783 | 786 | // Neutral Pion Correlation Analysis, find pi0, put them in new output aod, if correlation cuts passed |
9415d854 | 787 | if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillAOD() - Make trigger particle - neutral hadron correlation \n"); |
788 | ||
789 | if(!NewOutputAOD()){ | |
591cc579 | 790 | printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillAOD() - Output aod not created, set AOD class name and branch name in the configuration file, STOP! \n"); |
9415d854 | 791 | abort(); |
792 | } | |
1c5acb87 | 793 | |
1c5acb87 | 794 | Double_t phiTrig = aodParticle->Phi(); |
591cc579 | 795 | Int_t tag = 0; |
1c5acb87 | 796 | TLorentzVector gammai; |
797 | TLorentzVector gammaj; | |
798 | ||
c8fe2783 | 799 | //Get vertex for photon momentum calculation |
800 | ||
801 | if(GetReader()->GetDataType()!= AliCaloTrackReader::kMC) | |
802 | { | |
803 | for (Int_t iev = 0; iev < GetNMixedEvent(); iev++) { | |
804 | if (!GetMixedEvent()) | |
805 | GetReader()->GetVertex(GetVertex(iev)); | |
806 | else | |
807 | GetMixedEvent()->GetVertexOfEvent(iev)->GetXYZ(GetVertex(iev)); | |
808 | } | |
809 | } | |
1e68a3f4 | 810 | // Double_t vertex2[] = {0.0,0.0,0.0} ; //vertex of second input aod |
811 | // if(GetReader()->GetDataType()!= AliCaloTrackReader::kMC) | |
812 | // { | |
813 | // if(GetReader()->GetSecondInputAODTree()) GetReader()->GetSecondInputAODVertex(vertex2); | |
814 | // } | |
233e0df8 | 815 | |
c8fe2783 | 816 | //Cluster loop, select pairs with good pt, phi and fill AODs or histograms |
817 | //Int_t iEvent= GetReader()->GetEventNumber() ; | |
9415d854 | 818 | Int_t nclus = pl->GetEntriesFast(); |
819 | for(Int_t iclus = 0;iclus < nclus ; iclus ++ ){ | |
0ae57829 | 820 | AliVCluster * calo = (AliVCluster *) (pl->At(iclus)) ; |
9415d854 | 821 | |
c8fe2783 | 822 | Int_t evtIndex1 = 0 ; |
823 | if (GetMixedEvent()) { | |
824 | evtIndex1=GetMixedEvent()->EventIndexForCaloCluster(calo->GetID()) ; | |
825 | } | |
826 | ||
12524a23 | 827 | |
c8fe2783 | 828 | //Input from second AOD? |
829 | Int_t inputi = 0; | |
1e68a3f4 | 830 | // if (aodParticle->GetDetector() == "EMCAL" && GetReader()->GetAODEMCALNormalInputEntries() <= iclus) |
831 | // inputi = 1 ; | |
832 | // else if(aodParticle->GetDetector() == "PHOS" && GetReader()->GetAODPHOSNormalInputEntries() <= iclus) | |
833 | // inputi = 1; | |
c8fe2783 | 834 | |
835 | //Cluster selection, not charged, with photon or pi0 id and in fiducial cut | |
836 | Int_t pdg=0; | |
837 | if (inputi == 0 && !SelectCluster(calo, GetVertex(evtIndex1), gammai, pdg)) | |
838 | continue ; | |
1e68a3f4 | 839 | // else if(inputi == 1 && !SelectCluster(calo, vertex2, gammai, pdg)) |
840 | // continue ; | |
c8fe2783 | 841 | |
842 | if(GetDebug() > 2) | |
9415d854 | 843 | 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", |
c8fe2783 | 844 | detector.Data(), gammai.Pt(),gammai.Phi(),phiTrig,fDeltaPhiMinCut, fDeltaPhiMaxCut, GetMinPt()); |
9415d854 | 845 | |
c8fe2783 | 846 | //2 gamma overlapped, found with PID |
9415d854 | 847 | if(pdg == AliCaloPID::kPi0){ |
477d6cee | 848 | |
c8fe2783 | 849 | //Select only hadrons in pt range |
850 | if(gammai.Pt() < GetMinPt() || gammai.Pt() > GetMaxPt()) | |
851 | continue ; | |
1c5acb87 | 852 | |
c8fe2783 | 853 | //Selection within angular range |
9415d854 | 854 | Float_t phi = gammai.Phi(); |
855 | if(phi < 0) phi+=TMath::TwoPi(); | |
c8fe2783 | 856 | //Float_t deltaphi = TMath::Abs(phiTrig-phi); |
857 | //if( (deltaphi < fDeltaPhiMinCut) || ( deltaphi > fDeltaPhiMaxCut) ) continue ; | |
477d6cee | 858 | |
9415d854 | 859 | AliAODPWG4Particle pi0 = AliAODPWG4Particle(gammai); |
c8fe2783 | 860 | //pi0.SetLabel(calo->GetLabel()); |
9415d854 | 861 | pi0.SetPdg(AliCaloPID::kPi0); |
862 | pi0.SetDetector(detector); | |
863 | ||
864 | if(IsDataMC()){ | |
c8fe2783 | 865 | pi0.SetTag(GetMCAnalysisUtils()->CheckOrigin(calo->GetLabel(),GetReader(),inputi)); |
866 | if(GetDebug() > 0) printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillAOD() - Origin of candidate %d\n",pi0.GetTag()); | |
867 | }//Work with stack also | |
868 | //Set the indeces of the original caloclusters | |
9415d854 | 869 | pi0.SetCaloLabel(calo->GetID(),-1); |
870 | AddAODParticle(pi0); | |
871 | ||
872 | if(GetDebug() > 2) | |
c8fe2783 | 873 | printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillAOD() - Correlated with selected pi0 (pid): pt %f, phi %f\n",pi0.Pt(),pi0.Phi()); |
9415d854 | 874 | |
875 | }// pdg = 111 | |
876 | ||
c8fe2783 | 877 | //Make invariant mass analysis |
9415d854 | 878 | else if(pdg == AliCaloPID::kPhoton){ |
c8fe2783 | 879 | //Search the photon companion in case it comes from a Pi0 decay |
880 | //Apply several cuts to select the good pair; | |
9415d854 | 881 | for(Int_t jclus = iclus+1; jclus < pl->GetEntries() ; jclus ++ ){ |
0ae57829 | 882 | AliVCluster * calo2 = (AliVCluster *) (pl->At(jclus)) ; |
c8fe2783 | 883 | Int_t evtIndex2 = 0 ; |
884 | if (GetMixedEvent()) { | |
885 | evtIndex2=GetMixedEvent()->EventIndexForCaloCluster(calo->GetID()) ; | |
886 | } | |
887 | if (GetMixedEvent() && (evtIndex1 == evtIndex2)) | |
888 | continue ; | |
889 | ||
890 | //Input from second AOD? | |
891 | Int_t inputj = 0; | |
1e68a3f4 | 892 | // if (aodParticle->GetDetector() == "EMCAL" && GetReader()->GetAODEMCALNormalInputEntries() <= jclus) |
893 | // inputj = 1; | |
894 | // else if(aodParticle->GetDetector() == "PHOS" && GetReader()->GetAODPHOSNormalInputEntries() <= jclus) | |
895 | // inputj = 1; | |
c8fe2783 | 896 | |
897 | //Cluster selection, not charged with photon or pi0 id and in fiducial cut | |
898 | Int_t pdgj=0; | |
899 | if (inputj == 0 && !SelectCluster(calo2, GetVertex(evtIndex2), gammaj, pdgj)) | |
900 | continue ; | |
1e68a3f4 | 901 | // else if(inputj == 1 && !SelectCluster(calo2, vertex2, gammaj, pdgj)) |
902 | // continue ; | |
c8fe2783 | 903 | |
904 | if(!SelectCluster(calo2,GetVertex(evtIndex2), gammaj, pdgj)) | |
905 | continue ; | |
906 | ||
907 | if(pdgj == AliCaloPID::kPhoton ){ | |
908 | ||
909 | if((gammai+gammaj).Pt() < GetMinPt() || (gammai+gammaj).Pt() > GetMaxPt()) | |
910 | continue ; | |
911 | ||
912 | //Selection within angular range | |
913 | Float_t phi = (gammai+gammaj).Phi(); | |
914 | if(phi < 0) phi+=TMath::TwoPi(); | |
915 | //Float_t deltaphi = TMath::Abs(phiTrig-phi); | |
916 | //if( (deltaphi < fDeltaPhiMinCut) || ( deltaphi > fDeltaPhiMaxCut) ) continue ; | |
917 | ||
918 | //Select good pair (aperture and invariant mass) | |
919 | if(GetNeutralMesonSelection()->SelectPair(gammai, gammaj)){ | |
920 | ||
921 | 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", | |
922 | (gammai+gammaj).Pt(),(gammai+gammaj).Phi(),(gammai+gammaj).Eta(), (gammai+gammaj).M()); | |
923 | ||
924 | TLorentzVector pi0mom = gammai+gammaj; | |
925 | AliAODPWG4Particle pi0 = AliAODPWG4Particle(pi0mom); | |
926 | //pi0.SetLabel(calo->GetLabel()); | |
927 | pi0.SetPdg(AliCaloPID::kPi0); | |
928 | pi0.SetDetector(detector); | |
929 | if(IsDataMC()){ | |
930 | //Check origin of the candidates | |
931 | ||
932 | Int_t label1 = calo->GetLabel(); | |
933 | Int_t label2 = calo2->GetLabel(); | |
934 | Int_t tag1 = GetMCAnalysisUtils()->CheckOrigin(label1, GetReader(), inputi); | |
935 | Int_t tag2 = GetMCAnalysisUtils()->CheckOrigin(label2, GetReader(), inputj); | |
936 | ||
937 | if(GetDebug() > 0) | |
938 | printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillAOD() - Origin of: photon1 %d; photon2 %d \n",tag1, tag2); | |
939 | if(GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCPi0Decay) && GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCPi0Decay)){ | |
940 | ||
941 | //Check if pi0 mother is the same | |
942 | if(GetReader()->ReadStack()){ | |
943 | TParticle * mother1 = GetMCStack()->Particle(label1);//photon in kine tree | |
944 | label1 = mother1->GetFirstMother(); | |
945 | //mother1 = GetMCStack()->Particle(label1);//pi0 | |
946 | ||
947 | TParticle * mother2 = GetMCStack()->Particle(label2);//photon in kine tree | |
948 | label2 = mother2->GetFirstMother(); | |
949 | //mother2 = GetMCStack()->Particle(label2);//pi0 | |
950 | } | |
951 | else if(GetReader()->ReadAODMCParticles()){ | |
952 | AliAODMCParticle * mother1 = (AliAODMCParticle *) (GetReader()->GetAODMCParticles(inputi))->At(label1);//photon in kine tree | |
953 | label1 = mother1->GetMother(); | |
954 | //mother1 = GetMCStack()->Particle(label1);//pi0 | |
955 | AliAODMCParticle * mother2 = (AliAODMCParticle *) (GetReader()->GetAODMCParticles(inputj))->At(label2);//photon in kine tree | |
956 | label2 = mother2->GetMother(); | |
957 | //mother2 = GetMCStack()->Particle(label2);//pi0 | |
958 | } | |
959 | ||
960 | //printf("mother1 %d, mother2 %d\n",label1,label2); | |
961 | if(label1 == label2) | |
962 | GetMCAnalysisUtils()->SetTagBit(tag,AliMCAnalysisUtils::kMCPi0); | |
963 | } | |
964 | }//Work with mc information also | |
965 | pi0.SetTag(tag); | |
966 | //Set the indeces of the original caloclusters | |
967 | pi0.SetCaloLabel(calo->GetID(), calo2->GetID()); | |
968 | AddAODParticle(pi0); | |
969 | ||
970 | ||
971 | }//Pair selected | |
972 | }//if pair of gammas | |
9415d854 | 973 | }//2nd loop |
974 | }// if pdg = 22 | |
1c5acb87 | 975 | }//1st loop |
976 | ||
9415d854 | 977 | if(GetDebug() > 1) |
978 | printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillAOD() - End, %d pi0's found \n",GetOutputAODBranch()->GetEntriesFast()); | |
979 | } | |
980 | ||
981 | //____________________________________________________________________________ | |
233e0df8 | 982 | void AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillHistograms(AliAODPWG4ParticleCorrelation * const aodParticle) |
9415d854 | 983 | { |
984 | // Neutral Pion Correlation Analysis | |
985 | if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillHistogramS() - Make trigger particle - pi0 correlation, %d pi0's \n",GetOutputAODBranch()->GetEntriesFast()); | |
986 | ||
987 | Double_t pt = -100.; | |
dd4871cd | 988 | Double_t px = -100.; |
989 | Double_t py = -100.; | |
9415d854 | 990 | Double_t rat = -100.; |
991 | Double_t phi = -100.; | |
992 | Double_t eta = -100.; | |
dd4871cd | 993 | Double_t xE = -100.; |
994 | Double_t cosi = -100.; | |
995 | ||
9415d854 | 996 | Double_t ptTrig = aodParticle->Pt(); |
997 | Double_t phiTrig = aodParticle->Phi(); | |
998 | Double_t etaTrig = aodParticle->Eta(); | |
dd4871cd | 999 | Double_t pxTrig = aodParticle->Px(); |
1000 | Double_t pyTrig = aodParticle->Py(); | |
1001 | ||
9415d854 | 1002 | |
1003 | if(!GetOutputAODBranch()){ | |
1004 | printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillHistograms() - No output pi0 in AOD branch with name < %s >,STOP \n",GetOutputAODName().Data()); | |
1005 | abort(); | |
a3aebfff | 1006 | } |
9415d854 | 1007 | |
1008 | //Loop on stored AOD pi0 | |
1009 | Int_t naod = GetOutputAODBranch()->GetEntriesFast(); | |
1010 | if(GetDebug() > 0) printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelationFillHistograms() - aod branch entries %d\n", naod); | |
1011 | for(Int_t iaod = 0; iaod < naod ; iaod++){ | |
1012 | AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (GetOutputAODBranch()->At(iaod)); | |
1013 | Int_t pdg = pi0->GetPdg(); | |
1014 | ||
1015 | if(pdg != AliCaloPID::kPi0) continue; | |
1016 | pt = pi0->Pt(); | |
dd4871cd | 1017 | px = pi0->Px(); |
1018 | py = pi0->Py(); | |
9415d854 | 1019 | if(pt < GetMinPt() || pt > GetMaxPt()) continue ; |
1020 | ||
1021 | //Selection within angular range | |
1022 | phi = pi0->Phi(); | |
dde5a268 | 1023 | //Float_t deltaphi = TMath::Abs(phiTrig-phi); |
1024 | //if( (deltaphi < fDeltaPhiMinCut) || ( deltaphi > fDeltaPhiMaxCut) ) continue ; | |
1025 | Float_t deltaphi = phiTrig-phi; | |
1026 | if(deltaphi<-TMath::PiOver2()) deltaphi+=TMath::TwoPi(); | |
1027 | if(deltaphi>3*TMath::PiOver2()) deltaphi-=TMath::TwoPi(); | |
1028 | ||
9415d854 | 1029 | rat = pt/ptTrig ; |
1030 | phi = pi0->Phi() ; | |
1031 | eta = pi0->Eta() ; | |
dd4871cd | 1032 | xE = -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig); |
1033 | if(xE <0.)xE =-xE; | |
1034 | cosi = TMath::Log(1/xE); | |
9415d854 | 1035 | |
dd4871cd | 1036 | fhEtaNeutral->Fill(pt,eta); |
1037 | fhPhiNeutral->Fill(pt,phi); | |
9415d854 | 1038 | fhDeltaEtaNeutral->Fill(ptTrig,etaTrig-eta); |
1039 | fhDeltaPhiNeutral->Fill(ptTrig,deltaphi); | |
b6991fc4 | 1040 | fhDeltaPhiDeltaEtaNeutral->Fill(deltaphi,etaTrig-eta); |
1041 | ||
123fc3bd | 1042 | //delta phi cut for correlation |
1043 | if( (deltaphi > fDeltaPhiMinCut) && ( deltaphi < fDeltaPhiMaxCut) ) { | |
1044 | fhDeltaPhiNeutralPt->Fill(pt,deltaphi); | |
1045 | fhPtImbalanceNeutral->Fill(ptTrig,rat); | |
dd4871cd | 1046 | fhPtHbpNeutral->Fill(ptTrig,cosi); |
123fc3bd | 1047 | } |
1048 | else { | |
1049 | fhDeltaPhiUeNeutralPt->Fill(pt,deltaphi); | |
1050 | fhPtImbalanceUeNeutral->Fill(ptTrig,rat); | |
dd4871cd | 1051 | fhPtHbpUeNeutral->Fill(ptTrig,cosi); |
123fc3bd | 1052 | } |
1053 | //several UE calculation | |
1054 | if(fMakeSeveralUE){ | |
1055 | if((deltaphi<-fUeDeltaPhiMinCut) && (deltaphi >-fUeDeltaPhiMaxCut)){ | |
1056 | fhDeltaPhiUeLeftNeutral->Fill(pt,deltaphi); | |
1057 | fhPtImbalanceUeLeftNeutral->Fill(ptTrig,rat); | |
dd4871cd | 1058 | fhPtHbpUeLeftNeutral->Fill(ptTrig,cosi); |
dde5a268 | 1059 | } |
123fc3bd | 1060 | if((deltaphi>fUeDeltaPhiMinCut) && (deltaphi <fUeDeltaPhiMaxCut)){ |
1061 | fhDeltaPhiUeRightNeutral->Fill(pt,deltaphi); | |
1062 | fhPtImbalanceUeRightNeutral->Fill(ptTrig,rat); | |
dd4871cd | 1063 | fhPtHbpUeRightNeutral->Fill(ptTrig,cosi); |
123fc3bd | 1064 | } |
1065 | } //several UE calculation | |
1066 | ||
dde5a268 | 1067 | |
9415d854 | 1068 | if(GetDebug() > 2 ) printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Selected neutral for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta); |
1069 | ||
1070 | }//loop | |
1c5acb87 | 1071 | } |
1072 | ||
9415d854 | 1073 | |
1c5acb87 | 1074 | //____________________________________________________________________________ |
0ae57829 | 1075 | Bool_t AliAnaParticleHadronCorrelation::SelectCluster(AliVCluster * calo, Double_t *vertex, TLorentzVector & mom, Int_t & pdg) { |
9415d854 | 1076 | //Select cluster depending on its pid and acceptance selections |
1077 | ||
1078 | //Skip matched clusters with tracks | |
f37fa8d2 | 1079 | if(IsTrackMatched(calo)) return kFALSE; |
9415d854 | 1080 | |
12524a23 | 1081 | TString detector = ""; |
c8fe2783 | 1082 | if (calo->IsPHOS()) detector= "PHOS"; |
1083 | else if(calo->IsEMCAL()) detector= "EMCAL"; | |
12524a23 | 1084 | |
9415d854 | 1085 | //Check PID |
1086 | calo->GetMomentum(mom,vertex);//Assume that come from vertex in straight line | |
1087 | pdg = AliCaloPID::kPhoton; | |
1088 | if(IsCaloPIDOn()){ | |
1089 | //Get most probable PID, 2 options check PID weights (in MC this option is mandatory) | |
1090 | //or redo PID, recommended option for EMCal. | |
9415d854 | 1091 | |
1092 | if(!IsCaloPIDRecalculationOn() || GetReader()->GetDataType() == AliCaloTrackReader::kMC ) | |
c8fe2783 | 1093 | pdg = GetCaloPID()->GetPdg(detector,calo->GetPID(),mom.E());//PID with weights |
9415d854 | 1094 | else |
1095 | pdg = GetCaloPID()->GetPdg(detector,mom,calo);//PID recalculated | |
1096 | ||
1097 | if(GetDebug() > 5) printf("AliAnaParticleHadronCorrelation::SelectCluster() - PDG of identified particle %d\n",pdg); | |
1098 | ||
1099 | //If it does not pass pid, skip | |
12524a23 | 1100 | if(pdg != AliCaloPID::kPhoton && pdg != AliCaloPID::kPi0) { |
9415d854 | 1101 | return kFALSE ; |
1102 | } | |
12524a23 | 1103 | }//PID on |
9415d854 | 1104 | |
1105 | //Check acceptance selection | |
ff45398a | 1106 | if(IsFiducialCutOn()){ |
1107 | Bool_t in = GetFiducialCut()->IsInFiducialCut(mom,detector) ; | |
12524a23 | 1108 | if(! in ) return kFALSE ; |
9415d854 | 1109 | } |
1110 | ||
1111 | if(GetDebug() > 5) printf("AliAnaParticleHadronCorrelation::SelectCluster() - Correlation photon selection cuts passed: pT %3.2f, pdg %d\n",mom.Pt(), pdg); | |
1112 | ||
1113 | return kTRUE; | |
1114 | ||
1115 | } |