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