1 /**************************************************************************
2 * Authors : Antonin Maire, Boris Hippolyte *
3 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
14 //-----------------------------------------------------------------
15 // AliAnalysisTaskCheckCascadepp276 class
17 // Origin AliAnalysisTaskCheckCascade which has four roles :
18 // 1. QAing the Cascades from ESD and AOD
19 // Origin: AliAnalysisTaskESDCheckV0 by Boris Hippolyte Nov2007, hippolyt@in2p3.fr
20 // 2. Prepare the plots which stand as raw material for yield extraction (wi/wo PID)
21 // 3. Supply an AliCFContainer meant to define the optimised topological selections
22 // 4. Rough azimuthal correlation study (Eta, Phi)
23 // Adapted to Cascade : A.Maire Mar2008, antonin.maire@ires.in2p3.fr
24 // Modified : A.Maire Mar2010
26 // Adapted to PbPb analysis: M. Nicassio, maria.nicassio@ba.infn.it
28 // - Physics selection moved to the run.C macro
29 // - Centrality selection added (+ setters) and histos
30 // - flag and setters added (CF container usage, vertex range)
31 // - histo added and histo/container binning changed
32 // - protection in the destructor for CAF usage
33 // - AliWarning disabled
34 // - number of tracklets from AOD also
35 // - automatic settings for PID
37 // - proper time histos/container added (V0 and Cascades)
38 // - cosine PA V0 wrt Xi vertex in the container
40 // - re-run V0's and cascade's vertexers (SetCuts instead SetDefaultCuts!!)
41 // - problems of libraries on Grid --> code copied in the task (from AliRoot v5-10-AN
42 // where new pt dependent V0's cosPA cut implemented by Iouri)
43 // - AOD analysis part completed
46 // Adapted to pp 2.76 TeV analysis: D. Colella, domenico.colella@ba.infn.it
48 // - Physics selection re-moved here (mainly for normalization in the efficiency calcuation)
49 // - Centrality selection deleted
52 // Adapted to pPb 5.02 TeV analysis: D. Colella, domenico.colella@ba.infn.it
54 // - Added the parameter fCollidingSystem, to distingish between pp and pPb procedures
59 //-----------------------------------------------------------------
70 #include <Riostream.h>
75 #include "THnSparse.h"
82 #include "AliESDEvent.h"
83 #include "AliAODEvent.h"
84 #include "AliV0vertexer.h"
85 #include "AliCascadeVertexer.h"
86 #include "AliESDtrackCuts.h"
87 #include "AliPIDResponse.h"
89 #include "AliESDVZERO.h"
91 #include "AliInputEventHandler.h"
92 #include "AliAnalysisManager.h"
93 #include "AliMCEventHandler.h"
94 #include "AliESDInputHandler.h"
95 #include "AliAODInputHandler.h"
96 #include "AliCFContainer.h"
97 #include "AliMultiplicity.h"
99 #include "AliESDcascade.h"
100 #include "AliAODcascade.h"
101 #include "AliAODTrack.h"
102 #include "AliAnalysisUtils.h"
104 #include "AliAnalysisTaskCheckCascadepp276.h"
110 ClassImp(AliAnalysisTaskCheckCascadepp276)
114 //________________________________________________________________________
115 AliAnalysisTaskCheckCascadepp276::AliAnalysisTaskCheckCascadepp276()
116 : AliAnalysisTaskSE(),
117 fAnalysisType ("ESD"),
120 fCollidingSystem ("pp"),
122 fkRerunV0CascVertexers (0),
123 fkSDDSelectionOn (kTRUE),
124 fkQualityCutZprimVtxPos (kTRUE),
125 fkQualityCutNoTPConlyPrimVtx(kTRUE),
126 fkQualityCutTPCrefit (kTRUE),
127 fkQualityCutnTPCcls (kTRUE),
128 fkQualityCutPileup (kTRUE),
131 fkExtraSelections (0),
134 fMinPtCutOnDaughterTracks (0),
135 fEtaCutOnDaughterTracks (0),
137 // - Plots initialisation
139 // Cascades multiplicity plots
140 fHistCascadeMultiplicityBeforeAnySel(0),
141 fHistCascadeMultiplicityAfterSDDSel(0),
142 fHistCascadeMultiplicityAfterPhysicsSel(0),
143 fHistCascadeMultiplicityForSelEvtNoTPCOnly(0),
144 fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup(0),
145 fHistCascadeMultiplicityAfterVertexCutSel(0),
146 // Tracks multiplicity plots
147 fHistTrackMultiplicityBeforeAnySel(0),
148 fHistTrackMultiplicityAfterSDDSel(0),
149 fHistTrackMultiplicityAfterPhysicsSel(0),
150 fHistTrackMultiplicityForSelEvtNoTPCOnly(0),
151 fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup(0),
152 fHistTrackMultiplicityAfterVertexCutSel(0),
153 // Vertex position plots (BestVertex)
154 fHistPVx(0), fHistPVy(0), fHistPVz(0),
155 fHistPVxAnalysis(0), fHistPVyAnalysis(0), fHistPVzAnalysis(0),
156 // TPC cluster distributions for daughters
157 fHistPosV0TPCClusters(0),
158 fHistNegV0TPCClusters(0),
159 fHistBachTPCClusters(0),
160 // Cut's variables distributions
162 fHistDcaXiDaughters(0),
163 fHistDcaBachToPrimVertex(0),
164 fHistXiCosineOfPointingAngle(0),
166 fHistMassLambdaAsCascDghter(0),
167 fHistDcaV0DaughtersXi(0),
168 fHistDcaV0ToPrimVertexXi(0),
169 fHistV0CosineOfPointingAngleXi(0),
171 fHistDcaPosToPrimVertexXi(0),
172 fHistDcaNegToPrimVertexXi(0),
173 // Invariant mass distributions
174 fHistMassXiMinus(0), fHistMassXiPlus(0), fHistMassOmegaMinus(0), fHistMassOmegaPlus(0),
175 // Transverse and total momentum distributions
176 fHistXiTransvMom(0), fHistXiTotMom(0), fHistBachTransvMomXi(0), fHistBachTotMomXi(0),
179 fHistV0toXiCosineOfPointingAngle(0),
180 fHistRapXi(0), fHistRapOmega(0),
181 fHistEtaXi(0), fHistEtaBachXi(0), fHistEtaPosXi(0), fHistEtaNegXi(0),
184 f2dHistArmenteros(0),
185 f2dHistEffMassLambdaVsEffMassXiMinus(0), f2dHistEffMassXiVsEffMassOmegaMinus(0),
186 f2dHistEffMassLambdaVsEffMassXiPlus(0), f2dHistEffMassXiVsEffMassOmegaPlus(0),
187 f2dHistXiRadiusVsEffMassXiMinus(0), f2dHistXiRadiusVsEffMassXiPlus(0),
188 f2dHistXiRadiusVsEffMassOmegaMinus(0), f2dHistXiRadiusVsEffMassOmegaPlus(0),
189 f2dHistTPCdEdxOfCascDghters(0),
190 f2dHistDcaXiDaughtersvsInvMass(0),
191 f2dHistDcaBachToPrimVertexvsInvMass(0),
192 f2dHistXiCosineOfPointingAnglevsInvMass(0),
193 f2dHistMassLambdaAsCascDghtervsInvMass(0),
194 f2dHistDcaV0DaughtersXivsInvMass(0),
195 f2dHistDcaV0ToPrimVertexXivsInvMass(0),
196 // Containers for cuts study
197 fCFContCascadePIDXiMinus(0),
198 fCFContCascadePIDXiPlus(0),
199 fCFContCascadePIDOmegaMinus(0),
200 fCFContCascadePIDOmegaPlus(0),
201 fCFContCascadeCuts(0)
205 for(Int_t iV0selIdx = 0; iV0selIdx < 7; iV0selIdx++ ) { fV0Sels [iV0selIdx ] = -1.; }
206 for(Int_t iCascSelIdx = 0; iCascSelIdx < 8; iCascSelIdx++ ) { fCascSels [iCascSelIdx ] = -1.; }
210 //________________________________________________________________________
211 AliAnalysisTaskCheckCascadepp276::AliAnalysisTaskCheckCascadepp276(const char *name)
212 : AliAnalysisTaskSE(name),
213 fAnalysisType ("ESD"),
216 fCollidingSystem ("pp"),
218 fkRerunV0CascVertexers (0),
219 fkSDDSelectionOn (kTRUE),
220 fkQualityCutZprimVtxPos (kTRUE),
221 fkQualityCutNoTPConlyPrimVtx(kTRUE),
222 fkQualityCutTPCrefit (kTRUE),
223 fkQualityCutnTPCcls (kTRUE),
224 fkQualityCutPileup (kTRUE),
227 fkExtraSelections (0),
230 fMinPtCutOnDaughterTracks (0),
231 fEtaCutOnDaughterTracks (0),
233 // - Plots initialisation
236 // Cascades multiplicity plots
237 fHistCascadeMultiplicityBeforeAnySel(0),
238 fHistCascadeMultiplicityAfterSDDSel(0),
239 fHistCascadeMultiplicityAfterPhysicsSel(0),
240 fHistCascadeMultiplicityForSelEvtNoTPCOnly(0),
241 fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup(0),
242 fHistCascadeMultiplicityAfterVertexCutSel(0),
243 // Tracks multiplicity plots
244 fHistTrackMultiplicityBeforeAnySel(0),
245 fHistTrackMultiplicityAfterSDDSel(0),
246 fHistTrackMultiplicityAfterPhysicsSel(0),
247 fHistTrackMultiplicityForSelEvtNoTPCOnly(0),
248 fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup(0),
249 fHistTrackMultiplicityAfterVertexCutSel(0),
250 // Vertex position plots (BestVertex)
251 fHistPVx(0), fHistPVy(0), fHistPVz(0),
252 fHistPVxAnalysis(0), fHistPVyAnalysis(0), fHistPVzAnalysis(0),
253 // TPC cluster distributions for daughters
254 fHistPosV0TPCClusters(0), fHistNegV0TPCClusters(0), fHistBachTPCClusters(0),
255 // Cut's variables distributions
257 fHistDcaXiDaughters(0),
258 fHistDcaBachToPrimVertex(0),
259 fHistXiCosineOfPointingAngle(0),
261 fHistMassLambdaAsCascDghter(0),
262 fHistDcaV0DaughtersXi(0),
263 fHistDcaV0ToPrimVertexXi(0),
264 fHistV0CosineOfPointingAngleXi(0),
266 fHistDcaPosToPrimVertexXi(0),
267 fHistDcaNegToPrimVertexXi(0),
268 // Invariant mass distributions
269 fHistMassXiMinus(0), fHistMassXiPlus(0), fHistMassOmegaMinus(0), fHistMassOmegaPlus(0),
270 // Transverse and total momentum distributions
271 fHistXiTransvMom(0), fHistXiTotMom(0), fHistBachTransvMomXi(0), fHistBachTotMomXi(0),
274 fHistV0toXiCosineOfPointingAngle(0),
275 fHistRapXi(0), fHistRapOmega(0),
276 fHistEtaXi(0), fHistEtaBachXi(0), fHistEtaPosXi(0), fHistEtaNegXi(0),
279 f2dHistArmenteros(0),
280 f2dHistEffMassLambdaVsEffMassXiMinus(0), f2dHistEffMassXiVsEffMassOmegaMinus(0),
281 f2dHistEffMassLambdaVsEffMassXiPlus(0), f2dHistEffMassXiVsEffMassOmegaPlus(0),
282 f2dHistXiRadiusVsEffMassXiMinus(0), f2dHistXiRadiusVsEffMassXiPlus(0),
283 f2dHistXiRadiusVsEffMassOmegaMinus(0), f2dHistXiRadiusVsEffMassOmegaPlus(0),
284 f2dHistTPCdEdxOfCascDghters(0),
285 f2dHistDcaXiDaughtersvsInvMass(0),
286 f2dHistDcaBachToPrimVertexvsInvMass(0),
287 f2dHistXiCosineOfPointingAnglevsInvMass(0),
288 f2dHistMassLambdaAsCascDghtervsInvMass(0),
289 f2dHistDcaV0DaughtersXivsInvMass(0),
290 f2dHistDcaV0ToPrimVertexXivsInvMass(0),
291 // Containers for cuts study
292 fCFContCascadePIDXiMinus(0),
293 fCFContCascadePIDXiPlus(0),
294 fCFContCascadePIDOmegaMinus(0),
295 fCFContCascadePIDOmegaPlus(0),
296 fCFContCascadeCuts(0)
298 //_____Costructor____
300 // Define input and output slots here
301 // Input slot #0 works with a TChain
302 // DefineInput(0, TChain::Class());
303 // Output slot #1 writes into a TList container (cascade)
304 if (fCollidingSystem == "pp") {
305 fV0Sels[0] = 33. ; // max allowed chi2
306 fV0Sels[1] = 0.01; // min allowed impact parameter for the 1st daughter
307 fV0Sels[2] = 0.01; // min allowed impact parameter for the 2nd daughter
308 fV0Sels[3] = 1.5; // max allowed DCA between the daughter tracks
309 fV0Sels[4] = 0.9; // min allowed cosine of V0's pointing angle - This is pT dependent
310 fV0Sels[5] = 0.2; // min radius of the fiducial volume
311 fV0Sels[6] = 200.; // max radius of the fiducial volume
312 fCascSels[0] = 33.; // max allowed chi2 (same as PDC07)
313 fCascSels[1] = 0.01; // min allowed V0 impact parameter
314 fCascSels[2] = 0.008; // "window" around the Lambda mass
315 fCascSels[3] = 0.01; // min allowed bachelor's impact parameter
316 fCascSels[4] = 2.0; // max allowed DCA between the V0 and the bachelor
317 fCascSels[5] = 0.95; // min allowed cosine of the cascade pointing angle
318 fCascSels[6] = 0.2; // min radius of the fiducial volume
319 fCascSels[7] = 100.; // max radius of the fiducial volume
320 } else if (fCollidingSystem == "pPb") {
321 fV0Sels[0] = 33. ; // max allowed chi2
322 fV0Sels[1] = 0.02; // min allowed impact parameter for the 1st daughter (LHC09a4 : 0.05)
323 fV0Sels[2] = 0.02; // min allowed impact parameter for the 2nd daughter (LHC09a4 : 0.05)
324 fV0Sels[3] = 2.0 ; // max allowed DCA between the daughter tracks (LHC09a4 : 0.5)
325 fV0Sels[4] = 0.95; // min allowed cosine of V0's pointing angle (LHC09a4 : 0.99)
326 fV0Sels[5] = 1.0 ; // min radius of the fiducial volume (LHC09a4 : 0.2)
327 fV0Sels[6] = 200. ; // max radius of the fiducial volume (LHC09a4 : 100.0)
328 fCascSels[0] = 33. ; // max allowed chi2 (same as PDC07)
329 fCascSels[1] = 0.05 ; // min allowed V0 impact parameter (PDC07 : 0.05 / LHC09a4 : 0.025 )
330 fCascSels[2] = 0.010; // "window" around the Lambda mass (PDC07 : 0.008 / LHC09a4 : 0.010 )
331 fCascSels[3] = 0.03 ; // min allowed bachelor's impact parameter (PDC07 : 0.035 / LHC09a4 : 0.025 )
332 fCascSels[4] = 2.0 ; // max allowed DCA between the V0 and the bachelor (PDC07 : 0.1 / LHC09a4 : 0.2 )
333 fCascSels[5] = 0.95 ; // min allowed cosine of the cascade pointing angle (PDC07 : 0.9985 / LHC09a4 : 0.998 )
334 fCascSels[6] = 0.4 ; // min radius of the fiducial volume (PDC07 : 0.9 / LHC09a4 : 0.2 )
335 fCascSels[7] = 100. ; // max radius of the fiducial volume (PDC07 : 100 / LHC09a4 : 100 )
337 // Output slot #0 writes into a TList container (Cascade)
338 DefineOutput(1, TList::Class());
339 DefineOutput(2, AliCFContainer::Class());
340 DefineOutput(3, AliCFContainer::Class());
341 DefineOutput(4, AliCFContainer::Class());
342 DefineOutput(5, AliCFContainer::Class());
343 DefineOutput(6, AliCFContainer::Class());
344 AliLog::SetClassDebugLevel("AliAnalysisTaskCheckCascadepp276",1);
348 //_____Destructor_____
349 AliAnalysisTaskCheckCascadepp276::~AliAnalysisTaskCheckCascadepp276() {
350 // For all TH1, 2, 3 HnSparse and CFContainer are in the fListCascade TList.
351 // They will be deleted when fListCascade is deleted by the TSelector dtor
352 // Because of TList::SetOwner() ...
353 if (fListHistCascade && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) { delete fListHistCascade; fListHistCascade = 0x0; }
354 if (fCFContCascadePIDXiMinus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) { delete fCFContCascadePIDXiMinus; fCFContCascadePIDXiMinus = 0x0; }
355 if (fCFContCascadePIDXiPlus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) { delete fCFContCascadePIDXiPlus; fCFContCascadePIDXiPlus = 0x0; }
356 if (fCFContCascadePIDOmegaMinus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()){ delete fCFContCascadePIDOmegaMinus; fCFContCascadePIDOmegaMinus = 0x0; }
357 if (fCFContCascadePIDOmegaPlus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) { delete fCFContCascadePIDOmegaPlus; fCFContCascadePIDOmegaPlus = 0x0; }
358 if (fCFContCascadeCuts && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) { delete fCFContCascadeCuts; fCFContCascadeCuts = 0x0; }
359 if (fESDtrackCuts) { delete fESDtrackCuts; fESDtrackCuts = 0x0; }
363 //________________________________________________________________________
364 void AliAnalysisTaskCheckCascadepp276::UserCreateOutputObjects() {
369 fListHistCascade = new TList();
370 fListHistCascade->SetOwner(); // See http://root.cern.ch/root/html/TCollection.html#TCollection:SetOwner
372 //-----------------------------------------------
373 // Particle Identification Setup (new PID object)
374 //-----------------------------------------------
375 AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager();
376 AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
377 fPIDResponse = inputHandler->GetPIDResponse();
378 // Only used to get the number of primary reconstructed tracks
379 if (fAnalysisType == "ESD" && (! fESDtrackCuts )){
380 fESDtrackCuts = new AliESDtrackCuts();
383 //---------------------------------------------------
384 // Initialize cuts to re-run V0 and cascade vertexers
385 //---------------------------------------------------
386 // Not validated; to be checked
387 if (fCollidingSystem == "pp") {
388 fV0Sels[0] = 33. ; // max allowed chi2
389 fV0Sels[1] = 0.01; // min allowed impact parameter for the 1st daughter
390 fV0Sels[2] = 0.01; // min allowed impact parameter for the 2nd daughter
391 fV0Sels[3] = 1.5; // max allowed DCA between the daughter tracks
392 fV0Sels[4] = 0.9; // min allowed cosine of V0's pointing angle
393 fV0Sels[5] = 0.2; // min radius of the fiducial volume
394 fV0Sels[6] = 200.; // max radius of the fiducial volume
395 fCascSels[0] = 33.; // max allowed chi2 (same as PDC07)
396 fCascSels[1] = 0.01; // min allowed V0 impact parameter
397 fCascSels[2] = 0.008; // "window" around the Lambda mass
398 fCascSels[3] = 0.01; // min allowed bachelor's impact parameter
399 fCascSels[4] = 2.0; // max allowed DCA between the V0 and the bachelor
400 fCascSels[5] = 0.95; // min allowed cosine of the cascade pointing angle
401 fCascSels[6] = 0.2; // min radius of the fiducial volume
402 fCascSels[7] = 100.; // max radius of the fiducial volume
403 } else if (fCollidingSystem == "pPb") {
404 fV0Sels[0] = 33. ; // max allowed chi2
405 fV0Sels[1] = 0.02; // min allowed impact parameter for the 1st daughter (LHC09a4 : 0.05)
406 fV0Sels[2] = 0.02; // min allowed impact parameter for the 2nd daughter (LHC09a4 : 0.05)
407 fV0Sels[3] = 2.0 ; // max allowed DCA between the daughter tracks (LHC09a4 : 0.5)
408 fV0Sels[4] = 0.95; // min allowed cosine of V0's pointing angle (LHC09a4 : 0.99)
409 fV0Sels[5] = 1.0 ; // min radius of the fiducial volume (LHC09a4 : 0.2)
410 fV0Sels[6] = 200. ; // max radius of the fiducial volume (LHC09a4 : 100.0)
411 fCascSels[0] = 33. ; // max allowed chi2 (same as PDC07)
412 fCascSels[1] = 0.05 ; // min allowed V0 impact parameter (PDC07 : 0.05 / LHC09a4 : 0.025 )
413 fCascSels[2] = 0.010; // "window" around the Lambda mass (PDC07 : 0.008 / LHC09a4 : 0.010 )
414 fCascSels[3] = 0.03 ; // min allowed bachelor's impact parameter (PDC07 : 0.035 / LHC09a4 : 0.025 )
415 fCascSels[4] = 2.0 ; // max allowed DCA between the V0 and the bachelor (PDC07 : 0.1 / LHC09a4 : 0.2 )
416 fCascSels[5] = 0.95 ; // min allowed cosine of the cascade pointing angle (PDC07 : 0.9985 / LHC09a4 : 0.998 )
417 fCascSels[6] = 0.4 ; // min radius of the fiducial volume (PDC07 : 0.9 / LHC09a4 : 0.2 )
418 fCascSels[7] = 100. ; // max radius of the fiducial volume (PDC07 : 100 / LHC09a4 : 100 )
421 //----------------------
422 // Initialize the histos
423 //----------------------
425 // - Cascades multiplicity plots
426 if(! fHistCascadeMultiplicityBeforeAnySel) {
427 fHistCascadeMultiplicityBeforeAnySel = new TH1F("fHistCascadeMultiplicityBeforeAnySel",
428 "Cascades per event (before any selections);Nbr of Cascades/Evt;Events",
430 fListHistCascade->Add(fHistCascadeMultiplicityBeforeAnySel);
432 if(! fHistCascadeMultiplicityAfterSDDSel) {
433 fHistCascadeMultiplicityAfterSDDSel = new TH1F("fHistCascadeMultiplicityAfterSDDSel",
434 "Cascades per event (after the SDD selection);Nbr of Cascades/Evt;Events",
436 fListHistCascade->Add(fHistCascadeMultiplicityAfterSDDSel);
438 if(! fHistCascadeMultiplicityAfterPhysicsSel) {
439 fHistCascadeMultiplicityAfterPhysicsSel = new TH1F("fHistCascadeMultiplicityAfterPhysicsSel",
440 "Cascades per event (after physics selection);Nbr of Cascades/Evt;Events",
442 fListHistCascade->Add(fHistCascadeMultiplicityAfterPhysicsSel);
444 if(! fHistCascadeMultiplicityForSelEvtNoTPCOnly) {
445 fHistCascadeMultiplicityForSelEvtNoTPCOnly = new TH1F("fHistCascadeMultiplicityForSelEvtNoTPCOnly",
446 "Cascades per event (for selected events with well-established PV);Nbr of Cascades/Evt;Events",
448 fListHistCascade->Add(fHistCascadeMultiplicityForSelEvtNoTPCOnly);
450 if(! fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup) {
451 fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup = new TH1F("fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup",
452 "Cascades per event (for selected events with well-establisched PV and no pile-up);Nbr of Cascades/Evt;Events",
454 fListHistCascade->Add(fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup);
456 if(! fHistCascadeMultiplicityAfterVertexCutSel) {
457 fHistCascadeMultiplicityAfterVertexCutSel = new TH1F("fHistCascadeMultiplicityAfterVertexCutSel",
458 "Cascades per event (after vertex cut selection);Nbr of Cascades/Evt;Events",
460 fListHistCascade->Add(fHistCascadeMultiplicityAfterVertexCutSel);
462 // - Tracks multiplicity plots
463 if(! fHistTrackMultiplicityBeforeAnySel) {
464 fHistTrackMultiplicityBeforeAnySel = new TH1F("fHistTrackMultiplicityBeforeAnySel",
465 "Tracks per event (before any selections);Nbr of Cascades/Evt;Events",
467 fListHistCascade->Add(fHistTrackMultiplicityBeforeAnySel);
469 if(! fHistTrackMultiplicityAfterSDDSel) {
470 fHistTrackMultiplicityAfterSDDSel = new TH1F("fHistTrackMultiplicityAfterSDDSel",
471 "Tracks per event (after the SDD selection);Nbr of Cascades/Evt;Events",
473 fListHistCascade->Add(fHistTrackMultiplicityAfterSDDSel);
475 if(! fHistTrackMultiplicityAfterPhysicsSel) {
476 fHistTrackMultiplicityAfterPhysicsSel = new TH1F("fHistTrackMultiplicityAfterPhysicsSel",
477 "Tracks per event (after physics selection);Nbr of Cascades/Evt;Events",
479 fListHistCascade->Add(fHistTrackMultiplicityAfterPhysicsSel);
481 if(! fHistTrackMultiplicityForSelEvtNoTPCOnly) {
482 fHistTrackMultiplicityForSelEvtNoTPCOnly = new TH1F("fHistTrackMultiplicityForSelEvtNoTPCOnly",
483 "Tracks per event (for selected events with well-established PV);Nbr of Cascades/Evt;Events",
485 fListHistCascade->Add(fHistTrackMultiplicityForSelEvtNoTPCOnly);
487 if(! fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup) {
488 fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = new TH1F("fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup",
489 "Tracks per event (for selected events with well-establisched PV and no pile-up);Nbr of Cascades/Evt;Events",
491 fListHistCascade->Add(fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup);
493 if(! fHistTrackMultiplicityAfterVertexCutSel) {
494 fHistTrackMultiplicityAfterVertexCutSel = new TH1F("fHistTrackMultiplicityAfterVertexCutSel",
495 "Tracks per event (after vertex cut selection);Nbr of Cascades/Evt;Events",
497 fListHistCascade->Add(fHistTrackMultiplicityAfterVertexCutSel);
499 // - Vertex position plots
501 fHistPVx = new TH1F("fHistPVx", "Best PV position in x; x (cm); Events", 2000, -0.5, 0.5);
502 fListHistCascade->Add(fHistPVx);
505 fHistPVy = new TH1F("fHistPVy", "Best PV position in y; y (cm); Events", 2000, -0.5, 0.5);
506 fListHistCascade->Add(fHistPVy);
509 fHistPVz = new TH1F("fHistPVz", "Best PV position in z; z (cm); Events", 400, -20, 20);
510 fListHistCascade->Add(fHistPVz);
512 if(! fHistPVxAnalysis ){
513 fHistPVxAnalysis = new TH1F("fHistPVxAnalysis", "Best PV position in x (after events selections); x (cm); Events", 2000, -0.5, 0.5);
514 fListHistCascade->Add(fHistPVxAnalysis);
516 if(! fHistPVyAnalysis ){
517 fHistPVyAnalysis = new TH1F("fHistPVyAnalysis", "Best PV position in y (after events selections); y (cm); Events", 2000, -0.5, 0.5);
518 fListHistCascade->Add(fHistPVyAnalysis);
520 if(! fHistPVzAnalysis ){
521 fHistPVzAnalysis = new TH1F("fHistPVzAnalysis", "Best PV position in z (after events selections); z (cm); Events", 400, -20, 20);
522 fListHistCascade->Add(fHistPVzAnalysis);
524 // - TPC clusetr sdistributions for daughters (histos for events containing at least ONE CASCADE)
525 if(! fHistPosV0TPCClusters ){
526 fHistPosV0TPCClusters = new TH1F("fHistPosV0TPCClusters", "TPC clusters for Pos. V0 daughter track, in Casc; Nbr of TPC clusters (V0 Pos.); Track counts", 165, 0.0, 165.0);
527 fListHistCascade->Add(fHistPosV0TPCClusters);
529 if(! fHistNegV0TPCClusters ){
530 fHistNegV0TPCClusters = new TH1F("fHistNegV0TPCClusters", "TPC clusters for Neg. V0 daughter track, in Casc; Nbr of TPC clusters (V0 Neg.); Track counts", 165, 0.0, 165.0);
531 fListHistCascade->Add(fHistNegV0TPCClusters);
533 if(! fHistBachTPCClusters ){
534 fHistBachTPCClusters = new TH1F("fHistBachTPCClusters", "TPC clusters for Bachelor track; Nbr of TPC clusters (Bach); Track counts", 165, 0.0, 165.0);
535 fListHistCascade->Add(fHistBachTPCClusters);
537 // - Cut's variables distributions (typical histos for cascades): as example only for the Xi (both particle and anti-particle)
538 if(! fHistEffMassXi) {
539 fHistEffMassXi = new TH1F("fHistEffMassXi", "Xi candidates; Invariant Mass (GeV/c^{2}); Counts", 400, 1.2, 2.0);
540 fListHistCascade->Add(fHistEffMassXi);
542 if(! fHistDcaXiDaughters ){
543 fHistDcaXiDaughters = new TH1F("fHistDcaXiDaughters", "DCA between Xi daughters; DCA (cm); Counts", 210, 0., 2.1);
544 fListHistCascade->Add(fHistDcaXiDaughters);
546 if(! fHistDcaBachToPrimVertex) {
547 fHistDcaBachToPrimVertex = new TH1F("fHistDcaBachToPrimVertex", "Impact parameter of Bach. to Prim. Vertex; DCA (cm); Counts", 250, 0., 0.25);
548 fListHistCascade->Add(fHistDcaBachToPrimVertex);
550 if(! fHistXiCosineOfPointingAngle) {
551 fHistXiCosineOfPointingAngle = new TH1F("fHistXiCosineOfPointingAngle", "Cosine of Xi Pointing Angle; Cos (Xi Point.Angl); Counts", 601, 0.94, 1.0001);
552 fListHistCascade->Add(fHistXiCosineOfPointingAngle);
554 if(! fHistXiRadius ){
555 fHistXiRadius = new TH1F("fHistXiRadius", "Cascade decay transv. radius; r (cm); Counts" , 2050, 0., 205.0);
556 fListHistCascade->Add(fHistXiRadius);
558 if(! fHistMassLambdaAsCascDghter) {
559 fHistMassLambdaAsCascDghter = new TH1F("fHistMassLambdaAsCascDghter", "#Lambda associated to cascade candidates; Eff. Mass (GeV/c^{2}); Counts", 300, 1.0, 1.3);
560 fListHistCascade->Add(fHistMassLambdaAsCascDghter);
562 if(! fHistDcaV0DaughtersXi) {
563 fHistDcaV0DaughtersXi = new TH1F("fHistDcaV0DaughtersXi", "DCA between V0 daughters, in cascade; DCA (cm); Counts", 320, 0., 1.6);
564 fListHistCascade->Add(fHistDcaV0DaughtersXi);
566 if(! fHistDcaV0ToPrimVertexXi) {
567 fHistDcaV0ToPrimVertexXi = new TH1F("fHistDcaV0ToPrimVertexXi", "Impact parameter of V0 to Prim. Vertex, in cascade; DCA (cm); Counts", 200, 0., 1.);
568 fListHistCascade->Add(fHistDcaV0ToPrimVertexXi);
570 if(! fHistV0CosineOfPointingAngleXi) {
571 fHistV0CosineOfPointingAngleXi = new TH1F("fHistV0CosineOfPointingAngleXi", "Cosine of V0 Pointing Angle, in cascade; Cos(V0 Point. Angl); Counts", 201, 0.8, 1.001);
572 fListHistCascade->Add(fHistV0CosineOfPointingAngleXi);
574 if(! fHistV0RadiusXi) {
575 fHistV0RadiusXi = new TH1F("fHistV0RadiusXi", "V0 decay radius, in cascade; radius (cm); Counts", 2050, 0., 205.0);
576 fListHistCascade->Add(fHistV0RadiusXi);
578 if(! fHistDcaPosToPrimVertexXi) {
579 fHistDcaPosToPrimVertexXi = new TH1F("fHistDcaPosToPrimVertexXi", "Impact parameter of V0 pos daughter to Prim. Vertex; DCA (cm); Counts", 300, 0, 3);
580 fListHistCascade->Add(fHistDcaPosToPrimVertexXi);
582 if(! fHistDcaNegToPrimVertexXi) {
583 fHistDcaNegToPrimVertexXi = new TH1F("fHistDcaNegToPrimVertexXi", "Impact parameter of V0 neg daughter to Prim. Vertex; DCA (cm); Counts", 300, 0, 3);
584 fListHistCascade->Add(fHistDcaNegToPrimVertexXi);
586 // - Effective mass histos for cascades.
588 if(! fHistMassXiMinus) {
589 fHistMassXiMinus = new TH1F("fHistMassXiMinus", "#Xi^{-} candidates; M( #Lambda , #pi^{-} ) (GeV/c^{2});Counts", 400, 1.2, 2.0);
590 fListHistCascade->Add(fHistMassXiMinus);
592 if(! fHistMassXiPlus) {
593 fHistMassXiPlus = new TH1F("fHistMassXiPlus", "#Xi^{+} candidates; M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2});Counts", 400, 1.2, 2.0);
594 fListHistCascade->Add(fHistMassXiPlus);
596 if(! fHistMassOmegaMinus) {
597 fHistMassOmegaMinus = new TH1F("fHistMassOmegaMinus", "#Omega^{-} candidates; M( #Lambda , K^{-} ) (GeV/c^{2});Counts", 500, 1.5, 2.5);
598 fListHistCascade->Add(fHistMassOmegaMinus);
600 if(! fHistMassOmegaPlus) {
601 fHistMassOmegaPlus = new TH1F("fHistMassOmegaPlus", "#Omega^{+} candidates;M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5);
602 fListHistCascade->Add(fHistMassOmegaPlus);
604 // - Transverse and total momentum distributions
605 if(! fHistXiTransvMom ){
606 fHistXiTransvMom = new TH1F("fHistXiTransvMom", "#Xi transverse momentum (cand. around the mass peak); p_{t}(#Xi) (GeV/c); Counts", 100, 0.0, 10.0);
607 fListHistCascade->Add(fHistXiTransvMom);
609 if(! fHistXiTotMom ){
610 fHistXiTotMom = new TH1F("fHistXiTotMom", "#Xi momentum norm (cand. around the mass peak); p_{tot}(#Xi) (GeV/c); Counts", 150, 0.0, 15.0);
611 fListHistCascade->Add(fHistXiTotMom);
613 if(! fHistBachTransvMomXi ){
614 fHistBachTransvMomXi = new TH1F("fHistBachTransvMomXi", "#Xi Bach. transverse momentum (cand. around the mass peak); p_{t}(Bach.) (GeV/c); Counts", 100, 0.0, 5.0);
615 fListHistCascade->Add(fHistBachTransvMomXi);
617 if(! fHistBachTotMomXi ){
618 fHistBachTotMomXi = new TH1F("fHistBachTotMomXi", "#Xi Bach. momentum norm (cand. around the mass peak); p_{tot}(Bach.) (GeV/c); Counts", 100, 0.0, 5.0);
619 fListHistCascade->Add(fHistBachTotMomXi);
623 if(! fHistChargeXi ){
624 fHistChargeXi = new TH1F("fHistChargeXi", "Charge of Xi candidates; Sign; Counts", 5, -2.0, 3.0);
625 fListHistCascade->Add(fHistChargeXi);
627 if(! fHistV0toXiCosineOfPointingAngle) {
628 fHistV0toXiCosineOfPointingAngle = new TH1F("fHistV0toXiCosineOfPointingAngle", "Cos. of V0 Ptng Angl / Xi vtx ; Cos(V0 Point. Angl / Xi vtx); Counts", 1101, 0.89, 1.0001);
629 fListHistCascade->Add(fHistV0toXiCosineOfPointingAngle);
632 fHistRapXi = new TH1F("fHistRapXi", "Rapidity of #Xi candidates (around the mass peak); y; Counts", 20, -1.0, 1.0);
633 fListHistCascade->Add(fHistRapXi);
635 if(! fHistRapOmega ){
636 fHistRapOmega = new TH1F("fHistRapOmega", "Rapidity of #Omega candidates (around the mass peak); y; Counts", 20, -1.0, 1.0);
637 fListHistCascade->Add(fHistRapOmega);
640 fHistEtaXi = new TH1F("fHistEtaXi", "Pseudo-rap. of #Xi candidates (around the mass peak); #eta; Counts", 20, -1.0, 1.0);
641 fListHistCascade->Add(fHistEtaXi);
643 if(! fHistEtaBachXi){
644 fHistEtaBachXi = new TH1F("fHistEtaBachXi", "Pseudo-rap. of #Xi bachelor; #eta; Counts", 40, -2.0, 2.0);
645 fListHistCascade->Add(fHistEtaBachXi);
648 fHistEtaPosXi = new TH1F("fHistEtaPosXi", "Pseudo-rap. of #Xi positive meson daughter; #eta; Counts", 40, -2.0, 2.0);
649 fListHistCascade->Add(fHistEtaPosXi);
652 fHistEtaNegXi = new TH1F("fHistEtaNegXi", "Pseudo-rap. of #Xi negative meson daughter; #eta; Counts", 40, -2.0, 2.0);
653 fListHistCascade->Add(fHistEtaNegXi);
656 fHistThetaXi = new TH1F("fHistThetaXi", "#theta of #Xi candidates (around the mass peak); #theta (deg); Counts", 180, 0., 180.0);
657 fListHistCascade->Add(fHistThetaXi);
660 fHistPhiXi = new TH1F("fHistPhiXi", "#phi of #Xi candidates (around the mass peak); #phi (deg); Counts", 360, 0., 360.);
661 fListHistCascade->Add(fHistPhiXi);
663 if(! f2dHistArmenteros) {
664 f2dHistArmenteros = new TH2F("f2dHistArmenteros", "#alpha_{Arm}(casc. cand.) Vs Pt_{Arm}(casc. cand.); #alpha_{Arm}; Pt_{Arm} (GeV/c)", 140, -1.2, 1.2, 300, 0., 0.3);
665 fListHistCascade->Add(f2dHistArmenteros);
668 if(! f2dHistEffMassLambdaVsEffMassXiMinus) {
669 f2dHistEffMassLambdaVsEffMassXiMinus = new TH2F("f2dHistEffMassLambdaVsEffMassXiMinus", "M_{#Lambda} Vs M_{#Xi^{-} candidates}; Inv. M_{#Lambda^{0}} (GeV/c^{2}); M( #Lambda , #pi^{-} ) (GeV/c^{2})", 300, 1.1, 1.13, 400, 1.2, 2.0);
670 fListHistCascade->Add(f2dHistEffMassLambdaVsEffMassXiMinus);
672 if(! f2dHistEffMassXiVsEffMassOmegaMinus) {
673 f2dHistEffMassXiVsEffMassOmegaMinus = new TH2F("f2dHistEffMassXiVsEffMassOmegaMinus", "M_{#Xi^{-} candidates} Vs M_{#Omega^{-} candidates}; M( #Lambda , #pi^{-} ) (GeV/c^{2}); M( #Lambda , K^{-} ) (GeV/c^{2})", 400, 1.2, 2.0, 500, 1.5, 2.5);
674 fListHistCascade->Add(f2dHistEffMassXiVsEffMassOmegaMinus);
676 if(! f2dHistEffMassLambdaVsEffMassXiPlus) {
677 f2dHistEffMassLambdaVsEffMassXiPlus = new TH2F("f2dHistEffMassLambdaVsEffMassXiPlus", "M_{#Lambda} Vs M_{#Xi^{+} candidates}; Inv. M_{#Lambda^{0}} (GeV/c^{2}); M( #Lambda , #pi^{+} ) (GeV/c^{2})", 300, 1.1, 1.13, 400, 1.2, 2.0);
678 fListHistCascade->Add(f2dHistEffMassLambdaVsEffMassXiPlus);
680 if(! f2dHistEffMassXiVsEffMassOmegaPlus) {
681 f2dHistEffMassXiVsEffMassOmegaPlus = new TH2F("f2dHistEffMassXiVsEffMassOmegaPlus", "M_{#Xi^{+} candidates} Vs M_{#Omega^{+} candidates}; M( #Lambda , #pi^{+} ) (GeV/c^{2}); M( #Lambda , K^{+} ) (GeV/c^{2})", 400, 1.2, 2.0, 500, 1.5, 2.5);
682 fListHistCascade->Add(f2dHistEffMassXiVsEffMassOmegaPlus);
684 if(! f2dHistXiRadiusVsEffMassXiMinus) {
685 f2dHistXiRadiusVsEffMassXiMinus = new TH2F("f2dHistXiRadiusVsEffMassXiMinus", "Transv. R_{Xi Decay} Vs M_{#Xi^{-} candidates}; r_{cascade} (cm); M( #Lambda , #pi^{-} ) (GeV/c^{2})", 450, 0., 45.0, 400, 1.2, 2.0);
686 fListHistCascade->Add(f2dHistXiRadiusVsEffMassXiMinus);
688 if(! f2dHistXiRadiusVsEffMassXiPlus) {
689 f2dHistXiRadiusVsEffMassXiPlus = new TH2F("f2dHistXiRadiusVsEffMassXiPlus", "Transv. R_{Xi Decay} Vs M_{#Xi^{+} candidates}; r_{cascade} (cm); M( #Lambda , #pi^{+} ) (GeV/c^{2})", 450, 0., 45.0, 400, 1.2, 2.0);
690 fListHistCascade->Add(f2dHistXiRadiusVsEffMassXiPlus);
692 if(! f2dHistXiRadiusVsEffMassOmegaMinus) {
693 f2dHistXiRadiusVsEffMassOmegaMinus = new TH2F("f2dHistXiRadiusVsEffMassOmegaMinus", "Transv. R_{Xi Decay} Vs M_{#Omega^{-} candidates}; r_{cascade} (cm); M( #Lambda , K^{-} ) (GeV/c^{2}) ", 450, 0., 45.0, 500, 1.5, 2.5);
694 fListHistCascade->Add(f2dHistXiRadiusVsEffMassOmegaMinus);
696 if(! f2dHistXiRadiusVsEffMassOmegaPlus) {
697 f2dHistXiRadiusVsEffMassOmegaPlus = new TH2F("f2dHistXiRadiusVsEffMassOmegaPlus", "Transv. R_{Xi Decay} Vs M_{#Omega^{+} candidates}; r_{cascade} (cm); M( #Lambda , K^{+} ) (GeV/c^{2}) ", 450, 0., 45.0, 500, 1.5, 2.5);
698 fListHistCascade->Add(f2dHistXiRadiusVsEffMassOmegaPlus);
700 if(! f2dHistTPCdEdxOfCascDghters){
701 f2dHistTPCdEdxOfCascDghters = new TH2F("f2dHistTPCdEdxOfCascDghters", "TPC dE/dx of the cascade daughters; charge x || #vec{p}_{TPC inner wall}(Casc. daughter) || (GeV/c); TPC signal (ADC)", 2000, -10.0, 10.0, 450, 0., 900.);
702 fListHistCascade->Add(f2dHistTPCdEdxOfCascDghters);
704 if(! f2dHistDcaXiDaughtersvsInvMass){
705 f2dHistDcaXiDaughtersvsInvMass = new TH2F("f2dHistDcaXiDaughtersvsInvMass", "DCA between Xi Daughters; DCA (cm); Number of Cascades", 100, 0., 0.5, 400, 1.2, 2.0);
706 fListHistCascade->Add(f2dHistDcaXiDaughtersvsInvMass);
708 if(! f2dHistDcaBachToPrimVertexvsInvMass) {
709 f2dHistDcaBachToPrimVertexvsInvMass = new TH2F("f2dHistDcaBachToPrimVertexvsInvMass", "DCA of Bach. to Prim. Vertex; DCA (cm); Number of Cascades", 250, 0., 0.25, 400, 1.2, 2.0);
710 fListHistCascade->Add(f2dHistDcaBachToPrimVertexvsInvMass);
712 if(! f2dHistXiCosineOfPointingAnglevsInvMass){
713 f2dHistXiCosineOfPointingAnglevsInvMass = new TH2F("f2dHistXiCosineOfPointingAnglevsInvMass", "Cosine of Xi Pointing Angle; Cos (Xi Point.Angl); Number of Xis", 200, 0.99, 1.0, 400, 1.2, 2.0);
714 fListHistCascade->Add(f2dHistXiCosineOfPointingAnglevsInvMass);
716 if(! f2dHistMassLambdaAsCascDghtervsInvMass){
717 f2dHistMassLambdaAsCascDghtervsInvMass = new TH2F("f2dHistMassLambdaAsCascDghtervsInvMass","#Lambda associated to Casc. candidates; Eff. Mass (GeV/c^{2}); Counts", 300, 1.00, 1.3, 400, 1.2, 2.0);
718 fListHistCascade->Add(f2dHistMassLambdaAsCascDghtervsInvMass);
720 if(! f2dHistDcaV0DaughtersXivsInvMass){
721 f2dHistDcaV0DaughtersXivsInvMass = new TH2F("f2dHistDcaV0DaughtersXivsInvMass", "DCA between V0 daughters, in cascade; DCA (cm); Number of V0s", 120, 0., 0.6, 400, 1.2, 2.0);
722 fListHistCascade->Add(f2dHistDcaV0DaughtersXivsInvMass);
724 if(! f2dHistDcaV0ToPrimVertexXivsInvMass){
725 f2dHistDcaV0ToPrimVertexXivsInvMass = new TH2F("f2dHistDcaV0ToPrimVertexXivsInvMass", "DCA of V0 to Prim. Vertex, in cascade; DCA (cm); Number of Cascades", 200, 0., 1., 400, 1.2, 2.0);
726 fListHistCascade->Add(f2dHistDcaV0ToPrimVertexXivsInvMass);
728 // - CFContainer PID study Xi minus
729 if(!fCFContCascadePIDXiMinus) {
730 const Int_t lNbSteps = 7 ;
731 const Int_t lNbVariables = 3 ;
732 //Array for the number of bins in each dimension :
733 Int_t lNbBinsPerVar[3] = {0};
734 lNbBinsPerVar[0] = 100;
735 lNbBinsPerVar[1] = 800;
736 lNbBinsPerVar[2] = 22;
737 if (fCollidingSystem == "pp" && fkSDDSelectionOn) {
738 if (fwithSDD) fCFContCascadePIDXiMinus = new AliCFContainer(Form("fCFContCascadePIDXiMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDon",
739 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
740 "Pt_{cascade} Vs M_{#Xi^{-} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );
741 else if (!fwithSDD) fCFContCascadePIDXiMinus = new AliCFContainer(Form("fCFContCascadePIDXiMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDoff",
742 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
743 "Pt_{cascade} Vs M_{#Xi^{-} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );
744 } else if (fCollidingSystem == "pp" && !fkSDDSelectionOn) {
745 fCFContCascadePIDXiMinus = new AliCFContainer(Form("fCFContCascadePIDXiMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_woSDD",
746 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
747 "Pt_{cascade} Vs M_{#Xi^{-} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );
748 } else if (fCollidingSystem == "pPb") {
749 fCFContCascadePIDXiMinus = new AliCFContainer(Form("fCFContCascadePIDXiMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",
750 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
751 "Pt_{cascade} Vs M_{#Xi^{-} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );
753 //Setting the bin limits
754 fCFContCascadePIDXiMinus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)
755 fCFContCascadePIDXiMinus->SetBinLimits(1, 1.2 , 2.0 ); // Xi Effective mass
756 fCFContCascadePIDXiMinus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity
757 //Setting the step title : one per PID case
758 fCFContCascadePIDXiMinus->SetStepTitle(0, "No PID");
759 fCFContCascadePIDXiMinus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");
760 fCFContCascadePIDXiMinus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");
761 fCFContCascadePIDXiMinus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");
762 fCFContCascadePIDXiMinus->SetStepTitle(4, "Comb. PID / Bachelor");
763 fCFContCascadePIDXiMinus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");
764 fCFContCascadePIDXiMinus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");
765 //Setting the variable title, per axis
766 fCFContCascadePIDXiMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
767 fCFContCascadePIDXiMinus->SetVarTitle(1, "M( #Lambda , #pi^{-} ) (GeV/c^{2})");
768 fCFContCascadePIDXiMinus->SetVarTitle(2, "Y_{#Xi}");
769 fListHistCascade->Add(fCFContCascadePIDXiMinus);
771 // - CFContainer PID study Xi plus
772 if (!fCFContCascadePIDXiPlus) {
773 const Int_t lNbSteps = 7 ;
774 const Int_t lNbVariables = 3 ;
775 //Array for the number of bins in each dimension :
776 Int_t lNbBinsPerVar[3] = {0};
777 lNbBinsPerVar[0] = 100;
778 lNbBinsPerVar[1] = 800;
779 lNbBinsPerVar[2] = 22;
780 if (fCollidingSystem == "pp" && fkSDDSelectionOn) {
781 if (fwithSDD) fCFContCascadePIDXiPlus = new AliCFContainer(Form("fCFContCascadePIDXiPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDon",
782 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
783 "Pt_{cascade} Vs M_{#Xi^{+} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar);
784 else if (!fwithSDD) fCFContCascadePIDXiPlus = new AliCFContainer(Form("fCFContCascadePIDXiPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDoff",
785 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
786 "Pt_{cascade} Vs M_{#Xi^{+} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar);
787 } else if (fCollidingSystem == "pp" && !fkSDDSelectionOn) {
788 fCFContCascadePIDXiPlus = new AliCFContainer(Form("fCFContCascadePIDXiPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_woSDD",
789 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
790 "Pt_{cascade} Vs M_{#Xi^{+} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar);
791 } else if (fCollidingSystem == "pPb") {
792 fCFContCascadePIDXiPlus = new AliCFContainer(Form("fCFContCascadePIDXiPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",
793 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
794 "Pt_{cascade} Vs M_{#Xi^{+} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar);
796 //Setting the bin limits
797 fCFContCascadePIDXiPlus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)
798 fCFContCascadePIDXiPlus->SetBinLimits(1, 1.2 , 2.0 ); // Xi Effective mass
799 fCFContCascadePIDXiPlus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity
800 //Setting the step title : one per PID case
801 fCFContCascadePIDXiPlus->SetStepTitle(0, "No PID");
802 fCFContCascadePIDXiPlus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");
803 fCFContCascadePIDXiPlus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");
804 fCFContCascadePIDXiPlus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");
805 fCFContCascadePIDXiPlus->SetStepTitle(4, "Comb. PID / Bachelor");
806 fCFContCascadePIDXiPlus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");
807 fCFContCascadePIDXiPlus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");
808 //Setting the variable title, per axis
809 fCFContCascadePIDXiPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
810 fCFContCascadePIDXiPlus->SetVarTitle(1, "M( #Lambda , #pi^{+} ) (GeV/c^{2})");
811 fCFContCascadePIDXiPlus->SetVarTitle(2, "Y_{#Xi}");
812 fListHistCascade->Add(fCFContCascadePIDXiPlus);
814 // - CFContainer PID study Omega minus
815 if(!fCFContCascadePIDOmegaMinus) {
816 const Int_t lNbSteps = 7 ;
817 const Int_t lNbVariables = 3 ;
818 //Array for the number of bins in each dimension :
819 Int_t lNbBinsPerVar[3] = {0};
820 lNbBinsPerVar[0] = 100;
821 lNbBinsPerVar[1] = 1000;
822 lNbBinsPerVar[2] = 22;
823 if (fCollidingSystem == "pp" && fkSDDSelectionOn) {
824 if (fwithSDD) fCFContCascadePIDOmegaMinus = new AliCFContainer(Form("fCFContCascadePIDOmegaMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDon",
825 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
826 "Pt_{cascade} Vs M_{#Omega^{-} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
827 else if (!fwithSDD) fCFContCascadePIDOmegaMinus = new AliCFContainer(Form("fCFContCascadePIDOmegaMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDoff",
828 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
829 "Pt_{cascade} Vs M_{#Omega^{-} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
830 } else if (!fkSDDSelectionOn) {
831 fCFContCascadePIDOmegaMinus = new AliCFContainer(Form("fCFContCascadePIDOmegaMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_woSDD",
832 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
833 "Pt_{cascade} Vs M_{#Omega^{-} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
834 } else if (fCollidingSystem == "pPb") {
835 fCFContCascadePIDOmegaMinus = new AliCFContainer(Form("fCFContCascadePIDOmegaMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",
836 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
837 "Pt_{cascade} Vs M_{#Omega^{-} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
839 //Setting the bin limits
840 fCFContCascadePIDOmegaMinus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)
841 fCFContCascadePIDOmegaMinus->SetBinLimits(1, 1.5 , 2.5 ); // Omega Effective mass
842 fCFContCascadePIDOmegaMinus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity
843 //Setting the step title : one per PID case
844 fCFContCascadePIDOmegaMinus->SetStepTitle(0, "No PID");
845 fCFContCascadePIDOmegaMinus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");
846 fCFContCascadePIDOmegaMinus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");
847 fCFContCascadePIDOmegaMinus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");
848 fCFContCascadePIDOmegaMinus->SetStepTitle(4, "Comb. PID / Bachelor");
849 fCFContCascadePIDOmegaMinus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");
850 fCFContCascadePIDOmegaMinus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");
851 //Setting the variable title, per axis
852 fCFContCascadePIDOmegaMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
853 fCFContCascadePIDOmegaMinus->SetVarTitle(1, "M( #Lambda , K^{-} ) (GeV/c^{2})");
854 fCFContCascadePIDOmegaMinus->SetVarTitle(2, "Y_{#Omega}");
855 fListHistCascade->Add(fCFContCascadePIDOmegaMinus);
857 // - CFContainer PID study Omega plus
858 if(!fCFContCascadePIDOmegaPlus) {
859 const Int_t lNbSteps = 7 ;
860 const Int_t lNbVariables = 3 ;
861 //Array for the number of bins in each dimension :
862 Int_t lNbBinsPerVar[3] = {0};
863 lNbBinsPerVar[0] = 100;
864 lNbBinsPerVar[1] = 1000;
865 lNbBinsPerVar[2] = 22;
866 if (fCollidingSystem == "pp" && fkSDDSelectionOn) {
867 if (fwithSDD) fCFContCascadePIDOmegaPlus = new AliCFContainer(Form("fCFContCascadePIDOmegaPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDon",
868 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
869 "Pt_{cascade} Vs M_{#Omega^{+} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
870 else if (!fwithSDD) fCFContCascadePIDOmegaPlus = new AliCFContainer(Form("fCFContCascadePIDOmegaPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDoff",
871 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
872 "Pt_{cascade} Vs M_{#Omega^{+} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
873 } else if (fCollidingSystem == "pp" && !fkSDDSelectionOn) {
874 fCFContCascadePIDOmegaPlus = new AliCFContainer(Form("fCFContCascadePIDOmegaPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_woSDD",
875 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
876 "Pt_{cascade} Vs M_{#Omega^{+} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
877 } else if (fCollidingSystem == "pPb") {
878 fCFContCascadePIDOmegaPlus = new AliCFContainer(Form("fCFContCascadePIDOmegaPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",
879 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
880 "Pt_{cascade} Vs M_{#Omega^{+} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
882 //Setting the bin limits
883 fCFContCascadePIDOmegaPlus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)
884 fCFContCascadePIDOmegaPlus->SetBinLimits(1, 1.5 , 2.5 ); // Omega Effective mass
885 fCFContCascadePIDOmegaPlus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity
886 //Setting the step title : one per PID case
887 fCFContCascadePIDOmegaPlus->SetStepTitle(0, "No PID");
888 fCFContCascadePIDOmegaPlus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");
889 fCFContCascadePIDOmegaPlus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");
890 fCFContCascadePIDOmegaPlus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");
891 fCFContCascadePIDOmegaPlus->SetStepTitle(4, "Comb. PID / Bachelor");
892 fCFContCascadePIDOmegaPlus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");
893 fCFContCascadePIDOmegaPlus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");
894 //Setting the variable title, per axis
895 fCFContCascadePIDOmegaPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
896 fCFContCascadePIDOmegaPlus->SetVarTitle(1, "M( #Lambda , K^{+} ) (GeV/c^{2})");
897 fCFContCascadePIDOmegaPlus->SetVarTitle(2, "Y_{#Omega}");
898 fListHistCascade->Add(fCFContCascadePIDOmegaPlus);
900 // - CFContainer: towards the optimisation of topological selections
901 if(! fCFContCascadeCuts) {
902 // Container meant to store all the relevant distributions corresponding to the cut variables.
903 // NB: overflow/underflow of variables on which we want to cut later should be 0!!!
904 const Int_t lNbSteps = 4 ;
905 const Int_t lNbVariables = 19 ;
906 //Array for the number of bins in each dimension :
907 Int_t lNbBinsPerVar[lNbVariables] = {0};
908 lNbBinsPerVar[0] = 25; //DcaCascDaughters : [0.0,2.4,3.0] -> Rec.Cut = 2.0;
909 lNbBinsPerVar[1] = 25; //DcaBachToPrimVertex : [0.0,0.24,100.0] -> Rec.Cut = 0.01;
910 lNbBinsPerVar[2] = 60; //CascCosineOfPointingAngle : [0.94,1.0] -> Rec.Cut = 0.95;
911 lNbBinsPerVar[3] = 40; //CascRadius : [0.0,3.9,1000.0] -> Rec.Cut = 0.2;
912 lNbBinsPerVar[4] = 30; //InvMassLambdaAsCascDghter : [1.1,1.3] -> Rec.Cut = 0.008;
913 lNbBinsPerVar[5] = 20; //DcaV0Daughters : [0.0,2.0] -> Rec.Cut = 1.5;
914 lNbBinsPerVar[6] = 201; //V0CosineOfPointingAngleToXi : [0.89,1.0] -> No Rec.Cut;
915 lNbBinsPerVar[7] = 40; //V0Radius : [0.0,3.9,1000.0] -> Rec.Cut = 0.2;
916 lNbBinsPerVar[8] = 40; //DcaV0ToPrimVertex : [0.0,0.39,110.0] -> Rec.Cut = 0.01;
917 lNbBinsPerVar[9] = 25; //DcaPosToPrimVertex : [0.0,0.24,100.0] -> Rec.Cut = 0.01;
918 lNbBinsPerVar[10] = 25; //DcaNegToPrimVertex : [0.0,0.24,100.0] -> Rec.Cut = 0.01;
919 lNbBinsPerVar[11] = 150; //InvMassXi : 2-MeV/c2 bins
920 lNbBinsPerVar[12] = 120; //InvMassOmega : 2-MeV/c2 bins
921 lNbBinsPerVar[13] = 100; //XiTransvMom : [0.0,10.0]
922 lNbBinsPerVar[14] = 110; //Y(Xi) : 0.02 in rapidity units
923 lNbBinsPerVar[15] = 110; //Y(Omega) : 0.02 in rapidity units
924 lNbBinsPerVar[16] = 112; //Proper lenght of cascade
925 lNbBinsPerVar[17] = 112; //Proper lenght of V0
926 lNbBinsPerVar[18] = 112; //Distance V0-Xi in transverse plane
927 if (fCollidingSystem == "pp" && fkSDDSelectionOn) {
928 if (fwithSDD) fCFContCascadeCuts = new AliCFContainer(Form("fCFContCascadeCuts_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDon",
929 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
930 "Container for Cascade cuts", lNbSteps, lNbVariables, lNbBinsPerVar);
931 else if (!fwithSDD) fCFContCascadeCuts = new AliCFContainer(Form("fCFContCascadeCuts_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDoff",
932 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
933 "Container for Cascade cuts", lNbSteps, lNbVariables, lNbBinsPerVar);
934 } else if (fCollidingSystem == "pp" && !fkSDDSelectionOn) {
935 fCFContCascadeCuts = new AliCFContainer(Form("fCFContCascadeCuts_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_woSDD",
936 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
937 "Container for Cascade cuts", lNbSteps, lNbVariables, lNbBinsPerVar);
938 } else if (fCollidingSystem == "pPb") {
939 fCFContCascadeCuts = new AliCFContainer(Form("fCFContCascadeCuts_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",
940 fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),
941 "Container for Cascade cuts", lNbSteps, lNbVariables, lNbBinsPerVar);
943 //Setting the bin limits
945 Double_t *lBinLim0 = new Double_t[ lNbBinsPerVar[0] + 1 ];
946 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;
947 lBinLim0[ lNbBinsPerVar[0] ] = 3.0;
948 fCFContCascadeCuts -> SetBinLimits(0, lBinLim0);
950 //1 - DcaToPrimVertexXi
951 Double_t *lBinLim1 = new Double_t[ lNbBinsPerVar[1] + 1 ];
952 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;
953 lBinLim1[ lNbBinsPerVar[1] ] = 100.0;
954 fCFContCascadeCuts -> SetBinLimits(1, lBinLim1);
956 //2 - CascCosineOfPointingAngle
957 fCFContCascadeCuts->SetBinLimits(2, 0.94, 1.);
959 Double_t *lBinLim3 = new Double_t[ lNbBinsPerVar[3]+1 ];
960 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 ;
961 lBinLim3[ lNbBinsPerVar[3] ] = 1000.0;
962 fCFContCascadeCuts -> SetBinLimits(3, lBinLim3 );
964 //4 - InvMassLambdaAsCascDghter
965 fCFContCascadeCuts->SetBinLimits(4, 1.1, 1.13);
967 fCFContCascadeCuts -> SetBinLimits(5, 0., 2.);
968 //6 - V0CosineOfPointingAngle
969 fCFContCascadeCuts -> SetBinLimits(6, 0.8, 1.001);
971 Double_t *lBinLim7 = new Double_t[ lNbBinsPerVar[7] + 1];
972 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;
973 lBinLim7[ lNbBinsPerVar[7] ] = 1000.0;
974 fCFContCascadeCuts -> SetBinLimits(7, lBinLim7);
976 //8 - DcaV0ToPrimVertex
977 Double_t *lBinLim8 = new Double_t[ lNbBinsPerVar[8]+1 ];
978 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 ;
979 lBinLim8[ lNbBinsPerVar[8] ] = 100.0;
980 fCFContCascadeCuts -> SetBinLimits(8, lBinLim8 );
982 //9 - DcaPosToPrimVertex
983 Double_t *lBinLim9 = new Double_t[ lNbBinsPerVar[9]+1 ];
984 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 ;
985 lBinLim9[ lNbBinsPerVar[9] ] = 100.0;
986 fCFContCascadeCuts -> SetBinLimits(9, lBinLim9 );
988 //10 - DcaNegToPrimVertex
989 Double_t *lBinLim10 = new Double_t[ lNbBinsPerVar[10]+1 ];
990 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 ;
991 lBinLim10[ lNbBinsPerVar[10] ] = 100.0;
992 fCFContCascadeCuts -> SetBinLimits(10, lBinLim10 ); // DcaPosToPrimVertexXi : 0.0 to 0.25
995 fCFContCascadeCuts->SetBinLimits(11, 1.25, 1.40);
997 fCFContCascadeCuts->SetBinLimits(12, 1.62, 1.74);
999 fCFContCascadeCuts->SetBinLimits(13, 0.0, 10.0);
1001 fCFContCascadeCuts->SetBinLimits(14, -1.1, 1.1);
1003 fCFContCascadeCuts->SetBinLimits(15, -1.1, 1.1);
1004 //16 - Proper time of cascade
1005 Double_t *lBinLim16 = new Double_t[ lNbBinsPerVar[16]+1 ];
1006 for(Int_t i=0; i< lNbBinsPerVar[16];i++) lBinLim16[i] = (Double_t) -1. + (110. + 1.0 ) / (lNbBinsPerVar[16] - 1) * (Double_t) i;
1007 lBinLim16[ lNbBinsPerVar[16] ] = 2000.0;
1008 fCFContCascadeCuts->SetBinLimits(16, lBinLim16);
1009 //17 - Proper time of V0
1010 fCFContCascadeCuts->SetBinLimits(17, lBinLim16);
1011 //18 - Distance V0-Xi in transverse plane
1012 fCFContCascadeCuts->SetBinLimits(18, lBinLim16);
1013 // Setting the number of steps : one for each cascade species (Xi-, Xi+ and Omega-, Omega+)
1014 fCFContCascadeCuts->SetStepTitle(0, "#Xi^{-} candidates");
1015 fCFContCascadeCuts->SetStepTitle(1, "#bar{#Xi}^{+} candidates");
1016 fCFContCascadeCuts->SetStepTitle(2, "#Omega^{-} candidates");
1017 fCFContCascadeCuts->SetStepTitle(3, "#bar{#Omega}^{+} candidates");
1018 // Setting the variable title, per axis
1019 fCFContCascadeCuts->SetVarTitle(0, "Dca(cascade daughters) (cm)");
1020 fCFContCascadeCuts->SetVarTitle(1, "ImpactParamToPV(bachelor) (cm)");
1021 fCFContCascadeCuts->SetVarTitle(2, "cos(cascade PA)");
1022 fCFContCascadeCuts->SetVarTitle(3, "R_{2d}(cascade decay) (cm)");
1023 fCFContCascadeCuts->SetVarTitle(4, "M_{#Lambda}(as casc dghter) (GeV/c^{2})");
1024 fCFContCascadeCuts->SetVarTitle(5, "Dca(V0 daughters) in Xi (cm)");
1025 if (fCollidingSystem == "pp") fCFContCascadeCuts->SetVarTitle(6, "cos(V0 PA) to cascade vtx");
1026 else if (fCollidingSystem == "pPb") fCFContCascadeCuts->SetVarTitle(6, "cos(V0 PA) to primary vtx");
1027 fCFContCascadeCuts->SetVarTitle(7, "R_{2d}(V0 decay) (cm)");
1028 fCFContCascadeCuts->SetVarTitle(8, "ImpactParamToPV(V0) (cm)");
1029 fCFContCascadeCuts->SetVarTitle(9, "ImpactParamToPV(Pos) (cm)");
1030 fCFContCascadeCuts->SetVarTitle(10, "ImpactParamToPV(Neg) (cm)");
1031 fCFContCascadeCuts->SetVarTitle(11, "Inv. Mass(Xi) (GeV/c^{2})");
1032 fCFContCascadeCuts->SetVarTitle(12, "Inv. Mass(Omega) (GeV/c^{2})");
1033 fCFContCascadeCuts->SetVarTitle(13, "pt(cascade) (GeV/c)");
1034 fCFContCascadeCuts->SetVarTitle(14, "Y(Xi)");
1035 fCFContCascadeCuts->SetVarTitle(15, "Y(Omega)");
1036 fCFContCascadeCuts->SetVarTitle(16, "mL/p (cascade) (cm)");
1037 fCFContCascadeCuts->SetVarTitle(17, "mL/p (V0) (cm)");
1038 fCFContCascadeCuts->SetVarTitle(18, "Distance V0-Cascade in transverse plane (cm)");
1039 fListHistCascade->Add(fCFContCascadeCuts);
1042 PostData(1, fListHistCascade);
1043 PostData(2, fCFContCascadePIDXiMinus);
1044 PostData(3, fCFContCascadePIDXiPlus);
1045 PostData(4, fCFContCascadePIDOmegaMinus);
1046 PostData(5, fCFContCascadePIDOmegaPlus);
1047 PostData(6, fCFContCascadeCuts);
1048 } // end UserCreateOutputObjects
1051 //________________________________________________________________________
1052 void AliAnalysisTaskCheckCascadepp276::UserExec(Option_t *) {
1054 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1055 // Main loop (called for each event)
1056 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1060 AliESDEvent *lESDevent = 0x0;
1061 AliAODEvent *lAODevent = 0x0;
1063 //----------------------
1064 // Check the PIDresponse
1065 //---------------------
1067 AliError("Cannot get pid response");
1070 if(! fESDtrackCuts ){
1071 fESDtrackCuts = new AliESDtrackCuts();
1074 fUtils = new AliAnalysisUtils();
1083 // 2) Physics selection
1084 // 3) Select only looking at events with well-established PV
1085 // 4) Pileup selection
1088 //----------------------
1089 // Before any selections
1090 //----------------------
1091 //- Define the variables
1092 Int_t ncascadesBeforeAnySel = 0;
1093 Int_t nTrackMultiplicityBeforeAnySel = 0;
1094 if (fAnalysisType == "ESD") {
1095 // - Load the InputEvent and check
1096 lESDevent = dynamic_cast<AliESDEvent*>( InputEvent() );
1098 AliWarning("ERROR: lESDevent not available \n");
1101 // - Take the number of cascades and tracks before any events selection
1102 ncascadesBeforeAnySel = lESDevent->GetNumberOfCascades();
1103 nTrackMultiplicityBeforeAnySel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
1104 } else if (fAnalysisType == "AOD") {
1105 // - Load the InputEvent and check
1106 lAODevent = dynamic_cast<AliAODEvent*>( InputEvent() );
1108 AliWarning("ERROR: lAODevent not available \n");
1111 // - Take the number of cascades and tracks before any events selection
1112 ncascadesBeforeAnySel = lAODevent->GetNumberOfCascades();
1113 nTrackMultiplicityBeforeAnySel = -100; //FIXME: I can't find the equivalent method for the AOD
1115 Printf("Analysis type (ESD or AOD) not specified \n");
1119 fHistCascadeMultiplicityBeforeAnySel->Fill(ncascadesBeforeAnySel);
1120 fHistTrackMultiplicityBeforeAnySel->Fill(nTrackMultiplicityBeforeAnySel);
1125 // - Define the variables
1126 Int_t ncascadesAfterSDDSel = 0;
1127 Int_t nTrackMultiplicityAfterSDDSel = 0;
1128 // - Selection for ESD and AOD
1129 if (fAnalysisType == "ESD") {
1130 if (fkSDDSelectionOn && fCollidingSystem == "pp") {
1131 TString trcl = lESDevent->GetFiredTriggerClasses();
1132 //cout<<"Fired Trigger Classes: "<<trcl<<endl;
1134 if(!(trcl.Contains("ALLNOTRD"))) {
1135 cout<<"We are selecting events with SDD turn ON. This event has the SDD turn OFF. => RETURN!! (Exclude it)..."<<endl;
1136 PostData(1, fListHistCascade);
1137 PostData(2, fCFContCascadePIDXiMinus);
1138 PostData(3, fCFContCascadePIDXiPlus);
1139 PostData(4, fCFContCascadePIDOmegaMinus);
1140 PostData(5, fCFContCascadePIDOmegaPlus);
1141 PostData(6, fCFContCascadeCuts);
1144 } else if (!fwithSDD){
1145 if((trcl.Contains("ALLNOTRD"))) {
1146 cout<<"We are selecting events with SDD turn OFF. This event has the SDD turn ON. => RETURN!! (Exclude it)..."<<endl;
1147 PostData(1, fListHistCascade);
1148 PostData(2, fCFContCascadePIDXiMinus);
1149 PostData(3, fCFContCascadePIDXiPlus);
1150 PostData(4, fCFContCascadePIDOmegaMinus);
1151 PostData(5, fCFContCascadePIDOmegaPlus);
1152 PostData(6, fCFContCascadeCuts);
1157 // - Take the number of cascades and tracks after the SDD selection
1158 ncascadesAfterSDDSel = lESDevent->GetNumberOfCascades();
1159 nTrackMultiplicityAfterSDDSel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
1160 } else if (fAnalysisType == "AOD") {
1161 if (fkSDDSelectionOn && fCollidingSystem == "pp") {
1162 TString trcl = lAODevent->GetFiredTriggerClasses();
1164 if(!(trcl.Contains("ALLNOTRD"))) {
1165 PostData(1, fListHistCascade);
1166 PostData(2, fCFContCascadePIDXiMinus);
1167 PostData(3, fCFContCascadePIDXiPlus);
1168 PostData(4, fCFContCascadePIDOmegaMinus);
1169 PostData(5, fCFContCascadePIDOmegaPlus);
1170 PostData(6, fCFContCascadeCuts);
1171 cout<<"We are selecting events with SDD turn ON. This event has the SDD turn OFF. => RETURN!! (Exclude it)..."<<endl;
1174 } else if (!fwithSDD) {
1175 if((trcl.Contains("ALLNOTRD"))) {
1176 PostData(1, fListHistCascade);
1177 PostData(2, fCFContCascadePIDXiMinus);
1178 PostData(3, fCFContCascadePIDXiPlus);
1179 PostData(4, fCFContCascadePIDOmegaMinus);
1180 PostData(5, fCFContCascadePIDOmegaPlus);
1181 PostData(6, fCFContCascadeCuts);
1182 cout<<"We are selecting events with SDD turn OFF. This event has the SDD turn ON. => RETURN!! (Exclude it)..."<<endl;
1187 // - Take the number of cascades and tracks after the SDD selection
1188 ncascadesAfterSDDSel = lAODevent->GetNumberOfCascades();
1189 nTrackMultiplicityAfterSDDSel = -100; //FIXME: I can't find the equivalent method for the AOD
1192 fHistCascadeMultiplicityAfterSDDSel->Fill(ncascadesAfterSDDSel);
1193 fHistTrackMultiplicityAfterSDDSel->Fill(nTrackMultiplicityAfterSDDSel);
1195 //-------------------------------------------
1196 // Multiplicity estimators for pPb collisions //FIXME
1197 //-------------------------------------------
1198 //AliCentrality* centrality = 0;
1199 //if (fAnalysisType == "ESD" && (fCollidingSystem == "pPb")) centrality = lESDevent->GetCentrality();
1200 //else if (fAnalysisType == "AOD" && (fCollidingSystem == "pPb")) centrality = lAODevent->GetCentrality();
1201 //Float_t lcentrality = 0.;
1202 //if (fCollidingSystem == "pPb") {
1203 // if (fkUseCleaning) lcentrality = centrality->GetCentralityPercentile(fCentrEstimator.Data());
1205 // lcentrality = centrality->GetCentralityPercentileUnchecked(fCentrEstimator.Data());
1206 // if (centrality->GetQuality()>1) {
1207 // PostData(1, fCFContCascadeCuts);
1211 // //if (lcentrality<fCentrLowLim||lcentrality>=fCentrUpLim) {
1212 // // PostData(1, fCFContCascadeCuts);
1215 //} else if (fCollidingSystem == "pp") lcentrality = 0.;
1217 //------------------
1218 // Physics selection
1220 // - Define the variables
1221 Int_t ncascadesAfterPhysicsSel = 0;
1222 Int_t nTrackMultiplicityAfterPhysicsSel = 0;
1223 // - Selection for ESD and AOD
1224 UInt_t maskIsSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
1225 Bool_t isSelected = 0;
1226 if (fCollidingSystem == "pp" ) isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB;
1227 else if (fCollidingSystem == "pPb") isSelected = (maskIsSelected & AliVEvent::kINT7) == AliVEvent::kINT7;
1229 PostData(1, fListHistCascade);
1230 PostData(2, fCFContCascadePIDXiMinus);
1231 PostData(3, fCFContCascadePIDXiPlus);
1232 PostData(4, fCFContCascadePIDOmegaMinus);
1233 PostData(5, fCFContCascadePIDOmegaPlus);
1234 PostData(6, fCFContCascadeCuts);
1235 cout<<"We are selecting the events that past tha Physics Selection. This event does not pass the Physics Selection. => RETURN!! (Exclude it)..."<<endl;
1238 if (fAnalysisType == "ESD") {
1239 // - Take the number of cascades and tracks after physics selection
1240 ncascadesAfterPhysicsSel = lESDevent->GetNumberOfCascades();
1241 nTrackMultiplicityAfterPhysicsSel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
1242 } else if (fAnalysisType == "AOD") {
1243 // - Take the number of cascades and tracks after the physics selection
1244 ncascadesAfterPhysicsSel = lAODevent->GetNumberOfCascades();
1245 nTrackMultiplicityAfterPhysicsSel = -100; //FIXME: I can't find the equivalent method for the AOD
1248 fHistCascadeMultiplicityAfterPhysicsSel->Fill(ncascadesAfterPhysicsSel);
1249 fHistTrackMultiplicityAfterPhysicsSel->Fill(nTrackMultiplicityAfterPhysicsSel);
1251 //---------------------------------------
1252 // Re-run cascade vertexer (only for ESD)
1253 //---------------------------------------
1254 if (fAnalysisType == "ESD" && fkRerunV0CascVertexers) {
1255 lESDevent->ResetCascades();
1256 lESDevent->ResetV0s();
1257 AliV0vertexer *lV0vtxer = new AliV0vertexer();
1258 AliCascadeVertexer *lCascVtxer = new AliCascadeVertexer();
1259 //lV0vtxer->GetCuts(fV0Sels);
1260 //lCascVtxer->GetCuts(fCascSels);
1261 lV0vtxer->SetCuts(fV0Sels); // NB don't use SetDefaultCuts!! because it acts on static variables
1262 lCascVtxer->SetCuts(fCascSels);
1263 lV0vtxer->Tracks2V0vertices(lESDevent);
1264 lCascVtxer->V0sTracks2CascadeVertices(lESDevent);
1266 //delete lCascVtxer;
1269 //------------------------------
1270 // Well-established PV selection
1271 //------------------------------
1272 // - Define variables
1273 Int_t ncascadesForSelEvtNoTPCOnly = 0;
1274 Int_t nTrackMultiplicityForSelEvtNoTPCOnly = 0;
1275 // - Selection for the two colliding systems
1276 if (fCollidingSystem == "pp") {
1277 // - Selection for ESD and AOD
1278 if (fAnalysisType == "ESD") {
1279 // - Vertex coordinates: get the PVs stored in the ESD found with tracks and SPD
1280 const AliESDVertex *lPrimaryTrackingESDVtx = lESDevent->GetPrimaryVertexTracks();
1281 const AliESDVertex *lPrimarySPDVtx = lESDevent->GetPrimaryVertexSPD();
1282 // - Select only looking at events with well-established PV
1283 if (fkQualityCutNoTPConlyPrimVtx) {
1284 if (!lPrimarySPDVtx->GetStatus() && !lPrimaryTrackingESDVtx->GetStatus() ){
1285 AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !");
1286 PostData(1, fListHistCascade);
1287 PostData(2, fCFContCascadePIDXiMinus);
1288 PostData(3, fCFContCascadePIDXiPlus);
1289 PostData(4, fCFContCascadePIDOmegaMinus);
1290 PostData(5, fCFContCascadePIDOmegaPlus);
1291 PostData(6, fCFContCascadeCuts);
1295 // - Take the number of cascades and tracks after TPConly selection
1296 ncascadesForSelEvtNoTPCOnly = lESDevent->GetNumberOfCascades();
1297 nTrackMultiplicityForSelEvtNoTPCOnly = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
1298 } else if (fAnalysisType == "AOD") {
1299 // - Vertex coordinates: get the PVs stored in the AOD found with tracks and SPD
1300 const AliAODVertex *lPrimarySPDVtx = lAODevent->GetPrimaryVertexSPD();
1301 const AliAODVertex *lPrimaryTrackingAODVtx = lAODevent->GetPrimaryVertex();
1302 // - Select only looking at events with well-established PV
1303 if (fkQualityCutNoTPConlyPrimVtx) {
1304 if (!lPrimarySPDVtx && !lPrimaryTrackingAODVtx) {
1305 AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !");
1306 PostData(1, fListHistCascade);
1307 PostData(2, fCFContCascadePIDXiMinus);
1308 PostData(3, fCFContCascadePIDXiPlus);
1309 PostData(4, fCFContCascadePIDOmegaMinus);
1310 PostData(5, fCFContCascadePIDOmegaPlus);
1311 PostData(6, fCFContCascadeCuts);
1315 // - Take the number of cascades and tracks after TPConly selection
1316 ncascadesForSelEvtNoTPCOnly = lAODevent->GetNumberOfCascades();
1317 nTrackMultiplicityForSelEvtNoTPCOnly = -100; //FIXME: I can't find the equivalent method for the AOD
1319 } else if (fCollidingSystem == "pPb") {
1320 if (fAnalysisType == "ESD") {
1321 Bool_t fHasVertex = kFALSE;
1322 const AliESDVertex *vertex = lESDevent->GetPrimaryVertexTracks();
1323 if (vertex->GetNContributors() < 1) {
1324 vertex = lESDevent->GetPrimaryVertexSPD();
1325 if (vertex->GetNContributors() < 1) fHasVertex = kFALSE;
1326 else fHasVertex = kTRUE;
1327 TString vtxTyp = vertex->GetTitle();
1328 Double_t cov[6]={0};
1329 vertex->GetCovarianceMatrix(cov);
1330 Double_t zRes = TMath::Sqrt(cov[5]);
1331 if (vtxTyp.Contains("vertexer:Z") && (zRes>0.25)) fHasVertex = kFALSE;
1333 else fHasVertex = kTRUE;
1334 if (fUtils->IsFirstEventInChunk(lESDevent)) { //Is First event in chunk rejection: Still present!
1335 AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !");
1336 PostData(1, fListHistCascade);
1337 PostData(2, fCFContCascadePIDXiMinus);
1338 PostData(3, fCFContCascadePIDXiPlus);
1339 PostData(4, fCFContCascadePIDOmegaMinus);
1340 PostData(5, fCFContCascadePIDOmegaPlus);
1341 PostData(6, fCFContCascadeCuts);
1344 // - Take the number of cascades and tracks after TPConly selection
1345 ncascadesForSelEvtNoTPCOnly = lESDevent->GetNumberOfCascades();
1346 nTrackMultiplicityForSelEvtNoTPCOnly = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
1347 } else if (fAnalysisType == "AOD") {
1348 Bool_t fHasVertex = kFALSE;
1349 const AliAODVertex *vertex = lAODevent->GetPrimaryVertex();
1350 if (vertex->GetNContributors() < 1) {
1351 vertex = lAODevent->GetPrimaryVertexSPD();
1352 if (vertex->GetNContributors() < 1) fHasVertex = kFALSE;
1353 else fHasVertex = kTRUE;
1354 TString vtxTyp = vertex->GetTitle();
1355 Double_t cov[6]={0};
1356 vertex->GetCovarianceMatrix(cov);
1357 Double_t zRes = TMath::Sqrt(cov[5]);
1358 if (vtxTyp.Contains("vertexer:Z") && (zRes>0.25)) fHasVertex = kFALSE;
1360 else fHasVertex = kTRUE;
1361 if (fHasVertex == kFALSE) { //Is First event in chunk rejection: Still present! //FIXME
1362 AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !");
1363 PostData(1, fListHistCascade);
1364 PostData(2, fCFContCascadePIDXiMinus);
1365 PostData(3, fCFContCascadePIDXiPlus);
1366 PostData(4, fCFContCascadePIDOmegaMinus);
1367 PostData(5, fCFContCascadePIDOmegaPlus);
1368 PostData(6, fCFContCascadeCuts);
1371 // - Take the number of cascades and tracks after TPConly selection
1372 ncascadesForSelEvtNoTPCOnly = lAODevent->GetNumberOfCascades();
1373 nTrackMultiplicityForSelEvtNoTPCOnly = -100; //FIXME: I can't find the equivalent method for the AOD
1377 fHistCascadeMultiplicityForSelEvtNoTPCOnly->Fill(ncascadesForSelEvtNoTPCOnly);
1378 fHistTrackMultiplicityForSelEvtNoTPCOnly->Fill(nTrackMultiplicityForSelEvtNoTPCOnly);
1384 // - Define variables
1385 Int_t ncascadesForSelEvtNoTPCOnlyNoPileup = 0;
1386 Int_t nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = 0;
1387 // - Selection for ESD and AOD
1388 if (fAnalysisType == "ESD" && fCollidingSystem == "pp") {
1389 if (fkQualityCutPileup) {
1390 if(lESDevent->IsPileupFromSPD()){
1391 AliWarning("Pb / Pile-up event ... return!");
1392 PostData(1, fListHistCascade);
1393 PostData(2, fCFContCascadePIDXiMinus);
1394 PostData(3, fCFContCascadePIDXiPlus);
1395 PostData(4, fCFContCascadePIDOmegaMinus);
1396 PostData(5, fCFContCascadePIDOmegaPlus);
1397 PostData(6, fCFContCascadeCuts);
1401 // - Take the number of cascades and tracks after Pileup selection
1402 ncascadesForSelEvtNoTPCOnlyNoPileup = lESDevent->GetNumberOfCascades();
1403 nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
1404 } else if (fAnalysisType == "AOD" && fCollidingSystem == "pp") {
1405 if (fkQualityCutPileup) {
1406 if(lAODevent->IsPileupFromSPD()){
1407 AliWarning("Pb / Pile-up event ... return!");
1408 PostData(1, fListHistCascade);
1409 PostData(2, fCFContCascadePIDXiMinus);
1410 PostData(3, fCFContCascadePIDXiPlus);
1411 PostData(4, fCFContCascadePIDOmegaMinus);
1412 PostData(5, fCFContCascadePIDOmegaPlus);
1413 PostData(6, fCFContCascadeCuts);
1417 // - Take the number of cascades and tracks after Pileup selection
1418 ncascadesForSelEvtNoTPCOnlyNoPileup = lAODevent->GetNumberOfCascades();
1419 nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = -100; //FIXME: I can't find the equivalent method for the AOD
1421 fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup->Fill(ncascadesForSelEvtNoTPCOnlyNoPileup);
1422 fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup->Fill(nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup);
1424 //----------------------------------------------------
1425 // Vertex Z position selection (+ magnetic field info)
1426 //----------------------------------------------------
1427 // - Define variables
1428 Double_t lBestPrimaryVtxPos[3] = {-100.0, -100.0, -100.0};
1429 Double_t lMagneticField = -10.;
1430 Double_t tPrimaryVtxPosition[3] = {-100.0, -100.0, -100.0};
1431 Int_t ncascadesAfterVertexSel = 0;
1432 Int_t nTrackMultiplicityAfterVertexSel = 0;
1433 // - Selection for ESD and AOD
1434 if (fAnalysisType == "ESD") {
1435 // - Vertex coordinates: get the best primary vertex available for the event
1436 const AliESDVertex *lPrimaryBestESDVtx = lESDevent->GetPrimaryVertex();
1437 if (!lPrimaryBestESDVtx){
1438 AliWarning("No prim. vertex in ESD... return!");
1439 PostData(1, fListHistCascade);
1440 PostData(2, fCFContCascadePIDXiMinus);
1441 PostData(3, fCFContCascadePIDXiPlus);
1442 PostData(4, fCFContCascadePIDOmegaMinus);
1443 PostData(5, fCFContCascadePIDOmegaPlus);
1444 PostData(6, fCFContCascadeCuts);
1447 lPrimaryBestESDVtx->GetXYZ( lBestPrimaryVtxPos );
1448 // - Fill the vertex plots before any event selection on vertex position
1449 const AliVVertex *primaryVtx = lESDevent->GetPrimaryVertex();
1450 tPrimaryVtxPosition[0] = primaryVtx->GetX();
1451 tPrimaryVtxPosition[1] = primaryVtx->GetY();
1452 tPrimaryVtxPosition[2] = primaryVtx->GetZ();
1453 fHistPVx->Fill( tPrimaryVtxPosition[0] );
1454 fHistPVy->Fill( tPrimaryVtxPosition[1] );
1455 fHistPVz->Fill( tPrimaryVtxPosition[2] );
1456 // - Get magnetic filed info
1457 lMagneticField = lESDevent->GetMagneticField();
1458 //if(TMath::Abs(lMagneticField ) < 10e-6) continue;
1459 // - Selection on the primary vertex Z position
1460 if (fkQualityCutZprimVtxPos) {
1461 if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange || TMath::Abs(lBestPrimaryVtxPos[2]) < fVtxRangeMin) {
1462 AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");
1463 PostData(1, fListHistCascade);
1464 PostData(2, fCFContCascadePIDXiMinus);
1465 PostData(3, fCFContCascadePIDXiPlus);
1466 PostData(4, fCFContCascadePIDOmegaMinus);
1467 PostData(5, fCFContCascadePIDOmegaPlus);
1468 PostData(6, fCFContCascadeCuts);
1472 // - Take the number of cascades and tracks after vertex Z position selection
1473 ncascadesAfterVertexSel = lESDevent->GetNumberOfCascades();
1474 nTrackMultiplicityAfterVertexSel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
1475 } else if (fAnalysisType == "AOD") {
1476 // - Vertex coordinates: get the best primary vertex available for the event
1477 const AliAODVertex *lPrimaryBestAODVtx = lAODevent->GetPrimaryVertex();
1478 if (!lPrimaryBestAODVtx){
1479 AliWarning("No prim. vertex in AOD... return!");
1480 PostData(1, fListHistCascade);
1481 PostData(2, fCFContCascadePIDXiMinus);
1482 PostData(3, fCFContCascadePIDXiPlus);
1483 PostData(4, fCFContCascadePIDOmegaMinus);
1484 PostData(5, fCFContCascadePIDOmegaPlus);
1485 PostData(6, fCFContCascadeCuts);
1488 lPrimaryBestAODVtx->GetXYZ( lBestPrimaryVtxPos );
1489 // - Fill the vertex plots before any event selection on vertex position
1490 const AliVVertex *primaryVtx = lAODevent->GetPrimaryVertex();
1491 tPrimaryVtxPosition[0] = primaryVtx->GetX();
1492 tPrimaryVtxPosition[1] = primaryVtx->GetY();
1493 tPrimaryVtxPosition[2] = primaryVtx->GetZ();
1494 fHistPVx->Fill( tPrimaryVtxPosition[0] );
1495 fHistPVy->Fill( tPrimaryVtxPosition[1] );
1496 fHistPVz->Fill( tPrimaryVtxPosition[2] );
1497 // - Get magnetic filed info
1498 lMagneticField = lAODevent->GetMagneticField();
1499 //if(TMath::Abs(lMagneticField ) < 10e-6) continue;
1500 // - Selection on the primary vertex Z position
1501 if (fkQualityCutZprimVtxPos) {
1502 if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange || TMath::Abs(lBestPrimaryVtxPos[2]) < fVtxRangeMin) {
1503 AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");
1504 PostData(1, fListHistCascade);
1505 PostData(2, fCFContCascadePIDXiMinus);
1506 PostData(3, fCFContCascadePIDXiPlus);
1507 PostData(4, fCFContCascadePIDOmegaMinus);
1508 PostData(5, fCFContCascadePIDOmegaPlus);
1509 PostData(6, fCFContCascadeCuts);
1513 // - Take the number of cascades and tracks after vertex Z position selection
1514 ncascadesAfterVertexSel = lAODevent->GetNumberOfCascades();
1515 nTrackMultiplicityAfterVertexSel = -100; //FIXME: I can't find the equivalent method for the AOD
1518 fHistCascadeMultiplicityAfterVertexCutSel->Fill(ncascadesAfterVertexSel);
1519 fHistTrackMultiplicityAfterVertexCutSel->Fill(nTrackMultiplicityAfterVertexSel);
1521 // - Vertex position plots: after any event selections
1522 tPrimaryVtxPosition[0] = -100.0;
1523 tPrimaryVtxPosition[1] = -100.0;
1524 tPrimaryVtxPosition[2] = -100.0;
1525 if (fAnalysisType == "ESD") {
1526 const AliVVertex *primaryVtx = lESDevent->GetPrimaryVertex();
1527 tPrimaryVtxPosition[0] = primaryVtx->GetX();
1528 tPrimaryVtxPosition[1] = primaryVtx->GetY();
1529 tPrimaryVtxPosition[2] = primaryVtx->GetZ();
1530 } else if (fAnalysisType == "AOD") {
1531 const AliVVertex *primaryVtx = lAODevent->GetPrimaryVertex();
1532 tPrimaryVtxPosition[0] = primaryVtx->GetX();
1533 tPrimaryVtxPosition[1] = primaryVtx->GetY();
1534 tPrimaryVtxPosition[2] = primaryVtx->GetZ();
1536 fHistPVxAnalysis->Fill( tPrimaryVtxPosition[0] );
1537 fHistPVyAnalysis->Fill( tPrimaryVtxPosition[1] );
1538 fHistPVzAnalysis->Fill( tPrimaryVtxPosition[2] );
1542 //////////////////////////////
1543 // CASCADE RECONSTRUCTION PART
1544 //////////////////////////////
1548 Int_t ncascades = 0;
1549 if (fAnalysisType == "ESD") ncascades = lESDevent->GetNumberOfCascades();
1550 else if (fAnalysisType == "AOD") ncascades = lAODevent->GetNumberOfCascades();
1552 for (Int_t iXi = 0; iXi < ncascades; iXi++) {// This is the begining of the Cascade loop (ESD or AOD)
1554 // -----------------------------------------------------------------------
1555 // - Initialisation of the local variables that will be needed for ESD/AOD
1557 // - 0th part of initialisation : around primary vertex ...
1558 //Double_t lBestPrimaryVtxRadius3D = -500.0;
1559 // - 1st part of initialisation : variables needed to store AliESDCascade data members
1560 Double_t lEffMassXi = 0.;
1561 Double_t lDcaXiDaughters = -1.;
1562 Double_t lXiCosineOfPointingAngle = -1.;
1563 Double_t lPosXi[3] = { -1000.0, -1000.0, -1000.0 };
1564 Double_t lXiRadius = -1000. ;
1565 // - 2nd part of initialisation : Nbr of clusters within TPC for the 3 daughter cascade tracks
1566 UShort_t lPosTPCClusters = -1; // For ESD only ...
1567 UShort_t lNegTPCClusters = -1; // For ESD only ...
1568 UShort_t lBachTPCClusters = -1; // For ESD only ...
1569 Double_t lInnerWallMomCascDghters[3] = {-100., -100., -100.};
1570 Double_t lTPCSignalCascDghters [3] = {-100., -100., -100.};
1571 // - 3rd part of initialisation : about V0 part in cascades
1572 Double_t lInvMassLambdaAsCascDghter = 0.;
1573 Double_t lDcaV0DaughtersXi = -1.;
1574 Double_t lDcaBachToPrimVertexXi = -1.;
1575 Double_t lDcaV0ToPrimVertexXi = -1.;
1576 Double_t lDcaPosToPrimVertexXi = -1.;
1577 Double_t lDcaNegToPrimVertexXi = -1.;
1578 Double_t lV0CosineOfPointingAngleXi = -1. ;
1579 Double_t lPosV0Xi[3] = { -1000. , -1000., -1000. }; // Position of VO coming from cascade
1580 Double_t lV0RadiusXi = -1000.0;
1581 Double_t lV0quality = 0.;
1582 // - 4th part of initialisation : Effective masses
1583 Double_t lInvMassXiMinus = 0.;
1584 Double_t lInvMassXiPlus = 0.;
1585 Double_t lInvMassOmegaMinus = 0.;
1586 Double_t lInvMassOmegaPlus = 0.;
1587 // - 5th part of initialisation : PID treatment
1588 Bool_t lIsPosInXiProton = kFALSE;
1589 Bool_t lIsPosInXiPion = kFALSE;
1590 Bool_t lIsPosInOmegaProton = kFALSE;
1591 Bool_t lIsPosInOmegaPion = kFALSE;
1592 Bool_t lIsNegInXiProton = kFALSE;
1593 Bool_t lIsNegInXiPion = kFALSE;
1594 Bool_t lIsNegInOmegaProton = kFALSE;
1595 Bool_t lIsNegInOmegaPion = kFALSE;
1596 Bool_t lIsBachelorKaon = kFALSE;
1597 Bool_t lIsBachelorPion = kFALSE;
1598 Bool_t lIsBachelorKaonForTPC = kFALSE;
1599 Bool_t lIsBachelorPionForTPC = kFALSE;
1600 Bool_t lIsNegPionForTPC = kFALSE;
1601 Bool_t lIsPosPionForTPC = kFALSE;
1602 Bool_t lIsNegProtonForTPC = kFALSE;
1603 Bool_t lIsPosProtonForTPC = kFALSE;
1604 // - 6th part of initialisation : extra info for QA
1605 Double_t lXiMomX = 0.;
1606 Double_t lXiMomY = 0.;
1607 Double_t lXiMomZ = 0.;
1608 Double_t lXiTransvMom = 0.;
1609 Double_t lXiTotMom = 0.;
1610 Double_t lV0PMomX = 0.;
1611 Double_t lV0PMomY = 0.;
1612 Double_t lV0PMomZ = 0.;
1613 Double_t lV0NMomX = 0.;
1614 Double_t lV0NMomY = 0.;
1615 Double_t lV0NMomZ = 0.;
1616 Double_t lV0TotMom = 0.;
1617 Double_t lBachMomX = 0.;
1618 Double_t lBachMomY = 0.;
1619 Double_t lBachMomZ = 0.;
1620 Double_t lBachTransvMom = 0.;
1621 Double_t lBachTotMom = 0.;
1622 Double_t lpTrackTransvMom = 0.;
1623 Double_t lnTrackTransvMom = 0.;
1624 Short_t lChargeXi = -2;
1625 Double_t lV0toXiCosineOfPointingAngle = 0.;
1626 Double_t lRapXi = -20.0, lRapOmega = -20.0, lEta = -20.0, lTheta = 360., lPhi = 720.;
1627 Double_t lAlphaXi = -200., lPtArmXi = -200.0;
1628 Double_t etaPos = 0., etaNeg = 0., etaBach = 0.;
1630 if (fAnalysisType == "ESD") {
1632 // -------------------------------------
1633 // - Load the cascades from the handler
1634 AliESDcascade *xi = lESDevent->GetCascade(iXi);
1637 //----------------------------------------------------------------------------
1638 // - Assigning the necessary variables for specific AliESDcascade data members
1640 xi->ChangeMassHypothesis(lV0quality , 3312); // default working hypothesis: cascade = Xi-decay
1641 lEffMassXi = xi->GetEffMassXi();
1642 lDcaXiDaughters = xi->GetDcaXiDaughters();
1643 lXiCosineOfPointingAngle = xi->GetCascadeCosineOfPointingAngle( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2] );
1644 //Take care : the best available vertex should be used (like in AliCascadeVertexer)
1645 xi->GetXYZcascade( lPosXi[0], lPosXi[1], lPosXi[2] );
1646 lXiRadius = TMath::Sqrt( lPosXi[0]*lPosXi[0] + lPosXi[1]*lPosXi[1] );
1648 //-------------------------------------------------------------------------------------------------------------------------------
1649 // - Around the tracks: Bach + V0 (ESD). Necessary variables for ESDcascade data members coming from the ESDv0 part (inheritance)
1650 UInt_t lIdxPosXi = (UInt_t) TMath::Abs( xi->GetPindex() );
1651 UInt_t lIdxNegXi = (UInt_t) TMath::Abs( xi->GetNindex() );
1652 UInt_t lBachIdx = (UInt_t) TMath::Abs( xi->GetBindex() );
1653 //Care track label can be negative in MC production (linked with the track quality)
1654 //However = normally, not the case for track index ...
1655 // - Rejection of a double use of a daughter track (nothing but just a crosscheck of what is done in the cascade vertexer)
1656 if (lBachIdx == lIdxNegXi) { AliWarning("Pb / Idx(Bach. track) = Idx(Neg. track) ... continue!"); continue; }
1657 if (lBachIdx == lIdxPosXi) { AliWarning("Pb / Idx(Bach. track) = Idx(Pos. track) ... continue!"); continue; }
1658 // - Get the track for the daughters
1659 AliESDtrack *pTrackXi = lESDevent->GetTrack( lIdxPosXi );
1660 AliESDtrack *nTrackXi = lESDevent->GetTrack( lIdxNegXi );
1661 AliESDtrack *bachTrackXi = lESDevent->GetTrack( lBachIdx );
1662 if (!pTrackXi || !nTrackXi || !bachTrackXi ) {
1663 AliWarning("ERROR: Could not retrieve one of the 3 ESD daughter tracks of the cascade ...");
1666 // - Get the TPCnumber of cluster for the daughters
1667 lPosTPCClusters = pTrackXi->GetTPCNcls();
1668 lNegTPCClusters = nTrackXi->GetTPCNcls();
1669 lBachTPCClusters = bachTrackXi->GetTPCNcls();
1671 //-------------------------------------
1672 // - Rejection of a poor quality tracks
1673 if (fkQualityCutTPCrefit) {
1674 // - Poor quality related to TPCrefit
1675 ULong_t pStatus = pTrackXi->GetStatus();
1676 ULong_t nStatus = nTrackXi->GetStatus();
1677 ULong_t bachStatus = bachTrackXi->GetStatus();
1678 if ((pStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Pos. track has no TPCrefit ... continue!"); continue; }
1679 if ((nStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Neg. track has no TPCrefit ... continue!"); continue; }
1680 if ((bachStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / Bach. track has no TPCrefit ... continue!"); continue; }
1682 if (fkQualityCutnTPCcls) {
1683 // - Poor quality related to TPC clusters
1684 if (lPosTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Pos. track has less than 80 TPC clusters ... continue!"); continue; }
1685 if (lNegTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Neg. track has less than 80 TPC clusters ... continue!"); continue; }
1686 if (lBachTPCClusters < fMinnTPCcls) { AliWarning("Pb / Bach. track has less than 80 TPC clusters ... continue!"); continue; }
1689 //-----------------------------------
1690 const AliExternalTrackParam *pExtTrack = pTrackXi->GetInnerParam();
1691 const AliExternalTrackParam *nExtTrack = nTrackXi->GetInnerParam();
1692 const AliExternalTrackParam *bachExtTrack = bachTrackXi->GetInnerParam();
1694 lInnerWallMomCascDghters[0] = pExtTrack->GetP() * pExtTrack->Charge();
1695 lTPCSignalCascDghters [0] = pTrackXi->GetTPCsignal();
1698 lInnerWallMomCascDghters[1] = nExtTrack->GetP() * nExtTrack->Charge();
1699 lTPCSignalCascDghters [1] = nTrackXi->GetTPCsignal();
1702 lInnerWallMomCascDghters[2] = bachExtTrack->GetP() * bachExtTrack->Charge();
1703 lTPCSignalCascDghters [2] = bachTrackXi->GetTPCsignal();
1705 etaPos = pTrackXi->Eta();
1706 etaNeg = nTrackXi->Eta();
1707 etaBach = bachTrackXi->Eta();
1708 lInvMassLambdaAsCascDghter = xi->GetEffMass(); //This value shouldn't change, whatever the working hyp. is : Xi-, Xi+, Omega-, Omega+
1709 lDcaV0DaughtersXi = xi->GetDcaV0Daughters();
1710 lV0CosineOfPointingAngleXi = xi->GetV0CosineOfPointingAngle(lBestPrimaryVtxPos[0],
1711 lBestPrimaryVtxPos[1],
1712 lBestPrimaryVtxPos[2] );
1713 lDcaV0ToPrimVertexXi = xi->GetD( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2] );
1714 lDcaBachToPrimVertexXi = TMath::Abs( bachTrackXi->GetD( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lMagneticField ) ); //Note: AliExternalTrackParam::GetD returns an algebraic value ...
1715 xi->GetXYZ( lPosV0Xi[0], lPosV0Xi[1], lPosV0Xi[2] );
1716 lV0RadiusXi = TMath::Sqrt( lPosV0Xi[0]*lPosV0Xi[0] + lPosV0Xi[1]*lPosV0Xi[1] );
1717 lDcaPosToPrimVertexXi = TMath::Abs( pTrackXi ->GetD( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lMagneticField ) );
1718 lDcaNegToPrimVertexXi = TMath::Abs( nTrackXi ->GetD( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lMagneticField ) );
1720 //-----------------------------------------
1721 // - Extra-selection for cascade candidates
1722 if (fkExtraSelections) { //in AliCascadeVertexer
1723 if (lDcaXiDaughters > 0.3) continue; // in AliCascadeVertexer
1724 if (lXiCosineOfPointingAngle < 0.999 ) continue; // in AliCascadeVertexer
1725 if (lDcaV0ToPrimVertexXi < 0.05) continue; // in AliCascadeVertexer
1726 if (lDcaBachToPrimVertexXi < 0.03) continue; // in AliCascadeVertexer
1727 if (lDcaV0DaughtersXi > 1.) continue; // in AliV0vertexer
1728 if ((fCollidingSystem == "pp") && (lV0toXiCosineOfPointingAngle < 0.998)) continue; // in AliV0vertexer
1729 if ((fCollidingSystem == "pPb") && (lV0CosineOfPointingAngleXi < 0.998)) continue; // in AliV0vertexer
1730 if (lDcaPosToPrimVertexXi < 0.1) continue; // in AliV0vertexer
1731 if (lDcaNegToPrimVertexXi < 0.1) continue; // in AliV0vertexer
1732 if (lXiRadius < .9) continue; // in AliCascadeVertexer
1733 if (lV0RadiusXi < 0.9) continue; // in AliV0vertexer
1736 //---------------------------------------------------------------------------------------------------
1737 // - Around effective masses. Change mass hypotheses to cover all the possibilities: Xi-/+, Omega-/+
1738 if ( bachTrackXi->Charge() < 0 ) {
1739 //Calculate the effective mass of the Xi- candidate: Xi- hyp. (pdg code 3312)
1741 xi->ChangeMassHypothesis(lV0quality , 3312);
1742 lInvMassXiMinus = xi->GetEffMassXi();
1743 //Calculate the effective mass of the Xi- candidate: Omega- hyp. (pdg code 3334)
1745 xi->ChangeMassHypothesis(lV0quality , 3334);
1746 lInvMassOmegaMinus = xi->GetEffMassXi();
1747 //Back to "default" hyp. (Xi-)
1749 xi->ChangeMassHypothesis(lV0quality , 3312);
1750 } // end if negative bachelor
1751 if ( bachTrackXi->Charge() > 0 ) {
1752 //Calculate the effective mass of the Xi- candidate: Xi+ hyp. (pdg code -3312)
1754 xi->ChangeMassHypothesis(lV0quality , -3312);
1755 lInvMassXiPlus = xi->GetEffMassXi();
1756 //Calculate the effective mass of the Xi- candidate: Omega+ hyp. (pdg code -3334)
1758 xi->ChangeMassHypothesis(lV0quality , -3334);
1759 lInvMassOmegaPlus = xi->GetEffMassXi();
1760 //Back to "default" hyp. (Xi-)
1762 xi->ChangeMassHypothesis(lV0quality , -3312);
1763 } // end if positive bachelor
1765 //--------------------------------
1766 // - PID on the daughter tracks
1767 // - Combined PID -> removed, add when will be used
1769 // - TPC PID : 3-sigma bands on Bethe-Bloch curve
1771 if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 4) lIsBachelorKaonForTPC = kTRUE;
1772 if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 4) lIsBachelorPionForTPC = kTRUE;
1773 //Negative V0 daughter
1774 if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 4) lIsNegPionForTPC = kTRUE;
1775 if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kProton )) < 4) lIsNegProtonForTPC = kTRUE;
1776 //Positive V0 daughter
1777 if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 4) lIsPosPionForTPC = kTRUE;
1778 if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 4) lIsPosProtonForTPC = kTRUE;
1780 const AliExternalTrackParam *pInnerWallTrackXi = pTrackXi ->GetInnerParam();
1781 const AliExternalTrackParam *nInnerWallTrackXi = nTrackXi ->GetInnerParam();
1782 const AliExternalTrackParam *bachInnerWallTrackXi = bachTrackXi ->GetInnerParam();
1783 if (pInnerWallTrackXi && nInnerWallTrackXi && bachInnerWallTrackXi ) {
1784 Double_t pMomInnerWall = pInnerWallTrackXi ->GetP();
1785 Double_t nMomInnerWall = nInnerWallTrackXi ->GetP();
1786 Double_t bachMomInnerWall = bachInnerWallTrackXi->GetP();
1788 if (TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 3) lIsBachelorPionForTPC = kTRUE;
1789 if (bachMomInnerWall < 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 5) lIsBachelorKaonForTPC = kTRUE;
1790 if (bachMomInnerWall > 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 3) lIsBachelorKaonForTPC = kTRUE;
1791 //Negative V0 daughter
1792 if (TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 3 ) lIsNegPionForTPC = kTRUE;
1793 if (nMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 5 ) lIsNegProtonForTPC = kTRUE;
1794 if (nMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 3 ) lIsNegProtonForTPC = kTRUE;
1795 //Positive V0 daughter
1796 if (TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 3 ) lIsPosPionForTPC = kTRUE;
1797 if (pMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 5) lIsPosProtonForTPC = kTRUE;
1798 if (pMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 3) lIsPosProtonForTPC = kTRUE;
1801 //---------------------------------
1802 // - Extra info for QA (ESD)
1803 // Miscellaneous pieces of info that may help regarding data quality assessment.
1804 // Cascade transverse and total momentum
1805 xi->GetPxPyPz( lXiMomX, lXiMomY, lXiMomZ );
1806 lXiTransvMom = TMath::Sqrt( lXiMomX*lXiMomX + lXiMomY*lXiMomY );
1807 lXiTotMom = TMath::Sqrt( lXiMomX*lXiMomX + lXiMomY*lXiMomY + lXiMomZ*lXiMomZ );
1808 // V0 total momentum
1809 xi->GetNPxPyPz(lV0NMomX,lV0NMomY,lV0NMomZ);
1810 xi->GetPPxPyPz(lV0PMomX,lV0PMomY,lV0PMomZ);
1811 lV0TotMom = TMath::Sqrt(TMath::Power(lV0NMomX+lV0PMomX,2) + TMath::Power(lV0NMomY+lV0PMomY,2) + TMath::Power(lV0NMomZ+lV0PMomZ,2));
1812 // Bachelor total momentum
1813 xi->GetBPxPyPz( lBachMomX, lBachMomY, lBachMomZ );
1814 lBachTransvMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY );
1815 lBachTotMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY + lBachMomZ*lBachMomZ );
1816 lnTrackTransvMom = TMath::Sqrt( lV0NMomX*lV0NMomX + lV0NMomY*lV0NMomY );
1817 lpTrackTransvMom = TMath::Sqrt( lV0PMomX*lV0PMomX + lV0PMomY*lV0PMomY );
1818 lChargeXi = xi->Charge();
1819 lV0toXiCosineOfPointingAngle = xi->GetV0CosineOfPointingAngle( lPosXi[0], lPosXi[1], lPosXi[2] );
1820 lRapXi = xi->RapXi();
1821 lRapOmega = xi->RapOmega();
1823 lTheta = xi->Theta()*180.0/TMath::Pi();
1824 lPhi = xi->Phi()*180.0/TMath::Pi();
1825 lAlphaXi = xi->AlphaXi();
1826 lPtArmXi = xi->PtArmXi();
1827 // Extra-cut = Anti-splitting cut for lambda daughters
1828 Bool_t kAntiSplittingLambda = kFALSE;
1829 if (kAntiSplittingLambda) { // not used
1830 Double_t lNMomX = 0., lNMomY = 0., lNMomZ = 0.;
1831 Double_t lPMomX = 0., lPMomY = 0., lPMomZ = 0.;
1832 xi->GetPPxPyPz(lPMomX, lPMomY, lPMomZ);
1833 xi->GetNPxPyPz(lNMomX, lNMomY, lNMomZ);
1834 if ( xi->Charge() < 0) {// Xi- or Omega-
1835 if (TMath::Abs(lBachTransvMom - TMath::Sqrt( lNMomX*lNMomX + lNMomY*lNMomY ) ) < 0.075) continue;
1836 } else { //Xi+ or Omega+
1837 if(TMath::Abs(lBachTransvMom - TMath::Sqrt( lPMomX*lPMomX + lPMomY*lPMomY ) ) < 0.075) continue;
1841 } // end of ESD treatment
1843 else if (fAnalysisType == "AOD") {
1845 // -------------------------------------
1846 // - Load the cascades from the handler
1847 const AliAODcascade *xi = lAODevent->GetCascade(iXi);
1850 //----------------------------------------------------------------------------
1851 // - Assigning the necessary variables for specific AliESDcascade data members
1852 lEffMassXi = xi->MassXi(); // default working hypothesis : cascade = Xi- decay
1853 lDcaXiDaughters = xi->DcaXiDaughters();
1854 lXiCosineOfPointingAngle = xi->CosPointingAngleXi( lBestPrimaryVtxPos[0],
1855 lBestPrimaryVtxPos[1],
1856 lBestPrimaryVtxPos[2] );
1857 lPosXi[0] = xi->DecayVertexXiX();
1858 lPosXi[1] = xi->DecayVertexXiY();
1859 lPosXi[2] = xi->DecayVertexXiZ();
1860 lXiRadius = TMath::Sqrt( lPosXi[0]*lPosXi[0] + lPosXi[1]*lPosXi[1] );
1862 //-------------------------------------------------------------------------------------------------------------------------------
1863 // - Around the tracks: Bach + V0 (ESD). Necessary variables for ESDcascade data members coming from the ESDv0 part (inheritance)
1864 AliAODTrack *pTrackXi = dynamic_cast<AliAODTrack*>( xi->GetDaughter(0) );
1865 AliAODTrack *nTrackXi = dynamic_cast<AliAODTrack*>( xi->GetDaughter(1) );
1866 AliAODTrack *bachTrackXi = dynamic_cast<AliAODTrack*>( xi->GetDecayVertexXi()->GetDaughter(0) );
1867 if (!pTrackXi || !nTrackXi || !bachTrackXi ) {
1868 AliWarning("ERROR: Could not retrieve one of the 3 AOD daughter tracks of the cascade ...");
1871 UInt_t lIdxPosXi = (UInt_t) TMath::Abs( pTrackXi->GetID() );
1872 UInt_t lIdxNegXi = (UInt_t) TMath::Abs( nTrackXi->GetID() );
1873 UInt_t lBachIdx = (UInt_t) TMath::Abs( bachTrackXi->GetID() );
1874 // Care track label can be negative in MC production (linked with the track quality)
1875 // However = normally, not the case for track index ...
1876 // - Rejection of a double use of a daughter track (nothing but just a crosscheck of what is done in the cascade vertexer)
1877 if (lBachIdx == lIdxNegXi) { AliWarning("Pb / Idx(Bach. track) = Idx(Neg. track) ... continue!"); continue; }
1878 if (lBachIdx == lIdxPosXi) { AliWarning("Pb / Idx(Bach. track) = Idx(Pos. track) ... continue!"); continue; }
1879 // - Get the TPCnumber of cluster for the daughters
1880 lPosTPCClusters = pTrackXi->GetTPCNcls(); // FIXME: Is this ok? or something like in LambdaK0PbPb task AOD?
1881 lNegTPCClusters = nTrackXi->GetTPCNcls();
1882 lBachTPCClusters = bachTrackXi->GetTPCNcls();
1884 //-------------------------------------
1885 // - Rejection of a poor quality tracks
1886 if (fkQualityCutTPCrefit) {
1887 // - Poor quality related to TPCrefit
1888 if (!(pTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / V0 Pos. track has no TPCrefit ... continue!"); continue; }
1889 if (!(nTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / V0 Neg. track has no TPCrefit ... continue!"); continue; }
1890 if (!(bachTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / Bach. track has no TPCrefit ... continue!"); continue; }
1892 if (fkQualityCutnTPCcls) {
1893 // - Poor quality related to TPC clusters
1894 if (lPosTPCClusters < fMinnTPCcls) { //AliWarning("Pb / V0 Pos. track has less than 80 TPC clusters ... continue!");
1896 if (lNegTPCClusters < fMinnTPCcls) { //AliWarning("Pb / V0 Neg. track has less than 80 TPC clusters ... continue!");
1898 if (lBachTPCClusters < fMinnTPCcls) { //AliWarning("Pb / Bach. track has less than 80 TPC clusters ... continue!");
1902 //---------------------------------------
1903 // - Around the tracks: Bach + V0 (AOD). Necessary variables for AODcascade data members coming from the AODv0 part (inheritance)
1904 etaPos = pTrackXi->Eta();
1905 etaNeg = nTrackXi->Eta();
1906 etaBach = bachTrackXi->Eta();
1907 lChargeXi = xi->ChargeXi();
1908 if ( lChargeXi < 0) lInvMassLambdaAsCascDghter = xi->MassLambda();
1909 else lInvMassLambdaAsCascDghter = xi->MassAntiLambda();
1910 lDcaV0DaughtersXi = xi->DcaV0Daughters();
1911 lDcaV0ToPrimVertexXi = xi->DcaV0ToPrimVertex();
1912 lDcaBachToPrimVertexXi = xi->DcaBachToPrimVertex();
1913 lPosV0Xi[0] = xi->DecayVertexV0X();
1914 lPosV0Xi[1] = xi->DecayVertexV0Y();
1915 lPosV0Xi[2] = xi->DecayVertexV0Z();
1916 lV0RadiusXi = TMath::Sqrt( lPosV0Xi[0]*lPosV0Xi[0] + lPosV0Xi[1]*lPosV0Xi[1] );
1917 lV0CosineOfPointingAngleXi = xi->CosPointingAngle( lBestPrimaryVtxPos );
1918 lDcaPosToPrimVertexXi = xi->DcaPosToPrimVertex();
1919 lDcaNegToPrimVertexXi = xi->DcaNegToPrimVertex();
1921 //----------------------------------------------------------------------------------------------------
1922 // - Around effective masses. Change mass hypotheses to cover all the possibilities: Xi-/+, Omega -/+
1923 if ( lChargeXi < 0 ) lInvMassXiMinus = xi->MassXi();
1924 if ( lChargeXi > 0 ) lInvMassXiPlus = xi->MassXi();
1925 if ( lChargeXi < 0 ) lInvMassOmegaMinus = xi->MassOmega();
1926 if ( lChargeXi > 0 ) lInvMassOmegaPlus = xi->MassOmega();
1928 //--------------------------------
1929 // - PID on the daughter tracks
1930 // - Combined PID -> removed, add when will be used
1932 // - TPC PID : 3-sigma bands on Bethe-Bloch curve
1934 if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 4) lIsBachelorKaonForTPC = kTRUE;
1935 if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 4) lIsBachelorPionForTPC = kTRUE;
1936 //Negative V0 daughter
1937 if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 4) lIsNegPionForTPC = kTRUE;
1938 if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kProton )) < 4) lIsNegProtonForTPC = kTRUE;
1939 //Positive V0 daughter
1940 if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 4) lIsPosPionForTPC = kTRUE;
1941 if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 4) lIsPosProtonForTPC = kTRUE;
1943 //---------------------------------
1944 // - Extra info for QA (AOD)
1945 // Miscellaneous pieces of info that may help regarding data quality assessment.
1946 // Cascade transverse and total momentum
1947 lXiMomX = xi->MomXiX();
1948 lXiMomY = xi->MomXiY();
1949 lXiMomZ = xi->MomXiZ();
1950 lXiTransvMom = TMath::Sqrt( lXiMomX*lXiMomX + lXiMomY*lXiMomY );
1951 lXiTotMom = TMath::Sqrt( lXiMomX*lXiMomX + lXiMomY*lXiMomY + lXiMomZ*lXiMomZ );
1952 Double_t lV0MomX = xi->MomV0X();
1953 Double_t lV0MomY = xi->MomV0Y();
1954 Double_t lV0MomZ = xi->MomV0Z();
1955 lV0TotMom = TMath::Sqrt(TMath::Power(lV0MomX,2)+TMath::Power(lV0MomY,2)+TMath::Power(lV0MomZ,2));
1956 lBachMomX = xi->MomBachX();
1957 lBachMomY = xi->MomBachY();
1958 lBachMomZ = xi->MomBachZ();
1959 lBachTransvMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY );
1960 lBachTotMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY + lBachMomZ*lBachMomZ );
1961 lV0NMomX = xi->MomNegX();
1962 lV0NMomY = xi->MomNegY();
1963 lV0PMomX = xi->MomPosX();
1964 lV0PMomY = xi->MomPosY();
1965 lnTrackTransvMom = TMath::Sqrt( lV0NMomX*lV0NMomX + lV0NMomY*lV0NMomY );
1966 lpTrackTransvMom = TMath::Sqrt( lV0PMomX*lV0PMomX + lV0PMomY*lV0PMomY );
1967 lV0toXiCosineOfPointingAngle = xi->CosPointingAngle( xi->GetDecayVertexXi() );
1968 lRapXi = xi->RapXi();
1969 lRapOmega = xi->RapOmega();
1970 lEta = xi->Eta(); // Will not work ! need a method Pz(), Py() Px()
1971 lTheta = xi->Theta() *180.0/TMath::Pi(); // in AODcascade.
1972 lPhi = xi->Phi() *180.0/TMath::Pi(); // Here, we will get eta, theta, phi for the V0 ...
1973 lAlphaXi = xi->AlphaXi();
1974 lPtArmXi = xi->PtArmXi();
1976 } // end of AOD treatment
1978 // Cut on pt of the three daughter tracks
1979 if (lBachTransvMom<fMinPtCutOnDaughterTracks) continue;
1980 if (lpTrackTransvMom<fMinPtCutOnDaughterTracks) continue;
1981 if (lnTrackTransvMom<fMinPtCutOnDaughterTracks) continue;
1983 // Cut on pseudorapidity of the three daughter tracks
1984 if (TMath::Abs(etaBach)>fEtaCutOnDaughterTracks) continue;
1985 if (TMath::Abs(etaPos)>fEtaCutOnDaughterTracks) continue;
1986 if (TMath::Abs(etaNeg)>fEtaCutOnDaughterTracks) continue;
1989 //----------------------------------
1990 // Calculate proper lenght for cascade
1991 Double_t cascadeMass = 0.;
1992 if ( ( (lChargeXi<0) && lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) ||
1993 ( (lChargeXi>0) && lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) ) cascadeMass = 1.321;
1994 if ( ( (lChargeXi<0) && lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) ||
1995 ( (lChargeXi>0) && lIsBachelorKaonForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) ) cascadeMass = 1.672;
1996 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));
1997 if (lXiTotMom!=0) lctau = lctau*cascadeMass/lXiTotMom;
2000 //-------------------------------------------------
2001 // Calculate proper lenght for Lambda (reconstructed)
2002 Float_t lambdaMass = 1.115683; // PDG mass
2003 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));
2004 Float_t lctauV0 = -1.;
2005 if (lV0TotMom!=0) lctauV0 = distV0Xi*lambdaMass/lV0TotMom;
2006 Float_t distTV0Xi = TMath::Sqrt(TMath::Power((lPosV0Xi[0]-lPosXi[0]),2)+TMath::Power((lPosV0Xi[1]-lPosXi[1]),2));
2010 if(lChargeXi < 0&& lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) {
2011 if (lXiTransvMom>2.&&lXiTransvMom<4.&&(lInvMassXiMinus<1.322&&lInvMassXiMinus>1.320)&&(lXiRadius<8.&&lXiRadius>3.)) {
2012 // FIXME : Just to know which file is currently open : locate the file containing Xi
2013 cout << "Name of the file containing Xi candidate(s) :"
2014 << CurrentFileName()
2015 << " / entry: " << Entry()
2016 << " / in file: " << lESDevent->GetEventNumberInFile() // <- Cvetan / From Mihaela: AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()->GetTree()->GetReadEntry();
2017 << " AliESDcascade number " << iXi
2018 << " : mass(Xi-) = " << lInvMassXiMinus
2019 << " / charge = " << lChargeXi
2020 << " / pt(Casc) = " << lXiTransvMom
2021 << " / Decay 2d R(Xi) = " << lXiRadius
2025 if(lChargeXi < 0&& lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) {
2026 if (lXiTransvMom>2&&lXiTransvMom<4&&(lInvMassOmegaMinus<1.674&&lInvMassOmegaMinus>1.670)&&(lXiRadius<8.&&lXiRadius>3.)) {
2027 cout << "Name of the file containing Omega candidate(s) :"
2028 << CurrentFileName()
2029 << " / entry: " << Entry()
2030 << " / in file: " << lESDevent->GetEventNumberInFile() // <- Cvetan / From Mihaela: AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()->GetTree()->GetReadEntry();
2031 << " AliESDcascade number " << iXi
2032 << " : mass(Omega-) = " << lInvMassOmegaMinus
2033 << " / charge = " << lChargeXi
2034 << " / pt(Casc) = " << lXiTransvMom
2035 << " / Decay 2d R(Xi) = " << lXiRadius
2043 fHistPosV0TPCClusters->Fill( lPosTPCClusters );
2044 fHistNegV0TPCClusters->Fill( lNegTPCClusters );
2045 fHistBachTPCClusters->Fill( lBachTPCClusters );
2046 f2dHistTPCdEdxOfCascDghters->Fill( lInnerWallMomCascDghters[0] , lTPCSignalCascDghters[0] );
2047 f2dHistTPCdEdxOfCascDghters->Fill( lInnerWallMomCascDghters[1] , lTPCSignalCascDghters[1] );
2048 f2dHistTPCdEdxOfCascDghters->Fill( lInnerWallMomCascDghters[2] , lTPCSignalCascDghters[2] );
2052 if ( ( (lChargeXi<0) && lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) ||
2053 ( (lChargeXi>0) && lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) ) {
2055 // with this condition, it could happen that a cascade candidate satisfies the wrong requirement,
2056 // e.g. one looks at a Xi- candidate for which lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC = kFALSE
2057 // Expectation: it should be excluded, but lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC = kTRUE
2058 // then this bad Xi-candidate will contribute anyway (OR condition).
2059 // Hence: the extra condition on the sign of the Cascade
2060 //if (TMath::Abs( lInvMassXiMinus-1.3217 ) < 0.010 || TMath::Abs( lInvMassXiPlus-1.3217 ) < 0.010)
2061 fHistEffMassXi->Fill( lEffMassXi );
2062 fHistDcaXiDaughters->Fill( lDcaXiDaughters ); // Flag CascadeVtxer: Cut Variable e
2063 fHistDcaBachToPrimVertex->Fill( lDcaBachToPrimVertexXi ); // Flag CascadeVtxer: Cut Variable d
2064 fHistXiCosineOfPointingAngle->Fill( lXiCosineOfPointingAngle ); // Flag CascadeVtxer: Cut Variable f
2065 fHistXiRadius->Fill( lXiRadius ); // Flag CascadeVtxer: Cut Variable g+h
2066 fHistMassLambdaAsCascDghter->Fill( lInvMassLambdaAsCascDghter ); // Flag CascadeVtxer: Cut Variable c
2067 fHistDcaV0DaughtersXi->Fill( lDcaV0DaughtersXi );
2068 fHistV0CosineOfPointingAngleXi->Fill( lV0CosineOfPointingAngleXi );
2069 fHistV0RadiusXi->Fill( lV0RadiusXi );
2070 fHistDcaV0ToPrimVertexXi->Fill( lDcaV0ToPrimVertexXi ); // Flag CascadeVtxer: Cut Variable b
2071 fHistDcaPosToPrimVertexXi->Fill( lDcaPosToPrimVertexXi );
2072 fHistDcaNegToPrimVertexXi->Fill( lDcaNegToPrimVertexXi );
2073 fHistChargeXi->Fill( lChargeXi );
2074 fHistV0toXiCosineOfPointingAngle->Fill( lV0toXiCosineOfPointingAngle );
2075 if ( TMath::Abs( lInvMassXiMinus-1.3217 ) < 0.012 || TMath::Abs( lInvMassXiPlus-1.3217 ) < 0.012) { // One InvMass should be different from 0
2076 fHistXiTransvMom->Fill( lXiTransvMom );
2077 fHistXiTotMom->Fill( lXiTotMom );
2078 fHistBachTransvMomXi->Fill( lBachTransvMom );
2079 fHistBachTotMomXi->Fill( lBachTotMom );
2080 fHistRapXi->Fill( lRapXi );
2081 fHistEtaXi->Fill( lEta );
2082 if (lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC) {
2083 fHistEtaBachXi->Fill( etaBach );
2084 fHistEtaPosXi->Fill( etaPos );
2085 fHistEtaNegXi->Fill( etaNeg );
2087 fHistThetaXi->Fill( lTheta );
2088 fHistPhiXi->Fill( lPhi );
2090 if ( TMath::Abs( lInvMassOmegaMinus-1.672 ) < 0.012 || TMath::Abs( lInvMassOmegaPlus-1.672 ) < 0.012 ) { // One InvMass should be different from 0
2091 fHistRapOmega->Fill( lRapOmega );
2093 f2dHistArmenteros->Fill( lAlphaXi, lPtArmXi );
2094 } // end with PID ...
2096 //-----------------------
2097 // - Invariant mass plots
2099 if ( lChargeXi < 0 ) {
2100 fHistMassXiMinus->Fill( lInvMassXiMinus );
2101 fHistMassOmegaMinus->Fill( lInvMassOmegaMinus );
2102 f2dHistDcaXiDaughtersvsInvMass->Fill(lDcaXiDaughters,lInvMassXiMinus);
2103 f2dHistDcaBachToPrimVertexvsInvMass->Fill(lDcaBachToPrimVertexXi,lInvMassXiMinus);
2104 f2dHistXiCosineOfPointingAnglevsInvMass->Fill(lXiCosineOfPointingAngle,lInvMassXiMinus);
2105 f2dHistMassLambdaAsCascDghtervsInvMass->Fill(lInvMassLambdaAsCascDghter,lInvMassXiMinus);
2106 f2dHistDcaV0DaughtersXivsInvMass->Fill(lDcaV0DaughtersXi,lInvMassXiMinus);
2107 f2dHistDcaV0ToPrimVertexXivsInvMass->Fill(lDcaV0ToPrimVertexXi,lInvMassXiMinus);
2109 if ( lChargeXi > 0 ) {
2110 fHistMassXiPlus->Fill( lInvMassXiPlus );
2111 fHistMassOmegaPlus->Fill( lInvMassOmegaPlus );
2114 if ( lChargeXi < 0 ) {
2115 f2dHistEffMassLambdaVsEffMassXiMinus->Fill( lInvMassLambdaAsCascDghter, lInvMassXiMinus );
2116 f2dHistEffMassXiVsEffMassOmegaMinus ->Fill( lInvMassXiMinus, lInvMassOmegaMinus );
2117 f2dHistXiRadiusVsEffMassXiMinus ->Fill( lXiRadius, lInvMassXiMinus );
2118 f2dHistXiRadiusVsEffMassOmegaMinus ->Fill( lXiRadius, lInvMassOmegaMinus );
2120 f2dHistEffMassLambdaVsEffMassXiPlus ->Fill( lInvMassLambdaAsCascDghter, lInvMassXiPlus );
2121 f2dHistEffMassXiVsEffMassOmegaPlus ->Fill( lInvMassXiPlus, lInvMassOmegaPlus );
2122 f2dHistXiRadiusVsEffMassXiPlus ->Fill( lXiRadius, lInvMassXiPlus);
2123 f2dHistXiRadiusVsEffMassOmegaPlus ->Fill( lXiRadius, lInvMassOmegaPlus );
2126 //---------------------------------------------
2127 // - Filling the AliCFContainers related to PID
2128 Double_t lContainerPIDVars[3] = {0.0};
2130 if ( lChargeXi < 0 ) {
2131 lContainerPIDVars[0] = lXiTransvMom;
2132 lContainerPIDVars[1] = lInvMassXiMinus;
2133 lContainerPIDVars[2] = lRapXi;
2135 fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 0); // No PID
2137 if ( lIsBachelorPionForTPC ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track
2138 if ( lIsBachelorPionForTPC && lIsPosProtonForTPC ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks
2139 if ( lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks
2141 if ( lIsBachelorPion ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor
2142 if ( lIsBachelorPion && lIsPosInXiProton ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon
2143 if (lIsBachelorPion && lIsPosInXiProton && lIsNegInXiPion ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson
2145 lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.;
2147 if ( lChargeXi > 0 ) {
2148 lContainerPIDVars[0] = lXiTransvMom;
2149 lContainerPIDVars[1] = lInvMassXiPlus;
2150 lContainerPIDVars[2] = lRapXi;
2152 fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 0); // No PID
2154 if ( lIsBachelorPionForTPC ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track
2155 if ( lIsBachelorPionForTPC && lIsNegProtonForTPC ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks
2156 if ( lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks
2158 if ( lIsBachelorPion ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor
2159 if ( lIsBachelorPion && lIsNegInXiProton ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon
2160 if (lIsBachelorPion && lIsNegInXiProton && lIsPosInXiPion ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson
2162 lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.;
2164 if ( lChargeXi < 0 ) {
2165 lContainerPIDVars[0] = lXiTransvMom;
2166 lContainerPIDVars[1] = lInvMassOmegaMinus;
2167 lContainerPIDVars[2] = lRapOmega;
2169 fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 0); // No PID
2171 if ( lIsBachelorKaonForTPC ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track
2172 if ( lIsBachelorKaonForTPC && lIsPosProtonForTPC ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks
2173 if ( lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks
2175 if ( lIsBachelorKaon ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor
2176 if ( lIsBachelorKaon && lIsPosInOmegaProton ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon
2177 if (lIsBachelorKaon && lIsPosInOmegaProton && lIsNegInOmegaPion ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson
2179 lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.;
2181 if ( lChargeXi > 0 ) {
2182 lContainerPIDVars[0] = lXiTransvMom;
2183 lContainerPIDVars[1] = lInvMassOmegaPlus;
2184 lContainerPIDVars[2] = lRapOmega;
2186 fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 0); // No PID
2188 if ( lIsBachelorKaonForTPC )
2189 fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track
2190 if( lIsBachelorKaonForTPC &&
2191 lIsNegProtonForTPC )
2192 fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks
2193 if ( lIsBachelorKaonForTPC &&
2194 lIsNegProtonForTPC &&
2196 fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks
2198 if ( lIsBachelorKaon )
2199 fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor
2200 if ( lIsBachelorKaon &&
2201 lIsNegInOmegaProton )
2202 fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon
2203 if (lIsBachelorKaon &&
2204 lIsNegInOmegaProton &&
2206 fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson
2209 //--------------------------------------------------------------------
2210 // Filling the AliCFContainer (optimisation of topological selections)
2211 Double_t lContainerCutVars[19] = {0.0};
2213 lContainerCutVars[0] = lDcaXiDaughters;
2214 lContainerCutVars[1] = lDcaBachToPrimVertexXi;
2215 lContainerCutVars[2] = lXiCosineOfPointingAngle;
2216 lContainerCutVars[3] = lXiRadius;
2217 lContainerCutVars[4] = lInvMassLambdaAsCascDghter;
2218 lContainerCutVars[5] = lDcaV0DaughtersXi;
2219 if (fCollidingSystem == "pp") lContainerCutVars[6] = lV0toXiCosineOfPointingAngle;
2220 else if (fCollidingSystem == "pPb") lContainerCutVars[6] = lV0CosineOfPointingAngleXi;
2221 lContainerCutVars[7] = lV0RadiusXi;
2222 lContainerCutVars[8] = lDcaV0ToPrimVertexXi;
2223 lContainerCutVars[9] = lDcaPosToPrimVertexXi;
2224 lContainerCutVars[10] = lDcaNegToPrimVertexXi;
2225 lContainerCutVars[13] = lXiTransvMom;
2226 lContainerCutVars[16] = lctau;
2227 lContainerCutVars[17] = lctauV0;
2228 lContainerCutVars[18] = distTV0Xi;
2230 if ( lChargeXi < 0 ) {
2231 lContainerCutVars[11] = lInvMassXiMinus;
2232 lContainerCutVars[12] = lInvMassOmegaMinus;
2233 lContainerCutVars[14] = lRapXi;
2234 lContainerCutVars[15] = -1.;
2235 if (lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC) fCFContCascadeCuts->Fill(lContainerCutVars,0); // for Xi-
2236 lContainerCutVars[11] = lInvMassXiMinus;
2237 lContainerCutVars[12] = lInvMassOmegaMinus;
2238 lContainerCutVars[14] = -1.;
2239 lContainerCutVars[15] = lRapOmega;
2240 if (lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC) fCFContCascadeCuts->Fill(lContainerCutVars,2); // for Omega-
2242 lContainerCutVars[11] = lInvMassXiPlus;
2243 lContainerCutVars[12] = lInvMassOmegaPlus;
2244 lContainerCutVars[14] = lRapXi;
2245 lContainerCutVars[15] = -1.;
2246 if (lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC) fCFContCascadeCuts->Fill(lContainerCutVars,1); // for Xi+
2247 lContainerCutVars[11] = lInvMassXiPlus;
2248 lContainerCutVars[12] = lInvMassOmegaPlus;
2249 lContainerCutVars[14] = -1.;
2250 lContainerCutVars[15] = lRapOmega;
2251 if (lIsBachelorKaonForTPC && lIsNegProtonForTPC && lIsPosPionForTPC) fCFContCascadeCuts->Fill(lContainerCutVars,3); // for Omega+
2253 } //end of the Cascade loop (ESD or AOD)
2255 // Post output data.
2256 PostData(1, fListHistCascade);
2257 PostData(2, fCFContCascadePIDXiMinus);
2258 PostData(3, fCFContCascadePIDXiPlus);
2259 PostData(4, fCFContCascadePIDOmegaMinus);
2260 PostData(5, fCFContCascadePIDOmegaPlus);
2261 PostData(6, fCFContCascadeCuts);
2264 //________________________________________________________________________
2265 Int_t AliAnalysisTaskCheckCascadepp276::DoESDTrackWithTPCrefitMultiplicity(const AliESDEvent *lESDevent) {
2266 // Checking the number of tracks with TPCrefit for each event
2267 // Needed for a rough assessment of the event multiplicity
2269 Int_t nTrackWithTPCrefitMultiplicity = 0;
2270 for (Int_t iTrackIdx = 0; iTrackIdx < (InputEvent())->GetNumberOfTracks(); iTrackIdx++) {
2271 AliESDtrack *esdTrack = 0x0;
2272 esdTrack = lESDevent->GetTrack( iTrackIdx );
2273 if (!esdTrack) { AliWarning("Pb / Could not retrieve one track within the track loop for TPCrefit check ..."); continue; }
2275 ULong_t lTrackStatus = esdTrack->GetStatus();
2276 if ((lTrackStatus&AliESDtrack::kTPCrefit) == 0) continue;
2277 else nTrackWithTPCrefitMultiplicity++;
2279 // The goal here is to get a better assessment of the event multiplicity.
2280 // (InputEvent())->GetNumberOfTracks() takes into account ITS std alone tracks + global tracks
2281 // This may introduce a bias. Hence the number of TPC refit tracks.
2282 // Note : the event multiplicity = analysis on its own... See Jacek's or Jan Fiete's analysis on dN/d(eta)
2284 } // end loop over all event tracks
2285 return nTrackWithTPCrefitMultiplicity;
2289 //________________________________________________________________________
2290 void AliAnalysisTaskCheckCascadepp276::Terminate(Option_t *)
2292 // Draw result to the screen
2293 // Called once at the end of the query
2295 /* TList *cRetrievedList = 0x0;
2296 cRetrievedList = (TList*)GetOutputData(1);
2297 if(!cRetrievedList){
2298 AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: ouput data container list not available\n"); return;
2300 fHistTrackMultiplicity = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistTrackMultiplicity") );
2301 if (!fHistTrackMultiplicity) {
2302 AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: fHistTrackMultiplicity not available\n"); return;
2304 fHistMassXiMinus = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistMassXiMinus") );
2305 if (!fHistMassXiMinus) {
2306 AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: fHistMassXiMinus not available\n"); return;
2308 fHistMassXiPlus = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistMassXiPlus") );
2309 if (!fHistMassXiPlus) {
2310 AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: fHistMassXiPlus not available\n"); return;
2312 fHistMassOmegaMinus = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistMassOmegaMinus") );
2313 if (!fHistMassOmegaMinus) {
2314 AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: fHistMassOmegaMinus not available\n"); return;
2316 fHistMassOmegaPlus = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistMassOmegaPlus") );
2317 if (!fHistMassOmegaPlus) {
2318 AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: fHistMassOmegaPlus not available\n"); return;
2321 TCanvas *canCheckCascade = new TCanvas("AliAnalysisTaskCheckCascadep276","CheckCascade overview",10,10,1010,660);
2322 canCheckCascade->Divide(2,2);
2324 canCheckCascade->cd(1);
2325 canCheckCascade->cd(1)->SetLogy();
2326 fHistTrackMultiplicity->SetMarkerStyle(kFullStar);
2327 fHistTrackMultiplicity->GetXaxis()->SetLabelFont(42);
2328 fHistTrackMultiplicity->GetYaxis()->SetLabelFont(42);
2329 fHistTrackMultiplicity->SetTitleFont(42, "xy");
2330 fHistTrackMultiplicity->GetXaxis()->SetTitleOffset(1.1);
2331 fHistTrackMultiplicity->DrawCopy("H");
2333 canCheckCascade->cd(2);
2334 fHistMassXiMinus ->SetMarkerStyle(kFullCircle);
2335 fHistMassXiMinus ->SetMarkerSize(0.5);
2336 fHistMassXiMinus ->GetXaxis()->SetLabelFont(42);
2337 fHistMassXiMinus ->GetYaxis()->SetLabelFont(42);
2338 fHistMassXiMinus ->SetTitleFont(42, "xy");
2339 fHistMassXiMinus ->GetXaxis()->SetTitleOffset(1.1);
2340 fHistMassXiMinus ->GetYaxis()->SetTitleOffset(1.3);
2341 //fHistMassXiMinus->Rebin(2);
2342 fHistMassXiMinus ->GetXaxis()->SetRangeUser(1.24, 1.42);
2343 fHistMassXiMinus ->DrawCopy("E");
2345 fHistMassXiPlus ->SetMarkerStyle(kOpenCircle);
2346 fHistMassXiPlus ->SetMarkerColor(kRed+2);
2347 fHistMassXiPlus ->SetLineColor(kRed+2);
2348 fHistMassXiPlus ->SetMarkerSize(0.5);
2349 //fHistMassXiPlus ->Rebin(2);
2350 fHistMassXiPlus ->DrawCopy("ESAME");
2353 TLegend *legendXi =new TLegend(0.67,0.34,0.97,0.54);
2354 legendXi->SetTextFont(42);
2355 legendXi->SetTextSize(0.05);
2356 legendXi->SetFillColor(kWhite);
2357 legendXi->AddEntry( fHistMassXiMinus,"#Xi^{-} candidates","lp");
2358 legendXi->AddEntry( fHistMassXiPlus,"#Xi^{+} candidates","lp");
2362 canCheckCascade->cd(3);
2363 fHistMassOmegaPlus ->SetMarkerStyle(kOpenCircle);
2364 fHistMassOmegaPlus ->SetMarkerColor(kRed+2);
2365 fHistMassOmegaPlus ->SetLineColor(kRed+2);
2366 fHistMassOmegaPlus ->SetMarkerSize(0.5);
2367 fHistMassOmegaPlus ->GetXaxis()->SetLabelFont(42);
2368 fHistMassOmegaPlus ->GetYaxis()->SetLabelFont(42);
2369 fHistMassOmegaPlus ->SetTitleFont(42, "xy");
2370 fHistMassOmegaPlus ->GetXaxis()->SetTitleOffset(1.1);
2371 fHistMassOmegaPlus ->GetYaxis()->SetTitleOffset(1.25);
2372 //fHistMassOmegaPlus ->Rebin(2);
2373 fHistMassOmegaPlus ->GetXaxis()->SetRangeUser(1.6, 1.84);
2374 fHistMassOmegaPlus ->DrawCopy("E");
2376 fHistMassOmegaMinus->SetMarkerStyle(kFullCircle);
2377 fHistMassOmegaMinus->SetMarkerSize(0.5);
2378 //fHistMassOmegaMinus->Rebin(2);
2379 fHistMassOmegaMinus->DrawCopy("ESAME");
2382 TLegend *legendOmega = new TLegend(0.67,0.34,0.97,0.54);
2383 legendOmega->SetTextFont(42);
2384 legendOmega->SetTextSize(0.05);
2385 legendOmega->SetFillColor(kWhite);
2386 legendOmega->AddEntry( fHistMassOmegaMinus,"#Omega^{-} candidates","lp");
2387 legendOmega->AddEntry( fHistMassOmegaPlus,"#Omega^{+} candidates","lp");
2388 legendOmega->Draw();