]>
Commit | Line | Data |
---|---|---|
1a31a9ab | 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 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 | **************************************************************************/ | |
1a31a9ab | 15 | |
16 | //_________________________________________________________________________ | |
17 | // Class for analysis of particle isolation | |
18 | // Input is selected particles put in AOD branch (AliAODPWG4ParticleCorrelation) | |
19 | // | |
20 | // Class created from old AliPHOSGammaJet | |
21 | // (see AliRoot versions previous Release 4-09) | |
22 | // | |
23 | // -- Author: Gustavo Conesa (LNF-INFN) | |
24 | ||
25 | //-Yaxian Mao (add the possibility for different IC method with different pt range, 01/10/2010) | |
26 | ////////////////////////////////////////////////////////////////////////////// | |
27 | ||
28 | ||
29 | // --- ROOT system --- | |
30 | #include <TClonesArray.h> | |
31 | #include <TList.h> | |
32 | #include <TObjString.h> | |
33 | #include <TH2F.h> | |
1a31a9ab | 34 | #include <TClass.h> |
35 | ||
36 | // --- Analysis system --- | |
37 | #include "AliAnaParticleIsolation.h" | |
38 | #include "AliCaloTrackReader.h" | |
39 | #include "AliIsolationCut.h" | |
40 | #include "AliNeutralMesonSelection.h" | |
41 | #include "AliAODPWG4ParticleCorrelation.h" | |
42 | #include "AliMCAnalysisUtils.h" | |
43 | #include "AliVTrack.h" | |
44 | #include "AliVCluster.h" | |
45 | ||
46 | ClassImp(AliAnaParticleIsolation) | |
47 | ||
803d06a8 | 48 | //______________________________________________________________________________ |
1a31a9ab | 49 | AliAnaParticleIsolation::AliAnaParticleIsolation() : |
09273901 | 50 | AliAnaCaloTrackCorrBaseClass(), fCalorimeter(""), |
51 | fReMakeIC(0), fMakeSeveralIC(0), | |
52 | fFillTMHisto(0), fFillSSHisto(0), | |
803d06a8 | 53 | // Several IC |
54 | fNCones(0), fNPtThresFrac(0), | |
55 | fConeSizes(), fPtThresholds(), fPtFractions(), | |
56 | // Histograms | |
0fb69ade | 57 | fhEIso(0), fhPtIso(0), |
58 | fhPhiIso(0), fhEtaIso(0), fhEtaPhiIso(0), | |
803d06a8 | 59 | fhPtNoIso(0), fhPtDecayIso(0), fhPtDecayNoIso(0), |
60 | fhConeSumPt(0), fhPtInCone(0), | |
61 | fhFRConeSumPt(0), fhPtInFRCone(0), | |
62 | // MC histograms | |
63 | fhPtIsoPrompt(0), fhPhiIsoPrompt(0), fhEtaIsoPrompt(0), | |
64 | fhPtThresIsolatedPrompt(), fhPtFracIsolatedPrompt(), fhPtSumIsolatedPrompt(), | |
65 | fhPtIsoFragmentation(0), fhPhiIsoFragmentation(0), fhEtaIsoFragmentation(0), | |
66 | fhPtThresIsolatedFragmentation(), fhPtFracIsolatedFragmentation(), fhPtSumIsolatedFragmentation(), | |
67 | fhPtIsoPi0Decay(0), fhPhiIsoPi0Decay(0), fhEtaIsoPi0Decay(0), | |
68 | fhPtThresIsolatedPi0Decay(), fhPtFracIsolatedPi0Decay(), fhPtSumIsolatedPi0Decay(), | |
69 | fhPtIsoEtaDecay(0), fhPhiIsoEtaDecay(0), fhEtaIsoEtaDecay(0), | |
70 | fhPtThresIsolatedEtaDecay(), fhPtFracIsolatedEtaDecay(), fhPtSumIsolatedEtaDecay(), | |
71 | fhPtIsoOtherDecay(0), fhPhiIsoOtherDecay(0), fhEtaIsoOtherDecay(0), | |
72 | fhPtThresIsolatedOtherDecay(), fhPtFracIsolatedOtherDecay(), fhPtSumIsolatedOtherDecay(), | |
73 | fhPtIsoConversion(0), fhPhiIsoConversion(0), fhEtaIsoConversion(0), | |
74 | fhPtThresIsolatedConversion(), fhPtFracIsolatedConversion(), fhPtSumIsolatedConversion(), | |
75 | fhPtIsoUnknown(0), fhPhiIsoUnknown(0), fhEtaIsoUnknown(0), | |
76 | fhPtThresIsolatedUnknown(), fhPtFracIsolatedUnknown(), fhPtSumIsolatedUnknown(), | |
77 | fhPtNoIsoPi0Decay(0), fhPtNoIsoEtaDecay(0), fhPtNoIsoOtherDecay(0), | |
78 | fhPtNoIsoPrompt(0), fhPtIsoMCPhoton(0), fhPtNoIsoMCPhoton(0), | |
0fb69ade | 79 | fhPtNoIsoConversion(0), fhPtNoIsoFragmentation(0), fhPtNoIsoUnknown(0), |
09273901 | 80 | fhTrackMatchedDEta(0x0), fhTrackMatchedDPhi(0x0), fhTrackMatchedDEtaDPhi(0x0), |
81 | fhELambda0(0), fhELambda1(0), | |
1a31a9ab | 82 | //Histograms settings |
803d06a8 | 83 | fHistoNPtSumBins(0), fHistoPtSumMax(0.), fHistoPtSumMin(0.), |
84 | fHistoNPtInConeBins(0), fHistoPtInConeMax(0.), fHistoPtInConeMin(0.) | |
1a31a9ab | 85 | { |
86 | //default ctor | |
87 | ||
88 | //Initialize parameters | |
89 | InitParameters(); | |
90 | ||
91 | for(Int_t i = 0; i < 5 ; i++){ | |
803d06a8 | 92 | fConeSizes[i] = 0 ; |
1a31a9ab | 93 | fhPtSumIsolated[i] = 0 ; |
94 | ||
803d06a8 | 95 | fhPtSumIsolatedPrompt[i] = 0 ; |
1a31a9ab | 96 | fhPtSumIsolatedFragmentation[i] = 0 ; |
803d06a8 | 97 | fhPtSumIsolatedPi0Decay[i] = 0 ; |
98 | fhPtSumIsolatedEtaDecay[i] = 0 ; | |
99 | fhPtSumIsolatedOtherDecay[i] = 0 ; | |
100 | fhPtSumIsolatedConversion[i] = 0 ; | |
101 | fhPtSumIsolatedUnknown[i] = 0 ; | |
1a31a9ab | 102 | |
103 | for(Int_t j = 0; j < 5 ; j++){ | |
104 | fhPtThresIsolated[i][j] = 0 ; | |
803d06a8 | 105 | fhPtFracIsolated[i][j] = 0 ; |
1a31a9ab | 106 | |
803d06a8 | 107 | fhPtThresIsolatedPrompt[i][j] = 0 ; |
108 | fhPtThresIsolatedFragmentation[i][j]= 0 ; | |
109 | fhPtThresIsolatedPi0Decay[i][j] = 0 ; | |
110 | fhPtThresIsolatedEtaDecay[i][j] = 0 ; | |
111 | fhPtThresIsolatedOtherDecay[i][j] = 0 ; | |
112 | fhPtThresIsolatedConversion[i][j] = 0 ; | |
113 | fhPtThresIsolatedUnknown[i][j] = 0 ; | |
114 | ||
115 | fhPtFracIsolatedPrompt[i][j] = 0 ; | |
1a31a9ab | 116 | fhPtFracIsolatedFragmentation[i][j] = 0 ; |
803d06a8 | 117 | fhPtFracIsolatedPi0Decay[i][j] = 0 ; |
118 | fhPtFracIsolatedEtaDecay[i][j] = 0 ; | |
119 | fhPtFracIsolatedOtherDecay[i][j] = 0 ; | |
120 | fhPtFracIsolatedConversion[i][j] = 0 ; | |
121 | fhPtFracIsolatedUnknown[i][j] = 0 ; | |
1a31a9ab | 122 | |
123 | } | |
124 | } | |
125 | ||
126 | for(Int_t i = 0; i < 5 ; i++){ | |
803d06a8 | 127 | fPtFractions[i] = 0 ; |
1a31a9ab | 128 | fPtThresholds[i]= 0 ; |
129 | } | |
130 | ||
1a31a9ab | 131 | } |
132 | ||
803d06a8 | 133 | //______________________________________________________ |
1a31a9ab | 134 | TObjString * AliAnaParticleIsolation::GetAnalysisCuts() |
135 | { | |
136 | //Save parameters used for analysis | |
137 | TString parList ; //this will be list of parameters used for this analysis. | |
138 | const Int_t buffersize = 255; | |
139 | char onePar[buffersize] ; | |
140 | ||
141 | snprintf(onePar, buffersize,"--- AliAnaParticleIsolation ---\n") ; | |
142 | parList+=onePar ; | |
143 | snprintf(onePar, buffersize,"Calorimeter: %s\n",fCalorimeter.Data()) ; | |
144 | parList+=onePar ; | |
145 | snprintf(onePar, buffersize,"fReMakeIC =%d (Flag for reisolation during histogram filling) \n",fReMakeIC) ; | |
146 | parList+=onePar ; | |
147 | snprintf(onePar, buffersize,"fMakeSeveralIC=%d (Flag for isolation with several cuts at the same time ) \n",fMakeSeveralIC) ; | |
09273901 | 148 | parList+=onePar ; |
149 | snprintf(onePar, buffersize,"fFillTMHisto=%d (Flag for track matching histograms) \n",fFillTMHisto) ; | |
1a31a9ab | 150 | parList+=onePar ; |
09273901 | 151 | snprintf(onePar, buffersize,"fFillSSHisto=%d (Flag for shower shape histograms) \n",fFillSSHisto) ; |
152 | parList+=onePar ; | |
153 | ||
1a31a9ab | 154 | if(fMakeSeveralIC){ |
155 | snprintf(onePar, buffersize,"fNCones =%d (Number of cone sizes) \n",fNCones) ; | |
156 | parList+=onePar ; | |
157 | snprintf(onePar, buffersize,"fNPtThresFrac=%d (Flag for isolation with several cuts at the same time ) \n",fNPtThresFrac) ; | |
158 | parList+=onePar ; | |
159 | ||
160 | for(Int_t icone = 0; icone < fNCones ; icone++){ | |
161 | snprintf(onePar, buffersize,"fConeSizes[%d]=%1.2f (isolation cone size) \n",icone, fConeSizes[icone]) ; | |
162 | parList+=onePar ; | |
163 | } | |
164 | for(Int_t ipt = 0; ipt < fNPtThresFrac ; ipt++){ | |
165 | snprintf(onePar, buffersize,"fPtThresholds[%d]=%1.2f (isolation pt threshold) \n",ipt, fPtThresholds[ipt]) ; | |
166 | parList+=onePar ; | |
167 | } | |
168 | for(Int_t ipt = 0; ipt < fNPtThresFrac ; ipt++){ | |
169 | snprintf(onePar, buffersize,"fPtFractions[%d]=%1.2f (isolation pt fraction threshold) \n",ipt, fPtFractions[ipt]) ; | |
170 | parList+=onePar ; | |
171 | } | |
172 | } | |
173 | ||
174 | //Get parameters set in base class. | |
175 | parList += GetBaseParametersList() ; | |
176 | ||
177 | //Get parameters set in IC class. | |
178 | if(!fMakeSeveralIC)parList += GetIsolationCut()->GetICParametersList() ; | |
179 | ||
180 | return new TObjString(parList) ; | |
181 | ||
182 | } | |
183 | ||
803d06a8 | 184 | //________________________________________________________ |
1a31a9ab | 185 | TList * AliAnaParticleIsolation::GetCreateOutputObjects() |
186 | { | |
187 | // Create histograms to be saved in output file and | |
188 | // store them in outputContainer | |
189 | TList * outputContainer = new TList() ; | |
190 | outputContainer->SetName("IsolatedParticleHistos") ; | |
191 | ||
745913ae | 192 | Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); |
193 | Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); | |
194 | Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); | |
195 | Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); | |
196 | Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); | |
197 | Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); | |
198 | Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); | |
199 | Float_t phimin = GetHistogramRanges()->GetHistoPhiMin(); | |
200 | Float_t etamin = GetHistogramRanges()->GetHistoEtaMin(); | |
09273901 | 201 | Int_t ssbins = GetHistogramRanges()->GetHistoShowerShapeBins(); |
202 | Float_t ssmax = GetHistogramRanges()->GetHistoShowerShapeMax(); | |
203 | Float_t ssmin = GetHistogramRanges()->GetHistoShowerShapeMin(); | |
204 | ||
205 | Int_t nresetabins = GetHistogramRanges()->GetHistoTrackResidualEtaBins(); | |
206 | Float_t resetamax = GetHistogramRanges()->GetHistoTrackResidualEtaMax(); | |
207 | Float_t resetamin = GetHistogramRanges()->GetHistoTrackResidualEtaMin(); | |
208 | Int_t nresphibins = GetHistogramRanges()->GetHistoTrackResidualPhiBins(); | |
209 | Float_t resphimax = GetHistogramRanges()->GetHistoTrackResidualPhiMax(); | |
210 | Float_t resphimin = GetHistogramRanges()->GetHistoTrackResidualPhiMin(); | |
803d06a8 | 211 | |
212 | Int_t nptsumbins = fHistoNPtSumBins; | |
213 | Float_t ptsummax = fHistoPtSumMax; | |
214 | Float_t ptsummin = fHistoPtSumMin; | |
215 | Int_t nptinconebins = fHistoNPtInConeBins; | |
216 | Float_t ptinconemax = fHistoPtInConeMax; | |
217 | Float_t ptinconemin = fHistoPtInConeMin; | |
1a31a9ab | 218 | |
219 | if(!fMakeSeveralIC){ | |
220 | ||
09273901 | 221 | if(fFillTMHisto){ |
222 | fhTrackMatchedDEta = new TH2F | |
223 | ("TrackMatchedDEta", | |
224 | "d#eta of cluster-track vs cluster energy", | |
225 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); | |
226 | fhTrackMatchedDEta->SetYTitle("d#eta"); | |
227 | fhTrackMatchedDEta->SetXTitle("E_{cluster} (GeV)"); | |
228 | ||
229 | fhTrackMatchedDPhi = new TH2F | |
230 | ("TrackMatchedDPhi", | |
231 | "d#phi of cluster-track vs cluster energy", | |
232 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); | |
233 | fhTrackMatchedDPhi->SetYTitle("d#phi (rad)"); | |
234 | fhTrackMatchedDPhi->SetXTitle("E_{cluster} (GeV)"); | |
235 | ||
236 | fhTrackMatchedDEtaDPhi = new TH2F | |
237 | ("TrackMatchedDEtaDPhi", | |
238 | "d#eta vs d#phi of cluster-track vs cluster energy", | |
239 | nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax); | |
240 | fhTrackMatchedDEtaDPhi->SetYTitle("d#phi (rad)"); | |
241 | fhTrackMatchedDEtaDPhi->SetXTitle("d#eta"); | |
242 | ||
243 | outputContainer->Add(fhTrackMatchedDEta) ; | |
244 | outputContainer->Add(fhTrackMatchedDPhi) ; | |
245 | outputContainer->Add(fhTrackMatchedDEtaDPhi) ; | |
246 | } | |
247 | ||
248 | if(fFillSSHisto){ | |
249 | ||
250 | fhELambda0 = new TH2F | |
251 | ("hELambda0","Selected #pi^{0} pairs: E vs #lambda_{0}",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
252 | fhELambda0->SetYTitle("#lambda_{0}^{2}"); | |
253 | fhELambda0->SetXTitle("E (GeV)"); | |
254 | outputContainer->Add(fhELambda0) ; | |
255 | ||
256 | fhELambda1 = new TH2F | |
257 | ("hELambda1","Selected #pi^{0} pairs: E vs #lambda_{1}",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
258 | fhELambda1->SetYTitle("#lambda_{1}^{2}"); | |
259 | fhELambda1->SetXTitle("E (GeV)"); | |
260 | outputContainer->Add(fhELambda1) ; | |
261 | ||
262 | } | |
263 | ||
1a31a9ab | 264 | fhConeSumPt = new TH2F |
265 | ("hConePtSum","#Sigma p_{T} in isolation cone ",nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax); | |
266 | fhConeSumPt->SetYTitle("#Sigma p_{T}"); | |
267 | fhConeSumPt->SetXTitle("p_{T} (GeV/c)"); | |
268 | outputContainer->Add(fhConeSumPt) ; | |
269 | ||
270 | fhPtInCone = new TH2F | |
271 | ("hPtInCone","p_{T} in isolation cone ",nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax); | |
272 | fhPtInCone->SetYTitle("p_{T in cone} (GeV/c)"); | |
273 | fhPtInCone->SetXTitle("p_{T} (GeV/c)"); | |
274 | outputContainer->Add(fhPtInCone) ; | |
275 | ||
276 | fhFRConeSumPt = new TH2F | |
277 | ("hFRConePtSum","#Sigma p_{T} in the froward region isolation cone ",nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax); | |
278 | fhFRConeSumPt->SetYTitle("#Sigma p_{T}"); | |
279 | fhFRConeSumPt->SetXTitle("p_{T} (GeV/c)"); | |
280 | outputContainer->Add(fhFRConeSumPt) ; | |
281 | ||
282 | fhPtInFRCone = new TH2F | |
283 | ("hPtInFRCone","p_{T} in froward region isolation cone ",nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax); | |
284 | fhPtInFRCone->SetYTitle("p_{T in cone} (GeV/c)"); | |
285 | fhPtInFRCone->SetXTitle("p_{T} (GeV/c)"); | |
286 | outputContainer->Add(fhPtInFRCone) ; | |
287 | ||
0fb69ade | 288 | fhEIso = new TH1F("hE","Number of isolated particles vs E",nptbins,ptmin,ptmax); |
289 | fhEIso->SetYTitle("dN / dE"); | |
290 | fhEIso->SetXTitle("E (GeV/c)"); | |
291 | outputContainer->Add(fhEIso) ; | |
292 | ||
293 | fhPtIso = new TH1F("hPt","Number of isolated particles vs p_{T}",nptbins,ptmin,ptmax); | |
294 | fhPtIso->SetYTitle("dN / p_{T}"); | |
295 | fhPtIso->SetXTitle("p_{T} (GeV/c)"); | |
1a31a9ab | 296 | outputContainer->Add(fhPtIso) ; |
297 | ||
298 | fhPhiIso = new TH2F | |
732895a6 | 299 | ("hPhi","Number of isolated particles",nptbins,ptmin,ptmax,nphibins,phimin,phimax); |
1a31a9ab | 300 | fhPhiIso->SetYTitle("#phi"); |
301 | fhPhiIso->SetXTitle("p_{T} (GeV/c)"); | |
302 | outputContainer->Add(fhPhiIso) ; | |
303 | ||
304 | fhEtaIso = new TH2F | |
732895a6 | 305 | ("hEta","Number of isolated particles",nptbins,ptmin,ptmax,netabins,etamin,etamax); |
1a31a9ab | 306 | fhEtaIso->SetYTitle("#eta"); |
307 | fhEtaIso->SetXTitle("p_{T} (GeV/c)"); | |
308 | outputContainer->Add(fhEtaIso) ; | |
309 | ||
0fb69ade | 310 | fhEtaPhiIso = new TH2F |
311 | ("hEtaPhi","Number of isolated particlesm #eta vs #phi",netabins,etamin,etamax,nphibins,phimin,phimax); | |
312 | fhEtaPhiIso->SetXTitle("#eta"); | |
313 | fhEtaPhiIso->SetYTitle("#phi"); | |
314 | outputContainer->Add(fhEtaPhiIso) ; | |
315 | ||
1a31a9ab | 316 | fhPtNoIso = new TH1F("hPtNoIso","Number of not isolated leading particles",nptbins,ptmin,ptmax); |
317 | fhPtNoIso->SetYTitle("N"); | |
318 | fhPtNoIso->SetXTitle("p_{T}(GeV/c)"); | |
319 | outputContainer->Add(fhPtNoIso) ; | |
320 | ||
803d06a8 | 321 | fhPtDecayIso = new TH1F("hPtDecayIso","Number of isolated #pi^{0} decay particles",nptbins,ptmin,ptmax); |
66e64043 | 322 | fhPtDecayIso->SetYTitle("N"); |
323 | fhPtDecayIso->SetXTitle("p_{T}(GeV/c)"); | |
803d06a8 | 324 | outputContainer->Add(fhPtDecayIso) ; |
1a31a9ab | 325 | |
803d06a8 | 326 | fhPtDecayNoIso = new TH1F("hPtDecayNoIso","Number of not isolated leading pi0 decay particles",nptbins,ptmin,ptmax); |
66e64043 | 327 | fhPtDecayNoIso->SetYTitle("N"); |
328 | fhPtDecayNoIso->SetXTitle("p_{T}(GeV/c)"); | |
803d06a8 | 329 | outputContainer->Add(fhPtDecayNoIso) ; |
1a31a9ab | 330 | |
331 | if(IsDataMC()){ | |
332 | ||
732895a6 | 333 | fhPtIsoPrompt = new TH1F("hPtMCPrompt","Number of isolated prompt #gamma",nptbins,ptmin,ptmax); |
1a31a9ab | 334 | fhPtIsoPrompt->SetYTitle("N"); |
335 | fhPtIsoPrompt->SetXTitle("p_{T #gamma}(GeV/c)"); | |
336 | outputContainer->Add(fhPtIsoPrompt) ; | |
337 | ||
338 | fhPhiIsoPrompt = new TH2F | |
732895a6 | 339 | ("hPhiMCPrompt","Number of isolated prompt #gamma",nptbins,ptmin,ptmax,nphibins,phimin,phimax); |
1a31a9ab | 340 | fhPhiIsoPrompt->SetYTitle("#phi"); |
341 | fhPhiIsoPrompt->SetXTitle("p_{T #gamma} (GeV/c)"); | |
342 | outputContainer->Add(fhPhiIsoPrompt) ; | |
343 | ||
344 | fhEtaIsoPrompt = new TH2F | |
732895a6 | 345 | ("hEtaMCPrompt","Number of isolated prompt #gamma",nptbins,ptmin,ptmax,netabins,etamin,etamax); |
1a31a9ab | 346 | fhEtaIsoPrompt->SetYTitle("#eta"); |
347 | fhEtaIsoPrompt->SetXTitle("p_{T #gamma} (GeV/c)"); | |
348 | outputContainer->Add(fhEtaIsoPrompt) ; | |
349 | ||
732895a6 | 350 | fhPtIsoFragmentation = new TH1F("hPtMCFragmentation","Number of isolated #gamma",nptbins,ptmin,ptmax); |
1a31a9ab | 351 | fhPtIsoFragmentation->SetYTitle("N"); |
352 | fhPtIsoFragmentation->SetXTitle("p_{T #gamma}(GeV/c)"); | |
353 | outputContainer->Add(fhPtIsoFragmentation) ; | |
354 | ||
355 | fhPhiIsoFragmentation = new TH2F | |
732895a6 | 356 | ("hPhiMCFragmentation","Number of isolated fragmentation #gamma",nptbins,ptmin,ptmax,nphibins,phimin,phimax); |
1a31a9ab | 357 | fhPhiIsoFragmentation->SetYTitle("#phi"); |
358 | fhPhiIsoFragmentation->SetXTitle("p_{T #gamma} (GeV/c)"); | |
359 | outputContainer->Add(fhPhiIsoFragmentation) ; | |
360 | ||
361 | fhEtaIsoFragmentation = new TH2F | |
732895a6 | 362 | ("hEtaMCFragmentation","Number of isolated fragmentation #gamma",nptbins,ptmin,ptmax,netabins,etamin,etamax); |
1a31a9ab | 363 | fhEtaIsoFragmentation->SetYTitle("#eta"); |
364 | fhEtaIsoFragmentation->SetXTitle("p_{T #gamma} (GeV/c)"); | |
365 | outputContainer->Add(fhEtaIsoFragmentation) ; | |
366 | ||
732895a6 | 367 | fhPtIsoPi0Decay = new TH1F("hPtMCPi0Decay","Number of isolated #gamma from #pi^{0} decay",nptbins,ptmin,ptmax); |
1a31a9ab | 368 | fhPtIsoPi0Decay->SetYTitle("N"); |
369 | fhPtIsoPi0Decay->SetXTitle("p_{T #gamma}(GeV/c)"); | |
370 | outputContainer->Add(fhPtIsoPi0Decay) ; | |
371 | ||
372 | fhPhiIsoPi0Decay = new TH2F | |
732895a6 | 373 | ("hPhiMCPi0Decay","Number of isolated #gamma from #pi^{0} decay",nptbins,ptmin,ptmax,nphibins,phimin,phimax); |
1a31a9ab | 374 | fhPhiIsoPi0Decay->SetYTitle("#phi"); |
375 | fhPhiIsoPi0Decay->SetXTitle("p_{T #gamma} (GeV/c)"); | |
376 | outputContainer->Add(fhPhiIsoPi0Decay) ; | |
377 | ||
378 | fhEtaIsoPi0Decay = new TH2F | |
732895a6 | 379 | ("hEtaMCPi0Decay","Number of isolated #gamma from #pi^{0} decay",nptbins,ptmin,ptmax,netabins,etamin,etamax); |
1a31a9ab | 380 | fhEtaIsoPi0Decay->SetYTitle("#eta"); |
381 | fhEtaIsoPi0Decay->SetXTitle("p_{T #gamma} (GeV/c)"); | |
382 | outputContainer->Add(fhEtaIsoPi0Decay) ; | |
383 | ||
803d06a8 | 384 | fhPtIsoEtaDecay = new TH1F("hPtMCEtaDecay","Number of isolated #gamma from #eta decay",nptbins,ptmin,ptmax); |
385 | fhPtIsoEtaDecay->SetYTitle("N"); | |
386 | fhPtIsoEtaDecay->SetXTitle("p_{T #gamma}(GeV/c)"); | |
387 | outputContainer->Add(fhPtIsoEtaDecay) ; | |
388 | ||
389 | fhPhiIsoEtaDecay = new TH2F | |
390 | ("hPhiMCEtaDecay","Number of isolated #gamma from #eta decay",nptbins,ptmin,ptmax,nphibins,phimin,phimax); | |
391 | fhPhiIsoEtaDecay->SetYTitle("#phi"); | |
392 | fhPhiIsoEtaDecay->SetXTitle("p_{T #gamma} (GeV/c)"); | |
393 | outputContainer->Add(fhPhiIsoEtaDecay) ; | |
394 | ||
395 | fhEtaIsoEtaDecay = new TH2F | |
396 | ("hEtaMCEtaDecay","Number of isolated #gamma from #eta decay",nptbins,ptmin,ptmax,netabins,etamin,etamax); | |
397 | fhEtaIsoEtaDecay->SetYTitle("#eta"); | |
398 | fhEtaIsoEtaDecay->SetXTitle("p_{T #gamma} (GeV/c)"); | |
399 | outputContainer->Add(fhEtaIsoEtaDecay) ; | |
400 | ||
732895a6 | 401 | fhPtIsoOtherDecay = new TH1F("hPtMCOtherDecay","Number of isolated #gamma from non-#pi^{0} decay",nptbins,ptmin,ptmax); |
1a31a9ab | 402 | fhPtIsoOtherDecay->SetYTitle("N"); |
403 | fhPtIsoOtherDecay->SetXTitle("p_{T #gamma}(GeV/c)"); | |
404 | outputContainer->Add(fhPtIsoOtherDecay) ; | |
405 | ||
406 | fhPhiIsoOtherDecay = new TH2F | |
732895a6 | 407 | ("hPhiMCOtherDecay","Number of isolated #gamma from non-#pi^{0} decay",nptbins,ptmin,ptmax,nphibins,phimin,phimax); |
1a31a9ab | 408 | fhPhiIsoOtherDecay->SetYTitle("#phi"); |
409 | fhPhiIsoOtherDecay->SetXTitle("p_{T #gamma} (GeV/c)"); | |
410 | outputContainer->Add(fhPhiIsoOtherDecay) ; | |
411 | ||
412 | fhEtaIsoOtherDecay = new TH2F | |
732895a6 | 413 | ("hEtaMCOtherDecay","Number of isolated #gamma non-#pi^{0} decay",nptbins,ptmin,ptmax,netabins,etamin,etamax); |
1a31a9ab | 414 | fhEtaIsoOtherDecay->SetYTitle("#eta"); |
415 | fhEtaIsoOtherDecay->SetXTitle("p_{T #gamma} (GeV/c)"); | |
416 | outputContainer->Add(fhEtaIsoOtherDecay) ; | |
417 | ||
732895a6 | 418 | fhPtIsoConversion = new TH1F("hPtMCConversion","Number of isolated converted #gamma",nptbins,ptmin,ptmax); |
1a31a9ab | 419 | fhPtIsoConversion->SetYTitle("N"); |
420 | fhPtIsoConversion->SetXTitle("p_{T #gamma}(GeV/c)"); | |
421 | outputContainer->Add(fhPtIsoConversion) ; | |
422 | ||
423 | fhPhiIsoConversion = new TH2F | |
732895a6 | 424 | ("hPhiMCConversion","Number of isolated converted #gamma",nptbins,ptmin,ptmax,nphibins,phimin,phimax); |
1a31a9ab | 425 | fhPhiIsoConversion->SetYTitle("#phi"); |
426 | fhPhiIsoConversion->SetXTitle("p_{T #gamma} (GeV/c)"); | |
427 | outputContainer->Add(fhPhiIsoConversion) ; | |
428 | ||
429 | fhEtaIsoConversion = new TH2F | |
732895a6 | 430 | ("hEtaMCConversion","Number of isolated converted #gamma",nptbins,ptmin,ptmax,netabins,etamin,etamax); |
1a31a9ab | 431 | fhEtaIsoConversion->SetYTitle("#eta"); |
432 | fhEtaIsoConversion->SetXTitle("p_{T #gamma} (GeV/c)"); | |
433 | outputContainer->Add(fhEtaIsoConversion) ; | |
434 | ||
732895a6 | 435 | fhPtIsoUnknown = new TH1F("hPtMCUnknown","Number of isolated non-#gamma particles",nptbins,ptmin,ptmax); |
1a31a9ab | 436 | fhPtIsoUnknown->SetYTitle("N"); |
437 | fhPtIsoUnknown->SetXTitle("p_{T}(GeV/c)"); | |
438 | outputContainer->Add(fhPtIsoUnknown) ; | |
439 | ||
440 | fhPhiIsoUnknown = new TH2F | |
732895a6 | 441 | ("hPhiMCUnknown","Number of isolated non-#gamma particles",nptbins,ptmin,ptmax,nphibins,phimin,phimax); |
1a31a9ab | 442 | fhPhiIsoUnknown->SetYTitle("#phi"); |
443 | fhPhiIsoUnknown->SetXTitle("p_{T} (GeV/c)"); | |
444 | outputContainer->Add(fhPhiIsoUnknown) ; | |
445 | ||
446 | fhEtaIsoUnknown = new TH2F | |
732895a6 | 447 | ("hEtaMCUnknown","Number of isolated non-#gamma particles",nptbins,ptmin,ptmax,netabins,etamin,etamax); |
1a31a9ab | 448 | fhEtaIsoUnknown->SetYTitle("#eta"); |
449 | fhEtaIsoUnknown->SetXTitle("p_{T} (GeV/c)"); | |
450 | outputContainer->Add(fhEtaIsoUnknown) ; | |
451 | ||
452 | fhPtNoIsoPi0Decay = new TH1F | |
732895a6 | 453 | ("hPtNoIsoPi0Decay","Number of not isolated leading #gamma from #pi^{0} decay",nptbins,ptmin,ptmax); |
1a31a9ab | 454 | fhPtNoIsoPi0Decay->SetYTitle("N"); |
455 | fhPtNoIsoPi0Decay->SetXTitle("p_{T} (GeV/c)"); | |
456 | outputContainer->Add(fhPtNoIsoPi0Decay) ; | |
457 | ||
803d06a8 | 458 | fhPtNoIsoEtaDecay = new TH1F |
459 | ("hPtNoIsoEtaDecay","Number of not isolated leading #gamma from eta decay",nptbins,ptmin,ptmax); | |
460 | fhPtNoIsoEtaDecay->SetYTitle("N"); | |
461 | fhPtNoIsoEtaDecay->SetXTitle("p_{T} (GeV/c)"); | |
462 | outputContainer->Add(fhPtNoIsoEtaDecay) ; | |
463 | ||
464 | fhPtNoIsoOtherDecay = new TH1F | |
465 | ("hPtNoIsoOtherDecay","Number of not isolated leading #gamma from other decay",nptbins,ptmin,ptmax); | |
466 | fhPtNoIsoOtherDecay->SetYTitle("N"); | |
467 | fhPtNoIsoOtherDecay->SetXTitle("p_{T} (GeV/c)"); | |
468 | outputContainer->Add(fhPtNoIsoOtherDecay) ; | |
469 | ||
1a31a9ab | 470 | fhPtNoIsoPrompt = new TH1F |
471 | ("hPtNoIsoPrompt","Number of not isolated leading prompt #gamma",nptbins,ptmin,ptmax); | |
472 | fhPtNoIsoPrompt->SetYTitle("N"); | |
473 | fhPtNoIsoPrompt->SetXTitle("p_{T} (GeV/c)"); | |
474 | outputContainer->Add(fhPtNoIsoPrompt) ; | |
475 | ||
476 | fhPtIsoMCPhoton = new TH1F | |
477 | ("hPtIsoMCPhoton","Number of isolated leading #gamma",nptbins,ptmin,ptmax); | |
478 | fhPtIsoMCPhoton->SetYTitle("N"); | |
479 | fhPtIsoMCPhoton->SetXTitle("p_{T} (GeV/c)"); | |
480 | outputContainer->Add(fhPtIsoMCPhoton) ; | |
481 | ||
482 | fhPtNoIsoMCPhoton = new TH1F | |
732895a6 | 483 | ("hPtNoIsoMCPhoton","Number of not isolated leading #gamma",nptbins,ptmin,ptmax); |
1a31a9ab | 484 | fhPtNoIsoMCPhoton->SetYTitle("N"); |
485 | fhPtNoIsoMCPhoton->SetXTitle("p_{T} (GeV/c)"); | |
486 | outputContainer->Add(fhPtNoIsoMCPhoton) ; | |
0fb69ade | 487 | |
488 | fhPtNoIsoConversion = new TH1F | |
489 | ("hPtNoIsoConversion","Number of not isolated leading conversion #gamma",nptbins,ptmin,ptmax); | |
490 | fhPtNoIsoConversion->SetYTitle("N"); | |
491 | fhPtNoIsoConversion->SetXTitle("p_{T} (GeV/c)"); | |
492 | outputContainer->Add(fhPtNoIsoConversion) ; | |
493 | ||
494 | fhPtNoIsoFragmentation = new TH1F | |
495 | ("hPtNoIsoFragmentation","Number of not isolated leading fragmentation #gamma",nptbins,ptmin,ptmax); | |
496 | fhPtNoIsoFragmentation->SetYTitle("N"); | |
497 | fhPtNoIsoFragmentation->SetXTitle("p_{T} (GeV/c)"); | |
498 | outputContainer->Add(fhPtNoIsoFragmentation) ; | |
499 | ||
500 | fhPtNoIsoUnknown = new TH1F | |
501 | ("hPtNoIsoUnknown","Number of not isolated leading hadrons",nptbins,ptmin,ptmax); | |
502 | fhPtNoIsoUnknown->SetYTitle("N"); | |
503 | fhPtNoIsoUnknown->SetXTitle("p_{T} (GeV/c)"); | |
504 | outputContainer->Add(fhPtNoIsoUnknown) ; | |
505 | ||
1a31a9ab | 506 | }//Histos with MC |
507 | ||
508 | } | |
509 | ||
510 | if(fMakeSeveralIC){ | |
511 | const Int_t buffersize = 255; | |
512 | char name[buffersize]; | |
513 | char title[buffersize]; | |
514 | for(Int_t icone = 0; icone<fNCones; icone++){ | |
515 | snprintf(name, buffersize,"hPtSum_Cone_%d",icone); | |
516 | snprintf(title, buffersize,"Candidate cone sum p_{T} for cone size %d vs candidate p_{T}",icone); | |
517 | fhPtSumIsolated[icone] = new TH2F(name, title,nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax); | |
518 | fhPtSumIsolated[icone]->SetYTitle("#Sigma p_{T} (GeV/c)"); | |
519 | fhPtSumIsolated[icone]->SetXTitle("p_{T} (GeV/c)"); | |
520 | outputContainer->Add(fhPtSumIsolated[icone]) ; | |
521 | ||
522 | if(IsDataMC()){ | |
523 | snprintf(name, buffersize,"hPtSumPrompt_Cone_%d",icone); | |
524 | snprintf(title, buffersize,"Candidate Prompt cone sum p_{T} for cone size %d vs candidate p_{T}",icone); | |
525 | fhPtSumIsolatedPrompt[icone] = new TH2F(name, title,nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax); | |
526 | fhPtSumIsolatedPrompt[icone]->SetYTitle("#Sigma p_{T} (GeV/c)"); | |
527 | fhPtSumIsolatedPrompt[icone]->SetXTitle("p_{T} (GeV/c)"); | |
528 | outputContainer->Add(fhPtSumIsolatedPrompt[icone]) ; | |
529 | ||
530 | snprintf(name, buffersize,"hPtSumFragmentation_Cone_%d",icone); | |
531 | snprintf(title, buffersize,"Candidate Fragmentation cone sum p_{T} for cone size %d vs candidate p_{T}",icone); | |
532 | fhPtSumIsolatedFragmentation[icone] = new TH2F(name, title,nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax); | |
533 | fhPtSumIsolatedFragmentation[icone]->SetYTitle("#Sigma p_{T} (GeV/c)"); | |
534 | fhPtSumIsolatedFragmentation[icone]->SetXTitle("p_{T} (GeV/c)"); | |
535 | outputContainer->Add(fhPtSumIsolatedFragmentation[icone]) ; | |
536 | ||
537 | snprintf(name, buffersize,"hPtSumPi0Decay_Cone_%d",icone); | |
538 | snprintf(title, buffersize,"Candidate Pi0Decay cone sum p_{T} for cone size %d vs candidate p_{T}",icone); | |
539 | fhPtSumIsolatedPi0Decay[icone] = new TH2F(name, title,nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax); | |
540 | fhPtSumIsolatedPi0Decay[icone]->SetYTitle("#Sigma p_{T} (GeV/c)"); | |
541 | fhPtSumIsolatedPi0Decay[icone]->SetXTitle("p_{T} (GeV/c)"); | |
542 | outputContainer->Add(fhPtSumIsolatedPi0Decay[icone]) ; | |
543 | ||
803d06a8 | 544 | snprintf(name, buffersize,"hPtSumEtaDecay_Cone_%d",icone); |
545 | snprintf(title, buffersize,"Candidate EtaDecay cone sum p_{T} for cone size %d vs candidate p_{T}",icone); | |
546 | fhPtSumIsolatedEtaDecay[icone] = new TH2F(name, title,nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax); | |
547 | fhPtSumIsolatedEtaDecay[icone]->SetYTitle("#Sigma p_{T} (GeV/c)"); | |
548 | fhPtSumIsolatedEtaDecay[icone]->SetXTitle("p_{T} (GeV/c)"); | |
549 | outputContainer->Add(fhPtSumIsolatedEtaDecay[icone]) ; | |
550 | ||
1a31a9ab | 551 | snprintf(name, buffersize,"hPtSumOtherDecay_Cone_%d",icone); |
552 | snprintf(title, buffersize,"Candidate OtherDecay cone sum p_{T} for cone size %d vs candidate p_{T}",icone); | |
553 | fhPtSumIsolatedOtherDecay[icone] = new TH2F(name, title,nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax); | |
554 | fhPtSumIsolatedOtherDecay[icone]->SetYTitle("#Sigma p_{T} (GeV/c)"); | |
555 | fhPtSumIsolatedOtherDecay[icone]->SetXTitle("p_{T} (GeV/c)"); | |
556 | outputContainer->Add(fhPtSumIsolatedOtherDecay[icone]) ; | |
557 | ||
558 | snprintf(name, buffersize,"hPtSumConversion_Cone_%d",icone); | |
559 | snprintf(title, buffersize,"Candidate Conversion cone sum p_{T} for cone size %d vs candidate p_{T}",icone); | |
560 | fhPtSumIsolatedConversion[icone] = new TH2F(name, title,nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax); | |
561 | fhPtSumIsolatedConversion[icone]->SetYTitle("#Sigma p_{T} (GeV/c)"); | |
562 | fhPtSumIsolatedConversion[icone]->SetXTitle("p_{T} (GeV/c)"); | |
563 | outputContainer->Add(fhPtSumIsolatedConversion[icone]) ; | |
564 | ||
565 | snprintf(name, buffersize,"hPtSumUnknown_Cone_%d",icone); | |
566 | snprintf(title, buffersize,"Candidate Unknown cone sum p_{T} for cone size %d vs candidate p_{T}",icone); | |
567 | fhPtSumIsolatedUnknown[icone] = new TH2F(name, title,nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax); | |
568 | fhPtSumIsolatedUnknown[icone]->SetYTitle("#Sigma p_{T} (GeV/c)"); | |
569 | fhPtSumIsolatedUnknown[icone]->SetXTitle("p_{T} (GeV/c)"); | |
570 | outputContainer->Add(fhPtSumIsolatedUnknown[icone]) ; | |
571 | ||
572 | }//Histos with MC | |
573 | ||
574 | for(Int_t ipt = 0; ipt<fNPtThresFrac;ipt++){ | |
575 | snprintf(name, buffersize,"hPtThres_Cone_%d_Pt%d",icone,ipt); | |
576 | snprintf(title, buffersize,"Isolated candidate p_{T} distribution for cone size %d and p_{T}^{th} %d",icone,ipt); | |
577 | fhPtThresIsolated[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax); | |
578 | fhPtThresIsolated[icone][ipt]->SetXTitle("p_{T} (GeV/c)"); | |
579 | outputContainer->Add(fhPtThresIsolated[icone][ipt]) ; | |
580 | ||
581 | snprintf(name, buffersize,"hPtFrac_Cone_%d_Pt%d",icone,ipt); | |
582 | snprintf(title, buffersize,"Isolated candidate p_{T} distribution for cone size %d and p_{T}^{th} %d",icone,ipt); | |
583 | fhPtFracIsolated[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax); | |
584 | fhPtFracIsolated[icone][ipt]->SetXTitle("p_{T} (GeV/c)"); | |
585 | outputContainer->Add(fhPtFracIsolated[icone][ipt]) ; | |
586 | ||
587 | if(IsDataMC()){ | |
588 | snprintf(name, buffersize,"hPtThresMCPrompt_Cone_%d_Pt%d",icone,ipt); | |
589 | snprintf(title, buffersize,"Isolated candidate Prompt p_{T} distribution for cone size %d and p_{T}^{th} %d",icone,ipt); | |
590 | fhPtThresIsolatedPrompt[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax); | |
591 | fhPtThresIsolatedPrompt[icone][ipt]->SetXTitle("p_{T} (GeV/c)"); | |
592 | outputContainer->Add(fhPtThresIsolatedPrompt[icone][ipt]) ; | |
593 | ||
594 | snprintf(name, buffersize,"hPtFracMCPrompt_Cone_%d_Pt%d",icone,ipt); | |
595 | snprintf(title, buffersize,"Isolated candidate Prompt p_{T} distribution for cone size %d and p_{T}^{th} %d",icone,ipt); | |
596 | fhPtFracIsolatedPrompt[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax); | |
597 | fhPtFracIsolatedPrompt[icone][ipt]->SetXTitle("p_{T} (GeV/c)"); | |
598 | outputContainer->Add(fhPtFracIsolatedPrompt[icone][ipt]) ; | |
599 | ||
600 | snprintf(name, buffersize,"hPtThresMCFragmentation_Cone_%d_Pt%d",icone,ipt); | |
601 | snprintf(title, buffersize,"Isolated candidate Fragmentation p_{T} distribution for cone size %d and p_{T}^{th} %d",icone,ipt); | |
602 | fhPtThresIsolatedFragmentation[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax); | |
603 | fhPtThresIsolatedFragmentation[icone][ipt]->SetXTitle("p_{T} (GeV/c)"); | |
604 | outputContainer->Add(fhPtThresIsolatedFragmentation[icone][ipt]) ; | |
605 | ||
606 | snprintf(name, buffersize,"hPtFracMCFragmentation_Cone_%d_Pt%d",icone,ipt); | |
607 | snprintf(title, buffersize,"Isolated candidate Fragmentation p_{T} distribution for cone size %d and p_{T}^{th} %d",icone,ipt); | |
608 | fhPtFracIsolatedFragmentation[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax); | |
609 | fhPtFracIsolatedFragmentation[icone][ipt]->SetXTitle("p_{T} (GeV/c)"); | |
610 | outputContainer->Add(fhPtFracIsolatedFragmentation[icone][ipt]) ; | |
611 | ||
612 | snprintf(name, buffersize,"hPtThresMCPi0Decay_Cone_%d_Pt%d",icone,ipt); | |
613 | snprintf(title, buffersize,"Isolated candidate Pi0Decay p_{T} distribution for cone size %d and p_{T}^{th} %d",icone,ipt); | |
614 | fhPtThresIsolatedPi0Decay[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax); | |
615 | fhPtThresIsolatedPi0Decay[icone][ipt]->SetXTitle("p_{T} (GeV/c)"); | |
616 | outputContainer->Add(fhPtThresIsolatedPi0Decay[icone][ipt]) ; | |
617 | ||
618 | snprintf(name, buffersize,"hPtFracMCPi0Decay_Cone_%d_Pt%d",icone,ipt); | |
619 | snprintf(title, buffersize,"Isolated candidate Pi0Decay p_{T} distribution for cone size %d and p_{T}^{th} %d",icone,ipt); | |
620 | fhPtFracIsolatedPi0Decay[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax); | |
621 | fhPtFracIsolatedPi0Decay[icone][ipt]->SetXTitle("p_{T} (GeV/c)"); | |
622 | outputContainer->Add(fhPtFracIsolatedPi0Decay[icone][ipt]) ; | |
623 | ||
803d06a8 | 624 | snprintf(name, buffersize,"hPtThresMCEtaDecay_Cone_%d_Pt%d",icone,ipt); |
625 | snprintf(title, buffersize,"Isolated candidate EtaDecay p_{T} distribution for cone size %d and p_{T}^{th} %d",icone,ipt); | |
626 | fhPtThresIsolatedEtaDecay[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax); | |
627 | fhPtThresIsolatedEtaDecay[icone][ipt]->SetXTitle("p_{T} (GeV/c)"); | |
628 | outputContainer->Add(fhPtThresIsolatedEtaDecay[icone][ipt]) ; | |
629 | ||
630 | snprintf(name, buffersize,"hPtFracMCEtaDecay_Cone_%d_Pt%d",icone,ipt); | |
631 | snprintf(title, buffersize,"Isolated candidate EtaDecay p_{T} distribution for cone size %d and p_{T}^{th} %d",icone,ipt); | |
632 | fhPtFracIsolatedEtaDecay[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax); | |
633 | fhPtFracIsolatedEtaDecay[icone][ipt]->SetXTitle("p_{T} (GeV/c)"); | |
634 | outputContainer->Add(fhPtFracIsolatedEtaDecay[icone][ipt]) ; | |
635 | ||
636 | ||
1a31a9ab | 637 | snprintf(name, buffersize,"hPtThresMCOtherDecay_Cone_%d_Pt%d",icone,ipt); |
638 | snprintf(title, buffersize,"Isolated candidate OtherDecay p_{T} distribution for cone size %d and p_{T}^{th} %d",icone,ipt); | |
639 | fhPtThresIsolatedOtherDecay[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax); | |
640 | fhPtThresIsolatedOtherDecay[icone][ipt]->SetXTitle("p_{T} (GeV/c)"); | |
641 | outputContainer->Add(fhPtThresIsolatedOtherDecay[icone][ipt]) ; | |
642 | ||
643 | snprintf(name, buffersize,"hPtFracMCOtherDecay_Cone_%d_Pt%d",icone,ipt); | |
644 | snprintf(title, buffersize,"Isolated candidate OtherDecay p_{T} distribution for cone size %d and p_{T}^{th} %d",icone,ipt); | |
645 | fhPtFracIsolatedOtherDecay[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax); | |
646 | fhPtFracIsolatedOtherDecay[icone][ipt]->SetXTitle("p_{T} (GeV/c)"); | |
647 | outputContainer->Add(fhPtFracIsolatedOtherDecay[icone][ipt]) ; | |
648 | ||
649 | snprintf(name, buffersize,"hPtThresMCConversion_Cone_%d_Pt%d",icone,ipt); | |
650 | snprintf(title, buffersize,"Isolated candidate Conversion p_{T} distribution for cone size %d and p_{T}^{th} %d",icone,ipt); | |
651 | fhPtThresIsolatedConversion[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax); | |
652 | fhPtThresIsolatedConversion[icone][ipt]->SetXTitle("p_{T} (GeV/c)"); | |
653 | outputContainer->Add(fhPtThresIsolatedConversion[icone][ipt]) ; | |
654 | ||
655 | snprintf(name, buffersize,"hPtFracMCConversion_Cone_%d_Pt%d",icone,ipt); | |
656 | snprintf(title, buffersize,"Isolated candidate Conversion p_{T} distribution for cone size %d and p_{T}^{th} %d",icone,ipt); | |
657 | fhPtFracIsolatedConversion[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax); | |
658 | fhPtFracIsolatedConversion[icone][ipt]->SetXTitle("p_{T} (GeV/c)"); | |
659 | outputContainer->Add(fhPtFracIsolatedConversion[icone][ipt]) ; | |
660 | ||
661 | snprintf(name, buffersize,"hPtThresMCUnknown_Cone_%d_Pt%d",icone,ipt); | |
662 | snprintf(title, buffersize,"Isolated candidate Unknown p_{T} distribution for cone size %d and p_{T}^{th} %d",icone,ipt); | |
663 | fhPtThresIsolatedUnknown[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax); | |
664 | fhPtThresIsolatedUnknown[icone][ipt]->SetXTitle("p_{T} (GeV/c)"); | |
665 | outputContainer->Add(fhPtThresIsolatedUnknown[icone][ipt]) ; | |
666 | ||
667 | snprintf(name, buffersize,"hPtFracMCUnknown_Cone_%d_Pt%d",icone,ipt); | |
668 | snprintf(title, buffersize,"Isolated candidate Unknown p_{T} distribution for cone size %d and p_{T}^{th} %d",icone,ipt); | |
669 | fhPtFracIsolatedUnknown[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax); | |
670 | fhPtFracIsolatedUnknown[icone][ipt]->SetXTitle("p_{T} (GeV/c)"); | |
671 | outputContainer->Add(fhPtFracIsolatedUnknown[icone][ipt]) ; | |
672 | ||
673 | }//Histos with MC | |
674 | ||
675 | }//icone loop | |
676 | }//ipt loop | |
677 | } | |
678 | ||
1a31a9ab | 679 | |
680 | return outputContainer ; | |
681 | ||
682 | } | |
683 | ||
803d06a8 | 684 | //____________________________________________ |
685 | void AliAnaParticleIsolation::InitParameters() | |
686 | { | |
687 | ||
688 | //Initialize the parameters of the analysis. | |
689 | SetInputAODName("PWG4Particle"); | |
690 | SetAODObjArrayName("IsolationCone"); | |
691 | AddToHistogramsName("AnaIsolation_"); | |
692 | ||
693 | fCalorimeter = "PHOS" ; | |
694 | fReMakeIC = kFALSE ; | |
695 | fMakeSeveralIC = kFALSE ; | |
696 | ||
697 | //----------- Several IC----------------- | |
698 | fNCones = 5 ; | |
699 | fNPtThresFrac = 5 ; | |
700 | fConeSizes[0] = 0.1; fConeSizes[1] = 0.2; fConeSizes[2] = 0.3; fConeSizes[3] = 0.4; fConeSizes[4] = 0.5; | |
701 | fPtThresholds[0] = 1.; fPtThresholds[1] = 2.; fPtThresholds[2] = 3.; fPtThresholds[3] = 4.; fPtThresholds[4] = 5.; | |
702 | fPtFractions[0] = 0.05; fPtFractions[1] = 0.075; fPtFractions[2] = 0.1; fPtFractions[3] = 1.25; fPtFractions[4] = 1.5; | |
703 | ||
704 | //------------- Histograms settings ------- | |
705 | fHistoNPtSumBins = 100 ; | |
706 | fHistoPtSumMax = 50 ; | |
707 | fHistoPtSumMin = 0. ; | |
708 | ||
709 | fHistoNPtInConeBins = 100 ; | |
710 | fHistoPtInConeMax = 50 ; | |
711 | fHistoPtInConeMin = 0. ; | |
712 | ||
713 | } | |
714 | ||
715 | //__________________________________________________ | |
1a31a9ab | 716 | void AliAnaParticleIsolation::MakeAnalysisFillAOD() |
717 | { | |
718 | //Do analysis and fill aods | |
719 | //Search for the isolated photon in fCalorimeter with pt > GetMinPt() | |
720 | ||
721 | if(!GetInputAODBranch()){ | |
722 | printf("AliAnaParticleIsolation::MakeAnalysisFillAOD() - No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data()); | |
723 | abort(); | |
724 | } | |
725 | ||
726 | if(strcmp(GetInputAODBranch()->GetClass()->GetName(), "AliAODPWG4ParticleCorrelation")){ | |
727 | printf("AliAnaParticleIsolation::MakeAnalysisFillAOD() - Wrong type of AOD object, change AOD class name in input AOD: It should be <AliAODPWG4ParticleCorrelation> and not <%s> \n",GetInputAODBranch()->GetClass()->GetName()); | |
728 | abort(); | |
729 | } | |
730 | ||
731 | Int_t n = 0, nfrac = 0; | |
732 | Bool_t isolated = kFALSE ; | |
1a31a9ab | 733 | Float_t coneptsum = 0 ; |
734 | TObjArray * pl = 0x0; ; | |
735 | ||
736 | //Select the calorimeter for candidate isolation with neutral particles | |
737 | if(fCalorimeter == "PHOS") | |
738 | pl = GetPHOSClusters(); | |
739 | else if (fCalorimeter == "EMCAL") | |
740 | pl = GetEMCALClusters(); | |
741 | ||
742 | //Loop on AOD branch, filled previously in AliAnaPhoton, find leading particle to do isolation only with it | |
743 | Double_t ptLeading = 0. ; | |
744 | Int_t idLeading = -1 ; | |
745 | TLorentzVector mom ; | |
746 | Int_t naod = GetInputAODBranch()->GetEntriesFast(); | |
747 | if(GetDebug() > 0) printf("AliAnaParticleIsolation::MakeAnalysisFillAOD() - Input aod branch entries %d\n", naod); | |
748 | ||
749 | for(Int_t iaod = 0; iaod < naod; iaod++){ | |
750 | AliAODPWG4ParticleCorrelation * aodinput = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod)); | |
751 | ||
752 | //If too small or too large pt, skip | |
753 | if(aodinput->Pt() < GetMinPt() || aodinput->Pt() > GetMaxPt() ) continue ; | |
754 | ||
755 | //check if it is low pt trigger particle, then adjust the isolation method | |
756 | if(aodinput->Pt() < GetIsolationCut()->GetPtThreshold() || aodinput->Pt() < GetIsolationCut()->GetSumPtThreshold()) | |
757 | continue ; //trigger should not come from underlying event | |
758 | ||
759 | //vertex cut in case of mixing | |
760 | if (GetMixedEvent()) { | |
761 | Int_t evt=-1; | |
762 | Int_t id =-1; | |
763 | if (aodinput->GetCaloLabel(0) >= 0 ){ | |
764 | id=aodinput->GetCaloLabel(0); | |
765 | if(id >= 0 )evt= GetMixedEvent()-> EventIndexForCaloCluster(id) ; | |
766 | } | |
767 | else if(aodinput->GetTrackLabel(0) >= 0 ){ | |
768 | id=aodinput->GetTrackLabel(0); | |
769 | if(id >= 0 )evt= GetMixedEvent()->EventIndex(id) ; | |
770 | } | |
771 | else continue; | |
772 | ||
773 | if (TMath::Abs(GetVertex(evt)[2]) > GetZvertexCut()) | |
774 | return ; | |
775 | } | |
776 | ||
777 | //find the leading particles with highest momentum | |
778 | if ((aodinput->Pt())>ptLeading) { | |
779 | ptLeading = aodinput->Pt() ; | |
226b95ba | 780 | idLeading = iaod ; |
1a31a9ab | 781 | } |
226b95ba | 782 | aodinput->SetLeadingParticle(kFALSE); |
1a31a9ab | 783 | }//finish searching for leading trigger particle |
784 | ||
785 | // Check isolation of leading particle | |
786 | if(idLeading < 0) return; | |
226b95ba | 787 | |
1a31a9ab | 788 | AliAODPWG4ParticleCorrelation * aodinput = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(idLeading)); |
226b95ba | 789 | aodinput->SetLeadingParticle(kTRUE); |
803d06a8 | 790 | |
1a31a9ab | 791 | //After cuts, study isolation |
792 | n=0; nfrac = 0; isolated = kFALSE; coneptsum = 0; | |
ac5111f9 | 793 | GetIsolationCut()->MakeIsolationCut(GetCTSTracks(),pl, |
794 | GetReader(), GetCaloPID(), | |
795 | kTRUE, aodinput, GetAODObjArrayName(), n,nfrac,coneptsum, isolated); | |
1a31a9ab | 796 | aodinput->SetIsolated(isolated); |
1a31a9ab | 797 | |
798 | if(GetDebug() > 1) { | |
799 | if(isolated)printf("AliAnaParticleIsolation::MakeAnalysisFillAOD() : Particle %d IS ISOLATED \n",idLeading); | |
800 | printf("AliAnaParticleIsolation::MakeAnalysisFillAOD() - End fill AODs \n"); | |
801 | } | |
802 | ||
803 | } | |
804 | ||
803d06a8 | 805 | //_________________________________________________________ |
1a31a9ab | 806 | void AliAnaParticleIsolation::MakeAnalysisFillHistograms() |
807 | { | |
808 | //Do analysis and fill histograms | |
803d06a8 | 809 | Int_t n = 0, nfrac = 0; |
810 | Bool_t isolated = kFALSE ; | |
1a31a9ab | 811 | Float_t coneptsum = 0 ; |
803d06a8 | 812 | |
1a31a9ab | 813 | //Loop on stored AOD |
814 | Int_t naod = GetInputAODBranch()->GetEntriesFast(); | |
815 | if(GetDebug() > 0) printf("AliAnaParticleIsolation::MakeAnalysisFillHistograms() - Histo aod branch entries %d\n", naod); | |
816 | ||
817 | //Get vertex for photon momentum calculation | |
818 | Double_t vertex[]={0,0,0} ; //vertex ; | |
1a31a9ab | 819 | if(GetReader()->GetDataType() != AliCaloTrackReader::kMC) { |
820 | GetReader()->GetVertex(vertex); | |
1a31a9ab | 821 | } |
822 | ||
823 | for(Int_t iaod = 0; iaod < naod ; iaod++){ | |
824 | AliAODPWG4ParticleCorrelation* aod = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod)); | |
825 | ||
826 | if(!aod->IsLeadingParticle()) continue; // Try to isolate only leading cluster or track | |
827 | ||
828 | Bool_t isolation = aod->IsIsolated(); | |
803d06a8 | 829 | Bool_t decay = aod->IsTagged(); |
0fb69ade | 830 | Float_t energy = aod->E(); |
1a31a9ab | 831 | Float_t pt = aod->Pt(); |
832 | Float_t phi = aod->Phi(); | |
833 | Float_t eta = aod->Eta(); | |
834 | Float_t conesize = GetIsolationCut()->GetConeSize(); | |
835 | ||
836 | //Recover reference arrays with clusters and tracks | |
837 | TObjArray * refclusters = aod->GetObjArray(GetAODObjArrayName()+"Clusters"); | |
838 | TObjArray * reftracks = aod->GetObjArray(GetAODObjArrayName()+"Tracks"); | |
0fb69ade | 839 | |
1a31a9ab | 840 | //If too small or too large pt, skip |
841 | if(pt < GetMinPt() || pt > GetMaxPt() ) continue ; | |
842 | ||
843 | // --- In case of redoing isolation from delta AOD ---- | |
844 | if(fMakeSeveralIC) { | |
845 | //Analysis of multiple IC at same time | |
846 | MakeSeveralICAnalysis(aod); | |
847 | } | |
848 | else if(fReMakeIC){ | |
849 | //In case a more strict IC is needed in the produced AOD | |
850 | n=0; nfrac = 0; isolated = kFALSE; coneptsum = 0; | |
ac5111f9 | 851 | GetIsolationCut()->MakeIsolationCut(reftracks, refclusters, |
852 | GetReader(), GetCaloPID(), | |
853 | kFALSE, aod, "", n,nfrac,coneptsum, isolated); | |
1a31a9ab | 854 | fhConeSumPt->Fill(pt,coneptsum); |
855 | if(GetDebug() > 0) printf("AliAnaParticleIsolation::MakeAnalysisFillHistograms() - Energy Sum in Isolation Cone %2.2f\n", coneptsum); | |
856 | } | |
857 | // --- -------------------------------------------- ---- | |
858 | ||
859 | //Fill pt distribution of particles in cone | |
860 | //Tracks | |
861 | coneptsum = 0; | |
862 | Double_t sumptFR = 0. ; | |
863 | TObjArray * trackList = GetCTSTracks() ; | |
864 | for(Int_t itrack=0; itrack < trackList->GetEntriesFast(); itrack++){ | |
865 | AliVTrack* track = (AliVTrack *) trackList->At(itrack); | |
866 | //fill the histograms at forward range | |
867 | if(!track){ | |
868 | printf("AliAnaParticleIsolation::MakeAnalysisFillHistograms() - Track not available?"); | |
869 | continue; | |
870 | } | |
0fb69ade | 871 | |
1a31a9ab | 872 | Double_t dPhi = phi - track->Phi() + TMath::PiOver2(); |
873 | Double_t dEta = eta - track->Eta(); | |
874 | Double_t arg = dPhi*dPhi + dEta*dEta; | |
875 | if(TMath::Sqrt(arg) < conesize){ | |
876 | fhPtInFRCone->Fill(pt,TMath::Sqrt(track->Px()*track->Px()+track->Py()*track->Py())); | |
877 | sumptFR+=track->Pt(); | |
0fb69ade | 878 | } |
879 | ||
1a31a9ab | 880 | dPhi = phi - track->Phi() - TMath::PiOver2(); |
881 | arg = dPhi*dPhi + dEta*dEta; | |
882 | if(TMath::Sqrt(arg) < conesize){ | |
883 | fhPtInFRCone->Fill(pt,TMath::Sqrt(track->Px()*track->Px()+track->Py()*track->Py())); | |
884 | sumptFR+=track->Pt(); | |
885 | } | |
886 | } | |
0fb69ade | 887 | |
1a31a9ab | 888 | fhFRConeSumPt->Fill(pt,sumptFR); |
889 | if(reftracks){ | |
890 | for(Int_t itrack=0; itrack < reftracks->GetEntriesFast(); itrack++){ | |
891 | AliVTrack* track = (AliVTrack *) reftracks->At(itrack); | |
892 | fhPtInCone->Fill(pt,TMath::Sqrt(track->Px()*track->Px()+track->Py()*track->Py())); | |
893 | coneptsum+=track->Pt(); | |
894 | } | |
895 | } | |
896 | ||
897 | //CaloClusters | |
898 | if(refclusters){ | |
899 | TLorentzVector mom ; | |
900 | for(Int_t icalo=0; icalo < refclusters->GetEntriesFast(); icalo++){ | |
901 | AliVCluster* calo = (AliVCluster *) refclusters->At(icalo); | |
902 | calo->GetMomentum(mom,vertex) ;//Assume that come from vertex in straight line | |
903 | ||
904 | fhPtInCone->Fill(pt, mom.Pt()); | |
905 | coneptsum+=mom.Pt(); | |
906 | } | |
907 | } | |
908 | ||
909 | if(GetDebug() > 1) printf("AliAnaParticleIsolation::MakeAnalysisFillHistograms() - Particle %d Energy Sum in Isolation Cone %2.2f\n", iaod, coneptsum); | |
910 | ||
911 | if(!fReMakeIC) fhConeSumPt->Fill(pt,coneptsum); | |
912 | ||
913 | if(isolation){ | |
914 | ||
09273901 | 915 | // Fill Track matching control histograms |
916 | if(fFillTMHisto || fFillSSHisto){ | |
917 | Int_t iclus = -1; | |
918 | TObjArray* clusters = 0x0; | |
919 | if (fCalorimeter == "EMCAL")clusters = GetEMCALClusters(); | |
920 | else if(fCalorimeter == "PHOS") clusters = GetPHOSClusters(); | |
921 | if(clusters){ | |
922 | ||
923 | AliVCluster *cluster = FindCluster(clusters,aod->GetCaloLabel(0),iclus); | |
924 | ||
925 | if(fFillTMHisto){ | |
926 | Float_t dZ = cluster->GetTrackDz(); | |
927 | Float_t dR = cluster->GetTrackDx(); | |
928 | ||
929 | if(cluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn()){ | |
930 | dR = 2000., dZ = 2000.; | |
931 | GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dR,dZ); | |
932 | } | |
933 | ||
934 | //printf("ParticleIsolation: dPhi %f, dEta %f\n",dR,dZ); | |
935 | if(fhTrackMatchedDEta && TMath::Abs(dR) < 999){ | |
936 | fhTrackMatchedDEta->Fill(energy,dZ); | |
937 | fhTrackMatchedDPhi->Fill(energy,dR); | |
938 | if(energy > 0.5) fhTrackMatchedDEtaDPhi->Fill(dZ,dR); | |
939 | } | |
940 | }// TM histos fill | |
941 | ||
942 | if(fFillSSHisto) | |
943 | { | |
944 | fhELambda0 ->Fill(energy, cluster->GetM02() ); | |
945 | fhELambda1 ->Fill(energy, cluster->GetM20() ); | |
946 | } // SS histo fill | |
947 | } // clusters array available | |
948 | }// Track matching or SS histograms | |
949 | ||
1a31a9ab | 950 | if(GetDebug() > 1) printf("AliAnaParticleIsolation::MakeAnalysisFillHistograms() - Particle %d ISOLATED, fill histograms\n", iaod); |
0fb69ade | 951 | |
952 | fhEIso ->Fill(energy); | |
1a31a9ab | 953 | fhPtIso ->Fill(pt); |
954 | fhPhiIso ->Fill(pt,phi); | |
955 | fhEtaIso ->Fill(pt,eta); | |
0fb69ade | 956 | fhEtaPhiIso ->Fill(eta,phi); |
957 | ||
803d06a8 | 958 | if (decay) fhPtDecayIso->Fill(pt); |
1a31a9ab | 959 | |
960 | if(IsDataMC()){ | |
961 | Int_t tag =aod->GetTag(); | |
962 | ||
803d06a8 | 963 | if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton)) |
964 | { | |
965 | fhPtIsoMCPhoton ->Fill(pt); | |
966 | } | |
967 | ||
1a31a9ab | 968 | if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt)){ |
969 | fhPtIsoPrompt ->Fill(pt); | |
970 | fhPhiIsoPrompt ->Fill(pt,phi); | |
971 | fhEtaIsoPrompt ->Fill(pt,eta); | |
972 | } | |
973 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation)) | |
974 | { | |
975 | fhPtIsoFragmentation ->Fill(pt); | |
976 | fhPhiIsoFragmentation ->Fill(pt,phi); | |
977 | fhEtaIsoFragmentation ->Fill(pt,eta); | |
978 | } | |
979 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay)) | |
980 | { | |
981 | fhPtIsoPi0Decay ->Fill(pt); | |
982 | fhPhiIsoPi0Decay ->Fill(pt,phi); | |
983 | fhEtaIsoPi0Decay ->Fill(pt,eta); | |
984 | } | |
803d06a8 | 985 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay)) |
986 | { | |
987 | fhPtIsoEtaDecay ->Fill(pt); | |
988 | fhPhiIsoEtaDecay ->Fill(pt,phi); | |
989 | fhEtaIsoEtaDecay ->Fill(pt,eta); | |
990 | } | |
991 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay)) | |
1a31a9ab | 992 | { |
993 | fhPtIsoOtherDecay ->Fill(pt); | |
994 | fhPhiIsoOtherDecay ->Fill(pt,phi); | |
995 | fhEtaIsoOtherDecay ->Fill(pt,eta); | |
996 | } | |
997 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion)) | |
998 | { | |
999 | fhPtIsoConversion ->Fill(pt); | |
1000 | fhPhiIsoConversion ->Fill(pt,phi); | |
1001 | fhEtaIsoConversion ->Fill(pt,eta); | |
1002 | } | |
803d06a8 | 1003 | else // anything else |
1a31a9ab | 1004 | { |
1005 | fhPtIsoUnknown ->Fill(pt); | |
1006 | fhPhiIsoUnknown ->Fill(pt,phi); | |
1007 | fhEtaIsoUnknown ->Fill(pt,eta); | |
1008 | } | |
1009 | }//Histograms with MC | |
1010 | ||
1011 | }//Isolated histograms | |
1012 | ||
1013 | if(!isolation) | |
1014 | { | |
1015 | fhPtNoIso ->Fill(pt); | |
803d06a8 | 1016 | if (decay) fhPtDecayNoIso->Fill(pt); |
1a31a9ab | 1017 | |
1018 | if(IsDataMC()){ | |
1019 | Int_t tag =aod->GetTag(); | |
803d06a8 | 1020 | |
0fb69ade | 1021 | if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton)) |
803d06a8 | 1022 | { |
1023 | fhPtNoIsoMCPhoton->Fill(pt); | |
1024 | } | |
1025 | ||
0fb69ade | 1026 | if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay)) |
1a31a9ab | 1027 | { |
1028 | fhPtNoIsoPi0Decay->Fill(pt); | |
1029 | } | |
803d06a8 | 1030 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay)) |
1a31a9ab | 1031 | { |
803d06a8 | 1032 | fhPtNoIsoEtaDecay->Fill(pt); |
1a31a9ab | 1033 | } |
803d06a8 | 1034 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay)) |
1a31a9ab | 1035 | { |
803d06a8 | 1036 | fhPtNoIsoOtherDecay->Fill(pt); |
1037 | } | |
1038 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt)) | |
1039 | { | |
1040 | fhPtNoIsoPrompt->Fill(pt); | |
1a31a9ab | 1041 | } |
0fb69ade | 1042 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation)) |
1043 | { | |
1044 | fhPtNoIsoFragmentation->Fill(pt); | |
1045 | } | |
1046 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion)) | |
1047 | { | |
1048 | fhPtNoIsoConversion->Fill(pt); | |
1049 | } | |
1050 | else | |
1051 | { | |
1052 | fhPtNoIsoUnknown->Fill(pt); | |
1053 | } | |
1a31a9ab | 1054 | |
1055 | } | |
1056 | } | |
1057 | ||
1058 | }// aod loop | |
1059 | ||
1060 | } | |
1061 | ||
1a31a9ab | 1062 | |
803d06a8 | 1063 | //_____________________________________________________________________________________ |
1a31a9ab | 1064 | void AliAnaParticleIsolation::MakeSeveralICAnalysis(AliAODPWG4ParticleCorrelation* ph) |
1065 | { | |
1066 | //Isolation Cut Analysis for both methods and different pt cuts and cones | |
1067 | Float_t ptC = ph->Pt(); | |
1068 | Int_t tag = ph->GetTag(); | |
1069 | ||
1070 | //Keep original setting used when filling AODs, reset at end of analysis | |
1071 | Float_t ptthresorg = GetIsolationCut()->GetPtThreshold(); | |
1072 | Float_t ptfracorg = GetIsolationCut()->GetPtFraction(); | |
1073 | Float_t rorg = GetIsolationCut()->GetConeSize(); | |
1074 | ||
1075 | Float_t coneptsum = 0 ; | |
1076 | Int_t n[10][10];//[fNCones][fNPtThresFrac]; | |
1077 | Int_t nfrac[10][10];//[fNCones][fNPtThresFrac]; | |
1078 | Bool_t isolated = kFALSE; | |
1079 | ||
1080 | //Loop on cone sizes | |
1081 | for(Int_t icone = 0; icone<fNCones; icone++){ | |
1082 | GetIsolationCut()->SetConeSize(fConeSizes[icone]); | |
1083 | coneptsum = 0 ; | |
1084 | ||
1085 | //Loop on ptthresholds | |
1086 | for(Int_t ipt = 0; ipt<fNPtThresFrac ;ipt++){ | |
1087 | n[icone][ipt]=0; | |
1088 | nfrac[icone][ipt]=0; | |
1089 | GetIsolationCut()->SetPtThreshold(fPtThresholds[ipt]); | |
1090 | GetIsolationCut()->MakeIsolationCut(ph->GetObjArray(GetAODObjArrayName()+"Tracks"), | |
1091 | ph->GetObjArray(GetAODObjArrayName()+"Clusters"), | |
ac5111f9 | 1092 | GetReader(), GetCaloPID(), |
1093 | kFALSE, ph, "",n[icone][ipt],nfrac[icone][ipt],coneptsum, isolated); | |
1a31a9ab | 1094 | |
1095 | //Normal ptThreshold cut | |
1096 | if(n[icone][ipt] == 0) { | |
1097 | fhPtThresIsolated[icone][ipt]->Fill(ptC); | |
1098 | if(IsDataMC()){ | |
803d06a8 | 1099 | if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt)) fhPtThresIsolatedPrompt[icone][ipt] ->Fill(ptC) ; |
1100 | else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion)) fhPtThresIsolatedConversion[icone][ipt] ->Fill(ptC) ; | |
1101 | else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation)) fhPtThresIsolatedFragmentation[icone][ipt]->Fill(ptC) ; | |
1102 | else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay)) fhPtThresIsolatedPi0Decay[icone][ipt] ->Fill(ptC) ; | |
1103 | else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay)) fhPtThresIsolatedEtaDecay[icone][ipt] ->Fill(ptC) ; | |
1104 | else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay)) fhPtThresIsolatedOtherDecay[icone][ipt] ->Fill(ptC) ; | |
1a31a9ab | 1105 | else fhPtThresIsolatedUnknown[icone][ipt]->Fill(ptC) ; |
1106 | } | |
1107 | } | |
1108 | ||
1109 | //Pt threshold on pt cand/ pt in cone fraction | |
1110 | if(nfrac[icone][ipt] == 0) { | |
1111 | fhPtFracIsolated[icone][ipt]->Fill(ptC); | |
1112 | if(IsDataMC()){ | |
803d06a8 | 1113 | if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt)) fhPtFracIsolatedPrompt[icone][ipt] ->Fill(ptC) ; |
1114 | else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion)) fhPtFracIsolatedConversion[icone][ipt] ->Fill(ptC) ; | |
1115 | else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation)) fhPtFracIsolatedFragmentation[icone][ipt]->Fill(ptC) ; | |
1116 | else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay)) fhPtFracIsolatedPi0Decay[icone][ipt] ->Fill(ptC) ; | |
1117 | else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay)) fhPtFracIsolatedEtaDecay[icone][ipt] ->Fill(ptC) ; | |
1118 | else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay)) fhPtFracIsolatedOtherDecay[icone][ipt] ->Fill(ptC) ; | |
1a31a9ab | 1119 | else fhPtFracIsolatedUnknown[icone][ipt]->Fill(ptC) ; |
1120 | } | |
1121 | } | |
1122 | }//pt thresh loop | |
1123 | ||
1124 | //Sum in cone histograms | |
1125 | fhPtSumIsolated[icone]->Fill(ptC,coneptsum) ; | |
1126 | if(IsDataMC()){ | |
803d06a8 | 1127 | if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt)) fhPtSumIsolatedPrompt[icone] ->Fill(ptC,coneptsum) ; |
1128 | else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion)) fhPtSumIsolatedConversion[icone] ->Fill(ptC,coneptsum) ; | |
1129 | else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation)) fhPtSumIsolatedFragmentation[icone]->Fill(ptC,coneptsum) ; | |
1130 | else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay)) fhPtSumIsolatedPi0Decay[icone] ->Fill(ptC,coneptsum) ; | |
1131 | else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay)) fhPtSumIsolatedEtaDecay[icone] ->Fill(ptC,coneptsum) ; | |
1132 | else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay)) fhPtSumIsolatedOtherDecay[icone] ->Fill(ptC,coneptsum) ; | |
1a31a9ab | 1133 | else fhPtSumIsolatedUnknown[icone]->Fill(ptC,coneptsum) ; |
1134 | } | |
1135 | ||
1136 | }//cone size loop | |
1137 | ||
1138 | //Reset original parameters for AOD analysis | |
1139 | GetIsolationCut()->SetPtThreshold(ptthresorg); | |
1140 | GetIsolationCut()->SetPtFraction(ptfracorg); | |
1141 | GetIsolationCut()->SetConeSize(rorg); | |
1142 | ||
1143 | } | |
1144 | ||
803d06a8 | 1145 | //_____________________________________________________________ |
1a31a9ab | 1146 | void AliAnaParticleIsolation::Print(const Option_t * opt) const |
1147 | { | |
1148 | ||
1149 | //Print some relevant parameters set for the analysis | |
1150 | if(! opt) | |
1151 | return; | |
1152 | ||
1153 | printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ; | |
745913ae | 1154 | AliAnaCaloTrackCorrBaseClass::Print(" "); |
1a31a9ab | 1155 | |
1156 | printf("ReMake Isolation = %d \n", fReMakeIC) ; | |
1157 | printf("Make Several Isolation = %d \n", fMakeSeveralIC) ; | |
1158 | printf("Calorimeter for isolation = %s \n", fCalorimeter.Data()) ; | |
1159 | ||
1160 | if(fMakeSeveralIC){ | |
1161 | printf("N Cone Sizes = %d\n", fNCones) ; | |
1162 | printf("Cone Sizes = \n") ; | |
1163 | for(Int_t i = 0; i < fNCones; i++) | |
1164 | printf(" %1.2f;", fConeSizes[i]) ; | |
1165 | printf(" \n") ; | |
1166 | ||
1167 | printf("N pT thresholds/fractions = %d\n", fNPtThresFrac) ; | |
1168 | printf(" pT thresholds = \n") ; | |
1169 | for(Int_t i = 0; i < fNPtThresFrac; i++) | |
1170 | printf(" %2.2f;", fPtThresholds[i]) ; | |
1171 | ||
1172 | printf(" \n") ; | |
1173 | ||
1174 | printf(" pT fractions = \n") ; | |
1175 | for(Int_t i = 0; i < fNPtThresFrac; i++) | |
1176 | printf(" %2.2f;", fPtFractions[i]) ; | |
1177 | ||
1178 | } | |
1179 | ||
1180 | printf("Histograms: %3.1f < pT sum < %3.1f, Nbin = %d\n", fHistoPtSumMin, fHistoPtSumMax, fHistoNPtSumBins); | |
1181 | printf("Histograms: %3.1f < pT in cone < %3.1f, Nbin = %d\n", fHistoPtInConeMin, fHistoPtInConeMax, fHistoNPtInConeBins); | |
1182 | ||
1183 | printf(" \n") ; | |
1184 | ||
1185 | } | |
1186 |