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