]>
Commit | Line | Data |
---|---|---|
c683985a | 1 | /*************************************************************** * |
2 | * Authors : Antonin Maire, Boris Hippolyte | |
3 | * Contributors are mentioned in the code where appropriate. * | |
4 | * * | |
5 | * Permission to use, copy, modify and distribute this software and its * | |
6 | * documentation strictly for non-commercial purposes is hereby granted * | |
7 | * without fee, provided that the above copyright notice appears in all * | |
8 | * copies and that both the copyright notice and this permission notice * | |
9 | * appear in the supporting documentation. The authors make no claims * | |
10 | * about the suitability of this software for any purpose. It is * | |
11 | * provided "as is" without express or implied warranty. * | |
12 | **************************************************************************/ | |
13 | ||
14 | //----------------------------------------------------------------- | |
15 | // AliAnalysisTaskCheckPerformanceCascadePbPb class | |
16 | // This task is for a performance study of cascade identification in PbPb. | |
17 | // It works with MC info and ESD/AOD. | |
18 | // Origin : AliAnalysisTaskCheckPerformanceCascade class by A. Maire Nov2010, antonin.maire@ires.in2p3.fr | |
19 | // Modified for PbPb analysis: M. Nicassio Feb2011, maria.nicassio@ba.infn.it: | |
20 | // - physics selection moved to the run.C macro | |
21 | // - added centrality selection and possibility to select events in nTracks ranges | |
22 | // - added new histograms | |
23 | // - modified binning of some histograms and containers | |
24 | // - flag to enable CF container usage | |
25 | // - check in the destructor for CAF usage | |
26 | // - flag for acceptance cut in the MC part | |
27 | // - in the MC particle selection IsPhysicalPrimary added and number of particles taken as appropriate for HIJING | |
28 | // (however for cascades one gets the same if runs on Nprimaries in the stack and does not check IsPhysicalPrimary) | |
29 | // - automatic settings for PID | |
30 | // - selection of injected cascades and HIJING cascades (kind of "bug" in method IsFromBGEvent()) | |
31 | // - added proper time histograms for cascades and lambdas | |
32 | // - cos of PA V0 wrt Xi vertex and not primary vertex | |
33 | // - distance xi-V0 added in the container | |
34 | // - AOD analysis developed (January 2012) | |
df984074 | 35 | // |
36 | // Adapted to pp 2.76 analysis: D. Colella, domenico.colella@ba.infn.it (Nov. 2012): | |
c683985a | 37 | // - added new and removed other histograms |
38 | // - Physics selection moved here (mainly for normalization in the efficiency calcuation) | |
39 | // - Centrality selection deleted | |
40 | // - 3DHisto denominator moved before any event selection for Normalization | |
41 | // - injected and natural part of MC selection removed | |
42 | // | |
df984074 | 43 | // Adapted to pPb 5.02 TeV analysis: D. Colella, domenico.colella@ba.infn.it (Sep. 2014) |
44 | // - Added the parameter fCollidingSystem, to distingish between pp and pPb procedures | |
45 | // | |
c683985a | 46 | // |
47 | //----------------------------------------------------------------- | |
48 | ||
49 | ||
50 | #include <Riostream.h> | |
51 | ||
52 | #include "TList.h" | |
53 | #include "TFile.h" | |
54 | #include "TH1F.h" | |
55 | #include "TH2F.h" | |
56 | #include "TH3F.h" | |
57 | #include "TVector3.h" | |
58 | #include "TCanvas.h" | |
59 | #include "TParticle.h" | |
60 | #include "TMath.h" | |
61 | ||
62 | #include "AliLog.h" | |
63 | #include "AliHeader.h" | |
64 | #include "AliMCEvent.h" | |
65 | #include "AliStack.h" | |
66 | #include "AliMultiplicity.h" | |
67 | #include "AliInputEventHandler.h" | |
68 | #include "AliAnalysisManager.h" | |
69 | ||
70 | #include "AliCFContainer.h" | |
71 | ||
72 | #include "AliESDVZERO.h" | |
73 | ||
74 | #include "AliGenEventHeader.h" | |
75 | #include "AliGenCocktailEventHeader.h" | |
76 | #include "AliGenHijingEventHeader.h" | |
77 | #include "AliESDtrackCuts.h" | |
78 | #include "AliPIDResponse.h" | |
79 | #include "AliV0vertexer.h" | |
80 | #include "AliCascadeVertexer.h" | |
81 | #include "AliESDEvent.h" | |
82 | #include "AliESDcascade.h" | |
83 | #include "AliAODEvent.h" | |
84 | #include "AliAODMCParticle.h" | |
85 | #include "AliAnalysisTaskCheckPerformanceCascadepp276.h" | |
df984074 | 86 | #include "AliAnalysisUtils.h" |
c683985a | 87 | |
88 | using std::cout; | |
89 | using std::endl; | |
90 | ||
91 | ClassImp(AliAnalysisTaskCheckPerformanceCascadepp276) | |
92 | ||
93 | ||
94 | ||
95 | //________________________________________________________________________________________ | |
96 | AliAnalysisTaskCheckPerformanceCascadepp276::AliAnalysisTaskCheckPerformanceCascadepp276() | |
97 | : AliAnalysisTaskSE(), // <- take care to AliAnalysisTask( empty ) | |
98 | fAnalysisType ("ESD"), | |
99 | fESDtrackCuts (0), | |
df984074 | 100 | fUtils (0), |
101 | fCollidingSystem ("pp"), | |
c683985a | 102 | fPIDResponse (0), |
103 | fkRerunV0CascVertexers (0), | |
104 | fkSDDselectionOn (kTRUE), | |
105 | fkQualityCutZprimVtxPos (kTRUE), | |
106 | fkRejectEventPileUp (kTRUE), | |
107 | fkQualityCutNoTPConlyPrimVtx (kTRUE), | |
108 | fkQualityCutTPCrefit (kTRUE), | |
109 | fkQualityCutnTPCcls (kTRUE), | |
110 | fwithSDD (kTRUE), | |
111 | fMinnTPCcls (0), | |
112 | fkExtraSelections (0), | |
113 | fVtxRange (0), | |
114 | fVtxRangeMin (0), | |
115 | fApplyAccCut (0), | |
116 | fMinPtCutOnDaughterTracks (0), | |
117 | fEtaCutOnDaughterTracks (0), | |
118 | ||
119 | // - Plots initialisation | |
120 | fListHistCascade(0), | |
121 | ||
122 | // - General Plots | |
123 | // Cascade multiplicity plots | |
124 | fHistCascadeMultiplicityBeforeAnySel(0), | |
125 | fHistCascadeMultiplicityAfterSDDSel(0), | |
126 | fHistCascadeMultiplicityAfterPhysicsSel(0), | |
127 | fHistCascadeMultiplicityForSelEvtNoTPCOnly(0), | |
128 | fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup(0), | |
129 | fHistCascadeMultiplicityAfterVertexCutSel(0), | |
130 | fHistnXiPlusPerEvTot(0), // After any event selections, in all the eta and pt range | |
131 | fHistnXiMinusPerEvTot(0), // After any event selections, in all the eta and pt range | |
132 | fHistnOmegaPlusPerEvTot(0), // After any event selections, in all the eta and pt range | |
133 | fHistnOmegaMinusPerEvTot(0), // After any event selections, in all the eta and pt range | |
134 | fHistnXiPlusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum | |
135 | fHistnXiMinusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum | |
136 | fHistnOmegaPlusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum | |
137 | fHistnOmegaMinusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum | |
138 | fHistnAssoXiMinus(0), // For the Reconstructed-Associated cascades | |
139 | fHistnAssoXiPlus(0), // For the Reconstructed-Associated cascades | |
140 | fHistnAssoOmegaMinus(0), // For the Reconstructed-Associated cascades | |
141 | fHistnAssoOmegaPlus(0), // For the Reconstructed-Associated cascades | |
142 | // Tracks multiplicity plots | |
143 | fHistTrackMultiplicityBeforeAnySel(0), | |
144 | fHistTrackMultiplicityAfterSDDSel(0), | |
145 | fHistTrackMultiplicityAfterPhysicsSel(0), | |
146 | fHistTrackMultiplicityForSelEvtNoTPCOnly(0), | |
147 | fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup(0), | |
148 | fHistTrackMultiplicityAfterVertexCutSel(0), | |
149 | // Vertex position plots (BestVertex) | |
150 | fHistPVx(0), // After any selections but before |Z| < 10 cm | |
151 | fHistPVy(0), // After any selections but before |Z| < 10 cm | |
152 | fHistPVz(0), // After any selections but before |Z| < 10 cm | |
153 | fHistPVxAnalysis(0), // After any event selections | |
154 | fHistPVyAnalysis(0), // After any event selections | |
155 | fHistPVzAnalysis(0), // After any event selections | |
156 | // - Plots before Physics Selection | |
157 | f3dHistGenPtVsGenYvsNtracksXiMinus(0), // After the SDD event selection (For efficinecy calculation) | |
158 | f3dHistGenPtVsGenctauvsYXiMinus(0), // After the SDD event selection (For efficinecy calculation) | |
159 | f3dHistGenPtVsGenYvsNtracksXiPlus(0), // After the SDD event selection (For efficinecy calculation) | |
160 | f3dHistGenPtVsGenctauvsYXiPlus(0), // After the SDD event selection (For efficinecy calculation) | |
161 | f3dHistGenPtVsGenYvsNtracksOmegaMinus(0), // After the SDD event selection (For efficinecy calculation) | |
162 | f3dHistGenPtVsGenctauvsYOmegaMinus(0), // After the SDD event selection (For efficinecy calculation) | |
163 | f3dHistGenPtVsGenYvsNtracksOmegaPlus(0), // After the SDD event selection (For efficinecy calculation) | |
164 | f3dHistGenPtVsGenctauvsYOmegaPlus(0), // After the SDD event selection (For efficinecy calculation) | |
165 | // - Generated cascade plots | |
166 | // After all the event selections | |
167 | //Xi- | |
168 | fHistEtaGenCascXiMinus(0), // In all the eta and pt range (as they are generated) | |
169 | fHistThetaGenCascXiMinus(0), // In all the eta and pt range (as they are generated) | |
170 | f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff(0), // | |
171 | f3dHistGenPtVsGenctauvsYXiMinusPhysEff(0), // | |
172 | f2dHistGenPtVsGenYFdblXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
173 | fHistThetaLambdaXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
174 | fHistThetaBachXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
175 | fHistThetaMesDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
176 | fHistThetaBarDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
177 | fHistPtBachXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
178 | fHistPtMesDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
179 | fHistPtBarDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
180 | //Xi+ | |
181 | fHistEtaGenCascXiPlus(0), // In all the eta and pt range (as they are generated) | |
182 | fHistThetaGenCascXiPlus(0), // In all the eta and pt range (as they are generated) | |
183 | f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff(0), // | |
184 | f3dHistGenPtVsGenctauvsYXiPlusPhysEff(0), // | |
185 | f2dHistGenPtVsGenYFdblXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
186 | fHistThetaLambdaXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
187 | fHistThetaBachXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
188 | fHistThetaMesDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
189 | fHistThetaBarDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
190 | fHistPtBachXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
191 | fHistPtMesDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
192 | fHistPtBarDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
193 | //Omega- | |
194 | fHistEtaGenCascOmegaMinus(0), // In all the eta and pt range (as they are generated) | |
195 | fHistThetaGenCascOmegaMinus(0), // In all the eta and pt range (as they are generated) | |
196 | f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff(0), // | |
197 | f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff(0), // | |
198 | f2dHistGenPtVsGenYFdblOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
199 | fHistThetaLambdaOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
200 | fHistThetaBachOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
201 | fHistThetaMesDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
202 | fHistThetaBarDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
203 | fHistPtBachOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
204 | fHistPtMesDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
205 | fHistPtBarDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
206 | //Omega+ | |
207 | fHistEtaGenCascOmegaPlus(0), // In all the eta and pt range (as they are generated) | |
208 | fHistThetaGenCascOmegaPlus(0), // In all the eta and pt range (as they are generated) | |
209 | f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff(0), // | |
210 | f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff(0), // | |
211 | f2dHistGenPtVsGenYFdblOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
212 | fHistThetaLambdaOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
213 | fHistThetaBachOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
214 | fHistThetaMesDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
215 | fHistThetaBarDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
216 | fHistPtBachOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
217 | fHistPtMesDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
218 | fHistPtBarDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
219 | ||
220 | // - Associated to MC cascade plots | |
221 | fHistMassXiMinus(0), // For the Reconstructed-Associated cascades | |
222 | fHistMassXiPlus(0), // For the Reconstructed-Associated cascades | |
223 | fHistMassOmegaMinus(0), // For the Reconstructed-Associated cascades | |
224 | fHistMassOmegaPlus(0), // For the Reconstructed-Associated cascades | |
225 | // Effective mass histos with combined PID | |
226 | fHistMassWithCombPIDXiMinus(0), | |
227 | fHistMassWithCombPIDXiPlus(0), | |
228 | fHistMassWithCombPIDOmegaMinus(0), | |
229 | fHistMassWithCombPIDOmegaPlus(0), | |
230 | // PID Probability versus MC Pt(bachelor track) | |
231 | f2dHistPIDprobaKaonVsMCPtBach(0), f2dHistPIDprobaPionVsMCPtBach(0), | |
232 | // Effective mass histos with perfect MC PID on the bachelor | |
233 | fHistMassWithMcPIDXiMinus(0), fHistMassWithMcPIDXiPlus(0), | |
234 | fHistMassWithMcPIDOmegaMinus(0), fHistMassWithMcPIDOmegaPlus(0), | |
235 | // Effective mass histos for the cascade candidates associated with MC | |
236 | fHistAsMCMassXiMinus(0), | |
237 | fHistAsMCMassXiPlus(0), | |
238 | fHistAsMCMassOmegaMinus(0), | |
239 | fHistAsMCMassOmegaPlus(0), | |
240 | // Generated Pt Vs generated y, for the cascade candidates associated with MC + Info Comb. PID | |
241 | f2dHistAsMCandCombPIDGenPtVsGenYXiMinus(0), | |
242 | f2dHistAsMCandCombPIDGenPtVsGenYXiPlus(0), | |
243 | f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus(0), | |
244 | f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus(0), | |
245 | // Generated Pt Vs generated y, for the cascade candidates associated with MC | |
246 | f2dHistAsMCGenPtVsGenYXiMinus(0), | |
247 | f2dHistAsMCGenPtVsGenYXiPlus(0), | |
248 | f2dHistAsMCGenPtVsGenYOmegaMinus(0), | |
249 | f2dHistAsMCGenPtVsGenYOmegaPlus(0), | |
250 | // Generated Eta of the the cascade candidates associated with MC | |
251 | fHistAsMCGenEtaXiMinus(0), | |
252 | fHistAsMCGenEtaXiPlus(0), | |
253 | fHistAsMCGenEtaOmegaMinus(0), | |
254 | fHistAsMCGenEtaOmegaPlus(0), | |
255 | // Resolution in Pt as function of generated Pt | |
256 | f2dHistAsMCResPtXiMinus(0), | |
257 | f2dHistAsMCResPtXiPlus(0), | |
258 | f2dHistAsMCResPtOmegaMinus(0), | |
259 | f2dHistAsMCResPtOmegaPlus(0), | |
260 | // Resolution in R(2D) as function of generated R | |
261 | f2dHistAsMCResRXiMinus(0), | |
262 | f2dHistAsMCResRXiPlus(0), | |
263 | f2dHistAsMCResROmegaMinus(0), | |
264 | f2dHistAsMCResROmegaPlus(0), | |
265 | // Resolution in phi as function of generated Pt | |
266 | f2dHistAsMCResPhiXiMinus(0), | |
267 | f2dHistAsMCResPhiXiPlus(0), | |
268 | f2dHistAsMCResPhiOmegaMinus(0), | |
269 | f2dHistAsMCResPhiOmegaPlus(0), | |
270 | // Correlation between proton (antiproton) daughter MC pt and Xi/Omega MC pt (to apply Geat/Fluka correction) | |
271 | f2dHistAsMCptProtonMCptXiMinus(0), | |
272 | f2dHistAsMCptAntiprotonMCptXiPlus(0), | |
273 | f2dHistAsMCptProtonMCptOmegaMinus(0), | |
274 | f2dHistAsMCptAntiprotonMCptOmegaPlus(0), | |
275 | // QA plots | |
276 | fHistV0toXiCosineOfPointingAngle(0), | |
277 | fHistV0CosineOfPointingAnglevsPtXi(0), | |
278 | fHistV0CosineOfPointingAnglevsPtOmega(0), | |
279 | ||
280 | // Containers | |
281 | fCFContCascadePIDAsXiMinus(0), | |
282 | fCFContCascadePIDAsXiPlus(0), | |
283 | fCFContCascadePIDAsOmegaMinus(0), | |
284 | fCFContCascadePIDAsOmegaPlus(0), | |
285 | fCFContAsCascadeCuts(0) | |
286 | ||
287 | //____Dummy costructor____ | |
288 | { | |
289 | for(Int_t iV0selIdx = 0; iV0selIdx < 7; iV0selIdx++ ) { fV0Sels [iV0selIdx ] = -1.; } | |
290 | for(Int_t iCascSelIdx = 0; iCascSelIdx < 8; iCascSelIdx++ ) { fCascSels [iCascSelIdx ] = -1.; } | |
291 | } | |
292 | ||
293 | ||
294 | ||
295 | //_____Non-default Constructor________________________________________________________________ | |
296 | AliAnalysisTaskCheckPerformanceCascadepp276::AliAnalysisTaskCheckPerformanceCascadepp276(const char *name) | |
297 | : AliAnalysisTaskSE(name), | |
298 | fAnalysisType ("ESD"), | |
299 | fESDtrackCuts (0), | |
df984074 | 300 | fUtils (0), |
301 | fCollidingSystem ("pp"), | |
c683985a | 302 | fPIDResponse (0), |
303 | fkRerunV0CascVertexers (0), | |
304 | fkSDDselectionOn (kTRUE), | |
305 | fkQualityCutZprimVtxPos (kTRUE), | |
306 | fkRejectEventPileUp (kTRUE), | |
307 | fkQualityCutNoTPConlyPrimVtx (kTRUE), | |
308 | fkQualityCutTPCrefit (kTRUE), | |
309 | fkQualityCutnTPCcls (kTRUE), | |
310 | fwithSDD (kTRUE), | |
311 | fMinnTPCcls (0), | |
312 | fkExtraSelections (0), | |
313 | fVtxRange (0), | |
314 | fVtxRangeMin (0), | |
315 | fApplyAccCut (0), | |
316 | fMinPtCutOnDaughterTracks (0), | |
317 | fEtaCutOnDaughterTracks (0), | |
318 | ||
319 | // - Plots initialisation | |
320 | fListHistCascade(0), | |
321 | ||
322 | // - General Plots | |
323 | // Cascade multiplicity plots | |
324 | fHistCascadeMultiplicityBeforeAnySel(0), | |
325 | fHistCascadeMultiplicityAfterSDDSel(0), | |
326 | fHistCascadeMultiplicityAfterPhysicsSel(0), | |
327 | fHistCascadeMultiplicityForSelEvtNoTPCOnly(0), | |
328 | fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup(0), | |
329 | fHistCascadeMultiplicityAfterVertexCutSel(0), | |
330 | fHistnXiPlusPerEvTot(0), // After any event selections, in all the eta and pt range | |
331 | fHistnXiMinusPerEvTot(0), // After any event selections, in all the eta and pt range | |
332 | fHistnOmegaPlusPerEvTot(0), // After any event selections, in all the eta and pt range | |
333 | fHistnOmegaMinusPerEvTot(0), // After any event selections, in all the eta and pt range | |
334 | fHistnXiPlusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum | |
335 | fHistnXiMinusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum | |
336 | fHistnOmegaPlusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum | |
337 | fHistnOmegaMinusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum | |
338 | fHistnAssoXiMinus(0), // For the Reconstructed-Associated cascades | |
339 | fHistnAssoXiPlus(0), // For the Reconstructed-Associated cascades | |
340 | fHistnAssoOmegaMinus(0), // For the Reconstructed-Associated cascades | |
341 | fHistnAssoOmegaPlus(0), // For the Reconstructed-Associated cascades | |
342 | // Tracks multiplicity plots | |
343 | fHistTrackMultiplicityBeforeAnySel(0), | |
344 | fHistTrackMultiplicityAfterSDDSel(0), | |
345 | fHistTrackMultiplicityAfterPhysicsSel(0), | |
346 | fHistTrackMultiplicityForSelEvtNoTPCOnly(0), | |
347 | fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup(0), | |
348 | fHistTrackMultiplicityAfterVertexCutSel(0), | |
349 | // Vertex position plots (BestVertex) | |
350 | fHistPVx(0), // After any selections but before |Z| < 10 cm | |
351 | fHistPVy(0), // After any selections but before |Z| < 10 cm | |
352 | fHistPVz(0), // After any selections but before |Z| < 10 cm | |
353 | fHistPVxAnalysis(0), // After any event selections | |
354 | fHistPVyAnalysis(0), // After any event selections | |
355 | fHistPVzAnalysis(0), // After any event selections | |
356 | // - Plots before Physics Selection | |
357 | f3dHistGenPtVsGenYvsNtracksXiMinus(0), // After the SDD event selection (For efficiency calculation) | |
358 | f3dHistGenPtVsGenctauvsYXiMinus(0), // After the SDD event selection (For efficiency calculation) | |
359 | f3dHistGenPtVsGenYvsNtracksXiPlus(0), // After the SDD event selection (For efficiency calculation) | |
360 | f3dHistGenPtVsGenctauvsYXiPlus(0), // After the SDD event selection (For efficiency calculation) | |
361 | f3dHistGenPtVsGenYvsNtracksOmegaMinus(0), // After the SDD event selection (For efficiency calculation) | |
362 | f3dHistGenPtVsGenctauvsYOmegaMinus(0), // After the SDD event selection (For efficiency calculation) | |
363 | f3dHistGenPtVsGenYvsNtracksOmegaPlus(0), // After the SDD event selection (For efficiency calculation) | |
364 | f3dHistGenPtVsGenctauvsYOmegaPlus(0), // After the SDD event selection (For efficiency calculation) | |
365 | // - Generated cascade plots | |
366 | // After all the event selections | |
367 | //Xi- | |
368 | fHistEtaGenCascXiMinus(0), // In all the eta and pt range (as they are generated) | |
369 | fHistThetaGenCascXiMinus(0), // In all the eta and pt range (as they are generated) | |
370 | f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff(0), // | |
371 | f3dHistGenPtVsGenctauvsYXiMinusPhysEff(0), // | |
372 | f2dHistGenPtVsGenYFdblXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
373 | fHistThetaLambdaXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
374 | fHistThetaBachXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
375 | fHistThetaMesDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
376 | fHistThetaBarDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
377 | fHistPtBachXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
378 | fHistPtMesDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
379 | fHistPtBarDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
380 | //Xi+ | |
381 | fHistEtaGenCascXiPlus(0), // In all the eta and pt range (as they are generated) | |
382 | fHistThetaGenCascXiPlus(0), // In all the eta and pt range (as they are generated) | |
383 | f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff(0), // | |
384 | f3dHistGenPtVsGenctauvsYXiPlusPhysEff(0), // | |
385 | f2dHistGenPtVsGenYFdblXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
386 | fHistThetaLambdaXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
387 | fHistThetaBachXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
388 | fHistThetaMesDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
389 | fHistThetaBarDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
390 | fHistPtBachXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
391 | fHistPtMesDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
392 | fHistPtBarDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
393 | //Omega- | |
394 | fHistEtaGenCascOmegaMinus(0), // In all the eta and pt range (as they are generated) | |
395 | fHistThetaGenCascOmegaMinus(0), // In all the eta and pt range (as they are generated) | |
396 | f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff(0), // | |
397 | f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff(0), // | |
398 | f2dHistGenPtVsGenYFdblOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
399 | fHistThetaLambdaOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
400 | fHistThetaBachOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
401 | fHistThetaMesDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
402 | fHistThetaBarDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
403 | fHistPtBachOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
404 | fHistPtMesDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
405 | fHistPtBarDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
406 | //Omega+ | |
407 | fHistEtaGenCascOmegaPlus(0), // In all the eta and pt range (as they are generated) | |
408 | fHistThetaGenCascOmegaPlus(0), // In all the eta and pt range (as they are generated) | |
409 | f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff(0), // | |
410 | f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff(0), // | |
411 | f2dHistGenPtVsGenYFdblOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
412 | fHistThetaLambdaOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
413 | fHistThetaBachOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
414 | fHistThetaMesDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
415 | fHistThetaBarDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
416 | fHistPtBachOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
417 | fHistPtMesDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
418 | fHistPtBarDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle) | |
419 | ||
420 | // - Associated to MC cascade plots | |
421 | fHistMassXiMinus(0), // For the Reconstructed-Associated cascades | |
422 | fHistMassXiPlus(0), // For the Reconstructed-Associated cascades | |
423 | fHistMassOmegaMinus(0), // For the Reconstructed-Associated cascades | |
424 | fHistMassOmegaPlus(0), // For the Reconstructed-Associated cascades | |
425 | // Effective mass histos with combined PID | |
426 | fHistMassWithCombPIDXiMinus(0), | |
427 | fHistMassWithCombPIDXiPlus(0), | |
428 | fHistMassWithCombPIDOmegaMinus(0), | |
429 | fHistMassWithCombPIDOmegaPlus(0), | |
430 | // PID Probability versus MC Pt(bachelor track) | |
431 | f2dHistPIDprobaKaonVsMCPtBach(0), f2dHistPIDprobaPionVsMCPtBach(0), | |
432 | // Effective mass histos with perfect MC PID on the bachelor | |
433 | fHistMassWithMcPIDXiMinus(0), fHistMassWithMcPIDXiPlus(0), | |
434 | fHistMassWithMcPIDOmegaMinus(0), fHistMassWithMcPIDOmegaPlus(0), | |
435 | // Effective mass histos for the cascade candidates associated with MC | |
436 | fHistAsMCMassXiMinus(0), | |
437 | fHistAsMCMassXiPlus(0), | |
438 | fHistAsMCMassOmegaMinus(0), | |
439 | fHistAsMCMassOmegaPlus(0), | |
440 | // Generated Pt Vs generated y, for the cascade candidates associated with MC + Info Comb. PID | |
441 | f2dHistAsMCandCombPIDGenPtVsGenYXiMinus(0), | |
442 | f2dHistAsMCandCombPIDGenPtVsGenYXiPlus(0), | |
443 | f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus(0), | |
444 | f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus(0), | |
445 | // Generated Pt Vs generated y, for the cascade candidates associated with MC | |
446 | f2dHistAsMCGenPtVsGenYXiMinus(0), | |
447 | f2dHistAsMCGenPtVsGenYXiPlus(0), | |
448 | f2dHistAsMCGenPtVsGenYOmegaMinus(0), | |
449 | f2dHistAsMCGenPtVsGenYOmegaPlus(0), | |
450 | // Generated Eta of the the cascade candidates associated with MC | |
451 | fHistAsMCGenEtaXiMinus(0), | |
452 | fHistAsMCGenEtaXiPlus(0), | |
453 | fHistAsMCGenEtaOmegaMinus(0), | |
454 | fHistAsMCGenEtaOmegaPlus(0), | |
455 | // Resolution in Pt as function of generated Pt | |
456 | f2dHistAsMCResPtXiMinus(0), | |
457 | f2dHistAsMCResPtXiPlus(0), | |
458 | f2dHistAsMCResPtOmegaMinus(0), | |
459 | f2dHistAsMCResPtOmegaPlus(0), | |
460 | // Resolution in R(2D) as function of generated R | |
461 | f2dHistAsMCResRXiMinus(0), | |
462 | f2dHistAsMCResRXiPlus(0), | |
463 | f2dHistAsMCResROmegaMinus(0), | |
464 | f2dHistAsMCResROmegaPlus(0), | |
465 | // Resolution in phi as function of generated Pt | |
466 | f2dHistAsMCResPhiXiMinus(0), | |
467 | f2dHistAsMCResPhiXiPlus(0), | |
468 | f2dHistAsMCResPhiOmegaMinus(0), | |
469 | f2dHistAsMCResPhiOmegaPlus(0), | |
470 | // Correlation between proton (antiproton) daughter MC pt and Xi/Omega MC pt (to apply Geat/Fluka correction) | |
471 | f2dHistAsMCptProtonMCptXiMinus(0), | |
472 | f2dHistAsMCptAntiprotonMCptXiPlus(0), | |
473 | f2dHistAsMCptProtonMCptOmegaMinus(0), | |
474 | f2dHistAsMCptAntiprotonMCptOmegaPlus(0), | |
475 | // QA plots | |
476 | fHistV0toXiCosineOfPointingAngle(0), | |
477 | fHistV0CosineOfPointingAnglevsPtXi(0), | |
478 | fHistV0CosineOfPointingAnglevsPtOmega(0), | |
479 | ||
480 | // Containers | |
481 | fCFContCascadePIDAsXiMinus(0), | |
482 | fCFContCascadePIDAsXiPlus(0), | |
483 | fCFContCascadePIDAsOmegaMinus(0), | |
484 | fCFContCascadePIDAsOmegaPlus(0), | |
485 | fCFContAsCascadeCuts(0) | |
486 | ||
487 | //____Costructor____ | |
488 | { | |
489 | // Define input and output slots here | |
490 | // Input slot #0 works with a TChain | |
491 | // Output slot #1 writes into a TList container (cascade) | |
df984074 | 492 | if (fCollidingSystem == "pp") { |
493 | fV0Sels[0] = 33. ; // max allowed chi2 | |
494 | fV0Sels[1] = 0.01; // min allowed impact parameter for the 1st daughter | |
495 | fV0Sels[2] = 0.01; // min allowed impact parameter for the 2nd daughter | |
496 | fV0Sels[3] = 1.5; // max allowed DCA between the daughter tracks | |
497 | fV0Sels[4] = 0.9; // min allowed cosine of V0's pointing angle - This is pT dependent | |
498 | fV0Sels[5] = 0.2; // min radius of the fiducial volume | |
499 | fV0Sels[6] = 200.; // max radius of the fiducial volume | |
500 | fCascSels[0] = 33.; // max allowed chi2 (same as PDC07) | |
501 | fCascSels[1] = 0.01; // min allowed V0 impact parameter | |
502 | fCascSels[2] = 0.008; // "window" around the Lambda mass | |
503 | fCascSels[3] = 0.01; // min allowed bachelor's impact parameter | |
504 | fCascSels[4] = 2.0; // max allowed DCA between the V0 and the bachelor | |
505 | fCascSels[5] = 0.95; // min allowed cosine of the cascade pointing angle | |
506 | fCascSels[6] = 0.2; // min radius of the fiducial volume | |
507 | fCascSels[7] = 100.; // max radius of the fiducial volume | |
508 | } else if (fCollidingSystem == "pPb") { | |
509 | fV0Sels[0] = 33. ; // max allowed chi2 | |
510 | fV0Sels[1] = 0.02; // min allowed impact parameter for the 1st daughter (LHC09a4 : 0.05) | |
511 | fV0Sels[2] = 0.02; // min allowed impact parameter for the 2nd daughter (LHC09a4 : 0.05) | |
512 | fV0Sels[3] = 2.0 ; // max allowed DCA between the daughter tracks (LHC09a4 : 0.5) | |
513 | fV0Sels[4] = 0.95; // min allowed cosine of V0's pointing angle (LHC09a4 : 0.99) | |
514 | fV0Sels[5] = 1.0 ; // min radius of the fiducial volume (LHC09a4 : 0.2) | |
515 | fV0Sels[6] = 200. ; // max radius of the fiducial volume (LHC09a4 : 100.0) | |
516 | fCascSels[0] = 33. ; // max allowed chi2 (same as PDC07) | |
517 | fCascSels[1] = 0.05 ; // min allowed V0 impact parameter (PDC07 : 0.05 / LHC09a4 : 0.025 ) | |
518 | fCascSels[2] = 0.010; // "window" around the Lambda mass (PDC07 : 0.008 / LHC09a4 : 0.010 ) | |
519 | fCascSels[3] = 0.03 ; // min allowed bachelor's impact parameter (PDC07 : 0.035 / LHC09a4 : 0.025 ) | |
520 | fCascSels[4] = 2.0 ; // max allowed DCA between the V0 and the bachelor (PDC07 : 0.1 / LHC09a4 : 0.2 ) | |
521 | fCascSels[5] = 0.95 ; // min allowed cosine of the cascade pointing angle (PDC07 : 0.9985 / LHC09a4 : 0.998 ) | |
522 | fCascSels[6] = 0.4 ; // min radius of the fiducial volume (PDC07 : 0.9 / LHC09a4 : 0.2 ) | |
523 | fCascSels[7] = 100. ; // max radius of the fiducial volume (PDC07 : 100 / LHC09a4 : 100 ) | |
524 | } | |
c683985a | 525 | |
df984074 | 526 | DefineOutput(1, TList::Class()); |
527 | DefineOutput(2, AliCFContainer::Class()); | |
528 | DefineOutput(3, AliCFContainer::Class()); | |
529 | DefineOutput(4, AliCFContainer::Class()); | |
530 | DefineOutput(5, AliCFContainer::Class()); | |
531 | DefineOutput(6, AliCFContainer::Class()); | |
c683985a | 532 | } |
533 | ||
534 | //____Destructor____ | |
535 | AliAnalysisTaskCheckPerformanceCascadepp276::~AliAnalysisTaskCheckPerformanceCascadepp276() | |
536 | { | |
537 | // For all TH1, 2, 3 HnSparse and CFContainer are in the fListCascade TList. | |
538 | // They will be deleted when fListCascade is deleted by the TSelector dtor | |
539 | // Because of TList::SetOwner() | |
540 | if (fListHistCascade && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fListHistCascade; fListHistCascade = 0x0;} | |
541 | if (fCFContCascadePIDAsXiMinus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fCFContCascadePIDAsXiMinus; fCFContCascadePIDAsXiMinus = 0x0;} | |
542 | if (fCFContCascadePIDAsXiPlus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fCFContCascadePIDAsXiPlus; fCFContCascadePIDAsXiPlus = 0x0;} | |
543 | if (fCFContCascadePIDAsOmegaMinus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fCFContCascadePIDAsOmegaMinus; fCFContCascadePIDAsOmegaMinus = 0x0;} | |
544 | if (fCFContCascadePIDAsOmegaPlus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fCFContCascadePIDAsOmegaPlus; fCFContCascadePIDAsOmegaPlus = 0x0;} | |
545 | if (fCFContAsCascadeCuts && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fCFContAsCascadeCuts; fCFContAsCascadeCuts = 0x0;} | |
546 | if (fESDtrackCuts) {delete fESDtrackCuts; fESDtrackCuts = 0x0;} | |
547 | } | |
548 | ||
549 | ||
550 | //________________________________________________________________________ | |
551 | void AliAnalysisTaskCheckPerformanceCascadepp276::UserCreateOutputObjects() { | |
552 | // Create histograms | |
553 | // Called once | |
554 | ||
555 | // - Option for AliLog: to suppress the extensive info prompted by a run with MC | |
556 | AliLog::SetGlobalLogLevel(AliLog::kError); | |
557 | ||
558 | // - Definition of the output datamembers | |
559 | fListHistCascade = new TList(); | |
560 | fListHistCascade->SetOwner(); // See http://root.cern.ch/root/html/TCollection.html#TCollection:SetOwner | |
561 | ||
562 | //----------------------------------------------- | |
563 | // Particle Identification Setup (new PID object) | |
564 | //----------------------------------------------- | |
565 | AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager(); | |
566 | AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler()); | |
567 | fPIDResponse = inputHandler->GetPIDResponse(); | |
568 | ||
569 | // - Only used to get the number of primary reconstructed tracks | |
570 | if (! fESDtrackCuts ){ | |
571 | fESDtrackCuts = new AliESDtrackCuts(); | |
572 | } | |
df984074 | 573 | if (! fUtils){ |
574 | fUtils = new AliAnalysisUtils(); | |
575 | } | |
c683985a | 576 | |
577 | //---------------------- | |
578 | // Initialize the histos | |
579 | //---------------------- | |
580 | ||
581 | //---------------------------------- | |
582 | // - Same general binning definition | |
583 | Double_t ptBinLimits[101]; | |
584 | for (Int_t iptbin = 0; iptbin<101; ++iptbin) ptBinLimits[iptbin]=iptbin*0.1; | |
585 | Double_t yBinLimits[111]; | |
586 | for (Int_t iybin = 0; iybin<111; ++iybin) yBinLimits[iybin]=-1.1+iybin*0.02; | |
587 | Double_t ctauBinLimits[112]; | |
588 | for (Int_t ict = 0; ict<112; ++ict) ctauBinLimits[ict] = (Double_t) (ict-1.); | |
589 | ||
590 | //------------------ | |
591 | // - General plots | |
592 | // - Cascades multiplicity plots | |
593 | if(! fHistCascadeMultiplicityBeforeAnySel) { | |
594 | fHistCascadeMultiplicityBeforeAnySel = new TH1F("fHistCascadeMultiplicityBeforeAnySel", | |
595 | "Cascades per event (before any selections);Nbr of Cascades/Evt;Events", 50, 0, 50); | |
596 | fListHistCascade->Add(fHistCascadeMultiplicityBeforeAnySel); | |
597 | } | |
598 | if(! fHistCascadeMultiplicityAfterSDDSel) { | |
599 | fHistCascadeMultiplicityAfterSDDSel = new TH1F("fHistCascadeMultiplicityAfterSDDSel", | |
600 | "Cascades per event (after only the SDD selection);Nbr of Cascades/Evt;Events", 50, 0, 50); | |
601 | fListHistCascade->Add(fHistCascadeMultiplicityAfterSDDSel); | |
602 | } | |
603 | if(! fHistCascadeMultiplicityAfterPhysicsSel) { | |
604 | fHistCascadeMultiplicityAfterPhysicsSel = new TH1F("fHistCascadeMultiplicityAfterPhysicsSel", | |
605 | "Cascades per event (after physics selection);Nbr of Cascades/Evt;Events", 50, 0, 50); | |
606 | fListHistCascade->Add(fHistCascadeMultiplicityAfterPhysicsSel); | |
607 | } | |
608 | if(! fHistCascadeMultiplicityForSelEvtNoTPCOnly) { | |
609 | fHistCascadeMultiplicityForSelEvtNoTPCOnly = new TH1F("fHistCascadeMultiplicityForSelEvtNoTPCOnly", | |
610 | "Cascades per event (for selected events with well-established PV);Nbr of Cascades/Evt;Events", 50, 0, 50); | |
611 | fListHistCascade->Add(fHistCascadeMultiplicityForSelEvtNoTPCOnly); | |
612 | } | |
613 | if(! fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup) { | |
614 | fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup = new TH1F("fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup", | |
615 | "Cascades per event (for selected events with well-establisched PV and no pile-up);Nbr of Cascades/Evt;Events", 50, 0, 50); | |
616 | fListHistCascade->Add(fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup); | |
617 | } | |
618 | if(! fHistCascadeMultiplicityAfterVertexCutSel) { | |
619 | fHistCascadeMultiplicityAfterVertexCutSel = new TH1F("fHistCascadeMultiplicityAfterVertexCutSel", | |
620 | "Cascades per event (after vertex cut selection);Nbr of Cascades/Evt;Events", 50, 0, 50); | |
621 | fListHistCascade->Add(fHistCascadeMultiplicityAfterVertexCutSel); | |
622 | } | |
623 | // - Tracks multiplicity plots | |
624 | if(! fHistTrackMultiplicityBeforeAnySel) { | |
625 | fHistTrackMultiplicityBeforeAnySel = new TH1F("fHistTrackMultiplicityBeforeAnySel", | |
626 | "Tracks per event (before any selections);Nbr of Tracks/Evt;Events", 200, 0, 200); | |
627 | fListHistCascade->Add(fHistTrackMultiplicityBeforeAnySel); | |
628 | } | |
629 | if(! fHistTrackMultiplicityAfterSDDSel) { | |
630 | fHistTrackMultiplicityAfterSDDSel = new TH1F("fHistTrackMultiplicityAfterSDDSel", | |
631 | "Tracks per event (after only the SDD selection);Nbr of Tracks/Evt;Events", 200, 0, 200); | |
632 | fListHistCascade->Add(fHistTrackMultiplicityAfterSDDSel); | |
633 | } | |
634 | if(! fHistTrackMultiplicityAfterPhysicsSel) { | |
635 | fHistTrackMultiplicityAfterPhysicsSel = new TH1F("fHistTrackMultiplicityAfterPhysicsSel", | |
636 | "Tracks per event (after physics selection);Nbr of Tracks/Evt;Events", 200, 0, 200); | |
637 | fListHistCascade->Add(fHistTrackMultiplicityAfterPhysicsSel); | |
638 | } | |
639 | if(! fHistTrackMultiplicityForSelEvtNoTPCOnly) { | |
640 | fHistTrackMultiplicityForSelEvtNoTPCOnly = new TH1F("fHistTrackMultiplicityForSelEvtNoTPCOnly", | |
641 | "Tracks per event (for selected events with well-established PV);Nbr of Tracks/Evt;Events", 200, 0, 200); | |
642 | fListHistCascade->Add(fHistTrackMultiplicityForSelEvtNoTPCOnly); | |
643 | } | |
644 | if(! fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup) { | |
645 | fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = new TH1F("fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup", | |
646 | "Tracks per event (for selected events with well-establisched PV and no pile-up);Nbr of Tracks/Evt;Events", 200, 0, 200); | |
647 | fListHistCascade->Add(fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup); | |
648 | } | |
649 | if(! fHistTrackMultiplicityAfterVertexCutSel) { | |
650 | fHistTrackMultiplicityAfterVertexCutSel = new TH1F("fHistTrackMultiplicityAfterVertexCutSel", | |
651 | "Tracks per event (after vertex cut selection);Nbr of Tracks/Evt;Events", 200, 0, 200); | |
652 | fListHistCascade->Add(fHistTrackMultiplicityAfterVertexCutSel); | |
653 | } | |
654 | // - Vertex position plots | |
655 | if(! fHistPVx ){ | |
656 | fHistPVx = new TH1F("fHistPVx", "Best PV position in x; x (cm); Events", 2000, -0.5, 0.5); | |
657 | fListHistCascade->Add(fHistPVx); | |
658 | } | |
659 | if(! fHistPVy ){ | |
660 | fHistPVy = new TH1F("fHistPVy", "Best PV position in y; y (cm); Events", 2000, -0.5, 0.5); | |
661 | fListHistCascade->Add(fHistPVy); | |
662 | } | |
663 | if(! fHistPVz ){ | |
664 | fHistPVz = new TH1F("fHistPVz", "Best PV position in z; z (cm); Events", 400, -20, 20); | |
665 | fListHistCascade->Add(fHistPVz); | |
666 | } | |
667 | if(! fHistPVxAnalysis ){ | |
668 | fHistPVxAnalysis = new TH1F("fHistPVxAnalysis", "Best PV position in x (after events selections); x (cm); Events", 2000, -0.5, 0.5); | |
669 | fListHistCascade->Add(fHistPVxAnalysis); | |
670 | } | |
671 | if(! fHistPVyAnalysis ){ | |
672 | fHistPVyAnalysis = new TH1F("fHistPVyAnalysis", "Best PV position in y (after events selections); y (cm); Events" , 2000, -0.5, 0.5); | |
673 | fListHistCascade->Add(fHistPVyAnalysis); | |
674 | } | |
675 | if(! fHistPVzAnalysis ){ | |
676 | fHistPVzAnalysis = new TH1F("fHistPVzAnalysis", "Best PV position in z (after events selections); z (cm); Events", 400, -20, 20); | |
677 | fListHistCascade->Add(fHistPVzAnalysis); | |
678 | } | |
679 | ||
680 | //-------------------------- | |
681 | // - Generated cascade plots | |
682 | // - Generated Cascade multiplicity distributions (for singol cascade) | |
683 | fHistnXiPlusPerEvTot = new TH1F("fHistnXiPlusPerEvTot", "", 25, 0, 25); | |
684 | fListHistCascade->Add(fHistnXiPlusPerEvTot); | |
685 | fHistnXiMinusPerEvTot = new TH1F("fHistnXiMinusPerEvTot", "", 25, 0, 25); | |
686 | fListHistCascade->Add(fHistnXiMinusPerEvTot); | |
687 | fHistnOmegaPlusPerEvTot = new TH1F("fHistnOmegaPlusPerEvTot", "", 25, 0, 25); | |
688 | fListHistCascade->Add(fHistnOmegaPlusPerEvTot); | |
689 | fHistnOmegaMinusPerEvTot = new TH1F("fHistnOmegaMinusPerEvTot", "", 25, 0, 25); | |
690 | fListHistCascade->Add(fHistnOmegaMinusPerEvTot); | |
691 | fHistnXiPlusPerEv = new TH1F("fHistnXiPlusPerEv", "", 25, 0, 25); | |
692 | fListHistCascade->Add(fHistnXiPlusPerEv); | |
693 | fHistnXiMinusPerEv = new TH1F("fHistnXiMinusPerEv", "", 25, 0, 25); | |
694 | fListHistCascade->Add(fHistnXiMinusPerEv); | |
695 | fHistnOmegaPlusPerEv = new TH1F("fHistnOmegaPlusPerEv", "", 25, 0, 25); | |
696 | fListHistCascade->Add(fHistnOmegaPlusPerEv); | |
697 | fHistnOmegaMinusPerEv = new TH1F("fHistnOmegaMinusPerEv", "", 25, 0, 25); | |
698 | fListHistCascade->Add(fHistnOmegaMinusPerEv); | |
699 | // - Xi- | |
700 | // - Pseudo-Rapidity distribution | |
701 | if (!fHistEtaGenCascXiMinus) { | |
702 | fHistEtaGenCascXiMinus = new TH1F("fHistEtaGenCascXiMinus", "#eta of any gen. #Xi^{-}; #eta; Number of Casc", 200, -10, 10); | |
703 | fListHistCascade->Add(fHistEtaGenCascXiMinus); | |
704 | } | |
705 | if (!f3dHistGenPtVsGenYvsNtracksXiMinus) { | |
706 | f3dHistGenPtVsGenYvsNtracksXiMinus = new TH3D("f3dHistGenPtVsGenYvsNtracksXiMinus", "MC P_{t} Vs MC Y of Gen #Xi^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.); | |
707 | fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksXiMinus); | |
708 | } | |
709 | if (!f3dHistGenPtVsGenctauvsYXiMinus) { | |
710 | f3dHistGenPtVsGenctauvsYXiMinus = new TH3D("f3dHistGenPtVsGenctauvsYXiMinus", "MC P_{t} Vs MC ctau Vs Y of Gen #Xi^{-}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits); | |
711 | fListHistCascade->Add(f3dHistGenPtVsGenctauvsYXiMinus); | |
712 | } | |
713 | if (!f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff) { | |
714 | f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff = new TH3D("f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff", "MC P_{t} Vs MC Y of Gen #Xi^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.); | |
715 | fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff); | |
716 | } | |
717 | if (!f3dHistGenPtVsGenctauvsYXiMinusPhysEff) { | |
718 | f3dHistGenPtVsGenctauvsYXiMinusPhysEff = new TH3D("f3dHistGenPtVsGenctauvsYXiMinusPhysEff", "MC P_{t} Vs MC ctau Vs Y of Gen #Xi^{-}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits); | |
719 | fListHistCascade->Add(f3dHistGenPtVsGenctauvsYXiMinusPhysEff); | |
720 | } | |
721 | // - Info at the generation level of multi-strange particle | |
722 | if (!fHistThetaGenCascXiMinus) { | |
723 | fHistThetaGenCascXiMinus = new TH1F("fHistThetaGenCascXiMinus", "#theta of gen. #Xi^{-}; #theta; Number of Casc.", 200, -10, 190); | |
724 | fListHistCascade->Add(fHistThetaGenCascXiMinus); | |
725 | } | |
726 | if (!f2dHistGenPtVsGenYFdblXiMinus) { | |
727 | f2dHistGenPtVsGenYFdblXiMinus = new TH2D("f2dHistGenPtVsGenYFdblXiMinus", "MC P_{t} Vs MC Y of findable Gen #Xi^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1); | |
728 | fListHistCascade->Add(f2dHistGenPtVsGenYFdblXiMinus); | |
729 | } | |
730 | // - Theta distribution the daughters (control plots) | |
731 | if (!fHistThetaLambdaXiMinus) { | |
732 | fHistThetaLambdaXiMinus = new TH1F("fHistThetaLambdaXiMinus", "#theta of gen. #Lambda (Xi dghter); #theta_{#Lambda}; Number of #Lambda^0", 200, -10, 190); | |
733 | fListHistCascade->Add(fHistThetaLambdaXiMinus); | |
734 | } | |
735 | if (!fHistThetaBachXiMinus) { | |
736 | fHistThetaBachXiMinus = new TH1F("fHistThetaBachXiMinus", "#theta of gen. Bach.; #theta_{Bach}; Number of Bach.", 200, -10, 190); | |
737 | fListHistCascade->Add(fHistThetaBachXiMinus); | |
738 | } | |
739 | if (!fHistThetaMesDghterXiMinus) { | |
740 | fHistThetaMesDghterXiMinus = new TH1F("fHistThetaMesDghterXiMinus", "#theta of gen. Meson #Lambda dghter; #theta_{MesDght}; Number of Mes.", 200, -10, 190); | |
741 | fListHistCascade->Add(fHistThetaMesDghterXiMinus); | |
742 | } | |
743 | if (!fHistThetaBarDghterXiMinus) { | |
744 | fHistThetaBarDghterXiMinus = new TH1F("fHistThetaBarDghterXiMinus", "#theta of gen. Baryon #Lambda dghter; #theta_{BarDght}; Number of Bar.", 200, -10, 190); | |
745 | fListHistCascade->Add(fHistThetaBarDghterXiMinus); | |
746 | } | |
747 | // - Pt distribution (control plots) | |
748 | if (!fHistPtBachXiMinus) { | |
749 | fHistPtBachXiMinus = new TH1F("fHistPtBachXiMinus", "p_{t} of gen. Bach.; pt_{Bach}; Number of Bach.", 200, 0, 10); | |
750 | fListHistCascade->Add(fHistPtBachXiMinus); | |
751 | } | |
752 | if (!fHistPtMesDghterXiMinus) { | |
753 | fHistPtMesDghterXiMinus = new TH1F("fHistPtMesDghterXiMinus", "p_{t} of gen. Meson #Lambda dghter; pt_{MesDght}; Number of Mes.", 200, 0, 10); | |
754 | fListHistCascade->Add(fHistPtMesDghterXiMinus); | |
755 | } | |
756 | if (!fHistPtBarDghterXiMinus) { | |
757 | fHistPtBarDghterXiMinus = new TH1F("fHistPtBarDghterXiMinus", "p_{t} of gen. Baryon #Lambda dghter; pt_{BarDght}; Number of Bar.", 200, 0, 10); | |
758 | fListHistCascade->Add(fHistPtBarDghterXiMinus); | |
759 | } | |
760 | // - Xi+ | |
761 | // - Pseudo-Rapidity distribution | |
762 | if (!fHistEtaGenCascXiPlus) { | |
763 | fHistEtaGenCascXiPlus = new TH1F("fHistEtaGenCascXiPlus", "#eta of any gen. #Xi^{+}; #eta; Number of Casc", 200, -10, 10); | |
764 | fListHistCascade->Add(fHistEtaGenCascXiPlus); | |
765 | } | |
766 | if (!f3dHistGenPtVsGenYvsNtracksXiPlus) { | |
767 | f3dHistGenPtVsGenYvsNtracksXiPlus = new TH3D("f3dHistGenPtVsGenYvsNtracksXiPlus", "MC P_{t} Vs MC Y of Gen #Xi^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.); | |
768 | fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksXiPlus); | |
769 | } | |
770 | if (!f3dHistGenPtVsGenctauvsYXiPlus) { | |
771 | f3dHistGenPtVsGenctauvsYXiPlus = new TH3D("f3dHistGenPtVsGenctauvsYXiPlus", "MC P_{t} Vs MC ctau Vs Yof Gen #Xi^{+}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits); | |
772 | fListHistCascade->Add(f3dHistGenPtVsGenctauvsYXiPlus); | |
773 | } | |
774 | if (!f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff) { | |
775 | f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff = new TH3D("f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff", "MC P_{t} Vs MC Y of Gen #Xi^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.); | |
776 | fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff); | |
777 | } | |
778 | if (!f3dHistGenPtVsGenctauvsYXiPlusPhysEff) { | |
779 | f3dHistGenPtVsGenctauvsYXiPlusPhysEff = new TH3D("f3dHistGenPtVsGenctauvsYXiPlusPhysEff", "MC P_{t} Vs MC ctau Vs Yof Gen #Xi^{+}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits); | |
780 | fListHistCascade->Add(f3dHistGenPtVsGenctauvsYXiPlusPhysEff); | |
781 | } | |
782 | // - Info at the generation level of multi-strange particle | |
783 | if (!fHistThetaGenCascXiPlus) { | |
784 | fHistThetaGenCascXiPlus = new TH1F("fHistThetaGenCascXiPlus", "#theta of gen. #Xi^{+}; #theta; Number of Casc.", 200, -10, 190); | |
785 | fListHistCascade->Add(fHistThetaGenCascXiPlus); | |
786 | } | |
787 | if (!f2dHistGenPtVsGenYFdblXiPlus) { | |
788 | f2dHistGenPtVsGenYFdblXiPlus = new TH2D("f2dHistGenPtVsGenYFdblXiPlus", "MC P_{t} Vs MC Y of findable Gen #Xi^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1); | |
789 | fListHistCascade->Add(f2dHistGenPtVsGenYFdblXiPlus); | |
790 | } | |
791 | // - Theta distribution the daughters (control plots) | |
792 | if (!fHistThetaLambdaXiPlus) { | |
793 | fHistThetaLambdaXiPlus = new TH1F("fHistThetaLambdaXiPlus", "#theta of gen. #Lambda (Xi dghter); #theta_{#Lambda}; Number of #Lambda", 200, -10, 190); | |
794 | fListHistCascade->Add(fHistThetaLambdaXiPlus); | |
795 | } | |
796 | if (!fHistThetaBachXiPlus) { | |
797 | fHistThetaBachXiPlus = new TH1F("fHistThetaBachXiPlus", "#theta of gen. Bach.; #theta_{Bach}; Number of Bach.", 200, -10, 190); | |
798 | fListHistCascade->Add(fHistThetaBachXiPlus); | |
799 | } | |
800 | if (!fHistThetaMesDghterXiPlus) { | |
801 | fHistThetaMesDghterXiPlus = new TH1F("fHistThetaMesDghterXiPlus", "#theta of gen. Meson #Lambda dghter; #theta_{MesDght}; Number of Mes.", 200, -10, 190); | |
802 | fListHistCascade->Add(fHistThetaMesDghterXiPlus); | |
803 | } | |
804 | if (!fHistThetaBarDghterXiPlus) { | |
805 | fHistThetaBarDghterXiPlus = new TH1F("fHistThetaBarDghterXiPlus", "#theta of gen. Baryon #Lambda dghter; #theta_{BarDght}; Number of Bar.", 200, -10, 190); | |
806 | fListHistCascade->Add(fHistThetaBarDghterXiPlus); | |
807 | } | |
808 | // - Pt distribution (control plots) | |
809 | if (!fHistPtBachXiPlus) { | |
810 | fHistPtBachXiPlus = new TH1F("fHistPtBachXiPlus", "p_{t} of gen. Bach.; pt_{Bach}; Number of Bach.", 200, 0, 10); | |
811 | fListHistCascade->Add(fHistPtBachXiPlus); | |
812 | } | |
813 | if (!fHistPtMesDghterXiPlus) { | |
814 | fHistPtMesDghterXiPlus = new TH1F("fHistPtMesDghterXiPlus", "p_{t} of gen. Meson #Lambda dghter; pt_{MesDght}; Number of Mes.", 200, 0, 10); | |
815 | fListHistCascade->Add(fHistPtMesDghterXiPlus); | |
816 | } | |
817 | if (!fHistPtBarDghterXiPlus) { | |
818 | fHistPtBarDghterXiPlus = new TH1F("fHistPtBarDghterXiPlus", "p_{t} of gen. Baryon #Lambda dghter); pt_{BarDght}; Number of Bar.", 200, 0, 10); | |
819 | fListHistCascade->Add(fHistPtBarDghterXiPlus); | |
820 | } | |
821 | // - Omega- | |
822 | // - Pseudo-Rapidity distribution | |
823 | if (!fHistEtaGenCascOmegaMinus) { | |
824 | fHistEtaGenCascOmegaMinus = new TH1F("fHistEtaGenCascOmegaMinus", "#eta of any gen. #Omega^{-}; #eta; Number of Casc", 200, -10, 10); | |
825 | fListHistCascade->Add(fHistEtaGenCascOmegaMinus); | |
826 | } | |
827 | if (!f3dHistGenPtVsGenYvsNtracksOmegaMinus) { | |
828 | f3dHistGenPtVsGenYvsNtracksOmegaMinus = new TH3D("f3dHistGenPtVsGenYvsNtracksOmegaMinus", "MC P_{t} Vs MC Y of Gen #Omega^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.); | |
829 | fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksOmegaMinus); | |
830 | } | |
831 | if (!f3dHistGenPtVsGenctauvsYOmegaMinus) { | |
832 | f3dHistGenPtVsGenctauvsYOmegaMinus = new TH3D("f3dHistGenPtVsGenctauvsYOmegaMinus", "MC P_{t} Vs MC ctau Vs Y of Gen #Omega^{-} ", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits); | |
833 | fListHistCascade->Add(f3dHistGenPtVsGenctauvsYOmegaMinus); | |
834 | } | |
835 | if (!f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff) { | |
836 | f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff = new TH3D("f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff", "MC P_{t} Vs MC Y of Gen #Omega^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.); | |
837 | fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff); | |
838 | } | |
839 | if (!f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff) { | |
840 | f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff = new TH3D("f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff", "MC P_{t} Vs MC ctau Vs Y of Gen #Omega^{-}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits); | |
841 | fListHistCascade->Add(f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff); | |
842 | } | |
843 | // - Info at the generation level of multi-strange particle | |
844 | if (!fHistThetaGenCascOmegaMinus) { | |
845 | fHistThetaGenCascOmegaMinus = new TH1F("fHistThetaGenCascOmegaMinus", "#theta of gen. #Omega^{-}; #theta; Number of Casc.", 200, -10, 190); | |
846 | fListHistCascade->Add(fHistThetaGenCascOmegaMinus); | |
847 | } | |
848 | if (!f2dHistGenPtVsGenYFdblOmegaMinus) { | |
849 | f2dHistGenPtVsGenYFdblOmegaMinus = new TH2D("f2dHistGenPtVsGenYFdblOmegaMinus", "MC P_{t} Vs MC Y of findable Gen #Omega^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1); | |
850 | fListHistCascade->Add(f2dHistGenPtVsGenYFdblOmegaMinus); | |
851 | } | |
852 | // - Theta distribution the daughters (control plots) | |
853 | if (!fHistThetaLambdaOmegaMinus) { | |
854 | fHistThetaLambdaOmegaMinus = new TH1F("fHistThetaLambdaOmegaMinus", "#theta of gen. #Lambda (Omega dghter); #theta_{#Lambda}; Number of #Lambda", 200, -10, 190); | |
855 | fListHistCascade->Add(fHistThetaLambdaOmegaMinus); | |
856 | } | |
857 | if (!fHistThetaBachOmegaMinus) { | |
858 | fHistThetaBachOmegaMinus = new TH1F("fHistThetaBachOmegaMinus", "#theta of gen. Bach.;#theta_{Bach};Number of Bach.", 200, -10, 190); | |
859 | fListHistCascade->Add(fHistThetaBachOmegaMinus); | |
860 | } | |
861 | if (!fHistThetaMesDghterOmegaMinus) { | |
862 | fHistThetaMesDghterOmegaMinus = new TH1F("fHistThetaMesDghterOmegaMinus", "#theta of gen. Meson #Lambda dghter; #theta_{MesDght}; Number of Mes.", 200, -10, 190); | |
863 | fListHistCascade->Add(fHistThetaMesDghterOmegaMinus); | |
864 | } | |
865 | if (!fHistThetaBarDghterOmegaMinus) { | |
866 | fHistThetaBarDghterOmegaMinus = new TH1F("fHistThetaBarDghterOmegaMinus", "#theta of gen. Baryon #Lambda dghter; #theta_{BarDght}; Number of Bar.", 200, -10, 190); | |
867 | fListHistCascade->Add(fHistThetaBarDghterOmegaMinus); | |
868 | } | |
869 | // - Pt distribution (control plots) | |
870 | if (!fHistPtBachOmegaMinus) { | |
871 | fHistPtBachOmegaMinus = new TH1F("fHistPtBachOmegaMinus", "p_{t} of gen. Bach.; pt_{Bach}; Number of Bach.", 200, 0, 10); | |
872 | fListHistCascade->Add(fHistPtBachOmegaMinus); | |
873 | } | |
874 | if (!fHistPtMesDghterOmegaMinus) { | |
875 | fHistPtMesDghterOmegaMinus = new TH1F("fHistPtMesDghterOmegaMinus", "p_{t} of gen. Meson #Lambda dghter); pt_{MesDght}; Number of Mes.", 200, 0, 10); | |
876 | fListHistCascade->Add(fHistPtMesDghterOmegaMinus); | |
877 | } | |
878 | if (!fHistPtBarDghterOmegaMinus) { | |
879 | fHistPtBarDghterOmegaMinus = new TH1F("fHistPtBarDghterOmegaMinus", "p_{t} of gen. Baryon #Lambda dghter); pt_{BarDght}; Number of Bar.", 200, 0, 10); | |
880 | fListHistCascade->Add(fHistPtBarDghterOmegaMinus); | |
881 | } | |
882 | // - Omega+ | |
883 | // - Pseudo-Rapidity distribution | |
884 | if (!fHistEtaGenCascOmegaPlus) { | |
885 | fHistEtaGenCascOmegaPlus = new TH1F("fHistEtaGenCascOmegaPlus", "#eta of any gen. #Omega^{+}; #eta; Number of Casc", 200, -10, 10); | |
886 | fListHistCascade->Add(fHistEtaGenCascOmegaPlus); | |
887 | } | |
888 | if (!f3dHistGenPtVsGenYvsNtracksOmegaPlus) { | |
889 | f3dHistGenPtVsGenYvsNtracksOmegaPlus = new TH3D("f3dHistGenPtVsGenYvsNtracksOmegaPlus", "MC P_{t} Vs MC Y of Gen #Omega^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.); | |
890 | fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksOmegaPlus); | |
891 | } | |
892 | if (!f3dHistGenPtVsGenctauvsYOmegaPlus) { | |
893 | f3dHistGenPtVsGenctauvsYOmegaPlus = new TH3D("f3dHistGenPtVsGenctauvsYOmegaPlus", "MC P_{t} Vs MC ctau Vs Y of Gen #Omega^{+} ", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits); | |
894 | fListHistCascade->Add(f3dHistGenPtVsGenctauvsYOmegaPlus); | |
895 | } | |
896 | if (!f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff) { | |
897 | f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff = new TH3D("f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff", "MC P_{t} Vs MC Y of Gen #Omega^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.); | |
898 | fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff); | |
899 | } | |
900 | if (!f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff) { | |
901 | f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff = new TH3D("f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff", "MC P_{t} Vs MC ctau Vs Y of Gen #Omega^{+}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits); | |
902 | fListHistCascade->Add(f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff); | |
903 | } | |
904 | // - Info at the generation level of multi-strange particle | |
905 | if (!fHistThetaGenCascOmegaPlus) { | |
906 | fHistThetaGenCascOmegaPlus = new TH1F("fHistThetaGenCascOmegaPlus", "#theta of gen. #Omega^{+}; #theta; Number of Casc.", 200, -10, 190); | |
907 | fListHistCascade->Add(fHistThetaGenCascOmegaPlus); | |
908 | } | |
909 | if (!f2dHistGenPtVsGenYFdblOmegaPlus) { | |
910 | f2dHistGenPtVsGenYFdblOmegaPlus = new TH2D("f2dHistGenPtVsGenYFdblOmegaPlus", "MC P_{t} Vs MC Y of findable Gen #Omega^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1); | |
911 | fListHistCascade->Add(f2dHistGenPtVsGenYFdblOmegaPlus); | |
912 | } | |
913 | // - Info at the generation level of multi-strange particle | |
914 | if (!fHistThetaGenCascOmegaPlus) { | |
915 | fHistThetaGenCascOmegaPlus = new TH1F("fHistThetaGenCascOmegaPlus", "#theta of gen. #Omega^{+}; #theta; Number of Casc.", 200, -10, 190); | |
916 | fListHistCascade->Add(fHistThetaGenCascOmegaPlus); | |
917 | } | |
918 | if (!f2dHistGenPtVsGenYFdblOmegaPlus) { | |
919 | f2dHistGenPtVsGenYFdblOmegaPlus = new TH2D("f2dHistGenPtVsGenYFdblOmegaPlus", "MC P_{t} Vs MC Y of findable Gen #Omega^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1); | |
920 | fListHistCascade->Add(f2dHistGenPtVsGenYFdblOmegaPlus); | |
921 | } | |
922 | // - Theta distribution the daughters (control plots) | |
923 | if (!fHistThetaLambdaOmegaPlus) { | |
924 | fHistThetaLambdaOmegaPlus = new TH1F("fHistThetaLambdaOmegaPlus", "#theta of gen. #Lambda (Omega dghter); #theta_{#Lambda}; Number of #Lambda", 200, -10, 190); | |
925 | fListHistCascade->Add(fHistThetaLambdaOmegaPlus); | |
926 | } | |
927 | if (!fHistThetaBachOmegaPlus) { | |
928 | fHistThetaBachOmegaPlus = new TH1F("fHistThetaBachOmegaPlus", "#theta of gen. Bach.; #theta_{Bach}; Number of Bach.", 200, -10, 190); | |
929 | fListHistCascade->Add(fHistThetaBachOmegaPlus); | |
930 | } | |
931 | if (!fHistThetaMesDghterOmegaPlus) { | |
932 | fHistThetaMesDghterOmegaPlus = new TH1F("fHistThetaMesDghterOmegaPlus", "#theta of gen. Meson #Lambda dghter; #theta_{MesDght}; Number of Mes.", 200, -10, 190); | |
933 | fListHistCascade->Add(fHistThetaMesDghterOmegaPlus); | |
934 | } | |
935 | if (!fHistThetaBarDghterOmegaPlus) { | |
936 | fHistThetaBarDghterOmegaPlus = new TH1F("fHistThetaBarDghterOmegaPlus", "#theta of gen. Baryon #Lambda dghter; #theta_{BarDght}; Number of Bar.", 200, -10, 190); | |
937 | fListHistCascade->Add(fHistThetaBarDghterOmegaPlus); | |
938 | } | |
939 | // - Pt distribution (control plots) | |
940 | if (!fHistPtBachOmegaPlus) { | |
941 | fHistPtBachOmegaPlus = new TH1F("fHistPtBachOmegaPlus", "p_{t} of gen. Bach.; pt_{Bach}; Number of Bach.", 200, 0, 10); | |
942 | fListHistCascade->Add(fHistPtBachOmegaPlus); | |
943 | } | |
944 | if (!fHistPtMesDghterOmegaPlus) { | |
945 | fHistPtMesDghterOmegaPlus = new TH1F("fHistPtMesDghterOmegaPlus", "p_{t} of gen. Meson #Lambda dghter; pt_{MesDght}; Number of Mes.", 200, 0, 10); | |
946 | fListHistCascade->Add(fHistPtMesDghterOmegaPlus); | |
947 | } | |
948 | if (!fHistPtBarDghterOmegaPlus) { | |
949 | fHistPtBarDghterOmegaPlus = new TH1F("fHistPtBarDghterOmegaPlus", "p_{t} of gen. Baryon #Lambda dghter); pt_{BarDght}; Number of Bar.", 200, 0, 10); | |
950 | fListHistCascade->Add(fHistPtBarDghterOmegaPlus); | |
951 | } | |
952 | ||
953 | //------------------------------------------------------------------------- | |
954 | // - Any reconstructed cascades + reconstructed cascades associated with MC | |
955 | ||
956 | // - Multiplicity cascde plots | |
957 | fHistnAssoXiMinus= new TH1F("fHistnAssoXiMinus", "", 25, 0, 25); | |
958 | fListHistCascade->Add(fHistnAssoXiMinus); | |
959 | fHistnAssoXiPlus= new TH1F("fHistnAssoXiPlus", "", 25, 0, 25); | |
960 | fListHistCascade->Add(fHistnAssoXiPlus); | |
961 | fHistnAssoOmegaMinus= new TH1F("fHistnAssoOmegaMinus", "", 25, 0, 25); | |
962 | fListHistCascade->Add(fHistnAssoOmegaMinus); | |
963 | fHistnAssoOmegaPlus= new TH1F("fHistnAssoOmegaPlus", "", 25, 0, 25); | |
964 | fListHistCascade->Add(fHistnAssoOmegaPlus); | |
965 | // - Effective mass histos for cascades candidates. | |
966 | if (! fHistMassXiMinus) { | |
967 | fHistMassXiMinus = new TH1F("fHistMassXiMinus","#Xi^{-} candidates; M( #Lambda , #pi^{-} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0); | |
968 | fListHistCascade->Add(fHistMassXiMinus); | |
969 | } | |
970 | if (! fHistMassXiPlus) { | |
971 | fHistMassXiPlus = new TH1F("fHistMassXiPlus","#Xi^{+} candidates; M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0); | |
972 | fListHistCascade->Add(fHistMassXiPlus); | |
973 | } | |
974 | if (! fHistMassOmegaMinus) { | |
975 | fHistMassOmegaMinus = new TH1F("fHistMassOmegaMinus","#Omega^{-} candidates; M( #Lambda , K^{-} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5); | |
976 | fListHistCascade->Add(fHistMassOmegaMinus); | |
977 | } | |
978 | if (! fHistMassOmegaPlus) { | |
979 | fHistMassOmegaPlus = new TH1F("fHistMassOmegaPlus","#Omega^{+} candidates; M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5); | |
980 | fListHistCascade->Add(fHistMassOmegaPlus); | |
981 | } | |
982 | // - Effective mass histos with combined PID | |
983 | if (! fHistMassWithCombPIDXiMinus) { | |
984 | fHistMassWithCombPIDXiMinus = new TH1F("fHistMassWithCombPIDXiMinus","#Xi^{-} candidates, with Bach. comb. PID; M( #Lambda , #pi^{-} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0); | |
985 | fListHistCascade->Add(fHistMassWithCombPIDXiMinus); | |
986 | } | |
987 | if (! fHistMassWithCombPIDXiPlus) { | |
988 | fHistMassWithCombPIDXiPlus = new TH1F("fHistMassWithCombPIDXiPlus","#Xi^{+} candidates, with Bach. comb. PID; M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0); | |
989 | fListHistCascade->Add(fHistMassWithCombPIDXiPlus); | |
990 | } | |
991 | if (! fHistMassWithCombPIDOmegaMinus) { | |
992 | fHistMassWithCombPIDOmegaMinus = new TH1F("fHistMassWithCombPIDOmegaMinus","#Omega^{-} candidates, with Bach. comb. PID; M( #Lambda , K^{-} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5); | |
993 | fListHistCascade->Add(fHistMassWithCombPIDOmegaMinus); | |
994 | } | |
995 | if (! fHistMassWithCombPIDOmegaPlus) { | |
996 | fHistMassWithCombPIDOmegaPlus = new TH1F("fHistMassWithCombPIDOmegaPlus","#Omega^{+} candidates, with Bach. comb. PID; M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5); | |
997 | fListHistCascade->Add(fHistMassWithCombPIDOmegaPlus); | |
998 | } | |
999 | // - PID Probability versus MC Pt(bachelor track) | |
1000 | if (! f2dHistPIDprobaKaonVsMCPtBach ){ | |
1001 | f2dHistPIDprobaKaonVsMCPtBach = new TH2F("f2dHistPIDprobaKaonVsMCPtBach", "Comb. PID proba to be K^{#pm} Vs MC Bach. Pt; Pt_{MC}(Bach.) (GeV/c); Comb. PID Proba (Bach. = K^{#pm})", 100, 0.0, 5.0, 110, 0.0, 1.10); | |
1002 | fListHistCascade->Add(f2dHistPIDprobaKaonVsMCPtBach); | |
1003 | } | |
1004 | if(! f2dHistPIDprobaPionVsMCPtBach ){ | |
1005 | f2dHistPIDprobaPionVsMCPtBach = new TH2F("f2dHistPIDprobaPionVsMCPtBach", "Comb. PID proba to be #pi^{#pm} Vs MC Bach. Pt; Pt_{MC}(Bach.) (GeV/c); Comb. PID Proba (Bach. = #pi^{#pm})", 100, 0.0, 5.0, 110, 0.0, 1.10); | |
1006 | fListHistCascade->Add(f2dHistPIDprobaPionVsMCPtBach); | |
1007 | } | |
1008 | // - Effective mass histos with perfect MC PID on the bachelor | |
1009 | if (! fHistMassWithMcPIDXiMinus) { | |
1010 | fHistMassWithMcPIDXiMinus = new TH1F("fHistMassWithMcPIDXiMinus", "#Xi^{-} candidates, with Bach. MC PID; M( #Lambda , #pi^{-} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0); | |
1011 | fListHistCascade->Add(fHistMassWithMcPIDXiMinus); | |
1012 | } | |
1013 | if (! fHistMassWithMcPIDXiPlus) { | |
1014 | fHistMassWithMcPIDXiPlus = new TH1F("fHistMassWithMcPIDXiPlus", "#Xi^{+} candidates, with Bach. MC PID; M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0); | |
1015 | fListHistCascade->Add(fHistMassWithMcPIDXiPlus); | |
1016 | } | |
1017 | if (! fHistMassWithMcPIDOmegaMinus) { | |
1018 | fHistMassWithMcPIDOmegaMinus = new TH1F("fHistMassWithMcPIDOmegaMinus", "#Omega^{-} candidates, with Bach. MC PID; M( #Lambda , K^{-} ) (GeV/c^{2});Counts", 500, 1.5, 2.5); | |
1019 | fListHistCascade->Add(fHistMassWithMcPIDOmegaMinus); | |
1020 | } | |
1021 | if (! fHistMassWithMcPIDOmegaPlus) { | |
1022 | fHistMassWithMcPIDOmegaPlus = new TH1F("fHistMassWithMcPIDOmegaPlus", "#Omega^{+} candidates, with Bach. MC PID; M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5); | |
1023 | fListHistCascade->Add(fHistMassWithMcPIDOmegaPlus); | |
1024 | } | |
1025 | // - Effective mass histos for cascades candidates ASSOCIATED with MC. | |
1026 | if (! fHistAsMCMassXiMinus) { | |
1027 | fHistAsMCMassXiMinus = new TH1F("fHistAsMCMassXiMinus", "#Xi^{-} candidates associated to MC; M( #Lambda , #pi^{-} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0); | |
1028 | fListHistCascade->Add(fHistAsMCMassXiMinus); | |
1029 | } | |
1030 | if (! fHistAsMCMassXiPlus) { | |
1031 | fHistAsMCMassXiPlus = new TH1F("fHistAsMCMassXiPlus", "#Xi^{+} candidates associated to MC; M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0); | |
1032 | fListHistCascade->Add(fHistAsMCMassXiPlus); | |
1033 | } | |
1034 | if (! fHistAsMCMassOmegaMinus) { | |
1035 | fHistAsMCMassOmegaMinus = new TH1F("fHistAsMCMassOmegaMinus", "#Omega^{-} candidates associated to MC; M( #Lambda , K^{-} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5); | |
1036 | fListHistCascade->Add(fHistAsMCMassOmegaMinus); | |
1037 | } | |
1038 | if (! fHistAsMCMassOmegaPlus) { | |
1039 | fHistAsMCMassOmegaPlus = new TH1F("fHistAsMCMassOmegaPlus", "#Omega^{+} candidates associated to MC; M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5); | |
1040 | fListHistCascade->Add(fHistAsMCMassOmegaPlus); | |
1041 | } | |
1042 | // - Generated Pt Vs generated Y of the cascade candidates associated with MC + having the proper maximum proba of combined PID for the bachelor | |
1043 | if (!f2dHistAsMCandCombPIDGenPtVsGenYXiMinus) { | |
1044 | f2dHistAsMCandCombPIDGenPtVsGenYXiMinus = new TH2F("f2dHistAsMCandCombPIDGenPtVsGenYXiMinus", "MC P_{t} Vs MC Y of #Xi^{-} (associated+Bach.PID); Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 220, -1.1, 1.1); | |
1045 | fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYXiMinus); | |
1046 | } | |
1047 | if (!f2dHistAsMCandCombPIDGenPtVsGenYXiPlus) { | |
1048 | f2dHistAsMCandCombPIDGenPtVsGenYXiPlus = new TH2F("f2dHistAsMCandCombPIDGenPtVsGenYXiPlus", "MC P_{t} Vs MC Y of #Xi^{+} (associated+Bach.PID); Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1); | |
1049 | fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYXiPlus); | |
1050 | } | |
1051 | if (!f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus) { | |
1052 | f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus = new TH2F("f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus", "MC P_{t} Vs MC Y of #Omega^{-} (associated+Bach.PID); Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 220, -1.1, 1.1); | |
1053 | fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus); | |
1054 | } | |
1055 | if (!f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus) { | |
1056 | f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus = new TH2F("f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus", "MC P_{t} Vs MC Y of #Omega^{+} (associated+Bach.PID); Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 220, -1.1, 1.1); | |
1057 | fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus); | |
1058 | } | |
1059 | // - Generated Pt Vs Generated Y, for the cascade candidates associated with MC | |
1060 | if (!f2dHistAsMCGenPtVsGenYXiMinus) { | |
1061 | f2dHistAsMCGenPtVsGenYXiMinus = new TH2F("f2dHistAsMCGenPtVsGenYXiMinus", "MC P_{t} Vs MC Y of gen. #Xi^{-} (associated); Pt_{MC} (GeV/c); Rapidity, Y_{MC}",200, 0., 10., 220, -1.1, 1.1); | |
1062 | fListHistCascade->Add(f2dHistAsMCGenPtVsGenYXiMinus ); | |
1063 | } | |
1064 | if (!f2dHistAsMCGenPtVsGenYXiPlus) { | |
1065 | f2dHistAsMCGenPtVsGenYXiPlus = new TH2F("f2dHistAsMCGenPtVsGenYXiPlus", "MC P_{t} Vs MC Y of gen. #Xi^{+} (associated); Pt_{MC} (GeV/c); Rapidity, Y_{MC}",200, 0., 10., 220, -1.1, 1.1); | |
1066 | fListHistCascade->Add(f2dHistAsMCGenPtVsGenYXiPlus ); | |
1067 | } | |
1068 | if (!f2dHistAsMCGenPtVsGenYOmegaMinus) { | |
1069 | f2dHistAsMCGenPtVsGenYOmegaMinus = new TH2F("f2dHistAsMCGenPtVsGenYOmegaMinus", "MC P_{t} Vs MC Y of gen. #Omega^{-} (associated); Pt_{MC} (GeV/c); Rapidity, Y_{MC}",200, 0., 10., 220, -1.1, 1.1); | |
1070 | fListHistCascade->Add(f2dHistAsMCGenPtVsGenYOmegaMinus ); | |
1071 | } | |
1072 | if (!f2dHistAsMCGenPtVsGenYOmegaPlus) { | |
1073 | f2dHistAsMCGenPtVsGenYOmegaPlus = new TH2F("f2dHistAsMCGenPtVsGenYOmegaPlus", "MC P_{t} Vs MC Y of gen. #Omega^{+} (associated); Pt_{MC} (GeV/c); Rapidity, Y_{MC}",200, 0., 10., 220, -1.1, 1.1); | |
1074 | fListHistCascade->Add(f2dHistAsMCGenPtVsGenYOmegaPlus ); | |
1075 | } | |
1076 | // - Generated Eta of the the cascade candidates associated with MC | |
1077 | if (!fHistAsMCGenEtaXiMinus) { | |
1078 | fHistAsMCGenEtaXiMinus = new TH1F("fHistAsMCGenEtaXiMinus", "#eta of gen. #Xi^{-} (associated); #eta; Count", 100, -5, 5); | |
1079 | fListHistCascade->Add( fHistAsMCGenEtaXiMinus ); | |
1080 | } | |
1081 | if (!fHistAsMCGenEtaXiPlus) { | |
1082 | fHistAsMCGenEtaXiPlus = new TH1F("fHistAsMCGenEtaXiPlus", "#eta of gen. #Xi^{+} (associated); #eta; Count", 100, -5, 5); | |
1083 | fListHistCascade->Add( fHistAsMCGenEtaXiPlus ); | |
1084 | } | |
1085 | if (!fHistAsMCGenEtaOmegaMinus) { | |
1086 | fHistAsMCGenEtaOmegaMinus = new TH1F("fHistAsMCGenEtaOmegaMinus", "#eta of gen. #Omega^{-} (associated);#eta;Number of Casc", 100, -5, 5); | |
1087 | fListHistCascade->Add( fHistAsMCGenEtaOmegaMinus ); | |
1088 | } | |
1089 | if (!fHistAsMCGenEtaOmegaPlus) { | |
1090 | fHistAsMCGenEtaOmegaPlus = new TH1F("fHistAsMCGenEtaOmegaPlus", "#eta of gen. #Omega^{+} (associated); #eta; Count", 100, -5, 5); | |
1091 | fListHistCascade->Add( fHistAsMCGenEtaOmegaPlus ); | |
1092 | } | |
1093 | // - Resolution in Pt as function of generated Pt | |
1094 | if (! f2dHistAsMCResPtXiMinus) { | |
1095 | f2dHistAsMCResPtXiMinus = new TH2F("f2dHistAsMCResPtXiMinus", "Resolution in Pt reconstruction for #Xi^{-}; Pt_{MC} (GeV/c); (Pt_{reco} - Pt_{MC}) / Pt_{MC}", 200, 0., 10., 200, -0.1, 0.1); | |
1096 | fListHistCascade->Add(f2dHistAsMCResPtXiMinus); | |
1097 | } | |
1098 | if (! f2dHistAsMCResPtXiPlus) { | |
1099 | f2dHistAsMCResPtXiPlus = new TH2F("f2dHistAsMCResPtXiPlus", "Resolution in Pt reconstruction for #Xi^{+}; Pt_{MC} (GeV/c); (Pt_{reco} - Pt_{MC}) / Pt_{MC}", 200, 0., 10., 200, -0.1, 0.1); | |
1100 | fListHistCascade->Add(f2dHistAsMCResPtXiPlus); | |
1101 | } | |
1102 | if (! f2dHistAsMCResPtOmegaMinus) { | |
1103 | f2dHistAsMCResPtOmegaMinus = new TH2F("f2dHistAsMCResPtOmegaMinus", "Resolution in Pt reconstruction for #Omega^{-}; Pt_{MC} (GeV/c); (Pt_{reco} - Pt_{MC}) / Pt_{MC}", 200, 0., 10., 200, -0.1, 0.1); | |
1104 | fListHistCascade->Add(f2dHistAsMCResPtOmegaMinus); | |
1105 | } | |
1106 | if (! f2dHistAsMCResPtOmegaPlus) { | |
1107 | f2dHistAsMCResPtOmegaPlus = new TH2F("f2dHistAsMCResPtOmegaPlus", "Resolution in Pt reconstruction for #Omega^{+}; Pt_{MC} (GeV/c); (Pt_{reco} - Pt_{MC}) / Pt_{MC}", 200, 0., 10., 200, -0.1, 0.1); | |
1108 | fListHistCascade->Add(f2dHistAsMCResPtOmegaPlus); | |
1109 | } | |
1110 | // - Resolution in R(2D) as function of generated R | |
1111 | if (! f2dHistAsMCResRXiMinus) { | |
1112 | f2dHistAsMCResRXiMinus = new TH2F("f2dHistAsMCResRXiMinus", "Resolution in transv. position for #Xi^{-}; R_{MC} (cm); (R_{reco} - R_{MC}) / R_{MC}", 450, 0., 45.0, 240, -0.3, 0.3); | |
1113 | fListHistCascade->Add(f2dHistAsMCResRXiMinus); | |
1114 | } | |
1115 | if (! f2dHistAsMCResRXiPlus) { | |
1116 | f2dHistAsMCResRXiPlus = new TH2F("f2dHistAsMCResRXiPlus", "Resolution in transv. position for #Xi^{+}; R_{MC} (cm); (R_{reco} - R_{MC}) / R_{MC}", 450, 0., 45.0, 240, -0.3, 0.3); | |
1117 | fListHistCascade->Add(f2dHistAsMCResRXiPlus); | |
1118 | } | |
1119 | if (! f2dHistAsMCResROmegaMinus) { | |
1120 | f2dHistAsMCResROmegaMinus = new TH2F("f2dHistAsMCResROmegaMinus", "Resolution in transv. position for #Omega^{-}; R_{MC} (cm); (R_{reco} - R_{MC}) / R_{MC}", 450, 0., 45.0, 240, -0.3, 0.3); | |
1121 | fListHistCascade->Add(f2dHistAsMCResROmegaMinus); | |
1122 | } | |
1123 | if (! f2dHistAsMCResROmegaPlus) { | |
1124 | f2dHistAsMCResROmegaPlus = new TH2F("f2dHistAsMCResROmegaPlus", "Resolution in transv. position for #Omega^{+}; R_{MC} (cm); (R_{reco} - R_{MC}) / R_{MC}", 450, 0., 45.0, 240, -0.3, 0.3); | |
1125 | fListHistCascade->Add(f2dHistAsMCResROmegaPlus); | |
1126 | } | |
1127 | // - Resolution in phi as function of generated Pt | |
1128 | if (! f2dHistAsMCResPhiXiMinus) { | |
1129 | f2dHistAsMCResPhiXiMinus = new TH2F("f2dHistAsMCResPhiXiMinus", "Resolution in #phi for #Xi^{-}; Pt_{MC} (GeV/c); #phi(MC) - #phi(reco) (deg)", 200, 0., 10., 60, -30., 30.); | |
1130 | fListHistCascade->Add(f2dHistAsMCResPhiXiMinus); | |
1131 | } | |
1132 | if (! f2dHistAsMCResPhiXiPlus) { | |
1133 | f2dHistAsMCResPhiXiPlus = new TH2F("f2dHistAsMCResPhiXiPlus", "Resolution in #phi for #Xi^{+}; Pt_{MC} (GeV/c); #phi(MC) - #phi(reco) (deg)", 200, 0., 10., 60, -30., 30.); | |
1134 | fListHistCascade->Add(f2dHistAsMCResPhiXiPlus); | |
1135 | } | |
1136 | if (! f2dHistAsMCResPhiOmegaMinus) { | |
1137 | f2dHistAsMCResPhiOmegaMinus = new TH2F("f2dHistAsMCResPhiOmegaMinus", "Resolution in #phi for #Omega^{-}; Pt_{MC} (GeV/c); #phi(MC) - #phi(reco) (deg)", 200, 0., 10., 60, -30., 30.); | |
1138 | fListHistCascade->Add(f2dHistAsMCResPhiOmegaMinus); | |
1139 | } | |
1140 | if (! f2dHistAsMCResPhiOmegaPlus) { | |
1141 | f2dHistAsMCResPhiOmegaPlus = new TH2F("f2dHistAsMCResPhiOmegaPlus", "Resolution in #phi for #Omega^{+}; Pt_{MC} (GeV/c); #phi(MC) - #phi(reco) (deg)", 200, 0., 10., 60, -30., 30.); | |
1142 | fListHistCascade->Add(f2dHistAsMCResPhiOmegaPlus); | |
1143 | } | |
1144 | // - Correlation between proton (antiproton) daughter MC pt and Xi/Omega MC pt (to apply Geant/Fluka correction) | |
1145 | if (!f2dHistAsMCptProtonMCptXiMinus) { | |
1146 | f2dHistAsMCptProtonMCptXiMinus = new TH2F("f2dHistAsMCptProtonMCptXiMinus", "Proton MC pt vs Xi- MC pt", 100, 0., 10., 100, 0., 10.); | |
1147 | fListHistCascade->Add(f2dHistAsMCptProtonMCptXiMinus); | |
1148 | } | |
1149 | if (!f2dHistAsMCptAntiprotonMCptXiPlus) { | |
1150 | f2dHistAsMCptAntiprotonMCptXiPlus = new TH2F("f2dHistAsMCptAntiprotonMCptXiPlus", "Antiproton MC pt vs Xi+ MC pt", 100, 0., 10., 100, 0., 10.); | |
1151 | fListHistCascade->Add(f2dHistAsMCptAntiprotonMCptXiPlus); | |
1152 | } | |
1153 | if (!f2dHistAsMCptProtonMCptOmegaMinus) { | |
1154 | f2dHistAsMCptProtonMCptOmegaMinus = new TH2F("f2dHistAsMCptProtonMCptOmegaMinus", "Proton MC pt vs Omega- MC pt", 100, 0., 10., 100, 0., 10.); | |
1155 | fListHistCascade->Add(f2dHistAsMCptProtonMCptOmegaMinus); | |
1156 | } | |
1157 | if (!f2dHistAsMCptAntiprotonMCptOmegaPlus) { | |
1158 | f2dHistAsMCptAntiprotonMCptOmegaPlus = new TH2F("f2dHistAsMCptAntiprotonMCptOmegaPlus", "Antiproton MC pt vs Omega+ MC pt", 100, 0., 10., 100, 0., 10.); | |
1159 | fListHistCascade->Add(f2dHistAsMCptAntiprotonMCptOmegaPlus); | |
1160 | } | |
1161 | // - Cosine of Pointing angle | |
1162 | if (! fHistV0toXiCosineOfPointingAngle) { | |
1163 | fHistV0toXiCosineOfPointingAngle = new TH1F("fHistV0toXiCosineOfPointingAngle", "Cos. of V0 Ptng Angl / Xi vtx ; Cos(V0 Point. Angl / Xi vtx); Counts", 200, 0.95, 1.0001); | |
1164 | fListHistCascade->Add(fHistV0toXiCosineOfPointingAngle); | |
1165 | } | |
1166 | if (! fHistV0CosineOfPointingAnglevsPtXi) { | |
1167 | fHistV0CosineOfPointingAnglevsPtXi = new TH2F("fHistV0CosineOfPointingAnglevsPtXi", "Cos. of V0 Ptng Angl vs cascade Pt; Cos(V0 Point. Angl); Counts", 100, 0., 10., 200, 0.95, 1.0001); | |
1168 | fListHistCascade->Add(fHistV0CosineOfPointingAnglevsPtXi); | |
1169 | } | |
1170 | if (! fHistV0CosineOfPointingAnglevsPtOmega) { | |
1171 | fHistV0CosineOfPointingAnglevsPtOmega = new TH2F("fHistV0CosineOfPointingAnglevsPtOmega", "Cos. of V0 Ptng Angl vs cascade Pt; Cos(V0 Point. Angl); Counts", 100, 0., 10., 200, 0.95, 1.0001); | |
1172 | fListHistCascade->Add(fHistV0CosineOfPointingAnglevsPtOmega); | |
1173 | } | |
1174 | ||
1175 | //-------------- | |
1176 | // - CFContainer | |
1177 | // PID container Xi- | |
1178 | if(! fCFContCascadePIDAsXiMinus) { | |
1179 | const Int_t lNbSteps = 7; | |
1180 | const Int_t lNbVariables = 3; | |
1181 | //Array for the number of bins in each dimension: | |
1182 | Int_t lNbBinsPerVar[3] = {0}; | |
1183 | lNbBinsPerVar[0] = 100; | |
1184 | lNbBinsPerVar[1] = 800; | |
1185 | lNbBinsPerVar[2] = 22; | |
1186 | fCFContCascadePIDAsXiMinus = new AliCFContainer(Form("fCFContCascadePIDAsXiMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{-} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar ); | |
1187 | //Setting the bin limits | |
1188 | fCFContCascadePIDAsXiMinus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade) | |
1189 | fCFContCascadePIDAsXiMinus->SetBinLimits(1, 1.2 , 2.0 ); // Xi Effective mass | |
1190 | fCFContCascadePIDAsXiMinus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity | |
1191 | //Setting the step title : one per PID case | |
1192 | fCFContCascadePIDAsXiMinus->SetStepTitle(0, "No PID"); | |
1193 | fCFContCascadePIDAsXiMinus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track"); | |
1194 | fCFContCascadePIDAsXiMinus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks"); | |
1195 | fCFContCascadePIDAsXiMinus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks"); | |
1196 | fCFContCascadePIDAsXiMinus->SetStepTitle(4, "Comb. PID / Bachelor"); | |
1197 | fCFContCascadePIDAsXiMinus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon"); | |
1198 | fCFContCascadePIDAsXiMinus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson"); | |
1199 | //Setting the variable title, per axis | |
1200 | fCFContCascadePIDAsXiMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)"); | |
1201 | fCFContCascadePIDAsXiMinus->SetVarTitle(1, "M( #Lambda , #pi^{-} ) (GeV/c^{2})"); | |
1202 | fCFContCascadePIDAsXiMinus->SetVarTitle(2, "Y_{#Xi}"); | |
1203 | fListHistCascade->Add(fCFContCascadePIDAsXiMinus); | |
1204 | } | |
1205 | // PID container Xi+ | |
1206 | if(! fCFContCascadePIDAsXiPlus) { | |
1207 | const Int_t lNbSteps = 7; | |
1208 | const Int_t lNbVariables = 3; | |
1209 | //Array for the number of bins in each dimension : | |
1210 | Int_t lNbBinsPerVar[3] = {0}; | |
1211 | lNbBinsPerVar[0] = 100; | |
1212 | lNbBinsPerVar[1] = 800; | |
1213 | lNbBinsPerVar[2] = 22; | |
1214 | fCFContCascadePIDAsXiPlus = new AliCFContainer(Form("fCFContCascadePIDAsXiPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{+} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar ); | |
1215 | //Setting the bin limits (valid for v4-18-10-AN) | |
1216 | fCFContCascadePIDAsXiPlus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade) | |
1217 | fCFContCascadePIDAsXiPlus->SetBinLimits(1, 1.2 , 2.0 ); // Xi Effective mass | |
1218 | fCFContCascadePIDAsXiPlus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity | |
1219 | //Setting the step title : one per PID case | |
1220 | fCFContCascadePIDAsXiPlus->SetStepTitle(0, "No PID"); | |
1221 | fCFContCascadePIDAsXiPlus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track"); | |
1222 | fCFContCascadePIDAsXiPlus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks"); | |
1223 | fCFContCascadePIDAsXiPlus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks"); | |
1224 | fCFContCascadePIDAsXiPlus->SetStepTitle(4, "Comb. PID / Bachelor"); | |
1225 | fCFContCascadePIDAsXiPlus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon"); | |
1226 | fCFContCascadePIDAsXiPlus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson"); | |
1227 | //Setting the variable title, per axis | |
1228 | fCFContCascadePIDAsXiPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)"); | |
1229 | fCFContCascadePIDAsXiPlus->SetVarTitle(1, "M( #Lambda , #pi^{+} ) (GeV/c^{2})"); | |
1230 | fCFContCascadePIDAsXiPlus->SetVarTitle(2, "Y_{#Xi}"); | |
1231 | fListHistCascade->Add(fCFContCascadePIDAsXiPlus); | |
1232 | } | |
1233 | // PID container Omega- | |
1234 | if(! fCFContCascadePIDAsOmegaMinus) { | |
1235 | const Int_t lNbSteps = 7; | |
1236 | const Int_t lNbVariables = 3; | |
1237 | //Array for the number of bins in each dimension : | |
1238 | Int_t lNbBinsPerVar[3] = {0}; | |
1239 | lNbBinsPerVar[0] = 100; | |
1240 | lNbBinsPerVar[1] = 1000; | |
1241 | lNbBinsPerVar[2] = 22; | |
1242 | fCFContCascadePIDAsOmegaMinus = new AliCFContainer(Form("fCFContCascadePIDAsOmegaMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{-} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar ); | |
1243 | //Setting the bin limits | |
1244 | fCFContCascadePIDAsOmegaMinus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade) | |
1245 | fCFContCascadePIDAsOmegaMinus->SetBinLimits(1, 1.5 , 2.5 ); // Omega Effective mass | |
1246 | fCFContCascadePIDAsOmegaMinus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity | |
1247 | //Setting the step title : one per PID case | |
1248 | fCFContCascadePIDAsOmegaMinus->SetStepTitle(0, "No PID"); | |
1249 | fCFContCascadePIDAsOmegaMinus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track"); | |
1250 | fCFContCascadePIDAsOmegaMinus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks"); | |
1251 | fCFContCascadePIDAsOmegaMinus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks"); | |
1252 | fCFContCascadePIDAsOmegaMinus->SetStepTitle(4, "Comb. PID / Bachelor"); | |
1253 | fCFContCascadePIDAsOmegaMinus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon"); | |
1254 | fCFContCascadePIDAsOmegaMinus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson"); | |
1255 | //Setting the variable title, per axis | |
1256 | fCFContCascadePIDAsOmegaMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)"); | |
1257 | fCFContCascadePIDAsOmegaMinus->SetVarTitle(1, "M( #Lambda , K^{-} ) (GeV/c^{2})"); | |
1258 | fCFContCascadePIDAsOmegaMinus->SetVarTitle(2, "Y_{#Omega}"); | |
1259 | fListHistCascade->Add(fCFContCascadePIDAsOmegaMinus); | |
1260 | } | |
1261 | // PID container Omega+ | |
1262 | if(! fCFContCascadePIDAsOmegaPlus) { | |
1263 | const Int_t lNbSteps = 7; | |
1264 | const Int_t lNbVariables = 3; | |
1265 | //Array for the number of bins in each dimension : | |
1266 | Int_t lNbBinsPerVar[3]= {0}; | |
1267 | lNbBinsPerVar[0] = 100; | |
1268 | lNbBinsPerVar[1] = 1000; | |
1269 | lNbBinsPerVar[2] = 22; | |
1270 | fCFContCascadePIDAsOmegaPlus = new AliCFContainer(Form("fCFContCascadePIDAsOmegaPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{+} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar ); | |
1271 | //Setting the bin limits | |
1272 | fCFContCascadePIDAsOmegaPlus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade) | |
1273 | fCFContCascadePIDAsOmegaPlus->SetBinLimits(1, 1.5 , 2.5 ); // Omega Effective mass | |
1274 | fCFContCascadePIDAsOmegaPlus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity | |
1275 | //Setting the step title : one per PID case | |
1276 | fCFContCascadePIDAsOmegaPlus->SetStepTitle(0, "No PID"); | |
1277 | fCFContCascadePIDAsOmegaPlus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track"); | |
1278 | fCFContCascadePIDAsOmegaPlus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks"); | |
1279 | fCFContCascadePIDAsOmegaPlus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks"); | |
1280 | fCFContCascadePIDAsOmegaPlus->SetStepTitle(4, "Comb. PID / Bachelor"); | |
1281 | fCFContCascadePIDAsOmegaPlus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon"); | |
1282 | fCFContCascadePIDAsOmegaPlus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson"); | |
1283 | //Setting the variable title, per axis | |
1284 | fCFContCascadePIDAsOmegaPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)"); | |
1285 | fCFContCascadePIDAsOmegaPlus->SetVarTitle(1, "M( #Lambda , K^{+} ) (GeV/c^{2})"); | |
1286 | fCFContCascadePIDAsOmegaPlus->SetVarTitle(2, "Y_{#Omega}"); | |
1287 | fListHistCascade->Add(fCFContCascadePIDAsOmegaPlus); | |
1288 | } | |
1289 | // Container for optimisation of topological selections | |
1290 | if(! fCFContAsCascadeCuts){ | |
1291 | // Container meant to store all the relevant distributions corresponding to the cut variables. | |
1292 | // - NB overflow/underflow of variables on which we want to cut later should be 0!!! | |
1293 | const Int_t lNbSteps = 4; | |
1294 | const Int_t lNbVariables = 19; | |
1295 | //Array for the number of bins in each dimension : | |
1296 | Int_t lNbBinsPerVar[lNbVariables] = {0}; | |
1297 | lNbBinsPerVar[0] = 25; //DcaCascDaughters : [0.0,2.,3.0] -> Rec.Cut = 2.0; | |
1298 | lNbBinsPerVar[1] = 25; //DcaBachToPrimVertex : [0.0,0.24,100.0] -> Rec.Cur = 0.01; | |
8fde0bee | 1299 | lNbBinsPerVar[2] = 61; //CascCosineOfPointingAngle : [0.94,1.01] -> Rec.Cut = 0.95; |
c683985a | 1300 | //lNbBinsPerVar[2] = 30; //CascCosineOfPointingAngle : [0.97,1.] -> Rec.Cut = 0.98; |
1301 | lNbBinsPerVar[3] = 40; //CascRadius : [0.0,3.9,1000.0] -> Rec.Cut = 0.2; | |
1302 | lNbBinsPerVar[4] = 30; //InvMassLambdaAsCascDghter : [1.1,1.3] -> Rec.Cut = 0.008; | |
1303 | lNbBinsPerVar[5] = 20; //DcaV0Daughters : [0.0,2.0] -> Rec.Cut = 1.5; | |
1304 | lNbBinsPerVar[6] = 201; //V0CosineOfPointingAngle : [0.89,1.0] -> Rec.Cut = 0.9; | |
1305 | lNbBinsPerVar[7] = 40; //V0Radius : [0.0,3.9,1000.0] -> Rec.Cut = 0.2; | |
1306 | lNbBinsPerVar[8] = 40; //DcaV0ToPrimVertex : [0.0,0.39,110.0] -> Rec.Cut = 0.01; | |
1307 | lNbBinsPerVar[9] = 25; //DcaPosToPrimVertex : [0.0,0.24,100.0] -> Rec.Cut = 0.05; | |
1308 | lNbBinsPerVar[10] = 25; //DcaNegToPrimVertex : [0.0,0.24,100.0] -> Rec.Cut = 0.05; | |
1309 | lNbBinsPerVar[11] = 150; //InvMassXi : 2-MeV/c2 bins | |
1310 | lNbBinsPerVar[12] = 120; //InvMassOmega : 2-MeV/c2 bins | |
1311 | lNbBinsPerVar[13] = 100; //CascTransvMom : [0.0,10.0] | |
1312 | lNbBinsPerVar[14] = 110; //Y(Xi) : 0.02 unit of y per bin | |
1313 | lNbBinsPerVar[15] = 110; //Y(Omega) : 0.02 unit of y per bin | |
1314 | lNbBinsPerVar[16] = 112; //Proper lenght of cascade | |
1315 | lNbBinsPerVar[17] = 112; //Proper lenght of V0 | |
1316 | lNbBinsPerVar[18] = 112; //Distance V0-Xi in the transverse plane | |
1317 | fCFContAsCascadeCuts = new AliCFContainer(Form("fCFContAsCascadeCuts_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Cut Container for Asso. Cascades", lNbSteps, lNbVariables, lNbBinsPerVar ); | |
1318 | //Setting the bin limits | |
1319 | //0 - DcaCascDaughters | |
30b54910 | 1320 | //Double_t *lBinLim0 = new Double_t[ lNbBinsPerVar[0]+1 ]; |
1321 | //for(Int_t i=0; i<lNbBinsPerVar[0]; i++) lBinLim0[i] = (Double_t)0.0 + (2.4 -0.0)/(lNbBinsPerVar[0] - 1) * (Double_t)i; | |
1322 | //lBinLim0[ lNbBinsPerVar[0] ] = 3.0; | |
1323 | //fCFContAsCascadeCuts -> SetBinLimits(0, lBinLim0); | |
1324 | //delete[] lBinLim0; | |
1325 | fCFContAsCascadeCuts->SetBinLimits(0,0.0,2.5); | |
c683985a | 1326 | //1 - DcaBachToPrimVertex |
1327 | Double_t *lBinLim1 = new Double_t[ lNbBinsPerVar[1]+1 ]; | |
1328 | for(Int_t i=0; i<lNbBinsPerVar[1]; i++) lBinLim1[i] = (Double_t)0.0 + (0.24 - 0.0)/(lNbBinsPerVar[1] - 1) * (Double_t)i; | |
1329 | lBinLim1[ lNbBinsPerVar[1] ] = 100.0; | |
1330 | fCFContAsCascadeCuts -> SetBinLimits(1, lBinLim1); | |
1331 | delete [] lBinLim1; | |
1332 | //2 - CascCosineOfPointingAngle | |
8fde0bee | 1333 | fCFContAsCascadeCuts -> SetBinLimits(2, .94, 1.001); |
c683985a | 1334 | //3 - CascRadius |
1335 | Double_t *lBinLim3 = new Double_t[ lNbBinsPerVar[3]+1 ]; | |
1336 | for(Int_t i=0; i<lNbBinsPerVar[3]; i++) lBinLim3[i] = (Double_t)0.0 + (3.9 -0.0)/(lNbBinsPerVar[3] - 1) * (Double_t)i; | |
1337 | lBinLim3[ lNbBinsPerVar[3] ] = 1000.0; | |
1338 | fCFContAsCascadeCuts -> SetBinLimits(3, lBinLim3); | |
1339 | delete[] lBinLim3; | |
1340 | //4 - InvMassLambdaAsCascDghter | |
1341 | fCFContAsCascadeCuts->SetBinLimits(4, 1.1, 1.13); | |
1342 | //5 - DcaV0Daughters | |
1343 | fCFContAsCascadeCuts->SetBinLimits(5, 0., 2.); | |
1344 | //6 - V0CosineOfPointingAngle | |
1345 | fCFContAsCascadeCuts->SetBinLimits(6, 0.8, 1.001); | |
1346 | //7 - V0Radius | |
1347 | Double_t *lBinLim7 = new Double_t[ lNbBinsPerVar[7]+1 ]; | |
1348 | for(Int_t i=0; i<lNbBinsPerVar[7]; i++) lBinLim7[i] = (Double_t)0.0 + (3.9 - 0.0)/(lNbBinsPerVar[7] - 1) * (Double_t)i ; | |
1349 | lBinLim7[ lNbBinsPerVar[7] ] = 1000.0; | |
1350 | fCFContAsCascadeCuts -> SetBinLimits(7, lBinLim7); | |
1351 | delete [] lBinLim7; | |
1352 | //8 - DcaV0ToPrimVertexXi : 0. to 0.4 | |
1353 | Double_t *lBinLim8 = new Double_t[ lNbBinsPerVar[8]+1 ]; | |
1354 | for(Int_t i=0; i<lNbBinsPerVar[8]; i++) lBinLim8[i] = (Double_t)0.0 + (0.39 - 0.0)/(lNbBinsPerVar[8] - 1) * (Double_t)i ; | |
1355 | lBinLim8[ lNbBinsPerVar[8] ] = 100.0; | |
1356 | fCFContAsCascadeCuts -> SetBinLimits(8, lBinLim8); | |
1357 | delete [] lBinLim8; | |
1358 | //9 - DcaPosToPrimVertexXi | |
1359 | Double_t *lBinLim9 = new Double_t[ lNbBinsPerVar[9]+1 ]; | |
1360 | for(Int_t i=0; i<lNbBinsPerVar[9]; i++) lBinLim9[i] = (Double_t)0.0 + (0.24 - 0.0)/(lNbBinsPerVar[9] - 1) * (Double_t)i; | |
1361 | lBinLim9[ lNbBinsPerVar[9] ] = 100.0; | |
1362 | fCFContAsCascadeCuts -> SetBinLimits(9, lBinLim9); | |
1363 | delete [] lBinLim9; | |
1364 | //10 - DcaNegToPrimVertexXi | |
1365 | Double_t *lBinLim10 = new Double_t[ lNbBinsPerVar[10]+1 ]; | |
1366 | for(Int_t i=0; i<lNbBinsPerVar[10]; i++) lBinLim10[i] = (Double_t)0.0 + (0.24 - 0.0 )/(lNbBinsPerVar[10] - 1) * (Double_t)i; | |
1367 | lBinLim10[ lNbBinsPerVar[10] ] = 100.0; | |
1368 | fCFContAsCascadeCuts -> SetBinLimits(10, lBinLim10); | |
1369 | delete [] lBinLim10; | |
1370 | //11 - InvMassXi | |
1371 | fCFContAsCascadeCuts -> SetBinLimits(11, 1.25, 1.40); | |
1372 | //12 - InvMassOmega | |
1373 | fCFContAsCascadeCuts -> SetBinLimits(12, 1.62, 1.74); | |
1374 | //13 - XiTransvMom | |
1375 | fCFContAsCascadeCuts -> SetBinLimits(13, 0.0, 10.0); | |
1376 | //14 - Y(Xi) | |
1377 | fCFContAsCascadeCuts -> SetBinLimits(14, -1.1, 1.1); | |
1378 | //15 - Y(Omega) | |
1379 | fCFContAsCascadeCuts -> SetBinLimits(15, -1.1, 1.1); | |
1380 | //16 - Proper time cascade | |
1381 | Double_t *lBinLim16 = new Double_t[ lNbBinsPerVar[16]+1 ]; | |
1382 | for(Int_t i=0; i<lNbBinsPerVar[16]; i++) lBinLim16[i] = (Double_t)-1. + (110. + 1.0 )/(lNbBinsPerVar[16] - 1) * (Double_t)i; | |
1383 | lBinLim16[ lNbBinsPerVar[16] ] = 2000.0; | |
1384 | fCFContAsCascadeCuts -> SetBinLimits(16, lBinLim16); | |
1385 | //17 - Proper time V0 | |
1386 | fCFContAsCascadeCuts -> SetBinLimits(17, lBinLim16); | |
1387 | //18 - Distance V0-Xi in the transverse plane | |
1388 | fCFContAsCascadeCuts -> SetBinLimits(18, lBinLim16); | |
1389 | delete [] lBinLim16; | |
1390 | // Setting the number of steps : one for each cascade species (Xi-, Xi+ and Omega-, Omega+) | |
1391 | fCFContAsCascadeCuts->SetStepTitle(0, "#Xi^{-} candidates associated to MC"); | |
1392 | fCFContAsCascadeCuts->SetStepTitle(1, "#bar{#Xi}^{+} candidates associated to MC"); | |
1393 | fCFContAsCascadeCuts->SetStepTitle(2, "#Omega^{-} candidates associated to MC"); | |
1394 | fCFContAsCascadeCuts->SetStepTitle(3, "#bar{#Omega}^{+} candidates associated to MC"); | |
1395 | // Setting the variable title, per axis | |
1396 | fCFContAsCascadeCuts->SetVarTitle(0, "DCA(cascade daughters) (cm)"); | |
1397 | fCFContAsCascadeCuts->SetVarTitle(1, "ImpactParamToPV(bachelor) (cm)"); | |
1398 | fCFContAsCascadeCuts->SetVarTitle(2, "cos(cascade PA)"); | |
1399 | fCFContAsCascadeCuts->SetVarTitle(3, "R_{2d}(cascade decay) (cm)"); | |
1400 | fCFContAsCascadeCuts->SetVarTitle(4, "M_{#Lambda}(as casc dghter) (GeV/c^{2})"); | |
1401 | fCFContAsCascadeCuts->SetVarTitle(5, "DCA(V0 daughters) (cm)"); | |
c06f2450 | 1402 | if (fCollidingSystem == "pp") fCFContAsCascadeCuts->SetVarTitle(6, "cos(V0 PA) to cascade vtx"); |
1403 | else if (fCollidingSystem == "pPb") fCFContAsCascadeCuts->SetVarTitle(6, "cos(V0 PA) to primary vtx"); | |
c683985a | 1404 | fCFContAsCascadeCuts->SetVarTitle(7, "R_{2d}(V0 decay) (cm)"); |
1405 | fCFContAsCascadeCuts->SetVarTitle(8, "ImpactParamToPV(V0) (cm)"); | |
1406 | fCFContAsCascadeCuts->SetVarTitle(9, "ImpactParamToPV(Pos) (cm)"); | |
1407 | fCFContAsCascadeCuts->SetVarTitle(10, "ImpactParamToPV(Neg) (cm)"); | |
1408 | fCFContAsCascadeCuts->SetVarTitle(11, "Inv. Mass(Xi) (GeV/c^{2})"); | |
1409 | fCFContAsCascadeCuts->SetVarTitle(12, "Inv. Mass(Omega) (GeV/c^{2})"); | |
1410 | fCFContAsCascadeCuts->SetVarTitle(13, "Pt_{MC}(cascade) (GeV/c)"); | |
1411 | fCFContAsCascadeCuts->SetVarTitle(14, "Y_{MC}(Xi)"); | |
1412 | fCFContAsCascadeCuts->SetVarTitle(15, "Y_{MC}(Omega)"); | |
1413 | fCFContAsCascadeCuts->SetVarTitle(16, "mL/p cascade (cm)"); | |
1414 | fCFContAsCascadeCuts->SetVarTitle(17, "mL/p V0 (cm)"); | |
1415 | fCFContAsCascadeCuts->SetVarTitle(18, "Distance V0-Cascade in the transverse plane (cm)"); | |
1416 | fListHistCascade->Add(fCFContAsCascadeCuts); | |
1417 | } | |
1418 | ||
1419 | PostData(1, fListHistCascade); | |
1420 | PostData(2, fCFContCascadePIDAsXiMinus); | |
1421 | PostData(3, fCFContCascadePIDAsXiPlus); | |
1422 | PostData(4, fCFContCascadePIDAsOmegaMinus); | |
1423 | PostData(5, fCFContCascadePIDAsOmegaPlus); | |
1424 | PostData(6, fCFContAsCascadeCuts); | |
1425 | ||
1426 | }// end CreateOutputObjects | |
1427 | ||
1428 | ||
1429 | //________________________________________________________________________ | |
1430 | void AliAnalysisTaskCheckPerformanceCascadepp276::UserExec(Option_t *) { | |
1431 | ||
1432 | //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
1433 | // Main loop (called for each event) | |
1434 | //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
1435 | ||
1436 | //------------------ | |
1437 | // - Define variables | |
1438 | AliESDEvent *lESDevent = 0x0; | |
1439 | AliAODEvent *lAODevent = 0x0; | |
1440 | AliMCEvent *lMCevent = 0x0; | |
1441 | AliStack *lMCstack = 0x0; | |
1442 | TClonesArray *arrayMC = 0; | |
1443 | ||
1444 | //------------------------- | |
1445 | // - Check the PID response | |
1446 | if (!fPIDResponse) { | |
1447 | AliError("Cannot get pid response"); | |
1448 | return; | |
1449 | } | |
1450 | ||
1451 | ||
1452 | ////////////////// | |
1453 | // Event selection | |
1454 | ////////////////// | |
1455 | // In order: | |
1456 | // 1) SDD selection | |
1457 | // 2) Physics selection | |
1458 | // 3) Select only looking at events with well-established PV | |
1459 | // 4) Pileup selection | |
1460 | // 5) |Z| < 10 cm | |
1461 | ||
1462 | //--------------------------------------------------------- | |
1463 | // Load the InputEvent and check it (for the ESD and AOD) | |
1464 | if (fAnalysisType == "ESD") { | |
1465 | lESDevent = dynamic_cast<AliESDEvent*>( InputEvent() ); | |
1466 | if (!lESDevent) { | |
1467 | Printf("ERROR: lESDevent not available \n"); | |
1468 | cout << "Name of the file with pb :" << CurrentFileName() << endl; | |
1469 | return; | |
1470 | } | |
1471 | lMCevent = MCEvent(); | |
1472 | if (!lMCevent) { | |
1473 | Printf("ERROR: Could not retrieve MC event \n"); | |
1474 | cout << "Name of the file with pb :" << CurrentFileName() << endl; | |
1475 | return; | |
1476 | } | |
1477 | lMCstack = lMCevent->Stack(); | |
1478 | if (!lMCstack) { | |
1479 | Printf("ERROR: Could not retrieve MC stack \n"); | |
1480 | cout << "Name of the file with pb :" << CurrentFileName() << endl; | |
1481 | return; | |
1482 | } | |
c683985a | 1483 | } else if (fAnalysisType == "AOD") { |
1484 | lAODevent = dynamic_cast<AliAODEvent*>( InputEvent() ); | |
1485 | if (!lAODevent) { | |
1486 | Printf("ERROR: lAODevent not available \n"); | |
1487 | cout << "Name of the file with pb :" << CurrentFileName() << endl; | |
1488 | return; | |
1489 | } | |
1490 | arrayMC = (TClonesArray*) lAODevent->GetList()->FindObject(AliAODMCParticle::StdBranchName()); | |
1491 | if (!arrayMC) AliFatal("Error: MC particles branch not found!\n"); | |
1492 | } else { | |
1493 | Printf("Analysis type (ESD or AOD) not specified \n"); | |
1494 | return; | |
1495 | } | |
1496 | ||
1497 | //------------------------------ | |
1498 | // - Plots Before any selections | |
1499 | //------------------------------ | |
1500 | // - Define variables | |
1501 | Int_t ncascadesBeforeAnySel = -1; //number of cascades before any selections | |
1502 | Int_t nTrackMultiplicityBeforeAnySel = -1; //number of tracks before any selections | |
1503 | if (fAnalysisType == "ESD") { | |
1504 | //Multiplicity | |
1505 | Int_t lMultiplicity = -100; | |
1506 | lMultiplicity = fESDtrackCuts->GetReferenceMultiplicity(lESDevent, AliESDtrackCuts::kTrackletsITSTPC, 0.5); | |
1507 | nTrackMultiplicityBeforeAnySel = lMultiplicity; | |
1508 | ncascadesBeforeAnySel = lESDevent->GetNumberOfCascades(); | |
1509 | } else if (fAnalysisType == "AOD") { | |
1510 | //Multiplicity | |
1511 | Int_t lMultiplicity = -100; | |
1512 | nTrackMultiplicityBeforeAnySel = lMultiplicity; | |
df984074 | 1513 | ncascadesBeforeAnySel = lAODevent->GetNumberOfCascades(); |
c683985a | 1514 | } |
1515 | fHistTrackMultiplicityBeforeAnySel->Fill(nTrackMultiplicityBeforeAnySel); | |
1516 | fHistCascadeMultiplicityBeforeAnySel->Fill(ncascadesBeforeAnySel); | |
1517 | ||
1518 | //---------------- | |
1519 | // - SDD selection | |
1520 | //---------------- | |
1521 | // - Define variables | |
1522 | Int_t ncascadesAfterSDDSel = -1; //number of cascades after SDD selection | |
1523 | Int_t nTrackMultiplicityAfterSDDSel = -1; //number of tracks after SDD selection | |
df984074 | 1524 | if (fkSDDselectionOn && fCollidingSystem == "pp") { |
c683985a | 1525 | TString trcl = " "; |
1526 | trcl = lESDevent->GetFiredTriggerClasses(); | |
1527 | if (fAnalysisType == "ESD") trcl = lESDevent->GetFiredTriggerClasses(); | |
1528 | else if (fAnalysisType == "AOD") trcl = lAODevent->GetFiredTriggerClasses(); | |
1529 | if (fwithSDD){ // ---> Select event with SDD ON | |
1530 | if(!(trcl.Contains("ALLNOTRD"))) { | |
1531 | PostData(1, fListHistCascade); | |
1532 | PostData(2, fCFContCascadePIDAsXiMinus); | |
1533 | PostData(3, fCFContCascadePIDAsXiPlus); | |
1534 | PostData(4, fCFContCascadePIDAsOmegaMinus); | |
1535 | PostData(5, fCFContCascadePIDAsOmegaPlus); | |
1536 | PostData(6, fCFContAsCascadeCuts); | |
1537 | cout<<"Bad event: SDD turn OFF => RETURN!! (Exclude it)..."<<endl; | |
1538 | return; | |
1539 | } else { | |
1540 | cout<<"Good event: SDD turn ON."<<endl; | |
1541 | } | |
1542 | } else if (!fwithSDD){ // ---> Select event with SDD OFF | |
1543 | if((trcl.Contains("ALLNOTRD"))) { | |
1544 | PostData(1, fListHistCascade); | |
1545 | PostData(2, fCFContCascadePIDAsXiMinus); | |
1546 | PostData(3, fCFContCascadePIDAsXiPlus); | |
1547 | PostData(4, fCFContCascadePIDAsOmegaMinus); | |
1548 | PostData(5, fCFContCascadePIDAsOmegaPlus); | |
1549 | PostData(6, fCFContAsCascadeCuts); | |
1550 | cout<<"Bad event: SDD turn ON => RETURN!! (Exclude it)..."<<endl; | |
1551 | return; | |
1552 | } else { | |
1553 | cout<<"Good event: SDD turn OFF."<<endl; | |
1554 | } | |
1555 | } | |
1556 | } | |
1557 | // - Take the number of cascades and tracks after the SDD selection | |
1558 | if (fAnalysisType == "ESD") { | |
1559 | Int_t lMultiplicity = -100; | |
1560 | lMultiplicity = fESDtrackCuts->GetReferenceMultiplicity(lESDevent, AliESDtrackCuts::kTrackletsITSTPC, 0.5); | |
1561 | ncascadesAfterSDDSel = lESDevent->GetNumberOfCascades(); | |
1562 | nTrackMultiplicityAfterSDDSel = lMultiplicity; | |
1563 | } else if (fAnalysisType == "AOD") { | |
1564 | Int_t lMultiplicity = -100; | |
1565 | ncascadesAfterSDDSel = lAODevent->GetNumberOfCascades(); | |
1566 | nTrackMultiplicityAfterSDDSel = lMultiplicity; | |
1567 | } | |
1568 | // - Fill the plots | |
1569 | fHistTrackMultiplicityAfterSDDSel->Fill(nTrackMultiplicityAfterSDDSel); | |
1570 | fHistCascadeMultiplicityAfterSDDSel->Fill(ncascadesAfterSDDSel); | |
1571 | ||
1572 | //------------------------------ | |
1573 | // - Plots pre-physics selection | |
1574 | //------------------------------ | |
1575 | // - Produce the 3Dhisto for the efficiency denominator | |
1576 | Int_t lNbMCPrimary = 0; | |
1577 | lNbMCPrimary = lMCstack->GetNprimary(); | |
1578 | ||
1579 | for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < lNbMCPrimary; iCurrentLabelStack++) { | |
1580 | ||
1581 | Double_t partEnergy = 0.; | |
1582 | Double_t partPz = 0.; | |
1583 | Double_t partP = 0.; | |
1584 | Double_t partPt = 0.; | |
1585 | Double_t partVx = 0.; | |
1586 | Double_t partVy = 0.; | |
1587 | Double_t partVz = 0.; | |
1588 | Double_t bacVx = 0.; | |
1589 | Double_t bacVy = 0.; | |
1590 | Double_t bacVz = 0.; | |
1591 | Double_t partMass = 0.; | |
1592 | Int_t PDGcode = 0; | |
1593 | Int_t lPrimaryTrackMultiplicity = nTrackMultiplicityAfterSDDSel; | |
1594 | ||
1595 | if ( fAnalysisType == "ESD" ) { | |
1596 | TParticle* lCurrentParticlePrimary = 0x0; | |
1597 | lCurrentParticlePrimary = lMCstack->Particle( iCurrentLabelStack ); | |
1598 | if (!lCurrentParticlePrimary) { | |
1599 | Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack ); | |
1600 | continue; | |
1601 | } | |
1602 | if (!lMCstack->IsPhysicalPrimary(iCurrentLabelStack)) continue; | |
1603 | TParticle* xiMC = 0x0; | |
1604 | xiMC = lCurrentParticlePrimary; | |
1605 | if (!xiMC) { | |
1606 | Printf("MC TParticle pointer to Cascade = 0x0 ! Skip ..."); | |
1607 | continue; | |
1608 | } | |
1609 | partEnergy = xiMC->Energy(); | |
1610 | partPz = xiMC->Pz(); | |
1611 | partPt = xiMC->Pt(); | |
1612 | partP = xiMC->P(); | |
1613 | partMass = xiMC->GetMass(); | |
1614 | partVx = xiMC->Vx(); | |
1615 | partVy = xiMC->Vy(); | |
1616 | partVz = xiMC->Vz(); | |
1617 | if (xiMC->GetDaughter(0)>=0) { | |
1618 | TParticle *mcBach = lMCstack->Particle(xiMC->GetDaughter(0)); | |
1619 | if (mcBach) { | |
1620 | bacVx = mcBach->Vx(); | |
1621 | bacVy = mcBach->Vy(); | |
1622 | bacVz = mcBach->Vz(); | |
1623 | } | |
1624 | } | |
1625 | PDGcode = lCurrentParticlePrimary->GetPdgCode(); | |
1626 | } else if ( fAnalysisType == "AOD" ) { | |
1627 | AliAODMCParticle *lCurrentParticleaod = (AliAODMCParticle*) arrayMC->At(iCurrentLabelStack); | |
1628 | if (!lCurrentParticleaod) { | |
1629 | Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack ); | |
1630 | continue; | |
1631 | } | |
1632 | if (!lCurrentParticleaod->IsPhysicalPrimary()) continue; | |
1633 | partEnergy = lCurrentParticleaod->E(); | |
1634 | partPz = lCurrentParticleaod->Pz(); | |
1635 | partP = lCurrentParticleaod->P(); | |
1636 | partPt = lCurrentParticleaod->Pt(); | |
1637 | partMass = lCurrentParticleaod->M(); | |
1638 | partVx = lCurrentParticleaod->Xv(); | |
1639 | partVy = lCurrentParticleaod->Yv(); | |
1640 | partVz = lCurrentParticleaod->Zv(); | |
1641 | if (lCurrentParticleaod->GetDaughter(0)>=0) { | |
1642 | AliAODMCParticle *mcBach = (AliAODMCParticle*) arrayMC->At(lCurrentParticleaod->GetDaughter(0)); | |
1643 | if (mcBach) { | |
1644 | bacVx = mcBach->Xv(); | |
1645 | bacVy = mcBach->Yv(); | |
1646 | bacVz = mcBach->Zv(); | |
1647 | } | |
1648 | } | |
1649 | PDGcode = lCurrentParticleaod->GetPdgCode(); | |
1650 | } | |
1651 | ||
1652 | // - Calculate rapidity | |
1653 | Double_t lRapXiMC = 0.5*TMath::Log((partEnergy + partPz) / (partEnergy - partPz + 1.e-13)); | |
1654 | // - Calculate proper lenght | |
1655 | Double_t lctau = TMath::Sqrt((partVx-bacVx)*(partVx-bacVx)+(partVy-bacVy)*(partVy-bacVy)+(partVz-bacVz)*(partVz-bacVz)); | |
1656 | if (partP != 0.) lctau = lctau*partMass/partP; | |
1657 | else lctau = -1.; | |
1658 | // - Fill Histograms | |
1659 | if (PDGcode == 3312) { | |
1660 | f3dHistGenPtVsGenYvsNtracksXiMinus->Fill(partPt, lRapXiMC, lPrimaryTrackMultiplicity); | |
1661 | f3dHistGenPtVsGenctauvsYXiMinus->Fill(partPt, lctau, lRapXiMC); | |
1662 | } | |
1663 | if (PDGcode == -3312) { | |
1664 | f3dHistGenPtVsGenYvsNtracksXiPlus->Fill(partPt, lRapXiMC, lPrimaryTrackMultiplicity); | |
1665 | f3dHistGenPtVsGenctauvsYXiPlus->Fill(partPt, lctau, lRapXiMC); | |
1666 | } | |
1667 | if (PDGcode == 3334) { | |
1668 | f3dHistGenPtVsGenYvsNtracksOmegaMinus->Fill(partPt, lRapXiMC, lPrimaryTrackMultiplicity); | |
1669 | f3dHistGenPtVsGenctauvsYOmegaMinus->Fill(partPt, lctau, lRapXiMC); | |
1670 | } | |
1671 | if (PDGcode == -3334) { | |
1672 | f3dHistGenPtVsGenYvsNtracksOmegaPlus->Fill(partPt, lRapXiMC, lPrimaryTrackMultiplicity); | |
1673 | f3dHistGenPtVsGenctauvsYOmegaPlus->Fill(partPt, lctau, lRapXiMC); | |
1674 | } | |
1675 | } | |
1676 | ||
c683985a | 1677 | //-------------------- |
1678 | // - Physics selection | |
1679 | //-------------------- | |
1680 | // - Define new variables | |
1681 | Int_t ncascadesAfterPhysicsSel = -1; //number of cascades after physics selection | |
1682 | Int_t nTrackMultiplicityAfterPhysicsSel = -1; //number of tracks after physics selection | |
1683 | // - Selection for ESD and AOD | |
df984074 | 1684 | UInt_t maskIsSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected(); |
1685 | Bool_t isSelected = 0; | |
1686 | if (fCollidingSystem == "pp" ) isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB; | |
1687 | else if (fCollidingSystem == "pPb") isSelected = (maskIsSelected & AliVEvent::kINT7) == AliVEvent::kINT7; | |
1688 | if(!isSelected){ | |
1689 | PostData(1, fListHistCascade); | |
1690 | PostData(2, fCFContCascadePIDAsXiMinus); | |
1691 | PostData(3, fCFContCascadePIDAsXiPlus); | |
1692 | PostData(4, fCFContCascadePIDAsOmegaMinus); | |
1693 | PostData(5, fCFContCascadePIDAsOmegaPlus); | |
1694 | PostData(6, fCFContAsCascadeCuts); | |
1695 | return; | |
1696 | } | |
c683985a | 1697 | if (fAnalysisType == "ESD") { |
c683985a | 1698 | // - Take the number of cascades and tracks after physics selection |
1699 | ncascadesAfterPhysicsSel = lESDevent->GetNumberOfCascades(); | |
1700 | nTrackMultiplicityAfterPhysicsSel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent, AliESDtrackCuts::kTrackletsITSTPC, 0.5); | |
1701 | } else if (fAnalysisType == "AOD") { | |
c683985a | 1702 | // - Take the number of cascades and tracks after physics selection |
1703 | ncascadesAfterPhysicsSel = lAODevent->GetNumberOfCascades(); | |
1704 | nTrackMultiplicityAfterPhysicsSel = -100; | |
1705 | } | |
1706 | fHistCascadeMultiplicityAfterPhysicsSel->Fill(ncascadesAfterPhysicsSel); | |
1707 | fHistTrackMultiplicityAfterPhysicsSel->Fill(nTrackMultiplicityAfterPhysicsSel); | |
1708 | ||
df984074 | 1709 | //------------------------ |
1710 | // - Cascade vertexer (ESD) | |
1711 | //------------------------- | |
1712 | // Relaunch V0 and Cascade vertexer | |
1713 | if (fAnalysisType == "ESD" && fkRerunV0CascVertexers) { | |
1714 | lESDevent->ResetCascades(); | |
1715 | lESDevent->ResetV0s(); | |
1716 | AliV0vertexer *lV0vtxer = new AliV0vertexer(); | |
1717 | AliCascadeVertexer *lCascVtxer = new AliCascadeVertexer(); | |
1718 | //lV0vtxer->GetCuts(fV0Sels); | |
1719 | //lCascVtxer->GetCuts(fCascSels); | |
1720 | lV0vtxer->SetCuts(fV0Sels); // NB don't use SetDefaultCuts!! because it acts on static variables | |
1721 | lCascVtxer->SetCuts(fCascSels); | |
1722 | lV0vtxer->Tracks2V0vertices(lESDevent); | |
1723 | lCascVtxer->V0sTracks2CascadeVertices(lESDevent); | |
1724 | //delete lV0vtxer; | |
1725 | //delete lCascVtxer; | |
1726 | } | |
1727 | ||
c683985a | 1728 | //------------------------------------------------------- |
1729 | // Select only looking at events with well-established PV | |
1730 | //------------------------------------------------------- | |
1731 | Int_t ncascadesForSelEvtNoTPCOnly = -1; //number of cascades after the TPConly selection | |
1732 | Int_t nTrackMultiplicityForSelEvtNoTPCOnly = -1; //number of tracks after the TPConly selection | |
df984074 | 1733 | // - Selection for the two colliding systems |
1734 | if (fCollidingSystem == "pp") { | |
1735 | if (fAnalysisType == "ESD" ) { | |
1736 | // - Select only looking at events with well-established PV | |
1737 | if (fkQualityCutNoTPConlyPrimVtx) { | |
1738 | const AliESDVertex *lPrimarySPDVtx = lESDevent->GetPrimaryVertexSPD(); | |
1739 | const AliESDVertex *lPrimaryTrackingVtx = lESDevent->GetPrimaryVertexTracks(); | |
1740 | if (!lPrimarySPDVtx->GetStatus() && !lPrimaryTrackingVtx->GetStatus() ){ | |
1741 | AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !"); | |
1742 | PostData(1, fListHistCascade); | |
1743 | PostData(2, fCFContCascadePIDAsXiMinus); | |
1744 | PostData(3, fCFContCascadePIDAsXiPlus); | |
1745 | PostData(4, fCFContCascadePIDAsOmegaMinus); | |
1746 | PostData(5, fCFContCascadePIDAsOmegaPlus); | |
1747 | PostData(6, fCFContAsCascadeCuts); | |
1748 | return; | |
1749 | } | |
c683985a | 1750 | } |
df984074 | 1751 | // - Take the number of cascades and tracks after TPConly selection |
1752 | ncascadesForSelEvtNoTPCOnly = lESDevent->GetNumberOfCascades(); | |
1753 | nTrackMultiplicityForSelEvtNoTPCOnly = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5); | |
1754 | } else if (fAnalysisType == "AOD") { | |
1755 | // - Select only looking at events with well-established PV | |
1756 | if (fkQualityCutNoTPConlyPrimVtx) { | |
1757 | const AliAODVertex *lPrimarySPDVtx = lAODevent->GetPrimaryVertexSPD(); | |
1758 | const AliAODVertex *lPrimaryTrackingAODVtx = lAODevent->GetPrimaryVertex(); | |
1759 | if (!lPrimarySPDVtx && !lPrimaryTrackingAODVtx) { | |
1760 | AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !"); | |
1761 | PostData(1, fListHistCascade); | |
1762 | PostData(2, fCFContCascadePIDAsXiMinus); | |
1763 | PostData(3, fCFContCascadePIDAsXiPlus); | |
1764 | PostData(4, fCFContCascadePIDAsOmegaMinus); | |
1765 | PostData(5, fCFContCascadePIDAsOmegaPlus); | |
1766 | PostData(6, fCFContAsCascadeCuts); | |
1767 | return; | |
1768 | } | |
c683985a | 1769 | } |
df984074 | 1770 | // - Take the number of cascades and tracks after TPConly selection |
1771 | ncascadesForSelEvtNoTPCOnly = lAODevent->GetNumberOfCascades(); | |
1772 | nTrackMultiplicityForSelEvtNoTPCOnly = -100; //FIXME | |
1773 | } | |
1774 | } else if (fCollidingSystem == "pPb") { | |
1775 | if (fAnalysisType == "ESD") { | |
1776 | Bool_t fHasVertex = kFALSE; | |
1777 | const AliESDVertex *vertex = lESDevent->GetPrimaryVertexTracks(); | |
1778 | if (vertex->GetNContributors() < 1) { | |
1779 | vertex = lESDevent->GetPrimaryVertexSPD(); | |
1780 | if (vertex->GetNContributors() < 1) fHasVertex = kFALSE; | |
1781 | else fHasVertex = kTRUE; | |
1782 | TString vtxTyp = vertex->GetTitle(); | |
1783 | Double_t cov[6]={0}; | |
1784 | vertex->GetCovarianceMatrix(cov); | |
1785 | Double_t zRes = TMath::Sqrt(cov[5]); | |
1786 | if (vtxTyp.Contains("vertexer:Z") && (zRes>0.25)) fHasVertex = kFALSE; | |
8fde0bee | 1787 | } else fHasVertex = kTRUE; |
1788 | if (fHasVertex == kFALSE) { | |
1789 | AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !"); | |
1790 | PostData(1, fListHistCascade); | |
1791 | PostData(2, fCFContCascadePIDAsXiMinus); | |
1792 | PostData(3, fCFContCascadePIDAsXiPlus); | |
1793 | PostData(4, fCFContCascadePIDAsOmegaMinus); | |
1794 | PostData(5, fCFContCascadePIDAsOmegaPlus); | |
1795 | PostData(6, fCFContAsCascadeCuts); | |
1796 | return; | |
1797 | } | |
df984074 | 1798 | if (fUtils->IsFirstEventInChunk(lESDevent)) { //Is First event in chunk rejection: Still present! |
1799 | AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !"); | |
1800 | PostData(1, fListHistCascade); | |
1801 | PostData(2, fCFContCascadePIDAsXiMinus); | |
1802 | PostData(3, fCFContCascadePIDAsXiPlus); | |
1803 | PostData(4, fCFContCascadePIDAsOmegaMinus); | |
1804 | PostData(5, fCFContCascadePIDAsOmegaPlus); | |
1805 | PostData(6, fCFContAsCascadeCuts); | |
1806 | return; | |
1807 | } | |
1808 | // - Take the number of cascades and tracks after TPConly selection | |
1809 | ncascadesForSelEvtNoTPCOnly = lESDevent->GetNumberOfCascades(); | |
1810 | nTrackMultiplicityForSelEvtNoTPCOnly = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5); | |
1811 | } else if (fAnalysisType == "AOD") { | |
1812 | Bool_t fHasVertex = kFALSE; | |
1813 | const AliAODVertex *vertex = lAODevent->GetPrimaryVertex(); | |
1814 | if (vertex->GetNContributors() < 1) { | |
1815 | vertex = lAODevent->GetPrimaryVertexSPD(); | |
1816 | if (vertex->GetNContributors() < 1) fHasVertex = kFALSE; | |
1817 | else fHasVertex = kTRUE; | |
1818 | TString vtxTyp = vertex->GetTitle(); | |
1819 | Double_t cov[6]={0}; | |
1820 | vertex->GetCovarianceMatrix(cov); | |
1821 | Double_t zRes = TMath::Sqrt(cov[5]); | |
1822 | if (vtxTyp.Contains("vertexer:Z") && (zRes>0.25)) fHasVertex = kFALSE; | |
8fde0bee | 1823 | } else fHasVertex = kTRUE; |
1824 | if (fHasVertex == kFALSE) { | |
1825 | AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !"); | |
1826 | PostData(1, fListHistCascade); | |
1827 | PostData(2, fCFContCascadePIDAsXiMinus); | |
1828 | PostData(3, fCFContCascadePIDAsXiPlus); | |
1829 | PostData(4, fCFContCascadePIDAsOmegaMinus); | |
1830 | PostData(5, fCFContCascadePIDAsOmegaPlus); | |
1831 | PostData(6, fCFContAsCascadeCuts); | |
1832 | return; | |
1833 | } | |
df984074 | 1834 | if (fHasVertex == kFALSE) { //Is First event in chunk rejection: Still present! //FIXME |
1835 | AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !"); | |
1836 | PostData(1, fListHistCascade); | |
1837 | PostData(2, fCFContCascadePIDAsXiMinus); | |
1838 | PostData(3, fCFContCascadePIDAsXiPlus); | |
1839 | PostData(4, fCFContCascadePIDAsOmegaMinus); | |
1840 | PostData(5, fCFContCascadePIDAsOmegaPlus); | |
1841 | PostData(6, fCFContAsCascadeCuts); | |
1842 | return; | |
1843 | } | |
1844 | // - Take the number of cascades and tracks after TPConly selection | |
1845 | ncascadesForSelEvtNoTPCOnly = lAODevent->GetNumberOfCascades(); | |
1846 | nTrackMultiplicityForSelEvtNoTPCOnly = -100; //FIXME: I can't find the equivalent method for the AOD | |
c683985a | 1847 | } |
c683985a | 1848 | } |
df984074 | 1849 | // - Fill the plots |
c683985a | 1850 | fHistCascadeMultiplicityForSelEvtNoTPCOnly->Fill(ncascadesForSelEvtNoTPCOnly); |
1851 | fHistTrackMultiplicityForSelEvtNoTPCOnly->Fill(nTrackMultiplicityForSelEvtNoTPCOnly); | |
1852 | ||
1853 | //----------------- | |
1854 | // Pileup selection | |
1855 | //----------------- | |
1856 | Int_t ncascadesForSelEvtNoTPCOnlyNoPileup = -1; //number of cascades after the NoPileup selection | |
1857 | Int_t nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = -1; //number of tracks after the Pileup selection | |
df984074 | 1858 | if (fkRejectEventPileUp && fCollidingSystem == "pp") { |
1859 | if (fAnalysisType == "ESD") { | |
c683985a | 1860 | if(lESDevent->IsPileupFromSPD()){ |
1861 | AliWarning("Pb / Pile-up event ... return!"); | |
1862 | PostData(1, fListHistCascade); | |
1863 | PostData(2, fCFContCascadePIDAsXiMinus); | |
1864 | PostData(3, fCFContCascadePIDAsXiPlus); | |
1865 | PostData(4, fCFContCascadePIDAsOmegaMinus); | |
1866 | PostData(5, fCFContCascadePIDAsOmegaPlus); | |
1867 | PostData(6, fCFContAsCascadeCuts); | |
1868 | return; | |
df984074 | 1869 | } |
1870 | } else if (fAnalysisType == "AOD") { | |
c683985a | 1871 | if(lAODevent->IsPileupFromSPD()){ |
1872 | AliWarning("Pb / Pile-up event ... return!"); | |
1873 | PostData(1, fListHistCascade); | |
1874 | PostData(2, fCFContCascadePIDAsXiMinus); | |
1875 | PostData(3, fCFContCascadePIDAsXiPlus); | |
1876 | PostData(4, fCFContCascadePIDAsOmegaMinus); | |
1877 | PostData(5, fCFContCascadePIDAsOmegaPlus); | |
1878 | PostData(6, fCFContAsCascadeCuts); | |
1879 | return; | |
df984074 | 1880 | } |
c683985a | 1881 | } |
df984074 | 1882 | } |
1883 | // - Take the number of cascades and tracks after Pileup selection | |
1884 | if (fAnalysisType == "ESD") { | |
1885 | ncascadesForSelEvtNoTPCOnlyNoPileup = lESDevent->GetNumberOfCascades(); | |
1886 | nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5); | |
1887 | } else if (fAnalysisType == "AOD") { | |
c683985a | 1888 | ncascadesForSelEvtNoTPCOnlyNoPileup = lAODevent->GetNumberOfCascades(); |
1889 | nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = -100; | |
1890 | } | |
1891 | fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup->Fill(ncascadesForSelEvtNoTPCOnlyNoPileup); | |
1892 | fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup->Fill(nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup); | |
1893 | ||
1894 | //------------------- | |
1895 | // - Vertex selection | |
1896 | //------------------- | |
1897 | Int_t ncascadesAfterVertexSel = -1; //number of cascades after vertex selection | |
1898 | Int_t nTrackMultiplicityAfterVertexSel = -1; //number of tracks after vertex selection | |
1899 | Double_t lBestPrimaryVtxPos[3] = {-100.0, -100.0, -100.0}; | |
1900 | Double_t tPrimaryVtxPosition[3] = {-100.0, -100.0, -100.0}; | |
1901 | Double_t lMagneticField = -10.; | |
1902 | if (fAnalysisType == "ESD" ) { | |
1903 | // - Primary vertex definition | |
1904 | const AliESDVertex *lPrimaryBestVtx = lESDevent->GetPrimaryVertex(); | |
1905 | if (!lPrimaryBestVtx) { | |
1906 | AliWarning("No prim. vertex in AOD... return!"); | |
1907 | PostData(1, fListHistCascade); | |
1908 | PostData(2, fCFContCascadePIDAsXiMinus); | |
1909 | PostData(3, fCFContCascadePIDAsXiPlus); | |
1910 | PostData(4, fCFContCascadePIDAsOmegaMinus); | |
1911 | PostData(5, fCFContCascadePIDAsOmegaPlus); | |
1912 | PostData(6, fCFContAsCascadeCuts); | |
1913 | return; | |
1914 | } | |
1915 | lPrimaryBestVtx->GetXYZ( lBestPrimaryVtxPos ); | |
1916 | // - Vertex position before any event selection on vertex position | |
1917 | const AliVVertex *primaryVtx = lESDevent->GetPrimaryVertex(); | |
1918 | tPrimaryVtxPosition[0] = primaryVtx->GetX(); | |
1919 | tPrimaryVtxPosition[1] = primaryVtx->GetY(); | |
1920 | tPrimaryVtxPosition[2] = primaryVtx->GetZ(); | |
1921 | fHistPVx->Fill( tPrimaryVtxPosition[0] ); | |
1922 | fHistPVy->Fill( tPrimaryVtxPosition[1] ); | |
1923 | fHistPVz->Fill( tPrimaryVtxPosition[2] ); | |
1924 | // - Get magnetic filed info | |
1925 | lMagneticField = lESDevent->GetMagneticField(); | |
1926 | // - Selection on the primary vertex Z position | |
1927 | if (fkQualityCutZprimVtxPos) { | |
1928 | if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange || TMath::Abs(lBestPrimaryVtxPos[2]) < fVtxRangeMin) { | |
1929 | AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !"); | |
1930 | PostData(1, fListHistCascade); | |
1931 | PostData(2, fCFContCascadePIDAsXiMinus); | |
1932 | PostData(3, fCFContCascadePIDAsXiPlus); | |
1933 | PostData(4, fCFContCascadePIDAsOmegaMinus); | |
1934 | PostData(5, fCFContCascadePIDAsOmegaPlus); | |
1935 | PostData(6, fCFContAsCascadeCuts); | |
1936 | return; | |
1937 | } | |
1938 | } | |
1939 | // - Take the number of cascades and tracks after vertex Z position selection | |
1940 | ncascadesAfterVertexSel = lESDevent->GetNumberOfCascades(); | |
1941 | nTrackMultiplicityAfterVertexSel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5); | |
1942 | } else if (fAnalysisType == "AOD") { | |
1943 | // - Primary vertex definition | |
1944 | const AliAODVertex *lPrimaryBestAODVtx = lAODevent->GetPrimaryVertex(); // get the best primary vertex available for the event GetVertex(0) | |
1945 | if (!lPrimaryBestAODVtx) { | |
1946 | AliWarning("No prim. vertex in AOD... return!"); | |
1947 | PostData(1, fListHistCascade); | |
1948 | PostData(2, fCFContCascadePIDAsXiMinus); | |
1949 | PostData(3, fCFContCascadePIDAsXiPlus); | |
1950 | PostData(4, fCFContCascadePIDAsOmegaMinus); | |
1951 | PostData(5, fCFContCascadePIDAsOmegaPlus); | |
1952 | PostData(6, fCFContAsCascadeCuts); | |
1953 | return; | |
1954 | } | |
1955 | lPrimaryBestAODVtx->GetXYZ( lBestPrimaryVtxPos ); | |
1956 | // - Vertex position before any event selection on vertex position | |
1957 | const AliVVertex *primaryVtx = lAODevent->GetPrimaryVertex(); | |
1958 | tPrimaryVtxPosition[0] = primaryVtx->GetX(); | |
1959 | tPrimaryVtxPosition[1] = primaryVtx->GetY(); | |
1960 | tPrimaryVtxPosition[2] = primaryVtx->GetZ(); | |
1961 | fHistPVx->Fill( tPrimaryVtxPosition[0] ); | |
1962 | fHistPVy->Fill( tPrimaryVtxPosition[1] ); | |
1963 | fHistPVz->Fill( tPrimaryVtxPosition[2] ); | |
1964 | // - Get magnetic filed info | |
1965 | lMagneticField = lAODevent->GetMagneticField(); | |
1966 | // - Selection on the primary vertex Z position | |
1967 | if (fkQualityCutZprimVtxPos) { | |
1968 | if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange && TMath::Abs(lBestPrimaryVtxPos[2]) < fVtxRangeMin) { | |
1969 | AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !"); | |
1970 | PostData(1, fListHistCascade); | |
1971 | PostData(2, fCFContCascadePIDAsXiMinus); | |
1972 | PostData(3, fCFContCascadePIDAsXiPlus); | |
1973 | PostData(4, fCFContCascadePIDAsOmegaMinus); | |
1974 | PostData(5, fCFContCascadePIDAsOmegaPlus); | |
1975 | PostData(6, fCFContAsCascadeCuts); | |
1976 | return; | |
1977 | } | |
1978 | } | |
1979 | // - Take the number of cascades and tracks after vertex Z position selection | |
1980 | ncascadesAfterVertexSel = lAODevent->GetNumberOfCascades(); | |
1981 | nTrackMultiplicityAfterVertexSel = -100; | |
1982 | } | |
1983 | // - Fill the plots | |
1984 | fHistCascadeMultiplicityAfterVertexCutSel->Fill(ncascadesAfterVertexSel); | |
1985 | fHistTrackMultiplicityAfterVertexCutSel->Fill(nTrackMultiplicityAfterVertexSel); | |
1986 | ||
1987 | // - Vertex position plots: after any event selections | |
1988 | tPrimaryVtxPosition[0] = 0; | |
1989 | tPrimaryVtxPosition[1] = 0; | |
1990 | tPrimaryVtxPosition[2] = 0; | |
1991 | if (fAnalysisType == "ESD" ) { | |
1992 | const AliVVertex *primaryVtx = lESDevent->GetPrimaryVertex(); | |
1993 | tPrimaryVtxPosition[0] = primaryVtx->GetX(); | |
1994 | tPrimaryVtxPosition[1] = primaryVtx->GetY(); | |
1995 | tPrimaryVtxPosition[2] = primaryVtx->GetZ(); | |
1996 | } else if (fAnalysisType == "AOD") { | |
1997 | const AliVVertex *primaryVtx = lAODevent->GetPrimaryVertex(); | |
1998 | tPrimaryVtxPosition[0] = primaryVtx->GetX(); | |
1999 | tPrimaryVtxPosition[1] = primaryVtx->GetY(); | |
2000 | tPrimaryVtxPosition[2] = primaryVtx->GetZ(); | |
2001 | } | |
2002 | fHistPVxAnalysis->Fill( tPrimaryVtxPosition[0] ); | |
2003 | fHistPVyAnalysis->Fill( tPrimaryVtxPosition[1] ); | |
2004 | fHistPVzAnalysis->Fill( tPrimaryVtxPosition[2] ); | |
2005 | ||
2006 | ||
2007 | //---------------------------------------------------------------------- | |
2008 | // - Loop over the different types of GENERATED cascades (Xi-+, Omega-+) | |
2009 | //---------------------------------------------------------------------- | |
2010 | // - Initialisation of useful local variables | |
2011 | Int_t lPdgCodeCasc = 0; | |
2012 | Int_t lPdgCodeBach = 0; | |
2013 | Int_t lPdgCodeLambda = 0; | |
2014 | Int_t lPdgCodeDghtMesV0 = 0; | |
2015 | Int_t lPdgCodeDghtBarV0 = 0; | |
2016 | TH1F *lHistEtaGenCasc = 0; | |
2017 | TH3D *l3dHistGenPtVsGenYvsNtracksPhysEff = 0; | |
2018 | TH3D *l3dHistGenPtVsGenctauvsYPhysEff = 0; | |
2019 | TH1F *lHistThetaGenCasc = 0; | |
2020 | TH2D *l2dHistGenPtVsGenYFdbl = 0; | |
2021 | TH1F *lHistThetaLambda = 0; | |
2022 | TH1F *lHistThetaBach = 0; | |
2023 | TH1F *lHistThetaBarDghter = 0; | |
2024 | TH1F *lHistThetaMesDghter = 0; | |
2025 | TH1F *lHistPtBach = 0; | |
2026 | TH1F *lHistPtBarDghter = 0; | |
2027 | TH1F *lHistPtMesDghter = 0; | |
2028 | Int_t ncascperev = 0; | |
2029 | Int_t ncascperevtot = 0; | |
2030 | ||
2031 | for (Int_t iCascType = 1; iCascType < 5; iCascType++) { | |
2032 | ncascperev = 0; | |
2033 | ncascperevtot = 0; | |
2034 | Int_t lPrimaryTrackMultiplicity = nTrackMultiplicityAfterSDDSel; | |
2035 | ||
2036 | switch (iCascType) { | |
2037 | case 1: // Xi- | |
2038 | lPdgCodeCasc = 3312; //Xi- | |
2039 | lPdgCodeBach = -211; //Pi- | |
2040 | lPdgCodeLambda = 3122; //Lambda0 | |
2041 | lPdgCodeDghtMesV0 = -211; //Pi- | |
2042 | lPdgCodeDghtBarV0 = 2212; //Proton | |
2043 | lHistEtaGenCasc = fHistEtaGenCascXiMinus; // this plot for any Xi- | |
2044 | lHistThetaGenCasc = fHistThetaGenCascXiMinus; // cascades generated within acceptance (cut in pt + theta) | |
2045 | l3dHistGenPtVsGenYvsNtracksPhysEff = f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff; | |
2046 | l3dHistGenPtVsGenctauvsYPhysEff = f3dHistGenPtVsGenctauvsYXiMinusPhysEff; | |
2047 | l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblXiMinus; | |
2048 | lHistThetaLambda = fHistThetaLambdaXiMinus; | |
2049 | lHistThetaBach = fHistThetaBachXiMinus; | |
2050 | lHistThetaBarDghter = fHistThetaBarDghterXiMinus; | |
2051 | lHistThetaMesDghter = fHistThetaMesDghterXiMinus; | |
2052 | lHistPtBach = fHistPtBachXiMinus; | |
2053 | lHistPtBarDghter = fHistPtBarDghterXiMinus; | |
2054 | lHistPtMesDghter = fHistPtMesDghterXiMinus; | |
2055 | break; | |
2056 | case 2: // Xi+ | |
2057 | lPdgCodeCasc = -3312; //Xi+ | |
2058 | lPdgCodeBach = 211; //Pi+ | |
2059 | lPdgCodeLambda = -3122; //AntiLambda0 | |
2060 | lPdgCodeDghtMesV0 = 211; //Pi+ | |
2061 | lPdgCodeDghtBarV0 = -2212; //AntiProton | |
2062 | lHistEtaGenCasc = fHistEtaGenCascXiPlus; // this plot for any Xi+ | |
2063 | lHistThetaGenCasc = fHistThetaGenCascXiPlus; // cascades generated within acceptance (cut in pt + theta) | |
2064 | l3dHistGenPtVsGenYvsNtracksPhysEff = f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff; | |
2065 | l3dHistGenPtVsGenctauvsYPhysEff = f3dHistGenPtVsGenctauvsYXiPlusPhysEff; | |
2066 | l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblXiPlus; | |
2067 | lHistThetaLambda = fHistThetaLambdaXiPlus; | |
2068 | lHistThetaBach = fHistThetaBachXiPlus; | |
2069 | lHistThetaBarDghter = fHistThetaBarDghterXiPlus; | |
2070 | lHistThetaMesDghter = fHistThetaMesDghterXiPlus; | |
2071 | lHistPtBach = fHistPtBachXiPlus; | |
2072 | lHistPtBarDghter = fHistPtBarDghterXiPlus; | |
2073 | lHistPtMesDghter = fHistPtMesDghterXiPlus; | |
2074 | break; | |
2075 | case 3: // Omega- | |
2076 | lPdgCodeCasc = 3334; //Omega- | |
2077 | lPdgCodeBach = -321; //K- | |
2078 | lPdgCodeLambda = 3122; //Lambda0 | |
2079 | lPdgCodeDghtMesV0 = -211; //Pi- | |
2080 | lPdgCodeDghtBarV0 = 2212; //Proton | |
2081 | lHistEtaGenCasc = fHistEtaGenCascOmegaMinus; // this plot for any Omega+ | |
2082 | lHistThetaGenCasc = fHistThetaGenCascOmegaMinus; // cascades generated within acceptance (cut in pt + theta) | |
2083 | l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblOmegaMinus; | |
2084 | l3dHistGenPtVsGenYvsNtracksPhysEff = f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff; | |
2085 | l3dHistGenPtVsGenctauvsYPhysEff = f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff; | |
2086 | lHistThetaLambda = fHistThetaLambdaOmegaMinus; | |
2087 | lHistThetaBach = fHistThetaBachOmegaMinus; | |
2088 | lHistThetaBarDghter = fHistThetaBarDghterOmegaMinus; | |
2089 | lHistThetaMesDghter = fHistThetaMesDghterOmegaMinus; | |
2090 | lHistPtBach = fHistPtBachOmegaMinus; | |
2091 | lHistPtBarDghter = fHistPtBarDghterOmegaMinus; | |
2092 | lHistPtMesDghter = fHistPtMesDghterOmegaMinus; | |
2093 | break; | |
2094 | case 4: // Omega+ | |
2095 | lPdgCodeCasc = -3334; //Omega+ | |
2096 | lPdgCodeBach = 321; //K+ | |
2097 | lPdgCodeLambda = -3122; //AntiLambda0 | |
2098 | lPdgCodeDghtMesV0 = 211; //Pi+ | |
2099 | lPdgCodeDghtBarV0 = -2212; //AntiProton | |
2100 | lHistEtaGenCasc = fHistEtaGenCascOmegaPlus; // this plot for any Omega- | |
2101 | lHistThetaGenCasc = fHistThetaGenCascOmegaPlus; // cascades generated within acceptance (cut in pt + theta) | |
2102 | l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblOmegaPlus; | |
2103 | l3dHistGenPtVsGenYvsNtracksPhysEff = f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff; | |
2104 | l3dHistGenPtVsGenctauvsYPhysEff = f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff; | |
2105 | lHistThetaLambda = fHistThetaLambdaOmegaPlus; | |
2106 | lHistThetaBach = fHistThetaBachOmegaPlus; | |
2107 | lHistThetaBarDghter = fHistThetaBarDghterOmegaPlus; | |
2108 | lHistThetaMesDghter = fHistThetaMesDghterOmegaPlus; | |
2109 | lHistPtBach = fHistPtBachOmegaPlus; | |
2110 | lHistPtBarDghter = fHistPtBarDghterOmegaPlus; | |
2111 | lHistPtMesDghter = fHistPtMesDghterOmegaPlus; | |
2112 | break; | |
2113 | } | |
2114 | ||
2115 | for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < lNbMCPrimary; iCurrentLabelStack++) { | |
2116 | ||
2117 | Double_t partEnergy = 0.; | |
2118 | Double_t partPz = 0.; | |
2119 | Double_t partEta = 0.; | |
2120 | Double_t partTheta = 0.; | |
2121 | Double_t partP = 0.; | |
2122 | Double_t partPt = 0.; | |
2123 | Double_t partVx = 0.; | |
2124 | Double_t partVy = 0.; | |
2125 | Double_t partVz = 0.; | |
2126 | Double_t bacVx = 0.; | |
2127 | Double_t bacVy = 0.; | |
2128 | Double_t bacVz = 0.; | |
2129 | Double_t partMass = 0.; | |
2130 | ||
2131 | if ( fAnalysisType == "ESD" ) { | |
2132 | TParticle* lCurrentParticle = 0x0; | |
2133 | lCurrentParticle = lMCstack->Particle( iCurrentLabelStack ); | |
2134 | if (!lCurrentParticle) { | |
2135 | Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack ); | |
2136 | continue; | |
2137 | } | |
2138 | if (!lMCstack->IsPhysicalPrimary(iCurrentLabelStack)) continue; | |
2139 | if (lCurrentParticle->GetPdgCode() == lPdgCodeCasc) { // Here ! | |
2140 | TParticle* xiMC = 0x0; | |
2141 | xiMC = lCurrentParticle; | |
2142 | if (!xiMC) { | |
2143 | Printf("MC TParticle pointer to Cascade = 0x0 ! Skip ..."); | |
2144 | continue; | |
2145 | } | |
2146 | partEnergy = xiMC->Energy(); | |
2147 | partPz = xiMC->Pz(); | |
2148 | partEta = xiMC->Eta(); | |
2149 | partPt = xiMC->Pt(); | |
2150 | partP = xiMC->P(); | |
2151 | partTheta = xiMC->Theta(); | |
2152 | partMass = xiMC->GetMass(); | |
2153 | partVx = xiMC->Vx(); | |
2154 | partVy = xiMC->Vy(); | |
2155 | partVz = xiMC->Vz(); | |
2156 | if (xiMC->GetDaughter(0)>=0) { | |
2157 | TParticle *mcBach = lMCstack->Particle(xiMC->GetDaughter(0)); | |
2158 | if (mcBach) { | |
2159 | bacVx = mcBach->Vx(); | |
2160 | bacVy = mcBach->Vy(); | |
2161 | bacVz = mcBach->Vz(); | |
2162 | } | |
2163 | } | |
2164 | } else continue; | |
2165 | } else if ( fAnalysisType == "AOD" ) { | |
2166 | AliAODMCParticle *lCurrentParticleaod = (AliAODMCParticle*) arrayMC->At(iCurrentLabelStack); | |
2167 | if (!lCurrentParticleaod) { | |
2168 | Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack ); | |
2169 | continue; | |
2170 | } | |
2171 | if (!lCurrentParticleaod->IsPhysicalPrimary()) continue; | |
2172 | if (!(lCurrentParticleaod->PdgCode() == lPdgCodeCasc)) continue; | |
2173 | partEnergy = lCurrentParticleaod->E(); | |
2174 | partPz = lCurrentParticleaod->Pz(); | |
2175 | partEta = lCurrentParticleaod->Eta(); | |
2176 | partP = lCurrentParticleaod->P(); | |
2177 | partPt = lCurrentParticleaod->Pt(); | |
2178 | partTheta = lCurrentParticleaod->Theta(); | |
2179 | partMass = lCurrentParticleaod->M(); //FIXME: not sure this works, seems not implemented | |
2180 | partVx = lCurrentParticleaod->Xv(); | |
2181 | partVy = lCurrentParticleaod->Yv(); | |
2182 | partVz = lCurrentParticleaod->Zv(); | |
2183 | if (lCurrentParticleaod->GetDaughter(0)>=0) { | |
2184 | AliAODMCParticle *mcBach = (AliAODMCParticle*) arrayMC->At(lCurrentParticleaod->GetDaughter(0)); | |
2185 | if (mcBach) { | |
2186 | bacVx = mcBach->Xv(); | |
2187 | bacVy = mcBach->Yv(); | |
2188 | bacVz = mcBach->Zv(); | |
2189 | } | |
2190 | } | |
2191 | } | |
2192 | ncascperevtot++; | |
2193 | // - Fill the first histos : = any generated Xi, not necessarily within the acceptance | |
2194 | Double_t lRapXiMC = 0.5*TMath::Log((partEnergy + partPz) / (partEnergy - partPz +1.e-13)); | |
2195 | // - Calculate proper time | |
2196 | Double_t lctau = TMath::Sqrt((partVx-bacVx)*(partVx-bacVx)+(partVy-bacVy)*(partVy-bacVy)+(partVz-bacVz)*(partVz-bacVz)); | |
2197 | if (partP!=0.) lctau = lctau*partMass/partP; | |
2198 | else lctau = -1.; | |
2199 | Double_t lRadToDeg = 180.0/TMath::Pi(); | |
2200 | // - Fill the first histos : = any generated Xi, not necessarily within the acceptance | |
2201 | lHistEtaGenCasc->Fill( partEta ); | |
2202 | l3dHistGenPtVsGenYvsNtracksPhysEff->Fill( partPt, lRapXiMC, lPrimaryTrackMultiplicity ); | |
2203 | l3dHistGenPtVsGenctauvsYPhysEff->Fill( partPt, lctau, lRapXiMC ); | |
2204 | lHistThetaGenCasc->Fill( lRadToDeg * partTheta ); | |
2205 | ||
2206 | //-------------------------------------------------------------------------------------------- | |
2207 | // - Check the emission of particle stays within the acceptance of the detector (cut in theta) | |
2208 | if (fApplyAccCut) { if( partTheta < TMath::Pi()/4.0 || partTheta > 3.0*TMath::Pi()/4.0 ) continue;} | |
2209 | ||
2210 | Float_t lambdaTheta = 0.; | |
2211 | Float_t bacTheta = 0.; | |
2212 | Float_t dghtBarV0Theta = 0.; | |
2213 | Float_t dghtMesV0Theta = 0.; | |
2214 | Float_t bacPt = 0.; | |
2215 | Float_t dghtBarV0Pt = 0.; | |
2216 | Float_t dghtMesV0Pt = 0.; | |
2217 | ||
2218 | if ( fAnalysisType == "ESD" ) { | |
2219 | TParticle* xiMC = lMCstack->Particle( iCurrentLabelStack ); | |
2220 | if ( xiMC->GetNDaughters() != 2) continue; | |
2221 | if ( xiMC->GetDaughter(0) < 0 ) continue; | |
2222 | if ( xiMC->GetDaughter(1) < 0 ) continue; | |
2223 | TParticle* lDght0ofXi = lMCstack->Particle( xiMC->GetDaughter(0) ); | |
2224 | TParticle* lDght1ofXi = lMCstack->Particle( xiMC->GetDaughter(1) ); | |
2225 | TParticle* lLambda = 0; | |
2226 | TParticle* lBach = 0; | |
2227 | ||
2228 | // Xi - Case 1 | |
2229 | if ( lDght0ofXi->GetPdgCode() == lPdgCodeLambda && lDght1ofXi->GetPdgCode() == lPdgCodeBach ){ | |
2230 | lLambda = lDght0ofXi; // dghter0 = Lambda | |
2231 | lBach = lDght1ofXi; // dghter1 = Pi- | |
2232 | } | |
2233 | // Xi - Case 2 | |
2234 | else if ( lDght0ofXi->GetPdgCode() == lPdgCodeBach && lDght1ofXi->GetPdgCode() == lPdgCodeLambda ){ | |
2235 | lBach = lDght0ofXi; // dghter0 = Pi- | |
2236 | lLambda = lDght1ofXi; // dghter1 = Lambda | |
2237 | } | |
2238 | // Otherwise - Case 3 | |
2239 | else continue; | |
2240 | ||
2241 | // - Check the emission of particle stays within the acceptance of the detector (cut in pt + theta) | |
2242 | if (fApplyAccCut) { | |
2243 | if( lLambda->Theta() < TMath::Pi()/4.0 || lLambda->Theta() > 3.0*TMath::Pi()/4.0 ) continue; | |
2244 | if( lBach->Theta() < TMath::Pi()/4.0 || lBach->Theta() > 3.0*TMath::Pi()/4.0 ) continue; | |
2245 | if( lBach->Pt() < 0.150 ) continue; //FIXME: maybe tuned for Xi but not for K- from Omega ... | |
2246 | } | |
2247 | ||
2248 | //--------- | |
2249 | // - V0 level | |
2250 | TParticle* lDghtBarV0 = 0; | |
2251 | TParticle* lDghtMesV0 = 0; | |
2252 | if( lLambda->GetNDaughters() != 2 ) continue; | |
2253 | if( lLambda->GetDaughter(0) < 0 ) continue; | |
2254 | if( lLambda->GetDaughter(1) < 0 ) continue; | |
2255 | TParticle* lDght0ofLambda = lMCstack->Particle( lLambda->GetDaughter(0) ); | |
2256 | TParticle* lDght1ofLambda = lMCstack->Particle( lLambda->GetDaughter(1) ); | |
2257 | ||
2258 | // V0 - Case 1 | |
2259 | if ( lDght0ofLambda->GetPdgCode() == lPdgCodeDghtBarV0 && lDght1ofLambda->GetPdgCode() == lPdgCodeDghtMesV0 ) { // Here ! | |
2260 | lDghtBarV0 = lDght0ofLambda; // dghter0 = Proton | |
2261 | lDghtMesV0 = lDght1ofLambda; // dghter1 = Pi- | |
2262 | } | |
2263 | // V0 - Case 2 | |
2264 | else if ( lDght0ofLambda->GetPdgCode() == lPdgCodeDghtMesV0 && lDght1ofLambda->GetPdgCode() == lPdgCodeDghtBarV0 ) { // Here ! | |
2265 | lDghtMesV0 = lDght0ofLambda; // dghter0 = Pi- | |
2266 | lDghtBarV0 = lDght1ofLambda; // dghter1 = Proton | |
2267 | } | |
2268 | // Otherwise - Case 3 | |
2269 | else continue; | |
2270 | ||
2271 | // - Check the emission of particle stays within the acceptance of the detector | |
2272 | if (fApplyAccCut) { | |
2273 | if( lDghtBarV0->Theta() < TMath::Pi()/4.0 || lDghtBarV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue; | |
2274 | if( lDghtMesV0->Theta() < TMath::Pi()/4.0 || lDghtMesV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue; | |
2275 | if( lDghtBarV0->Pt() < 0.250 ) continue; | |
2276 | if( lDghtMesV0->Pt() < 0.150 ) continue; | |
2277 | } | |
2278 | ||
2279 | lambdaTheta = lLambda->Theta(); | |
2280 | bacTheta = lBach->Theta(); | |
2281 | dghtBarV0Theta = lDghtBarV0->Theta(); | |
2282 | dghtMesV0Theta = lDghtMesV0->Theta(); | |
2283 | bacPt = lBach->Pt(); | |
2284 | dghtBarV0Pt = lDghtBarV0->Pt(); | |
2285 | dghtMesV0Pt = lDghtMesV0->Pt(); | |
2286 | ||
2287 | } else if ( fAnalysisType == "AOD") { | |
2288 | ||
2289 | AliAODMCParticle *xiMC = (AliAODMCParticle*) arrayMC->At(iCurrentLabelStack); | |
2290 | if (xiMC->GetNDaughters() != 2) continue; | |
2291 | if (xiMC->GetDaughter(0) < 0 ) continue; | |
2292 | if (xiMC->GetDaughter(1) < 0 ) continue; | |
2293 | ||
2294 | AliAODMCParticle* lDght0ofXi = (AliAODMCParticle*) arrayMC->At( xiMC->GetDaughter(0) ); | |
2295 | AliAODMCParticle* lDght1ofXi = (AliAODMCParticle*) arrayMC->At( xiMC->GetDaughter(1) ); | |
2296 | ||
2297 | AliAODMCParticle* lLambda = 0; | |
2298 | AliAODMCParticle* lBach = 0; | |
2299 | ||
2300 | // Xi - Case 1 | |
2301 | if ( lDght0ofXi->PdgCode() == lPdgCodeLambda && lDght1ofXi->PdgCode() == lPdgCodeBach ){ | |
2302 | lLambda = lDght0ofXi; // dghter0 = Lambda | |
2303 | lBach = lDght1ofXi; // dghter1 = Pi- | |
2304 | } | |
2305 | // Xi - Case 2 | |
2306 | else if ( lDght0ofXi->PdgCode() == lPdgCodeBach && lDght1ofXi->PdgCode() == lPdgCodeLambda ){ | |
2307 | lBach = lDght0ofXi; // dghter0 = Pi | |
2308 | lLambda = lDght1ofXi; //dghter1 = Lambda | |
2309 | } | |
2310 | // Otherwise - Case 3 | |
2311 | else continue; | |
2312 | ||
2313 | // - Check the emission of particle stays within the acceptance of the detector (cut in pt + theta) | |
2314 | if (fApplyAccCut) { | |
2315 | if ( lLambda->Theta() < TMath::Pi()/4.0 || lLambda->Theta() > 3.0*TMath::Pi()/4.0 ) continue; | |
2316 | if( lBach->Theta() < TMath::Pi()/4.0 || lBach->Theta() > 3.0*TMath::Pi()/4.0 ) continue; | |
2317 | if( lBach->Pt() < 0.150 ) continue; //FIXME : maybe tuned for Xi but not for K- from Omega ... | |
2318 | } | |
2319 | ||
2320 | //----------- | |
2321 | // - V0 level | |
2322 | AliAODMCParticle* lDghtBarV0 = 0; | |
2323 | AliAODMCParticle* lDghtMesV0 = 0; | |
2324 | ||
2325 | if( lLambda->GetNDaughters() != 2 ) continue; | |
2326 | if( lLambda->GetDaughter(0) < 0 ) continue; | |
2327 | if( lLambda->GetDaughter(1) < 0 ) continue; | |
2328 | ||
2329 | AliAODMCParticle* lDght0ofLambda = (AliAODMCParticle*) arrayMC->At( lLambda->GetDaughter(0) ); | |
2330 | AliAODMCParticle* lDght1ofLambda = (AliAODMCParticle*) arrayMC->At( lLambda->GetDaughter(1) ); | |
2331 | ||
2332 | // V0 - Case 1 | |
2333 | if ( lDght0ofLambda->PdgCode() == lPdgCodeDghtBarV0 && lDght1ofLambda->PdgCode() == lPdgCodeDghtMesV0 ) { | |
2334 | lDghtBarV0 = lDght0ofLambda; // dghter0 = Proton | |
2335 | lDghtMesV0 = lDght1ofLambda; // dghter1 = Pi- | |
2336 | } | |
2337 | // V0 - Case 2 | |
2338 | else if ( lDght0ofLambda->PdgCode() == lPdgCodeDghtMesV0 && lDght1ofLambda->PdgCode() == lPdgCodeDghtBarV0 ) { | |
2339 | lDghtMesV0 = lDght0ofLambda; // dghter0 = Pi- | |
2340 | lDghtBarV0 = lDght1ofLambda; // dghter1 = proton | |
2341 | } | |
2342 | // V0 otherwise - Case 3 | |
2343 | else continue; | |
2344 | ||
2345 | // - Check the emission of particle stays within the acceptance of the detector | |
2346 | if (fApplyAccCut) { | |
2347 | if( lDghtBarV0->Theta() < TMath::Pi()/4.0 || lDghtBarV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue; | |
2348 | if( lDghtMesV0->Theta() < TMath::Pi()/4.0 || lDghtMesV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue; | |
2349 | if( lDghtBarV0->Pt() < 0.250 ) continue; | |
2350 | if( lDghtMesV0->Pt() < 0.150 ) continue; | |
2351 | } | |
2352 | ||
2353 | lambdaTheta = lLambda->Theta(); | |
2354 | bacTheta = lBach->Theta(); | |
2355 | dghtBarV0Theta = lDghtBarV0->Theta(); | |
2356 | dghtMesV0Theta = lDghtMesV0->Theta(); | |
2357 | bacPt = lBach->Pt(); | |
2358 | dghtBarV0Pt = lDghtBarV0->Pt(); | |
2359 | dghtMesV0Pt = lDghtMesV0->Pt(); | |
2360 | } | |
2361 | ||
2362 | //--------------------------------------- | |
2363 | // - Filling histos for findable cascades | |
2364 | // - Fill theta histos | |
2365 | lHistThetaLambda->Fill( lRadToDeg * lambdaTheta ); | |
2366 | lHistThetaBach->Fill( lRadToDeg * bacTheta ); | |
2367 | lHistThetaBarDghter->Fill( lRadToDeg * dghtBarV0Theta ); | |
2368 | lHistThetaMesDghter->Fill( lRadToDeg * dghtMesV0Theta ); | |
2369 | // - Fill pt histos | |
2370 | lHistPtBach ->Fill( bacPt ); | |
2371 | lHistPtBarDghter ->Fill( dghtBarV0Pt ); | |
2372 | lHistPtMesDghter ->Fill( dghtMesV0Pt ); | |
2373 | l2dHistGenPtVsGenYFdbl ->Fill( partPt, lRapXiMC ); | |
2374 | ||
2375 | ncascperev++; | |
2376 | ||
2377 | }// This is the end of the loop on primaries | |
2378 | ||
2379 | if (iCascType == 1) { | |
2380 | fHistnXiMinusPerEv->Fill(ncascperev); | |
2381 | fHistnXiMinusPerEvTot->Fill(ncascperevtot); | |
2382 | } | |
2383 | if (iCascType == 2) { | |
2384 | fHistnXiPlusPerEv->Fill(ncascperev); | |
2385 | fHistnXiPlusPerEvTot->Fill(ncascperevtot); | |
2386 | } | |
2387 | if (iCascType == 3) { | |
2388 | fHistnOmegaMinusPerEv->Fill(ncascperev); | |
2389 | fHistnOmegaMinusPerEvTot->Fill(ncascperevtot); | |
2390 | } | |
2391 | if (iCascType == 4) { | |
2392 | fHistnOmegaPlusPerEv->Fill(ncascperev); | |
2393 | fHistnOmegaPlusPerEvTot->Fill(ncascperevtot); | |
2394 | } | |
2395 | ||
2396 | // - Re-initialisation of the local THF pointers | |
2397 | lHistEtaGenCasc = 0x0; | |
2398 | lHistThetaGenCasc = 0x0; | |
2399 | l2dHistGenPtVsGenYFdbl = 0x0; | |
2400 | lHistThetaLambda = 0x0; | |
2401 | lHistThetaBach = 0x0; | |
2402 | lHistThetaBarDghter = 0x0; | |
2403 | lHistThetaMesDghter = 0x0; | |
2404 | lHistPtBach = 0x0; | |
2405 | lHistPtBarDghter = 0x0; | |
2406 | lHistPtMesDghter = 0x0; | |
2407 | ||
2408 | } // end of loop over the different types of cascades (Xi-+, Omega-+) | |
2409 | ||
2410 | ||
2411 | ||
2412 | //----------------------------------------- | |
2413 | // - Loop over the reconstructed candidates | |
2414 | //----------------------------------------- | |
2415 | Int_t nAssoXiMinus = 0; | |
2416 | Int_t nAssoXiPlus = 0; | |
2417 | Int_t nAssoOmegaMinus = 0; | |
2418 | Int_t nAssoOmegaPlus = 0; | |
2419 | Int_t lPosTPCClusters = 0; | |
2420 | Int_t lNegTPCClusters = 0; | |
2421 | Int_t lBachTPCClusters = 0; | |
2422 | Double_t lDcaXiDaughters = -1. ; | |
2423 | Double_t lDcaBachToPrimVertexXi = -1. ; | |
2424 | Double_t lXiCosineOfPointingAngle = -1. ; | |
2425 | Double_t lPosXi[3] = { -1000.0, -1000.0, -1000.0 }; | |
2426 | Double_t lXiRadius = -1000. ; | |
2427 | Double_t lInvMassLambdaAsCascDghter = 0.; | |
2428 | Double_t lDcaV0DaughtersXi = -1.; | |
2429 | Double_t lV0CosineOfPointingAngleXi = -1.; | |
2430 | Double_t lV0CosineOfPointingAngle = -1.; | |
2431 | Double_t lPosV0Xi[3] = { -1000. , -1000., -1000. }; // Position of VO coming from cascade | |
2432 | Double_t lV0RadiusXi = -1000.; | |
2433 | Double_t lDcaV0ToPrimVertexXi = -1.; | |
2434 | Double_t lDcaPosToPrimVertexXi = -1.; | |
2435 | Double_t lDcaNegToPrimVertexXi = -1.; | |
2436 | Double_t lChargeXi = -1.; | |
2437 | Double_t lV0mom = -1000.; | |
2438 | Double_t lmcPt = -1.; | |
2439 | Double_t lmcRapCasc = -1.; | |
2440 | Double_t lmcEta = -1000.; | |
2441 | Double_t lmcTransvRadius = -1000.; | |
2442 | Double_t lrecoPt = -100.; | |
2443 | Double_t lrecoTransvRadius = -1000.; | |
2444 | Double_t lDeltaPhiMcReco = -1.; | |
2445 | Double_t lBachTransvMom = 0.; | |
2446 | Double_t lpTrackTransvMom = 0.; | |
2447 | Double_t lnTrackTransvMom = 0.; | |
2448 | Double_t lmcPtPosV0Dghter = -100.; | |
2449 | Double_t lmcPtNegV0Dghter = -100.; | |
2450 | Double_t lrecoP = -100.; | |
2451 | Double_t lmcPtBach = -100.; | |
2452 | Double_t cascadeMass = 0.; | |
2453 | ||
2454 | // - Get the number of cascades | |
2455 | Int_t ncascades = 0; | |
2456 | if ( fAnalysisType == "ESD" ) { ncascades = lESDevent->GetNumberOfCascades(); } | |
2457 | else if ( fAnalysisType == "AOD" ) { ncascades = lAODevent->GetNumberOfCascades(); } | |
2458 | ||
2459 | //------------------------------- | |
2460 | // - Begining of the Cascade Loop | |
2461 | for (Int_t iXi = 0; iXi < ncascades; iXi++) { | |
2462 | ||
2463 | Bool_t lIsPosInXiProton = kFALSE; | |
2464 | Bool_t lIsPosInXiPion = kFALSE; | |
2465 | Bool_t lIsPosInOmegaProton = kFALSE; | |
2466 | Bool_t lIsPosInOmegaPion = kFALSE; | |
2467 | Bool_t lIsNegInXiProton = kFALSE; | |
2468 | Bool_t lIsNegInXiPion = kFALSE; | |
2469 | Bool_t lIsNegInOmegaProton = kFALSE; | |
2470 | Bool_t lIsNegInOmegaPion = kFALSE; | |
2471 | Bool_t lIsBachelorKaon = kFALSE; | |
2472 | Bool_t lIsBachelorPion = kFALSE; | |
2473 | Bool_t lIsBachelorKaonForTPC = kFALSE; | |
2474 | Bool_t lIsBachelorPionForTPC = kFALSE; | |
2475 | Bool_t lIsNegPionForTPC = kFALSE; | |
2476 | Bool_t lIsPosPionForTPC = kFALSE; | |
2477 | Bool_t lIsNegProtonForTPC = kFALSE; | |
2478 | Bool_t lIsPosProtonForTPC = kFALSE; | |
2479 | ||
2480 | // - Combined PID | |
2481 | // Reasonable guess for the priors for the cascade track sample (e-, mu, pi, K, p) | |
2482 | Double_t lPriorsGuessXi[14] = {0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}; | |
2483 | Double_t lPriorsGuessOmega[14] = {0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}; | |
2484 | Double_t ppionBach = 0.0, pkaonBach = 0.0; | |
2485 | Bool_t lIsBachelorMCPiMinus = kFALSE; | |
2486 | Bool_t lIsBachelorMCPiPlus = kFALSE; | |
2487 | Bool_t lIsBachelorMCKMinus = kFALSE; | |
2488 | Bool_t lIsBachelorMCKPlus = kFALSE; | |
2489 | Double_t lInvMassXiMinus = 0.; | |
2490 | Double_t lInvMassXiPlus = 0.; | |
2491 | Double_t lInvMassOmegaMinus = 0.; | |
2492 | Double_t lInvMassOmegaPlus = 0.; | |
2493 | Bool_t lAssoXiMinus = kFALSE; | |
2494 | Bool_t lAssoXiPlus = kFALSE; | |
2495 | Bool_t lAssoOmegaMinus = kFALSE; | |
2496 | Bool_t lAssoOmegaPlus = kFALSE; | |
2497 | ||
2498 | Float_t etaBach = 0.; | |
2499 | Float_t etaPos = 0.; | |
2500 | Float_t etaNeg = 0.; | |
2501 | ||
2502 | if ( fAnalysisType == "ESD" ) { | |
2503 | ||
2504 | // - Load the cascade | |
2505 | AliESDcascade *xiESD = lESDevent->GetCascade(iXi); | |
2506 | if (!xiESD) continue; | |
2507 | ||
2508 | // - Connection to daughter tracks of the current cascade | |
2509 | UInt_t lIdxPosXi = (UInt_t) TMath::Abs( xiESD->GetPindex() ); | |
2510 | UInt_t lIdxNegXi = (UInt_t) TMath::Abs( xiESD->GetNindex() ); | |
2511 | UInt_t lBachIdx = (UInt_t) TMath::Abs( xiESD->GetBindex() ); | |
2512 | ||
2513 | // - Rejection of a double use of a daughter track (nothing but just a crosscheck of what is done in the cascade vertexer) | |
2514 | if(lBachIdx == lIdxNegXi) { | |
2515 | AliWarning("Pb / Idx(Bach. track) = Idx(Neg. track) ... continue!"); continue; | |
2516 | } | |
2517 | if(lBachIdx == lIdxPosXi) { | |
2518 | AliWarning("Pb / Idx(Bach. track) = Idx(Pos. track) ... continue!"); continue; | |
2519 | } | |
2520 | ||
2521 | // - Get the daughter tracks | |
2522 | AliESDtrack *pTrackXi = lESDevent->GetTrack( lIdxPosXi ); | |
2523 | AliESDtrack *nTrackXi = lESDevent->GetTrack( lIdxNegXi ); | |
2524 | AliESDtrack *bachTrackXi = lESDevent->GetTrack( lBachIdx ); | |
2525 | if (!pTrackXi || !nTrackXi || !bachTrackXi ) { | |
2526 | Printf("ERROR: Could not retrieve one of the 3 daughter tracks of the cascade ..."); | |
2527 | continue; | |
2528 | } | |
2529 | ||
2530 | // Get the number of TPC clusters | |
2531 | lPosTPCClusters = pTrackXi->GetTPCNcls(); | |
2532 | lNegTPCClusters = nTrackXi->GetTPCNcls(); | |
2533 | lBachTPCClusters = bachTrackXi->GetTPCNcls(); | |
2534 | // - Rejection of a poor quality tracks | |
2535 | if(fkQualityCutTPCrefit){ | |
2536 | // - Poor quality related to TPCrefit | |
2537 | ULong_t pStatus = pTrackXi->GetStatus(); | |
2538 | ULong_t nStatus = nTrackXi->GetStatus(); | |
2539 | ULong_t bachStatus = bachTrackXi->GetStatus(); | |
2540 | if ((pStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Pos. track has no TPCrefit ... continue!"); continue; } | |
2541 | if ((nStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Neg. track has no TPCrefit ... continue!"); continue; } | |
2542 | if ((bachStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / Bach. track has no TPCrefit ... continue!"); continue; } | |
2543 | } | |
2544 | if(fkQualityCutnTPCcls){ | |
2545 | // - Poor quality related to TPC clusters | |
2546 | if(lPosTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Pos. track has less than 80 TPC clusters ... continue!"); continue; } | |
2547 | if(lNegTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Neg. track has less than 80 TPC clusters ... continue!"); continue; } | |
2548 | if(lBachTPCClusters < fMinnTPCcls) { AliWarning("Pb / Bach. track has less than 80 TPC clusters ... continue!"); continue; } | |
2549 | } | |
2550 | ||
2551 | etaPos = pTrackXi->Eta(); | |
2552 | etaNeg = nTrackXi->Eta(); | |
2553 | etaBach = bachTrackXi->Eta(); | |
2554 | ||
2555 | // - Info over reconstructed cascades | |
2556 | Double_t lV0quality = 0.; | |
2557 | if( bachTrackXi->Charge() < 0 ) { | |
2558 | //Calculate the effective mass of the Xi- candidate: Xi- hyp. (pdg code 3312 | |
2559 | lV0quality = 0.; | |
2560 | xiESD->ChangeMassHypothesis(lV0quality , 3312); | |
2561 | lInvMassXiMinus = xiESD->GetEffMassXi(); | |
2562 | //Calculate the effective mass of the Xi- candidate: Omega- hyp. (pdg code 3334) | |
2563 | lV0quality = 0.; | |
2564 | xiESD->ChangeMassHypothesis(lV0quality , 3334); | |
2565 | lInvMassOmegaMinus = xiESD->GetEffMassXi(); | |
2566 | //Back to "default" hyp. (Xi-) | |
2567 | lV0quality = 0.; | |
2568 | xiESD->ChangeMassHypothesis(lV0quality , 3312); | |
2569 | } | |
2570 | if( bachTrackXi->Charge() > 0 ){ | |
2571 | //Calculate the effective mass of the Xi- candidate: Xi+ hyp. (pdg code -3312) | |
2572 | lV0quality = 0.; | |
2573 | xiESD->ChangeMassHypothesis(lV0quality , -3312); | |
2574 | lInvMassXiPlus = xiESD->GetEffMassXi(); | |
2575 | //Calculate the effective mass of the Xi- candidate: Omega+ hyp. (pdg code -3334) | |
2576 | lV0quality = 0.; | |
2577 | xiESD->ChangeMassHypothesis(lV0quality , -3334); | |
2578 | lInvMassOmegaPlus = xiESD->GetEffMassXi(); | |
2579 | //Back to "default" hyp. (Xi-) | |
2580 | lV0quality = 0.; | |
2581 | xiESD->ChangeMassHypothesis(lV0quality , -3312); | |
2582 | } | |
2583 | lDcaXiDaughters = xiESD->GetDcaXiDaughters(); | |
2584 | lDcaBachToPrimVertexXi = TMath::Abs( bachTrackXi->GetD(lBestPrimaryVtxPos[0],lBestPrimaryVtxPos[1],lMagneticField) ); | |
2585 | lXiCosineOfPointingAngle = xiESD->GetCascadeCosineOfPointingAngle( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2] ); | |
2586 | xiESD->GetXYZcascade( lPosXi[0], lPosXi[1], lPosXi[2] ); | |
2587 | lInvMassLambdaAsCascDghter = xiESD->GetEffMass(); | |
2588 | lDcaV0DaughtersXi = xiESD->GetDcaV0Daughters(); | |
2589 | lV0CosineOfPointingAngleXi = xiESD->GetV0CosineOfPointingAngle( lPosXi[0], lPosXi[1], lPosXi[2] ); | |
2590 | lV0CosineOfPointingAngle = xiESD->GetV0CosineOfPointingAngle( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2]); | |
2591 | xiESD->GetXYZ( lPosV0Xi[0], lPosV0Xi[1], lPosV0Xi[2] ); | |
2592 | lDcaV0ToPrimVertexXi = xiESD->GetD( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2] ); | |
2593 | lDcaPosToPrimVertexXi = TMath::Abs( pTrackXi->GetD(lBestPrimaryVtxPos[0],lBestPrimaryVtxPos[1],lMagneticField) ); | |
2594 | lDcaNegToPrimVertexXi = TMath::Abs( nTrackXi->GetD(lBestPrimaryVtxPos[0],lBestPrimaryVtxPos[1],lMagneticField) ); | |
2595 | lChargeXi = xiESD->Charge(); | |
2596 | ||
2597 | //------------------ | |
2598 | // - PID Information | |
2599 | ||
2600 | // - Combined VO-positive-daughter PID | |
2601 | AliPID pPidXi; pPidXi.SetPriors( lPriorsGuessXi ); | |
2602 | AliPID pPidOmega; pPidOmega.SetPriors( lPriorsGuessOmega ); | |
2603 | if( pTrackXi->IsOn(AliESDtrack::kESDpid) ){ | |
2604 | Double_t r[10] = {0.}; pTrackXi->GetESDpid(r); | |
2605 | pPidXi.SetProbabilities(r); | |
2606 | pPidOmega.SetProbabilities(r); | |
2607 | // Check if the V0 positive track is a proton (case for Xi-) | |
2608 | Double_t pproton = pPidXi.GetProbability(AliPID::kProton); | |
2609 | if (pproton > pPidXi.GetProbability(AliPID::kElectron) && | |
2610 | pproton > pPidXi.GetProbability(AliPID::kMuon) && | |
2611 | pproton > pPidXi.GetProbability(AliPID::kPion) && | |
2612 | pproton > pPidXi.GetProbability(AliPID::kKaon) ) lIsPosInXiProton = kTRUE; | |
2613 | // Check if the V0 positive track is a pi+ (case for Xi+) | |
2614 | Double_t ppion = pPidXi.GetProbability(AliPID::kPion); | |
2615 | if (ppion > pPidXi.GetProbability(AliPID::kElectron) && | |
2616 | ppion > pPidXi.GetProbability(AliPID::kMuon) && | |
2617 | ppion > pPidXi.GetProbability(AliPID::kKaon) && | |
2618 | ppion > pPidXi.GetProbability(AliPID::kProton) ) lIsPosInXiPion = kTRUE; | |
2619 | // Check if the V0 positive track is a proton (case for Omega-) | |
2620 | pproton = 0.; | |
2621 | pproton = pPidOmega.GetProbability(AliPID::kProton); | |
2622 | if (pproton > pPidOmega.GetProbability(AliPID::kElectron) && | |
2623 | pproton > pPidOmega.GetProbability(AliPID::kMuon) && | |
2624 | pproton > pPidOmega.GetProbability(AliPID::kPion) && | |
2625 | pproton > pPidOmega.GetProbability(AliPID::kKaon) ) lIsPosInOmegaProton = kTRUE; | |
2626 | // Check if the V0 positive track is a pi+ (case for Omega+) | |
2627 | ppion = 0.; | |
2628 | ppion = pPidOmega.GetProbability(AliPID::kPion); | |
2629 | if (ppion > pPidOmega.GetProbability(AliPID::kElectron) && | |
2630 | ppion > pPidOmega.GetProbability(AliPID::kMuon) && | |
2631 | ppion > pPidOmega.GetProbability(AliPID::kKaon) && | |
2632 | ppion > pPidOmega.GetProbability(AliPID::kProton) ) lIsPosInOmegaPion = kTRUE; | |
2633 | } | |
2634 | // - Combined VO-negative-daughter PID | |
2635 | AliPID nPidXi; nPidXi.SetPriors( lPriorsGuessXi ); | |
2636 | AliPID nPidOmega; nPidOmega.SetPriors( lPriorsGuessOmega ); | |
2637 | if( nTrackXi->IsOn(AliESDtrack::kESDpid) ) { | |
2638 | Double_t r[10] = {0.}; nTrackXi->GetESDpid(r); | |
2639 | nPidXi.SetProbabilities(r); | |
2640 | nPidOmega.SetProbabilities(r); | |
2641 | // Check if the V0 negative track is a pi- (case for Xi-) | |
2642 | Double_t ppion = nPidXi.GetProbability(AliPID::kPion); | |
2643 | if (ppion > nPidXi.GetProbability(AliPID::kElectron) && | |
2644 | ppion > nPidXi.GetProbability(AliPID::kMuon) && | |
2645 | ppion > nPidXi.GetProbability(AliPID::kKaon) && | |
2646 | ppion > nPidXi.GetProbability(AliPID::kProton) ) lIsNegInXiPion = kTRUE; | |
2647 | // Check if the V0 negative track is an anti-proton (case for Xi+) | |
2648 | Double_t pproton = nPidXi.GetProbability(AliPID::kProton); | |
2649 | if (pproton > nPidXi.GetProbability(AliPID::kElectron) && | |
2650 | pproton > nPidXi.GetProbability(AliPID::kMuon) && | |
2651 | pproton > nPidXi.GetProbability(AliPID::kPion) && | |
2652 | pproton > nPidXi.GetProbability(AliPID::kKaon) ) lIsNegInXiProton = kTRUE; | |
2653 | // Check if the V0 negative track is a pi- (case for Omega-) | |
2654 | ppion = 0.; | |
2655 | ppion = nPidOmega.GetProbability(AliPID::kPion); | |
2656 | if (ppion > nPidOmega.GetProbability(AliPID::kElectron) && | |
2657 | ppion > nPidOmega.GetProbability(AliPID::kMuon) && | |
2658 | ppion > nPidOmega.GetProbability(AliPID::kKaon) && | |
2659 | ppion > nPidOmega.GetProbability(AliPID::kProton) ) lIsNegInOmegaPion = kTRUE; | |
2660 | // Check if the V0 negative track is an anti-proton (case for Omega+) | |
2661 | pproton = 0.; | |
2662 | pproton = nPidOmega.GetProbability(AliPID::kProton); | |
2663 | if (pproton > nPidOmega.GetProbability(AliPID::kElectron) && | |
2664 | pproton > nPidOmega.GetProbability(AliPID::kMuon) && | |
2665 | pproton > nPidOmega.GetProbability(AliPID::kPion) && | |
2666 | pproton > nPidOmega.GetProbability(AliPID::kKaon) ) lIsNegInOmegaProton = kTRUE; | |
2667 | } | |
2668 | // - Combined bachelor PID | |
2669 | AliPID bachPidXi; bachPidXi.SetPriors( lPriorsGuessXi ); | |
2670 | AliPID bachPidOmega; bachPidOmega.SetPriors( lPriorsGuessOmega ); | |
2671 | if ( bachTrackXi->IsOn(AliESDtrack::kESDpid) ) { | |
2672 | Double_t r[10] = {0.}; bachTrackXi->GetESDpid(r); | |
2673 | bachPidXi.SetProbabilities(r); | |
2674 | bachPidOmega.SetProbabilities(r); | |
2675 | // Check if the bachelor track is a pion | |
2676 | ppionBach = bachPidXi.GetProbability(AliPID::kPion); | |
2677 | if (ppionBach > bachPidXi.GetProbability(AliPID::kElectron) && | |
2678 | ppionBach > bachPidXi.GetProbability(AliPID::kMuon) && | |
2679 | ppionBach > bachPidXi.GetProbability(AliPID::kKaon) && | |
2680 | ppionBach > bachPidXi.GetProbability(AliPID::kProton) ) lIsBachelorPion = kTRUE; | |
2681 | // Check if the bachelor track is a kaon | |
2682 | pkaonBach = bachPidOmega.GetProbability(AliPID::kKaon); | |
2683 | if (pkaonBach > bachPidOmega.GetProbability(AliPID::kElectron) && | |
2684 | pkaonBach > bachPidOmega.GetProbability(AliPID::kMuon) && | |
2685 | pkaonBach > bachPidOmega.GetProbability(AliPID::kPion) && | |
2686 | pkaonBach > bachPidOmega.GetProbability(AliPID::kProton) ) lIsBachelorKaon = kTRUE; | |
2687 | } | |
2688 | // - 4-sigma bands on Bethe-Bloch curve | |
2689 | // Bachelor | |
2690 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 4) lIsBachelorKaonForTPC = kTRUE; | |
2691 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 4) lIsBachelorPionForTPC = kTRUE; | |
2692 | // Negative V0 daughter | |
2693 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 4) lIsNegPionForTPC = kTRUE; | |
2694 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kProton )) < 4) lIsNegProtonForTPC = kTRUE; | |
2695 | // Positive V0 daughter | |
2696 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 4) lIsPosPionForTPC = kTRUE; | |
2697 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 4) lIsPosProtonForTPC = kTRUE; | |
2698 | /* | |
2699 | const AliExternalTrackParam *pInnerWallTrackXi = pTrackXi ->GetInnerParam(); // Do not use GetTPCInnerWall | |
2700 | const AliExternalTrackParam *nInnerWallTrackXi = nTrackXi ->GetInnerParam(); | |
2701 | const AliExternalTrackParam *bachInnerWallTrackXi = bachTrackXi ->GetInnerParam(); | |
2702 | if(pInnerWallTrackXi && nInnerWallTrackXi && bachInnerWallTrackXi ){ | |
2703 | Double_t pMomInnerWall = pInnerWallTrackXi ->GetP(); | |
2704 | Double_t nMomInnerWall = nInnerWallTrackXi ->GetP(); | |
2705 | Double_t bachMomInnerWall = bachInnerWallTrackXi->GetP(); | |
2706 | // Bachelor | |
2707 | if (TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 3) lIsBachelorPionForTPC = kTRUE; | |
2708 | if (bachMomInnerWall < 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 5) lIsBachelorKaonForTPC = kTRUE; | |
2709 | if (bachMomInnerWall > 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 3) lIsBachelorKaonForTPC = kTRUE; | |
2710 | // Negative V0 daughter | |
2711 | if (TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 3 ) lIsNegPionForTPC = kTRUE; | |
2712 | if (nMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 5 ) lIsNegProtonForTPC = kTRUE; | |
2713 | if (nMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 3 ) lIsNegProtonForTPC = kTRUE; | |
2714 | // Positive V0 daughter | |
2715 | if (TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 3 ) lIsPosPionForTPC = kTRUE; | |
2716 | if (pMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 5) lIsPosProtonForTPC = kTRUE; | |
2717 | if (pMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 3) lIsPosProtonForTPC = kTRUE; | |
2718 | }*/ | |
2719 | // - PID proba Vs Pt(Bach) | |
2720 | Int_t lblBachForPID = (Int_t) TMath::Abs( bachTrackXi->GetLabel() ); | |
2721 | TParticle* mcBachForPID = lMCstack->Particle( lblBachForPID ); | |
2722 | lmcPtBach = mcBachForPID->Pt(); | |
2723 | // - MC perfect PID | |
2724 | if( mcBachForPID->GetPdgCode() == -211) lIsBachelorMCPiMinus = kTRUE; | |
2725 | if( mcBachForPID->GetPdgCode() == 211) lIsBachelorMCPiPlus = kTRUE; | |
2726 | if( mcBachForPID->GetPdgCode() == -321) lIsBachelorMCKMinus = kTRUE; | |
2727 | if( mcBachForPID->GetPdgCode() == 321) lIsBachelorMCKPlus = kTRUE; | |
2728 | ||
2729 | ||
2730 | //--------------------------------------------------------------- | |
2731 | // - MC association (care : lots of "continue;" below this line) | |
2732 | if(fDebug > 5) cout<< "MC EventNumber: "<<lMCevent->Header()->GetEvent()<<" / MC event Number in Run : "<<lMCevent->Header()->GetEventNrInRun()<<endl; | |
2733 | // - Level of the V0 daughters | |
2734 | Int_t lblPosV0Dghter = (Int_t) TMath::Abs( pTrackXi->GetLabel() ); | |
2735 | Int_t lblNegV0Dghter = (Int_t) TMath::Abs( nTrackXi->GetLabel() ); | |
2736 | TParticle* mcPosV0Dghter = lMCstack->Particle( lblPosV0Dghter ); | |
2737 | TParticle* mcNegV0Dghter = lMCstack->Particle( lblNegV0Dghter ); | |
2738 | // - Level of the Xi daughters | |
2739 | Int_t lblMotherPosV0Dghter = mcPosV0Dghter->GetFirstMother() ; | |
2740 | Int_t lblMotherNegV0Dghter = mcNegV0Dghter->GetFirstMother(); | |
2741 | if( lblMotherPosV0Dghter != lblMotherNegV0Dghter) continue; // same mother | |
2742 | if( lblMotherPosV0Dghter < 0 ) continue; // this particle is primary, no mother | |
2743 | if( lblMotherNegV0Dghter < 0 ) continue; // this particle is primary, no mother | |
2744 | // mothers = Lambda candidate ... a priori | |
2745 | TParticle* mcMotherPosV0Dghter = lMCstack->Particle( lblMotherPosV0Dghter ); | |
2746 | TParticle* mcMotherNegV0Dghter = lMCstack->Particle( lblMotherNegV0Dghter ); // MN: redundant?? already checked that labels are the same...-->same part from stack | |
2747 | Int_t lblBach = (Int_t) TMath::Abs( bachTrackXi->GetLabel() ); | |
2748 | TParticle* mcBach = lMCstack->Particle( lblBach ); | |
2749 | // - Level of Xi candidate | |
2750 | Int_t lblGdMotherPosV0Dghter = mcMotherPosV0Dghter->GetFirstMother() ; | |
2751 | Int_t lblGdMotherNegV0Dghter = mcMotherNegV0Dghter->GetFirstMother() ; | |
2752 | if( lblGdMotherPosV0Dghter != lblGdMotherNegV0Dghter ) continue; | |
2753 | if( lblGdMotherPosV0Dghter < 0 ) continue; // primary lambda ... | |
2754 | if( lblGdMotherNegV0Dghter < 0 ) continue; // primary lambda ... | |
2755 | // Gd mothers = Xi candidate ... a priori | |
2756 | TParticle* mcGdMotherPosV0Dghter = lMCstack->Particle( lblGdMotherPosV0Dghter ); | |
2757 | TParticle* mcGdMotherNegV0Dghter = lMCstack->Particle( lblGdMotherNegV0Dghter ); | |
2758 | Int_t lblMotherBach = (Int_t) TMath::Abs( mcBach->GetFirstMother() ); | |
2759 | if( lblMotherBach != lblGdMotherPosV0Dghter ) continue; //same mother for bach and V0 daughters | |
2760 | TParticle* mcMotherBach = lMCstack->Particle( lblMotherBach ); | |
2761 | ||
2762 | // - Check if cascade is primary | |
2763 | if (!(lMCstack->IsPhysicalPrimary(lblMotherBach))) continue; | |
2764 | ||
2765 | // - Manage boolean for association | |
2766 | if ( mcMotherBach ->GetPdgCode() == 3312 && | |
2767 | mcGdMotherPosV0Dghter ->GetPdgCode() == 3312 && | |
2768 | mcGdMotherNegV0Dghter ->GetPdgCode() == 3312 ) {lAssoXiMinus = kTRUE; | |
2769 | cascadeMass = 1.321; | |
2770 | nAssoXiMinus++; } | |
2771 | else if( mcMotherBach ->GetPdgCode() == -3312 && | |
2772 | mcGdMotherPosV0Dghter ->GetPdgCode() == -3312 && | |
2773 | mcGdMotherNegV0Dghter ->GetPdgCode() == -3312 ) {lAssoXiPlus = kTRUE; | |
2774 | cascadeMass = 1.321; | |
2775 | nAssoXiPlus++; } | |
2776 | else if( mcMotherBach ->GetPdgCode() == 3334 && | |
2777 | mcGdMotherPosV0Dghter ->GetPdgCode() == 3334 && | |
2778 | mcGdMotherNegV0Dghter ->GetPdgCode() == 3334 ) {lAssoOmegaMinus = kTRUE; | |
2779 | cascadeMass = 1.672; | |
2780 | nAssoOmegaMinus++; } | |
2781 | else if( mcMotherBach ->GetPdgCode() == -3334 && | |
2782 | mcGdMotherPosV0Dghter ->GetPdgCode() == -3334 && | |
2783 | mcGdMotherNegV0Dghter ->GetPdgCode() == -3334 ) {lAssoOmegaPlus = kTRUE; | |
2784 | cascadeMass = 1.672; | |
2785 | nAssoOmegaPlus++; } | |
2786 | // If a proper association exists ... | |
2787 | if(fDebug > 4){ | |
2788 | cout<<"XiMinus = "<<lAssoXiMinus <<endl; | |
2789 | cout<<"XiPlus = "<<lAssoXiPlus <<endl; | |
2790 | cout<<"OmegaMinus = "<<lAssoOmegaMinus<<endl; | |
2791 | cout<<"OmegaPlus = "<<lAssoOmegaPlus <<endl | |
2792 | <<"----" <<endl; | |
2793 | } | |
2794 | if(fDebug > 5){ | |
2795 | cout<<endl; | |
2796 | cout<<"- V0 daughters - "<<endl; | |
2797 | cout<<" + V0 Pos. / Label : "<<lblPosV0Dghter<<" - Pdg Code : "<<mcPosV0Dghter->GetTitle()<<endl; | |
2798 | cout<<" - V0 Neg. / Label : "<<lblNegV0Dghter<<" - Pdg Code : "<<mcNegV0Dghter->GetTitle()<<endl; | |
2799 | ||
2800 | cout<<"- Xi daughters - "<<endl; | |
2801 | cout<<" + V0 Pos. mother / Label : "<<lblMotherPosV0Dghter<<" - Pdg Code : "<<mcMotherPosV0Dghter->GetTitle()<<endl; | |
2802 | cout<<" - V0 Neg. mother / Label : "<<lblMotherNegV0Dghter<<" - Pdg Code : "<<mcMotherNegV0Dghter->GetTitle()<<endl; | |
2803 | ||
2804 | cout<<" -- Bach. / Label :"<<lblBach<<" - Pdg Code : "<<mcBach->GetTitle()<<endl; | |
2805 | ||
2806 | cout<<"- Xi candidate -"<<endl; | |
2807 | cout<<" + V0 Pos. Gd Mother / Label : "<<lblGdMotherPosV0Dghter<<" - Pdg Code : "<< mcGdMotherPosV0Dghter->GetTitle()<<endl; | |
2808 | cout<<" - V0 Neg. Gd Mother / Label : "<<lblGdMotherNegV0Dghter<<" - Pdg Code : "<< mcGdMotherNegV0Dghter->GetTitle()<<endl; | |
2809 | ||
2810 | cout<<" -- Mother Bach. / Label : "<<lblMotherBach<<" - Pdg Code : "<<mcMotherBach->GetTitle()<<endl; | |
2811 | cout<<endl; | |
2812 | } | |
2813 | ||
2814 | lmcPt = mcMotherBach->Pt(); | |
2815 | lmcRapCasc = 0.5*TMath::Log( (mcMotherBach->Energy() + mcMotherBach->Pz()) / (mcMotherBach->Energy() - mcMotherBach->Pz() +1.e-13) ); | |
2816 | lmcEta = mcMotherBach->Eta(); | |
2817 | lmcTransvRadius = mcBach->R(); // to get the decay point of Xi, = the production vertex of Bachelor ... | |
2818 | TVector3 lmcTVect3Mom( mcMotherBach->Px(), mcMotherBach->Py(), mcMotherBach->Pz() ); | |
2819 | lrecoPt = xiESD->Pt(); | |
2820 | lrecoTransvRadius = TMath::Sqrt( xiESD->Xv() * xiESD->Xv() + xiESD->Yv() * xiESD->Yv() ); | |
2821 | TVector3 lrecoTVect3Mom( xiESD->Px(), xiESD->Py(), xiESD->Pz() ); | |
2822 | lDeltaPhiMcReco = lmcTVect3Mom.DeltaPhi( lrecoTVect3Mom ) * 180.0/TMath::Pi(); | |
2823 | lmcPtPosV0Dghter = mcPosV0Dghter->Pt() ; | |
2824 | lmcPtNegV0Dghter = mcNegV0Dghter->Pt(); | |
2825 | lrecoP = xiESD->P(); | |
2826 | Double_t nV0mom[3] = {0. ,0. ,0. }; | |
2827 | Double_t pV0mom[3] = {0. ,0. ,0. }; | |
2828 | xiESD->GetNPxPyPz(nV0mom[0],nV0mom[1],nV0mom[2]); | |
2829 | xiESD->GetPPxPyPz(pV0mom[0],pV0mom[1],pV0mom[2]); | |
2830 | lV0mom = TMath::Sqrt(TMath::Power(nV0mom[0]+pV0mom[0],2)+TMath::Power(nV0mom[1]+pV0mom[1],2)+TMath::Power(nV0mom[2]+pV0mom[2],2)); | |
2831 | Double_t lBachMomX = 0.; Double_t lBachMomY = 0.; Double_t lBachMomZ = 0.; | |
2832 | xiESD->GetBPxPyPz( lBachMomX, lBachMomY, lBachMomZ ); | |
2833 | lBachTransvMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY ); | |
2834 | lnTrackTransvMom = TMath::Sqrt( nV0mom[0]*nV0mom[0] + nV0mom[1]*nV0mom[1] ); | |
2835 | lpTrackTransvMom = TMath::Sqrt( pV0mom[0]*pV0mom[0] + pV0mom[1]*pV0mom[1] ); | |
2836 | ||
2837 | } else if ( fAnalysisType == "AOD" ) { | |
2838 | ||
2839 | // - Load the cascade | |
2840 | const AliAODcascade *xiAOD = lAODevent->GetCascade(iXi); | |
2841 | if (!xiAOD) continue; | |
2842 | ||
2843 | // - Connection to daughter tracks of the current cascade | |
2844 | AliAODTrack *pTrackXi = dynamic_cast<AliAODTrack*>( xiAOD->GetDaughter(0) ); | |
2845 | AliAODTrack *nTrackXi = dynamic_cast<AliAODTrack*>( xiAOD->GetDaughter(1) ); | |
2846 | AliAODTrack *bachTrackXi = dynamic_cast<AliAODTrack*>( xiAOD->GetDecayVertexXi()->GetDaughter(0) ); | |
2847 | if (!pTrackXi || !nTrackXi || !bachTrackXi ) { | |
2848 | AliWarning("ERROR: Could not retrieve one of the 3 AOD daughter tracks of the cascade ..."); | |
2849 | continue; | |
2850 | } | |
2851 | UInt_t lIdxPosXi = (UInt_t) TMath::Abs( pTrackXi->GetID() ); | |
2852 | UInt_t lIdxNegXi = (UInt_t) TMath::Abs( nTrackXi->GetID() ); | |
2853 | UInt_t lBachIdx = (UInt_t) TMath::Abs( bachTrackXi->GetID() ); | |
2854 | ||
2855 | // - Rejection of a double use of a daughter track (nothing but just a crosscheck of what is done in the cascade vertexer) | |
2856 | if(lBachIdx == lIdxNegXi) { | |
2857 | AliWarning("Pb / Idx(Bach. track) = Idx(Neg. track) ... continue!"); continue; | |
2858 | } | |
2859 | if(lBachIdx == lIdxPosXi) { | |
2860 | AliWarning("Pb / Idx(Bach. track) = Idx(Pos. track) ... continue!"); continue; | |
2861 | } | |
2862 | lPosTPCClusters = pTrackXi->GetTPCNcls(); | |
2863 | lNegTPCClusters = nTrackXi->GetTPCNcls(); | |
2864 | lBachTPCClusters = bachTrackXi->GetTPCNcls(); | |
2865 | ||
2866 | // - Rejection of a poor quality tracks | |
2867 | if (fkQualityCutTPCrefit) { | |
2868 | // - Poor quality related to TPCrefit | |
2869 | if (!(pTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / V0 Pos. track has no TPCrefit ... continue!"); continue; } | |
2870 | if (!(nTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / V0 Neg. track has no TPCrefit ... continue!"); continue; } | |
2871 | if (!(bachTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / Bach. track has no TPCrefit ... continue!"); continue; } | |
2872 | } | |
2873 | if (fkQualityCutnTPCcls) { | |
2874 | // - Poor quality related to TPC clusters | |
2875 | if(lPosTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Pos. track has less than 80 TPC clusters ... continue!"); continue; } | |
2876 | if(lNegTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Neg. track has less than 80 TPC clusters ... continue!"); continue; } | |
2877 | if(lBachTPCClusters < fMinnTPCcls) { AliWarning("Pb / Bach. track has less than 80 TPC clusters ... continue!"); continue; } | |
2878 | } | |
2879 | ||
2880 | etaPos = pTrackXi->Eta(); | |
2881 | etaNeg = nTrackXi->Eta(); | |
2882 | etaBach = bachTrackXi->Eta(); | |
2883 | ||
2884 | // - Info over reconstructed cascades | |
2885 | if( bachTrackXi->Charge() < 0 ) { | |
2886 | lInvMassXiMinus = xiAOD->MassXi(); | |
2887 | lInvMassOmegaMinus = xiAOD->MassOmega(); | |
2888 | } | |
2889 | if( bachTrackXi->Charge() > 0 ){ | |
2890 | lInvMassXiPlus = xiAOD->MassXi(); | |
2891 | lInvMassOmegaPlus = xiAOD->MassOmega(); | |
2892 | } | |
2893 | lDcaXiDaughters = xiAOD->DcaXiDaughters(); | |
2894 | lDcaBachToPrimVertexXi = xiAOD->DcaBachToPrimVertex(); | |
2895 | lXiCosineOfPointingAngle = xiAOD->CosPointingAngleXi( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2] ); | |
2896 | lPosXi[0] = xiAOD->DecayVertexXiX(); | |
2897 | lPosXi[1] = xiAOD->DecayVertexXiY(); | |
2898 | lPosXi[2] = xiAOD->DecayVertexXiZ(); | |
2899 | lInvMassLambdaAsCascDghter = xiAOD->MassLambda(); | |
2900 | lDcaV0DaughtersXi = xiAOD->DcaV0Daughters(); | |
2901 | lV0CosineOfPointingAngleXi = xiAOD->CosPointingAngle( lPosXi ); | |
2902 | lV0CosineOfPointingAngle = xiAOD->CosPointingAngle( lBestPrimaryVtxPos ); | |
2903 | lPosV0Xi[0] = xiAOD->DecayVertexV0X(); | |
2904 | lPosV0Xi[1] = xiAOD->DecayVertexV0Y(); | |
2905 | lPosV0Xi[2] = xiAOD->DecayVertexV0Z(); | |
2906 | lDcaV0ToPrimVertexXi = xiAOD->DcaV0ToPrimVertex(); | |
2907 | lDcaPosToPrimVertexXi = xiAOD->DcaPosToPrimVertex(); | |
2908 | lDcaNegToPrimVertexXi = xiAOD->DcaNegToPrimVertex(); | |
2909 | lChargeXi = xiAOD->ChargeXi(); | |
2910 | ||
2911 | //------------------ | |
2912 | // - PID Information | |
2913 | // Combined VO-positive-daughter PID | |
2914 | // Combined bachelor PID | |
2915 | /* | |
2916 | AliPID bachPidXi; bachPidXi.SetPriors( lPriorsGuessXi ); | |
2917 | AliPID bachPidOmega; bachPidOmega.SetPriors( lPriorsGuessOmega ); | |
2918 | ||
2919 | if ( bachTrackXi->IsOn(AliESDtrack::kESDpid) ) { // Combined PID exists | |
2920 | Double_t r[10] = {0.}; bachTrackXi->GetESDpid(r); | |
2921 | bachPidXi.SetProbabilities(r); | |
2922 | bachPidOmega.SetProbabilities(r); | |
2923 | // Check if the bachelor track is a pion | |
2924 | ppionBach = bachPidXi.GetProbability(AliPID::kPion); | |
2925 | if (ppionBach > bachPidXi.GetProbability(AliPID::kElectron) && | |
2926 | ppionBach > bachPidXi.GetProbability(AliPID::kMuon) && | |
2927 | ppionBach > bachPidXi.GetProbability(AliPID::kKaon) && | |
2928 | ppionBach > bachPidXi.GetProbability(AliPID::kProton) ) lIsBachelorPion = kTRUE; | |
2929 | // Check if the bachelor track is a kaon | |
2930 | pkaonBach = bachPidOmega.GetProbability(AliPID::kKaon); | |
2931 | if (pkaonBach > bachPidOmega.GetProbability(AliPID::kElectron) && | |
2932 | pkaonBach > bachPidOmega.GetProbability(AliPID::kMuon) && | |
2933 | pkaonBach > bachPidOmega.GetProbability(AliPID::kPion) && | |
2934 | pkaonBach > bachPidOmega.GetProbability(AliPID::kProton) ) lIsBachelorKaon = kTRUE; | |
2935 | }// end if bachelor track with existing combined PID | |
2936 | */ | |
2937 | ||
2938 | // - TPC PID: 4-sigma bands on Bethe-Bloch curve | |
2939 | // Bachelor | |
2940 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 4) lIsBachelorKaonForTPC = kTRUE; | |
2941 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 4) lIsBachelorPionForTPC = kTRUE; | |
2942 | // Negative V0 daughter | |
2943 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 4) lIsNegPionForTPC = kTRUE; | |
2944 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kProton )) < 4) lIsNegProtonForTPC = kTRUE; | |
2945 | // Positive V0 daughter | |
2946 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 4) lIsPosPionForTPC = kTRUE; | |
2947 | if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 4) lIsPosProtonForTPC = kTRUE; | |
2948 | /* | |
2949 | const AliExternalTrackParam *pInnerWallTrackXi = pTrackXi ->GetInnerParam(); // Do not use GetTPCInnerWall | |
2950 | const AliExternalTrackParam *nInnerWallTrackXi = nTrackXi ->GetInnerParam(); | |
2951 | const AliExternalTrackParam *bachInnerWallTrackXi = bachTrackXi ->GetInnerParam(); | |
2952 | if(pInnerWallTrackXi && nInnerWallTrackXi && bachInnerWallTrackXi ){ | |
2953 | Double_t pMomInnerWall = pInnerWallTrackXi ->GetP(); | |
2954 | Double_t nMomInnerWall = nInnerWallTrackXi ->GetP(); | |
2955 | Double_t bachMomInnerWall = bachInnerWallTrackXi->GetP(); | |
2956 | // Bachelor | |
2957 | if (TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 3) lIsBachelorPionForTPC = kTRUE; | |
2958 | if (bachMomInnerWall < 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 5) lIsBachelorKaonForTPC = kTRUE; | |
2959 | if (bachMomInnerWall > 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 3) lIsBachelorKaonForTPC = kTRUE; | |
2960 | // Negative V0 daughter | |
2961 | if (TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 3 ) lIsNegPionForTPC = kTRUE; | |
2962 | if (nMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 5 ) lIsNegProtonForTPC = kTRUE; | |
2963 | if (nMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 3 ) lIsNegProtonForTPC = kTRUE; | |
2964 | // Positive V0 daughter | |
2965 | if (TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 3 ) lIsPosPionForTPC = kTRUE; | |
2966 | if (pMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 5) lIsPosProtonForTPC = kTRUE; | |
2967 | if (pMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 3) lIsPosProtonForTPC = kTRUE; | |
2968 | }*/ | |
2969 | ||
2970 | // - PID proba Vs Pt(Bach) | |
2971 | Int_t lblBachForPID = (Int_t) TMath::Abs( bachTrackXi->GetLabel() ); | |
2972 | AliAODMCParticle* mcBachForPID = (AliAODMCParticle*) arrayMC->At( lblBachForPID ); | |
2973 | lmcPtBach = mcBachForPID->Pt(); | |
2974 | ||
2975 | // - MC perfect PID | |
2976 | if( mcBachForPID->PdgCode() == -211) lIsBachelorMCPiMinus = kTRUE; | |
2977 | if( mcBachForPID->PdgCode() == 211) lIsBachelorMCPiPlus = kTRUE; | |
2978 | if( mcBachForPID->PdgCode() == -321) lIsBachelorMCKMinus = kTRUE; | |
2979 | if( mcBachForPID->PdgCode() == 321) lIsBachelorMCKPlus = kTRUE; | |
2980 | ||
2981 | //-------------------------------------------------------------- | |
2982 | // - MC association (care : lots of "continue;" below this line) | |
2983 | if(fDebug > 5) cout<<"MC EventNumber : "<<lMCevent->Header()->GetEvent()<<" / MC event Number in Run : "<<lMCevent->Header()->GetEventNrInRun()<<endl; | |
2984 | // - Level of the V0 daughters | |
2985 | Int_t lblPosV0Dghter = (Int_t) TMath::Abs( pTrackXi->GetLabel() ); | |
2986 | Int_t lblNegV0Dghter = (Int_t) TMath::Abs( nTrackXi->GetLabel() ); | |
2987 | AliAODMCParticle* mcPosV0Dghter = (AliAODMCParticle*) arrayMC->At( lblPosV0Dghter ); | |
2988 | AliAODMCParticle* mcNegV0Dghter = (AliAODMCParticle*) arrayMC->At( lblNegV0Dghter ); | |
2989 | // - Level of the Xi daughters | |
2990 | Int_t lblMotherPosV0Dghter = mcPosV0Dghter->GetMother(); | |
2991 | Int_t lblMotherNegV0Dghter = mcNegV0Dghter->GetMother(); | |
2992 | if( lblMotherPosV0Dghter != lblMotherNegV0Dghter) continue; // same mother | |
2993 | if( lblMotherPosV0Dghter < 0 ) continue; // this particle is primary, no mother | |
2994 | if( lblMotherNegV0Dghter < 0 ) continue; // this particle is primary, no mother | |
2995 | // mothers = Lambda candidate ... a priori | |
2996 | AliAODMCParticle* mcMotherPosV0Dghter = (AliAODMCParticle*) arrayMC->At( lblMotherPosV0Dghter ); | |
2997 | AliAODMCParticle* mcMotherNegV0Dghter = (AliAODMCParticle*) arrayMC->At( lblMotherNegV0Dghter ); | |
2998 | Int_t lblBach = (Int_t) TMath::Abs( bachTrackXi->GetLabel() ); | |
2999 | AliAODMCParticle* mcBach = (AliAODMCParticle*) arrayMC->At( lblBach ); | |
3000 | // - Level of Xi candidate | |
3001 | Int_t lblGdMotherPosV0Dghter = mcMotherPosV0Dghter->GetMother() ; | |
3002 | Int_t lblGdMotherNegV0Dghter = mcMotherNegV0Dghter->GetMother() ; | |
3003 | if( lblGdMotherPosV0Dghter != lblGdMotherNegV0Dghter ) continue; | |
3004 | if( lblGdMotherPosV0Dghter < 0 ) continue; // primary lambda ... | |
3005 | if( lblGdMotherNegV0Dghter < 0 ) continue; // primary lambda ... | |
3006 | // Gd mothers = Xi candidate ... a priori | |
3007 | AliAODMCParticle* mcGdMotherPosV0Dghter = (AliAODMCParticle*) arrayMC->At( lblGdMotherPosV0Dghter ); | |
3008 | AliAODMCParticle* mcGdMotherNegV0Dghter = (AliAODMCParticle*) arrayMC->At( lblGdMotherNegV0Dghter ); | |
3009 | Int_t lblMotherBach = (Int_t) TMath::Abs( mcBach->GetMother() ); | |
3010 | if( lblMotherBach != lblGdMotherPosV0Dghter ) continue; //same mother for bach and V0 daughters | |
3011 | AliAODMCParticle* mcMotherBach = (AliAODMCParticle*) arrayMC->At( lblMotherBach ); | |
3012 | ||
3013 | // - Check if cascade is primary | |
3014 | if (!(mcMotherBach->IsPhysicalPrimary())) continue; | |
3015 | ||
3016 | // - Manage boolean for association | |
3017 | if ( mcMotherBach ->GetPdgCode() == 3312 && | |
3018 | mcGdMotherPosV0Dghter ->GetPdgCode() == 3312 && | |
3019 | mcGdMotherNegV0Dghter ->GetPdgCode() == 3312 ) {lAssoXiMinus = kTRUE; | |
3020 | cascadeMass = 1.321; | |
3021 | nAssoXiMinus++; } | |
3022 | else if( mcMotherBach ->GetPdgCode() == -3312 && | |
3023 | mcGdMotherPosV0Dghter ->GetPdgCode() == -3312 && | |
3024 | mcGdMotherNegV0Dghter ->GetPdgCode() == -3312 ) {lAssoXiPlus = kTRUE; | |
3025 | cascadeMass = 1.321; | |
3026 | nAssoXiPlus++; } | |
3027 | else if( mcMotherBach ->GetPdgCode() == 3334 && | |
3028 | mcGdMotherPosV0Dghter ->GetPdgCode() == 3334 && | |
3029 | mcGdMotherNegV0Dghter ->GetPdgCode() == 3334 ) {lAssoOmegaMinus = kTRUE; | |
3030 | cascadeMass = 1.672; | |
3031 | nAssoOmegaMinus++; } | |
3032 | else if( mcMotherBach ->GetPdgCode() == -3334 && | |
3033 | mcGdMotherPosV0Dghter ->GetPdgCode() == -3334 && | |
3034 | mcGdMotherNegV0Dghter ->GetPdgCode() == -3334 ) {lAssoOmegaPlus = kTRUE; | |
3035 | cascadeMass = 1.672; | |
3036 | nAssoOmegaPlus++; } | |
3037 | ||
3038 | lmcPt = mcMotherBach->Pt(); | |
3039 | lmcRapCasc = 0.5*TMath::Log( (mcMotherBach->E() + mcMotherBach->Pz()) / (mcMotherBach->E() - mcMotherBach->Pz() +1.e-13) ); | |
3040 | lmcEta = mcMotherBach->Eta(); | |
3041 | Float_t decayCascX = mcBach->Xv(); | |
3042 | Float_t decayCascY = mcBach->Yv(); | |
3043 | lmcTransvRadius = TMath::Sqrt(decayCascX*decayCascX+decayCascY*decayCascY); // decay point of Xi, = the production vertex of Bachelor ... | |
3044 | TVector3 lmcTVect3Mom( mcMotherBach->Px(), mcMotherBach->Py(), mcMotherBach->Pz() ); | |
3045 | Double_t xiMomX = xiAOD->MomXiX(); | |
3046 | Double_t xiMomY = xiAOD->MomXiY(); | |
3047 | Double_t xiMomZ = xiAOD->MomXiZ(); | |
3048 | lrecoPt = TMath::Sqrt( xiMomX*xiMomX + xiMomY*xiMomY ); | |
3049 | lrecoTransvRadius = TMath::Sqrt( xiAOD->DecayVertexXiX() * xiAOD->DecayVertexXiX() + xiAOD->DecayVertexXiY() * xiAOD->DecayVertexXiY() ); | |
3050 | TVector3 lrecoTVect3Mom( xiMomX, xiMomY, xiMomZ ); | |
3051 | lDeltaPhiMcReco = lmcTVect3Mom.DeltaPhi( lrecoTVect3Mom ) * 180.0/TMath::Pi(); | |
3052 | lmcPtPosV0Dghter = mcPosV0Dghter->Pt() ; | |
3053 | lmcPtNegV0Dghter = mcNegV0Dghter->Pt(); | |
3054 | lrecoP = TMath::Sqrt( xiMomX*xiMomX + xiMomY*xiMomY + xiMomZ*xiMomZ );; | |
3055 | Double_t lV0momX = xiAOD->MomV0X(); | |
3056 | Double_t lV0momY = xiAOD->MomV0Y(); | |
3057 | Double_t lV0momZ = xiAOD->MomV0Z(); | |
3058 | lV0mom = TMath::Sqrt(TMath::Power(lV0momX,2)+TMath::Power(lV0momY,2)+TMath::Power(lV0momZ,2)); | |
3059 | Double_t lBachMomX = xiAOD->MomBachX(); | |
3060 | Double_t lBachMomY = xiAOD->MomBachY(); | |
3061 | lBachTransvMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY ); | |
3062 | Double_t lV0NMomX = xiAOD->MomNegX(); | |
3063 | Double_t lV0NMomY = xiAOD->MomNegY(); | |
3064 | Double_t lV0PMomX = xiAOD->MomPosX(); | |
3065 | Double_t lV0PMomY = xiAOD->MomPosY(); | |
3066 | lnTrackTransvMom = TMath::Sqrt( lV0NMomX*lV0NMomX + lV0NMomY*lV0NMomY ); | |
3067 | lpTrackTransvMom = TMath::Sqrt( lV0PMomX*lV0PMomX + lV0PMomY*lV0PMomY ); | |
3068 | ||
3069 | } | |
3070 | ||
3071 | lXiRadius = TMath::Sqrt( lPosXi[0]*lPosXi[0] + lPosXi[1]*lPosXi[1] ); | |
3072 | lV0RadiusXi = TMath::Sqrt( lPosV0Xi[0]*lPosV0Xi[0] + lPosV0Xi[1]*lPosV0Xi[1] ); | |
3073 | ||
3074 | // - Cut on pt of the three daughter tracks | |
3075 | if (lBachTransvMom<fMinPtCutOnDaughterTracks) continue; | |
3076 | if (lpTrackTransvMom<fMinPtCutOnDaughterTracks) continue; | |
3077 | if (lnTrackTransvMom<fMinPtCutOnDaughterTracks) continue; | |
3078 | ||
3079 | // - Cut on pseudorapidity of the three daughter tracks | |
3080 | if (TMath::Abs(etaBach)>fEtaCutOnDaughterTracks) continue; | |
3081 | if (TMath::Abs(etaPos)>fEtaCutOnDaughterTracks) continue; | |
3082 | if (TMath::Abs(etaNeg)>fEtaCutOnDaughterTracks) continue; | |
3083 | ||
3084 | // - Extra-selection for cascade candidates | |
3085 | if (fkExtraSelections) { | |
c06f2450 | 3086 | if (lDcaXiDaughters > 0.3) continue; // in AliCascadeVertexer |
3087 | if (lXiCosineOfPointingAngle < 0.999 ) continue; // in AliCascadeVertexer | |
3088 | if (lDcaV0ToPrimVertexXi < 0.05) continue; // in AliCascadeVertexer | |
3089 | if (lDcaBachToPrimVertexXi < 0.03) continue; // in AliCascadeVertexer | |
3090 | if (lDcaV0DaughtersXi > 1.) continue; // in AliV0vertexer | |
3091 | if ((fCollidingSystem == "pp") && (lV0CosineOfPointingAngleXi < 0.998)) continue; // in AliV0vertexer | |
3092 | if ((fCollidingSystem == "pPb") && (lV0CosineOfPointingAngle < 0.998)) continue; // in AliV0vertexer | |
3093 | if (lDcaPosToPrimVertexXi < 0.1) continue; // in AliV0vertexer | |
3094 | if (lDcaNegToPrimVertexXi < 0.1) continue; // in AliV0vertexer | |
3095 | if (lXiRadius < .9) continue; // in AliCascadeVertexer | |
3096 | if (lV0RadiusXi < 0.9) continue; // in AliV0vertexer | |
c683985a | 3097 | } |
3098 | ||
3099 | //------------------------- | |
3100 | // - Fill combined PID TH1s | |
3101 | if( lChargeXi < 0 && lIsBachelorPion ) fHistMassWithCombPIDXiMinus ->Fill( lInvMassXiMinus ); | |
3102 | if( lChargeXi > 0 && lIsBachelorPion ) fHistMassWithCombPIDXiPlus ->Fill( lInvMassXiPlus ); | |
3103 | if( lChargeXi < 0 && lIsBachelorKaon ) fHistMassWithCombPIDOmegaMinus ->Fill( lInvMassOmegaMinus ); | |
3104 | if( lChargeXi > 0 && lIsBachelorKaon ) fHistMassWithCombPIDOmegaPlus ->Fill( lInvMassOmegaPlus ); | |
3105 | if( lChargeXi < 0 ) fHistMassXiMinus ->Fill( lInvMassXiMinus ); | |
3106 | if( lChargeXi > 0 ) fHistMassXiPlus ->Fill( lInvMassXiPlus ); | |
3107 | if( lChargeXi < 0 ) fHistMassOmegaMinus ->Fill( lInvMassOmegaMinus ); | |
3108 | if( lChargeXi > 0 ) fHistMassOmegaPlus ->Fill( lInvMassOmegaPlus ); | |
3109 | if(lIsBachelorPion) f2dHistPIDprobaPionVsMCPtBach->Fill( lmcPtBach, ppionBach ); | |
3110 | if(lIsBachelorKaon) f2dHistPIDprobaKaonVsMCPtBach->Fill( lmcPtBach, pkaonBach ); | |
3111 | if( lChargeXi < 0 && lIsBachelorMCPiMinus ) fHistMassWithMcPIDXiMinus ->Fill( lInvMassXiMinus ); | |
3112 | if( lChargeXi > 0 && lIsBachelorMCPiPlus ) fHistMassWithMcPIDXiPlus ->Fill( lInvMassXiPlus ); | |
3113 | if( lChargeXi < 0 && lIsBachelorMCKMinus ) fHistMassWithMcPIDOmegaMinus ->Fill( lInvMassOmegaMinus ); | |
3114 | if( lChargeXi > 0 && lIsBachelorMCKPlus ) fHistMassWithMcPIDOmegaPlus ->Fill( lInvMassOmegaPlus ); | |
3115 | ||
3116 | ||
3117 | // - No association, skip the rest of the code | |
3118 | if(!lAssoXiMinus && !lAssoXiPlus && !lAssoOmegaMinus && !lAssoOmegaPlus) continue; | |
3119 | ||
3120 | //-------------- | |
3121 | // - Proper time | |
3122 | // For cascade (reconstructed) | |
3123 | Double_t lctau = TMath::Sqrt(TMath::Power((lPosXi[0]-lBestPrimaryVtxPos[0]),2)+TMath::Power((lPosXi[1]-lBestPrimaryVtxPos[1]),2)+TMath::Power((lPosXi[2]-lBestPrimaryVtxPos[2]),2)); | |
3124 | if (lrecoP!=0) lctau = lctau*cascadeMass/lrecoP; | |
3125 | else lctau = -1.; | |
3126 | // For Lambda (reconstructed) | |
3127 | Float_t lambdaMass = 1.115683; // PDG mass | |
3128 | Float_t distV0Xi = TMath::Sqrt(TMath::Power((lPosV0Xi[0]-lPosXi[0]),2)+TMath::Power((lPosV0Xi[1]-lPosXi[1]),2)+TMath::Power((lPosV0Xi[2]-lPosXi[2]),2)); | |
3129 | Float_t lctauV0 = -1.; | |
3130 | if (lV0mom!=0) lctauV0 = distV0Xi*lambdaMass/lV0mom; | |
3131 | // Distance | |
3132 | Float_t distTV0Xi = TMath::Sqrt(TMath::Power((lPosV0Xi[0]-lPosXi[0]),2)+TMath::Power((lPosV0Xi[1]-lPosXi[1]),2)); | |
3133 | ||
3134 | //------------------------------------------------------------ | |
3135 | // - Fill histos for the cascade candidates associated with MC | |
3136 | if( lChargeXi < 0 && lAssoXiMinus){ | |
3137 | fHistAsMCMassXiMinus ->Fill( lInvMassXiMinus ); | |
3138 | if(lIsBachelorPion) f2dHistAsMCandCombPIDGenPtVsGenYXiMinus->Fill( lmcPt, lmcRapCasc ); | |
3139 | f2dHistAsMCGenPtVsGenYXiMinus ->Fill( lmcPt, lmcRapCasc); | |
3140 | fHistAsMCGenEtaXiMinus ->Fill( lmcEta ); | |
3141 | f2dHistAsMCResPtXiMinus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt ); | |
3142 | f2dHistAsMCResRXiMinus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius ); | |
3143 | f2dHistAsMCResPhiXiMinus ->Fill( lmcPt, lDeltaPhiMcReco ); | |
3144 | f2dHistAsMCptProtonMCptXiMinus->Fill(lmcPt,lmcPtPosV0Dghter); | |
3145 | fHistV0CosineOfPointingAnglevsPtXi->Fill(lmcPt,lV0CosineOfPointingAngle); | |
3146 | } | |
3147 | else if( lChargeXi > 0 && lAssoXiPlus){ | |
3148 | fHistAsMCMassXiPlus ->Fill( lInvMassXiPlus ); | |
3149 | if(lIsBachelorPion) f2dHistAsMCandCombPIDGenPtVsGenYXiPlus->Fill( lmcPt, lmcRapCasc ); | |
3150 | f2dHistAsMCGenPtVsGenYXiPlus ->Fill( lmcPt, lmcRapCasc); | |
3151 | fHistAsMCGenEtaXiPlus ->Fill( lmcEta ); | |
3152 | f2dHistAsMCResPtXiPlus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt ); | |
3153 | f2dHistAsMCResRXiPlus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius ); | |
3154 | f2dHistAsMCResPhiXiPlus ->Fill( lmcPt, lDeltaPhiMcReco ); | |
3155 | f2dHistAsMCptAntiprotonMCptXiPlus->Fill(lmcPt,lmcPtNegV0Dghter); | |
3156 | fHistV0CosineOfPointingAnglevsPtXi->Fill(lmcPt,lV0CosineOfPointingAngle); | |
3157 | } | |
3158 | else if( lChargeXi < 0 && lAssoOmegaMinus){ | |
3159 | fHistAsMCMassOmegaMinus ->Fill( lInvMassOmegaMinus ); | |
3160 | if(lIsBachelorKaon) f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus->Fill( lmcPt, lmcRapCasc ); | |
3161 | f2dHistAsMCGenPtVsGenYOmegaMinus ->Fill( lmcPt, lmcRapCasc ); | |
3162 | fHistAsMCGenEtaOmegaMinus ->Fill( lmcEta ); | |
3163 | f2dHistAsMCResPtOmegaMinus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt ); | |
3164 | f2dHistAsMCResROmegaMinus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius ); | |
3165 | f2dHistAsMCResPhiOmegaMinus ->Fill( lmcPt, lDeltaPhiMcReco ); | |
3166 | f2dHistAsMCptProtonMCptOmegaMinus->Fill(lmcPt,lmcPtPosV0Dghter); | |
3167 | fHistV0CosineOfPointingAnglevsPtOmega->Fill(lmcPt,lV0CosineOfPointingAngle); | |
3168 | } | |
3169 | else if( lChargeXi > 0 && lAssoOmegaPlus){ | |
3170 | fHistAsMCMassOmegaPlus ->Fill( lInvMassOmegaPlus ); | |
3171 | if(lIsBachelorKaon) f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus->Fill( lmcPt, lmcRapCasc ); | |
3172 | f2dHistAsMCGenPtVsGenYOmegaPlus ->Fill( lmcPt, lmcRapCasc ); | |
3173 | fHistAsMCGenEtaOmegaPlus ->Fill( lmcEta ); | |
3174 | f2dHistAsMCResPtOmegaPlus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt ); | |
3175 | f2dHistAsMCResROmegaPlus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius ); | |
3176 | f2dHistAsMCResPhiOmegaPlus ->Fill( lmcPt, lDeltaPhiMcReco ); | |
3177 | f2dHistAsMCptAntiprotonMCptOmegaPlus->Fill(lmcPt,lmcPtNegV0Dghter); | |
3178 | fHistV0CosineOfPointingAnglevsPtOmega->Fill(lmcPt,lV0CosineOfPointingAngle); | |
3179 | } | |
3180 | fHistV0toXiCosineOfPointingAngle->Fill(lV0CosineOfPointingAngleXi); | |
3181 | ||
3182 | //------------------ | |
3183 | // - Fill containers | |
3184 | ||
3185 | // - Filling the AliCFContainer (optimisation of topological selections + systematics) | |
3186 | Double_t lContainerCutVars[19] = {0.0}; | |
3187 | lContainerCutVars[0] = lDcaXiDaughters; | |
3188 | lContainerCutVars[1] = lDcaBachToPrimVertexXi; | |
3189 | lContainerCutVars[2] = lXiCosineOfPointingAngle; | |
3190 | lContainerCutVars[3] = lXiRadius; | |
3191 | lContainerCutVars[4] = lInvMassLambdaAsCascDghter; | |
3192 | lContainerCutVars[5] = lDcaV0DaughtersXi; | |
c06f2450 | 3193 | if (fCollidingSystem == "pp") lContainerCutVars[6] = lV0CosineOfPointingAngleXi; |
3194 | else if (fCollidingSystem == "pPb") lContainerCutVars[6] = lV0CosineOfPointingAngle; | |
c683985a | 3195 | lContainerCutVars[7] = lV0RadiusXi; |
3196 | lContainerCutVars[8] = lDcaV0ToPrimVertexXi; | |
3197 | lContainerCutVars[9] = lDcaPosToPrimVertexXi; | |
3198 | lContainerCutVars[10] = lDcaNegToPrimVertexXi; | |
3199 | lContainerCutVars[13] = lmcPt; | |
3200 | lContainerCutVars[16] = lctau; | |
3201 | lContainerCutVars[17] = lctauV0; | |
3202 | lContainerCutVars[18] = distTV0Xi; | |
3203 | // All cases should be covered below | |
3204 | if( lChargeXi < 0 && lAssoXiMinus ) { | |
3205 | lContainerCutVars[11] = lInvMassXiMinus; | |
3206 | lContainerCutVars[12] = lInvMassOmegaMinus;//1.63; | |
3207 | lContainerCutVars[14] = lmcRapCasc; | |
3208 | lContainerCutVars[15] = -1.; | |
3209 | if ( lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) | |
3210 | fCFContAsCascadeCuts->Fill(lContainerCutVars,0); // for Xi- | |
3211 | } | |
3212 | if( lChargeXi > 0 && lAssoXiPlus ) { | |
3213 | lContainerCutVars[11] = lInvMassXiPlus; | |
3214 | lContainerCutVars[12] = lInvMassOmegaPlus;//1.26; | |
3215 | lContainerCutVars[14] = lmcRapCasc; | |
3216 | lContainerCutVars[15] = -1.; | |
3217 | if ( lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) | |
3218 | fCFContAsCascadeCuts->Fill(lContainerCutVars,1); // for Xi+ | |
3219 | } | |
3220 | if( lChargeXi < 0 && lAssoOmegaMinus ) { | |
3221 | lContainerCutVars[11] = lInvMassXiMinus;//1.63; | |
3222 | lContainerCutVars[12] = lInvMassOmegaMinus; | |
3223 | lContainerCutVars[14] = -1.; | |
3224 | lContainerCutVars[15] = lmcRapCasc; | |
3225 | if ( lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) | |
3226 | fCFContAsCascadeCuts->Fill(lContainerCutVars,2); // for Omega- | |
3227 | } | |
3228 | if( lChargeXi > 0 && lAssoOmegaPlus ) { | |
3229 | lContainerCutVars[11] = lInvMassXiPlus;//1.26; | |
3230 | lContainerCutVars[12] = lInvMassOmegaPlus; | |
3231 | lContainerCutVars[14] = -1.; | |
3232 | lContainerCutVars[15] = lmcRapCasc; | |
3233 | if ( lIsBachelorKaonForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) | |
3234 | fCFContAsCascadeCuts->Fill(lContainerCutVars,3); // for Omega+ | |
3235 | } | |
3236 | ||
3237 | // - Filling the AliCFContainers related to PID | |
3238 | Double_t lContainerPIDVars[3] = {0.0}; | |
3239 | ||
3240 | // Xi Minus | |
3241 | if( lChargeXi < 0 && lAssoXiMinus ) { | |
3242 | lContainerPIDVars[0] = lmcPt; | |
3243 | lContainerPIDVars[1] = lInvMassXiMinus; | |
3244 | lContainerPIDVars[2] = lmcRapCasc; | |
3245 | // No PID | |
3246 | fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 0); // No PID | |
3247 | // TPC PID | |
3248 | if( lIsBachelorPionForTPC ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track | |
3249 | if( lIsBachelorPionForTPC && lIsPosProtonForTPC ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks | |
3250 | if( lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks | |
3251 | // Combined PID | |
3252 | if( lIsBachelorPion ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor | |
3253 | if( lIsBachelorPion && lIsPosInXiProton ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon | |
3254 | if( lIsBachelorPion && lIsPosInXiProton && lIsNegInXiPion ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson | |
3255 | } | |
3256 | lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.; | |
3257 | ||
3258 | // Xi Plus | |
3259 | if( lChargeXi > 0 && lAssoXiPlus ) { | |
3260 | lContainerPIDVars[0] = lmcPt; | |
3261 | lContainerPIDVars[1] = lInvMassXiPlus; | |
3262 | lContainerPIDVars[2] = lmcRapCasc; | |
3263 | // No PID | |
3264 | fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 0); // No PID | |
3265 | // TPC PID | |
3266 | if( lIsBachelorPionForTPC ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track | |
3267 | if( lIsBachelorPionForTPC && lIsNegProtonForTPC ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks | |
3268 | if( lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks | |
3269 | // Combined PID | |
3270 | if( lIsBachelorPion ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor | |
3271 | if( lIsBachelorPion && lIsNegInXiProton ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon | |
3272 | if( lIsBachelorPion && lIsNegInXiProton && lIsPosInXiPion ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson | |
3273 | } | |
3274 | lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.; | |
3275 | ||
3276 | // Omega Minus | |
3277 | if( lChargeXi < 0 && lAssoOmegaMinus ) { | |
3278 | lContainerPIDVars[0] = lmcPt; | |
3279 | lContainerPIDVars[1] = lInvMassOmegaMinus; | |
3280 | lContainerPIDVars[2] = lmcRapCasc; | |
3281 | // No PID | |
3282 | fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 0); // No PID | |
3283 | // TPC PID | |
3284 | if( lIsBachelorKaonForTPC ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track | |
3285 | if( lIsBachelorKaonForTPC && lIsPosProtonForTPC ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks | |
3286 | if( lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks | |
3287 | // Combined PID | |
3288 | if( lIsBachelorKaon ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor | |
3289 | if( lIsBachelorKaon && lIsPosInOmegaProton ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon | |
3290 | if( lIsBachelorKaon && lIsPosInOmegaProton && lIsNegInOmegaPion ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson | |
3291 | } | |
3292 | lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.; | |
3293 | ||
3294 | // Omega Plus | |
3295 | if( lChargeXi > 0 && lAssoOmegaPlus) { | |
3296 | lContainerPIDVars[0] = lmcPt; | |
3297 | lContainerPIDVars[1] = lInvMassOmegaPlus; | |
3298 | lContainerPIDVars[2] = lmcRapCasc; | |
3299 | // No PID | |
3300 | fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 0); // No PID | |
3301 | // TPC PID | |
3302 | if( lIsBachelorKaonForTPC ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track | |
3303 | if( lIsBachelorKaonForTPC && lIsNegProtonForTPC ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks | |
3304 | if( lIsBachelorKaonForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks | |
3305 | // Combined PID | |
3306 | if( lIsBachelorKaon ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor | |
3307 | if( lIsBachelorKaon && lIsNegInOmegaProton ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon | |
3308 | if( lIsBachelorKaon && lIsNegInOmegaProton && lIsPosInOmegaPion ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson | |
3309 | } | |
3310 | ||
3311 | }// End of loop over reconstructed cascades | |
3312 | ||
3313 | fHistnAssoXiMinus->Fill(nAssoXiMinus); | |
3314 | fHistnAssoXiPlus->Fill(nAssoXiPlus); | |
3315 | fHistnAssoOmegaMinus->Fill(nAssoOmegaMinus); | |
3316 | fHistnAssoOmegaPlus->Fill(nAssoOmegaPlus); | |
3317 | ||
3318 | // Post output data. | |
3319 | PostData(1, fListHistCascade); | |
3320 | PostData(2, fCFContCascadePIDAsXiMinus); | |
3321 | PostData(3, fCFContCascadePIDAsXiPlus); | |
3322 | PostData(4, fCFContCascadePIDAsOmegaMinus); | |
3323 | PostData(5, fCFContCascadePIDAsOmegaPlus); | |
3324 | PostData(6, fCFContAsCascadeCuts); | |
3325 | ||
3326 | } | |
3327 | ||
3328 | ||
3329 | //________________________________________________________________________ | |
3330 | void AliAnalysisTaskCheckPerformanceCascadepp276::Terminate(Option_t *) { | |
3331 | // Draw result to the screen | |
3332 | // Called once at the end of the query | |
3333 | ||
3334 | /* TList *cRetrievedList = 0x0; | |
3335 | cRetrievedList = (TList*)GetOutputData(1); | |
3336 | if(!cRetrievedList) { | |
3337 | Printf("ERROR - AliAnalysisTaskCheckPerformanceCascadepp276 : ouput data container list not available\n"); | |
3338 | return; | |
3339 | } | |
3340 | ||
3341 | fHistTrackMultiplicityBeforeAnySel = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistTrackMultiplicityBeforeAnySel") ); | |
3342 | if (!fHistTrackMultiplicityBeforeAnySel) { | |
3343 | Printf("ERROR - AliAnalysisTaskCheckPerformanceCascadepp276 : fHistTrackMultiplicityBeforeAnySel not available"); | |
3344 | return; | |
3345 | } | |
3346 | ||
3347 | ||
3348 | TCanvas *canCheckPerformanceCascade = new TCanvas("AliAnalysisTaskCheckPerformanceCascadepp276","Multiplicity",10,10,510,510); | |
3349 | canCheckPerformanceCascade->cd(1)->SetLogy(); | |
3350 | ||
3351 | fHistTrackMultiplicityBeforeAnySel->SetMarkerStyle(22); | |
3352 | fHistTrackMultiplicityBeforeAnySel->DrawCopy("E"); | |
3353 | */ | |
3354 | } |