]>
Commit | Line | Data |
---|---|---|
cf6522d1 | 1 | //_________________________________________________________________________ |
2 | // Utility Class for transverse energy studies | |
3 | // Base class for MC analysis | |
4 | // - MC output | |
5 | // implementation file | |
6 | // | |
7 | //*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL) | |
e2ee5727 | 8 | //_________________________________________________________________________ |
cf6522d1 | 9 | |
2fbf38ac | 10 | #include "AliAnalysisEtMonteCarlo.h" |
11 | #include "AliAnalysisEtCuts.h" | |
f61cec2f | 12 | #include "AliAnalysisEtSelector.h" |
13 | #include "AliAnalysisEtSelector.h" | |
13b0d3c1 | 14 | #include "AliESDtrack.h" |
2fbf38ac | 15 | #include "AliStack.h" |
0651f6b4 | 16 | #include "AliVEvent.h" |
2fbf38ac | 17 | #include "AliMCEvent.h" |
0651f6b4 | 18 | #include "AliESDEvent.h" |
13b0d3c1 | 19 | #include "TH2F.h" |
e2ee5727 | 20 | #include "TH3F.h" |
cf6522d1 | 21 | #include "TParticle.h" |
ce546038 | 22 | #include "AliGenHijingEventHeader.h" |
23 | #include "AliGenPythiaEventHeader.h" | |
0651f6b4 | 24 | #include "TList.h" |
25 | #include "AliESDCaloCluster.h" | |
0f6416f3 | 26 | #include "AliLog.h" |
e2ee5727 | 27 | #include <iostream> |
28 | #include <AliCentrality.h> | |
ef647350 | 29 | #include "AliPHOSGeoUtils.h" |
30 | #include "AliPHOSGeometry.h" | |
31 | #include "TFile.h" | |
c79c36cc | 32 | #include "AliESDtrackCuts.h" |
e2ee5727 | 33 | using namespace std; |
16abb579 | 34 | |
35 | ClassImp(AliAnalysisEtMonteCarlo); | |
36 | ||
37 | ||
ce546038 | 38 | // ctor |
0651f6b4 | 39 | AliAnalysisEtMonteCarlo::AliAnalysisEtMonteCarlo():AliAnalysisEt() |
c79c36cc | 40 | ,fIsMC(kTRUE) |
f61cec2f | 41 | ,fImpactParameter(0) |
42 | ,fNcoll(0) | |
43 | ,fNpart(0) | |
44 | ,fPrimaryTree(0) | |
45 | ,fTotEtWithSecondaryRemoved(0) | |
46 | ,fTotEtSecondaryFromEmEtPrimary(0) | |
47 | ,fTotEtSecondary(0) | |
48 | ,fPrimaryCode(0) | |
49 | ,fPrimaryCharge(0) | |
50 | ,fPrimaryE(0) | |
51 | ,fPrimaryEt(0) | |
52 | ,fPrimaryPx(0) | |
53 | ,fPrimaryPy(0) | |
54 | ,fPrimaryPz(0) | |
55 | ,fPrimaryVx(0) | |
56 | ,fPrimaryVy(0) | |
57 | ,fPrimaryVz(0) | |
58 | ,fPrimaryAccepted(0) | |
b2c10007 | 59 | ,fPrimaryMatched(0) |
f61cec2f | 60 | ,fDepositedCode(0) |
b2c10007 | 61 | ,fDepositedE(0) |
f61cec2f | 62 | ,fDepositedEt(0) |
63 | ,fDepositedCharge(0) | |
64 | ,fDepositedVx(0) | |
65 | ,fDepositedVy(0) | |
66 | ,fDepositedVz(0) | |
b2c10007 | 67 | ,fSecondary(kFALSE) |
68 | ,fReconstructedE(0) | |
69 | ,fReconstructedEt(0) | |
70 | ,fTotPx(0) | |
71 | ,fTotPy(0) | |
72 | ,fTotPz(0) | |
73 | ,fClusterMult(0) | |
f61cec2f | 74 | ,fHistDecayVertexNonRemovedCharged(0) |
75 | ,fHistDecayVertexRemovedCharged(0) | |
76 | ,fHistDecayVertexNonRemovedNeutral(0) | |
77 | ,fHistDecayVertexRemovedNeutral(0) | |
78 | ||
79 | ,fHistRemovedOrNot(0) | |
80 | ,fHistEtNonRemovedProtons(0) | |
81 | ,fHistEtNonRemovedAntiProtons(0) | |
82 | ,fHistEtNonRemovedPiPlus(0) | |
83 | ,fHistEtNonRemovedPiMinus(0) | |
84 | ,fHistEtNonRemovedKaonPlus(0) | |
85 | ,fHistEtNonRemovedKaonMinus(0) | |
86 | ,fHistEtNonRemovedK0s(0) | |
87 | ,fHistEtNonRemovedK0L(0) | |
88 | ,fHistEtNonRemovedLambdas(0) | |
89 | ,fHistEtNonRemovedElectrons(0) | |
90 | ,fHistEtNonRemovedPositrons(0) | |
91 | ,fHistEtNonRemovedMuPlus(0) | |
92 | ,fHistEtNonRemovedMuMinus(0) | |
93 | ,fHistEtNonRemovedNeutrons(0) | |
94 | ,fHistEtNonRemovedAntiNeutrons(0) | |
95 | ,fHistEtNonRemovedGammas(0) | |
96 | ,fHistEtNonRemovedGammasFromPi0(0) | |
97 | ,fHistEtRemovedGammas(0) | |
98 | ,fHistEtRemovedNeutrons(0) | |
99 | ,fHistEtRemovedAntiNeutrons(0) | |
100 | ,fHistEtRemovedCharged(0) | |
101 | ,fHistEtRemovedNeutrals(0) | |
102 | ,fHistEtNonRemovedCharged(0) | |
103 | ,fHistEtNonRemovedNeutrals(0) | |
104 | ,fHistMultNonRemovedProtons(0) | |
105 | ,fHistMultNonRemovedAntiProtons(0) | |
106 | ,fHistMultNonRemovedPiPlus(0) | |
107 | ,fHistMultNonRemovedPiMinus(0) | |
108 | ,fHistMultNonRemovedKaonPlus(0) | |
109 | ,fHistMultNonRemovedKaonMinus(0) | |
110 | ,fHistMultNonRemovedK0s(0) | |
111 | ,fHistMultNonRemovedK0L(0) | |
112 | ,fHistMultNonRemovedLambdas(0) | |
113 | ,fHistMultNonRemovedElectrons(0) | |
114 | ,fHistMultNonRemovedPositrons(0) | |
115 | ,fHistMultNonRemovedMuPlus(0) | |
116 | ,fHistMultNonRemovedMuMinus(0) | |
117 | ,fHistMultNonRemovedNeutrons(0) | |
118 | ,fHistMultNonRemovedAntiNeutrons(0) | |
119 | ,fHistMultNonRemovedGammas(0) | |
120 | ,fHistMultRemovedGammas(0) | |
121 | ,fHistMultRemovedNeutrons(0) | |
122 | ,fHistMultRemovedAntiNeutrons(0) | |
123 | ,fHistMultRemovedCharged(0) | |
124 | ,fHistMultRemovedNeutrals(0) | |
125 | ,fHistMultNonRemovedCharged(0) | |
126 | ,fHistMultNonRemovedNeutrals(0) | |
127 | ,fHistTrackMultvsNonRemovedCharged(0) | |
128 | ,fHistTrackMultvsNonRemovedNeutral(0) | |
129 | ,fHistTrackMultvsRemovedGamma(0) | |
130 | ,fHistClusterMultvsNonRemovedCharged(0) | |
131 | ,fHistClusterMultvsNonRemovedNeutral(0) | |
132 | ,fHistClusterMultvsRemovedGamma(0) | |
133 | ,fHistMultvsNonRemovedChargedE(0) | |
134 | ,fHistMultvsNonRemovedNeutralE(0) | |
03bfd268 | 135 | ,fHistMultvsRemovedGammaE(0) |
0861cc1f | 136 | ,fCalcForKaonCorrection(kFALSE) |
137 | ,fHistK0EDepositsVsPtInAcceptance(0) | |
138 | ,fHistK0EGammaVsPtInAcceptance(0) | |
139 | ,fHistK0EDepositsVsPtOutOfAcceptance(0) | |
140 | ,fHistK0EGammaVsPtOutOfAcceptance(0) | |
141 | ,fHistSimKaonsInAcceptance(0) | |
142 | ,fHistSimK0SInAcceptance(0) | |
143 | ,fHistSimKPlusInAcceptance(0) | |
144 | ,fHistSimKMinusInAcceptance(0) | |
145 | ,fHistSimK0LInAcceptance(0) | |
146 | ,fHistSimKaonsOutOfAcceptance(0) | |
147 | ,fHistSimKaonsInAcceptanceWithDepositsPrimaries(0) | |
148 | ,fHistSimKaonsOutOfAcceptanceWithDepositsSecondaries(0) | |
149 | ,fHistSimKaonsOutOfAcceptanceWithDepositsPrimaries(0) | |
f61cec2f | 150 | ,fEtNonRemovedProtons(0) |
151 | ,fEtNonRemovedAntiProtons(0) | |
152 | ,fEtNonRemovedPiPlus(0) | |
153 | ,fEtNonRemovedPiMinus(0) | |
154 | ,fEtNonRemovedKaonPlus(0) | |
155 | ,fEtNonRemovedKaonMinus(0) | |
156 | ,fEtNonRemovedK0S(0) | |
157 | ,fEtNonRemovedK0L(0) | |
158 | ,fEtNonRemovedLambdas(0) | |
159 | ,fEtNonRemovedElectrons(0) | |
160 | ,fEtNonRemovedPositrons(0) | |
161 | ,fEtNonRemovedMuMinus(0) | |
162 | ,fEtNonRemovedMuPlus(0) | |
163 | ,fEtNonRemovedGammas(0) | |
164 | ,fEtNonRemovedGammasFromPi0(0) | |
165 | ,fEtNonRemovedNeutrons(0) | |
166 | ,fEtNonRemovedAntiNeutrons(0) | |
167 | ,fEtRemovedProtons(0) | |
168 | ,fEtRemovedAntiProtons(0) | |
169 | ,fEtRemovedPiPlus(0) | |
170 | ,fEtRemovedPiMinus(0) | |
171 | ,fEtRemovedKaonPlus(0) | |
172 | ,fEtRemovedKaonMinus(0) | |
173 | ,fEtRemovedK0s(0) | |
174 | ,fEtRemovedK0L(0) | |
175 | ,fEtRemovedLambdas(0) | |
176 | ,fEtRemovedElectrons(0) | |
177 | ,fEtRemovedPositrons(0) | |
178 | ,fEtRemovedMuMinus(0) | |
179 | ,fEtRemovedMuPlus(0) | |
180 | ,fEtRemovedGammasFromPi0(0) | |
181 | ,fEtRemovedGammas(0) | |
182 | ,fEtRemovedNeutrons(0) | |
183 | ,fEtRemovedAntiNeutrons(0) | |
184 | ,fMultNonRemovedProtons(0) | |
185 | ,fMultNonRemovedAntiProtons(0) | |
186 | ,fMultNonRemovedPiPlus(0) | |
187 | ,fMultNonRemovedPiMinus(0) | |
188 | ,fMultNonRemovedKaonPlus(0) | |
189 | ,fMultNonRemovedKaonMinus(0) | |
190 | ,fMultNonRemovedK0s(0) | |
191 | ,fMultNonRemovedK0L(0) | |
192 | ,fMultNonRemovedLambdas(0) | |
193 | ,fMultNonRemovedElectrons(0) | |
194 | ,fMultNonRemovedPositrons(0) | |
195 | ,fMultNonRemovedMuMinus(0) | |
196 | ,fMultNonRemovedMuPlus(0) | |
197 | ,fMultNonRemovedGammas(0) | |
198 | ,fMultNonRemovedNeutrons(0) | |
199 | ,fMultNonRemovedAntiNeutrons(0) | |
200 | ,fMultRemovedProtons(0) | |
201 | ,fMultRemovedAntiProtons(0) | |
202 | ,fMultRemovedPiPlus(0) | |
203 | ,fMultRemovedPiMinus(0) | |
204 | ,fMultRemovedKaonPlus(0) | |
205 | ,fMultRemovedKaonMinus(0) | |
206 | ,fMultRemovedK0s(0) | |
207 | ,fMultRemovedK0L(0) | |
208 | ,fMultRemovedLambdas(0) | |
209 | ,fMultRemovedElectrons(0) | |
210 | ,fMultRemovedPositrons(0) | |
211 | ,fMultRemovedMuMinus(0) | |
212 | ,fMultRemovedMuPlus(0) | |
213 | ,fMultRemovedGammas(0) | |
214 | ,fMultRemovedNeutrons(0) | |
215 | ,fMultRemovedAntiNeutrons(0) | |
216 | ,fTrackMultInAcc(0) | |
217 | ,fHistDxDzNonRemovedCharged(0) | |
218 | ,fHistDxDzRemovedCharged(0) | |
219 | ,fHistDxDzNonRemovedNeutral(0) | |
220 | ,fHistDxDzRemovedNeutral(0) | |
221 | ,fHistPiPlusMult(0) | |
222 | ,fHistPiMinusMult(0) | |
223 | ,fHistPiZeroMult(0) | |
224 | ,fHistPiPlusMultAcc(0) | |
225 | ,fHistPiMinusMultAcc(0) | |
226 | ,fHistPiZeroMultAcc(0) | |
b2c10007 | 227 | // ,fPiPlusMult(0) |
228 | // ,fPiMinusMult(0) | |
f61cec2f | 229 | ,fPiZeroMult(0) |
230 | ,fPiPlusMultAcc(0) | |
231 | ,fPiMinusMultAcc(0) | |
232 | ,fPiZeroMultAcc(0) | |
233 | ,fNeutralRemoved(0) | |
234 | ,fChargedRemoved(0) | |
235 | ,fChargedNotRemoved(0) | |
236 | ,fNeutralNotRemoved(0) | |
b2c10007 | 237 | ,fGammaRemoved(0) |
238 | ,fSecondaryNotRemoved(0) | |
f61cec2f | 239 | ,fEnergyNeutralRemoved(0) |
240 | ,fEnergyChargedRemoved(0) | |
241 | ,fEnergyChargedNotRemoved(0) | |
242 | ,fEnergyNeutralNotRemoved(0) | |
b2c10007 | 243 | ,fEnergyGammaRemoved(0) |
f61cec2f | 244 | ,fNClusters(0) |
245 | ,fTotNeutralEtAfterMinEnergyCut(0) | |
0861cc1f | 246 | ,fCalcTrackMatchVsMult(kFALSE) |
247 | ,fHistGammasFound(0) | |
9ef6f13f | 248 | ,fHistGammasGenerated(0) |
5881f036 | 249 | ,fHistGammasFoundCent(0) |
9a365626 | 250 | ,fHistGammasFoundOutOfAccCent(0) |
5881f036 | 251 | ,fHistGammasGeneratedCent(0) |
9ef6f13f | 252 | ,fHistChargedTracksCut(0) |
253 | ,fHistChargedTracksAccepted(0) | |
254 | ,fHistGammasCut(0) | |
255 | ,fHistGammasAccepted(0) | |
0861cc1f | 256 | ,fHistChargedTracksCutMult(0) |
257 | ,fHistChargedTracksAcceptedMult(0) | |
ac610b08 | 258 | ,fHistChargedTracksAcceptedLowPtCent(0) |
5881f036 | 259 | ,fHistChargedTracksAcceptedLowPtCent500MeV(0) |
ac610b08 | 260 | ,fHistChargedTracksAcceptedLowPtCentNoAntiProtons(0) |
261 | ,fHistChargedTracksAcceptedLowPtCentAntiProtons(0) | |
0861cc1f | 262 | ,fHistGammasCutMult(0) |
263 | ,fHistGammasAcceptedMult(0) | |
9ef6f13f | 264 | ,fHistBadTrackMatches(0) |
265 | ,fHistMatchedTracksEvspTBkgd(0) | |
266 | ,fHistMatchedTracksEvspTSignal(0) | |
267 | ,fHistMatchedTracksEvspTBkgdPeripheral(0) | |
268 | ,fHistMatchedTracksEvspTSignalPeripheral(0) | |
ac610b08 | 269 | ,fHistMatchedTracksEvspTBkgdvsCent(0) |
270 | ,fHistMatchedTracksEvspTSignalvsCent(0) | |
271 | ,fHistMatchedTracksEvspTBkgdvsCentEffCorr(0) | |
272 | ,fHistMatchedTracksEvspTSignalvsCentEffCorr(0) | |
0861cc1f | 273 | |
9ef6f13f | 274 | ,fHistChargedTracksCutPeripheral(0) |
275 | ,fHistChargedTracksAcceptedPeripheral(0) | |
276 | ,fHistGammasCutPeripheral(0) | |
277 | ,fHistGammasAcceptedPeripheral(0) | |
278 | ,fHistBadTrackMatchesdPhidEta(0) | |
279 | ,fHistGoodTrackMatchesdPhidEta(0) | |
c79c36cc | 280 | ,fHistHadronDepositsAll(0) |
281 | ,fHistHadronDepositsReco(0) | |
ac610b08 | 282 | ,fHistHadronDepositsAllCent(0) |
5881f036 | 283 | ,fHistHadronDepositsAllCent500MeV(0) |
ac610b08 | 284 | ,fHistHadronDepositsRecoCent(0) |
285 | ,fHistHadronsAllCent(0) | |
d3ce32b8 | 286 | ,fHistMultChVsSignalVsMult(0) |
9a365626 | 287 | ,fHistNeutralRemovedSecondaryEtVsCent(0) |
288 | ,fHistChargedRemovedSecondaryEtVsCent(0) | |
289 | ,fHistNeutralNotRemovedSecondaryEtVsCent(0) | |
290 | ,fHistChargedNotRemovedSecondaryEtVsCent(0) | |
291 | ,fHistNeutralRemovedSecondaryNumVsNCluster(0) | |
292 | ,fHistChargedRemovedSecondaryNumVsNCluster(0) | |
293 | ,fHistNeutralNotRemovedSecondaryNumVsNCluster(0) | |
294 | ,fHistChargedNotRemovedSecondaryNumVsNCluster(0) | |
295 | ,fHistNeutralRemovedSecondaryNumVsCent(0) | |
296 | ,fHistChargedRemovedSecondaryNumVsCent(0) | |
297 | ,fHistNeutralNotRemovedSecondaryNumVsCent(0) | |
298 | ,fHistChargedNotRemovedSecondaryNumVsCent(0) | |
299 | ,fHistNeutronsEtVsCent(0) | |
300 | ,fHistNeutronsNumVsCent(0) | |
301 | ,fHistNotNeutronsNumVsCent(0) | |
302 | ,fHistPiKPDepositedVsNch(0) | |
303 | ,fHistPiKPNotTrackMatchedDepositedVsNch(0) | |
304 | ,fHistNeutronsDepositedVsNch(0) | |
305 | ,fHistAntiNeutronsDepositedVsNch(0) | |
306 | ,fHistProtonsDepositedVsNch(0) | |
307 | ,fHistAntiProtonsDepositedVsNch(0) | |
308 | ,fHistProtonsNotTrackMatchedDepositedVsNch(0) | |
309 | ,fHistAntiProtonsNotTrackMatchedDepositedVsNch(0) | |
310 | ,fHistSecondariesVsNch(0) | |
311 | ,fHistSecondariesVsNcl(0) | |
312 | ,fHistSecondariesEffCorrVsNch(0) | |
313 | ,fHistSecondariesEffCorrVsNcl(0) | |
b986cebe | 314 | ,fHistSecondariesOutOfAccEffCorrVsNch(0) |
315 | ,fHistSecondariesDetectorCoverEffCorrVsNch(0) | |
9a365626 | 316 | ,fHistCentVsNchVsNcl(0) |
b986cebe | 317 | //,fHistSecondaryPositionInDetector(0) |
32503dac | 318 | ,fClusterPositionWeird(0) |
b986cebe | 319 | //,fHistSecondaryPositionInDetectorMultiple(0) |
320 | ,fSecondaryClusterEnergy(0) | |
ce546038 | 321 | { |
322 | } | |
323 | ||
324 | // dtor | |
e2ee5727 | 325 | AliAnalysisEtMonteCarlo::~AliAnalysisEtMonteCarlo() |
f61cec2f | 326 | { //Destructor |
311c6540 | 327 | |
328 | if(fPrimaryTree){ | |
329 | fPrimaryTree->Clear(); | |
330 | delete fPrimaryTree; | |
331 | } | |
f61cec2f | 332 | delete fHistDecayVertexNonRemovedCharged; // Decay vertex for non-removed charged particles |
333 | delete fHistDecayVertexRemovedCharged; // Decay vertex for non-removed charged particles | |
334 | delete fHistDecayVertexNonRemovedNeutral; // Decay vertex for non-removed charged particles | |
335 | delete fHistDecayVertexRemovedNeutral; // Decay vertex for non-removed charged particles | |
336 | ||
337 | delete fHistRemovedOrNot; // If charged/neutral particles were removed or not | |
338 | ||
339 | delete fHistEtNonRemovedProtons; // enter comment here | |
340 | delete fHistEtNonRemovedAntiProtons; // enter comment here | |
341 | delete fHistEtNonRemovedPiPlus; // enter comment here | |
342 | delete fHistEtNonRemovedPiMinus; // enter comment here | |
343 | delete fHistEtNonRemovedKaonPlus; // enter comment here | |
344 | delete fHistEtNonRemovedKaonMinus; // enter comment here | |
345 | delete fHistEtNonRemovedK0s; // enter comment here | |
346 | delete fHistEtNonRemovedK0L; // enter comment here | |
347 | delete fHistEtNonRemovedLambdas; // enter comment here | |
348 | delete fHistEtNonRemovedElectrons; // enter comment here | |
349 | delete fHistEtNonRemovedPositrons; // enter comment here | |
350 | delete fHistEtNonRemovedMuPlus; // enter comment here | |
351 | delete fHistEtNonRemovedMuMinus; // enter comment here | |
352 | delete fHistEtNonRemovedNeutrons; // enter comment here | |
353 | delete fHistEtNonRemovedAntiNeutrons; // enter comment here | |
354 | delete fHistEtNonRemovedGammas; // enter comment here | |
355 | delete fHistEtNonRemovedGammasFromPi0; // enter comment here | |
356 | ||
357 | delete fHistEtRemovedGammas; // enter comment here | |
358 | delete fHistEtRemovedNeutrons; // enter comment here | |
359 | delete fHistEtRemovedAntiNeutrons; // enter comment here | |
360 | ||
361 | ||
362 | delete fHistMultNonRemovedProtons; // enter comment here | |
363 | delete fHistMultNonRemovedAntiProtons; // enter comment here | |
364 | delete fHistMultNonRemovedPiPlus; // enter comment here | |
365 | delete fHistMultNonRemovedPiMinus; // enter comment here | |
366 | delete fHistMultNonRemovedKaonPlus; // enter comment here | |
367 | delete fHistMultNonRemovedKaonMinus; // enter comment here | |
368 | delete fHistMultNonRemovedK0s; // enter comment here | |
369 | delete fHistMultNonRemovedK0L; // enter comment here | |
370 | delete fHistMultNonRemovedLambdas; // enter comment here | |
371 | delete fHistMultNonRemovedElectrons; // enter comment here | |
372 | delete fHistMultNonRemovedPositrons; // enter comment here | |
373 | delete fHistMultNonRemovedMuPlus; // enter comment here | |
374 | delete fHistMultNonRemovedMuMinus; // enter comment here | |
375 | delete fHistMultNonRemovedNeutrons; // enter comment here | |
376 | delete fHistMultNonRemovedAntiNeutrons; // enter comment here | |
377 | delete fHistMultNonRemovedGammas; // enter comment here | |
378 | ||
379 | delete fHistMultRemovedGammas; // enter comment here | |
380 | delete fHistMultRemovedNeutrons; // enter comment here | |
381 | delete fHistMultRemovedAntiNeutrons; // enter comment here | |
382 | ||
383 | delete fHistTrackMultvsNonRemovedCharged; // enter comment here | |
384 | delete fHistTrackMultvsNonRemovedNeutral; // enter comment here | |
385 | delete fHistTrackMultvsRemovedGamma; // enter comment here | |
386 | ||
387 | delete fHistClusterMultvsNonRemovedCharged; // enter comment here | |
388 | delete fHistClusterMultvsNonRemovedNeutral; // enter comment here | |
389 | delete fHistClusterMultvsRemovedGamma; // enter comment here | |
390 | ||
391 | delete fHistMultvsNonRemovedChargedE; // enter comment here | |
392 | delete fHistMultvsNonRemovedNeutralE; // enter comment here | |
393 | delete fHistMultvsRemovedGammaE; // enter comment here | |
0861cc1f | 394 | delete fHistK0EDepositsVsPtInAcceptance;//enter comment here |
395 | delete fHistK0EGammaVsPtInAcceptance;//enter comment here | |
396 | delete fHistK0EDepositsVsPtOutOfAcceptance; | |
397 | delete fHistK0EGammaVsPtOutOfAcceptance; | |
398 | ||
399 | delete fHistSimKaonsInAcceptance; | |
400 | delete fHistSimK0SInAcceptance; | |
401 | delete fHistSimKPlusInAcceptance; | |
402 | delete fHistSimKMinusInAcceptance; | |
403 | delete fHistSimK0LInAcceptance; | |
404 | delete fHistSimKaonsOutOfAcceptance; | |
405 | delete fHistSimKaonsInAcceptanceWithDepositsPrimaries; | |
406 | delete fHistSimKaonsOutOfAcceptanceWithDepositsSecondaries; | |
407 | delete fHistSimKaonsOutOfAcceptanceWithDepositsPrimaries; | |
2aab9269 | 408 | |
f61cec2f | 409 | delete fHistDxDzNonRemovedCharged; // enter comment here |
410 | delete fHistDxDzRemovedCharged; // enter comment here | |
411 | delete fHistDxDzNonRemovedNeutral; // enter comment here | |
412 | delete fHistDxDzRemovedNeutral; // enter comment here | |
413 | ||
414 | delete fHistPiPlusMult; // enter comment here | |
415 | delete fHistPiMinusMult; // enter comment here | |
416 | delete fHistPiZeroMult; // enter comment here | |
417 | ||
418 | delete fHistPiPlusMultAcc; // enter comment here | |
419 | delete fHistPiMinusMultAcc; // enter comment here | |
420 | delete fHistPiZeroMultAcc; // enter comment here | |
4503e29d | 421 | delete fHistGammasFound; // enter comment here |
422 | delete fHistGammasGenerated; // enter comment here | |
9a365626 | 423 | delete fHistGammasFoundOutOfAccCent; // enter comment here |
5881f036 | 424 | delete fHistGammasFoundCent; // enter comment here |
425 | delete fHistGammasGeneratedCent; // enter comment here | |
9ef6f13f | 426 | delete fHistChargedTracksCut; |
427 | delete fHistChargedTracksAccepted; | |
428 | delete fHistGammasCut; | |
429 | delete fHistGammasAccepted; | |
0861cc1f | 430 | delete fHistChargedTracksCutMult; |
431 | delete fHistChargedTracksAcceptedMult; | |
ac610b08 | 432 | delete fHistChargedTracksAcceptedLowPtCent; |
5881f036 | 433 | delete fHistChargedTracksAcceptedLowPtCent500MeV; |
ac610b08 | 434 | delete fHistChargedTracksAcceptedLowPtCentNoAntiProtons; |
435 | delete fHistChargedTracksAcceptedLowPtCentAntiProtons; | |
0861cc1f | 436 | delete fHistGammasCutMult; |
437 | delete fHistGammasAcceptedMult; | |
9ef6f13f | 438 | delete fHistBadTrackMatches; |
439 | delete fHistMatchedTracksEvspTBkgd; | |
440 | delete fHistMatchedTracksEvspTSignal; | |
441 | delete fHistMatchedTracksEvspTBkgdPeripheral; | |
442 | delete fHistMatchedTracksEvspTSignalPeripheral; | |
ac610b08 | 443 | delete fHistMatchedTracksEvspTBkgdvsCent; |
444 | delete fHistMatchedTracksEvspTSignalvsCent; | |
445 | delete fHistMatchedTracksEvspTBkgdvsCentEffCorr; | |
446 | delete fHistMatchedTracksEvspTSignalvsCentEffCorr; | |
9ef6f13f | 447 | delete fHistChargedTracksCutPeripheral; |
448 | delete fHistChargedTracksAcceptedPeripheral; | |
449 | delete fHistGammasCutPeripheral; | |
450 | delete fHistGammasAcceptedPeripheral; | |
451 | delete fHistBadTrackMatchesdPhidEta; | |
452 | delete fHistGoodTrackMatchesdPhidEta; | |
c79c36cc | 453 | delete fHistHadronDepositsAll; |
454 | delete fHistHadronDepositsReco; | |
ac610b08 | 455 | delete fHistHadronDepositsAllCent; |
5881f036 | 456 | delete fHistHadronDepositsAllCent500MeV; |
ac610b08 | 457 | delete fHistHadronDepositsRecoCent; |
458 | delete fHistHadronsAllCent; | |
d3ce32b8 | 459 | delete fHistMultChVsSignalVsMult; |
9a365626 | 460 | delete fHistNeutralRemovedSecondaryEtVsCent; |
461 | delete fHistChargedRemovedSecondaryEtVsCent; | |
462 | delete fHistNeutralNotRemovedSecondaryEtVsCent; | |
463 | delete fHistChargedNotRemovedSecondaryEtVsCent; | |
464 | delete fHistNeutralRemovedSecondaryNumVsNCluster; | |
465 | delete fHistChargedRemovedSecondaryNumVsNCluster; | |
466 | delete fHistNeutralNotRemovedSecondaryNumVsNCluster; | |
467 | delete fHistChargedNotRemovedSecondaryNumVsNCluster; | |
468 | delete fHistNeutralRemovedSecondaryNumVsCent; | |
469 | delete fHistChargedRemovedSecondaryNumVsCent; | |
470 | delete fHistNeutralNotRemovedSecondaryNumVsCent; | |
471 | delete fHistChargedNotRemovedSecondaryNumVsCent; | |
472 | delete fHistNeutronsEtVsCent; | |
473 | delete fHistNeutronsNumVsCent; | |
474 | delete fHistNotNeutronsNumVsCent; | |
475 | delete fHistPiKPDepositedVsNch; | |
476 | delete fHistPiKPNotTrackMatchedDepositedVsNch; | |
477 | delete fHistNeutronsDepositedVsNch; | |
478 | delete fHistAntiNeutronsDepositedVsNch; | |
479 | delete fHistProtonsDepositedVsNch; | |
480 | delete fHistAntiProtonsDepositedVsNch; | |
481 | delete fHistProtonsNotTrackMatchedDepositedVsNch; | |
482 | delete fHistAntiProtonsNotTrackMatchedDepositedVsNch; | |
483 | delete fHistSecondariesVsNch; | |
484 | delete fHistSecondariesVsNcl; | |
485 | delete fHistSecondariesEffCorrVsNch; | |
486 | delete fHistSecondariesEffCorrVsNcl; | |
b986cebe | 487 | delete fHistSecondariesOutOfAccEffCorrVsNch; |
488 | delete fHistSecondariesDetectorCoverEffCorrVsNch; | |
9a365626 | 489 | delete fHistCentVsNchVsNcl; |
b986cebe | 490 | //delete fHistSecondaryPositionInDetector; |
32503dac | 491 | delete fClusterPositionWeird; |
b986cebe | 492 | //delete fHistSecondaryPositionInDetectorMultiple; |
493 | delete fSecondaryClusterEnergy; | |
ce546038 | 494 | } |
2fbf38ac | 495 | |
496 | Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev) | |
f61cec2f | 497 | { // analyse MC event |
c79c36cc | 498 | if(!fIsMC) return 0; |
e2ee5727 | 499 | ResetEventValues(); |
500 | ||
b2c10007 | 501 | |
e2ee5727 | 502 | fPiPlusMult = 0; |
503 | fPiMinusMult = 0; | |
504 | fPiZeroMult = 0; | |
505 | if (fCentrality) | |
506 | { | |
ac610b08 | 507 | fCentClass = fCentrality->GetCentralityClass5(fCentralityMethod); |
e2ee5727 | 508 | |
509 | } | |
e2ee5727 | 510 | |
511 | // Get us an mc event | |
512 | if (!ev) { | |
513 | AliFatal("ERROR: Event does not exist"); | |
514 | return 0; | |
515 | } | |
516 | AliMCEvent *event = dynamic_cast<AliMCEvent*>(ev); | |
517 | if (!event) { | |
518 | AliFatal("ERROR: MC Event does not exist"); | |
519 | return 0; | |
520 | } | |
521 | ||
522 | Double_t protonMass =fgProtonMass; | |
523 | ||
524 | // Hijing header | |
525 | AliGenEventHeader* genHeader = event->GenEventHeader(); | |
526 | if (!genHeader) { | |
527 | Printf("ERROR: Event generation header does not exist"); | |
528 | return 0; | |
529 | } | |
530 | AliGenHijingEventHeader* hijingGenHeader = dynamic_cast<AliGenHijingEventHeader*>(genHeader); | |
531 | if (hijingGenHeader) { | |
532 | fImpactParameter = hijingGenHeader->ImpactParameter(); | |
533 | fNcoll = hijingGenHeader->HardScatters(); // or should this be some combination of NN() NNw() NwN() NwNw() ? | |
534 | fNpart = hijingGenHeader->ProjectileParticipants() + hijingGenHeader->TargetParticipants(); | |
f61cec2f | 535 | } |
536 | ||
e2ee5727 | 537 | // Let's play with the stack! |
538 | AliStack *stack = event->Stack(); | |
539 | ||
540 | Int_t nPrim = stack->GetNtrack(); | |
541 | ||
542 | Int_t partCount = 0; | |
543 | for (Int_t iPart = 0; iPart < nPrim; iPart++) | |
2fbf38ac | 544 | { |
e2ee5727 | 545 | |
546 | TParticle *part = stack->Particle(iPart); | |
b2c10007 | 547 | |
548 | ||
e2ee5727 | 549 | |
550 | if (!part) | |
551 | { | |
552 | Printf("ERROR: Could not get particle %d", iPart); | |
553 | continue; | |
554 | } | |
e2ee5727 | 555 | TParticlePDG *pdg = part->GetPDG(0); |
e2ee5727 | 556 | |
f61cec2f | 557 | if (!pdg) |
2fbf38ac | 558 | { |
f61cec2f | 559 | Printf("ERROR: Could not get particle PDG %d", iPart); |
e2ee5727 | 560 | continue; |
2fbf38ac | 561 | } |
562 | ||
e2ee5727 | 563 | Double_t particleMassPart = 0; //The mass part in the Et calculation for this particle |
f61cec2f | 564 | Int_t code = pdg->PdgCode(); |
b2c10007 | 565 | |
566 | if(stack->IsPhysicalPrimary(iPart)) | |
567 | { | |
568 | fTotPx += part->Px(); | |
569 | fTotPy += part->Py(); | |
570 | fTotPz += part->Pz(); | |
571 | } | |
572 | ||
e2ee5727 | 573 | // Check for reasonable (for now neutral and singly charged) charge on the particle |
86e7d5db | 574 | if (fSelector->IsNeutralMcParticle(iPart,*stack,*pdg)) |
e2ee5727 | 575 | { |
576 | ||
577 | fMultiplicity++; | |
b2c10007 | 578 | // PrintFamilyTree(iPart, stack); |
f61cec2f | 579 | // |
e2ee5727 | 580 | if (TMath::Abs(part->Eta()) < fCuts->GetCommonEtaCut()) |
2fbf38ac | 581 | { |
f61cec2f | 582 | //Printf("Particle with eta: %f, pid: %d", part->Eta(), code); |
e2ee5727 | 583 | // calculate E_T |
584 | if ( | |
ef647350 | 585 | TMath::Abs(code) == fgProtonCode || |
586 | TMath::Abs(code) == fgNeutronCode || | |
587 | TMath::Abs(code) == fgLambdaCode || | |
588 | TMath::Abs(code) == fgXiCode || | |
589 | TMath::Abs(code) == fgXi0Code || | |
590 | TMath::Abs(code) == fgOmegaCode | |
e2ee5727 | 591 | ) |
592 | { | |
ef647350 | 593 | if (code > 0) { |
e2ee5727 | 594 | particleMassPart = - protonMass; |
595 | } | |
ef647350 | 596 | if (code < 0) { |
e2ee5727 | 597 | particleMassPart = protonMass; |
598 | } | |
599 | } | |
600 | Double_t et = part->Energy() * TMath::Sin(part->Theta()) + particleMassPart; | |
601 | ||
e2ee5727 | 602 | |
6a152780 | 603 | // // Fill up total E_T counters for each particle species |
604 | // if (code == fgProtonCode || code == fgAntiProtonCode) | |
605 | // { | |
606 | // } | |
607 | // if (code == fgPiPlusCode || code == fgPiMinusCode) | |
608 | // { | |
609 | // if (code == fgPiPlusCode) | |
610 | // { | |
611 | // } | |
612 | // else | |
613 | // { | |
614 | // } | |
615 | // } | |
616 | // if (code == fgGammaCode) | |
617 | // { | |
618 | // } | |
619 | // if (code == fgKPlusCode) | |
620 | // { | |
621 | // } | |
622 | // if(code == fgKMinusCode) | |
623 | // { | |
624 | // } | |
625 | // if (code == fgMuPlusCode || code == fgMuMinusCode) | |
626 | // { | |
627 | // } | |
628 | // if (code == fgEPlusCode || code == fgEMinusCode) | |
629 | // { | |
630 | // } | |
631 | // // some neutrals also | |
632 | // if (code == fgNeutronCode) | |
633 | // { | |
634 | // } | |
635 | // if (code == fgAntiNeutronCode) | |
636 | // { | |
637 | // } | |
638 | // if (code == fgGammaCode) | |
639 | // { | |
640 | // } | |
e2ee5727 | 641 | |
642 | // Neutral particles | |
ef647350 | 643 | //if (TMath::Abs(pdg->Charge() - fCuts->GetMonteCarloNeutralParticle()) <1e-3 ) |
f61cec2f | 644 | |
ef647350 | 645 | if(code == fgGammaCode || code == fgPi0Code || code == fgEtaCode) |
e2ee5727 | 646 | { |
b2c10007 | 647 | // PrintFamilyTree(iPart,stack); |
f61cec2f | 648 | //Printf("Gamma, phi: %f, eta: %f, phi cut min: %f, phi cut max: %f, eta cut: %f", part->Phi(), part->Eta(), fPhiMinCutAcc, fPhiMaxCutAcc, fEtaCutAcc); |
649 | //if (et > fCuts->GetCommonClusterEnergyCut()) fTotNeutralEt += et; | |
e2ee5727 | 650 | |
651 | // inside EMCal acceptance | |
f61cec2f | 652 | |
653 | //if (TMath::Abs(part->Eta()) < fEtaCutAcc && part->Phi() < fPhiMaxCutAcc && part->Phi() > fPhiMinCutAcc) | |
654 | ||
b2c10007 | 655 | if(fSelector->CutGeometricalAcceptance(*part) ) |
e2ee5727 | 656 | { |
657 | fNeutralMultiplicity++; | |
f61cec2f | 658 | fTotNeutralEt += et; |
86e7d5db | 659 | if(fSelector->PassMinEnergyCut(*part)) |
f61cec2f | 660 | { |
661 | fTotNeutralEtAfterMinEnergyCut += et; | |
662 | } | |
e2ee5727 | 663 | if (part->Energy() > 0.05) partCount++; |
e2ee5727 | 664 | } |
665 | } | |
666 | //Charged particles | |
667 | else if (TMath::Abs( pdg->Charge() - fCuts->GetMonteCarloNeutralParticle())>1e-3 ) | |
668 | { | |
e2ee5727 | 669 | |
670 | // inside EMCal acceptance | |
f61cec2f | 671 | if (fSelector->CutGeometricalAcceptance(*part)) |
e2ee5727 | 672 | { |
f61cec2f | 673 | |
674 | fChargedMultiplicity++; | |
675 | ||
676 | fTotChargedEt += et; | |
e2ee5727 | 677 | |
ef647350 | 678 | if (code == fgProtonCode || code == fgAntiProtonCode) |
e2ee5727 | 679 | { |
e2ee5727 | 680 | } |
ef647350 | 681 | if (code == fgPiPlusCode || code == fgPiMinusCode) |
e2ee5727 | 682 | { |
e2ee5727 | 683 | } |
ef647350 | 684 | if (code == fgKPlusCode || code == fgKMinusCode) |
e2ee5727 | 685 | { |
e2ee5727 | 686 | } |
ef647350 | 687 | if (code == fgMuPlusCode || code == fgMuMinusCode) |
e2ee5727 | 688 | { |
e2ee5727 | 689 | } |
f61cec2f | 690 | |
ef647350 | 691 | if (code == fgEPlusCode || code == fgEMinusCode) |
e2ee5727 | 692 | { |
f61cec2f | 693 | fTotNeutralEt += et; // calling electrons neutral |
694 | fTotChargedEt -= et; | |
e1fa1966 | 695 | } |
e2ee5727 | 696 | } // inside EMCal acceptance |
697 | ||
e2ee5727 | 698 | if (TrackHitsCalorimeter(part)) // magnetic field info not filled? |
699 | { | |
700 | if (pdg->Charge() > 0) fHistPhivsPtPos->Fill(part->Phi(),part->Pt()); | |
701 | else fHistPhivsPtNeg->Fill(part->Phi(), part->Pt()); | |
702 | } | |
703 | } | |
704 | } | |
705 | ||
706 | } | |
2fbf38ac | 707 | } |
b2c10007 | 708 | // std::cout << "Total: p_x = " << fTotPx << ", p_y = " << fTotPy << ", p_z = " << fTotPz << std::endl; |
e2ee5727 | 709 | fTotEt = fTotChargedEt + fTotNeutralEt; |
f61cec2f | 710 | //fTotEtAcc = fTotChargedEtAcc + fTotNeutralEtAcc;// |
e2ee5727 | 711 | //std::cout << "Event done! # of particles: " << partCount << std::endl; |
712 | return 0; | |
2fbf38ac | 713 | } |
0651f6b4 | 714 | //Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliMCEvent* mcEvent,AliESDEvent* realEvent) |
715 | Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2) | |
f61cec2f | 716 | { // analyse MC and real event info |
e2ee5727 | 717 | //if(!mcEvent || !realEvent){ |
c79c36cc | 718 | if(!fIsMC) return 0; |
e2ee5727 | 719 | if (!ev || !ev2) { |
720 | AliFatal("ERROR: Event does not exist"); | |
721 | return 0; | |
722 | } | |
f61cec2f | 723 | AliAnalysisEt::AnalyseEvent(ev); |
e2ee5727 | 724 | AliMCEvent *mcEvent = dynamic_cast<AliMCEvent*>(ev); |
725 | AliESDEvent *realEvent = dynamic_cast<AliESDEvent*>(ev2); | |
726 | if (!mcEvent || !realEvent) { | |
727 | AliFatal("ERROR: mcEvent or realEvent does not exist"); | |
b2c10007 | 728 | |
e2ee5727 | 729 | } |
730 | ||
b2c10007 | 731 | std::vector<Int_t> foundGammas; |
732 | ||
f61cec2f | 733 | fSelector->SetEvent(realEvent); |
734 | ||
735 | AnalyseEvent(ev); | |
736 | ||
e2ee5727 | 737 | AliStack *stack = mcEvent->Stack(); |
738 | ||
9ef6f13f | 739 | // get all detector clusters |
f61cec2f | 740 | // TRefArray* caloClusters = new TRefArray(); |
741 | ||
742 | // if (fDetector == fCuts->GetDetectorEmcal()) realEvent->GetEMCALClusters( caloClusters ); | |
743 | //else if (fDetector == fCuts->GetDetectorPhos()) realEvent->GetPHOSClusters( caloClusters ); | |
744 | //else { | |
745 | //AliFatal("Detector ID has not been specified"); | |
746 | //return -1; | |
747 | // } | |
748 | ||
4503e29d | 749 | //Note that this only returns clusters for the selected detector. fSelector actually calls the right GetClusters... for the detector |
cfe23ff0 | 750 | //It does not apply any cuts on these clusters |
f61cec2f | 751 | TRefArray *caloClusters = fSelector->GetClusters(); |
e2ee5727 | 752 | |
e2ee5727 | 753 | Int_t nCluster = caloClusters->GetEntries(); |
b2c10007 | 754 | fClusterMult = nCluster; |
ef647350 | 755 | fNClusters = 0; |
d3ce32b8 | 756 | Int_t fClusterMultChargedTracks = 0; |
757 | Int_t fClusterMultGammas = 0; | |
9a365626 | 758 | Int_t nChargedSecondariesRemoved = 0; |
759 | Int_t nChargedSecondariesNotRemoved = 0; | |
760 | Int_t nNeutralSecondariesRemoved = 0; | |
761 | Int_t nNeutralSecondariesNotRemoved = 0; | |
762 | Int_t nNeutrons = 0; | |
763 | Int_t nNotNeutrons = 0; | |
764 | //All efficiency corrected except etSecondaries --> | |
765 | Float_t etPiKPDeposited = 0.0;// | |
766 | Float_t etPiKPDepositedNotTrackMatched = 0.0;// | |
767 | Float_t etProtonDepositedNotTrackMatched = 0.0;// | |
768 | Float_t etAntiProtonDepositedNotTrackMatched = 0.0;// | |
769 | //Float_t etPIDProtonDepositedNotTrackMatched = 0.0;//Still has to be filled! | |
03cff249 | 770 | //1Float_t etPIDAntiProtonDepositedNotTrackMatched = 0.0;//Still has to be filled |
9a365626 | 771 | Float_t etProtonDeposited = 0.0;// |
772 | Float_t etAntiProtonDeposited = 0.0;// | |
773 | Float_t etNeutronDeposited = 0.0; | |
774 | Float_t etAntiNeutronDeposited = 0.0; | |
775 | Float_t etSecondaries = 0.0; | |
776 | Float_t etSecondariesEffCorr = 0.0; | |
b986cebe | 777 | Float_t etSecondariesOutOfAccEffCorr = 0.0; |
778 | Float_t etSecondariesDetectorCoverEffCorr = 0.0; | |
9a365626 | 779 | Float_t multiplicity = fEsdtrackCutsTPC->GetReferenceMultiplicity(realEvent,kTRUE); |
e2ee5727 | 780 | // loop the clusters |
781 | for (int iCluster = 0; iCluster < nCluster; iCluster++ ) | |
782 | { | |
f61cec2f | 783 | Int_t cf = 0; |
e2ee5727 | 784 | AliESDCaloCluster* caloCluster = ( AliESDCaloCluster* )caloClusters->At( iCluster ); |
2aab9269 | 785 | //Float_t caloE = caloCluster->E() |
5881f036 | 786 | if (!fSelector->CutGeometricalAcceptance(*caloCluster)) continue; |
f61cec2f | 787 | fNClusters++; |
32503dac | 788 | //const UInt_t iPart = (UInt_t)TMath::Abs(fSelector->GetLabel(caloCluster));//->GetLabel()); |
789 | const UInt_t iPart = fSelector->GetLabel(caloCluster,stack); | |
790 | //const UInt_t iPart = (UInt_t)TMath::Abs(caloCluster->GetLabel()); | |
ef647350 | 791 | TParticle *part = stack->Particle(iPart); |
e2ee5727 | 792 | |
793 | if (!part) | |
0651f6b4 | 794 | { |
e2ee5727 | 795 | Printf("No MC particle %d", iCluster); |
796 | continue; | |
797 | } | |
9ef6f13f | 798 | |
f61cec2f | 799 | int primIdx = iPart; |
e2ee5727 | 800 | if (!stack->IsPhysicalPrimary(iPart)) // check whether particle is primary. we keep secondary electron and gamma for testing. |
801 | { | |
f61cec2f | 802 | primIdx = GetPrimMother(iPart, stack); |
b2c10007 | 803 | if(primIdx != stack->GetPrimary(iPart)) |
804 | { | |
805 | //std::cout << primIdx << " = " << stack->GetPrimary(iPart) << std::endl; | |
806 | //PrintFamilyTree(iPart, stack); | |
807 | } | |
2aab9269 | 808 | //if it is from a K0S |
f61cec2f | 809 | if(primIdx < 0) |
810 | { | |
ac610b08 | 811 | //std::cout << "What!? No primary?" << std::endl; |
812 | //PrintFamilyTree(iPart, stack); | |
9ef6f13f | 813 | //continue; |
814 | //This is a work around to fix a bug. For the EMCal when you use the tender supply, the parent particle ID gets messed up. | |
815 | primIdx = iPart; | |
f61cec2f | 816 | } |
817 | ||
e2ee5727 | 818 | } // end of primary particle check |
a0dcb3c1 | 819 | //const int primCode = stack->Particle(primIdx)->GetPdgCode(); |
ef647350 | 820 | TParticlePDG *pdg = part->GetPDG(); |
f61cec2f | 821 | if (!pdg) |
ef647350 | 822 | { |
823 | Printf("ERROR: Could not get particle PDG %d", iPart); | |
824 | continue; | |
f61cec2f | 825 | } |
e2ee5727 | 826 | |
a0dcb3c1 | 827 | //Int_t code = pdg->PdgCode(); |
53ad5ec1 | 828 | // if(primCode == fgGammaCode) |
829 | // { | |
830 | ||
d3ce32b8 | 831 | |
832 | ||
833 | Bool_t nottrackmatched = kTRUE;//default to no track matched | |
6a152780 | 834 | Float_t matchedTrackp = 0.0; |
835 | Float_t matchedTrackpt = 0.0; | |
d3ce32b8 | 836 | nottrackmatched = fSelector->PassTrackMatchingCut(*caloCluster); |
837 | //by default ALL matched tracks are accepted, whether or not the match is good. So we check to see if the track is good. | |
584f2478 | 838 | if(!nottrackmatched){//if the track is trackmatched |
d3ce32b8 | 839 | Int_t trackMatchedIndex = caloCluster->GetTrackMatchedIndex(); |
840 | if(trackMatchedIndex < 0) nottrackmatched=kTRUE; | |
841 | AliESDtrack *track = realEvent->GetTrack(trackMatchedIndex); | |
6a152780 | 842 | matchedTrackp = track->P(); |
843 | matchedTrackpt = track->Pt(); | |
d3ce32b8 | 844 | //if this is a good track, accept track will return true. The track matched is good, so not track matched is false |
584f2478 | 845 | nottrackmatched = !(fEsdtrackCutsTPC->AcceptTrack(track));//if the track is bad, this is track matched |
6a152780 | 846 | //if(!nottrackmatched) cout<<"Matched track p: "<<matchedTrackp<<" sim "<<part->P()<<endl; |
d3ce32b8 | 847 | } |
848 | ||
849 | ||
a0dcb3c1 | 850 | for(UInt_t i = 0; i < caloCluster->GetNLabels(); i++) |
b2c10007 | 851 | { |
53ad5ec1 | 852 | Int_t pIdx = caloCluster->GetLabelAt(i); |
5881f036 | 853 | |
0861cc1f | 854 | //TParticle *p = stack->Particle(pIdx); |
855 | ||
53ad5ec1 | 856 | if(!stack->IsPhysicalPrimary(pIdx)) |
857 | { | |
0861cc1f | 858 | // PrintFamilyTree(pIdx, stack); |
53ad5ec1 | 859 | pIdx = GetPrimMother(pIdx, stack); |
860 | } | |
0861cc1f | 861 | if(fSelector->PassDistanceToBadChannelCut(*caloCluster))//&&fSelector->CutGeometricalAcceptance(*(stack->Particle(primIdx)))) |
862 | { | |
d3ce32b8 | 863 | |
0861cc1f | 864 | // std::cout << "Gamma primary: " << primIdx << std::endl; |
865 | // foundGammas.push_back(primIdx); | |
d3ce32b8 | 866 | if(nottrackmatched){ |
867 | foundGammas.push_back(pIdx); | |
868 | } | |
0861cc1f | 869 | } |
b2c10007 | 870 | } |
53ad5ec1 | 871 | fCutFlow->Fill(cf++); |
86e7d5db | 872 | if(!fSelector->PassDistanceToBadChannelCut(*caloCluster)) continue; |
5881f036 | 873 | Double_t clEt = CorrectForReconstructionEfficiency(*caloCluster,fCentClass); |
ef647350 | 874 | // if(code == fgK0SCode) std::cout << "K0 energy: " << caloCluster->E() << std::endl; |
86e7d5db | 875 | if(!fSelector->PassMinEnergyCut(*caloCluster)) continue; |
53ad5ec1 | 876 | |
877 | ||
f61cec2f | 878 | fCutFlow->Fill(cf++); |
0861cc1f | 879 | Float_t pos[3]; |
880 | //PrintFamilyTree( | |
881 | caloCluster->GetPosition(pos); | |
882 | TVector3 cp(pos); | |
883 | ||
f61cec2f | 884 | TParticle *primPart = stack->Particle(primIdx); |
885 | fPrimaryCode = primPart->GetPdgCode(); | |
03bfd268 | 886 | fPrimaryCharge = (Int_t) primPart->GetPDG()->Charge(); |
f61cec2f | 887 | |
888 | fPrimaryE = primPart->Energy(); | |
889 | fPrimaryEt = primPart->Energy()*TMath::Sin(primPart->Theta()); | |
f61cec2f | 890 | fPrimaryPx = primPart->Px(); |
891 | fPrimaryPy = primPart->Py(); | |
892 | fPrimaryPz = primPart->Pz(); | |
cfe23ff0 | 893 | //cout<<"I have a cluster and it's good energy "<<caloCluster->E()<<" simulated "<<fPrimaryE<<endl; |
f61cec2f | 894 | fPrimaryVx = primPart->Vx(); |
895 | fPrimaryVy = primPart->Vy(); | |
896 | fPrimaryVz = primPart->Vz(); | |
897 | ||
898 | fPrimaryAccepted = false; | |
b2c10007 | 899 | fPrimaryMatched = false; |
f61cec2f | 900 | |
901 | fDepositedCode = part->GetPdgCode(); | |
b2c10007 | 902 | fDepositedE = part->Energy(); |
903 | fDepositedEt = part->Energy()*TMath::Sin(part->Theta()); | |
03bfd268 | 904 | fDepositedCharge = (Int_t) part->GetPDG()->Charge(); |
f61cec2f | 905 | |
906 | fDepositedVx = part->Vx(); | |
907 | fDepositedVy = part->Vy(); | |
908 | fDepositedVz = part->Vz(); | |
b986cebe | 909 | fReconstructedE = caloCluster->E(); |
910 | fReconstructedEt = caloCluster->E()*TMath::Sin(cp.Theta()); | |
b2c10007 | 911 | |
912 | //fSecondary = fSelector->FromSecondaryInteraction(*primPart, *stack); | |
913 | fSecondary =fSelector->FromSecondaryInteraction(*part, *stack); | |
b986cebe | 914 | //if(fSecondary && fReconstructedEt<0.3) fSecondary = kFALSE;//patch to do quick cross check THIS SHOULD NOT GET COMMITTED!!! IF IT DID YELL AT CHRISTINE ASAP |
9ef6f13f | 915 | // if(fSecondary) |
916 | // { | |
917 | // //std::cout << "Have secondary!" << std::endl; | |
918 | // //PrintFamilyTree(iPart, stack); | |
919 | // } | |
b2c10007 | 920 | |
921 | pdg = primPart->GetPDG(0); | |
a0dcb3c1 | 922 | //Int_t code = primPart->GetPdgCode(); |
e2ee5727 | 923 | |
9ef6f13f | 924 | Bool_t written = kFALSE; |
925 | ||
d3ce32b8 | 926 | // Bool_t nottrackmatched = kTRUE;//default to no track matched |
927 | // nottrackmatched = fSelector->PassTrackMatchingCut(*caloCluster); | |
928 | // //by default ALL matched tracks are accepted, whether or not the match is good. So we check to see if the track is good. | |
929 | // if(!nottrackmatched){ | |
930 | // Int_t trackMatchedIndex = caloCluster->GetTrackMatchedIndex(); | |
931 | // if(trackMatchedIndex < 0) nottrackmatched=kTRUE; | |
932 | // AliESDtrack *track = realEvent->GetTrack(trackMatchedIndex); | |
933 | // //if this is a good track, accept track will return true. The track matched is good, so not track matched is false | |
934 | // nottrackmatched = !(fEsdtrackCutsTPC->AcceptTrack(track)); | |
935 | // } | |
9ef6f13f | 936 | |
937 | if(fSecondary){//all particles from secondary interactions | |
938 | written = kTRUE; | |
939 | if(nottrackmatched){//secondaries not removed | |
03cff249 | 940 | // Float_t vtx = TMath::Sqrt( TMath::Power(part->Vx(),2) + TMath::Power(part->Vy(),2) + TMath::Power(part->Vz(),2) ); |
b986cebe | 941 | |
942 | ||
943 | ||
944 | if(!fSelector->CutGeometricalAcceptance(*part)){ | |
945 | if(TMath::Sqrt(part->Vx() * part->Vx() + part->Vy() * part->Vy() + part->Vz()* part->Vz())>100){ | |
946 | // fClusterPositionWeird->Fill(cp.Phi(), cp.PseudoRapidity()); | |
947 | // //Principal arc tangent of x, in the interval [-pi/2,+pi/2] radians | |
948 | // float phiVertex = TMath::ATan(part->Vy()/part->Vx()); | |
949 | // //PHOS acceptance is -0.222 pi to -0.555 pi | |
950 | // //but tan(phi) = tan(phi+pi) | |
951 | // if(part->Vx()<0) phiVertex + TMath::Pi(); | |
952 | // //maximum angular distance from PHOS | |
953 | // float dphi1 = phiVertex +40.0/180.0*TMath::Pi(); | |
954 | // float dphi2 = phiVertex +100.0/180.0*TMath::Pi(); | |
955 | // float dphi = dphi1; | |
956 | // if(TMath::Abs(dphi1)>TMath::Abs(dphi2)) dphi= dphi2; | |
957 | // cout<<"DPhi: "<<dphi<<" phi "<<phiVertex<<" dphi1 "<<dphi1<<" dphi2 "<<dphi2<<endl; | |
958 | // //cout<<"dphi "<<dphi1/TMath::Pi()<<"pi "<<dphi2/TMath::Pi()<<"pi phi "<<phiVertex/TMath::Pi()<<endl; | |
959 | // PrintFamilyTree(iPart, stack); | |
960 | //out of acceptance clusters | |
961 | ||
962 | etSecondariesOutOfAccEffCorr += clEt; | |
963 | } | |
32503dac | 964 | } |
b986cebe | 965 | else{ |
966 | if(TMath::Sqrt(part->Vx() * part->Vx() + part->Vy() * part->Vy() + part->Vz()* part->Vz())>430){ | |
967 | //clusters which are in the cover of the PHOS/EMCal | |
968 | etSecondariesDetectorCoverEffCorr += clEt; | |
969 | } | |
970 | } | |
971 | ||
972 | ||
973 | fSecondaryClusterEnergy->Fill(fReconstructedEt); | |
974 | //if(fReconstructedEt>0.3){//patch to do quick cross check THIS SHOULD NOT GET COMMITTED!!! IF IT DID YELL AT CHRISTINE ASAP | |
975 | // fHistSecondaryPositionInDetector->Fill(part->Vx(),part->Vy(),part->Vz()); | |
976 | // if(caloCluster->GetNLabels()>1){ | |
977 | // fHistSecondaryPositionInDetectorMultiple->Fill(part->Vx(),part->Vy(),part->Vz()); | |
978 | // } | |
979 | //} | |
03cff249 | 980 | // if(vtx>300){ |
981 | // //cout<<"Vtx "<<vtx<<endl; | |
982 | // if(fPrimaryCode==fgProtonCode || fPrimaryCode==fgAntiProtonCode || fPrimaryCode==fgPiPlusCode || fPrimaryCode==fgPiMinusCode || fPrimaryCode==fgKPlusCode || fPrimaryCode==fgKMinusCode){ | |
983 | // cout<<"I think I am really a charged hadron!"<<endl; | |
984 | // } | |
985 | // //PrintFamilyTree(iPart, stack); | |
986 | // } | |
9a365626 | 987 | fSecondaryNotRemoved++; |
988 | etSecondaries += fReconstructedEt; | |
989 | etSecondariesEffCorr += clEt; | |
9ef6f13f | 990 | if (fDepositedCharge != 0){//charged track not removed |
991 | fChargedNotRemoved++; | |
992 | fEnergyChargedNotRemoved += clEt; | |
993 | fHistRemovedOrNot->Fill(2.0, fCentClass); | |
994 | fHistDxDzNonRemovedCharged->Fill(caloCluster->GetTrackDx(), caloCluster->GetTrackDz()); | |
9a365626 | 995 | fHistChargedNotRemovedSecondaryEtVsCent->Fill(fReconstructedEt,fCentClass); |
996 | nChargedSecondariesNotRemoved++; | |
9ef6f13f | 997 | } |
998 | else{ | |
9a365626 | 999 | fHistNeutralNotRemovedSecondaryEtVsCent->Fill(fReconstructedEt,fCentClass); |
1000 | nNeutralSecondariesNotRemoved++; | |
9ef6f13f | 1001 | } |
1002 | } | |
1003 | else{//secondaries removed | |
1004 | if (fDepositedCharge != 0){ | |
1005 | fChargedRemoved++; | |
1006 | fEnergyChargedRemoved += clEt; | |
1007 | fHistRemovedOrNot->Fill(0.0, fCentClass); | |
1008 | fHistDxDzRemovedCharged->Fill(caloCluster->GetTrackDx(), caloCluster->GetTrackDz()); | |
9a365626 | 1009 | fHistChargedRemovedSecondaryEtVsCent->Fill(fReconstructedEt,fCentClass); |
1010 | nChargedSecondariesRemoved++; | |
9ef6f13f | 1011 | fHistChargedTracksCut->Fill(fDepositedEt); |
0861cc1f | 1012 | if(fCalcTrackMatchVsMult){ |
1013 | fHistChargedTracksCutMult->Fill(fDepositedEt,fClusterMult); | |
1014 | if(fClusterMult<25){fHistChargedTracksCutPeripheral->Fill(fDepositedEt);} | |
1015 | } | |
6a152780 | 1016 | fHistMatchedTracksEvspTBkgd->Fill(matchedTrackp,fReconstructedE); |
0861cc1f | 1017 | if(fCalcTrackMatchVsMult){ |
6a152780 | 1018 | if(fClusterMult<25){fHistMatchedTracksEvspTBkgdPeripheral->Fill(matchedTrackp,fReconstructedEt);} |
ac610b08 | 1019 | fHistMatchedTracksEvspTBkgdvsCent->Fill(matchedTrackp,fReconstructedEt, fCentClass); |
1020 | fHistMatchedTracksEvspTBkgdvsCentEffCorr->Fill(matchedTrackp,clEt, fCentClass);//Fill with the efficiency corrected energy | |
0861cc1f | 1021 | } |
32503dac | 1022 | //Int_t trackindex = (caloCluster->GetLabelsArray())->At(1); |
1023 | UInt_t trackindex = fSelector->GetLabel(caloCluster,stack);//(caloCluster->GetLabelsArray())->At(1); | |
1024 | if(((UInt_t)caloCluster->GetLabel())!=trackindex){ | |
1025 | //if(fSelector->GetLabel(caloCluster,stack) !=trackindex){ | |
9ef6f13f | 1026 | fHistBadTrackMatches->Fill(part->Pt(),fReconstructedE); |
1027 | fHistBadTrackMatchesdPhidEta->Fill(caloCluster->GetTrackDx(),caloCluster->GetTrackDz()); | |
1028 | //cout<<"Track matched, label cluster "<<caloCluster->GetLabel()<<" track "<<trackindex<<endl; | |
1029 | } | |
1030 | else{ | |
1031 | fHistGoodTrackMatchesdPhidEta->Fill(caloCluster->GetTrackDx(),caloCluster->GetTrackDz()); | |
1032 | } | |
1033 | } | |
1034 | else{//neutral energy removed | |
1035 | fNeutralRemoved++; | |
1036 | fEnergyNeutralRemoved += clEt; | |
1037 | fHistRemovedOrNot->Fill(1.0, fCentClass); | |
1038 | fHistDxDzRemovedNeutral->Fill(caloCluster->GetTrackDx(), caloCluster->GetTrackDz()); | |
9a365626 | 1039 | fHistNeutralRemovedSecondaryEtVsCent->Fill(fReconstructedEt,fCentClass); |
1040 | ||
1041 | nNeutralSecondariesRemoved++; | |
9ef6f13f | 1042 | } |
1043 | } | |
1044 | } | |
9a365626 | 1045 | else{//not a secondary |
9ef6f13f | 1046 | |
1047 | if (fDepositedCharge != 0 && fDepositedCode!=fgEMinusCode && fDepositedCode!=fgEPlusCode){//if the particle hitting the calorimeter is pi/k/p/mu | |
1048 | written = kTRUE; | |
d3ce32b8 | 1049 | fClusterMultChargedTracks++; |
9a365626 | 1050 | etPiKPDeposited += clEt; |
1051 | if(fDepositedCode==fgProtonCode){ | |
1052 | etProtonDeposited += clEt; | |
1053 | } | |
1054 | if(fDepositedCode==fgAntiProtonCode){ | |
1055 | etAntiProtonDeposited += clEt; | |
1056 | } | |
9ef6f13f | 1057 | if(nottrackmatched){//not removed but should be |
9a365626 | 1058 | etPiKPDepositedNotTrackMatched += clEt; |
1059 | if(fDepositedCode==fgProtonCode){ | |
1060 | etProtonDepositedNotTrackMatched += clEt; | |
1061 | } | |
1062 | if(fDepositedCode==fgAntiProtonCode){ | |
1063 | etAntiProtonDepositedNotTrackMatched += clEt; | |
1064 | } | |
c79c36cc | 1065 | fHistHadronDepositsAll->Fill(part->Pt()); |
ac610b08 | 1066 | fHistHadronDepositsAllCent->Fill(part->Pt(), fCentClass); |
5881f036 | 1067 | if(fReconstructedEt>0.5) fHistHadronDepositsAllCent500MeV->Fill(part->Pt(), fCentClass); |
9ef6f13f | 1068 | fChargedNotRemoved++; |
1069 | fEnergyChargedNotRemoved += clEt; | |
1070 | fHistRemovedOrNot->Fill(2.0, fCentClass); | |
1071 | fHistDxDzNonRemovedCharged->Fill(caloCluster->GetTrackDx(), caloCluster->GetTrackDz()); | |
1072 | fHistChargedTracksAccepted->Fill(fDepositedEt); | |
0861cc1f | 1073 | if(fCalcTrackMatchVsMult){ |
6a152780 | 1074 | if(matchedTrackpt<0.5){//if we could never have matched this because of its pt, how much energy did it deposit? |
ac610b08 | 1075 | fHistChargedTracksAcceptedLowPtCent->Fill(fDepositedEt, fCentClass); |
5881f036 | 1076 | if(fDepositedEt>=0.5) fHistChargedTracksAcceptedLowPtCent500MeV->Fill(fDepositedEt, fCentClass); |
ac610b08 | 1077 | if(pdg->PdgCode()!=fgAntiProtonCode){ |
1078 | fHistChargedTracksAcceptedLowPtCentNoAntiProtons->Fill(fDepositedEt, fCentClass); | |
1079 | } | |
1080 | else{ | |
1081 | fHistChargedTracksAcceptedLowPtCentAntiProtons->Fill(fDepositedEt, fCentClass); | |
1082 | } | |
6a152780 | 1083 | } |
0861cc1f | 1084 | fHistChargedTracksAcceptedMult->Fill(fDepositedEt,fClusterMult); |
1085 | if(fClusterMult<25){fHistChargedTracksAcceptedPeripheral->Fill(fDepositedEt);} | |
1086 | } | |
9ef6f13f | 1087 | } |
1088 | else{//removed and should have been | |
32503dac | 1089 | Int_t trackindex = fSelector->GetLabel(caloCluster,stack);// (caloCluster->GetLabelsArray())->At(0); |
c79c36cc | 1090 | fHistHadronDepositsReco->Fill(part->Pt()); |
ac610b08 | 1091 | fHistHadronDepositsRecoCent->Fill(part->Pt(), fCentClass); |
c79c36cc | 1092 | fHistHadronDepositsAll->Fill(part->Pt()); |
ac610b08 | 1093 | fHistHadronDepositsAllCent->Fill(part->Pt(), fCentClass); |
5881f036 | 1094 | if(fReconstructedEt>0.5) fHistHadronDepositsAllCent500MeV->Fill(part->Pt(), fCentClass); |
9ef6f13f | 1095 | if(caloCluster->GetLabel()!=trackindex){ |
1096 | fHistBadTrackMatches->Fill(part->Pt(),fReconstructedE); | |
1097 | fHistBadTrackMatchesdPhidEta->Fill(caloCluster->GetTrackDx(),caloCluster->GetTrackDz()); | |
1098 | //cout<<"Track matched, label cluster "<<caloCluster->GetLabel()<<" track "<<trackindex<<endl; | |
1099 | } | |
1100 | else{ | |
1101 | fHistGoodTrackMatchesdPhidEta->Fill(caloCluster->GetTrackDx(),caloCluster->GetTrackDz()); | |
1102 | } | |
1103 | fChargedRemoved++; | |
1104 | fEnergyChargedRemoved += clEt; | |
1105 | fHistRemovedOrNot->Fill(0.0, fCentClass); | |
1106 | fHistDxDzRemovedCharged->Fill(caloCluster->GetTrackDx(), caloCluster->GetTrackDz()); | |
1107 | fHistChargedTracksCut->Fill(fDepositedEt); | |
0861cc1f | 1108 | if(fCalcTrackMatchVsMult){ |
1109 | fHistChargedTracksCutMult->Fill(fDepositedEt,fClusterMult); | |
1110 | if(fClusterMult<25){fHistChargedTracksCutPeripheral->Fill(fDepositedEt);} | |
1111 | } | |
6a152780 | 1112 | fHistMatchedTracksEvspTBkgd->Fill(matchedTrackp,fReconstructedE); |
0861cc1f | 1113 | if(fCalcTrackMatchVsMult){ |
6a152780 | 1114 | if(fClusterMult<25){fHistMatchedTracksEvspTBkgdPeripheral->Fill(matchedTrackp,fReconstructedEt);} |
ac610b08 | 1115 | fHistMatchedTracksEvspTBkgdvsCent->Fill(matchedTrackp,fReconstructedEt, fCentClass); |
1116 | fHistMatchedTracksEvspTBkgdvsCentEffCorr->Fill(matchedTrackp,clEt, fCentClass);//fill with the efficiency corrected energy | |
0861cc1f | 1117 | } |
9ef6f13f | 1118 | } |
1119 | } | |
1120 | //K0L and any neutral particles from the decay of K+/- or K0S | |
1121 | if(!written && (fPrimaryCode==fgKPlusCode || fPrimaryCode==fgKMinusCode || fPrimaryCode==fgK0SCode ||fPrimaryCode==fgK0LCode)){ | |
1122 | written = kTRUE;//At this point we are not tracking them but we don't count them as neutrals accidentally removed | |
cfe23ff0 | 1123 | } |
9ef6f13f | 1124 | |
1125 | if(!written && (fDepositedCode==fgGammaCode || fDepositedCode==fgEMinusCode || fDepositedCode ==fgEPlusCode)){//if the particle hitting the calorimeter is gamma, electron and not from a kaon | |
d3ce32b8 | 1126 | fClusterMultGammas++; |
9ef6f13f | 1127 | written = kTRUE; |
1128 | if(nottrackmatched){//Not removed and not supposed to be removed - signal | |
1129 | fEtNonRemovedGammas += clEt; | |
1130 | fMultNonRemovedGammas++; | |
1131 | fNeutralNotRemoved--; | |
1132 | fEnergyNeutralNotRemoved -= clEt; | |
1133 | fHistGammasAccepted->Fill(fDepositedEt); | |
0861cc1f | 1134 | if(fCalcTrackMatchVsMult){ |
1135 | fHistGammasAcceptedMult->Fill(fDepositedEt,fClusterMult); | |
1136 | if(fClusterMult<25){fHistGammasAcceptedPeripheral->Fill(fDepositedEt);} | |
1137 | } | |
9ef6f13f | 1138 | } |
1139 | else{//removed but shouldn't have been | |
32503dac | 1140 | Int_t trackindex = fSelector->GetLabel(caloCluster,stack);// (caloCluster->GetLabelsArray())->At(1); |
9ef6f13f | 1141 | if(caloCluster->GetLabel()!=trackindex){ |
1142 | fHistBadTrackMatches->Fill(part->Pt(),fReconstructedE); | |
1143 | fHistBadTrackMatchesdPhidEta->Fill(caloCluster->GetTrackDx(),caloCluster->GetTrackDz()); | |
1144 | // cout<<"Track matched, label cluster "<<caloCluster->GetLabel()<<" track "<<trackindex<<endl; | |
1145 | // PrintFamilyTree(trackindex, stack); | |
1146 | // cout<<"Cluster"<<endl; | |
1147 | } | |
1148 | fGammaRemoved++; | |
1149 | fGammaRemovedEt+=clEt; | |
1150 | fHistGammasCut->Fill(fDepositedEt); | |
0861cc1f | 1151 | if(fCalcTrackMatchVsMult){ |
1152 | fHistGammasCutMult->Fill(fDepositedEt,fClusterMult); | |
1153 | if(fClusterMult<25){fHistGammasCutPeripheral->Fill(fDepositedEt);} | |
1154 | } | |
6a152780 | 1155 | fHistMatchedTracksEvspTSignal->Fill(matchedTrackp,fReconstructedE); |
0861cc1f | 1156 | if(fCalcTrackMatchVsMult){ |
6a152780 | 1157 | if(fClusterMult<25){fHistMatchedTracksEvspTSignalPeripheral->Fill(matchedTrackp,fReconstructedEt);} |
ac610b08 | 1158 | fHistMatchedTracksEvspTSignalvsCent->Fill(matchedTrackp,fReconstructedEt, fCentClass); |
1159 | fHistMatchedTracksEvspTSignalvsCentEffCorr->Fill(matchedTrackp,clEt, fCentClass); | |
0861cc1f | 1160 | } |
9ef6f13f | 1161 | } |
1162 | } | |
1163 | //all other cases - neutron, anti-neutron, not aware of other cases | |
1164 | if(!written){ | |
1165 | fNeutralNotRemoved++; | |
9a365626 | 1166 | fEnergyNeutralNotRemoved += clEt;//this is the efficiency corrected energy |
9ef6f13f | 1167 | fHistRemovedOrNot->Fill(3.0, fCentClass); |
9a365626 | 1168 | if (fDepositedCode == fgNeutronCode || fDepositedCode == fgAntiNeutronCode){ |
1169 | fHistDxDzNonRemovedNeutral->Fill(caloCluster->GetTrackDx(), caloCluster->GetTrackDz()); | |
1170 | fHistNeutronsEtVsCent->Fill(clEt,fCentClass); | |
1171 | nNeutrons++; | |
1172 | if(fDepositedCode == fgNeutronCode){ | |
1173 | etNeutronDeposited += clEt; | |
1174 | } | |
1175 | if(fDepositedCode == fgAntiNeutronCode){ | |
1176 | etAntiNeutronDeposited += clEt; | |
1177 | } | |
1178 | //cout<<"I am a"; | |
1179 | //if(fDepositedCode == fgAntiNeutronCode) cout<<"n anti-"; | |
1180 | //else{cout<<" ";} | |
1181 | //cout<<"neutron!! pt "<<part->Pt()<<" eta "<<part->Eta()<<" phi "<<part->Phi()<<" Et "<<clEt<<endl; | |
1182 | //PrintFamilyTree(iPart, stack); | |
1183 | } | |
1184 | else{ | |
1185 | nNotNeutrons++; | |
1186 | // cout<<"I am a"; | |
1187 | // if(fDepositedCode == fgAntiNeutronCode) cout<<"n anti-"; | |
1188 | // else{cout<<" ";} | |
1189 | // cout<<"neutron!! pt "<<part->Pt()<<" eta "<<part->Eta()<<" phi "<<part->Phi()<<" Et "<<clEt<<endl; | |
1190 | // PrintFamilyTree(iPart, stack); | |
1191 | // cout<<"I am not a neutron!!"<<endl; | |
1192 | // PrintFamilyTree(iPart, stack); | |
1193 | } | |
9ef6f13f | 1194 | } |
1195 | } | |
f61cec2f | 1196 | fPrimaryTree->Fill(); |
9ef6f13f | 1197 | } // end of loop over clusters |
9a365626 | 1198 | fHistPiKPNotTrackMatchedDepositedVsNch->Fill(etPiKPDepositedNotTrackMatched,multiplicity); |
1199 | fHistPiKPDepositedVsNch->Fill(etPiKPDeposited,multiplicity); | |
1200 | fHistNeutronsDepositedVsNch->Fill(etNeutronDeposited,multiplicity); | |
1201 | fHistAntiNeutronsDepositedVsNch->Fill(etAntiNeutronDeposited,multiplicity); | |
1202 | fHistProtonsDepositedVsNch->Fill(etProtonDeposited,multiplicity); | |
1203 | fHistAntiProtonsDepositedVsNch->Fill(etAntiProtonDeposited,multiplicity); | |
1204 | fHistProtonsNotTrackMatchedDepositedVsNch->Fill(etProtonDepositedNotTrackMatched,multiplicity); | |
1205 | fHistAntiProtonsNotTrackMatchedDepositedVsNch->Fill(etAntiProtonDepositedNotTrackMatched,multiplicity); | |
1206 | fHistSecondariesVsNch->Fill(etSecondaries,multiplicity); | |
1207 | fHistSecondariesVsNcl->Fill(etSecondaries,fNClusters); | |
1208 | fHistSecondariesEffCorrVsNch->Fill(etSecondariesEffCorr,multiplicity); | |
1209 | fHistSecondariesEffCorrVsNcl->Fill(etSecondariesEffCorr,fNClusters); | |
b986cebe | 1210 | fHistSecondariesOutOfAccEffCorrVsNch->Fill(etSecondariesOutOfAccEffCorr,multiplicity); |
1211 | fHistSecondariesDetectorCoverEffCorrVsNch->Fill(etSecondariesDetectorCoverEffCorr,multiplicity); | |
9a365626 | 1212 | fHistCentVsNchVsNcl->Fill(fCentClass,multiplicity, fNClusters); |
1213 | ||
1214 | fHistNeutronsNumVsCent->Fill(nNeutrons,fCentClass); | |
1215 | fHistNotNeutronsNumVsCent->Fill(nNotNeutrons,fCentClass); | |
b2c10007 | 1216 | |
1217 | std::sort(foundGammas.begin(), foundGammas.end()); | |
1218 | for (Int_t iPart = 0; iPart < stack->GetNtrack(); iPart++) | |
1219 | { | |
1220 | ||
1221 | if(!stack->IsPhysicalPrimary(iPart)) continue; | |
1222 | ||
1223 | TParticle *part = stack->Particle(iPart); | |
1224 | ||
1225 | if (!part) | |
1226 | { | |
1227 | Printf("ERROR: Could not get particle %d", iPart); | |
1228 | continue; | |
1229 | } | |
1230 | TParticlePDG *pdg = part->GetPDG(0); | |
1231 | ||
1232 | if (!pdg) | |
1233 | { | |
1234 | Printf("ERROR: Could not get particle PDG %d", iPart); | |
1235 | continue; | |
1236 | } | |
1237 | ||
9a365626 | 1238 | if(pdg->PdgCode()==fgGammaCode)// TMath::Abs(part->Eta()) < 0.12) |
b2c10007 | 1239 | { |
9a365626 | 1240 | if(fSelector->CutGeometricalAcceptance(*part)){ |
1241 | fHistGammasGenerated->Fill(part->Energy()); | |
1242 | fHistGammasGeneratedCent->Fill(part->Energy(),fCentClass); | |
1243 | } | |
b2c10007 | 1244 | if(std::binary_search(foundGammas.begin(),foundGammas.end(),iPart)) |
1245 | { | |
9a365626 | 1246 | if(!fSelector->CutGeometricalAcceptance(*part)){ |
1247 | //cout<<"Gamma NOT in acceptance"<<endl; | |
1248 | fHistGammasFoundOutOfAccCent->Fill(part->Energy(),fCentClass); | |
1249 | } | |
1250 | else{ | |
1251 | fHistGammasFound->Fill(part->Energy()); | |
1252 | fHistGammasFoundCent->Fill(part->Energy(),fCentClass); | |
1253 | //cout<<"Gamma IN acceptance"<<endl; | |
1254 | } | |
b2c10007 | 1255 | } |
b2c10007 | 1256 | } |
6a152780 | 1257 | if(pdg->PdgCode()==fgPiPlusCode || pdg->PdgCode()==fgPiMinusCode || pdg->PdgCode()==fgProtonCode || pdg->PdgCode()==fgAntiProtonCode){//section here for all hadrons generated |
ac610b08 | 1258 | fHistHadronsAllCent->Fill(part->Pt(), fCentClass); |
6a152780 | 1259 | } |
1260 | ||
b2c10007 | 1261 | |
1262 | } | |
0861cc1f | 1263 | if(fCalcForKaonCorrection){ |
1264 | Float_t etCuts[11] = {0.0,0.05,0.1,0.15,0.2,0.25, 0.3,0.35,0.4,0.45,0.5}; | |
1265 | Int_t nEtCuts = 11; | |
1266 | //loop over simulated particles in order to find K0S | |
1267 | for (Int_t iPart = 0; iPart < stack->GetNtrack(); iPart++){ | |
1268 | TParticle *part = stack->Particle(iPart); | |
1269 | if (!part){ | |
1270 | //Printf("ERROR: Could not get particle %d", iPart); | |
1271 | continue; | |
1272 | } | |
1273 | TParticlePDG *pdg = part->GetPDG(0); | |
1274 | if (!pdg){ | |
1275 | //Printf("ERROR: Could not get particle PDG %d", iPart); | |
1276 | continue; | |
1277 | } | |
1278 | //if(stack->IsPhysicalPrimary(iPart)){//if it is a K0 it might have decayed into four pions | |
2aab9269 | 1279 | //fgK0SCode, fgGammaCode, fgPi0Code |
1280 | Int_t code = pdg->PdgCode(); | |
0861cc1f | 1281 | if(code == fgK0SCode || code==fgKPlusCode || code==fgKMinusCode ||code==fgK0LCode || code==fgK0Code){//this is a kaon |
1282 | //cout<<"I am a kaon too! "<<stack->Particle(iPart)->GetName()<<" "<<code<<endl; | |
1283 | Float_t pTk = stack->Particle(iPart)->Pt(); | |
1284 | if(TMath::Abs(stack->Particle(iPart)->Y())<0.5 && stack->IsPhysicalPrimary(iPart)){//these are particles which would be included in our spectra measurements | |
1285 | fHistSimKaonsInAcceptance->Fill(pTk); | |
1286 | if(code == fgK0SCode){fHistSimK0SInAcceptance->Fill(pTk);} | |
1287 | if(code == fgK0LCode){fHistSimK0LInAcceptance->Fill(pTk);} | |
1288 | if(code == fgKPlusCode){fHistSimKPlusInAcceptance->Fill(pTk);} | |
1289 | if(code == fgKMinusCode){fHistSimKMinusInAcceptance->Fill(pTk);} | |
1290 | if(code == fgK0Code){//Split K0's between the two | |
1291 | fHistSimK0SInAcceptance->Fill(pTk,0.5); | |
1292 | fHistSimK0LInAcceptance->Fill(pTk,0.5); | |
1293 | } | |
1294 | } | |
1295 | else{ | |
1296 | fHistSimKaonsOutOfAcceptance->Fill(pTk); | |
1297 | // if(!stack->IsPhysicalPrimary(iPart)){ | |
1298 | // PrintFamilyTree(iPart, stack); | |
1299 | // } | |
1300 | } | |
1301 | Float_t totalGammaEts[11] = {0.0,0.0,0.0,0.0,0.0, 0.0,0.0,0.0,0.0,0.0, 0.0}; | |
1302 | Float_t totalClusterEts[11] = {0.0,0.0,0.0,0.0,0.0, 0.0,0.0,0.0,0.0,0.0, 0.0}; | |
1303 | for (int iCluster = 0; iCluster < nCluster; iCluster++ ){//if this cluster is from any of the decay daughters of any kaon... but there is no easy way to look at this so we loop over clusters... | |
1304 | AliESDCaloCluster* caloCluster = ( AliESDCaloCluster* )caloClusters->At( iCluster ); | |
5881f036 | 1305 | if (!fSelector->CutGeometricalAcceptance(*caloCluster)) continue; |
32503dac | 1306 | const Int_t myPart = fSelector->GetLabel(caloCluster,stack); |
1307 | //const Int_t myPart = TMath::Abs(caloCluster->GetLabel()); | |
0861cc1f | 1308 | //identify the primary particle which created this cluster |
1309 | int primIdx = myPart; | |
1310 | if (!stack->IsPhysicalPrimary(myPart)){ | |
1311 | primIdx = GetPrimMother(iPart, stack); | |
1312 | } // end of primary particle check | |
29b7ba7f | 1313 | TParticle *hitPart = stack->Particle(myPart); |
1314 | Bool_t hitsAsChargedKaon = kFALSE; | |
1315 | if(hitPart->GetPdgCode()== fgKPlusCode || hitPart->GetPdgCode()== fgKPlusCode){ | |
1316 | if(myPart==primIdx){ | |
1317 | //The particle hits as a charged kaon and that kaon is a primary kaon - do not count because this is counted in the hadronic correction! | |
1318 | hitsAsChargedKaon = kTRUE; | |
1319 | //cout<<"Found primary charged kaon cluster!"<<endl; | |
1320 | } | |
1321 | } | |
1322 | if(primIdx==iPart && primIdx>0 && !hitsAsChargedKaon){//This cluster is from our primary particle and our primary particle is a kaon | |
0861cc1f | 1323 | //cout<<"I have a particle match! prim code"<<code<<" id "<<primIdx <<endl; |
1324 | Float_t pos[3]; | |
1325 | caloCluster->GetPosition(pos); | |
1326 | TVector3 cp(pos); | |
1327 | Double_t clEt = caloCluster->E()*TMath::Sin(cp.Theta()); | |
5881f036 | 1328 | Double_t clEtCorr = CorrectForReconstructionEfficiency(*caloCluster,fCentClass); |
2aab9269 | 1329 | for(int l=0;l<nEtCuts;l++){//loop over cut values |
0861cc1f | 1330 | if(clEt>=etCuts[l]){ |
1331 | //cout<<", "<<clEt<<">="<<etCuts[l]; | |
1332 | totalClusterEts[l] += clEtCorr;//if cluster et is above the cut off energy add it | |
1333 | totalGammaEts[l] += clEt;//if cluster et is above the cut off energy add it | |
2aab9269 | 1334 | } |
1335 | } | |
2aab9269 | 1336 | } |
1337 | } | |
0861cc1f | 1338 | // cout<<"Deposits: pT: "<<pTk; |
1339 | // for(int l=0;l<nEtCuts;l++){//loop over cut values | |
1340 | // cout<<" "<<totalClusterEts[l]; | |
1341 | // } | |
1342 | // cout<<endl; | |
1343 | if(TMath::Abs(stack->Particle(iPart)->Y())<0.5 && stack->IsPhysicalPrimary(iPart)){//within the acceptance of our spectra and is a primary particle | |
1344 | if(totalClusterEts[0]>0.0){fHistSimKaonsInAcceptanceWithDepositsPrimaries->Fill(pTk);} | |
1345 | //cout<<"I have a particle match! prim code"<<code<<" id "<<iPart <<endl; | |
1346 | for(int l=0;l<nEtCuts;l++){ | |
d3ce32b8 | 1347 | fHistK0EDepositsVsPtInAcceptance->Fill(pTk,totalClusterEts[l],etCuts[l]+0.001); |
1348 | fHistK0EGammaVsPtInAcceptance->Fill(pTk,totalGammaEts[l],etCuts[l]+0.001); | |
0861cc1f | 1349 | } |
1350 | } | |
1351 | else{//outside the acceptance of our spectra | |
1352 | if(totalClusterEts[0]>0.0){ | |
1353 | if(stack->IsPhysicalPrimary(iPart)){fHistSimKaonsOutOfAcceptanceWithDepositsPrimaries->Fill(pTk);} | |
1354 | else{fHistSimKaonsOutOfAcceptanceWithDepositsSecondaries->Fill(pTk);} | |
1355 | } | |
1356 | for(int l=0;l<nEtCuts;l++){ | |
d3ce32b8 | 1357 | fHistK0EDepositsVsPtOutOfAcceptance->Fill(pTk,totalClusterEts[l],etCuts[l]+0.001); |
1358 | fHistK0EGammaVsPtOutOfAcceptance->Fill(pTk,totalGammaEts[l],etCuts[l]+0.001); | |
0861cc1f | 1359 | } |
1360 | } | |
1361 | ||
2aab9269 | 1362 | } |
1363 | } | |
1364 | } | |
9a365626 | 1365 | fHistMultChVsSignalVsMult->Fill(fClusterMultChargedTracks,fClusterMultGammas,fNClusters); |
1366 | fHistNeutralRemovedSecondaryNumVsNCluster->Fill(nNeutralSecondariesRemoved,fNClusters); | |
1367 | fHistChargedRemovedSecondaryNumVsNCluster->Fill(nChargedSecondariesRemoved,fNClusters); | |
1368 | fHistNeutralNotRemovedSecondaryNumVsNCluster->Fill(nNeutralSecondariesNotRemoved,fNClusters); | |
1369 | fHistChargedNotRemovedSecondaryNumVsNCluster->Fill(nChargedSecondariesNotRemoved,fNClusters); | |
1370 | fHistNeutralRemovedSecondaryNumVsCent->Fill(nNeutralSecondariesRemoved,fCentClass); | |
1371 | fHistChargedRemovedSecondaryNumVsCent->Fill(nChargedSecondariesRemoved,fCentClass); | |
1372 | fHistNeutralNotRemovedSecondaryNumVsCent->Fill(nNeutralSecondariesNotRemoved,fCentClass); | |
1373 | fHistChargedNotRemovedSecondaryNumVsCent->Fill(nChargedSecondariesNotRemoved,fCentClass); | |
1374 | //cout<<"Secondaries not removed: "<<fSecondaryNotRemoved<<" neutral secondaries not removed "<<nNeutralSecondariesNotRemoved<<" cluster mult "<<fClusterMult<<endl; | |
e2ee5727 | 1375 | FillHistograms(); |
1376 | return 0; | |
1377 | } | |
2fbf38ac | 1378 | |
1379 | void AliAnalysisEtMonteCarlo::Init() | |
f61cec2f | 1380 | { // init |
e2ee5727 | 1381 | AliAnalysisEt::Init(); |
2fbf38ac | 1382 | } |
13b0d3c1 | 1383 | |
ce546038 | 1384 | void AliAnalysisEtMonteCarlo::ResetEventValues() |
f61cec2f | 1385 | { // reset event values |
e2ee5727 | 1386 | AliAnalysisEt::ResetEventValues(); |
c79c36cc | 1387 | if(!fIsMC) return; |
e2ee5727 | 1388 | |
f61cec2f | 1389 | fTotEtSecondary = 0; |
1390 | fTotEtSecondaryFromEmEtPrimary = 0; | |
1391 | fTotEtWithSecondaryRemoved = 0; | |
1392 | ||
e2ee5727 | 1393 | // collision geometry defaults for p+p: |
1394 | fImpactParameter = 0; | |
1395 | fNcoll = 1; | |
1396 | fNpart = 2; | |
1397 | ||
1398 | fEtNonRemovedProtons = 0; | |
1399 | fEtNonRemovedAntiProtons = 0; | |
1400 | fEtNonRemovedPiPlus = 0; | |
1401 | fEtNonRemovedPiMinus = 0; | |
1402 | fEtNonRemovedKaonPlus = 0; | |
1403 | fEtNonRemovedKaonMinus = 0; | |
ef647350 | 1404 | fEtNonRemovedK0S = 0; |
1405 | fEtNonRemovedK0L = 0; | |
e2ee5727 | 1406 | fEtNonRemovedLambdas = 0; |
1407 | fEtNonRemovedElectrons = 0; | |
1408 | fEtNonRemovedPositrons = 0; | |
1409 | fEtNonRemovedMuPlus = 0; | |
1410 | fEtNonRemovedMuMinus = 0; | |
1411 | fEtNonRemovedNeutrons = 0; | |
1412 | fEtNonRemovedAntiNeutrons = 0; | |
1413 | fEtNonRemovedGammas = 0; | |
1414 | fEtNonRemovedGammasFromPi0 = 0; | |
1415 | ||
ef647350 | 1416 | fEtRemovedProtons = 0; |
1417 | fEtRemovedAntiProtons = 0; | |
1418 | fEtRemovedPiPlus = 0; | |
1419 | fEtRemovedPiMinus = 0; | |
1420 | fEtRemovedKaonPlus = 0; | |
1421 | fEtRemovedKaonMinus = 0; | |
1422 | fEtRemovedK0s = 0; | |
1423 | fEtRemovedK0L = 0; | |
1424 | fEtRemovedLambdas = 0; | |
1425 | fEtRemovedElectrons = 0; | |
1426 | fEtRemovedPositrons = 0; | |
1427 | fEtRemovedMuPlus = 0; | |
1428 | fEtRemovedMuMinus = 0; | |
1429 | fEtRemovedNeutrons = 0; | |
1430 | ||
1431 | fEtRemovedGammasFromPi0 = 0; | |
e2ee5727 | 1432 | fEtRemovedGammas = 0; |
1433 | fEtRemovedNeutrons = 0; | |
1434 | fEtRemovedAntiNeutrons = 0; | |
1435 | ||
1436 | fMultNonRemovedProtons = 0; | |
1437 | fMultNonRemovedAntiProtons = 0; | |
1438 | fMultNonRemovedPiPlus = 0; | |
1439 | fMultNonRemovedPiMinus = 0; | |
1440 | fMultNonRemovedKaonPlus = 0; | |
1441 | fMultNonRemovedKaonMinus = 0; | |
1442 | fMultNonRemovedK0s = 0; | |
ef647350 | 1443 | fMultNonRemovedK0L = 0; |
e2ee5727 | 1444 | fMultNonRemovedLambdas = 0; |
1445 | fMultNonRemovedElectrons = 0; | |
1446 | fMultNonRemovedPositrons = 0; | |
1447 | fMultNonRemovedMuPlus = 0; | |
1448 | fMultNonRemovedMuMinus = 0; | |
1449 | fMultNonRemovedNeutrons = 0; | |
1450 | fMultNonRemovedAntiNeutrons = 0; | |
1451 | fMultNonRemovedGammas = 0; | |
1452 | ||
ef647350 | 1453 | fMultRemovedProtons = 0; |
1454 | fMultRemovedAntiProtons = 0; | |
1455 | fMultRemovedPiPlus = 0; | |
1456 | fMultRemovedPiMinus = 0; | |
1457 | fMultRemovedKaonPlus = 0; | |
1458 | fMultRemovedKaonMinus = 0; | |
1459 | fMultRemovedK0s = 0; | |
1460 | fMultRemovedK0L = 0; | |
1461 | fMultRemovedLambdas = 0; | |
1462 | fMultRemovedElectrons = 0; | |
1463 | fMultRemovedPositrons = 0; | |
1464 | fMultRemovedMuPlus = 0; | |
1465 | fMultRemovedMuMinus = 0; | |
1466 | ||
e2ee5727 | 1467 | fMultRemovedGammas = 0; |
1468 | fMultRemovedNeutrons = 0; | |
1469 | fMultRemovedAntiNeutrons = 0; | |
1470 | ||
ef647350 | 1471 | fEnergyChargedNotRemoved = 0; |
1472 | fEnergyChargedRemoved = 0; | |
1473 | fEnergyNeutralNotRemoved = 0; | |
1474 | fEnergyNeutralRemoved = 0; | |
f61cec2f | 1475 | |
ef647350 | 1476 | fChargedNotRemoved = 0; |
1477 | fChargedRemoved = 0; | |
1478 | fNeutralNotRemoved = 0; | |
1479 | fNeutralRemoved = 0; | |
b2c10007 | 1480 | fGammaRemoved = 0; |
1481 | fSecondaryNotRemoved = 0; | |
f61cec2f | 1482 | |
e2ee5727 | 1483 | fTrackMultInAcc = 0; |
1484 | ||
f61cec2f | 1485 | fTotNeutralEtAfterMinEnergyCut = 0; |
b2c10007 | 1486 | |
1487 | fSecondaryNotRemoved = 0; | |
1488 | ||
1489 | fTotPx = 0; | |
1490 | fTotPy = 0; | |
1491 | fTotPz = 0; | |
1492 | ||
1493 | ||
ce546038 | 1494 | } |
1495 | ||
1496 | void AliAnalysisEtMonteCarlo::CreateHistograms() | |
f61cec2f | 1497 | { // histogram related additions |
e2ee5727 | 1498 | AliAnalysisEt::CreateHistograms(); |
c79c36cc | 1499 | if(!fIsMC) return; |
f61cec2f | 1500 | if (fEventSummaryTree) { |
1501 | fEventSummaryTree->Branch("fImpactParameter",&fImpactParameter,"fImpactParameter/D"); | |
1502 | fEventSummaryTree->Branch("fNcoll",&fNcoll,"fNcoll/I"); | |
1503 | fEventSummaryTree->Branch("fNpart",&fNpart,"fNpart/I"); | |
1504 | fEventSummaryTree->Branch("fTotEtWithSecondaryRemoved", &fTotEtWithSecondaryRemoved, "fTotEtWithSecondaryRemoved/D"); | |
1505 | fEventSummaryTree->Branch("fTotEtSecondaryFromEmEtPrimary", &fTotEtSecondaryFromEmEtPrimary, "fTotEtSecondaryFromEmEtPrimary/D"); | |
1506 | fEventSummaryTree->Branch("fTotEtSecondary", &fTotEtSecondary, "fTotEtSecondary/D"); | |
1507 | fEventSummaryTree->Branch("fTotNeutralEtAfterMinEnergyCut", &fTotNeutralEtAfterMinEnergyCut, "fTotNeutralEtAfterMinEnergyCut/D"); | |
b2c10007 | 1508 | fEventSummaryTree->Branch("fSecondaryNotRemoved", &fSecondaryNotRemoved, "fSecondaryNotRemoved/I"); |
1509 | fEventSummaryTree->Branch("fChargedNotRemoved", &fChargedNotRemoved, "fChargedNotRemoved/I"); | |
1510 | fEventSummaryTree->Branch("fNeutralNotRemoved", &fNeutralNotRemoved, "fNeutralNotRemoved/I"); | |
1511 | fEventSummaryTree->Branch("fChargedRemoved", &fChargedRemoved, "fChargedRemoved/I"); | |
1512 | fEventSummaryTree->Branch("fNeutralRemoved", &fNeutralRemoved, "fNeutralRemoved/I"); | |
1513 | fEventSummaryTree->Branch("fGammaRemoved", &fGammaRemoved, "fGammaRemoved/I"); | |
1514 | fEventSummaryTree->Branch("fTotPx", &fTotPx, "fTotPx/D"); | |
1515 | fEventSummaryTree->Branch("fTotPy", &fTotPy, "fTotPy/D"); | |
1516 | fEventSummaryTree->Branch("fTotPz", &fTotPz, "fTotPz/D"); | |
1517 | // fEventSummaryTree->Branch("f | |
e2ee5727 | 1518 | } |
f61cec2f | 1519 | |
e2ee5727 | 1520 | //fHistDecayVertexNonRemovedCharged = new TH3F("fHistDecayVertexNonRemovedCharged","fHistDecayVertexNonRemovedCharged", 500, -470, 30, 500, -300, 300, 40, -20, 20); |
1521 | //fHistDecayVertexRemovedCharged = new TH3F("fHistDecayVertexRemovedCharged","fHistDecayVertexRemovedCharged", 500, -470, 30, 500, -300, 300, 40, -20, 20); | |
1522 | //fHistDecayVertexNonRemovedNeutral = new TH3F("fHistDecayVertexNonRemovedNeutral","fHistDecayVertexNonRemovedNeutral", 500, -470, 30, 500, -300, 300, 40, -20, 20); | |
1523 | //fHistDecayVertexRemovedNeutral = new TH3F("fHistDecayVertexRemovedNeutral","fHistDecayVertexRemovedNeutral", 500, -470, 30, 500, -300, 300, 40, -20, 20); | |
1524 | ||
1525 | fHistRemovedOrNot = new TH2F("fHistRemovedOrNot", "fHistRemovedOrNot", 4, -0.5, 3.5, 10, -0.5, 9.5); | |
1526 | ||
1527 | fHistEtNonRemovedProtons = new TH2F("fHistEtNonRemovedProtons", "fHistEtNonRemovedProtons", 1500, 0, 30, 10, -0.5, 9.5); | |
1528 | fHistEtNonRemovedAntiProtons = new TH2F("fHistEtNonRemovedAntiProtons", "fHistEtNonRemovedAntiProtons", 1500, 0, 30, 10, -0.5, 9.5); | |
1529 | fHistEtNonRemovedPiPlus = new TH2F("fHistEtNonRemovedPiPlus", "fHistEtNonRemovedPiPlus", 1500, 0, 30, 10, -0.5, 9.5); | |
1530 | fHistEtNonRemovedPiMinus = new TH2F("fHistEtNonRemovedPiMinus", "fHistEtNonRemovedPiMinus", 1500, 0, 30, 10, -0.5, 9.5); | |
1531 | fHistEtNonRemovedKaonPlus = new TH2F("fHistEtNonRemovedKaonPlus", "fHistEtNonRemovedKaonPlus", 1500, 0, 30, 10, -0.5, 9.5); | |
1532 | fHistEtNonRemovedKaonMinus = new TH2F("fHistEtNonRemovedKaonMinus", "fHistEtNonRemovedKaonMinus", 1500, 0, 30, 10, -0.5, 9.5); | |
1533 | fHistEtNonRemovedK0s = new TH2F("fHistEtNonRemovedK0s", "fHistEtNonRemovedK0s", 1500, 0, 30, 10, -0.5, 9.5); | |
ef647350 | 1534 | fHistEtNonRemovedK0L = new TH2F("fHistEtNonRemovedK0L", "fHistEtNonRemovedK0L", 1500, 0, 30, 10, -0.5, 9.5); |
e2ee5727 | 1535 | fHistEtNonRemovedLambdas = new TH2F("fHistEtNonRemovedLambdas", "fHistEtNonRemovedLambdas", 1500, 0, 30, 10, -0.5, 9.5); |
1536 | fHistEtNonRemovedElectrons = new TH2F("fHistEtNonRemovedElectrons", "fHistEtNonRemovedElectrons", 1500, 0, 30, 10, -0.5, 9.5); | |
1537 | fHistEtNonRemovedPositrons = new TH2F("fHistEtNonRemovedPositrons", "fHistEtNonRemovedPositrons", 1500, 0, 30, 10, -0.5, 9.5); | |
1538 | fHistEtNonRemovedMuPlus = new TH2F("fHistEtNonRemovedMuPlus", "fHistEtNonRemovedMuPlus", 1500, 0, 30, 10, -0.5, 9.5); | |
1539 | fHistEtNonRemovedMuMinus = new TH2F("fHistEtNonRemovedMuMinus", "fHistEtNonRemovedMuMinus", 1500, 0, 30, 10, -0.5, 9.5); | |
1540 | fHistEtNonRemovedNeutrons = new TH2F("fHistEtNonRemovedNeutrons", "fHistEtNonRemovedNeutrons", 1500, 0, 30, 10, -0.5, 9.5); | |
1541 | fHistEtNonRemovedAntiNeutrons = new TH2F("fHistEtNonRemovedAntiNeutrons", "fHistEtNonRemovedAntiNeutrons", 1500, 0, 30, 10, -0.5, 9.5); | |
1542 | ||
1543 | fHistEtNonRemovedGammas = new TH2F("fHistEtNonRemovedGammas", "fHistEtNonRemovedGammas", 1500, 0, 30, 10, -0.5, 9.5); | |
1544 | fHistEtNonRemovedGammasFromPi0 = new TH2F("fHistEtNonRemovedGammasFromPi0", "fHistEtNonRemovedGammasFromPi0", 1500, 0, 30, 10, -0.5, 9.5); | |
1545 | ||
1546 | fHistEtRemovedGammas = new TH2F("fHistEtRemovedGammas", "fHistEtRemovedGammas", 1500, 0, 30, 10, -0.5, 9.5); | |
1547 | fHistEtRemovedNeutrons = new TH2F("fHistEtRemovedNeutrons", "fHistEtRemovedNeutrons", 1500, 0, 30, 10, -0.5, 9.5); | |
1548 | fHistEtRemovedAntiNeutrons = new TH2F("fHistEtRemovedAntiNeutrons", "fHistEtRemovedAntiNeutrons", 1500, 0, 30, 10, -0.5, 9.5); | |
f61cec2f | 1549 | |
ef647350 | 1550 | fHistEtRemovedCharged = new TH2F("fHistEtRemovedCharged", "fHistEtRemovedCharged", 1500, 0, 30, 10, -0.5, 9.5); |
1551 | fHistEtRemovedNeutrals = new TH2F("fHistEtRemovedNeutrals", "fHistEtRemovedNeutrals", 1500, 0, 30, 10, -0.5, 9.5); | |
e2ee5727 | 1552 | |
ef647350 | 1553 | fHistEtNonRemovedCharged = new TH2F("fHistEtNonRemovedCharged", "fHistEtNonRemovedCharged", 1500, 0, 30, 10, -0.5, 9.5); |
1554 | fHistEtNonRemovedNeutrals = new TH2F("fHistEtNonRemovedNeutrals", "fHistEtNonRemovedNeutrals", 1500, 0, 30, 10, -0.5, 9.5); | |
f61cec2f | 1555 | |
e2ee5727 | 1556 | fHistMultNonRemovedProtons = new TH2F("fHistMultNonRemovedProtons", "fHistMultNonRemovedProtons", 100, -0.5, 99.5, 10, -0.5, 9.5); |
1557 | fHistMultNonRemovedAntiProtons = new TH2F("fHistMultNonRemovedAntiProtons", "fHistMultNonRemovedAntiProtons", 100, -0.5, 99.5, 10, -0.5, 9.5); | |
1558 | fHistMultNonRemovedPiPlus = new TH2F("fHistMultNonRemovedPiPlus", "fHistMultNonRemovedPiPlus", 100, -0.5, 99.5, 10, -0.5, 9.5); | |
1559 | fHistMultNonRemovedPiMinus = new TH2F("fHistMultNonRemovedPiMinus", "fHistMultNonRemovedPiMinus", 100, -0.5, 99.5, 10, -0.5, 9.5); | |
1560 | fHistMultNonRemovedKaonPlus = new TH2F("fHistMultNonRemovedKaonPlus", "fHistMultNonRemovedKaonPlus", 100, -0.5, 99.5, 10, -0.5, 9.5); | |
1561 | fHistMultNonRemovedKaonMinus = new TH2F("fHistMultNonRemovedKaonMinus", "fHistMultNonRemovedKaonMinus", 100, -0.5, 99.5, 10, -0.5, 9.5); | |
1562 | fHistMultNonRemovedK0s = new TH2F("fHistMultNonRemovedK0s", "fHistMultNonRemovedK0s", 100, -0.5, 99.5, 10, -0.5, 9.5); | |
ef647350 | 1563 | fHistMultNonRemovedK0L = new TH2F("fHistMultNonRemovedK0L", "fHistMultNonRemovedK0L", 100, -0.5, 99.5, 10, -0.5, 9.5); |
e2ee5727 | 1564 | fHistMultNonRemovedLambdas = new TH2F("fHistMultNonRemovedLambdas", "fHistMultNonRemovedLambdas", 100, -0.5, 99.5, 10, -0.5, 9.5); |
1565 | fHistMultNonRemovedElectrons = new TH2F("fHistMultNonRemovedElectrons", "fHistMultNonRemovedElectrons", 100, -0.5, 99.5, 10, -0.5, 9.5); | |
1566 | fHistMultNonRemovedPositrons = new TH2F("fHistMultNonRemovedPositrons", "fHistMultNonRemovedPositrons", 100, -0.5, 99.5, 10, -0.5, 9.5); | |
1567 | fHistMultNonRemovedMuPlus = new TH2F("fHistMultNonRemovedMuPlus", "fHistMultNonRemovedMuPlus", 100, -0.5, 99.5, 10, -0.5, 9.5); | |
1568 | fHistMultNonRemovedMuMinus = new TH2F("fHistMultNonRemovedMuMinus", "fHistMultNonRemovedMuMinus", 100, -0.5, 99.5, 10, -0.5, 9.5); | |
1569 | fHistMultNonRemovedNeutrons = new TH2F("fHistMultNonRemovedNeutrons", "fHistMultNonRemovedNeutrons", 100, -0.5, 99.5, 10, -0.5, 9.5); | |
1570 | fHistMultNonRemovedAntiNeutrons = new TH2F("fHistMultNonRemovedAntiNeutrons", "fHistMultNonRemovedAntiNeutrons", 100, -0.5, 99.5, 10, -0.5, 9.5); | |
1571 | ||
ef647350 | 1572 | fHistMultNonRemovedGammas = new TH2F("fHistMultNonRemovedGammas", "fHistMultNonRemovedGammas", 100, -0.5, 99.5, 100, -0.5, 99.5); |
e2ee5727 | 1573 | |
ef647350 | 1574 | fHistMultRemovedGammas = new TH2F("fHistMultRemovedGammas", "fHistMultRemovedGammas", 100, -0.5, 99.5, 100, -0.5, 99.5); |
e2ee5727 | 1575 | fHistMultRemovedNeutrons = new TH2F("fHistMultRemovedNeutrons", "fHistMultRemovedNeutrons", 100, -0.5, 99.5, 10, -0.5, 9.5); |
1576 | fHistMultRemovedAntiNeutrons = new TH2F("fHistMultRemovedAntiNeutrons", "fHistMultRemovedAntiNeutrons", 100, -0.5, 99.5, 10, -0.5, 9.5); | |
f61cec2f | 1577 | /* |
1578 | fHistMultRemovedCharged = new TH2F("fHistMultRemovedCharged", "fHistMultRemovedCharged", 1500, 0, 30, 10, -0.5, 9.5); | |
1579 | fHistMultRemovedNeutrals = new TH2F("fHistMultRemovedNeutrals", "fHistMultRemovedNeutrals", 1500, 0, 30, 10, -0.5, 9.5); | |
1580 | ||
1581 | fHistMultNonRemovedCharged = new TH2F("fHistMultNonRemovedCharged", "fHistMultNonRemovedCharged", 1500, 0, 30, 10, -0.5, 9.5); | |
1582 | fHistMultNonRemovedNeutrals = new TH2F("fHistMultNonRemovedNeutrals", "fHistMultNonRemovedNeutrals", 1500, 0, 30, 10, -0.5, 9.5);*/ | |
ef647350 | 1583 | |
ef647350 | 1584 | |
ef647350 | 1585 | fHistMultRemovedCharged = new TH2F("fHistMultRemovedCharged", "fHistMultRemovedCharged", 100, -0.5, 99.5, 100, -0.5, 99.5); |
1586 | fHistMultRemovedNeutrals = new TH2F("fHistMultRemovedNeutrals", "fHistMultRemovedNeutrals", 100, -0.5, 99.5, 100, -0.5, 99.5); | |
1587 | ||
1588 | fHistMultNonRemovedCharged = new TH2F("fHistMultNonRemovedCharged", "fHistMultNonRemovedCharged", 100, -0.5, 99.5, 100, -0.5, 99.5); | |
1589 | fHistMultNonRemovedNeutrals = new TH2F("fHistMultNonRemovedNeutrals", "fHistMultNonRemovedNeutrals", 100, -0.5, 99.5, 100, -0.5, 99.5); | |
e2ee5727 | 1590 | |
1591 | fHistTrackMultvsNonRemovedCharged = new TH2F("fHistTrackMultvsNonRemovedCharged", "fHistTrackMultvsNonRemovedCharged", 1000, -0.5, 999.5, 100, -0.5, 99.5); | |
1592 | fHistTrackMultvsNonRemovedNeutral = new TH2F("fHistTrackMultvsNonRemovedNeutral", "fHistTrackMultvsNonRemovedNeutral", 1000, -0.5, 999.5, 100, -0.5, 99.5); | |
1593 | fHistTrackMultvsRemovedGamma = new TH2F("fHistTrackMultvsRemovedGamma", "fHistTrackMultvsRemovedGamma", 1000, -0.5, 999.5, 100, -0.5, 99.5); | |
1594 | ||
1595 | fHistClusterMultvsNonRemovedCharged = new TH2F("fHistClusterMultvsNonRemovedCharged", "fHistClusterMultvsNonRemovedCharged", 1000, -0.5, 999.5, 100, -0.5, 99.5); | |
1596 | fHistClusterMultvsNonRemovedNeutral = new TH2F("fHistClusterMultvsNonRemovedNeutral", "fHistClusterMultvsNonRemovedNeutral", 1000, -0.5, 999.5, 100, -0.5, 99.5); | |
1597 | fHistClusterMultvsRemovedGamma = new TH2F("fHistClusterMultvsRemovedGamma", "fHistClusterMultvsRemovedGamma", 1000, -0.5, 999.5, 100, -0.5, 99.5); | |
1598 | ||
1599 | fHistDxDzNonRemovedCharged = new TH2F("fHistDxDzNonRemovedCharged", "fHistDxDzNonRemovedCharged", 800, -200, 200, 800, -200, 200); | |
1600 | fHistDxDzRemovedCharged = new TH2F("fHistDxDzRemovedCharged", "fHistDxDzRemovedCharged", 800, -200, 200, 800, -200, 200); | |
1601 | fHistDxDzNonRemovedNeutral = new TH2F("fHistDxDzNonRemovedNeutral", "fHistDxDzNonRemovedNeutral", 800, -200, 200, 800, -200, 200); | |
1602 | fHistDxDzRemovedNeutral = new TH2F("fHistDxDzRemovedNeutral", "fHistDxDzRemovedNeutral", 800, -200, 200, 800, -200, 200); | |
1603 | ||
0861cc1f | 1604 | if(fCalcForKaonCorrection){ |
1605 | Int_t nEtCut = 11; | |
1606 | Float_t etCutAxis[12] = {0.00,0.05,0.10,0.15,0.20, 0.25,0.30,0.35,0.40,0.45, 0.50,0.55}; | |
1607 | fHistK0EDepositsVsPtInAcceptance = new TH3F("fHistK0EDepositsVsPtInAcceptance","Kaon deposits with corrections for kaons with y<0.5",fgNumOfPtBins,fgPtAxis,fgNumOfPtBins,fgPtAxis,nEtCut,etCutAxis); | |
1608 | fHistK0EGammaVsPtInAcceptance = new TH3F("fHistK0EGammaVsPtInAcceptance","Kaon deposits without corrections for kaons with y<0.5",fgNumOfPtBins,fgPtAxis,fgNumOfPtBins,fgPtAxis,nEtCut,etCutAxis); | |
1609 | fHistK0EDepositsVsPtOutOfAcceptance = new TH3F("fHistK0EDepositsVsPtOutOfAcceptance","Kaon deposits with corrections for kaons with y>0.5",fgNumOfPtBins,fgPtAxis,fgNumOfPtBins,fgPtAxis,nEtCut,etCutAxis); | |
1610 | fHistK0EGammaVsPtOutOfAcceptance = new TH3F("fHistK0EGammaVsPtOutOfAcceptance","Kaon deposits without corrections for kaons with y>0.5",fgNumOfPtBins,fgPtAxis,fgNumOfPtBins,fgPtAxis,nEtCut,etCutAxis); | |
1611 | fHistK0EDepositsVsPtInAcceptance->GetXaxis()->SetTitle("Kaon p_{T}"); | |
1612 | fHistK0EGammaVsPtInAcceptance->GetXaxis()->SetTitle("Kaon p_{T}"); | |
1613 | fHistK0EDepositsVsPtOutOfAcceptance->GetXaxis()->SetTitle("Kaon p_{T}"); | |
1614 | fHistK0EGammaVsPtOutOfAcceptance->GetXaxis()->SetTitle("Kaon p_{T}"); | |
1615 | fHistK0EDepositsVsPtInAcceptance->GetYaxis()->SetTitle("Deposited E_{T}"); | |
1616 | fHistK0EGammaVsPtInAcceptance->GetYaxis()->SetTitle("Deposited E_{T}"); | |
1617 | fHistK0EDepositsVsPtOutOfAcceptance->GetYaxis()->SetTitle("Deposited E_{T}"); | |
1618 | fHistK0EGammaVsPtOutOfAcceptance->GetYaxis()->SetTitle("Deposited E_{T}"); | |
1619 | fHistK0EDepositsVsPtInAcceptance->GetZaxis()->SetTitle("E_{T} cut"); | |
1620 | fHistK0EGammaVsPtInAcceptance->GetZaxis()->SetTitle("E_{T} cut"); | |
1621 | fHistK0EDepositsVsPtOutOfAcceptance->GetZaxis()->SetTitle("E_{T} cut"); | |
1622 | fHistK0EGammaVsPtOutOfAcceptance->GetZaxis()->SetTitle("E_{T} cut"); | |
1623 | ||
1624 | fHistSimKaonsInAcceptance = new TH1F("fHistSimKaonsInAcceptance","Kaons with y<0.5",fgNumOfPtBins,fgPtAxis); | |
1625 | fHistSimK0SInAcceptance = new TH1F("fHistSimK0SInAcceptance","Kaons with y<0.5",fgNumOfPtBins,fgPtAxis); | |
1626 | fHistSimK0LInAcceptance = new TH1F("fHistSimK0LInAcceptance","Kaons with y<0.5",fgNumOfPtBins,fgPtAxis); | |
1627 | fHistSimKPlusInAcceptance = new TH1F("fHistSimKPlusInAcceptance","Kaons with y<0.5",fgNumOfPtBins,fgPtAxis); | |
1628 | fHistSimKMinusInAcceptance = new TH1F("fHistSimKMinusInAcceptance","Kaons with y<0.5",fgNumOfPtBins,fgPtAxis); | |
1629 | fHistSimKaonsOutOfAcceptance = new TH1F("fHistSimKaonsOutOfAcceptance","Kaons with y>0.5",fgNumOfPtBins,fgPtAxis); | |
1630 | fHistSimKaonsInAcceptanceWithDepositsPrimaries = new TH1F("fHistSimKaonsInAcceptanceWithDepositsPrimaries","Primary Kaons which deposited energy in calorimeter with y>0.5",fgNumOfPtBins,fgPtAxis); | |
1631 | fHistSimKaonsOutOfAcceptanceWithDepositsSecondaries = new TH1F("fHistSimKaonsOutOfAcceptanceWithDepositsSecondaries","Secondary Kaons which deposited energy in calorimeter with y>0.5",fgNumOfPtBins,fgPtAxis); | |
1632 | fHistSimKaonsOutOfAcceptanceWithDepositsPrimaries = new TH1F("fHistSimKaonsOutOfAcceptanceWithDepositsPrimaries","Primary Kaons which deposited energy in calorimeter with y>0.5",fgNumOfPtBins,fgPtAxis); | |
1633 | } | |
2aab9269 | 1634 | |
e2ee5727 | 1635 | fHistPiPlusMult = new TH1F("fHistPiPlusMult", "fHistPiPlusMult", 2000, -0.5, 1999.5); |
1636 | fHistPiMinusMult = new TH1F("fHistPiMinusMult", "fHistPiMinusMult", 2000, -0.5, 1999.5); | |
1637 | fHistPiZeroMult = new TH1F("fHistPiZeroMult", "fHistPiZeroMult", 2000, -0.5, 1999.5); | |
1638 | ||
1639 | fHistPiPlusMultAcc = new TH1F("fHistPiPlusMultAcc", "fHistPiPlusMultAcc", 2000, -0.5, 1999.5); | |
1640 | fHistPiMinusMultAcc = new TH1F("fHistPiMinusMultAcc", "fHistPiMinusMultAcc", 2000, -0.5, 1999.5); | |
1641 | fHistPiZeroMultAcc = new TH1F("fHistPiZeroMultAcc", "fHistPiZeroMultAcc", 2000, -0.5, 1999.5); | |
1642 | ||
f61cec2f | 1643 | if(fCuts->GetHistMakeTree()) |
1644 | { | |
1645 | TString treename = "fPrimaryTree" + fHistogramNameSuffix; | |
1646 | fPrimaryTree = new TTree(treename, treename); | |
1647 | ||
1648 | fPrimaryTree->Branch("fTotEt",&fTotEt,"fTotEt/D"); | |
1649 | fPrimaryTree->Branch("fNeutralMultiplicity", &fNeutralMultiplicity, "fNeutralMultiplicity/I"); | |
1650 | fPrimaryTree->Branch("fCentClass",&fCentClass,"fCentClass/I"); | |
1651 | ||
1652 | fPrimaryTree->Branch("fPrimaryCode", &fPrimaryCode, "fPrimaryCode/I"); | |
1653 | fPrimaryTree->Branch("fPrimaryCharge", &fPrimaryCharge, "fPrimaryCharge/I"); | |
1654 | ||
1655 | fPrimaryTree->Branch("fPrimaryE", &fPrimaryE, "fPrimaryE/D"); | |
1656 | fPrimaryTree->Branch("fPrimaryEt", &fPrimaryEt, "fPrimaryEt/D"); | |
1657 | ||
1658 | fPrimaryTree->Branch("fPrimaryPx", &fPrimaryPx, "fPrimaryPx/D"); | |
1659 | fPrimaryTree->Branch("fPrimaryPy", &fPrimaryPy, "fPrimaryPy/D"); | |
1660 | fPrimaryTree->Branch("fPrimaryPz", &fPrimaryPz, "fPrimaryPz/D"); | |
1661 | ||
1662 | fPrimaryTree->Branch("fPrimaryVx", &fPrimaryVx, "fPrimaryVx/D"); | |
1663 | fPrimaryTree->Branch("fPrimaryVy", &fPrimaryVy, "fPrimaryVy/D"); | |
1664 | fPrimaryTree->Branch("fPrimaryVz", &fPrimaryVz, "fPrimaryVz/D"); | |
1665 | ||
1666 | fPrimaryTree->Branch("fPrimaryAccepted", &fPrimaryAccepted, "fPrimaryAccepted/B"); | |
b2c10007 | 1667 | fPrimaryTree->Branch("fPrimaryMatched", &fPrimaryMatched, "fPrimaryMatched/B"); |
f61cec2f | 1668 | |
1669 | ||
1670 | fPrimaryTree->Branch("fDepositedCode", &fDepositedCode, "fDepositedCode/I"); | |
1671 | fPrimaryTree->Branch("fDepositedCharge", &fDepositedCharge, "fDepositedCharge/I"); | |
b2c10007 | 1672 | fPrimaryTree->Branch("fDepositedE", &fDepositedE, "fDepositedE/D"); |
f61cec2f | 1673 | fPrimaryTree->Branch("fDepositedEt", &fDepositedEt, "fDepositedEt/D"); |
1674 | ||
1675 | fPrimaryTree->Branch("fDepositedVx", &fDepositedVx, "fDepositedVx/D"); | |
1676 | fPrimaryTree->Branch("fDepositedVy", &fDepositedVy, "fDepositedVy/D"); | |
1677 | fPrimaryTree->Branch("fDepositedVz", &fDepositedVz, "fDepositedVz/D"); | |
1678 | ||
b2c10007 | 1679 | fPrimaryTree->Branch("fSecondary", &fSecondary, "fSecondary/I"); |
1680 | ||
1681 | ||
1682 | fPrimaryTree->Branch("fReconstructedE", &fReconstructedE, "fReconstructedE/D"); | |
1683 | fPrimaryTree->Branch("fReconstructedEt", &fReconstructedEt, "fReconstructedEt/D"); | |
1684 | ||
1685 | fPrimaryTree->Branch("fClusterMult", &fClusterMult, "fClusterMult/I"); | |
1686 | ||
1687 | ||
f61cec2f | 1688 | } |
1689 | ||
9ef6f13f | 1690 | fHistGammasFound = new TH1F("fHistGammasFound", "fHistGammasFound",200, 0, 10); |
1691 | fHistGammasGenerated = new TH1F("fHistGammasGenerated", "fHistGammasGenerated",200, 0, 10); | |
9a365626 | 1692 | fHistGammasFoundOutOfAccCent = new TH2F("fHistGammasFoundOutOfAccCent", "fHistGammasFoundOutOfAccCent",200, 0, 10,20,-0.5,19.5); |
5881f036 | 1693 | fHistGammasFoundCent = new TH2F("fHistGammasFoundCent", "fHistGammasFoundCent",200, 0, 10,20,-0.5,19.5); |
1694 | fHistGammasGeneratedCent = new TH2F("fHistGammasGeneratedCent", "fHistGammasGeneratedCent",200, 0, 10,20,-0.5,19.5); | |
9ef6f13f | 1695 | fHistChargedTracksCut = new TH1F("fHistChargedTracksCut", "fHistChargedTracksCut",100, 0, 5); |
1696 | fHistChargedTracksAccepted = new TH1F("fHistChargedTracksAccepted", "fHistChargedTracksAccepted",100, 0, 5); | |
1697 | fHistGammasCut = new TH1F("fHistGammasTracksCut", "fHistGammasTracksCut",100, 0, 5); | |
1698 | fHistGammasAccepted = new TH1F("fHistGammasTracksAccepted", "fHistGammasTracksAccepted",100, 0, 5); | |
0861cc1f | 1699 | |
1700 | if(fCalcTrackMatchVsMult){ | |
1701 | fHistChargedTracksCutMult = new TH2F("fHistChargedTracksCutMult", "fHistChargedTracksCutMult",100, 0, 5,10,0,100); | |
1702 | fHistChargedTracksAcceptedMult = new TH2F("fHistChargedTracksAcceptedMult", "fHistChargedTracksAcceptedMult",100, 0, 5,10,0,100); | |
5881f036 | 1703 | fHistChargedTracksAcceptedLowPtCent = new TH2F("fHistChargedTracksAcceptedLowPtCent", "fHistChargedTracksAcceptedLowPtCent",100, 0, 5,20,-0.5,19.5); |
1704 | fHistChargedTracksAcceptedLowPtCent500MeV = new TH2F("fHistChargedTracksAcceptedLowPtCent500MeV", "fHistChargedTracksAcceptedLowPtCent500MeV",100, 0, 5,20,-0.5,19.5); | |
1705 | fHistChargedTracksAcceptedLowPtCentNoAntiProtons = new TH2F("fHistChargedTracksAcceptedLowPtCentNoAntiProtons", "fHistChargedTracksAcceptedLowPtCentNoAntiProtons",100, 0, 5,20,-0.5,19.5); | |
1706 | fHistChargedTracksAcceptedLowPtCentAntiProtons = new TH2F("fHistChargedTracksAcceptedLowPtCentAntiProtons", "fHistChargedTracksAcceptedLowPtCentAntiProtons",100, 0, 5,20,-0.5,19.5); | |
0861cc1f | 1707 | fHistGammasCutMult = new TH2F("fHistGammasTracksCutMult", "fHistGammasTracksCutMult",100, 0, 5,10,0,100); |
1708 | fHistGammasAcceptedMult = new TH2F("fHistGammasTracksAcceptedMult", "fHistGammasTracksAcceptedMult",100, 0, 5,10,0,100); | |
1709 | } | |
1710 | ||
9ef6f13f | 1711 | fHistBadTrackMatches = new TH1F("fHistBadTrackMatches", "fHistBadTrackMatches",100, 0, 5); |
1712 | fHistMatchedTracksEvspTBkgd = new TH2F("fHistMatchedTracksEvspTBkgd", "fHistMatchedTracksEvspTBkgd",100, 0, 3,100,0,3); | |
1713 | fHistMatchedTracksEvspTSignal = new TH2F("fHistMatchedTracksEvspTSignal", "fHistMatchedTracksEvspTSignal",100, 0, 3,100,0,3); | |
0861cc1f | 1714 | if(fCalcTrackMatchVsMult){ |
1715 | fHistMatchedTracksEvspTBkgdPeripheral = new TH2F("fHistMatchedTracksEvspTBkgdPeripheral", "fHistMatchedTracksEvspTBkgd",100, 0, 3,100,0,3); | |
1716 | fHistMatchedTracksEvspTSignalPeripheral = new TH2F("fHistMatchedTracksEvspTSignalPeripheral", "fHistMatchedTracksEvspTSignal",100, 0, 3,100,0,3); | |
1717 | ||
5881f036 | 1718 | fHistMatchedTracksEvspTBkgdvsCent = new TH3F("fHistMatchedTracksEvspTBkgdvsCent", "fHistMatchedTracksEvspTBkgdvsCent",100, 0, 3,100,0,3,20,-0.5,19.5); |
1719 | fHistMatchedTracksEvspTSignalvsCent = new TH3F("fHistMatchedTracksEvspTSignalvsCent", "fHistMatchedTracksEvspTSignalvsCent",100, 0, 3,100,0,3,20,-0.5,19.5); | |
1720 | fHistMatchedTracksEvspTBkgdvsCentEffCorr = new TH3F("fHistMatchedTracksEvspTBkgdvsCentEffCorr", "fHistMatchedTracksEvspTBkgdvsCent",100, 0, 3,100,0,3,20,-0.5,19.5); | |
1721 | fHistMatchedTracksEvspTSignalvsCentEffCorr = new TH3F("fHistMatchedTracksEvspTSignalvsCentEffCorr", "fHistMatchedTracksEvspTSignalvsCent",100, 0, 3,100,0,3,20,-0.5,19.5); | |
0861cc1f | 1722 | |
1723 | ||
1724 | fHistChargedTracksCutPeripheral = new TH1F("fHistChargedTracksCutPeripheral", "fHistChargedTracksCut",100, 0, 5); | |
1725 | fHistChargedTracksAcceptedPeripheral = new TH1F("fHistChargedTracksAcceptedPeripheral", "fHistChargedTracksAccepted",100, 0, 5); | |
1726 | fHistGammasCutPeripheral = new TH1F("fHistGammasTracksCutPeripheral", "fHistGammasTracksCut",100, 0, 5); | |
1727 | fHistGammasAcceptedPeripheral = new TH1F("fHistGammasTracksAcceptedPeripheral", "fHistGammasTracksAccepted",100, 0, 5); | |
1728 | } | |
9ef6f13f | 1729 | fHistBadTrackMatchesdPhidEta = new TH2F("fHistBadTrackMatchesdPhidEta", "fHistBadTrackMatchesdPhidEta",20, -0.1, 0.1,20,-.1,0.1); |
1730 | fHistGoodTrackMatchesdPhidEta = new TH2F("fHistGoodTrackMatchesdPhidEta", "fHistGoodTrackMatchesdPhidEta",20, -0.1, 0.1,20,-.1,0.1); | |
c79c36cc | 1731 | |
1732 | fHistHadronDepositsAll = new TH1F("fHistHadronDepositsAll","All Hadrons which deposited energy in calorimeter",fgNumOfPtBins,fgPtAxis); | |
1733 | fHistHadronDepositsReco = new TH1F("fHistHadronDepositsReco","Reconstructed Hadrons which deposited energy in calorimeter",fgNumOfPtBins,fgPtAxis); | |
1734 | //,10,0,100 | |
1735 | Int_t nMult = 20; | |
1736 | Float_t nMultCuts[21] = { 0, 5,10,15,20, 25,30,35,40,45, | |
1737 | 50,55,60,65,70, 75,80,85,90,95, | |
1738 | 100}; | |
ac610b08 | 1739 | Int_t nCent = 20; |
1740 | Float_t nCentCuts[21] = { 0, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}; | |
c79c36cc | 1741 | |
ac610b08 | 1742 | fHistHadronDepositsAllCent = new TH2F("fHistHadronDepositsAllCent","All Hadrons which deposited energy in calorimeter",fgNumOfPtBins,fgPtAxis,nCent,nCentCuts); |
5881f036 | 1743 | fHistHadronDepositsAllCent500MeV = new TH2F("fHistHadronDepositsAllCent500MeV","All Hadrons which deposited energy in calorimeter pT>500MeV",fgNumOfPtBins,fgPtAxis,nCent,nCentCuts); |
ac610b08 | 1744 | fHistHadronDepositsRecoCent = new TH2F("fHistHadronDepositsRecoCent","Reconstructed Hadrons which deposited energy in calorimeter",fgNumOfPtBins,fgPtAxis,nCent,nCentCuts); |
d3ce32b8 | 1745 | |
ac610b08 | 1746 | fHistHadronsAllCent = new TH2F("fHistHadronsAllCent","All Hadrons vs cluster mult",fgNumOfPtBins,fgPtAxis,nCent,nCentCuts); |
d3ce32b8 | 1747 | |
1748 | fHistMultChVsSignalVsMult = new TH3F("fHistMultChVsSignalVsMult","Charged particle Multiplicity vs Signal particle multiplicity vs Cluster Mult",nMult,nMultCuts,nMult,nMultCuts,nMult,nMultCuts); | |
9a365626 | 1749 | fHistNeutralRemovedSecondaryEtVsCent = new TH2F("fHistNeutralRemovedSecondaryEtVsCent","Neutral Removed Secondaries E_{T} vs centrality",100,0.0,2.0,20,-0.5,19.5); |
1750 | fHistChargedRemovedSecondaryEtVsCent = new TH2F("fHistChargedRemovedSecondaryEtVsCent","Charged Removed Secondaries E_{T} vs centrality",100,0.0,2.0,20,-0.5,19.5); | |
1751 | fHistNeutralNotRemovedSecondaryEtVsCent = new TH2F("fHistNeutralNotRemovedSecondaryEtVsCent","Neutral NotRemoved Secondaries E_{T} vs centrality",100,0.0,2.0,20,-0.5,19.5); | |
1752 | fHistChargedNotRemovedSecondaryEtVsCent = new TH2F("fHistChargedNotRemovedSecondaryEtVsCent","Charged NotRemoved Secondaries E_{T} vs centrality",100,0.0,2.0,20,-0.5,19.5); | |
1753 | fHistNeutralRemovedSecondaryNumVsNCluster = new TH2F("fHistNeutralRemovedSecondaryNumVsNCluster","Neutral Removed Secondaries Number vs N_{cluster}",20,-0.5,19.5,250,0,250); | |
1754 | fHistChargedRemovedSecondaryNumVsNCluster = new TH2F("fHistChargedRemovedSecondaryNumVsNCluster","Charged Removed Secondaries Number vs N_{cluster}",20,-0.5,19.5,250,0,250); | |
1755 | fHistNeutralNotRemovedSecondaryNumVsNCluster = new TH2F("fHistNeutralNotRemovedSecondaryNumVsNCluster","Neutral NotRemoved Secondaries Number vs N_{cluster}",20,-0.5,19.5,250,0,250); | |
1756 | fHistChargedNotRemovedSecondaryNumVsNCluster = new TH2F("fHistChargedNotRemovedSecondaryNumVsNCluster","Charged NotRemoved Secondaries Number vs N_{cluster}",20,-0.5,19.5,250,0,250); | |
1757 | fHistNeutralRemovedSecondaryNumVsCent = new TH2F("fHistNeutralRemovedSecondaryNumVsCent","Neutral Removed Secondaries Number vs N_{cluster}",20,-0.5,19.5,20,-0.5,19.5); | |
1758 | fHistChargedRemovedSecondaryNumVsCent = new TH2F("fHistChargedRemovedSecondaryNumVsCent","Charged Removed Secondaries Number vs N_{cluster}",20,-0.5,19.5,20,-0.5,19.5); | |
1759 | fHistNeutralNotRemovedSecondaryNumVsCent = new TH2F("fHistNeutralNotRemovedSecondaryNumVsCent","Neutral NotRemoved Secondaries Number vs N_{cluster}",20,-0.5,19.5,20,-0.5,19.5); | |
1760 | fHistChargedNotRemovedSecondaryNumVsCent = new TH2F("fHistChargedNotRemovedSecondaryNumVsCent","Charged NotRemoved Secondaries Number vs N_{cluster}",20,-0.5,19.5,20,-0.5,19.5); | |
1761 | fHistNeutronsEtVsCent = new TH2F("fHistNeutronsEtVsCent","Neutrons and anti-neutrons - deposited ET vs Centrality bin",100,0,4.0,20,-0.5,19.5); | |
1762 | fHistNeutronsNumVsCent = new TH2F("fHistNeutronsNumVsCent","Neutrons and anti-neutrons - number vs Centrality bin",20,-0.5,19.5,20,-0.5,19.5); | |
1763 | fHistNotNeutronsNumVsCent = new TH2F("fHistNotNeutronsNumVsCent","Neutral particles not otherwise classified - number vs Centrality bin",20,-0.5,19.5,20,-0.5,19.5); | |
1764 | Int_t nbinsEt = 125; | |
1765 | Float_t maxEtRange = 125; | |
1766 | Float_t maxEtRangeShort = 25; | |
1767 | Float_t minEtRange = 0; | |
1768 | Int_t nbinsMult = 100; | |
1769 | Float_t maxMult = 3000; | |
1770 | Float_t minMult = 0; | |
03cff249 | 1771 | Int_t nbinsCl = 175; |
1772 | Float_t maxCl = 350; | |
9a365626 | 1773 | Float_t minCl = 0; |
1774 | fHistPiKPDepositedVsNch = new TH2F("fHistPiKPDepositedVsNch","#pi,K,p E_{T} deposited in calorimeter vs multiplicity",nbinsEt,minEtRange,maxEtRange,nbinsMult,minMult,maxMult); | |
1775 | fHistPiKPNotTrackMatchedDepositedVsNch = new TH2F("fHistPiKPNotTrackMatchedDepositedVsNch","#pi,K,p E_{T} deposited in calorimeter vs multiplicity",nbinsEt,minEtRange,maxEtRange,nbinsMult,minMult,maxMult); | |
1776 | fHistNeutronsDepositedVsNch = new TH2F("fHistNeutronsDepositedVsNch","n deposited in calorimeter vs multiplicity",nbinsEt,minEtRange,maxEtRangeShort,nbinsMult,minMult,maxMult); | |
1777 | fHistAntiNeutronsDepositedVsNch = new TH2F("fHistAntiNeutronsDepositedVsNch","#bar{n} deposited in calorimeter vs multiplicity",nbinsEt,minEtRange,maxEtRangeShort,nbinsMult,minMult,maxMult); | |
1778 | fHistProtonsDepositedVsNch = new TH2F("fHistProtonsDepositedVsNch","p deposited in calorimeter vs multiplicity",nbinsEt,minEtRange,maxEtRangeShort,nbinsMult,minMult,maxMult); | |
1779 | fHistAntiProtonsDepositedVsNch = new TH2F("fHistAntiProtonsDepositedVsNch","#bar{p} deposited in calorimeter vs multiplicity",nbinsEt,minEtRange,maxEtRangeShort,nbinsMult,minMult,maxMult); | |
1780 | fHistProtonsNotTrackMatchedDepositedVsNch = new TH2F("fHistProtonsNotTrackMatchedDepositedVsNch","p not track matched deposited in calorimeter vs multiplicity",nbinsEt,minEtRange,maxEtRangeShort,nbinsMult,minMult,maxMult); | |
1781 | fHistAntiProtonsNotTrackMatchedDepositedVsNch = new TH2F("fHistAntiProtonsNotTrackMatchedDepositedVsNch","#bar{p} not track matched deposited in calorimeter vs multiplicity",nbinsEt,minEtRange,maxEtRangeShort,nbinsMult,minMult,maxMult); | |
1782 | fHistSecondariesVsNch = new TH2F("fHistSecondariesVsNch","secondaries deposited in calorimeter vs multiplicity",nbinsEt,minEtRange,maxEtRangeShort,nbinsMult,minMult,maxMult); | |
1783 | fHistSecondariesVsNcl = new TH2F("fHistSecondariesVsNcl","secondaries deposited in calorimeter vs number of clusters",nbinsEt,minEtRange,maxEtRangeShort,nbinsCl,minCl,maxCl); | |
1784 | fHistSecondariesEffCorrVsNch = new TH2F("fHistSecondariesEffCorrVsNch","efficiency corrected secondaries deposited in calorimeter vs multiplicity",nbinsEt,minEtRange,maxEtRangeShort,nbinsMult,minMult,maxMult); | |
1785 | fHistSecondariesEffCorrVsNcl = new TH2F("fHistSecondariesEffCorrVsNcl","efficiency corrected secondaries deposited in calorimeter vs number of clusters",nbinsEt,minEtRange,maxEtRangeShort,nbinsCl,minCl,maxCl); | |
0c7f27cb | 1786 | |
1787 | fHistSecondariesOutOfAccEffCorrVsNch = new TH2F("fHistSecondariesOutOfAccEffCorrVsNch","efficiency corrected secondaries deposited in calorimeter vs number of clusters for secondary particles out of detector acceptance",nbinsEt,minEtRange,maxEtRangeShort/10.0,nbinsMult,minMult,maxMult); | |
1788 | fHistSecondariesDetectorCoverEffCorrVsNch = new TH2F("fHistSecondariesDetectorCoverEffCorrVsNch","efficiency corrected secondaries deposited in calorimeter vs number of clusters for secondaries from the detector cover",nbinsEt,minEtRange,maxEtRangeShort/10.0,nbinsMult,minMult,maxMult); | |
9a365626 | 1789 | fHistCentVsNchVsNcl = new TH3F("fHistCentVsNchVsNcl","Cent bin vs Nch Vs NCl",20,-0.5,19.5,nbinsMult,minMult,maxMult,nbinsCl,minCl,maxCl); |
b986cebe | 1790 | //float maxpos = 500; |
1791 | // int nbinspos = 200; | |
1792 | // fHistSecondaryPositionInDetector = new TH3F("fHistSecondaryPositionInDetector","Position of secondaries",nbinspos,-maxpos,maxpos,nbinspos,-maxpos,maxpos,nbinspos,-maxpos,maxpos); | |
1793 | // fHistSecondaryPositionInDetector->GetXaxis()->SetTitle("X"); | |
1794 | // fHistSecondaryPositionInDetector->GetYaxis()->SetTitle("Y"); | |
1795 | // fHistSecondaryPositionInDetector->GetZaxis()->SetTitle("Z"); | |
1796 | // fHistSecondaryPositionInDetectorMultiple = new TH3F("fHistSecondaryPositionInDetectorMultiple","Position of secondaries",nbinspos,-maxpos,maxpos,nbinspos,-maxpos,maxpos,nbinspos,-maxpos,maxpos); | |
1797 | // fHistSecondaryPositionInDetectorMultiple->GetXaxis()->SetTitle("X"); | |
1798 | // fHistSecondaryPositionInDetectorMultiple->GetYaxis()->SetTitle("Y"); | |
1799 | // fHistSecondaryPositionInDetectorMultiple->GetZaxis()->SetTitle("Z"); | |
32503dac | 1800 | fClusterPositionWeird = new TH2F("fClusterPositionWeird", "Position of weird secondary clusters",300, -TMath::Pi(),TMath::Pi(), 100, -0.7 , 0.7); |
b986cebe | 1801 | |
1802 | fSecondaryClusterEnergy = new TH1F("fSecondaryClusterEnergy","fSecondaryClusterEnergy", 100, 0, 5); | |
ce546038 | 1803 | } |
1804 | ||
0651f6b4 | 1805 | void AliAnalysisEtMonteCarlo::FillOutputList(TList *list) |
f61cec2f | 1806 | { //fill the output list |
e2ee5727 | 1807 | AliAnalysisEt::FillOutputList(list); |
1808 | ||
c79c36cc | 1809 | if(!fIsMC) return; |
f61cec2f | 1810 | if(fCuts->GetHistMakeTree()) |
1811 | { | |
1812 | list->Add(fPrimaryTree); | |
1813 | } | |
1814 | ||
e2ee5727 | 1815 | list->Add(fHistRemovedOrNot); |
1816 | ||
1817 | list->Add(fHistEtNonRemovedProtons); | |
1818 | list->Add(fHistEtNonRemovedAntiProtons); | |
1819 | list->Add(fHistEtNonRemovedPiPlus); | |
1820 | list->Add(fHistEtNonRemovedPiMinus); | |
1821 | list->Add(fHistEtNonRemovedKaonPlus); | |
1822 | list->Add(fHistEtNonRemovedKaonMinus); | |
1823 | list->Add(fHistEtNonRemovedK0s); | |
ef647350 | 1824 | list->Add(fHistEtNonRemovedK0L); |
e2ee5727 | 1825 | list->Add(fHistEtNonRemovedLambdas); |
1826 | list->Add(fHistEtNonRemovedElectrons); | |
1827 | list->Add(fHistEtNonRemovedPositrons); | |
1828 | list->Add(fHistEtNonRemovedMuPlus); | |
1829 | list->Add(fHistEtNonRemovedMuMinus); | |
1830 | list->Add(fHistEtNonRemovedNeutrons); | |
1831 | list->Add(fHistEtNonRemovedAntiNeutrons); | |
1832 | list->Add(fHistEtNonRemovedGammas); | |
1833 | list->Add(fHistEtNonRemovedGammasFromPi0); | |
1834 | ||
1835 | list->Add(fHistEtRemovedGammas); | |
1836 | list->Add(fHistEtRemovedNeutrons); | |
1837 | list->Add(fHistEtRemovedAntiNeutrons); | |
1838 | ||
ef647350 | 1839 | list->Add(fHistEtRemovedCharged); |
1840 | list->Add(fHistEtRemovedNeutrals); | |
1841 | ||
1842 | list->Add(fHistEtNonRemovedCharged); | |
1843 | list->Add(fHistEtNonRemovedNeutrals); | |
e2ee5727 | 1844 | |
1845 | list->Add(fHistMultNonRemovedProtons); | |
1846 | list->Add(fHistMultNonRemovedAntiProtons); | |
1847 | list->Add(fHistMultNonRemovedPiPlus); | |
1848 | list->Add(fHistMultNonRemovedPiMinus); | |
1849 | list->Add(fHistMultNonRemovedKaonPlus); | |
1850 | list->Add(fHistMultNonRemovedKaonMinus); | |
1851 | list->Add(fHistMultNonRemovedK0s); | |
ef647350 | 1852 | list->Add(fHistMultNonRemovedK0L); |
e2ee5727 | 1853 | list->Add(fHistMultNonRemovedLambdas); |
1854 | list->Add(fHistMultNonRemovedElectrons); | |
1855 | list->Add(fHistMultNonRemovedPositrons); | |
1856 | list->Add(fHistMultNonRemovedMuPlus); | |
1857 | list->Add(fHistMultNonRemovedMuMinus); | |
1858 | list->Add(fHistMultNonRemovedNeutrons); | |
1859 | list->Add(fHistMultNonRemovedAntiNeutrons); | |
1860 | list->Add(fHistMultNonRemovedGammas); | |
1861 | ||
1862 | list->Add(fHistMultRemovedGammas); | |
1863 | list->Add(fHistMultRemovedNeutrons); | |
1864 | list->Add(fHistMultRemovedAntiNeutrons); | |
1865 | ||
ef647350 | 1866 | list->Add(fHistMultRemovedCharged); |
1867 | list->Add(fHistMultRemovedNeutrals); | |
1868 | ||
1869 | list->Add(fHistMultNonRemovedCharged); | |
1870 | list->Add(fHistMultNonRemovedNeutrals); | |
1871 | ||
e2ee5727 | 1872 | list->Add(fHistTrackMultvsNonRemovedCharged); |
1873 | list->Add(fHistTrackMultvsNonRemovedNeutral); | |
1874 | list->Add(fHistTrackMultvsRemovedGamma); | |
1875 | ||
1876 | list->Add(fHistClusterMultvsNonRemovedCharged); | |
1877 | list->Add(fHistClusterMultvsNonRemovedNeutral); | |
1878 | list->Add(fHistClusterMultvsRemovedGamma); | |
1879 | ||
1880 | //list->Add(fHistDecayVertexNonRemovedCharged); | |
1881 | //list->Add(fHistDecayVertexNonRemovedNeutral); | |
1882 | //list->Add(fHistDecayVertexRemovedCharged); | |
1883 | //list->Add(fHistDecayVertexRemovedNeutral); | |
1884 | ||
1885 | list->Add(fHistDxDzNonRemovedCharged); | |
1886 | list->Add(fHistDxDzRemovedCharged); | |
1887 | list->Add(fHistDxDzNonRemovedNeutral); | |
1888 | list->Add(fHistDxDzRemovedNeutral); | |
1889 | ||
0861cc1f | 1890 | if(fCalcForKaonCorrection){ |
1891 | list->Add(fHistK0EDepositsVsPtInAcceptance); | |
1892 | list->Add(fHistK0EGammaVsPtInAcceptance); | |
1893 | list->Add(fHistK0EDepositsVsPtOutOfAcceptance); | |
1894 | list->Add(fHistK0EGammaVsPtOutOfAcceptance); | |
1895 | list->Add(fHistSimKaonsInAcceptance); | |
1896 | list->Add(fHistSimK0SInAcceptance); | |
1897 | list->Add(fHistSimK0LInAcceptance); | |
1898 | list->Add(fHistSimKPlusInAcceptance); | |
1899 | list->Add(fHistSimKMinusInAcceptance); | |
1900 | list->Add(fHistSimKaonsOutOfAcceptance); | |
1901 | list->Add(fHistSimKaonsInAcceptanceWithDepositsPrimaries); | |
1902 | list->Add(fHistSimKaonsOutOfAcceptanceWithDepositsSecondaries); | |
1903 | list->Add(fHistSimKaonsOutOfAcceptanceWithDepositsPrimaries); | |
1904 | } | |
2aab9269 | 1905 | |
e2ee5727 | 1906 | list->Add(fHistPiPlusMult); |
1907 | list->Add(fHistPiMinusMult); | |
1908 | list->Add(fHistPiZeroMult); | |
1909 | list->Add(fHistPiPlusMultAcc); | |
1910 | list->Add(fHistPiMinusMultAcc); | |
1911 | list->Add(fHistPiZeroMultAcc); | |
b2c10007 | 1912 | |
1913 | list->Add(fHistGammasFound); | |
1914 | list->Add(fHistGammasGenerated); | |
9a365626 | 1915 | list->Add(fHistGammasFoundOutOfAccCent); |
5881f036 | 1916 | list->Add(fHistGammasFoundCent); |
1917 | list->Add(fHistGammasGeneratedCent); | |
9ef6f13f | 1918 | list->Add(fHistChargedTracksCut); |
1919 | list->Add(fHistChargedTracksAccepted); | |
1920 | list->Add(fHistGammasCut); | |
1921 | list->Add(fHistGammasAccepted); | |
0861cc1f | 1922 | if(fCalcTrackMatchVsMult){ |
1923 | list->Add(fHistChargedTracksCutMult); | |
1924 | list->Add(fHistChargedTracksAcceptedMult); | |
ac610b08 | 1925 | list->Add(fHistChargedTracksAcceptedLowPtCent); |
5881f036 | 1926 | list->Add(fHistChargedTracksAcceptedLowPtCent500MeV); |
ac610b08 | 1927 | list->Add(fHistChargedTracksAcceptedLowPtCentNoAntiProtons); |
1928 | list->Add(fHistChargedTracksAcceptedLowPtCentAntiProtons); | |
0861cc1f | 1929 | list->Add(fHistGammasCutMult); |
1930 | list->Add(fHistGammasAcceptedMult); | |
1931 | } | |
9ef6f13f | 1932 | list->Add(fHistBadTrackMatches); |
1933 | list->Add(fHistMatchedTracksEvspTBkgd); | |
1934 | list->Add(fHistMatchedTracksEvspTSignal); | |
0861cc1f | 1935 | if(fCalcTrackMatchVsMult){ |
1936 | list->Add(fHistMatchedTracksEvspTBkgdPeripheral); | |
1937 | list->Add(fHistMatchedTracksEvspTSignalPeripheral); | |
ac610b08 | 1938 | list->Add(fHistMatchedTracksEvspTBkgdvsCent); |
1939 | list->Add(fHistMatchedTracksEvspTSignalvsCent); | |
1940 | list->Add(fHistMatchedTracksEvspTBkgdvsCentEffCorr); | |
1941 | list->Add(fHistMatchedTracksEvspTSignalvsCentEffCorr); | |
0861cc1f | 1942 | list->Add(fHistChargedTracksCutPeripheral); |
1943 | list->Add(fHistChargedTracksAcceptedPeripheral); | |
1944 | list->Add(fHistGammasCutPeripheral); | |
1945 | list->Add(fHistGammasAcceptedPeripheral); | |
1946 | } | |
9ef6f13f | 1947 | list->Add(fHistBadTrackMatchesdPhidEta); |
1948 | list->Add(fHistGoodTrackMatchesdPhidEta); | |
c79c36cc | 1949 | list->Add(fHistHadronDepositsAll); |
1950 | list->Add(fHistHadronDepositsReco); | |
ac610b08 | 1951 | list->Add(fHistHadronDepositsAllCent); |
5881f036 | 1952 | list->Add(fHistHadronDepositsAllCent500MeV); |
ac610b08 | 1953 | list->Add(fHistHadronDepositsRecoCent); |
1954 | list->Add(fHistHadronsAllCent); | |
d3ce32b8 | 1955 | list->Add(fHistMultChVsSignalVsMult); |
9a365626 | 1956 | list->Add(fHistNeutralRemovedSecondaryEtVsCent); |
1957 | list->Add(fHistChargedRemovedSecondaryEtVsCent); | |
1958 | list->Add(fHistNeutralNotRemovedSecondaryEtVsCent); | |
1959 | list->Add(fHistChargedNotRemovedSecondaryEtVsCent); | |
1960 | list->Add(fHistNeutralRemovedSecondaryNumVsNCluster); | |
1961 | list->Add(fHistChargedRemovedSecondaryNumVsNCluster); | |
1962 | list->Add(fHistNeutralNotRemovedSecondaryNumVsNCluster); | |
1963 | list->Add(fHistChargedNotRemovedSecondaryNumVsNCluster); | |
1964 | list->Add(fHistNeutralRemovedSecondaryNumVsCent); | |
1965 | list->Add(fHistChargedRemovedSecondaryNumVsCent); | |
1966 | list->Add(fHistNeutralNotRemovedSecondaryNumVsCent); | |
1967 | list->Add(fHistChargedNotRemovedSecondaryNumVsCent); | |
1968 | list->Add(fHistNeutronsEtVsCent); | |
1969 | list->Add(fHistNeutronsNumVsCent); | |
1970 | list->Add(fHistNotNeutronsNumVsCent); | |
1971 | list->Add(fHistPiKPDepositedVsNch); | |
1972 | list->Add(fHistPiKPNotTrackMatchedDepositedVsNch); | |
1973 | list->Add(fHistNeutronsDepositedVsNch); | |
1974 | list->Add(fHistAntiNeutronsDepositedVsNch); | |
1975 | list->Add(fHistProtonsDepositedVsNch); | |
1976 | list->Add(fHistAntiProtonsDepositedVsNch); | |
1977 | list->Add(fHistProtonsNotTrackMatchedDepositedVsNch); | |
1978 | list->Add(fHistAntiProtonsNotTrackMatchedDepositedVsNch); | |
1979 | list->Add(fHistSecondariesVsNch); | |
1980 | list->Add(fHistSecondariesVsNcl); | |
1981 | list->Add(fHistSecondariesEffCorrVsNch); | |
f4d97f7c | 1982 | list->Add(fHistSecondariesEffCorrVsNcl); |
b986cebe | 1983 | list->Add(fHistSecondariesOutOfAccEffCorrVsNch); |
1984 | list->Add(fHistSecondariesDetectorCoverEffCorrVsNch); | |
9a365626 | 1985 | list->Add(fHistCentVsNchVsNcl); |
b986cebe | 1986 | //list->Add(fHistSecondaryPositionInDetector); |
32503dac | 1987 | list->Add(fClusterPositionWeird); |
b986cebe | 1988 | //list->Add(fHistSecondaryPositionInDetectorMultiple); |
1989 | list->Add(fSecondaryClusterEnergy); | |
9a365626 | 1990 | |
e2ee5727 | 1991 | |
0651f6b4 | 1992 | } |
1993 | ||
1994 | ||
13b0d3c1 | 1995 | bool AliAnalysisEtMonteCarlo::TrackHitsCalorimeter(TParticle* part, Double_t magField) |
1996 | { | |
e2ee5727 | 1997 | // printf(" TrackHitsCalorimeter - magField %f\n", magField); |
1998 | AliESDtrack *esdTrack = new AliESDtrack(part); | |
1999 | // Printf("MC Propagating track: eta: %f, phi: %f, pt: %f", esdTrack->Eta(), esdTrack->Phi(), esdTrack->Pt()); | |
2000 | ||
2001 | Bool_t prop = esdTrack->PropagateTo(fDetectorRadius, magField); | |
2002 | ||
2003 | // if(prop) Printf("Track propagated, eta: %f, phi: %f, pt: %f", esdTrack->Eta(), esdTrack->Phi(), esdTrack->Pt()); | |
2004 | ||
f61cec2f | 2005 | bool status = prop && fSelector->CutGeometricalAcceptance(*esdTrack); |
e2ee5727 | 2006 | delete esdTrack; |
2007 | ||
2008 | return status; | |
2009 | } | |
2010 | ||
2011 | void AliAnalysisEtMonteCarlo::FillHistograms() | |
f61cec2f | 2012 | { // let base class fill its histograms, and us fill the local ones |
e2ee5727 | 2013 | AliAnalysisEt::FillHistograms(); |
c79c36cc | 2014 | if(!fIsMC) return; |
e2ee5727 | 2015 | //std::cout << fEtNonRemovedPiPlus << " " << fCentClass << std::endl; |
2016 | ||
2017 | fHistEtNonRemovedProtons->Fill(fEtNonRemovedProtons, fCentClass); | |
2018 | fHistEtNonRemovedAntiProtons->Fill(fEtNonRemovedAntiProtons, fCentClass); | |
2019 | fHistEtNonRemovedKaonPlus->Fill(fEtNonRemovedKaonPlus, fCentClass); | |
2020 | fHistEtNonRemovedKaonMinus->Fill(fEtNonRemovedKaonMinus, fCentClass); | |
ef647350 | 2021 | fHistEtNonRemovedK0s->Fill(fEtNonRemovedK0S, fCentClass); |
2022 | fHistEtNonRemovedK0L->Fill(fEtNonRemovedK0L, fCentClass); | |
e2ee5727 | 2023 | fHistEtNonRemovedLambdas->Fill(fEtNonRemovedLambdas, fCentClass); |
2024 | fHistEtNonRemovedPiPlus->Fill(fEtNonRemovedPiPlus, fCentClass); | |
2025 | fHistEtNonRemovedPiMinus->Fill(fEtNonRemovedPiMinus, fCentClass); | |
2026 | fHistEtNonRemovedElectrons->Fill(fEtNonRemovedElectrons, fCentClass); | |
2027 | fHistEtNonRemovedPositrons->Fill(fEtNonRemovedPositrons, fCentClass); | |
2028 | fHistEtNonRemovedMuPlus->Fill(fEtNonRemovedMuPlus, fCentClass); | |
2029 | fHistEtNonRemovedMuMinus->Fill(fEtNonRemovedMuMinus, fCentClass); | |
2030 | fHistEtNonRemovedNeutrons->Fill(fEtNonRemovedNeutrons, fCentClass); | |
2031 | fHistEtNonRemovedAntiNeutrons->Fill(fEtNonRemovedAntiNeutrons, fCentClass); | |
2032 | fHistEtNonRemovedGammas->Fill(fEtNonRemovedGammas, fCentClass); | |
2033 | fHistEtNonRemovedGammasFromPi0->Fill(fEtNonRemovedGammasFromPi0, fCentClass); | |
2034 | ||
ef647350 | 2035 | fHistEtRemovedGammas->Fill(fEtRemovedGammas, fNClusters); |
e2ee5727 | 2036 | fHistEtRemovedNeutrons->Fill(fEtRemovedNeutrons, fCentClass); |
2037 | fHistEtRemovedAntiNeutrons->Fill(fEtRemovedAntiNeutrons, fCentClass); | |
2038 | ||
ef647350 | 2039 | // fHistEtRemovedCharged->Fill(fEtRemovedAntiProtons+fEtRemovedElectrons+fEtRemovedKaonMinus+fEtRemovedKaonPlus |
2040 | // +fEtRemovedMuMinus+fEtRemovedMuPlus+fEtRemovedPiMinus+fEtRemovedPiPlus+fEtRemovedPositrons | |
2041 | // +fEtRemovedProtons. | |
2042 | // fCentClass); | |
2043 | // fHistEtRemovedNeutrals->Fill(fEtRemovedNeutrons+fEtRemovedAntiNeutrons, fCentClass); | |
f61cec2f | 2044 | // |
ef647350 | 2045 | // fHistEtNonRemovedCharged->Fill(fEtNonRemovedAntiProtons+fEtNonRemovedElectrons+fEtNonRemovedKaonMinus+fEtNonRemovedKaonPlus |
2046 | // +fEtNonRemovedMuMinus+fEtNonRemovedMuPlus+fEtNonRemovedPiMinus+fEtNonRemovedPiPlus+fEtNonRemovedPositrons | |
2047 | // +fEtNonRemovedProtons, | |
2048 | // fCentClass); | |
2049 | // fHistEtRemovedNeutrals->Fill(fEtNonRemovedNeutrons+fEtNonRemovedAntiNeutrons, fCentClass); | |
2050 | ||
2051 | fHistEtRemovedCharged->Fill(fEnergyChargedRemoved, fNClusters); | |
2052 | fHistEtRemovedNeutrals->Fill(fEnergyNeutralRemoved, fNClusters); | |
2053 | fHistEtNonRemovedCharged->Fill(fEnergyChargedNotRemoved, fNClusters); | |
2054 | fHistEtNonRemovedNeutrals->Fill(fEnergyNeutralNotRemoved, fNClusters); | |
f61cec2f | 2055 | |
ef647350 | 2056 | fHistMultRemovedCharged->Fill(fChargedRemoved, fNClusters); |
2057 | fHistMultRemovedNeutrals->Fill(fNeutralRemoved, fNClusters); | |
2058 | fHistMultNonRemovedCharged->Fill(fChargedNotRemoved, fNClusters); | |
2059 | fHistMultNonRemovedNeutrals->Fill(fNeutralNotRemoved, fNClusters); | |
f61cec2f | 2060 | |
2061 | ||
e2ee5727 | 2062 | fHistMultNonRemovedProtons->Fill(fMultNonRemovedProtons, fCentClass); |
2063 | fHistMultNonRemovedAntiProtons->Fill(fMultNonRemovedAntiProtons, fCentClass); | |
2064 | fHistMultNonRemovedKaonPlus->Fill(fMultNonRemovedKaonPlus, fCentClass); | |
2065 | fHistMultNonRemovedKaonMinus->Fill(fMultNonRemovedKaonMinus, fCentClass); | |
2066 | fHistMultNonRemovedK0s->Fill(fMultNonRemovedK0s, fCentClass); | |
ef647350 | 2067 | fHistMultNonRemovedK0L->Fill(fMultNonRemovedK0L, fCentClass); |
e2ee5727 | 2068 | fHistMultNonRemovedLambdas->Fill(fMultNonRemovedLambdas, fCentClass); |
2069 | fHistMultNonRemovedPiPlus->Fill(fMultNonRemovedPiPlus, fCentClass); | |
2070 | fHistMultNonRemovedPiMinus->Fill(fMultNonRemovedPiMinus, fCentClass); | |
2071 | fHistMultNonRemovedElectrons->Fill(fMultNonRemovedElectrons, fCentClass); | |
2072 | fHistMultNonRemovedPositrons->Fill(fMultNonRemovedPositrons, fCentClass); | |
2073 | fHistMultNonRemovedMuPlus->Fill(fMultNonRemovedMuPlus, fCentClass); | |
2074 | fHistMultNonRemovedMuMinus->Fill(fMultNonRemovedMuMinus, fCentClass); | |
2075 | fHistMultNonRemovedNeutrons->Fill(fMultNonRemovedNeutrons, fCentClass); | |
2076 | fHistMultNonRemovedAntiNeutrons->Fill(fMultNonRemovedAntiNeutrons, fCentClass); | |
2077 | fHistMultNonRemovedGammas->Fill(fMultNonRemovedGammas, fCentClass); | |
2078 | ||
2079 | fHistMultRemovedGammas->Fill(fMultRemovedGammas, fCentClass); | |
2080 | fHistMultRemovedNeutrons->Fill(fMultRemovedNeutrons, fCentClass); | |
2081 | fHistMultRemovedAntiNeutrons->Fill(fMultRemovedAntiNeutrons, fCentClass); | |
2082 | ||
2083 | fHistTrackMultvsNonRemovedCharged->Fill(fTrackMultInAcc, | |
2084 | fMultNonRemovedAntiProtons+fMultNonRemovedElectrons+fMultNonRemovedKaonMinus+fMultNonRemovedKaonPlus | |
2085 | +fMultNonRemovedMuMinus+fMultNonRemovedMuPlus+fMultNonRemovedPiMinus+fMultNonRemovedPiPlus+fMultNonRemovedPositrons | |
2086 | +fMultNonRemovedProtons); | |
2087 | ||
2088 | fHistTrackMultvsNonRemovedNeutral->Fill(fTrackMultInAcc, | |
b2c10007 | 2089 | fMultNonRemovedNeutrons+fMultNonRemovedAntiNeutrons+fMultNonRemovedK0s+fMultNonRemovedK0L+fMultNonRemovedLambdas+fK0sMult); |
e2ee5727 | 2090 | |
2091 | fHistTrackMultvsRemovedGamma->Fill(fTrackMultInAcc, | |
2092 | fMultRemovedGammas); | |
2093 | ||
ef647350 | 2094 | fHistClusterMultvsNonRemovedCharged->Fill(fNClusters, |
e2ee5727 | 2095 | fMultNonRemovedAntiProtons+fMultNonRemovedElectrons+fMultNonRemovedKaonMinus |
2096 | +fMultNonRemovedKaonPlus+fMultNonRemovedMuMinus+fMultNonRemovedMuPlus | |
2097 | +fMultNonRemovedPiMinus+fMultNonRemovedPiPlus+fMultNonRemovedPositrons+fMultNonRemovedProtons); | |
2098 | ||
ef647350 | 2099 | fHistClusterMultvsNonRemovedNeutral->Fill(fNClusters, |
b2c10007 | 2100 | fMultNonRemovedNeutrons+fMultNonRemovedAntiNeutrons+fMultNonRemovedK0s+fMultNonRemovedK0L+fMultNonRemovedLambdas+fK0sMult); |
e2ee5727 | 2101 | |
ef647350 | 2102 | fHistClusterMultvsRemovedGamma->Fill(fNClusters, |
e2ee5727 | 2103 | fMultRemovedGammas); |
2104 | ||
13b0d3c1 | 2105 | } |
2106 | ||
e2ee5727 | 2107 | |
2108 | ||
2109 | ||
ef647350 | 2110 | Int_t AliAnalysisEtMonteCarlo::PrintFamilyTree(Int_t partIdx, AliStack* stack) |
4d376d01 | 2111 | { // print family tree |
f61cec2f | 2112 | TParticle *part = stack->Particle(partIdx); |
b2c10007 | 2113 | // if(part->GetPdgCode() == fgK0SCode) |
f61cec2f | 2114 | { |
2115 | std::cout << "This is index: " << partIdx << " (" << stack->Particle(partIdx)->GetName() <<") , is it primary: " << stack->IsPhysicalPrimary(partIdx)<< std::endl; | |
2116 | std::cout << "PID: " << part->GetPdgCode() << "/" << part->GetName() << std::endl; | |
2117 | std::cout << "Energy: " << part->Energy() << std::endl; | |
03cff249 | 2118 | Float_t vtx = TMath::Sqrt( TMath::Power(part->Vx(),2) + TMath::Power(part->Vy(),2) + TMath::Power(part->Vz(),2) ); |
2119 | std::cout << "Vertex: " << part->Vx() << ", " << part->Vy() << ", " << part->Vz() <<"|Vtx| "<<vtx << std::endl; | |
f61cec2f | 2120 | } |
2121 | return PrintMothers(partIdx, stack, 1); | |
ef647350 | 2122 | } |
2123 | ||
2124 | Int_t AliAnalysisEtMonteCarlo::PrintMothers(Int_t partIdx, AliStack* stack, Int_t gen) | |
4d376d01 | 2125 | { // print mothers |
f61cec2f | 2126 | char *tabs = new char[gen+1]; |
2127 | for(Int_t i = 0; i < gen; ++i) | |
2128 | { | |
2129 | //std::cout << i << std::endl; | |
2130 | tabs[i] = '\t'; | |
2131 | } | |
2132 | tabs[gen] = '\0'; | |
2133 | Int_t mothIdx = stack->Particle(partIdx)->GetMother(0); | |
2134 | if(mothIdx < 0) | |
2135 | { | |
2136 | delete [] tabs; | |
2137 | return 0; | |
2138 | } | |
2139 | TParticle *mother = stack->Particle(mothIdx); | |
b2c10007 | 2140 | // if(mother->GetPdgCode() == fgK0SCode) |
f61cec2f | 2141 | { |
b2c10007 | 2142 | //std::cout << tabs << "Mother of index: " << partIdx << " (" << stack->Particle(partIdx)->GetName() <<") is: " << mothIdx << ", is it primary: " << stack->IsPhysicalPrimary(mothIdx)<< std::endl; |
2143 | std::cout << tabs << "Index: " << mothIdx << std::endl; | |
2144 | std::cout << tabs << "Primary: " << stack->IsPhysicalPrimary(mothIdx) << std::endl; | |
f61cec2f | 2145 | std::cout << tabs << "PID: " << mother->GetPdgCode() << "/" << mother->GetName() << std::endl; |
2146 | std::cout << tabs << "Energy: " << mother->Energy() << std::endl; | |
b2c10007 | 2147 | if(mother->GetFirstMother() >= 0) |
2148 | { | |
2149 | std::cout << tabs << "Mother(s): " << stack->Particle(mother->GetFirstMother())->GetPdgCode(); | |
2150 | if(mother->GetSecondMother() >= 0) std::cout << ", " << stack->Particle(mother->GetSecondMother())->GetPdgCode(); | |
2151 | std::cout << std::endl; | |
2152 | } | |
03cff249 | 2153 | Float_t vtx = TMath::Sqrt( TMath::Power(mother->Vx(),2) + TMath::Power(mother->Vy(),2) + TMath::Power(mother->Vz(),2) ); |
2154 | std::cout<<tabs << "Vertex: " << mother->Vx() << ", " << mother->Vy() << ", " << mother->Vz() <<"|Vtx| "<<vtx << std::endl; | |
f61cec2f | 2155 | } |
2156 | if(mother->GetPdgCode() == fgK0SCode) | |
2157 | { | |
ef647350 | 2158 | // std::cout << "K0S!!!!!!!!!!!!!11111!!!!!" << std::endl; |
f61cec2f | 2159 | } |
ef647350 | 2160 | // std::cout << "Mother of index: " << partIdx << " (" << stack->Particle(partIdx)->GetName() <<") is: " << mothIdx << std::endl; |
2161 | // std::cout << "PID: " << mother->GetPdgCode() << "/" << mother->GetName() << std::endl; | |
2162 | // std::cout << "Energy: " << mother->Energy() << std::endl; | |
2163 | // std::cout << "Vertex: " << mother->Vx() << ", " << mother->Vy() << ", " << mother->Vz() << std::endl; | |
f61cec2f | 2164 | |
2165 | delete [] tabs; | |
2166 | return PrintMothers(mothIdx, stack, gen+1) + 1; | |
ef647350 | 2167 | } |
2168 | ||
2169 | Int_t AliAnalysisEtMonteCarlo::GetPrimMother(Int_t partIdx, AliStack *stack) | |
4d376d01 | 2170 | { // get primary mother |
f61cec2f | 2171 | if(partIdx >= 0) |
ef647350 | 2172 | { |
b2c10007 | 2173 | //return stack->GetPrimary(partIdx); |
2174 | ||
f61cec2f | 2175 | Int_t mothIdx = stack->Particle(partIdx)->GetMother(0); |
2176 | if(mothIdx < 0) return -1; | |
2177 | TParticle *mother = stack->Particle(mothIdx); | |
2178 | if(mother) | |
2179 | { | |
f61cec2f | 2180 | if(stack->IsPhysicalPrimary(mothIdx)) return mothIdx; |
2181 | else return GetPrimMother(mothIdx, stack); | |
2182 | } | |
2183 | else | |
2184 | { | |
2185 | return -1; | |
2186 | } | |
ef647350 | 2187 | } |
f61cec2f | 2188 | return -1; |
ef647350 | 2189 | } |
2190 | ||
2191 | Int_t AliAnalysisEtMonteCarlo::GetK0InFamily(Int_t partIdx, AliStack* stack) | |
4d376d01 | 2192 | { // get K0 in family |
f61cec2f | 2193 | if(partIdx >= 0) |
ef647350 | 2194 | { |
2aab9269 | 2195 | if(stack->Particle(partIdx)->GetPdgCode() == fgK0SCode) return partIdx; |
f61cec2f | 2196 | Int_t mothIdx = stack->Particle(partIdx)->GetMother(0); |
2197 | if(mothIdx < 0) return -1; | |
2198 | TParticle *mother = stack->Particle(mothIdx); | |
2199 | if(mother) | |
ef647350 | 2200 | { |
2aab9269 | 2201 | if(mother->GetPdgCode() == fgK0SCode) |
ef647350 | 2202 | { |
f61cec2f | 2203 | return mothIdx; |
ef647350 | 2204 | } |
f61cec2f | 2205 | return GetK0InFamily(mothIdx, stack); |
2206 | } | |
2207 | else | |
2208 | { | |
2209 | return -1; | |
ef647350 | 2210 | } |
2211 | } | |
f61cec2f | 2212 | return -1; |
ef647350 | 2213 | } |
e2ee5727 | 2214 |