-/**************************************************************************
- * Authors : Antonin Maire, Boris Hippolyte *
- * Contributors are mentioned in the code where appropriate. *
- * *
- * Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
- * without fee, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission notice *
- * appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpose. It is *
- * provided "as is" without express or implied warranty. *
- **************************************************************************/
-
-//-----------------------------------------------------------------
-// AliAnalysisTaskCheckCascadepp276 class
-//
-// Origin AliAnalysisTaskCheckCascade which has four roles :
-// 1. QAing the Cascades from ESD and AOD
-// Origin: AliAnalysisTaskESDCheckV0 by Boris Hippolyte Nov2007, hippolyt@in2p3.fr
-// 2. Prepare the plots which stand as raw material for yield extraction (wi/wo PID)
-// 3. Supply an AliCFContainer meant to define the optimised topological selections
-// 4. Rough azimuthal correlation study (Eta, Phi)
-// Adapted to Cascade : A.Maire Mar2008, antonin.maire@ires.in2p3.fr
-// Modified : A.Maire Mar2010
-//
-// Adapted to PbPb analysis: M. Nicassio, maria.nicassio@ba.infn.it
-// Feb-August2011
-// - Physics selection moved to the run.C macro
-// - Centrality selection added (+ setters) and histos
-// - flag and setters added (CF container usage, vertex range)
-// - histo added and histo/container binning changed
-// - protection in the destructor for CAF usage
-// - AliWarning disabled
-// - number of tracklets from AOD also
-// - automatic settings for PID
-// September2011
-// - proper time histos/container added (V0 and Cascades)
-// - cosine PA V0 wrt Xi vertex in the container
-// November2011
-// - re-run V0's and cascade's vertexers (SetCuts instead SetDefaultCuts!!)
-// - problems of libraries on Grid --> code copied in the task (from AliRoot v5-10-AN
-// where new pt dependent V0's cosPA cut implemented by Iouri)
-// - AOD analysis part completed
-//
-//
-// Adapted to pp 2.76 analysis: D. Colella, domenico.colella@ba.infn.it
-// Gen-now 2012
-// - Physics selection re-moved here (mainly for normalization in the efficiency calcuation)
-// - Centrality selection deleted
-// -
-//
-//-----------------------------------------------------------------
-
-class TTree;
-class TParticle;
-class TVector3;
-
-class AliESDVertex;
-class AliAODVertex;
-class AliESDv0;
-class AliAODv0;
-
-#include <Riostream.h>
-#include "TList.h"
-#include "TH1.h"
-#include "TH2.h"
-#include "TH3.h"
-#include "THnSparse.h"
-#include "TVector3.h"
-#include "TCanvas.h"
-#include "TMath.h"
-#include "TLegend.h"
-
-#include "AliLog.h"
-#include "AliESDEvent.h"
-#include "AliAODEvent.h"
-#include "AliV0vertexer.h"
-#include "AliCascadeVertexer.h"
-#include "AliESDtrackCuts.h"
-#include "AliPIDResponse.h"
-
-#include "AliESDVZERO.h"
-
-#include "AliInputEventHandler.h"
-#include "AliAnalysisManager.h"
-#include "AliMCEventHandler.h"
-#include "AliESDInputHandler.h"
-#include "AliAODInputHandler.h"
-#include "AliCFContainer.h"
-#include "AliMultiplicity.h"
-
-#include "AliESDcascade.h"
-#include "AliAODcascade.h"
-#include "AliAODTrack.h"
-
-#include "AliAnalysisTaskCheckCascadepp276.h"
-
-
-using std::cout;
-using std::endl;
-
-ClassImp(AliAnalysisTaskCheckCascadepp276)
-
-
-
-//________________________________________________________________________
-AliAnalysisTaskCheckCascadepp276::AliAnalysisTaskCheckCascadepp276()
- : AliAnalysisTaskSE(),
- fAnalysisType ("ESD"),
- fESDtrackCuts (0),
- fPIDResponse (0),
- fkRerunV0CascVertexers (0),
- fkSDDSelectionOn (kTRUE),
- fkQualityCutZprimVtxPos (kTRUE),
- fkQualityCutNoTPConlyPrimVtx(kTRUE),
- fkQualityCutTPCrefit (kTRUE),
- fkQualityCutnTPCcls (kTRUE),
- fkQualityCutPileup (kTRUE),
- fwithSDD (kTRUE),
- fMinnTPCcls (0),
- fkExtraSelections (0),
- fVtxRange (0),
- fVtxRangeMin (0),
- fMinPtCutOnDaughterTracks (0),
- fEtaCutOnDaughterTracks (0),
-
- // - Plots initialisation
- fListHistCascade(0),
- // Cascades multiplicity plots
- fHistCascadeMultiplicityBeforeAnySel(0),
- fHistCascadeMultiplicityAfterSDDSel(0),
- fHistCascadeMultiplicityAfterPhysicsSel(0),
- fHistCascadeMultiplicityForSelEvtNoTPCOnly(0),
- fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup(0),
- fHistCascadeMultiplicityAfterVertexCutSel(0),
- // Tracks multiplicity plots
- fHistTrackMultiplicityBeforeAnySel(0),
- fHistTrackMultiplicityAfterSDDSel(0),
- fHistTrackMultiplicityAfterPhysicsSel(0),
- fHistTrackMultiplicityForSelEvtNoTPCOnly(0),
- fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup(0),
- fHistTrackMultiplicityAfterVertexCutSel(0),
- // Vertex position plots (BestVertex)
- fHistPVx(0), fHistPVy(0), fHistPVz(0),
- fHistPVxAnalysis(0), fHistPVyAnalysis(0), fHistPVzAnalysis(0),
- // TPC cluster distributions for daughters
- fHistPosV0TPCClusters(0),
- fHistNegV0TPCClusters(0),
- fHistBachTPCClusters(0),
- // Cut's variables distributions
- fHistEffMassXi(0),
- fHistDcaXiDaughters(0),
- fHistDcaBachToPrimVertex(0),
- fHistXiCosineOfPointingAngle(0),
- fHistXiRadius(0),
- fHistMassLambdaAsCascDghter(0),
- fHistDcaV0DaughtersXi(0),
- fHistDcaV0ToPrimVertexXi(0),
- fHistV0CosineOfPointingAngleXi(0),
- fHistV0RadiusXi(0),
- fHistDcaPosToPrimVertexXi(0),
- fHistDcaNegToPrimVertexXi(0),
- // Invariant mass distributions
- fHistMassXiMinus(0), fHistMassXiPlus(0), fHistMassOmegaMinus(0), fHistMassOmegaPlus(0),
- // Transverse and total momentum distributions
- fHistXiTransvMom(0), fHistXiTotMom(0), fHistBachTransvMomXi(0), fHistBachTotMomXi(0),
- // Others QA plots
- fHistChargeXi(0),
- fHistV0toXiCosineOfPointingAngle(0),
- fHistRapXi(0), fHistRapOmega(0),
- fHistEtaXi(0), fHistEtaBachXi(0), fHistEtaPosXi(0), fHistEtaNegXi(0),
- fHistThetaXi(0),
- fHistPhiXi(0),
- f2dHistArmenteros(0),
- f2dHistEffMassLambdaVsEffMassXiMinus(0), f2dHistEffMassXiVsEffMassOmegaMinus(0),
- f2dHistEffMassLambdaVsEffMassXiPlus(0), f2dHistEffMassXiVsEffMassOmegaPlus(0),
- f2dHistXiRadiusVsEffMassXiMinus(0), f2dHistXiRadiusVsEffMassXiPlus(0),
- f2dHistXiRadiusVsEffMassOmegaMinus(0), f2dHistXiRadiusVsEffMassOmegaPlus(0),
- f2dHistTPCdEdxOfCascDghters(0),
- f2dHistDcaXiDaughtersvsInvMass(0),
- f2dHistDcaBachToPrimVertexvsInvMass(0),
- f2dHistXiCosineOfPointingAnglevsInvMass(0),
- f2dHistMassLambdaAsCascDghtervsInvMass(0),
- f2dHistDcaV0DaughtersXivsInvMass(0),
- f2dHistDcaV0ToPrimVertexXivsInvMass(0),
- // Containers for cuts study
- fCFContCascadePIDXiMinus(0),
- fCFContCascadePIDXiPlus(0),
- fCFContCascadePIDOmegaMinus(0),
- fCFContCascadePIDOmegaPlus(0),
- fCFContCascadeCuts(0)
-
- {
- // Dummy Constructor
- for(Int_t iV0selIdx = 0; iV0selIdx < 7; iV0selIdx++ ) { fV0Sels [iV0selIdx ] = -1.; }
- for(Int_t iCascSelIdx = 0; iCascSelIdx < 8; iCascSelIdx++ ) { fCascSels [iCascSelIdx ] = -1.; }
- }
-
-
-//________________________________________________________________________
-AliAnalysisTaskCheckCascadepp276::AliAnalysisTaskCheckCascadepp276(const char *name)
- : AliAnalysisTaskSE(name),
- fAnalysisType ("ESD"),
- fESDtrackCuts (0),
- fPIDResponse (0),
- fkRerunV0CascVertexers (0),
- fkSDDSelectionOn (kTRUE),
- fkQualityCutZprimVtxPos (kTRUE),
- fkQualityCutNoTPConlyPrimVtx(kTRUE),
- fkQualityCutTPCrefit (kTRUE),
- fkQualityCutnTPCcls (kTRUE),
- fkQualityCutPileup (kTRUE),
- fwithSDD (kTRUE),
- fMinnTPCcls (0),
- fkExtraSelections (0),
- fVtxRange (0),
- fVtxRangeMin (0),
- fMinPtCutOnDaughterTracks (0),
- fEtaCutOnDaughterTracks (0),
-
- // - Plots initialisation
- fListHistCascade(0),
-
- // Cascades multiplicity plots
- fHistCascadeMultiplicityBeforeAnySel(0),
- fHistCascadeMultiplicityAfterSDDSel(0),
- fHistCascadeMultiplicityAfterPhysicsSel(0),
- fHistCascadeMultiplicityForSelEvtNoTPCOnly(0),
- fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup(0),
- fHistCascadeMultiplicityAfterVertexCutSel(0),
- // Tracks multiplicity plots
- fHistTrackMultiplicityBeforeAnySel(0),
- fHistTrackMultiplicityAfterSDDSel(0),
- fHistTrackMultiplicityAfterPhysicsSel(0),
- fHistTrackMultiplicityForSelEvtNoTPCOnly(0),
- fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup(0),
- fHistTrackMultiplicityAfterVertexCutSel(0),
- // Vertex position plots (BestVertex)
- fHistPVx(0), fHistPVy(0), fHistPVz(0),
- fHistPVxAnalysis(0), fHistPVyAnalysis(0), fHistPVzAnalysis(0),
- // TPC cluster distributions for daughters
- fHistPosV0TPCClusters(0), fHistNegV0TPCClusters(0), fHistBachTPCClusters(0),
- // Cut's variables distributions
- fHistEffMassXi(0),
- fHistDcaXiDaughters(0),
- fHistDcaBachToPrimVertex(0),
- fHistXiCosineOfPointingAngle(0),
- fHistXiRadius(0),
- fHistMassLambdaAsCascDghter(0),
- fHistDcaV0DaughtersXi(0),
- fHistDcaV0ToPrimVertexXi(0),
- fHistV0CosineOfPointingAngleXi(0),
- fHistV0RadiusXi(0),
- fHistDcaPosToPrimVertexXi(0),
- fHistDcaNegToPrimVertexXi(0),
- // Invariant mass distributions
- fHistMassXiMinus(0), fHistMassXiPlus(0), fHistMassOmegaMinus(0), fHistMassOmegaPlus(0),
- // Transverse and total momentum distributions
- fHistXiTransvMom(0), fHistXiTotMom(0), fHistBachTransvMomXi(0), fHistBachTotMomXi(0),
- // Others QA plots
- fHistChargeXi(0),
- fHistV0toXiCosineOfPointingAngle(0),
- fHistRapXi(0), fHistRapOmega(0),
- fHistEtaXi(0), fHistEtaBachXi(0), fHistEtaPosXi(0), fHistEtaNegXi(0),
- fHistThetaXi(0),
- fHistPhiXi(0),
- f2dHistArmenteros(0),
- f2dHistEffMassLambdaVsEffMassXiMinus(0), f2dHistEffMassXiVsEffMassOmegaMinus(0),
- f2dHistEffMassLambdaVsEffMassXiPlus(0), f2dHistEffMassXiVsEffMassOmegaPlus(0),
- f2dHistXiRadiusVsEffMassXiMinus(0), f2dHistXiRadiusVsEffMassXiPlus(0),
- f2dHistXiRadiusVsEffMassOmegaMinus(0), f2dHistXiRadiusVsEffMassOmegaPlus(0),
- f2dHistTPCdEdxOfCascDghters(0),
- f2dHistDcaXiDaughtersvsInvMass(0),
- f2dHistDcaBachToPrimVertexvsInvMass(0),
- f2dHistXiCosineOfPointingAnglevsInvMass(0),
- f2dHistMassLambdaAsCascDghtervsInvMass(0),
- f2dHistDcaV0DaughtersXivsInvMass(0),
- f2dHistDcaV0ToPrimVertexXivsInvMass(0),
- // Containers for cuts study
- fCFContCascadePIDXiMinus(0),
- fCFContCascadePIDXiPlus(0),
- fCFContCascadePIDOmegaMinus(0),
- fCFContCascadePIDOmegaPlus(0),
- fCFContCascadeCuts(0)
-
- //_____Costructor____
- {
- // Define input and output slots here
- // Input slot #0 works with a TChain
- // DefineInput(0, TChain::Class());
- // Output slot #1 writes into a TList container (cascade)
- // default p-p values
- fV0Sels[0] = 33. ; // max allowed chi2
- fV0Sels[1] = 0.073; // min allowed impact parameter for the 1st daughter
- fV0Sels[2] = 0.073; // min allowed impact parameter for the 2nd daughter
- fV0Sels[3] = 1.18; // max allowed DCA between the daughter tracks
- fV0Sels[4] = .983; // min allowed cosine of V0's pointing angle
- fV0Sels[5] = 2.67; // min radius of the fiducial volume
- fV0Sels[6] = 100.; // max radius of the fiducial volume
-
- fCascSels[0] = 33.; // max allowed chi2 (same as PDC07)
- fCascSels[1] = 0.03; // min allowed V0 impact parameter
- fCascSels[2] = 0.008; // "window" around the Lambda mass
- fCascSels[3] = 0.0204; // min allowed bachelor's impact parameter
- fCascSels[4] = 1.68; // max allowed DCA between the V0 and the bachelor
- fCascSels[5] = 0.9826; // min allowed cosine of the cascade pointing angle
- fCascSels[6] = 0.38; // min radius of the fiducial volume
- fCascSels[7] = 100.; // max radius of the fiducial volume
-
- // Output slot #0 writes into a TList container (Cascade)
- DefineOutput(1, TList::Class());
- DefineOutput(2, AliCFContainer::Class());
- DefineOutput(3, AliCFContainer::Class());
- DefineOutput(4, AliCFContainer::Class());
- DefineOutput(5, AliCFContainer::Class());
- DefineOutput(6, AliCFContainer::Class());
- AliLog::SetClassDebugLevel("AliAnalysisTaskCheckCascadepp276",1);
- }
-
-
- //_____Destructor_____
- AliAnalysisTaskCheckCascadepp276::~AliAnalysisTaskCheckCascadepp276() {
- // For all TH1, 2, 3 HnSparse and CFContainer are in the fListCascade TList.
- // They will be deleted when fListCascade is deleted by the TSelector dtor
- // Because of TList::SetOwner() ...
- if (fListHistCascade && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) { delete fListHistCascade; fListHistCascade = 0x0; }
- if (fCFContCascadePIDXiMinus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) { delete fCFContCascadePIDXiMinus; fCFContCascadePIDXiMinus = 0x0; }
- if (fCFContCascadePIDXiPlus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) { delete fCFContCascadePIDXiPlus; fCFContCascadePIDXiPlus = 0x0; }
- if (fCFContCascadePIDOmegaMinus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()){ delete fCFContCascadePIDOmegaMinus; fCFContCascadePIDOmegaMinus = 0x0; }
- if (fCFContCascadePIDOmegaPlus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) { delete fCFContCascadePIDOmegaPlus; fCFContCascadePIDOmegaPlus = 0x0; }
- if (fCFContCascadeCuts && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) { delete fCFContCascadeCuts; fCFContCascadeCuts = 0x0; }
- if (fESDtrackCuts) { delete fESDtrackCuts; fESDtrackCuts = 0x0; }
- }
-
-
-//________________________________________________________________________
-void AliAnalysisTaskCheckCascadepp276::UserCreateOutputObjects() {
- // Create histograms
- // Called once
-
-
- fListHistCascade = new TList();
- fListHistCascade->SetOwner(); // See http://root.cern.ch/root/html/TCollection.html#TCollection:SetOwner
-
- //-----------------------------------------------
- // Particle Identification Setup (new PID object)
- //-----------------------------------------------
- AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager();
- AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
- fPIDResponse = inputHandler->GetPIDResponse();
-
- // Only used to get the number of primary reconstructed tracks
- if (fAnalysisType == "ESD" && (! fESDtrackCuts )){
- fESDtrackCuts = new AliESDtrackCuts();
- }
-
- //---------------------------------------------------
- // Initialize cuts to re-run V0 and cascade vertexers
- //---------------------------------------------------
- // Not validated; to be checked
- fV0Sels[0] = 33. ; // max allowed chi2
- fV0Sels[1] = 0.073; // min allowed impact parameter for the 1st daughter
- fV0Sels[2] = 0.073; // min allowed impact parameter for the 2nd daughter
- fV0Sels[3] = 1.18; // max allowed DCA between the daughter tracks
- fV0Sels[4] = .983; // min allowed cosine of V0's pointing angle
- fV0Sels[5] = 2.67; // min radius of the fiducial volume
- fV0Sels[6] = 100.; // max radius of the fiducial volume
-
- fCascSels[0] = 33.; // max allowed chi2 (same as PDC07)
- fCascSels[1] = 0.03; // min allowed V0 impact parameter
- fCascSels[2] = 0.008; // "window" around the Lambda mass
- fCascSels[3] = 0.0204; // min allowed bachelor's impact parameter //check cuts
- fCascSels[4] = 1.68; // max allowed DCA between the V0 and the bachelor
- fCascSels[5] = 0.9826; // min allowed cosine of the cascade pointing angle
- fCascSels[6] = 0.38; // min radius of the fiducial volume
- fCascSels[7] = 100.; // max radius of the fiducial volume
-
- //----------------------
- // Initialize the histos
- //----------------------
-
- // - Cascades multiplicity plots
- if(! fHistCascadeMultiplicityBeforeAnySel) {
- fHistCascadeMultiplicityBeforeAnySel = new TH1F("fHistCascadeMultiplicityBeforeAnySel",
- "Cascades per event (before any selections);Nbr of Cascades/Evt;Events",
- 50, 0, 50);
- fListHistCascade->Add(fHistCascadeMultiplicityBeforeAnySel);
- }
- if(! fHistCascadeMultiplicityAfterSDDSel) {
- fHistCascadeMultiplicityAfterSDDSel = new TH1F("fHistCascadeMultiplicityAfterSDDSel",
- "Cascades per event (after the SDD selection);Nbr of Cascades/Evt;Events",
- 50, 0, 50);
- fListHistCascade->Add(fHistCascadeMultiplicityAfterSDDSel);
- }
- if(! fHistCascadeMultiplicityAfterPhysicsSel) {
- fHistCascadeMultiplicityAfterPhysicsSel = new TH1F("fHistCascadeMultiplicityAfterPhysicsSel",
- "Cascades per event (after physics selection);Nbr of Cascades/Evt;Events",
- 50, 0, 50);
- fListHistCascade->Add(fHistCascadeMultiplicityAfterPhysicsSel);
- }
- if(! fHistCascadeMultiplicityForSelEvtNoTPCOnly) {
- fHistCascadeMultiplicityForSelEvtNoTPCOnly = new TH1F("fHistCascadeMultiplicityForSelEvtNoTPCOnly",
- "Cascades per event (for selected events with well-established PV);Nbr of Cascades/Evt;Events",
- 50, 0, 50);
- fListHistCascade->Add(fHistCascadeMultiplicityForSelEvtNoTPCOnly);
- }
- if(! fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup) {
- fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup = new TH1F("fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup",
- "Cascades per event (for selected events with well-establisched PV and no pile-up);Nbr of Cascades/Evt;Events",
- 50, 0, 50);
- fListHistCascade->Add(fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup);
- }
- if(! fHistCascadeMultiplicityAfterVertexCutSel) {
- fHistCascadeMultiplicityAfterVertexCutSel = new TH1F("fHistCascadeMultiplicityAfterVertexCutSel",
- "Cascades per event (after vertex cut selection);Nbr of Cascades/Evt;Events",
- 50, 0, 50);
- fListHistCascade->Add(fHistCascadeMultiplicityAfterVertexCutSel);
- }
- // - Tracks multiplicity plots
- if(! fHistTrackMultiplicityBeforeAnySel) {
- fHistTrackMultiplicityBeforeAnySel = new TH1F("fHistTrackMultiplicityBeforeAnySel",
- "Tracks per event (before any selections);Nbr of Cascades/Evt;Events",
- 200, 0, 200);
- fListHistCascade->Add(fHistTrackMultiplicityBeforeAnySel);
- }
- if(! fHistTrackMultiplicityAfterSDDSel) {
- fHistTrackMultiplicityAfterSDDSel = new TH1F("fHistTrackMultiplicityAfterSDDSel",
- "Tracks per event (after the SDD selection);Nbr of Cascades/Evt;Events",
- 200, 0, 200);
- fListHistCascade->Add(fHistTrackMultiplicityAfterSDDSel);
- }
- if(! fHistTrackMultiplicityAfterPhysicsSel) {
- fHistTrackMultiplicityAfterPhysicsSel = new TH1F("fHistTrackMultiplicityAfterPhysicsSel",
- "Tracks per event (after physics selection);Nbr of Cascades/Evt;Events",
- 200, 0, 200);
- fListHistCascade->Add(fHistTrackMultiplicityAfterPhysicsSel);
- }
- if(! fHistTrackMultiplicityForSelEvtNoTPCOnly) {
- fHistTrackMultiplicityForSelEvtNoTPCOnly = new TH1F("fHistTrackMultiplicityForSelEvtNoTPCOnly",
- "Tracks per event (for selected events with well-established PV);Nbr of Cascades/Evt;Events",
- 200, 0, 200);
- fListHistCascade->Add(fHistTrackMultiplicityForSelEvtNoTPCOnly);
- }
- if(! fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup) {
- fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = new TH1F("fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup",
- "Tracks per event (for selected events with well-establisched PV and no pile-up);Nbr of Cascades/Evt;Events",
- 200, 0, 200);
- fListHistCascade->Add(fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup);
- }
- if(! fHistTrackMultiplicityAfterVertexCutSel) {
- fHistTrackMultiplicityAfterVertexCutSel = new TH1F("fHistTrackMultiplicityAfterVertexCutSel",
- "Tracks per event (after vertex cut selection);Nbr of Cascades/Evt;Events",
- 200, 0, 200);
- fListHistCascade->Add(fHistTrackMultiplicityAfterVertexCutSel);
- }
- // - Vertex position plots
- if(! fHistPVx ){
- fHistPVx = new TH1F("fHistPVx", "Best PV position in x; x (cm); Events", 2000, -0.5, 0.5);
- fListHistCascade->Add(fHistPVx);
- }
- if(! fHistPVy ){
- fHistPVy = new TH1F("fHistPVy", "Best PV position in y; y (cm); Events", 2000, -0.5, 0.5);
- fListHistCascade->Add(fHistPVy);
- }
- if(! fHistPVz ){
- fHistPVz = new TH1F("fHistPVz", "Best PV position in z; z (cm); Events", 400, -20, 20);
- fListHistCascade->Add(fHistPVz);
- }
- if(! fHistPVxAnalysis ){
- fHistPVxAnalysis = new TH1F("fHistPVxAnalysis", "Best PV position in x (after events selections); x (cm); Events", 2000, -0.5, 0.5);
- fListHistCascade->Add(fHistPVxAnalysis);
- }
- if(! fHistPVyAnalysis ){
- fHistPVyAnalysis = new TH1F("fHistPVyAnalysis", "Best PV position in y (after events selections); y (cm); Events", 2000, -0.5, 0.5);
- fListHistCascade->Add(fHistPVyAnalysis);
- }
- if(! fHistPVzAnalysis ){
- fHistPVzAnalysis = new TH1F("fHistPVzAnalysis", "Best PV position in z (after events selections); z (cm); Events", 400, -20, 20);
- fListHistCascade->Add(fHistPVzAnalysis);
- }
- // - TPC clusetr sdistributions for daughters (histos for events containing at least ONE CASCADE)
- if(! fHistPosV0TPCClusters ){
- 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);
- fListHistCascade->Add(fHistPosV0TPCClusters);
- }
- if(! fHistNegV0TPCClusters ){
- 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);
- fListHistCascade->Add(fHistNegV0TPCClusters);
- }
- if(! fHistBachTPCClusters ){
- fHistBachTPCClusters = new TH1F("fHistBachTPCClusters", "TPC clusters for Bachelor track; Nbr of TPC clusters (Bach); Track counts", 165, 0.0, 165.0);
- fListHistCascade->Add(fHistBachTPCClusters);
- }
- // - Cut's variables distributions (typical histos for cascades): as example only for the Xi (both particle and anti-particle)
- if(! fHistEffMassXi) {
- fHistEffMassXi = new TH1F("fHistEffMassXi", "Xi candidates; Invariant Mass (GeV/c^{2}); Counts", 400, 1.2, 2.0);
- fListHistCascade->Add(fHistEffMassXi);
- }
- if(! fHistDcaXiDaughters ){
- fHistDcaXiDaughters = new TH1F("fHistDcaXiDaughters", "DCA between Xi daughters; DCA (cm); Counts", 210, 0., 2.1);
- fListHistCascade->Add(fHistDcaXiDaughters);
- }
- if(! fHistDcaBachToPrimVertex) {
- fHistDcaBachToPrimVertex = new TH1F("fHistDcaBachToPrimVertex", "Impact parameter of Bach. to Prim. Vertex; DCA (cm); Counts", 250, 0., 0.25);
- fListHistCascade->Add(fHistDcaBachToPrimVertex);
- }
- if(! fHistXiCosineOfPointingAngle) {
- fHistXiCosineOfPointingAngle = new TH1F("fHistXiCosineOfPointingAngle", "Cosine of Xi Pointing Angle; Cos (Xi Point.Angl); Counts", 301, 0.97, 1.0001);
- fListHistCascade->Add(fHistXiCosineOfPointingAngle);
- }
- if(! fHistXiRadius ){
- fHistXiRadius = new TH1F("fHistXiRadius", "Cascade decay transv. radius; r (cm); Counts" , 1050, 0., 105.0);
- fListHistCascade->Add(fHistXiRadius);
- }
- if(! fHistMassLambdaAsCascDghter) {
- fHistMassLambdaAsCascDghter = new TH1F("fHistMassLambdaAsCascDghter", "#Lambda associated to cascade candidates; Eff. Mass (GeV/c^{2}); Counts", 300, 1.0, 1.3);
- fListHistCascade->Add(fHistMassLambdaAsCascDghter);
- }
- if(! fHistDcaV0DaughtersXi) {
- fHistDcaV0DaughtersXi = new TH1F("fHistDcaV0DaughtersXi", "DCA between V0 daughters, in cascade; DCA (cm); Counts", 320, 0., 1.6);
- fListHistCascade->Add(fHistDcaV0DaughtersXi);
- }
- if(! fHistDcaV0ToPrimVertexXi) {
- fHistDcaV0ToPrimVertexXi = new TH1F("fHistDcaV0ToPrimVertexXi", "Impact parameter of V0 to Prim. Vertex, in cascade; DCA (cm); Counts", 200, 0., 1.);
- fListHistCascade->Add(fHistDcaV0ToPrimVertexXi);
- }
- if(! fHistV0CosineOfPointingAngleXi) {
- fHistV0CosineOfPointingAngleXi = new TH1F("fHistV0CosineOfPointingAngleXi", "Cosine of V0 Pointing Angle, in cascade; Cos(V0 Point. Angl); Counts", 201, 0.8, 1.001);
- fListHistCascade->Add(fHistV0CosineOfPointingAngleXi);
- }
- if(! fHistV0RadiusXi) {
- fHistV0RadiusXi = new TH1F("fHistV0RadiusXi", "V0 decay radius, in cascade; radius (cm); Counts", 1050, 0., 105.0);
- fListHistCascade->Add(fHistV0RadiusXi);
- }
- if(! fHistDcaPosToPrimVertexXi) {
- fHistDcaPosToPrimVertexXi = new TH1F("fHistDcaPosToPrimVertexXi", "Impact parameter of V0 pos daughter to Prim. Vertex; DCA (cm); Counts", 300, 0, 3);
- fListHistCascade->Add(fHistDcaPosToPrimVertexXi);
- }
- if(! fHistDcaNegToPrimVertexXi) {
- fHistDcaNegToPrimVertexXi = new TH1F("fHistDcaNegToPrimVertexXi", "Impact parameter of V0 neg daughter to Prim. Vertex; DCA (cm); Counts", 300, 0, 3);
- fListHistCascade->Add(fHistDcaNegToPrimVertexXi);
- }
- // - Effective mass histos for cascades.
- //By cascade hyp
- if(! fHistMassXiMinus) {
- fHistMassXiMinus = new TH1F("fHistMassXiMinus", "#Xi^{-} candidates; M( #Lambda , #pi^{-} ) (GeV/c^{2});Counts", 400, 1.2, 2.0);
- fListHistCascade->Add(fHistMassXiMinus);
- }
- if(! fHistMassXiPlus) {
- fHistMassXiPlus = new TH1F("fHistMassXiPlus", "#Xi^{+} candidates; M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2});Counts", 400, 1.2, 2.0);
- fListHistCascade->Add(fHistMassXiPlus);
- }
- if(! fHistMassOmegaMinus) {
- fHistMassOmegaMinus = new TH1F("fHistMassOmegaMinus", "#Omega^{-} candidates; M( #Lambda , K^{-} ) (GeV/c^{2});Counts", 500, 1.5, 2.5);
- fListHistCascade->Add(fHistMassOmegaMinus);
- }
- if(! fHistMassOmegaPlus) {
- fHistMassOmegaPlus = new TH1F("fHistMassOmegaPlus", "#Omega^{+} candidates;M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5);
- fListHistCascade->Add(fHistMassOmegaPlus);
- }
- // - Transverse and total momentum distributions
- if(! fHistXiTransvMom ){
- fHistXiTransvMom = new TH1F("fHistXiTransvMom", "#Xi transverse momentum (cand. around the mass peak); p_{t}(#Xi) (GeV/c); Counts", 100, 0.0, 10.0);
- fListHistCascade->Add(fHistXiTransvMom);
- }
- if(! fHistXiTotMom ){
- fHistXiTotMom = new TH1F("fHistXiTotMom", "#Xi momentum norm (cand. around the mass peak); p_{tot}(#Xi) (GeV/c); Counts", 150, 0.0, 15.0);
- fListHistCascade->Add(fHistXiTotMom);
- }
- if(! fHistBachTransvMomXi ){
- fHistBachTransvMomXi = new TH1F("fHistBachTransvMomXi", "#Xi Bach. transverse momentum (cand. around the mass peak); p_{t}(Bach.) (GeV/c); Counts", 100, 0.0, 5.0);
- fListHistCascade->Add(fHistBachTransvMomXi);
- }
- if(! fHistBachTotMomXi ){
- fHistBachTotMomXi = new TH1F("fHistBachTotMomXi", "#Xi Bach. momentum norm (cand. around the mass peak); p_{tot}(Bach.) (GeV/c); Counts", 100, 0.0, 5.0);
- fListHistCascade->Add(fHistBachTotMomXi);
- }
- // - Others QA plots
- //TH1
- if(! fHistChargeXi ){
- fHistChargeXi = new TH1F("fHistChargeXi", "Charge of Xi candidates; Sign; Counts", 5, -2.0, 3.0);
- fListHistCascade->Add(fHistChargeXi);
- }
- if(! fHistV0toXiCosineOfPointingAngle) {
- fHistV0toXiCosineOfPointingAngle = new TH1F("fHistV0toXiCosineOfPointingAngle", "Cos. of V0 Ptng Angl / Xi vtx ; Cos(V0 Point. Angl / Xi vtx); Counts", 1101, 0.89, 1.0001);
- fListHistCascade->Add(fHistV0toXiCosineOfPointingAngle);
- }
- if(! fHistRapXi ){
- fHistRapXi = new TH1F("fHistRapXi", "Rapidity of #Xi candidates (around the mass peak); y; Counts", 20, -1.0, 1.0);
- fListHistCascade->Add(fHistRapXi);
- }
- if(! fHistRapOmega ){
- fHistRapOmega = new TH1F("fHistRapOmega", "Rapidity of #Omega candidates (around the mass peak); y; Counts", 20, -1.0, 1.0);
- fListHistCascade->Add(fHistRapOmega);
- }
- if(! fHistEtaXi ){
- fHistEtaXi = new TH1F("fHistEtaXi", "Pseudo-rap. of #Xi candidates (around the mass peak); #eta; Counts", 20, -1.0, 1.0);
- fListHistCascade->Add(fHistEtaXi);
- }
- if(! fHistEtaBachXi){
- fHistEtaBachXi = new TH1F("fHistEtaBachXi", "Pseudo-rap. of #Xi bachelor; #eta; Counts", 40, -2.0, 2.0);
- fListHistCascade->Add(fHistEtaBachXi);
- }
- if(! fHistEtaPosXi){
- fHistEtaPosXi = new TH1F("fHistEtaPosXi", "Pseudo-rap. of #Xi positive meson daughter; #eta; Counts", 40, -2.0, 2.0);
- fListHistCascade->Add(fHistEtaPosXi);
- }
- if(! fHistEtaNegXi){
- fHistEtaNegXi = new TH1F("fHistEtaNegXi", "Pseudo-rap. of #Xi negative meson daughter; #eta; Counts", 40, -2.0, 2.0);
- fListHistCascade->Add(fHistEtaNegXi);
- }
- if(! fHistThetaXi ){
- fHistThetaXi = new TH1F("fHistThetaXi", "#theta of #Xi candidates (around the mass peak); #theta (deg); Counts", 180, 0., 180.0);
- fListHistCascade->Add(fHistThetaXi);
- }
- if(! fHistPhiXi ){
- fHistPhiXi = new TH1F("fHistPhiXi", "#phi of #Xi candidates (around the mass peak); #phi (deg); Counts", 360, 0., 360.);
- fListHistCascade->Add(fHistPhiXi);
- }
- if(! f2dHistArmenteros) {
- 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);
- fListHistCascade->Add(f2dHistArmenteros);
- }
- //TH2
- if(! f2dHistEffMassLambdaVsEffMassXiMinus) {
- 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);
- fListHistCascade->Add(f2dHistEffMassLambdaVsEffMassXiMinus);
- }
- if(! f2dHistEffMassXiVsEffMassOmegaMinus) {
- 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);
- fListHistCascade->Add(f2dHistEffMassXiVsEffMassOmegaMinus);
- }
- if(! f2dHistEffMassLambdaVsEffMassXiPlus) {
- 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);
- fListHistCascade->Add(f2dHistEffMassLambdaVsEffMassXiPlus);
- }
- if(! f2dHistEffMassXiVsEffMassOmegaPlus) {
- 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);
- fListHistCascade->Add(f2dHistEffMassXiVsEffMassOmegaPlus);
- }
- if(! f2dHistXiRadiusVsEffMassXiMinus) {
- 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);
- fListHistCascade->Add(f2dHistXiRadiusVsEffMassXiMinus);
- }
- if(! f2dHistXiRadiusVsEffMassXiPlus) {
- 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);
- fListHistCascade->Add(f2dHistXiRadiusVsEffMassXiPlus);
- }
- if(! f2dHistXiRadiusVsEffMassOmegaMinus) {
- 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);
- fListHistCascade->Add(f2dHistXiRadiusVsEffMassOmegaMinus);
- }
- if(! f2dHistXiRadiusVsEffMassOmegaPlus) {
- 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);
- fListHistCascade->Add(f2dHistXiRadiusVsEffMassOmegaPlus);
- }
- if(! f2dHistTPCdEdxOfCascDghters){
- 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.);
- fListHistCascade->Add(f2dHistTPCdEdxOfCascDghters);
- }
- if(! f2dHistDcaXiDaughtersvsInvMass){
- f2dHistDcaXiDaughtersvsInvMass = new TH2F("f2dHistDcaXiDaughtersvsInvMass", "DCA between Xi Daughters; DCA (cm); Number of Cascades", 100, 0., 0.5, 400, 1.2, 2.0);
- fListHistCascade->Add(f2dHistDcaXiDaughtersvsInvMass);
- }
- if(! f2dHistDcaBachToPrimVertexvsInvMass) {
- f2dHistDcaBachToPrimVertexvsInvMass = new TH2F("f2dHistDcaBachToPrimVertexvsInvMass", "DCA of Bach. to Prim. Vertex; DCA (cm); Number of Cascades", 250, 0., 0.25, 400, 1.2, 2.0);
- fListHistCascade->Add(f2dHistDcaBachToPrimVertexvsInvMass);
- }
- if(! f2dHistXiCosineOfPointingAnglevsInvMass){
- 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);
- fListHistCascade->Add(f2dHistXiCosineOfPointingAnglevsInvMass);
- }
- if(! f2dHistMassLambdaAsCascDghtervsInvMass){
- 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);
- fListHistCascade->Add(f2dHistMassLambdaAsCascDghtervsInvMass);
- }
- if(! f2dHistDcaV0DaughtersXivsInvMass){
- f2dHistDcaV0DaughtersXivsInvMass = new TH2F("f2dHistDcaV0DaughtersXivsInvMass", "DCA between V0 daughters, in cascade; DCA (cm); Number of V0s", 120, 0., 0.6, 400, 1.2, 2.0);
- fListHistCascade->Add(f2dHistDcaV0DaughtersXivsInvMass);
- }
- if(! f2dHistDcaV0ToPrimVertexXivsInvMass){
- 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);
- fListHistCascade->Add(f2dHistDcaV0ToPrimVertexXivsInvMass);
- }
- // - CFContainer PID study Xi minus
- if(!fCFContCascadePIDXiMinus) {
- const Int_t lNbSteps = 7 ;
- const Int_t lNbVariables = 3 ;
- //Array for the number of bins in each dimension :
- Int_t lNbBinsPerVar[3] = {0};
- lNbBinsPerVar[0] = 100;
- lNbBinsPerVar[1] = 800;
- lNbBinsPerVar[2] = 22;
- if (fkSDDSelectionOn) {
- if (fwithSDD) fCFContCascadePIDXiMinus = new AliCFContainer(Form("fCFContCascadePIDXiMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDon",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{-} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );
- else if (!fwithSDD) fCFContCascadePIDXiMinus = new AliCFContainer(Form("fCFContCascadePIDXiMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDoff",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{-} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );
- } else if (!fkSDDSelectionOn) fCFContCascadePIDXiMinus = new AliCFContainer(Form("fCFContCascadePIDXiMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_woSDD",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{-} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );
- //Setting the bin limits
- fCFContCascadePIDXiMinus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)
- fCFContCascadePIDXiMinus->SetBinLimits(1, 1.2 , 2.0 ); // Xi Effective mass
- fCFContCascadePIDXiMinus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity
- //Setting the step title : one per PID case
- fCFContCascadePIDXiMinus->SetStepTitle(0, "No PID");
- fCFContCascadePIDXiMinus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");
- fCFContCascadePIDXiMinus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");
- fCFContCascadePIDXiMinus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");
- fCFContCascadePIDXiMinus->SetStepTitle(4, "Comb. PID / Bachelor");
- fCFContCascadePIDXiMinus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");
- fCFContCascadePIDXiMinus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");
- //Setting the variable title, per axis
- fCFContCascadePIDXiMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
- fCFContCascadePIDXiMinus->SetVarTitle(1, "M( #Lambda , #pi^{-} ) (GeV/c^{2})");
- fCFContCascadePIDXiMinus->SetVarTitle(2, "Y_{#Xi}");
- fListHistCascade->Add(fCFContCascadePIDXiMinus);
- }
- // - CFContainer PID study Xi plus
- if (!fCFContCascadePIDXiPlus) {
- const Int_t lNbSteps = 7 ;
- const Int_t lNbVariables = 3 ;
- //Array for the number of bins in each dimension :
- Int_t lNbBinsPerVar[3] = {0};
- lNbBinsPerVar[0] = 100;
- lNbBinsPerVar[1] = 800;
- lNbBinsPerVar[2] = 22;
- if (fkSDDSelectionOn) {
- if (fwithSDD) fCFContCascadePIDXiPlus = new AliCFContainer(Form("fCFContCascadePIDXiPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDon",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{+} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );
- else if (!fwithSDD) fCFContCascadePIDXiPlus = new AliCFContainer(Form("fCFContCascadePIDXiPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDoff",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{+} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );
- } else if (!fkSDDSelectionOn) fCFContCascadePIDXiPlus = new AliCFContainer(Form("fCFContCascadePIDXiPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_woSDD",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{+} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );
- //Setting the bin limits
- fCFContCascadePIDXiPlus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)
- fCFContCascadePIDXiPlus->SetBinLimits(1, 1.2 , 2.0 ); // Xi Effective mass
- fCFContCascadePIDXiPlus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity
- //Setting the step title : one per PID case
- fCFContCascadePIDXiPlus->SetStepTitle(0, "No PID");
- fCFContCascadePIDXiPlus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");
- fCFContCascadePIDXiPlus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");
- fCFContCascadePIDXiPlus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");
- fCFContCascadePIDXiPlus->SetStepTitle(4, "Comb. PID / Bachelor");
- fCFContCascadePIDXiPlus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");
- fCFContCascadePIDXiPlus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");
- //Setting the variable title, per axis
- fCFContCascadePIDXiPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
- fCFContCascadePIDXiPlus->SetVarTitle(1, "M( #Lambda , #pi^{+} ) (GeV/c^{2})");
- fCFContCascadePIDXiPlus->SetVarTitle(2, "Y_{#Xi}");
- fListHistCascade->Add(fCFContCascadePIDXiPlus);
- }
- // - CFContainer PID study Omega minus
- if(!fCFContCascadePIDOmegaMinus) {
- const Int_t lNbSteps = 7 ;
- const Int_t lNbVariables = 3 ;
- //Array for the number of bins in each dimension :
- Int_t lNbBinsPerVar[3] = {0};
- lNbBinsPerVar[0] = 100;
- lNbBinsPerVar[1] = 1000;
- lNbBinsPerVar[2] = 22;
- if (fkSDDSelectionOn) {
- if (fwithSDD) fCFContCascadePIDOmegaMinus = new AliCFContainer(Form("fCFContCascadePIDOmegaMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDon",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{-} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
- else if (!fwithSDD) fCFContCascadePIDOmegaMinus = new AliCFContainer(Form("fCFContCascadePIDOmegaMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDoff",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{-} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
- } else if (!fkSDDSelectionOn) fCFContCascadePIDOmegaMinus = new AliCFContainer(Form("fCFContCascadePIDOmegaMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_woSDD",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{-} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
- //Setting the bin limits
- fCFContCascadePIDOmegaMinus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)
- fCFContCascadePIDOmegaMinus->SetBinLimits(1, 1.5 , 2.5 ); // Omega Effective mass
- fCFContCascadePIDOmegaMinus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity
- //Setting the step title : one per PID case
- fCFContCascadePIDOmegaMinus->SetStepTitle(0, "No PID");
- fCFContCascadePIDOmegaMinus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");
- fCFContCascadePIDOmegaMinus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");
- fCFContCascadePIDOmegaMinus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");
- fCFContCascadePIDOmegaMinus->SetStepTitle(4, "Comb. PID / Bachelor");
- fCFContCascadePIDOmegaMinus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");
- fCFContCascadePIDOmegaMinus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");
- //Setting the variable title, per axis
- fCFContCascadePIDOmegaMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
- fCFContCascadePIDOmegaMinus->SetVarTitle(1, "M( #Lambda , K^{-} ) (GeV/c^{2})");
- fCFContCascadePIDOmegaMinus->SetVarTitle(2, "Y_{#Omega}");
- fListHistCascade->Add(fCFContCascadePIDOmegaMinus);
- }
- // - CFContainer PID study Omega plus
- if(!fCFContCascadePIDOmegaPlus) {
- const Int_t lNbSteps = 7 ;
- const Int_t lNbVariables = 3 ;
- //Array for the number of bins in each dimension :
- Int_t lNbBinsPerVar[3] = {0};
- lNbBinsPerVar[0] = 100;
- lNbBinsPerVar[1] = 1000;
- lNbBinsPerVar[2] = 22;
- if (fkSDDSelectionOn) {
- if (fwithSDD) fCFContCascadePIDOmegaPlus = new AliCFContainer(Form("fCFContCascadePIDOmegaPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDon",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{+} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
- else if (!fwithSDD) fCFContCascadePIDOmegaPlus = new AliCFContainer(Form("fCFContCascadePIDOmegaPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDoff",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{+} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
- } else if (!fkSDDSelectionOn) fCFContCascadePIDOmegaPlus = new AliCFContainer(Form("fCFContCascadePIDOmegaPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_woSDD",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{+} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
- //Setting the bin limits
- fCFContCascadePIDOmegaPlus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)
- fCFContCascadePIDOmegaPlus->SetBinLimits(1, 1.5 , 2.5 ); // Omega Effective mass
- fCFContCascadePIDOmegaPlus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity
- //Setting the step title : one per PID case
- fCFContCascadePIDOmegaPlus->SetStepTitle(0, "No PID");
- fCFContCascadePIDOmegaPlus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");
- fCFContCascadePIDOmegaPlus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");
- fCFContCascadePIDOmegaPlus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");
- fCFContCascadePIDOmegaPlus->SetStepTitle(4, "Comb. PID / Bachelor");
- fCFContCascadePIDOmegaPlus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");
- fCFContCascadePIDOmegaPlus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");
- //Setting the variable title, per axis
- fCFContCascadePIDOmegaPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
- fCFContCascadePIDOmegaPlus->SetVarTitle(1, "M( #Lambda , K^{+} ) (GeV/c^{2})");
- fCFContCascadePIDOmegaPlus->SetVarTitle(2, "Y_{#Omega}");
- fListHistCascade->Add(fCFContCascadePIDOmegaPlus);
- }
- // - CFContainer: towards the optimisation of topological selections
- if(! fCFContCascadeCuts) {
- // Container meant to store all the relevant distributions corresponding to the cut variables.
- // NB: overflow/underflow of variables on which we want to cut later should be 0!!!
- const Int_t lNbSteps = 4 ;
- const Int_t lNbVariables = 19 ;
- //Array for the number of bins in each dimension :
- Int_t lNbBinsPerVar[lNbVariables] = {0};
- lNbBinsPerVar[0] = 25; //DcaCascDaughters : [0.0,2.4,3.0] -> Rec.Cut = 2.0;
- lNbBinsPerVar[1] = 25; //DcaBachToPrimVertex : [0.0,0.24,100.0] -> Rec.Cut = 0.01;
- lNbBinsPerVar[2] = 30; //CascCosineOfPointingAngle : [0.97,1.0] -> Rec.Cut = 0.98;
- lNbBinsPerVar[3] = 40; //CascRadius : [0.0,3.9,1000.0] -> Rec.Cut = 0.2;
- lNbBinsPerVar[4] = 30; //InvMassLambdaAsCascDghter : [1.1,1.3] -> Rec.Cut = 0.008;
- lNbBinsPerVar[5] = 20; //DcaV0Daughters : [0.0,2.0] -> Rec.Cut = 1.5;
- lNbBinsPerVar[6] = 201; //V0CosineOfPointingAngle : [0.89,1.0] -> Rec.Cut = 0.9;
- lNbBinsPerVar[7] = 40; //V0Radius : [0.0,3.9,1000.0] -> Rec.Cut = 0.2;
- lNbBinsPerVar[8] = 40; //DcaV0ToPrimVertex : [0.0,0.39,110.0] -> Rec.Cut = 0.01;
- lNbBinsPerVar[9] = 25; //DcaPosToPrimVertex : [0.0,0.24,100.0] -> Rec.Cut = 0.05;
- lNbBinsPerVar[10] = 25; //DcaNegToPrimVertex : [0.0,0.24,100.0] -> Rec.Cut = 0.05
- lNbBinsPerVar[11] = 150; //InvMassXi : 2-MeV/c2 bins
- lNbBinsPerVar[12] = 120; //InvMassOmega : 2-MeV/c2 bins
- lNbBinsPerVar[13] = 100; //XiTransvMom : [0.0,10.0]
- lNbBinsPerVar[14] = 110; //Y(Xi) : 0.02 in rapidity units
- lNbBinsPerVar[15] = 110; //Y(Omega) : 0.02 in rapidity units
- lNbBinsPerVar[16] = 112; //Proper lenght of cascade
- lNbBinsPerVar[17] = 112; //Proper lenght of V0
- lNbBinsPerVar[18] = 112; //Distance V0-Xi in transverse plane
- if (fkSDDSelectionOn) {
- if (fwithSDD) fCFContCascadeCuts = new AliCFContainer(Form("fCFContCascadeCuts_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDon",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Container for Cascade cuts", lNbSteps, lNbVariables, lNbBinsPerVar);
- else if (!fwithSDD) fCFContCascadeCuts = new AliCFContainer(Form("fCFContCascadeCuts_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDoff",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Container for Cascade cuts", lNbSteps, lNbVariables, lNbBinsPerVar);
- } else if (!fkSDDSelectionOn) fCFContCascadeCuts = new AliCFContainer(Form("fCFContCascadeCuts_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_woSDD",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Container for Cascade cuts", lNbSteps, lNbVariables, lNbBinsPerVar);
- //Setting the bin limits
- //0 - DcaXiDaughters
- Double_t *lBinLim0 = new Double_t[ lNbBinsPerVar[0] + 1 ];
- 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;
- lBinLim0[ lNbBinsPerVar[0] ] = 3.0;
- fCFContCascadeCuts -> SetBinLimits(0, lBinLim0);
- delete [] lBinLim0;
- //1 - DcaToPrimVertexXi
- Double_t *lBinLim1 = new Double_t[ lNbBinsPerVar[1] + 1 ];
- 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;
- lBinLim1[ lNbBinsPerVar[1] ] = 100.0;
- fCFContCascadeCuts -> SetBinLimits(1, lBinLim1);
- delete [] lBinLim1;
- //2 - CascCosineOfPointingAngle
- fCFContCascadeCuts->SetBinLimits(2, 0.97, 1.);
- //3 - CascRadius
- Double_t *lBinLim3 = new Double_t[ lNbBinsPerVar[3]+1 ];
- 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 ;
- lBinLim3[ lNbBinsPerVar[3] ] = 1000.0;
- fCFContCascadeCuts -> SetBinLimits(3, lBinLim3 );
- delete [] lBinLim3;
- //4 - InvMassLambdaAsCascDghter
- fCFContCascadeCuts->SetBinLimits(4, 1.1, 1.13);
- //5 - DcaV0Daughters
- fCFContCascadeCuts -> SetBinLimits(5, 0., 2.);
- //6 - V0CosineOfPointingAngle
- fCFContCascadeCuts -> SetBinLimits(6, 0.8, 1.001);
- //7 - V0Radius
- Double_t *lBinLim7 = new Double_t[ lNbBinsPerVar[7] + 1];
- 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;
- lBinLim7[ lNbBinsPerVar[7] ] = 1000.0;
- fCFContCascadeCuts -> SetBinLimits(7, lBinLim7);
- delete [] lBinLim7;
- //8 - DcaV0ToPrimVertex
- Double_t *lBinLim8 = new Double_t[ lNbBinsPerVar[8]+1 ];
- 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 ;
- lBinLim8[ lNbBinsPerVar[8] ] = 100.0;
- fCFContCascadeCuts -> SetBinLimits(8, lBinLim8 );
- delete [] lBinLim8;
- //9 - DcaPosToPrimVertex
- Double_t *lBinLim9 = new Double_t[ lNbBinsPerVar[9]+1 ];
- 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 ;
- lBinLim9[ lNbBinsPerVar[9] ] = 100.0;
- fCFContCascadeCuts -> SetBinLimits(9, lBinLim9 );
- delete [] lBinLim9;
- //10 - DcaNegToPrimVertex
- Double_t *lBinLim10 = new Double_t[ lNbBinsPerVar[10]+1 ];
- 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 ;
- lBinLim10[ lNbBinsPerVar[10] ] = 100.0;
- fCFContCascadeCuts -> SetBinLimits(10, lBinLim10 ); // DcaPosToPrimVertexXi : 0.0 to 0.25
- delete [] lBinLim10;
- //11 - InvMassXi
- fCFContCascadeCuts->SetBinLimits(11, 1.25, 1.40);
- //12 - InvMassOmega
- fCFContCascadeCuts->SetBinLimits(12, 1.62, 1.74);
- //13 - XiTransvMom
- fCFContCascadeCuts->SetBinLimits(13, 0.0, 10.0);
- //14 - Y(Xi)
- fCFContCascadeCuts->SetBinLimits(14, -1.1, 1.1);
- //15 - Y(Omega)
- fCFContCascadeCuts->SetBinLimits(15, -1.1, 1.1);
- //16 - Proper time of cascade
- Double_t *lBinLim16 = new Double_t[ lNbBinsPerVar[16]+1 ];
- for(Int_t i=0; i< lNbBinsPerVar[16];i++) lBinLim16[i] = (Double_t) -1. + (110. + 1.0 ) / (lNbBinsPerVar[16] - 1) * (Double_t) i;
- lBinLim16[ lNbBinsPerVar[16] ] = 2000.0;
- fCFContCascadeCuts->SetBinLimits(16, lBinLim16);
- //17 - Proper time of V0
- fCFContCascadeCuts->SetBinLimits(17, lBinLim16);
- //18 - Distance V0-Xi in transverse plane
- fCFContCascadeCuts->SetBinLimits(18, lBinLim16);
- // Setting the number of steps : one for each cascade species (Xi-, Xi+ and Omega-, Omega+)
- fCFContCascadeCuts->SetStepTitle(0, "#Xi^{-} candidates");
- fCFContCascadeCuts->SetStepTitle(1, "#bar{#Xi}^{+} candidates");
- fCFContCascadeCuts->SetStepTitle(2, "#Omega^{-} candidates");
- fCFContCascadeCuts->SetStepTitle(3, "#bar{#Omega}^{+} candidates");
- // Setting the variable title, per axis
- fCFContCascadeCuts->SetVarTitle(0, "Dca(cascade daughters) (cm)");
- fCFContCascadeCuts->SetVarTitle(1, "ImpactParamToPV(bachelor) (cm)");
- fCFContCascadeCuts->SetVarTitle(2, "cos(cascade PA)");
- fCFContCascadeCuts->SetVarTitle(3, "R_{2d}(cascade decay) (cm)");
- fCFContCascadeCuts->SetVarTitle(4, "M_{#Lambda}(as casc dghter) (GeV/c^{2})");
- fCFContCascadeCuts->SetVarTitle(5, "Dca(V0 daughters) in Xi (cm)");
- fCFContCascadeCuts->SetVarTitle(6, "cos(V0 PA) in cascade");
- fCFContCascadeCuts->SetVarTitle(7, "R_{2d}(V0 decay) (cm)");
- fCFContCascadeCuts->SetVarTitle(8, "ImpactParamToPV(V0) (cm)");
- fCFContCascadeCuts->SetVarTitle(9, "ImpactParamToPV(Pos) (cm)");
- fCFContCascadeCuts->SetVarTitle(10, "ImpactParamToPV(Neg) (cm)");
- fCFContCascadeCuts->SetVarTitle(11, "Inv. Mass(Xi) (GeV/c^{2})");
- fCFContCascadeCuts->SetVarTitle(12, "Inv. Mass(Omega) (GeV/c^{2})");
- fCFContCascadeCuts->SetVarTitle(13, "pt(cascade) (GeV/c)");
- fCFContCascadeCuts->SetVarTitle(14, "Y(Xi)");
- fCFContCascadeCuts->SetVarTitle(15, "Y(Omega)");
- fCFContCascadeCuts->SetVarTitle(16, "mL/p (cascade) (cm)");
- fCFContCascadeCuts->SetVarTitle(17, "mL/p (V0) (cm)");
- fCFContCascadeCuts->SetVarTitle(18, "Distance V0-Cascade in transverse plane (cm)");
- fListHistCascade->Add(fCFContCascadeCuts);
- }
-
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDXiMinus);
- PostData(3, fCFContCascadePIDXiPlus);
- PostData(4, fCFContCascadePIDOmegaMinus);
- PostData(5, fCFContCascadePIDOmegaPlus);
- PostData(6, fCFContCascadeCuts);
-} // end UserCreateOutputObjects
-
-
-//________________________________________________________________________
-void AliAnalysisTaskCheckCascadepp276::UserExec(Option_t *) {
-
- //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- // Main loop (called for each event)
- //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
- //----------------
- //Define variables
- AliESDEvent *lESDevent = 0x0;
- AliAODEvent *lAODevent = 0x0;
-
- //---------------------
- //Check the PIDresponse
- if(!fPIDResponse) {
- AliError("Cannot get pid response");
- return;
- }
-
- ///////////////////
- // EVENT SELECTIONS
- ///////////////////
- // In order:
- // 1) SDD selection
- // 2) Physics selection
- // 3) Select only looking at events with well-established PV
- // 4) Pileup selection
- // 5) |Z| < 10 cm
-
- //----------------------
- // Before any selections
- //----------------------
- //- Define the variables
- Int_t ncascadesBeforeAnySel = 0;
- Int_t nTrackMultiplicityBeforeAnySel = 0;
- if (fAnalysisType == "ESD") {
- // - Load the InputEvent and check
- lESDevent = dynamic_cast<AliESDEvent*>( InputEvent() );
- if (!lESDevent) {
- AliWarning("ERROR: lESDevent not available \n");
- return;
- }
- // - Take the number of cascades and tracks before any events selection
- ncascadesBeforeAnySel = lESDevent->GetNumberOfCascades();
- nTrackMultiplicityBeforeAnySel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
- } else if (fAnalysisType == "AOD") {
- // - Load the InputEvent and check
- lAODevent = dynamic_cast<AliAODEvent*>( InputEvent() );
- if (!lAODevent) {
- AliWarning("ERROR: lAODevent not available \n");
- return;
- }
- // - Take the number of cascades and tracks before any events selection
- ncascadesBeforeAnySel = lAODevent->GetNumberOfCascades();
- nTrackMultiplicityBeforeAnySel = -100; //FIXME: I can't find the equivalent method for the AOD
- } else {
- Printf("Analysis type (ESD or AOD) not specified \n");
- return;
- }
- // - Fill the plots
- fHistCascadeMultiplicityBeforeAnySel->Fill(ncascadesBeforeAnySel);
- fHistTrackMultiplicityBeforeAnySel->Fill(nTrackMultiplicityBeforeAnySel);
-
- //--------------
- // SDD selection
- //--------------
- // - Define the variables
- Int_t ncascadesAfterSDDSel = 0;
- Int_t nTrackMultiplicityAfterSDDSel = 0;
- // - Selection for ESD and AOD
- if (fAnalysisType == "ESD") {
- if (fkSDDSelectionOn) {
- TString trcl = lESDevent->GetFiredTriggerClasses();
- //cout<<"Fired Trigger Classes: "<<trcl<<endl;
- if (fwithSDD){
- if(!(trcl.Contains("ALLNOTRD"))) {
- cout<<"We are selecting events with SDD turn ON. This event has the SDD turn OFF. => RETURN!! (Exclude it)..."<<endl;
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDXiMinus);
- PostData(3, fCFContCascadePIDXiPlus);
- PostData(4, fCFContCascadePIDOmegaMinus);
- PostData(5, fCFContCascadePIDOmegaPlus);
- PostData(6, fCFContCascadeCuts);
- return;
- }
- } else if (!fwithSDD){
- if((trcl.Contains("ALLNOTRD"))) {
- cout<<"We are selecting events with SDD turn OFF. This event has the SDD turn ON. => RETURN!! (Exclude it)..."<<endl;
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDXiMinus);
- PostData(3, fCFContCascadePIDXiPlus);
- PostData(4, fCFContCascadePIDOmegaMinus);
- PostData(5, fCFContCascadePIDOmegaPlus);
- PostData(6, fCFContCascadeCuts);
- return;
- }
- }
- }
- // - Take the number of cascades and tracks after the SDD selection
- ncascadesAfterSDDSel = lESDevent->GetNumberOfCascades();
- nTrackMultiplicityAfterSDDSel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
- } else if (fAnalysisType == "AOD") {
- if (fkSDDSelectionOn) {
- TString trcl = lAODevent->GetFiredTriggerClasses();
- if (fwithSDD){
- if(!(trcl.Contains("ALLNOTRD"))) {
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDXiMinus);
- PostData(3, fCFContCascadePIDXiPlus);
- PostData(4, fCFContCascadePIDOmegaMinus);
- PostData(5, fCFContCascadePIDOmegaPlus);
- PostData(6, fCFContCascadeCuts);
- cout<<"We are selecting events with SDD turn ON. This event has the SDD turn OFF. => RETURN!! (Exclude it)..."<<endl;
- return;
- }
- } else if (!fwithSDD) {
- if((trcl.Contains("ALLNOTRD"))) {
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDXiMinus);
- PostData(3, fCFContCascadePIDXiPlus);
- PostData(4, fCFContCascadePIDOmegaMinus);
- PostData(5, fCFContCascadePIDOmegaPlus);
- PostData(6, fCFContCascadeCuts);
- cout<<"We are selecting events with SDD turn OFF. This event has the SDD turn ON. => RETURN!! (Exclude it)..."<<endl;
- return;
- }
- }
- }
- // - Take the number of cascades and tracks after the SDD selection
- ncascadesAfterSDDSel = lAODevent->GetNumberOfCascades();
- nTrackMultiplicityAfterSDDSel = -100; //FIXME: I can't find the equivalent method for the AOD
- }
- // - Fill the plots
- fHistCascadeMultiplicityAfterSDDSel->Fill(ncascadesAfterSDDSel);
- fHistTrackMultiplicityAfterSDDSel->Fill(nTrackMultiplicityAfterSDDSel);
-
- //----------------------------------------------
- // Physics selection (+ re-vertexer for the ESD)
- //----------------------------------------------
- // - Define the variables
- Int_t ncascadesAfterPhysicsSel = 0;
- Int_t nTrackMultiplicityAfterPhysicsSel = 0;
- // - Selection for ESD and AOD
- if (fAnalysisType == "ESD") {
- UInt_t maskIsSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
- Bool_t isSelected = 0;
- isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB;
- if(! isSelected){
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDXiMinus);
- PostData(3, fCFContCascadePIDXiPlus);
- PostData(4, fCFContCascadePIDOmegaMinus);
- PostData(5, fCFContCascadePIDOmegaPlus);
- PostData(6, fCFContCascadeCuts);
- cout<<"We are selecting the events that past tha Physics Selection. This event does not pass the Physics Selection. => RETURN!! (Exclude it)..."<<endl;
- return;
- }
- // - Take the number of cascades and tracks after physics selection
- ncascadesAfterPhysicsSel = lESDevent->GetNumberOfCascades();
- nTrackMultiplicityAfterPhysicsSel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
- // - Cascade vertexer (ESD)
- // Relaunch V0 and Cascade vertexers
- if (fkRerunV0CascVertexers) {
- lESDevent->ResetCascades();
- lESDevent->ResetV0s();
- //AliV0vertexer *lV0vtxer = new AliV0vertexer();
- //AliCascadeVertexer *lCascVtxer = new AliCascadeVertexer();
- //lV0vtxer->GetCuts(fV0Sels);
- //lCascVtxer->GetCuts(fCascSels);
- //lV0vtxer->SetCuts(fV0Sels); // NB don't use SetDefaultCuts!! because it acts on static variables
- //lCascVtxer->SetCuts(fCascSels);
- //lV0vtxer->Tracks2V0vertices(lESDevent);
- //lCascVtxer->V0sTracks2CascadeVertices(lESDevent);
- //delete lV0vtxer;
- //delete lCascVtxer;
- }
- } else if (fAnalysisType == "AOD") {
- UInt_t maskIsSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
- Bool_t isSelected = 0;
- isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB;
- if(! isSelected){
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDXiMinus);
- PostData(3, fCFContCascadePIDXiPlus);
- PostData(4, fCFContCascadePIDOmegaMinus);
- PostData(5, fCFContCascadePIDOmegaPlus);
- PostData(6, fCFContCascadeCuts);
- cout<<"We are selecting the events that past tha Physics Selection. This event does not pass the Physics Selection. => RETURN!! (Exclude it)..."<<endl;
- return;
- }
- // - Take the number of cascades and tracks after the physics selection
- ncascadesAfterPhysicsSel = lAODevent->GetNumberOfCascades();
- nTrackMultiplicityAfterPhysicsSel = -100; //FIXME: I can't find the equivalent method for the AOD
- }
- // - Fill the plots
- fHistCascadeMultiplicityAfterPhysicsSel->Fill(ncascadesAfterPhysicsSel);
- fHistTrackMultiplicityAfterPhysicsSel->Fill(nTrackMultiplicityAfterPhysicsSel);
-
- //------------------------------
- // Well-established PV selection
- //------------------------------
- // - Define variables
- Int_t ncascadesForSelEvtNoTPCOnly = 0;
- Int_t nTrackMultiplicityForSelEvtNoTPCOnly = 0;
- // - Selection for ESD and AOD
- if (fAnalysisType == "ESD") {
- // - Vertex coordinates: get the PVs stored in the ESD found with tracks and SPD
- const AliESDVertex *lPrimaryTrackingESDVtx = lESDevent->GetPrimaryVertexTracks();
- const AliESDVertex *lPrimarySPDVtx = lESDevent->GetPrimaryVertexSPD();
- // - Select only looking at events with well-established PV
- if (fkQualityCutNoTPConlyPrimVtx) {
- if (!lPrimarySPDVtx->GetStatus() && !lPrimaryTrackingESDVtx->GetStatus() ){
- AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !");
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDXiMinus);
- PostData(3, fCFContCascadePIDXiPlus);
- PostData(4, fCFContCascadePIDOmegaMinus);
- PostData(5, fCFContCascadePIDOmegaPlus);
- PostData(6, fCFContCascadeCuts);
- return;
- }
- }
- // - Take the number of cascades and tracks after TPConly selection
- ncascadesForSelEvtNoTPCOnly = lESDevent->GetNumberOfCascades();
- nTrackMultiplicityForSelEvtNoTPCOnly = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
- } else if (fAnalysisType == "AOD") {
- // - Vertex coordinates: get the PVs stored in the AOD found with tracks and SPD
- const AliAODVertex *lPrimarySPDVtx = lAODevent->GetPrimaryVertexSPD();
- const AliAODVertex *lPrimaryTrackingAODVtx = lAODevent->GetPrimaryVertex();
- // - Select only looking at events with well-established PV
- if (fkQualityCutNoTPConlyPrimVtx) {
- if (!lPrimarySPDVtx && !lPrimaryTrackingAODVtx) {
- AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !");
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDXiMinus);
- PostData(3, fCFContCascadePIDXiPlus);
- PostData(4, fCFContCascadePIDOmegaMinus);
- PostData(5, fCFContCascadePIDOmegaPlus);
- PostData(6, fCFContCascadeCuts);
- return;
- }
- }
- // - Take the number of cascades and tracks after TPConly selection
- ncascadesForSelEvtNoTPCOnly = lAODevent->GetNumberOfCascades();
- nTrackMultiplicityForSelEvtNoTPCOnly = -100; //FIXME: I can't find the equivalent method for the AOD
- }
- // - Fill the plots
- fHistCascadeMultiplicityForSelEvtNoTPCOnly->Fill(ncascadesForSelEvtNoTPCOnly);
- fHistTrackMultiplicityForSelEvtNoTPCOnly->Fill(nTrackMultiplicityForSelEvtNoTPCOnly);
-
- //----------------
- // Pilup selection
- //----------------
- // - Define variables
- Int_t ncascadesForSelEvtNoTPCOnlyNoPileup = 0;
- Int_t nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = 0;
- // - Selection for ESD and AOD
- if (fAnalysisType == "ESD") {
- if (fkQualityCutPileup) {
- if(lESDevent->IsPileupFromSPD()){
- AliWarning("Pb / Pile-up event ... return!");
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDXiMinus);
- PostData(3, fCFContCascadePIDXiPlus);
- PostData(4, fCFContCascadePIDOmegaMinus);
- PostData(5, fCFContCascadePIDOmegaPlus);
- PostData(6, fCFContCascadeCuts);
- return;
- }
- }
- // - Take the number of cascades and tracks after Pileup selection
- ncascadesForSelEvtNoTPCOnlyNoPileup = lESDevent->GetNumberOfCascades();
- nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
- } else if (fAnalysisType == "AOD") {
- if (fkQualityCutPileup) {
- if(lAODevent->IsPileupFromSPD()){
- AliWarning("Pb / Pile-up event ... return!");
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDXiMinus);
- PostData(3, fCFContCascadePIDXiPlus);
- PostData(4, fCFContCascadePIDOmegaMinus);
- PostData(5, fCFContCascadePIDOmegaPlus);
- PostData(6, fCFContCascadeCuts);
- return;
- }
- }
- // - Take the number of cascades and tracks after Pileup selection
- ncascadesForSelEvtNoTPCOnlyNoPileup = lAODevent->GetNumberOfCascades();
- nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = -100; //FIXME: I can't find the equivalent method for the AOD
- }
- fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup->Fill(ncascadesForSelEvtNoTPCOnlyNoPileup);
- fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup->Fill(nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup);
-
- //----------------------------------------------------
- // Vertex Z position selection (+ magnetic field info)
- //----------------------------------------------------
- // - Define variables
- Double_t lBestPrimaryVtxPos[3] = {-100.0, -100.0, -100.0};
- Double_t lMagneticField = -10.;
- Double_t tPrimaryVtxPosition[3] = {-100.0, -100.0, -100.0};
- Int_t ncascadesAfterVertexSel = 0;
- Int_t nTrackMultiplicityAfterVertexSel = 0;
- // - Selection for ESD and AOD
- if (fAnalysisType == "ESD") {
- // - Vertex coordinates: get the best primary vertex available for the event
- const AliESDVertex *lPrimaryBestESDVtx = lESDevent->GetPrimaryVertex();
- if (!lPrimaryBestESDVtx){
- AliWarning("No prim. vertex in ESD... return!");
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDXiMinus);
- PostData(3, fCFContCascadePIDXiPlus);
- PostData(4, fCFContCascadePIDOmegaMinus);
- PostData(5, fCFContCascadePIDOmegaPlus);
- PostData(6, fCFContCascadeCuts);
- return;
- }
- lPrimaryBestESDVtx->GetXYZ( lBestPrimaryVtxPos );
- // - Fill the vertex plots before any event selection on vertex position
- const AliVVertex *primaryVtx = lESDevent->GetPrimaryVertex();
- tPrimaryVtxPosition[0] = primaryVtx->GetX();
- tPrimaryVtxPosition[1] = primaryVtx->GetY();
- tPrimaryVtxPosition[2] = primaryVtx->GetZ();
- fHistPVx->Fill( tPrimaryVtxPosition[0] );
- fHistPVy->Fill( tPrimaryVtxPosition[1] );
- fHistPVz->Fill( tPrimaryVtxPosition[2] );
- // - Get magnetic filed info
- lMagneticField = lESDevent->GetMagneticField();
- //if(TMath::Abs(lMagneticField ) < 10e-6) continue;
- // - Selection on the primary vertex Z position
- if (fkQualityCutZprimVtxPos) {
- if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange || TMath::Abs(lBestPrimaryVtxPos[2]) < fVtxRangeMin) {
- AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDXiMinus);
- PostData(3, fCFContCascadePIDXiPlus);
- PostData(4, fCFContCascadePIDOmegaMinus);
- PostData(5, fCFContCascadePIDOmegaPlus);
- PostData(6, fCFContCascadeCuts);
- return;
- }
- }
- // - Take the number of cascades and tracks after vertex Z position selection
- ncascadesAfterVertexSel = lESDevent->GetNumberOfCascades();
- nTrackMultiplicityAfterVertexSel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
- } else if (fAnalysisType == "AOD") {
- // - Vertex coordinates: get the best primary vertex available for the event
- const AliAODVertex *lPrimaryBestAODVtx = lAODevent->GetPrimaryVertex();
- if (!lPrimaryBestAODVtx){
- AliWarning("No prim. vertex in AOD... return!");
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDXiMinus);
- PostData(3, fCFContCascadePIDXiPlus);
- PostData(4, fCFContCascadePIDOmegaMinus);
- PostData(5, fCFContCascadePIDOmegaPlus);
- PostData(6, fCFContCascadeCuts);
- return;
- }
- lPrimaryBestAODVtx->GetXYZ( lBestPrimaryVtxPos );
- // - Fill the vertex plots before any event selection on vertex position
- const AliVVertex *primaryVtx = lAODevent->GetPrimaryVertex();
- tPrimaryVtxPosition[0] = primaryVtx->GetX();
- tPrimaryVtxPosition[1] = primaryVtx->GetY();
- tPrimaryVtxPosition[2] = primaryVtx->GetZ();
- fHistPVx->Fill( tPrimaryVtxPosition[0] );
- fHistPVy->Fill( tPrimaryVtxPosition[1] );
- fHistPVz->Fill( tPrimaryVtxPosition[2] );
- // - Get magnetic filed info
- lMagneticField = lAODevent->GetMagneticField();
- //if(TMath::Abs(lMagneticField ) < 10e-6) continue;
- // - Selection on the primary vertex Z position
- if (fkQualityCutZprimVtxPos) {
- if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange || TMath::Abs(lBestPrimaryVtxPos[2]) < fVtxRangeMin) {
- AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDXiMinus);
- PostData(3, fCFContCascadePIDXiPlus);
- PostData(4, fCFContCascadePIDOmegaMinus);
- PostData(5, fCFContCascadePIDOmegaPlus);
- PostData(6, fCFContCascadeCuts);
- return;
- }
- }
- // - Take the number of cascades and tracks after vertex Z position selection
- ncascadesAfterVertexSel = lAODevent->GetNumberOfCascades();
- nTrackMultiplicityAfterVertexSel = -100; //FIXME: I can't find the equivalent method for the AOD
- }
- // - Fill the plots
- fHistCascadeMultiplicityAfterVertexCutSel->Fill(ncascadesAfterVertexSel);
- fHistTrackMultiplicityAfterVertexCutSel->Fill(nTrackMultiplicityAfterVertexSel);
-
- // - Vertex position plots: after any event selections
- tPrimaryVtxPosition[0] = -100.0;
- tPrimaryVtxPosition[1] = -100.0;
- tPrimaryVtxPosition[2] = -100.0;
- if (fAnalysisType == "ESD") {
- const AliVVertex *primaryVtx = lESDevent->GetPrimaryVertex();
- tPrimaryVtxPosition[0] = primaryVtx->GetX();
- tPrimaryVtxPosition[1] = primaryVtx->GetY();
- tPrimaryVtxPosition[2] = primaryVtx->GetZ();
- } else if (fAnalysisType == "AOD") {
- const AliVVertex *primaryVtx = lAODevent->GetPrimaryVertex();
- tPrimaryVtxPosition[0] = primaryVtx->GetX();
- tPrimaryVtxPosition[1] = primaryVtx->GetY();
- tPrimaryVtxPosition[2] = primaryVtx->GetZ();
- }
- fHistPVxAnalysis->Fill( tPrimaryVtxPosition[0] );
- fHistPVyAnalysis->Fill( tPrimaryVtxPosition[1] );
- fHistPVzAnalysis->Fill( tPrimaryVtxPosition[2] );
-
-
-
- //////////////////////////////
- // CASCADE RECONSTRUCTION PART
- //////////////////////////////
-
- //%%%%%%%%%%%%%
- // Cascade loop
- Int_t ncascades = 0;
- if (fAnalysisType == "ESD") ncascades = lESDevent->GetNumberOfCascades();
- else if (fAnalysisType == "AOD") ncascades = lAODevent->GetNumberOfCascades();
-
- for (Int_t iXi = 0; iXi < ncascades; iXi++) {// This is the begining of the Cascade loop (ESD or AOD)
-
- // -----------------------------------------------------------------------
- // - Initialisation of the local variables that will be needed for ESD/AOD
-
- // - 0th part of initialisation : around primary vertex ...
- //Double_t lBestPrimaryVtxRadius3D = -500.0;
- // - 1st part of initialisation : variables needed to store AliESDCascade data members
- Double_t lEffMassXi = 0.;
- Double_t lDcaXiDaughters = -1.;
- Double_t lXiCosineOfPointingAngle = -1.;
- Double_t lPosXi[3] = { -1000.0, -1000.0, -1000.0 };
- Double_t lXiRadius = -1000. ;
- // - 2nd part of initialisation : Nbr of clusters within TPC for the 3 daughter cascade tracks
- UShort_t lPosTPCClusters = -1; // For ESD only ...
- UShort_t lNegTPCClusters = -1; // For ESD only ...
- UShort_t lBachTPCClusters = -1; // For ESD only ...
- Double_t lInnerWallMomCascDghters[3] = {-100., -100., -100.};
- Double_t lTPCSignalCascDghters [3] = {-100., -100., -100.};
- // - 3rd part of initialisation : about V0 part in cascades
- Double_t lInvMassLambdaAsCascDghter = 0.;
- Double_t lDcaV0DaughtersXi = -1.;
- Double_t lDcaBachToPrimVertexXi = -1.;
- Double_t lDcaV0ToPrimVertexXi = -1.;
- Double_t lDcaPosToPrimVertexXi = -1.;
- Double_t lDcaNegToPrimVertexXi = -1.;
- Double_t lV0CosineOfPointingAngleXi = -1. ;
- Double_t lPosV0Xi[3] = { -1000. , -1000., -1000. }; // Position of VO coming from cascade
- Double_t lV0RadiusXi = -1000.0;
- Double_t lV0quality = 0.;
- // - 4th part of initialisation : Effective masses
- Double_t lInvMassXiMinus = 0.;
- Double_t lInvMassXiPlus = 0.;
- Double_t lInvMassOmegaMinus = 0.;
- Double_t lInvMassOmegaPlus = 0.;
- // - 5th part of initialisation : PID treatment
- Bool_t lIsPosInXiProton = kFALSE;
- Bool_t lIsPosInXiPion = kFALSE;
- Bool_t lIsPosInOmegaProton = kFALSE;
- Bool_t lIsPosInOmegaPion = kFALSE;
- Bool_t lIsNegInXiProton = kFALSE;
- Bool_t lIsNegInXiPion = kFALSE;
- Bool_t lIsNegInOmegaProton = kFALSE;
- Bool_t lIsNegInOmegaPion = kFALSE;
- Bool_t lIsBachelorKaon = kFALSE;
- Bool_t lIsBachelorPion = kFALSE;
- Bool_t lIsBachelorKaonForTPC = kFALSE;
- Bool_t lIsBachelorPionForTPC = kFALSE;
- Bool_t lIsNegPionForTPC = kFALSE;
- Bool_t lIsPosPionForTPC = kFALSE;
- Bool_t lIsNegProtonForTPC = kFALSE;
- Bool_t lIsPosProtonForTPC = kFALSE;
- // - 6th part of initialisation : extra info for QA
- Double_t lXiMomX = 0.;
- Double_t lXiMomY = 0.;
- Double_t lXiMomZ = 0.;
- Double_t lXiTransvMom = 0.;
- Double_t lXiTotMom = 0.;
- Double_t lV0PMomX = 0.;
- Double_t lV0PMomY = 0.;
- Double_t lV0PMomZ = 0.;
- Double_t lV0NMomX = 0.;
- Double_t lV0NMomY = 0.;
- Double_t lV0NMomZ = 0.;
- Double_t lV0TotMom = 0.;
- Double_t lBachMomX = 0.;
- Double_t lBachMomY = 0.;
- Double_t lBachMomZ = 0.;
- Double_t lBachTransvMom = 0.;
- Double_t lBachTotMom = 0.;
- Double_t lpTrackTransvMom = 0.;
- Double_t lnTrackTransvMom = 0.;
- Short_t lChargeXi = -2;
- Double_t lV0toXiCosineOfPointingAngle = 0.;
- Double_t lRapXi = -20.0, lRapOmega = -20.0, lEta = -20.0, lTheta = 360., lPhi = 720.;
- Double_t lAlphaXi = -200., lPtArmXi = -200.0;
- Double_t etaPos = 0., etaNeg = 0., etaBach = 0.;
-
- if (fAnalysisType == "ESD") {
-
- // -------------------------------------
- // - Load the cascades from the handler
- AliESDcascade *xi = lESDevent->GetCascade(iXi);
- if (!xi) continue;
-
- //----------------------------------------------------------------------------
- // - Assigning the necessary variables for specific AliESDcascade data members
- lV0quality = 0.;
- xi->ChangeMassHypothesis(lV0quality , 3312); // default working hypothesis: cascade = Xi-decay
- lEffMassXi = xi->GetEffMassXi();
- lDcaXiDaughters = xi->GetDcaXiDaughters();
- lXiCosineOfPointingAngle = xi->GetCascadeCosineOfPointingAngle( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2] );
- //Take care : the best available vertex should be used (like in AliCascadeVertexer)
- xi->GetXYZcascade( lPosXi[0], lPosXi[1], lPosXi[2] );
- lXiRadius = TMath::Sqrt( lPosXi[0]*lPosXi[0] + lPosXi[1]*lPosXi[1] );
-
- //-------------------------------------------------------------------------------------------------------------------------------
- // - Around the tracks: Bach + V0 (ESD). Necessary variables for ESDcascade data members coming from the ESDv0 part (inheritance)
- UInt_t lIdxPosXi = (UInt_t) TMath::Abs( xi->GetPindex() );
- UInt_t lIdxNegXi = (UInt_t) TMath::Abs( xi->GetNindex() );
- UInt_t lBachIdx = (UInt_t) TMath::Abs( xi->GetBindex() );
- //Care track label can be negative in MC production (linked with the track quality)
- //However = normally, not the case for track index ...
- // - Rejection of a double use of a daughter track (nothing but just a crosscheck of what is done in the cascade vertexer)
- if (lBachIdx == lIdxNegXi) { AliWarning("Pb / Idx(Bach. track) = Idx(Neg. track) ... continue!"); continue; }
- if (lBachIdx == lIdxPosXi) { AliWarning("Pb / Idx(Bach. track) = Idx(Pos. track) ... continue!"); continue; }
- // - Get the track for the daughters
- AliESDtrack *pTrackXi = lESDevent->GetTrack( lIdxPosXi );
- AliESDtrack *nTrackXi = lESDevent->GetTrack( lIdxNegXi );
- AliESDtrack *bachTrackXi = lESDevent->GetTrack( lBachIdx );
- if (!pTrackXi || !nTrackXi || !bachTrackXi ) {
- AliWarning("ERROR: Could not retrieve one of the 3 ESD daughter tracks of the cascade ...");
- continue;
- }
- // - Get the TPCnumber of cluster for the daughters
- lPosTPCClusters = pTrackXi->GetTPCNcls();
- lNegTPCClusters = nTrackXi->GetTPCNcls();
- lBachTPCClusters = bachTrackXi->GetTPCNcls();
-
- //-------------------------------------
- // - Rejection of a poor quality tracks
- if (fkQualityCutTPCrefit) {
- // - Poor quality related to TPCrefit
- ULong_t pStatus = pTrackXi->GetStatus();
- ULong_t nStatus = nTrackXi->GetStatus();
- ULong_t bachStatus = bachTrackXi->GetStatus();
- if ((pStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Pos. track has no TPCrefit ... continue!"); continue; }
- if ((nStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Neg. track has no TPCrefit ... continue!"); continue; }
- if ((bachStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / Bach. track has no TPCrefit ... continue!"); continue; }
- }
- if (fkQualityCutnTPCcls) {
- // - Poor quality related to TPC clusters
- if (lPosTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Pos. track has less than 80 TPC clusters ... continue!"); continue; }
- if (lNegTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Neg. track has less than 80 TPC clusters ... continue!"); continue; }
- if (lBachTPCClusters < fMinnTPCcls) { AliWarning("Pb / Bach. track has less than 80 TPC clusters ... continue!"); continue; }
- }
-
- //-----------------------------------
- const AliExternalTrackParam *pExtTrack = pTrackXi->GetInnerParam();
- const AliExternalTrackParam *nExtTrack = nTrackXi->GetInnerParam();
- const AliExternalTrackParam *bachExtTrack = bachTrackXi->GetInnerParam();
- if (pExtTrack) {
- lInnerWallMomCascDghters[0] = pExtTrack->GetP() * pExtTrack->Charge();
- lTPCSignalCascDghters [0] = pTrackXi->GetTPCsignal();
- }
- if (nExtTrack) {
- lInnerWallMomCascDghters[1] = nExtTrack->GetP() * nExtTrack->Charge();
- lTPCSignalCascDghters [1] = nTrackXi->GetTPCsignal();
- }
- if (bachExtTrack) {
- lInnerWallMomCascDghters[2] = bachExtTrack->GetP() * bachExtTrack->Charge();
- lTPCSignalCascDghters [2] = bachTrackXi->GetTPCsignal();
- }
- etaPos = pTrackXi->Eta();
- etaNeg = nTrackXi->Eta();
- etaBach = bachTrackXi->Eta();
- lInvMassLambdaAsCascDghter = xi->GetEffMass(); //This value shouldn't change, whatever the working hyp. is : Xi-, Xi+, Omega-, Omega+
- lDcaV0DaughtersXi = xi->GetDcaV0Daughters();
- lV0CosineOfPointingAngleXi = xi->GetV0CosineOfPointingAngle(lBestPrimaryVtxPos[0],
- lBestPrimaryVtxPos[1],
- lBestPrimaryVtxPos[2] );
- lDcaV0ToPrimVertexXi = xi->GetD( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2] );
- lDcaBachToPrimVertexXi = TMath::Abs( bachTrackXi->GetD( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lMagneticField ) ); //Note: AliExternalTrackParam::GetD returns an algebraic value ...
- xi->GetXYZ( lPosV0Xi[0], lPosV0Xi[1], lPosV0Xi[2] );
- lV0RadiusXi = TMath::Sqrt( lPosV0Xi[0]*lPosV0Xi[0] + lPosV0Xi[1]*lPosV0Xi[1] );
- lDcaPosToPrimVertexXi = TMath::Abs( pTrackXi ->GetD( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lMagneticField ) );
- lDcaNegToPrimVertexXi = TMath::Abs( nTrackXi ->GetD( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lMagneticField ) );
-
- //-----------------------------------------
- // - Extra-selection for cascade candidates
- if (fkExtraSelections) { //in AliCascadeVertexer
- if (lDcaXiDaughters > 0.3) continue;
- if (lXiCosineOfPointingAngle < 0.999 ) continue;
- if (lDcaV0ToPrimVertexXi < 0.05) continue;
- if (lDcaBachToPrimVertexXi < 0.03) continue;
- //if (TMath::Abs(lInvMassLambdaAsCascDghter-1.11568) > 0.006 ) continue;
- if (lDcaV0DaughtersXi > 1.) continue;
- if (lV0CosineOfPointingAngleXi < 0.998) continue;
- if (lDcaPosToPrimVertexXi < 0.1) continue;
- if (lDcaNegToPrimVertexXi < 0.1) continue;
- if (lXiRadius < .9) continue;
- //if (lXiRadius > 100) continue;
- if (lV0RadiusXi < 0.9) continue;
- //if (lV0RadiusXi > 100) continue;
- }
-
- //----------------------------------------------------------------------------------------------------
- // - Around effective masses. Change mass hypotheses to cover all the possibilities: Xi-/+, Omega -/+
- if ( bachTrackXi->Charge() < 0 ) {
- //Calculate the effective mass of the Xi- candidate: Xi- hyp. (pdg code 3312)
- lV0quality = 0.;
- xi->ChangeMassHypothesis(lV0quality , 3312);
- lInvMassXiMinus = xi->GetEffMassXi();
- //Calculate the effective mass of the Xi- candidate: Omega- hyp. (pdg code 3334)
- lV0quality = 0.;
- xi->ChangeMassHypothesis(lV0quality , 3334);
- lInvMassOmegaMinus = xi->GetEffMassXi();
- //Back to "default" hyp. (Xi-)
- lV0quality = 0.;
- xi->ChangeMassHypothesis(lV0quality , 3312);
- } // end if negative bachelor
- if ( bachTrackXi->Charge() > 0 ) {
- //Calculate the effective mass of the Xi- candidate: Xi+ hyp. (pdg code -3312)
- lV0quality = 0.;
- xi->ChangeMassHypothesis(lV0quality , -3312);
- lInvMassXiPlus = xi->GetEffMassXi();
- //Calculate the effective mass of the Xi- candidate: Omega+ hyp. (pdg code -3334)
- lV0quality = 0.;
- xi->ChangeMassHypothesis(lV0quality , -3334);
- lInvMassOmegaPlus = xi->GetEffMassXi();
- //Back to "default" hyp. (Xi-)
- lV0quality = 0.;
- xi->ChangeMassHypothesis(lV0quality , -3312);
- } // end if positive bachelor
-
- //--------------------------------
- // - PID on the daughter tracks
- // - Combined PID -> removed, add when will be used
-
- // - TPC PID : 3-sigma bands on Bethe-Bloch curve
- //Bachelor
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 4) lIsBachelorKaonForTPC = kTRUE;
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 4) lIsBachelorPionForTPC = kTRUE;
- //Negative V0 daughter
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 4) lIsNegPionForTPC = kTRUE;
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kProton )) < 4) lIsNegProtonForTPC = kTRUE;
- //Positive V0 daughter
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 4) lIsPosPionForTPC = kTRUE;
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 4) lIsPosProtonForTPC = kTRUE;
- /*
- const AliExternalTrackParam *pInnerWallTrackXi = pTrackXi ->GetInnerParam();
- const AliExternalTrackParam *nInnerWallTrackXi = nTrackXi ->GetInnerParam();
- const AliExternalTrackParam *bachInnerWallTrackXi = bachTrackXi ->GetInnerParam();
- if (pInnerWallTrackXi && nInnerWallTrackXi && bachInnerWallTrackXi ) {
- Double_t pMomInnerWall = pInnerWallTrackXi ->GetP();
- Double_t nMomInnerWall = nInnerWallTrackXi ->GetP();
- Double_t bachMomInnerWall = bachInnerWallTrackXi->GetP();
- //Bachelor
- if (TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 3) lIsBachelorPionForTPC = kTRUE;
- if (bachMomInnerWall < 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 5) lIsBachelorKaonForTPC = kTRUE;
- if (bachMomInnerWall > 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 3) lIsBachelorKaonForTPC = kTRUE;
- //Negative V0 daughter
- if (TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 3 ) lIsNegPionForTPC = kTRUE;
- if (nMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 5 ) lIsNegProtonForTPC = kTRUE;
- if (nMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 3 ) lIsNegProtonForTPC = kTRUE;
- //Positive V0 daughter
- if (TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 3 ) lIsPosPionForTPC = kTRUE;
- if (pMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 5) lIsPosProtonForTPC = kTRUE;
- if (pMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 3) lIsPosProtonForTPC = kTRUE;
- }*/
-
- //---------------------------------
- // - Extra info for QA (ESD)
- // Miscellaneous pieces of info that may help regarding data quality assessment.
- // Cascade transverse and total momentum
- xi->GetPxPyPz( lXiMomX, lXiMomY, lXiMomZ );
- lXiTransvMom = TMath::Sqrt( lXiMomX*lXiMomX + lXiMomY*lXiMomY );
- lXiTotMom = TMath::Sqrt( lXiMomX*lXiMomX + lXiMomY*lXiMomY + lXiMomZ*lXiMomZ );
- // V0 total momentum
- xi->GetNPxPyPz(lV0NMomX,lV0NMomY,lV0NMomZ);
- xi->GetPPxPyPz(lV0PMomX,lV0PMomY,lV0PMomZ);
- lV0TotMom = TMath::Sqrt(TMath::Power(lV0NMomX+lV0PMomX,2) + TMath::Power(lV0NMomY+lV0PMomY,2) + TMath::Power(lV0NMomZ+lV0PMomZ,2));
- // Bachelor total momentum
- xi->GetBPxPyPz( lBachMomX, lBachMomY, lBachMomZ );
- lBachTransvMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY );
- lBachTotMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY + lBachMomZ*lBachMomZ );
- lnTrackTransvMom = TMath::Sqrt( lV0NMomX*lV0NMomX + lV0NMomY*lV0NMomY );
- lpTrackTransvMom = TMath::Sqrt( lV0PMomX*lV0PMomX + lV0PMomY*lV0PMomY );
- lChargeXi = xi->Charge();
- lV0toXiCosineOfPointingAngle = xi->GetV0CosineOfPointingAngle( lPosXi[0], lPosXi[1], lPosXi[2] );
- lRapXi = xi->RapXi();
- lRapOmega = xi->RapOmega();
- lEta = xi->Eta();
- lTheta = xi->Theta()*180.0/TMath::Pi();
- lPhi = xi->Phi()*180.0/TMath::Pi();
- lAlphaXi = xi->AlphaXi();
- lPtArmXi = xi->PtArmXi();
- // Extra-cut = Anti-splitting cut for lambda daughters
- Bool_t kAntiSplittingLambda = kFALSE;
- if (kAntiSplittingLambda) { // not used
- Double_t lNMomX = 0., lNMomY = 0., lNMomZ = 0.;
- Double_t lPMomX = 0., lPMomY = 0., lPMomZ = 0.;
- xi->GetPPxPyPz(lPMomX, lPMomY, lPMomZ);
- xi->GetNPxPyPz(lNMomX, lNMomY, lNMomZ);
- if ( xi->Charge() < 0) {// Xi- or Omega-
- if (TMath::Abs(lBachTransvMom - TMath::Sqrt( lNMomX*lNMomX + lNMomY*lNMomY ) ) < 0.075) continue;
- } else { //Xi+ or Omega+
- if(TMath::Abs(lBachTransvMom - TMath::Sqrt( lPMomX*lPMomX + lPMomY*lPMomY ) ) < 0.075) continue;
- }
- }
-
- } // end of ESD treatment
-
- else if (fAnalysisType == "AOD") {
-
- // -------------------------------------
- // - Load the cascades from the handler
- const AliAODcascade *xi = lAODevent->GetCascade(iXi);
- if (!xi) continue;
-
- //----------------------------------------------------------------------------
- // - Assigning the necessary variables for specific AliESDcascade data members
- lEffMassXi = xi->MassXi(); // default working hypothesis : cascade = Xi- decay
- lDcaXiDaughters = xi->DcaXiDaughters();
- lXiCosineOfPointingAngle = xi->CosPointingAngleXi( lBestPrimaryVtxPos[0],
- lBestPrimaryVtxPos[1],
- lBestPrimaryVtxPos[2] );
- lPosXi[0] = xi->DecayVertexXiX();
- lPosXi[1] = xi->DecayVertexXiY();
- lPosXi[2] = xi->DecayVertexXiZ();
- lXiRadius = TMath::Sqrt( lPosXi[0]*lPosXi[0] + lPosXi[1]*lPosXi[1] );
-
- //-------------------------------------------------------------------------------------------------------------------------------
- // - Around the tracks: Bach + V0 (ESD). Necessary variables for ESDcascade data members coming from the ESDv0 part (inheritance)
- AliAODTrack *pTrackXi = dynamic_cast<AliAODTrack*>( xi->GetDaughter(0) );
- AliAODTrack *nTrackXi = dynamic_cast<AliAODTrack*>( xi->GetDaughter(1) );
- AliAODTrack *bachTrackXi = dynamic_cast<AliAODTrack*>( xi->GetDecayVertexXi()->GetDaughter(0) );
- if (!pTrackXi || !nTrackXi || !bachTrackXi ) {
- AliWarning("ERROR: Could not retrieve one of the 3 AOD daughter tracks of the cascade ...");
- continue;
- }
- UInt_t lIdxPosXi = (UInt_t) TMath::Abs( pTrackXi->GetID() );
- UInt_t lIdxNegXi = (UInt_t) TMath::Abs( nTrackXi->GetID() );
- UInt_t lBachIdx = (UInt_t) TMath::Abs( bachTrackXi->GetID() );
- // Care track label can be negative in MC production (linked with the track quality)
- // However = normally, not the case for track index ...
- // - Rejection of a double use of a daughter track (nothing but just a crosscheck of what is done in the cascade vertexer)
- if (lBachIdx == lIdxNegXi) { AliWarning("Pb / Idx(Bach. track) = Idx(Neg. track) ... continue!"); continue; }
- if (lBachIdx == lIdxPosXi) { AliWarning("Pb / Idx(Bach. track) = Idx(Pos. track) ... continue!"); continue; }
- // - Get the TPCnumber of cluster for the daughters
- lPosTPCClusters = pTrackXi->GetTPCNcls(); // FIXME: Is this ok? or something like in LambdaK0PbPb task AOD?
- lNegTPCClusters = nTrackXi->GetTPCNcls();
- lBachTPCClusters = bachTrackXi->GetTPCNcls();
-
- //-------------------------------------
- // - Rejection of a poor quality tracks
- if (fkQualityCutTPCrefit) {
- // - Poor quality related to TPCrefit
- if (!(pTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / V0 Pos. track has no TPCrefit ... continue!"); continue; }
- if (!(nTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / V0 Neg. track has no TPCrefit ... continue!"); continue; }
- if (!(bachTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / Bach. track has no TPCrefit ... continue!"); continue; }
- }
- if (fkQualityCutnTPCcls) {
- // - Poor quality related to TPC clusters
- if (lPosTPCClusters < fMinnTPCcls) { //AliWarning("Pb / V0 Pos. track has less than 80 TPC clusters ... continue!");
- continue; }
- if (lNegTPCClusters < fMinnTPCcls) { //AliWarning("Pb / V0 Neg. track has less than 80 TPC clusters ... continue!");
- continue; }
- if (lBachTPCClusters < fMinnTPCcls) { //AliWarning("Pb / Bach. track has less than 80 TPC clusters ... continue!");
- continue; }
- }
-
- //---------------------------------------
- // - Around the tracks: Bach + V0 (AOD). Necessary variables for AODcascade data members coming from the AODv0 part (inheritance)
- etaPos = pTrackXi->Eta();
- etaNeg = nTrackXi->Eta();
- etaBach = bachTrackXi->Eta();
- lChargeXi = xi->ChargeXi();
- if ( lChargeXi < 0) lInvMassLambdaAsCascDghter = xi->MassLambda();
- else lInvMassLambdaAsCascDghter = xi->MassAntiLambda();
- lDcaV0DaughtersXi = xi->DcaV0Daughters();
- lDcaV0ToPrimVertexXi = xi->DcaV0ToPrimVertex();
- lDcaBachToPrimVertexXi = xi->DcaBachToPrimVertex();
- lPosV0Xi[0] = xi->DecayVertexV0X();
- lPosV0Xi[1] = xi->DecayVertexV0Y();
- lPosV0Xi[2] = xi->DecayVertexV0Z();
- lV0RadiusXi = TMath::Sqrt( lPosV0Xi[0]*lPosV0Xi[0] + lPosV0Xi[1]*lPosV0Xi[1] );
- lV0CosineOfPointingAngleXi = xi->CosPointingAngle( lBestPrimaryVtxPos );
- lDcaPosToPrimVertexXi = xi->DcaPosToPrimVertex();
- lDcaNegToPrimVertexXi = xi->DcaNegToPrimVertex();
-
- //----------------------------------------------------------------------------------------------------
- // - Around effective masses. Change mass hypotheses to cover all the possibilities: Xi-/+, Omega -/+
- if ( lChargeXi < 0 ) lInvMassXiMinus = xi->MassXi();
- if ( lChargeXi > 0 ) lInvMassXiPlus = xi->MassXi();
- if ( lChargeXi < 0 ) lInvMassOmegaMinus = xi->MassOmega();
- if ( lChargeXi > 0 ) lInvMassOmegaPlus = xi->MassOmega();
-
- //--------------------------------
- // - PID on the daughter tracks
- // - Combined PID -> removed, add when will be used
-
- // - TPC PID : 3-sigma bands on Bethe-Bloch curve
- //Bachelor
- if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 4) lIsBachelorKaonForTPC = kTRUE;
- if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 4) lIsBachelorPionForTPC = kTRUE;
- //Negative V0 daughter
- if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 4) lIsNegPionForTPC = kTRUE;
- if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kProton )) < 4) lIsNegProtonForTPC = kTRUE;
- //Positive V0 daughter
- if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 4) lIsPosPionForTPC = kTRUE;
- if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 4) lIsPosProtonForTPC = kTRUE;
-
- //---------------------------------
- // - Extra info for QA (AOD)
- // Miscellaneous pieces of info that may help regarding data quality assessment.
- // Cascade transverse and total momentum
- lXiMomX = xi->MomXiX();
- lXiMomY = xi->MomXiY();
- lXiMomZ = xi->MomXiZ();
- lXiTransvMom = TMath::Sqrt( lXiMomX*lXiMomX + lXiMomY*lXiMomY );
- lXiTotMom = TMath::Sqrt( lXiMomX*lXiMomX + lXiMomY*lXiMomY + lXiMomZ*lXiMomZ );
- Double_t lV0MomX = xi->MomV0X();
- Double_t lV0MomY = xi->MomV0Y();
- Double_t lV0MomZ = xi->MomV0Z();
- lV0TotMom = TMath::Sqrt(TMath::Power(lV0MomX,2)+TMath::Power(lV0MomY,2)+TMath::Power(lV0MomZ,2));
- lBachMomX = xi->MomBachX();
- lBachMomY = xi->MomBachY();
- lBachMomZ = xi->MomBachZ();
- lBachTransvMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY );
- lBachTotMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY + lBachMomZ*lBachMomZ );
- lV0NMomX = xi->MomNegX();
- lV0NMomY = xi->MomNegY();
- lV0PMomX = xi->MomPosX();
- lV0PMomY = xi->MomPosY();
- lnTrackTransvMom = TMath::Sqrt( lV0NMomX*lV0NMomX + lV0NMomY*lV0NMomY );
- lpTrackTransvMom = TMath::Sqrt( lV0PMomX*lV0PMomX + lV0PMomY*lV0PMomY );
- lV0toXiCosineOfPointingAngle = xi->CosPointingAngle( xi->GetDecayVertexXi() );
- lRapXi = xi->RapXi();
- lRapOmega = xi->RapOmega();
- lEta = xi->Eta(); // Will not work ! need a method Pz(), Py() Px()
- lTheta = xi->Theta() *180.0/TMath::Pi(); // in AODcascade.
- lPhi = xi->Phi() *180.0/TMath::Pi(); // Here, we will get eta, theta, phi for the V0 ...
- lAlphaXi = xi->AlphaXi();
- lPtArmXi = xi->PtArmXi();
-
- } // end of AOD treatment
-
- // Cut on pt of the three daughter tracks
- if (lBachTransvMom<fMinPtCutOnDaughterTracks) continue;
- if (lpTrackTransvMom<fMinPtCutOnDaughterTracks) continue;
- if (lnTrackTransvMom<fMinPtCutOnDaughterTracks) continue;
-
- // Cut on pseudorapidity of the three daughter tracks
- if (TMath::Abs(etaBach)>fEtaCutOnDaughterTracks) continue;
- if (TMath::Abs(etaPos)>fEtaCutOnDaughterTracks) continue;
- if (TMath::Abs(etaNeg)>fEtaCutOnDaughterTracks) continue;
-
-
- //----------------------------------
- // Calculate proper lenght for cascade
- Double_t cascadeMass = 0.;
- if ( ( (lChargeXi<0) && lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) ||
- ( (lChargeXi>0) && lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) ) cascadeMass = 1.321;
- if ( ( (lChargeXi<0) && lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) ||
- ( (lChargeXi>0) && lIsBachelorKaonForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) ) cascadeMass = 1.672;
- 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));
- if (lXiTotMom!=0) lctau = lctau*cascadeMass/lXiTotMom;
- else lctau = -1.;
-
- //-------------------------------------------------
- // Calculate proper lenght for Lambda (reconstructed)
- Float_t lambdaMass = 1.115683; // PDG mass
- 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));
- Float_t lctauV0 = -1.;
- if (lV0TotMom!=0) lctauV0 = distV0Xi*lambdaMass/lV0TotMom;
- Float_t distTV0Xi = TMath::Sqrt(TMath::Power((lPosV0Xi[0]-lPosXi[0]),2)+TMath::Power((lPosV0Xi[1]-lPosXi[1]),2));
-
- //--------------
- /*// For AliEVE
- if(lChargeXi < 0&& lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) {
- if (lXiTransvMom>2.&&lXiTransvMom<4.&&(lInvMassXiMinus<1.322&&lInvMassXiMinus>1.320)&&(lXiRadius<8.&&lXiRadius>3.)) {
- // FIXME : Just to know which file is currently open : locate the file containing Xi
- cout << "Name of the file containing Xi candidate(s) :"
- << CurrentFileName()
- << " / entry: " << Entry()
- << " / in file: " << lESDevent->GetEventNumberInFile() // <- Cvetan / From Mihaela: AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()->GetTree()->GetReadEntry();
- << " AliESDcascade number " << iXi
- << " : mass(Xi-) = " << lInvMassXiMinus
- << " / charge = " << lChargeXi
- << " / pt(Casc) = " << lXiTransvMom
- << " / Decay 2d R(Xi) = " << lXiRadius
- << endl;
- }
- }
- if(lChargeXi < 0&& lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) {
- if (lXiTransvMom>2&&lXiTransvMom<4&&(lInvMassOmegaMinus<1.674&&lInvMassOmegaMinus>1.670)&&(lXiRadius<8.&&lXiRadius>3.)) {
- cout << "Name of the file containing Omega candidate(s) :"
- << CurrentFileName()
- << " / entry: " << Entry()
- << " / in file: " << lESDevent->GetEventNumberInFile() // <- Cvetan / From Mihaela: AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()->GetTree()->GetReadEntry();
- << " AliESDcascade number " << iXi
- << " : mass(Omega-) = " << lInvMassOmegaMinus
- << " / charge = " << lChargeXi
- << " / pt(Casc) = " << lXiTransvMom
- << " / Decay 2d R(Xi) = " << lXiRadius
- << endl;
-
- }
- }*/
-
-
- // -
- fHistPosV0TPCClusters->Fill( lPosTPCClusters );
- fHistNegV0TPCClusters->Fill( lNegTPCClusters );
- fHistBachTPCClusters->Fill( lBachTPCClusters );
- f2dHistTPCdEdxOfCascDghters->Fill( lInnerWallMomCascDghters[0] , lTPCSignalCascDghters[0] );
- f2dHistTPCdEdxOfCascDghters->Fill( lInnerWallMomCascDghters[1] , lTPCSignalCascDghters[1] );
- f2dHistTPCdEdxOfCascDghters->Fill( lInnerWallMomCascDghters[2] , lTPCSignalCascDghters[2] );
-
- //----------------
- //Plot with PID on
- if ( ( (lChargeXi<0) && lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) ||
- ( (lChargeXi>0) && lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) ) {
- // NOTE :
- // with this condition, it could happen that a cascade candidate satisfies the wrong requirement,
- // e.g. one looks at a Xi- candidate for which lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC = kFALSE
- // Expectation: it should be excluded, but lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC = kTRUE
- // then this bad Xi-candidate will contribute anyway (OR condition).
- // Hence: the extra condition on the sign of the Cascade
- //if (TMath::Abs( lInvMassXiMinus-1.3217 ) < 0.010 || TMath::Abs( lInvMassXiPlus-1.3217 ) < 0.010)
- fHistEffMassXi->Fill( lEffMassXi );
- fHistDcaXiDaughters->Fill( lDcaXiDaughters ); // Flag CascadeVtxer: Cut Variable e
- fHistDcaBachToPrimVertex->Fill( lDcaBachToPrimVertexXi ); // Flag CascadeVtxer: Cut Variable d
- fHistXiCosineOfPointingAngle->Fill( lXiCosineOfPointingAngle ); // Flag CascadeVtxer: Cut Variable f
- fHistXiRadius->Fill( lXiRadius ); // Flag CascadeVtxer: Cut Variable g+h
- fHistMassLambdaAsCascDghter->Fill( lInvMassLambdaAsCascDghter ); // Flag CascadeVtxer: Cut Variable c
- fHistDcaV0DaughtersXi->Fill( lDcaV0DaughtersXi );
- fHistV0CosineOfPointingAngleXi->Fill( lV0CosineOfPointingAngleXi );
- fHistV0RadiusXi->Fill( lV0RadiusXi );
- fHistDcaV0ToPrimVertexXi->Fill( lDcaV0ToPrimVertexXi ); // Flag CascadeVtxer: Cut Variable b
- fHistDcaPosToPrimVertexXi->Fill( lDcaPosToPrimVertexXi );
- fHistDcaNegToPrimVertexXi->Fill( lDcaNegToPrimVertexXi );
- fHistChargeXi->Fill( lChargeXi );
- fHistV0toXiCosineOfPointingAngle->Fill( lV0toXiCosineOfPointingAngle );
- if ( TMath::Abs( lInvMassXiMinus-1.3217 ) < 0.012 || TMath::Abs( lInvMassXiPlus-1.3217 ) < 0.012) { // One InvMass should be different from 0
- fHistXiTransvMom->Fill( lXiTransvMom );
- fHistXiTotMom->Fill( lXiTotMom );
- fHistBachTransvMomXi->Fill( lBachTransvMom );
- fHistBachTotMomXi->Fill( lBachTotMom );
- fHistRapXi->Fill( lRapXi );
- fHistEtaXi->Fill( lEta );
- if (lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC) {
- fHistEtaBachXi->Fill( etaBach );
- fHistEtaPosXi->Fill( etaPos );
- fHistEtaNegXi->Fill( etaNeg );
- }
- fHistThetaXi->Fill( lTheta );
- fHistPhiXi->Fill( lPhi );
- }
- if ( TMath::Abs( lInvMassOmegaMinus-1.672 ) < 0.012 || TMath::Abs( lInvMassOmegaPlus-1.672 ) < 0.012 ) { // One InvMass should be different from 0
- fHistRapOmega->Fill( lRapOmega );
- }
- f2dHistArmenteros->Fill( lAlphaXi, lPtArmXi );
- } // end with PID ...
-
- //-----------------------
- // - Invariant mass plots
- //Plots 1D
- if ( lChargeXi < 0 ) {
- fHistMassXiMinus->Fill( lInvMassXiMinus );
- fHistMassOmegaMinus->Fill( lInvMassOmegaMinus );
- f2dHistDcaXiDaughtersvsInvMass->Fill(lDcaXiDaughters,lInvMassXiMinus);
- f2dHistDcaBachToPrimVertexvsInvMass->Fill(lDcaBachToPrimVertexXi,lInvMassXiMinus);
- f2dHistXiCosineOfPointingAnglevsInvMass->Fill(lXiCosineOfPointingAngle,lInvMassXiMinus);
- f2dHistMassLambdaAsCascDghtervsInvMass->Fill(lInvMassLambdaAsCascDghter,lInvMassXiMinus);
- f2dHistDcaV0DaughtersXivsInvMass->Fill(lDcaV0DaughtersXi,lInvMassXiMinus);
- f2dHistDcaV0ToPrimVertexXivsInvMass->Fill(lDcaV0ToPrimVertexXi,lInvMassXiMinus);
- }
- if ( lChargeXi > 0 ) {
- fHistMassXiPlus->Fill( lInvMassXiPlus );
- fHistMassOmegaPlus->Fill( lInvMassOmegaPlus );
- }
- //Plots 2D, 3D
- if ( lChargeXi < 0 ) {
- f2dHistEffMassLambdaVsEffMassXiMinus->Fill( lInvMassLambdaAsCascDghter, lInvMassXiMinus );
- f2dHistEffMassXiVsEffMassOmegaMinus ->Fill( lInvMassXiMinus, lInvMassOmegaMinus );
- f2dHistXiRadiusVsEffMassXiMinus ->Fill( lXiRadius, lInvMassXiMinus );
- f2dHistXiRadiusVsEffMassOmegaMinus ->Fill( lXiRadius, lInvMassOmegaMinus );
- } else {
- f2dHistEffMassLambdaVsEffMassXiPlus ->Fill( lInvMassLambdaAsCascDghter, lInvMassXiPlus );
- f2dHistEffMassXiVsEffMassOmegaPlus ->Fill( lInvMassXiPlus, lInvMassOmegaPlus );
- f2dHistXiRadiusVsEffMassXiPlus ->Fill( lXiRadius, lInvMassXiPlus);
- f2dHistXiRadiusVsEffMassOmegaPlus ->Fill( lXiRadius, lInvMassOmegaPlus );
- }
-
- //---------------------------------------------
- // - Filling the AliCFContainers related to PID
- Double_t lContainerPIDVars[3] = {0.0};
- // Xi Minus
- if ( lChargeXi < 0 ) {
- lContainerPIDVars[0] = lXiTransvMom;
- lContainerPIDVars[1] = lInvMassXiMinus;
- lContainerPIDVars[2] = lRapXi;
- //No PID
- fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 0); // No PID
- //TPC PID
- if ( lIsBachelorPionForTPC ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track
- if ( lIsBachelorPionForTPC && lIsPosProtonForTPC ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks
- if ( lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks
- //Combined PID
- if ( lIsBachelorPion ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor
- if ( lIsBachelorPion && lIsPosInXiProton ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon
- if (lIsBachelorPion && lIsPosInXiProton && lIsNegInXiPion ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson
- }
- lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.;
- // Xi Plus
- if ( lChargeXi > 0 ) {
- lContainerPIDVars[0] = lXiTransvMom;
- lContainerPIDVars[1] = lInvMassXiPlus;
- lContainerPIDVars[2] = lRapXi;
- //No PID
- fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 0); // No PID
- //TPC PID
- if ( lIsBachelorPionForTPC ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track
- if ( lIsBachelorPionForTPC && lIsNegProtonForTPC ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks
- if ( lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks
- //Combined PID
- if ( lIsBachelorPion ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor
- if ( lIsBachelorPion && lIsNegInXiProton ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon
- if (lIsBachelorPion && lIsNegInXiProton && lIsPosInXiPion ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson
- }
- lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.;
- // Omega Minus
- if ( lChargeXi < 0 ) {
- lContainerPIDVars[0] = lXiTransvMom;
- lContainerPIDVars[1] = lInvMassOmegaMinus;
- lContainerPIDVars[2] = lRapOmega;
- //No PID
- fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 0); // No PID
- //TPC PID
- if ( lIsBachelorKaonForTPC ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track
- if ( lIsBachelorKaonForTPC && lIsPosProtonForTPC ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks
- if ( lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks
- //Combined PID
- if ( lIsBachelorKaon ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor
- if ( lIsBachelorKaon && lIsPosInOmegaProton ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon
- if (lIsBachelorKaon && lIsPosInOmegaProton && lIsNegInOmegaPion ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson
- }
- lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.;
- // Omega Plus
- if ( lChargeXi > 0 ) {
- lContainerPIDVars[0] = lXiTransvMom;
- lContainerPIDVars[1] = lInvMassOmegaPlus;
- lContainerPIDVars[2] = lRapOmega;
- // No PID
- fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 0); // No PID
- // TPC PID
- if ( lIsBachelorKaonForTPC )
- fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track
- if( lIsBachelorKaonForTPC &&
- lIsNegProtonForTPC )
- fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks
- if ( lIsBachelorKaonForTPC &&
- lIsNegProtonForTPC &&
- lIsPosPionForTPC )
- fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks
- // Combined PID
- if ( lIsBachelorKaon )
- fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor
- if ( lIsBachelorKaon &&
- lIsNegInOmegaProton )
- fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon
- if (lIsBachelorKaon &&
- lIsNegInOmegaProton &&
- lIsPosInOmegaPion )
- fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson
- }
-
- //--------------------------------------------------------------------
- // Filling the AliCFContainer (optimisation of topological selections)
- Double_t lContainerCutVars[19] = {0.0};
-
- lContainerCutVars[0] = lDcaXiDaughters;
- lContainerCutVars[1] = lDcaBachToPrimVertexXi;
- lContainerCutVars[2] = lXiCosineOfPointingAngle;
- lContainerCutVars[3] = lXiRadius;
- lContainerCutVars[4] = lInvMassLambdaAsCascDghter;
- lContainerCutVars[5] = lDcaV0DaughtersXi;
- lContainerCutVars[6] = lV0toXiCosineOfPointingAngle;
- lContainerCutVars[7] = lV0RadiusXi;
- lContainerCutVars[8] = lDcaV0ToPrimVertexXi;
- lContainerCutVars[9] = lDcaPosToPrimVertexXi;
- lContainerCutVars[10] = lDcaNegToPrimVertexXi;
- lContainerCutVars[13] = lXiTransvMom;
- lContainerCutVars[16] = lctau;
- lContainerCutVars[17] = lctauV0;
- lContainerCutVars[18] = distTV0Xi;
-
- if ( lChargeXi < 0 ) {
- lContainerCutVars[11] = lInvMassXiMinus;
- lContainerCutVars[12] = lInvMassOmegaMinus;
- lContainerCutVars[14] = lRapXi;
- lContainerCutVars[15] = -1.;
- if (lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC) fCFContCascadeCuts->Fill(lContainerCutVars,0); // for Xi-
- lContainerCutVars[11] = lInvMassXiMinus;
- lContainerCutVars[12] = lInvMassOmegaMinus;
- lContainerCutVars[14] = -1.;
- lContainerCutVars[15] = lRapOmega;
- if (lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC) fCFContCascadeCuts->Fill(lContainerCutVars,2); // for Omega-
- } else {
- lContainerCutVars[11] = lInvMassXiPlus;
- lContainerCutVars[12] = lInvMassOmegaPlus;
- lContainerCutVars[14] = lRapXi;
- lContainerCutVars[15] = -1.;
- if (lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC) fCFContCascadeCuts->Fill(lContainerCutVars,1); // for Xi+
- lContainerCutVars[11] = lInvMassXiPlus;
- lContainerCutVars[12] = lInvMassOmegaPlus;
- lContainerCutVars[14] = -1.;
- lContainerCutVars[15] = lRapOmega;
- if (lIsBachelorKaonForTPC && lIsNegProtonForTPC && lIsPosPionForTPC) fCFContCascadeCuts->Fill(lContainerCutVars,3); // for Omega+
- }
- } //end of the Cascade loop (ESD or AOD)
-
- // Post output data.
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDXiMinus);
- PostData(3, fCFContCascadePIDXiPlus);
- PostData(4, fCFContCascadePIDOmegaMinus);
- PostData(5, fCFContCascadePIDOmegaPlus);
- PostData(6, fCFContCascadeCuts);
-}
-
-//________________________________________________________________________
-Int_t AliAnalysisTaskCheckCascadepp276::DoESDTrackWithTPCrefitMultiplicity(const AliESDEvent *lESDevent) {
- // Checking the number of tracks with TPCrefit for each event
- // Needed for a rough assessment of the event multiplicity
-
- Int_t nTrackWithTPCrefitMultiplicity = 0;
- for (Int_t iTrackIdx = 0; iTrackIdx < (InputEvent())->GetNumberOfTracks(); iTrackIdx++) {
- AliESDtrack *esdTrack = 0x0;
- esdTrack = lESDevent->GetTrack( iTrackIdx );
- if (!esdTrack) { AliWarning("Pb / Could not retrieve one track within the track loop for TPCrefit check ..."); continue; }
-
- ULong_t lTrackStatus = esdTrack->GetStatus();
- if ((lTrackStatus&AliESDtrack::kTPCrefit) == 0) continue;
- else nTrackWithTPCrefitMultiplicity++;
- // FIXME :
- // The goal here is to get a better assessment of the event multiplicity.
- // (InputEvent())->GetNumberOfTracks() takes into account ITS std alone tracks + global tracks
- // This may introduce a bias. Hence the number of TPC refit tracks.
- // Note : the event multiplicity = analysis on its own... See Jacek's or Jan Fiete's analysis on dN/d(eta)
-
- } // end loop over all event tracks
- return nTrackWithTPCrefitMultiplicity;
-}
-
-
-//________________________________________________________________________
-void AliAnalysisTaskCheckCascadepp276::Terminate(Option_t *)
-{
- // Draw result to the screen
- // Called once at the end of the query
-
-/* TList *cRetrievedList = 0x0;
- cRetrievedList = (TList*)GetOutputData(1);
- if(!cRetrievedList){
- AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: ouput data container list not available\n"); return;
- }
- fHistTrackMultiplicity = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistTrackMultiplicity") );
- if (!fHistTrackMultiplicity) {
- AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: fHistTrackMultiplicity not available\n"); return;
- }
- fHistMassXiMinus = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistMassXiMinus") );
- if (!fHistMassXiMinus) {
- AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: fHistMassXiMinus not available\n"); return;
- }
- fHistMassXiPlus = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistMassXiPlus") );
- if (!fHistMassXiPlus) {
- AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: fHistMassXiPlus not available\n"); return;
- }
- fHistMassOmegaMinus = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistMassOmegaMinus") );
- if (!fHistMassOmegaMinus) {
- AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: fHistMassOmegaMinus not available\n"); return;
- }
- fHistMassOmegaPlus = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistMassOmegaPlus") );
- if (!fHistMassOmegaPlus) {
- AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: fHistMassOmegaPlus not available\n"); return;
- }
-
- TCanvas *canCheckCascade = new TCanvas("AliAnalysisTaskCheckCascadep276","CheckCascade overview",10,10,1010,660);
- canCheckCascade->Divide(2,2);
-
- canCheckCascade->cd(1);
- canCheckCascade->cd(1)->SetLogy();
- fHistTrackMultiplicity->SetMarkerStyle(kFullStar);
- fHistTrackMultiplicity->GetXaxis()->SetLabelFont(42);
- fHistTrackMultiplicity->GetYaxis()->SetLabelFont(42);
- fHistTrackMultiplicity->SetTitleFont(42, "xy");
- fHistTrackMultiplicity->GetXaxis()->SetTitleOffset(1.1);
- fHistTrackMultiplicity->DrawCopy("H");
-
- canCheckCascade->cd(2);
- fHistMassXiMinus ->SetMarkerStyle(kFullCircle);
- fHistMassXiMinus ->SetMarkerSize(0.5);
- fHistMassXiMinus ->GetXaxis()->SetLabelFont(42);
- fHistMassXiMinus ->GetYaxis()->SetLabelFont(42);
- fHistMassXiMinus ->SetTitleFont(42, "xy");
- fHistMassXiMinus ->GetXaxis()->SetTitleOffset(1.1);
- fHistMassXiMinus ->GetYaxis()->SetTitleOffset(1.3);
- //fHistMassXiMinus->Rebin(2);
- fHistMassXiMinus ->GetXaxis()->SetRangeUser(1.24, 1.42);
- fHistMassXiMinus ->DrawCopy("E");
-
- fHistMassXiPlus ->SetMarkerStyle(kOpenCircle);
- fHistMassXiPlus ->SetMarkerColor(kRed+2);
- fHistMassXiPlus ->SetLineColor(kRed+2);
- fHistMassXiPlus ->SetMarkerSize(0.5);
- //fHistMassXiPlus ->Rebin(2);
- fHistMassXiPlus ->DrawCopy("ESAME");
-
-
- TLegend *legendXi =new TLegend(0.67,0.34,0.97,0.54);
- legendXi->SetTextFont(42);
- legendXi->SetTextSize(0.05);
- legendXi->SetFillColor(kWhite);
- legendXi->AddEntry( fHistMassXiMinus,"#Xi^{-} candidates","lp");
- legendXi->AddEntry( fHistMassXiPlus,"#Xi^{+} candidates","lp");
- legendXi->Draw();
-
-
- canCheckCascade->cd(3);
- fHistMassOmegaPlus ->SetMarkerStyle(kOpenCircle);
- fHistMassOmegaPlus ->SetMarkerColor(kRed+2);
- fHistMassOmegaPlus ->SetLineColor(kRed+2);
- fHistMassOmegaPlus ->SetMarkerSize(0.5);
- fHistMassOmegaPlus ->GetXaxis()->SetLabelFont(42);
- fHistMassOmegaPlus ->GetYaxis()->SetLabelFont(42);
- fHistMassOmegaPlus ->SetTitleFont(42, "xy");
- fHistMassOmegaPlus ->GetXaxis()->SetTitleOffset(1.1);
- fHistMassOmegaPlus ->GetYaxis()->SetTitleOffset(1.25);
- //fHistMassOmegaPlus ->Rebin(2);
- fHistMassOmegaPlus ->GetXaxis()->SetRangeUser(1.6, 1.84);
- fHistMassOmegaPlus ->DrawCopy("E");
-
- fHistMassOmegaMinus->SetMarkerStyle(kFullCircle);
- fHistMassOmegaMinus->SetMarkerSize(0.5);
- //fHistMassOmegaMinus->Rebin(2);
- fHistMassOmegaMinus->DrawCopy("ESAME");
-
-
- TLegend *legendOmega = new TLegend(0.67,0.34,0.97,0.54);
- legendOmega->SetTextFont(42);
- legendOmega->SetTextSize(0.05);
- legendOmega->SetFillColor(kWhite);
- legendOmega->AddEntry( fHistMassOmegaMinus,"#Omega^{-} candidates","lp");
- legendOmega->AddEntry( fHistMassOmegaPlus,"#Omega^{+} candidates","lp");
- legendOmega->Draw();
- */
-}
+/**************************************************************************\r
+ * Authors : Antonin Maire, Boris Hippolyte *\r
+ * Contributors are mentioned in the code where appropriate. *\r
+ * *\r
+ * Permission to use, copy, modify and distribute this software and its *\r
+ * documentation strictly for non-commercial purposes is hereby granted *\r
+ * without fee, provided that the above copyright notice appears in all *\r
+ * copies and that both the copyright notice and this permission notice *\r
+ * appear in the supporting documentation. The authors make no claims *\r
+ * about the suitability of this software for any purpose. It is *\r
+ * provided "as is" without express or implied warranty. *\r
+ **************************************************************************/\r
+\r
+//-----------------------------------------------------------------\r
+// AliAnalysisTaskCheckCascadepp276 class\r
+//\r
+// Origin AliAnalysisTaskCheckCascade which has four roles :\r
+// 1. QAing the Cascades from ESD and AOD\r
+// Origin: AliAnalysisTaskESDCheckV0 by Boris Hippolyte Nov2007, hippolyt@in2p3.fr\r
+// 2. Prepare the plots which stand as raw material for yield extraction (wi/wo PID)\r
+// 3. Supply an AliCFContainer meant to define the optimised topological selections\r
+// 4. Rough azimuthal correlation study (Eta, Phi)\r
+// Adapted to Cascade : A.Maire Mar2008, antonin.maire@ires.in2p3.fr\r
+// Modified : A.Maire Mar2010 \r
+//\r
+// Adapted to PbPb analysis: M. Nicassio, maria.nicassio@ba.infn.it\r
+// Feb-August2011\r
+// - Physics selection moved to the run.C macro\r
+// - Centrality selection added (+ setters) and histos\r
+// - flag and setters added (CF container usage, vertex range)\r
+// - histo added and histo/container binning changed \r
+// - protection in the destructor for CAF usage \r
+// - AliWarning disabled\r
+// - number of tracklets from AOD also \r
+// - automatic settings for PID\r
+// September2011\r
+// - proper time histos/container added (V0 and Cascades)\r
+// - cosine PA V0 wrt Xi vertex in the container \r
+// November2011\r
+// - re-run V0's and cascade's vertexers (SetCuts instead SetDefaultCuts!!)\r
+// - problems of libraries on Grid --> code copied in the task (from AliRoot v5-10-AN\r
+// where new pt dependent V0's cosPA cut implemented by Iouri) \r
+// - AOD analysis part completed \r
+//\r
+//\r
+// Adapted to pp 2.76 analysis: D. Colella, domenico.colella@ba.infn.it\r
+// Gen-now 2012\r
+// - Physics selection re-moved here (mainly for normalization in the efficiency calcuation)\r
+// - Centrality selection deleted\r
+// - \r
+//\r
+//-----------------------------------------------------------------\r
+\r
+class TTree;\r
+class TParticle;\r
+class TVector3;\r
+\r
+class AliESDVertex;\r
+class AliAODVertex;\r
+class AliESDv0;\r
+class AliAODv0;\r
+\r
+#include <Riostream.h>\r
+#include "TList.h"\r
+#include "TH1.h"\r
+#include "TH2.h"\r
+#include "TH3.h"\r
+#include "THnSparse.h"\r
+#include "TVector3.h"\r
+#include "TCanvas.h"\r
+#include "TMath.h"\r
+#include "TLegend.h"\r
+\r
+#include "AliLog.h"\r
+#include "AliESDEvent.h"\r
+#include "AliAODEvent.h"\r
+#include "AliV0vertexer.h"\r
+#include "AliCascadeVertexer.h"\r
+#include "AliESDtrackCuts.h"\r
+#include "AliPIDResponse.h"\r
+\r
+#include "AliESDVZERO.h"\r
+\r
+#include "AliInputEventHandler.h"\r
+#include "AliAnalysisManager.h"\r
+#include "AliMCEventHandler.h"\r
+#include "AliESDInputHandler.h" \r
+#include "AliAODInputHandler.h"\r
+#include "AliCFContainer.h"\r
+#include "AliMultiplicity.h"\r
+\r
+#include "AliESDcascade.h"\r
+#include "AliAODcascade.h"\r
+#include "AliAODTrack.h"\r
+\r
+#include "AliAnalysisTaskCheckCascadepp276.h"\r
+\r
+\r
+using std::cout;\r
+using std::endl;\r
+\r
+ClassImp(AliAnalysisTaskCheckCascadepp276)\r
+\r
+\r
+\r
+//________________________________________________________________________\r
+AliAnalysisTaskCheckCascadepp276::AliAnalysisTaskCheckCascadepp276() \r
+ : AliAnalysisTaskSE(), \r
+ fAnalysisType ("ESD"),\r
+ fESDtrackCuts (0),\r
+ fPIDResponse (0),\r
+ fkRerunV0CascVertexers (0),\r
+ fkSDDSelectionOn (kTRUE),\r
+ fkQualityCutZprimVtxPos (kTRUE),\r
+ fkQualityCutNoTPConlyPrimVtx(kTRUE),\r
+ fkQualityCutTPCrefit (kTRUE),\r
+ fkQualityCutnTPCcls (kTRUE),\r
+ fkQualityCutPileup (kTRUE),\r
+ fwithSDD (kTRUE),\r
+ fMinnTPCcls (0),\r
+ fkExtraSelections (0),\r
+ fVtxRange (0),\r
+ fVtxRangeMin (0),\r
+ fMinPtCutOnDaughterTracks (0),\r
+ fEtaCutOnDaughterTracks (0),\r
+\r
+ // - Plots initialisation\r
+ fListHistCascade(0),\r
+ // Cascades multiplicity plots\r
+ fHistCascadeMultiplicityBeforeAnySel(0),\r
+ fHistCascadeMultiplicityAfterSDDSel(0),\r
+ fHistCascadeMultiplicityAfterPhysicsSel(0),\r
+ fHistCascadeMultiplicityForSelEvtNoTPCOnly(0),\r
+ fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup(0),\r
+ fHistCascadeMultiplicityAfterVertexCutSel(0),\r
+ // Tracks multiplicity plots\r
+ fHistTrackMultiplicityBeforeAnySel(0),\r
+ fHistTrackMultiplicityAfterSDDSel(0),\r
+ fHistTrackMultiplicityAfterPhysicsSel(0),\r
+ fHistTrackMultiplicityForSelEvtNoTPCOnly(0),\r
+ fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup(0),\r
+ fHistTrackMultiplicityAfterVertexCutSel(0),\r
+ // Vertex position plots (BestVertex)\r
+ fHistPVx(0), fHistPVy(0), fHistPVz(0),\r
+ fHistPVxAnalysis(0), fHistPVyAnalysis(0), fHistPVzAnalysis(0), \r
+ // TPC cluster distributions for daughters\r
+ fHistPosV0TPCClusters(0), \r
+ fHistNegV0TPCClusters(0), \r
+ fHistBachTPCClusters(0),\r
+ // Cut's variables distributions\r
+ fHistEffMassXi(0), \r
+ fHistDcaXiDaughters(0), \r
+ fHistDcaBachToPrimVertex(0), \r
+ fHistXiCosineOfPointingAngle(0), \r
+ fHistXiRadius(0),\r
+ fHistMassLambdaAsCascDghter(0),\r
+ fHistDcaV0DaughtersXi(0),\r
+ fHistDcaV0ToPrimVertexXi(0), \r
+ fHistV0CosineOfPointingAngleXi(0),\r
+ fHistV0RadiusXi(0),\r
+ fHistDcaPosToPrimVertexXi(0), \r
+ fHistDcaNegToPrimVertexXi(0), \r
+ // Invariant mass distributions\r
+ fHistMassXiMinus(0), fHistMassXiPlus(0), fHistMassOmegaMinus(0), fHistMassOmegaPlus(0),\r
+ // Transverse and total momentum distributions\r
+ fHistXiTransvMom(0), fHistXiTotMom(0), fHistBachTransvMomXi(0), fHistBachTotMomXi(0),\r
+ // Others QA plots\r
+ fHistChargeXi(0),\r
+ fHistV0toXiCosineOfPointingAngle(0),\r
+ fHistRapXi(0), fHistRapOmega(0), \r
+ fHistEtaXi(0), fHistEtaBachXi(0), fHistEtaPosXi(0), fHistEtaNegXi(0),\r
+ fHistThetaXi(0), \r
+ fHistPhiXi(0),\r
+ f2dHistArmenteros(0), \r
+ f2dHistEffMassLambdaVsEffMassXiMinus(0), f2dHistEffMassXiVsEffMassOmegaMinus(0),\r
+ f2dHistEffMassLambdaVsEffMassXiPlus(0), f2dHistEffMassXiVsEffMassOmegaPlus(0),\r
+ f2dHistXiRadiusVsEffMassXiMinus(0), f2dHistXiRadiusVsEffMassXiPlus(0),\r
+ f2dHistXiRadiusVsEffMassOmegaMinus(0), f2dHistXiRadiusVsEffMassOmegaPlus(0),\r
+ f2dHistTPCdEdxOfCascDghters(0),\r
+ f2dHistDcaXiDaughtersvsInvMass(0), \r
+ f2dHistDcaBachToPrimVertexvsInvMass(0), \r
+ f2dHistXiCosineOfPointingAnglevsInvMass(0),\r
+ f2dHistMassLambdaAsCascDghtervsInvMass(0),\r
+ f2dHistDcaV0DaughtersXivsInvMass(0),\r
+ f2dHistDcaV0ToPrimVertexXivsInvMass(0),\r
+ // Containers for cuts study \r
+ fCFContCascadePIDXiMinus(0),\r
+ fCFContCascadePIDXiPlus(0),\r
+ fCFContCascadePIDOmegaMinus(0),\r
+ fCFContCascadePIDOmegaPlus(0),\r
+ fCFContCascadeCuts(0)\r
+ \r
+ {\r
+ // Dummy Constructor\r
+ for(Int_t iV0selIdx = 0; iV0selIdx < 7; iV0selIdx++ ) { fV0Sels [iV0selIdx ] = -1.; }\r
+ for(Int_t iCascSelIdx = 0; iCascSelIdx < 8; iCascSelIdx++ ) { fCascSels [iCascSelIdx ] = -1.; }\r
+ }\r
+\r
+\r
+//________________________________________________________________________\r
+AliAnalysisTaskCheckCascadepp276::AliAnalysisTaskCheckCascadepp276(const char *name) \r
+ : AliAnalysisTaskSE(name), \r
+ fAnalysisType ("ESD"), \r
+ fESDtrackCuts (0), \r
+ fPIDResponse (0),\r
+ fkRerunV0CascVertexers (0),\r
+ fkSDDSelectionOn (kTRUE),\r
+ fkQualityCutZprimVtxPos (kTRUE),\r
+ fkQualityCutNoTPConlyPrimVtx(kTRUE),\r
+ fkQualityCutTPCrefit (kTRUE),\r
+ fkQualityCutnTPCcls (kTRUE),\r
+ fkQualityCutPileup (kTRUE),\r
+ fwithSDD (kTRUE),\r
+ fMinnTPCcls (0),\r
+ fkExtraSelections (0),\r
+ fVtxRange (0),\r
+ fVtxRangeMin (0),\r
+ fMinPtCutOnDaughterTracks (0),\r
+ fEtaCutOnDaughterTracks (0),\r
+ \r
+ // - Plots initialisation\r
+ fListHistCascade(0),\r
+\r
+ // Cascades multiplicity plots\r
+ fHistCascadeMultiplicityBeforeAnySel(0),\r
+ fHistCascadeMultiplicityAfterSDDSel(0),\r
+ fHistCascadeMultiplicityAfterPhysicsSel(0),\r
+ fHistCascadeMultiplicityForSelEvtNoTPCOnly(0),\r
+ fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup(0),\r
+ fHistCascadeMultiplicityAfterVertexCutSel(0),\r
+ // Tracks multiplicity plots\r
+ fHistTrackMultiplicityBeforeAnySel(0),\r
+ fHistTrackMultiplicityAfterSDDSel(0),\r
+ fHistTrackMultiplicityAfterPhysicsSel(0),\r
+ fHistTrackMultiplicityForSelEvtNoTPCOnly(0),\r
+ fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup(0),\r
+ fHistTrackMultiplicityAfterVertexCutSel(0),\r
+ // Vertex position plots (BestVertex)\r
+ fHistPVx(0), fHistPVy(0), fHistPVz(0),\r
+ fHistPVxAnalysis(0), fHistPVyAnalysis(0), fHistPVzAnalysis(0),\r
+ // TPC cluster distributions for daughters\r
+ fHistPosV0TPCClusters(0), fHistNegV0TPCClusters(0), fHistBachTPCClusters(0),\r
+ // Cut's variables distributions\r
+ fHistEffMassXi(0),\r
+ fHistDcaXiDaughters(0),\r
+ fHistDcaBachToPrimVertex(0),\r
+ fHistXiCosineOfPointingAngle(0),\r
+ fHistXiRadius(0),\r
+ fHistMassLambdaAsCascDghter(0),\r
+ fHistDcaV0DaughtersXi(0),\r
+ fHistDcaV0ToPrimVertexXi(0),\r
+ fHistV0CosineOfPointingAngleXi(0),\r
+ fHistV0RadiusXi(0),\r
+ fHistDcaPosToPrimVertexXi(0),\r
+ fHistDcaNegToPrimVertexXi(0),\r
+ // Invariant mass distributions\r
+ fHistMassXiMinus(0), fHistMassXiPlus(0), fHistMassOmegaMinus(0), fHistMassOmegaPlus(0),\r
+ // Transverse and total momentum distributions\r
+ fHistXiTransvMom(0), fHistXiTotMom(0), fHistBachTransvMomXi(0), fHistBachTotMomXi(0),\r
+ // Others QA plots\r
+ fHistChargeXi(0),\r
+ fHistV0toXiCosineOfPointingAngle(0),\r
+ fHistRapXi(0), fHistRapOmega(0),\r
+ fHistEtaXi(0), fHistEtaBachXi(0), fHistEtaPosXi(0), fHistEtaNegXi(0),\r
+ fHistThetaXi(0),\r
+ fHistPhiXi(0),\r
+ f2dHistArmenteros(0),\r
+ f2dHistEffMassLambdaVsEffMassXiMinus(0), f2dHistEffMassXiVsEffMassOmegaMinus(0),\r
+ f2dHistEffMassLambdaVsEffMassXiPlus(0), f2dHistEffMassXiVsEffMassOmegaPlus(0),\r
+ f2dHistXiRadiusVsEffMassXiMinus(0), f2dHistXiRadiusVsEffMassXiPlus(0),\r
+ f2dHistXiRadiusVsEffMassOmegaMinus(0), f2dHistXiRadiusVsEffMassOmegaPlus(0),\r
+ f2dHistTPCdEdxOfCascDghters(0),\r
+ f2dHistDcaXiDaughtersvsInvMass(0),\r
+ f2dHistDcaBachToPrimVertexvsInvMass(0),\r
+ f2dHistXiCosineOfPointingAnglevsInvMass(0),\r
+ f2dHistMassLambdaAsCascDghtervsInvMass(0),\r
+ f2dHistDcaV0DaughtersXivsInvMass(0),\r
+ f2dHistDcaV0ToPrimVertexXivsInvMass(0),\r
+ // Containers for cuts study \r
+ fCFContCascadePIDXiMinus(0),\r
+ fCFContCascadePIDXiPlus(0),\r
+ fCFContCascadePIDOmegaMinus(0),\r
+ fCFContCascadePIDOmegaPlus(0),\r
+ fCFContCascadeCuts(0)\r
+ \r
+ //_____Costructor____\r
+ {\r
+ // Define input and output slots here\r
+ // Input slot #0 works with a TChain\r
+ // DefineInput(0, TChain::Class());\r
+ // Output slot #1 writes into a TList container (cascade)\r
+ // default p-p values\r
+ fV0Sels[0] = 33. ; // max allowed chi2\r
+ fV0Sels[1] = 0.01; // min allowed impact parameter for the 1st daughter \r
+ fV0Sels[2] = 0.01; // min allowed impact parameter for the 2nd daughter \r
+ fV0Sels[3] = 1.5; // max allowed DCA between the daughter tracks \r
+ fV0Sels[4] = 0.9; // min allowed cosine of V0's pointing angle - This is pT dependent \r
+ fV0Sels[5] = 0.2; // min radius of the fiducial volume \r
+ fV0Sels[6] = 200.; // max radius of the fiducial volume \r
+\r
+ fCascSels[0] = 33.; // max allowed chi2 (same as PDC07)\r
+ fCascSels[1] = 0.01; // min allowed V0 impact parameter \r
+ fCascSels[2] = 0.008; // "window" around the Lambda mass \r
+ fCascSels[3] = 0.01; // min allowed bachelor's impact parameter \r
+ fCascSels[4] = 2.0; // max allowed DCA between the V0 and the bachelor \r
+ fCascSels[5] = 0.95; // min allowed cosine of the cascade pointing angle \r
+ fCascSels[6] = 0.2; // min radius of the fiducial volume \r
+ fCascSels[7] = 100.; // max radius of the fiducial volume \r
+\r
+ // Output slot #0 writes into a TList container (Cascade)\r
+ DefineOutput(1, TList::Class());\r
+ DefineOutput(2, AliCFContainer::Class());\r
+ DefineOutput(3, AliCFContainer::Class());\r
+ DefineOutput(4, AliCFContainer::Class());\r
+ DefineOutput(5, AliCFContainer::Class());\r
+ DefineOutput(6, AliCFContainer::Class());\r
+ AliLog::SetClassDebugLevel("AliAnalysisTaskCheckCascadepp276",1);\r
+ } \r
+\r
+\r
+ //_____Destructor_____\r
+ AliAnalysisTaskCheckCascadepp276::~AliAnalysisTaskCheckCascadepp276() {\r
+ // For all TH1, 2, 3 HnSparse and CFContainer are in the fListCascade TList.\r
+ // They will be deleted when fListCascade is deleted by the TSelector dtor\r
+ // Because of TList::SetOwner() ... \r
+ if (fListHistCascade && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) { delete fListHistCascade; fListHistCascade = 0x0; }\r
+ if (fCFContCascadePIDXiMinus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) { delete fCFContCascadePIDXiMinus; fCFContCascadePIDXiMinus = 0x0; }\r
+ if (fCFContCascadePIDXiPlus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) { delete fCFContCascadePIDXiPlus; fCFContCascadePIDXiPlus = 0x0; }\r
+ if (fCFContCascadePIDOmegaMinus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()){ delete fCFContCascadePIDOmegaMinus; fCFContCascadePIDOmegaMinus = 0x0; }\r
+ if (fCFContCascadePIDOmegaPlus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) { delete fCFContCascadePIDOmegaPlus; fCFContCascadePIDOmegaPlus = 0x0; } \r
+ if (fCFContCascadeCuts && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) { delete fCFContCascadeCuts; fCFContCascadeCuts = 0x0; }\r
+ if (fESDtrackCuts) { delete fESDtrackCuts; fESDtrackCuts = 0x0; }\r
+ }\r
+\r
+\r
+//________________________________________________________________________\r
+void AliAnalysisTaskCheckCascadepp276::UserCreateOutputObjects() {\r
+ // Create histograms\r
+ // Called once\r
+\r
+\r
+ fListHistCascade = new TList();\r
+ fListHistCascade->SetOwner(); // See http://root.cern.ch/root/html/TCollection.html#TCollection:SetOwner\r
+\r
+ //-----------------------------------------------\r
+ // Particle Identification Setup (new PID object)\r
+ //-----------------------------------------------\r
+ AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager();\r
+ AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());\r
+ fPIDResponse = inputHandler->GetPIDResponse();\r
+\r
+ // Only used to get the number of primary reconstructed tracks\r
+ if (fAnalysisType == "ESD" && (! fESDtrackCuts )){\r
+ fESDtrackCuts = new AliESDtrackCuts();\r
+ }\r
+\r
+ //---------------------------------------------------\r
+ // Initialize cuts to re-run V0 and cascade vertexers\r
+ //---------------------------------------------------\r
+ // Not validated; to be checked\r
+ fV0Sels[0] = 33. ; // max allowed chi2\r
+ fV0Sels[1] = 0.01; // min allowed impact parameter for the 1st daughter \r
+ fV0Sels[2] = 0.01; // min allowed impact parameter for the 2nd daughter \r
+ fV0Sels[3] = 1.5; // max allowed DCA between the daughter tracks \r
+ fV0Sels[4] = 0.9; // min allowed cosine of V0's pointing angle \r
+ fV0Sels[5] = 0.2; // min radius of the fiducial volume \r
+ fV0Sels[6] = 200.; // max radius of the fiducial volume \r
+\r
+ fCascSels[0] = 33.; // max allowed chi2 (same as PDC07)\r
+ fCascSels[1] = 0.01; // min allowed V0 impact parameter \r
+ fCascSels[2] = 0.008; // "window" around the Lambda mass \r
+ fCascSels[3] = 0.01; // min allowed bachelor's impact parameter \r
+ fCascSels[4] = 2.0; // max allowed DCA between the V0 and the bachelor \r
+ fCascSels[5] = 0.95; // min allowed cosine of the cascade pointing angle \r
+ fCascSels[6] = 0.2; // min radius of the fiducial volume \r
+ fCascSels[7] = 100.; // max radius of the fiducial volume \r
+\r
+ //----------------------\r
+ // Initialize the histos\r
+ //----------------------\r
+ \r
+ // - Cascades multiplicity plots \r
+ if(! fHistCascadeMultiplicityBeforeAnySel) {\r
+ fHistCascadeMultiplicityBeforeAnySel = new TH1F("fHistCascadeMultiplicityBeforeAnySel",\r
+ "Cascades per event (before any selections);Nbr of Cascades/Evt;Events", \r
+ 20, 0, 20);\r
+ fListHistCascade->Add(fHistCascadeMultiplicityBeforeAnySel);\r
+ }\r
+ if(! fHistCascadeMultiplicityAfterSDDSel) {\r
+ fHistCascadeMultiplicityAfterSDDSel = new TH1F("fHistCascadeMultiplicityAfterSDDSel", \r
+ "Cascades per event (after the SDD selection);Nbr of Cascades/Evt;Events", \r
+ 20, 0, 20); \r
+ fListHistCascade->Add(fHistCascadeMultiplicityAfterSDDSel);\r
+ }\r
+ if(! fHistCascadeMultiplicityAfterPhysicsSel) {\r
+ fHistCascadeMultiplicityAfterPhysicsSel = new TH1F("fHistCascadeMultiplicityAfterPhysicsSel",\r
+ "Cascades per event (after physics selection);Nbr of Cascades/Evt;Events",\r
+ 20, 0, 20);\r
+ fListHistCascade->Add(fHistCascadeMultiplicityAfterPhysicsSel);\r
+ }\r
+ if(! fHistCascadeMultiplicityForSelEvtNoTPCOnly) {\r
+ fHistCascadeMultiplicityForSelEvtNoTPCOnly = new TH1F("fHistCascadeMultiplicityForSelEvtNoTPCOnly",\r
+ "Cascades per event (for selected events with well-established PV);Nbr of Cascades/Evt;Events",\r
+ 20, 0, 20);\r
+ fListHistCascade->Add(fHistCascadeMultiplicityForSelEvtNoTPCOnly);\r
+ }\r
+ if(! fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup) {\r
+ fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup = new TH1F("fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup",\r
+ "Cascades per event (for selected events with well-establisched PV and no pile-up);Nbr of Cascades/Evt;Events",\r
+ 20, 0, 20);\r
+ fListHistCascade->Add(fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup);\r
+ }\r
+ if(! fHistCascadeMultiplicityAfterVertexCutSel) {\r
+ fHistCascadeMultiplicityAfterVertexCutSel = new TH1F("fHistCascadeMultiplicityAfterVertexCutSel",\r
+ "Cascades per event (after vertex cut selection);Nbr of Cascades/Evt;Events",\r
+ 20, 0, 20);\r
+ fListHistCascade->Add(fHistCascadeMultiplicityAfterVertexCutSel);\r
+ }\r
+ // - Tracks multiplicity plots \r
+ if(! fHistTrackMultiplicityBeforeAnySel) {\r
+ fHistTrackMultiplicityBeforeAnySel = new TH1F("fHistTrackMultiplicityBeforeAnySel", \r
+ "Tracks per event (before any selections);Nbr of Cascades/Evt;Events", \r
+ 100, 0, 100); \r
+ fListHistCascade->Add(fHistTrackMultiplicityBeforeAnySel);\r
+ } \r
+ if(! fHistTrackMultiplicityAfterSDDSel) {\r
+ fHistTrackMultiplicityAfterSDDSel = new TH1F("fHistTrackMultiplicityAfterSDDSel", \r
+ "Tracks per event (after the SDD selection);Nbr of Cascades/Evt;Events",\r
+ 100, 0, 100);\r
+ fListHistCascade->Add(fHistTrackMultiplicityAfterSDDSel);\r
+ }\r
+ if(! fHistTrackMultiplicityAfterPhysicsSel) {\r
+ fHistTrackMultiplicityAfterPhysicsSel = new TH1F("fHistTrackMultiplicityAfterPhysicsSel",\r
+ "Tracks per event (after physics selection);Nbr of Cascades/Evt;Events",\r
+ 100, 0, 100);\r
+ fListHistCascade->Add(fHistTrackMultiplicityAfterPhysicsSel);\r
+ }\r
+ if(! fHistTrackMultiplicityForSelEvtNoTPCOnly) {\r
+ fHistTrackMultiplicityForSelEvtNoTPCOnly = new TH1F("fHistTrackMultiplicityForSelEvtNoTPCOnly",\r
+ "Tracks per event (for selected events with well-established PV);Nbr of Cascades/Evt;Events",\r
+ 100, 0, 100);\r
+ fListHistCascade->Add(fHistTrackMultiplicityForSelEvtNoTPCOnly);\r
+ }\r
+ if(! fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup) {\r
+ fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = new TH1F("fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup",\r
+ "Tracks per event (for selected events with well-establisched PV and no pile-up);Nbr of Cascades/Evt;Events",\r
+ 100, 0, 100);\r
+ fListHistCascade->Add(fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup);\r
+ }\r
+ if(! fHistTrackMultiplicityAfterVertexCutSel) {\r
+ fHistTrackMultiplicityAfterVertexCutSel = new TH1F("fHistTrackMultiplicityAfterVertexCutSel",\r
+ "Tracks per event (after vertex cut selection);Nbr of Cascades/Evt;Events",\r
+ 100, 0, 100);\r
+ fListHistCascade->Add(fHistTrackMultiplicityAfterVertexCutSel);\r
+ }\r
+ // - Vertex position plots\r
+ if(! fHistPVx ){\r
+ fHistPVx = new TH1F("fHistPVx", "Best PV position in x; x (cm); Events", 2000, -0.5, 0.5);\r
+ fListHistCascade->Add(fHistPVx);\r
+ }\r
+ if(! fHistPVy ){\r
+ fHistPVy = new TH1F("fHistPVy", "Best PV position in y; y (cm); Events", 2000, -0.5, 0.5);\r
+ fListHistCascade->Add(fHistPVy);\r
+ }\r
+ if(! fHistPVz ){\r
+ fHistPVz = new TH1F("fHistPVz", "Best PV position in z; z (cm); Events", 400, -20, 20);\r
+ fListHistCascade->Add(fHistPVz);\r
+ } \r
+ if(! fHistPVxAnalysis ){\r
+ fHistPVxAnalysis = new TH1F("fHistPVxAnalysis", "Best PV position in x (after events selections); x (cm); Events", 2000, -0.5, 0.5);\r
+ fListHistCascade->Add(fHistPVxAnalysis);\r
+ }\r
+ if(! fHistPVyAnalysis ){\r
+ fHistPVyAnalysis = new TH1F("fHistPVyAnalysis", "Best PV position in y (after events selections); y (cm); Events", 2000, -0.5, 0.5);\r
+ fListHistCascade->Add(fHistPVyAnalysis);\r
+ }\r
+ if(! fHistPVzAnalysis ){\r
+ fHistPVzAnalysis = new TH1F("fHistPVzAnalysis", "Best PV position in z (after events selections); z (cm); Events", 400, -20, 20);\r
+ fListHistCascade->Add(fHistPVzAnalysis);\r
+ }\r
+ // - TPC clusetr sdistributions for daughters (histos for events containing at least ONE CASCADE)\r
+ if(! fHistPosV0TPCClusters ){\r
+ 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);\r
+ fListHistCascade->Add(fHistPosV0TPCClusters);\r
+ }\r
+ if(! fHistNegV0TPCClusters ){\r
+ 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);\r
+ fListHistCascade->Add(fHistNegV0TPCClusters);\r
+ }\r
+ if(! fHistBachTPCClusters ){\r
+ fHistBachTPCClusters = new TH1F("fHistBachTPCClusters", "TPC clusters for Bachelor track; Nbr of TPC clusters (Bach); Track counts", 165, 0.0, 165.0);\r
+ fListHistCascade->Add(fHistBachTPCClusters);\r
+ }\r
+ // - Cut's variables distributions (typical histos for cascades): as example only for the Xi (both particle and anti-particle)\r
+ if(! fHistEffMassXi) {\r
+ fHistEffMassXi = new TH1F("fHistEffMassXi", "Xi candidates; Invariant Mass (GeV/c^{2}); Counts", 400, 1.2, 2.0);\r
+ fListHistCascade->Add(fHistEffMassXi);\r
+ } \r
+ if(! fHistDcaXiDaughters ){\r
+ fHistDcaXiDaughters = new TH1F("fHistDcaXiDaughters", "DCA between Xi daughters; DCA (cm); Counts", 210, 0., 2.1);\r
+ fListHistCascade->Add(fHistDcaXiDaughters);\r
+ }\r
+ if(! fHistDcaBachToPrimVertex) {\r
+ fHistDcaBachToPrimVertex = new TH1F("fHistDcaBachToPrimVertex", "Impact parameter of Bach. to Prim. Vertex; DCA (cm); Counts", 250, 0., 0.25);\r
+ fListHistCascade->Add(fHistDcaBachToPrimVertex);\r
+ }\r
+ if(! fHistXiCosineOfPointingAngle) {\r
+ fHistXiCosineOfPointingAngle = new TH1F("fHistXiCosineOfPointingAngle", "Cosine of Xi Pointing Angle; Cos (Xi Point.Angl); Counts", 601, 0.94, 1.0001);\r
+ fListHistCascade->Add(fHistXiCosineOfPointingAngle);\r
+ }\r
+ if(! fHistXiRadius ){\r
+ fHistXiRadius = new TH1F("fHistXiRadius", "Cascade decay transv. radius; r (cm); Counts" , 2050, 0., 205.0);\r
+ fListHistCascade->Add(fHistXiRadius);\r
+ }\r
+ if(! fHistMassLambdaAsCascDghter) {\r
+ fHistMassLambdaAsCascDghter = new TH1F("fHistMassLambdaAsCascDghter", "#Lambda associated to cascade candidates; Eff. Mass (GeV/c^{2}); Counts", 300, 1.0, 1.3);\r
+ fListHistCascade->Add(fHistMassLambdaAsCascDghter);\r
+ }\r
+ if(! fHistDcaV0DaughtersXi) {\r
+ fHistDcaV0DaughtersXi = new TH1F("fHistDcaV0DaughtersXi", "DCA between V0 daughters, in cascade; DCA (cm); Counts", 320, 0., 1.6);\r
+ fListHistCascade->Add(fHistDcaV0DaughtersXi);\r
+ }\r
+ if(! fHistDcaV0ToPrimVertexXi) {\r
+ fHistDcaV0ToPrimVertexXi = new TH1F("fHistDcaV0ToPrimVertexXi", "Impact parameter of V0 to Prim. Vertex, in cascade; DCA (cm); Counts", 200, 0., 1.);\r
+ fListHistCascade->Add(fHistDcaV0ToPrimVertexXi);\r
+ }\r
+ if(! fHistV0CosineOfPointingAngleXi) {\r
+ fHistV0CosineOfPointingAngleXi = new TH1F("fHistV0CosineOfPointingAngleXi", "Cosine of V0 Pointing Angle, in cascade; Cos(V0 Point. Angl); Counts", 201, 0.8, 1.001);\r
+ fListHistCascade->Add(fHistV0CosineOfPointingAngleXi);\r
+ }\r
+ if(! fHistV0RadiusXi) {\r
+ fHistV0RadiusXi = new TH1F("fHistV0RadiusXi", "V0 decay radius, in cascade; radius (cm); Counts", 2050, 0., 205.0);\r
+ fListHistCascade->Add(fHistV0RadiusXi);\r
+ }\r
+ if(! fHistDcaPosToPrimVertexXi) {\r
+ fHistDcaPosToPrimVertexXi = new TH1F("fHistDcaPosToPrimVertexXi", "Impact parameter of V0 pos daughter to Prim. Vertex; DCA (cm); Counts", 300, 0, 3);\r
+ fListHistCascade->Add(fHistDcaPosToPrimVertexXi);\r
+ }\r
+ if(! fHistDcaNegToPrimVertexXi) {\r
+ fHistDcaNegToPrimVertexXi = new TH1F("fHistDcaNegToPrimVertexXi", "Impact parameter of V0 neg daughter to Prim. Vertex; DCA (cm); Counts", 300, 0, 3);\r
+ fListHistCascade->Add(fHistDcaNegToPrimVertexXi);\r
+ }\r
+ // - Effective mass histos for cascades.\r
+ //By cascade hyp \r
+ if(! fHistMassXiMinus) {\r
+ fHistMassXiMinus = new TH1F("fHistMassXiMinus", "#Xi^{-} candidates; M( #Lambda , #pi^{-} ) (GeV/c^{2});Counts", 400, 1.2, 2.0);\r
+ fListHistCascade->Add(fHistMassXiMinus);\r
+ } \r
+ if(! fHistMassXiPlus) {\r
+ fHistMassXiPlus = new TH1F("fHistMassXiPlus", "#Xi^{+} candidates; M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2});Counts", 400, 1.2, 2.0);\r
+ fListHistCascade->Add(fHistMassXiPlus);\r
+ }\r
+ if(! fHistMassOmegaMinus) {\r
+ fHistMassOmegaMinus = new TH1F("fHistMassOmegaMinus", "#Omega^{-} candidates; M( #Lambda , K^{-} ) (GeV/c^{2});Counts", 500, 1.5, 2.5);\r
+ fListHistCascade->Add(fHistMassOmegaMinus);\r
+ }\r
+ if(! fHistMassOmegaPlus) {\r
+ fHistMassOmegaPlus = new TH1F("fHistMassOmegaPlus", "#Omega^{+} candidates;M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5);\r
+ fListHistCascade->Add(fHistMassOmegaPlus);\r
+ }\r
+ // - Transverse and total momentum distributions\r
+ if(! fHistXiTransvMom ){\r
+ fHistXiTransvMom = new TH1F("fHistXiTransvMom", "#Xi transverse momentum (cand. around the mass peak); p_{t}(#Xi) (GeV/c); Counts", 100, 0.0, 10.0);\r
+ fListHistCascade->Add(fHistXiTransvMom);\r
+ }\r
+ if(! fHistXiTotMom ){\r
+ fHistXiTotMom = new TH1F("fHistXiTotMom", "#Xi momentum norm (cand. around the mass peak); p_{tot}(#Xi) (GeV/c); Counts", 150, 0.0, 15.0);\r
+ fListHistCascade->Add(fHistXiTotMom);\r
+ }\r
+ if(! fHistBachTransvMomXi ){\r
+ fHistBachTransvMomXi = new TH1F("fHistBachTransvMomXi", "#Xi Bach. transverse momentum (cand. around the mass peak); p_{t}(Bach.) (GeV/c); Counts", 100, 0.0, 5.0);\r
+ fListHistCascade->Add(fHistBachTransvMomXi);\r
+ }\r
+ if(! fHistBachTotMomXi ){\r
+ fHistBachTotMomXi = new TH1F("fHistBachTotMomXi", "#Xi Bach. momentum norm (cand. around the mass peak); p_{tot}(Bach.) (GeV/c); Counts", 100, 0.0, 5.0);\r
+ fListHistCascade->Add(fHistBachTotMomXi);\r
+ }\r
+ // - Others QA plots\r
+ //TH1\r
+ if(! fHistChargeXi ){\r
+ fHistChargeXi = new TH1F("fHistChargeXi", "Charge of Xi candidates; Sign; Counts", 5, -2.0, 3.0);\r
+ fListHistCascade->Add(fHistChargeXi);\r
+ }\r
+ if(! fHistV0toXiCosineOfPointingAngle) {\r
+ fHistV0toXiCosineOfPointingAngle = new TH1F("fHistV0toXiCosineOfPointingAngle", "Cos. of V0 Ptng Angl / Xi vtx ; Cos(V0 Point. Angl / Xi vtx); Counts", 1101, 0.89, 1.0001);\r
+ fListHistCascade->Add(fHistV0toXiCosineOfPointingAngle);\r
+ }\r
+ if(! fHistRapXi ){\r
+ fHistRapXi = new TH1F("fHistRapXi", "Rapidity of #Xi candidates (around the mass peak); y; Counts", 20, -1.0, 1.0);\r
+ fListHistCascade->Add(fHistRapXi);\r
+ }\r
+ if(! fHistRapOmega ){\r
+ fHistRapOmega = new TH1F("fHistRapOmega", "Rapidity of #Omega candidates (around the mass peak); y; Counts", 20, -1.0, 1.0);\r
+ fListHistCascade->Add(fHistRapOmega);\r
+ }\r
+ if(! fHistEtaXi ){\r
+ fHistEtaXi = new TH1F("fHistEtaXi", "Pseudo-rap. of #Xi candidates (around the mass peak); #eta; Counts", 20, -1.0, 1.0);\r
+ fListHistCascade->Add(fHistEtaXi);\r
+ }\r
+ if(! fHistEtaBachXi){\r
+ fHistEtaBachXi = new TH1F("fHistEtaBachXi", "Pseudo-rap. of #Xi bachelor; #eta; Counts", 40, -2.0, 2.0);\r
+ fListHistCascade->Add(fHistEtaBachXi);\r
+ }\r
+ if(! fHistEtaPosXi){\r
+ fHistEtaPosXi = new TH1F("fHistEtaPosXi", "Pseudo-rap. of #Xi positive meson daughter; #eta; Counts", 40, -2.0, 2.0);\r
+ fListHistCascade->Add(fHistEtaPosXi);\r
+ }\r
+ if(! fHistEtaNegXi){\r
+ fHistEtaNegXi = new TH1F("fHistEtaNegXi", "Pseudo-rap. of #Xi negative meson daughter; #eta; Counts", 40, -2.0, 2.0);\r
+ fListHistCascade->Add(fHistEtaNegXi);\r
+ }\r
+ if(! fHistThetaXi ){\r
+ fHistThetaXi = new TH1F("fHistThetaXi", "#theta of #Xi candidates (around the mass peak); #theta (deg); Counts", 180, 0., 180.0);\r
+ fListHistCascade->Add(fHistThetaXi);\r
+ }\r
+ if(! fHistPhiXi ){\r
+ fHistPhiXi = new TH1F("fHistPhiXi", "#phi of #Xi candidates (around the mass peak); #phi (deg); Counts", 360, 0., 360.);\r
+ fListHistCascade->Add(fHistPhiXi);\r
+ }\r
+ if(! f2dHistArmenteros) {\r
+ 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);\r
+ fListHistCascade->Add(f2dHistArmenteros);\r
+ }\r
+ //TH2\r
+ if(! f2dHistEffMassLambdaVsEffMassXiMinus) {\r
+ 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);\r
+ fListHistCascade->Add(f2dHistEffMassLambdaVsEffMassXiMinus);\r
+ }\r
+ if(! f2dHistEffMassXiVsEffMassOmegaMinus) {\r
+ 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);\r
+ fListHistCascade->Add(f2dHistEffMassXiVsEffMassOmegaMinus);\r
+ }\r
+ if(! f2dHistEffMassLambdaVsEffMassXiPlus) {\r
+ 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);\r
+ fListHistCascade->Add(f2dHistEffMassLambdaVsEffMassXiPlus);\r
+ }\r
+ if(! f2dHistEffMassXiVsEffMassOmegaPlus) {\r
+ 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);\r
+ fListHistCascade->Add(f2dHistEffMassXiVsEffMassOmegaPlus);\r
+ }\r
+ if(! f2dHistXiRadiusVsEffMassXiMinus) {\r
+ 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);\r
+ fListHistCascade->Add(f2dHistXiRadiusVsEffMassXiMinus);\r
+ }\r
+ if(! f2dHistXiRadiusVsEffMassXiPlus) {\r
+ 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);\r
+ fListHistCascade->Add(f2dHistXiRadiusVsEffMassXiPlus);\r
+ }\r
+ if(! f2dHistXiRadiusVsEffMassOmegaMinus) {\r
+ 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);\r
+ fListHistCascade->Add(f2dHistXiRadiusVsEffMassOmegaMinus);\r
+ }\r
+ if(! f2dHistXiRadiusVsEffMassOmegaPlus) {\r
+ 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);\r
+ fListHistCascade->Add(f2dHistXiRadiusVsEffMassOmegaPlus);\r
+ }\r
+ if(! f2dHistTPCdEdxOfCascDghters){\r
+ 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.);\r
+ fListHistCascade->Add(f2dHistTPCdEdxOfCascDghters);\r
+ }\r
+ if(! f2dHistDcaXiDaughtersvsInvMass){\r
+ f2dHistDcaXiDaughtersvsInvMass = new TH2F("f2dHistDcaXiDaughtersvsInvMass", "DCA between Xi Daughters; DCA (cm); Number of Cascades", 100, 0., 0.5, 400, 1.2, 2.0);\r
+ fListHistCascade->Add(f2dHistDcaXiDaughtersvsInvMass);\r
+ }\r
+ if(! f2dHistDcaBachToPrimVertexvsInvMass) {\r
+ f2dHistDcaBachToPrimVertexvsInvMass = new TH2F("f2dHistDcaBachToPrimVertexvsInvMass", "DCA of Bach. to Prim. Vertex; DCA (cm); Number of Cascades", 250, 0., 0.25, 400, 1.2, 2.0);\r
+ fListHistCascade->Add(f2dHistDcaBachToPrimVertexvsInvMass);\r
+ }\r
+ if(! f2dHistXiCosineOfPointingAnglevsInvMass){\r
+ 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);\r
+ fListHistCascade->Add(f2dHistXiCosineOfPointingAnglevsInvMass);\r
+ }\r
+ if(! f2dHistMassLambdaAsCascDghtervsInvMass){ \r
+ 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);\r
+ fListHistCascade->Add(f2dHistMassLambdaAsCascDghtervsInvMass);\r
+ }\r
+ if(! f2dHistDcaV0DaughtersXivsInvMass){\r
+ f2dHistDcaV0DaughtersXivsInvMass = new TH2F("f2dHistDcaV0DaughtersXivsInvMass", "DCA between V0 daughters, in cascade; DCA (cm); Number of V0s", 120, 0., 0.6, 400, 1.2, 2.0);\r
+ fListHistCascade->Add(f2dHistDcaV0DaughtersXivsInvMass);\r
+ }\r
+ if(! f2dHistDcaV0ToPrimVertexXivsInvMass){\r
+ 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);\r
+ fListHistCascade->Add(f2dHistDcaV0ToPrimVertexXivsInvMass);\r
+ }\r
+ // - CFContainer PID study Xi minus\r
+ if(!fCFContCascadePIDXiMinus) {\r
+ const Int_t lNbSteps = 7 ;\r
+ const Int_t lNbVariables = 3 ;\r
+ //Array for the number of bins in each dimension :\r
+ Int_t lNbBinsPerVar[3] = {0};\r
+ lNbBinsPerVar[0] = 100;\r
+ lNbBinsPerVar[1] = 800;\r
+ lNbBinsPerVar[2] = 22;\r
+ if (fkSDDSelectionOn) {\r
+ if (fwithSDD) fCFContCascadePIDXiMinus = new AliCFContainer(Form("fCFContCascadePIDXiMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDon",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{-} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );\r
+ else if (!fwithSDD) fCFContCascadePIDXiMinus = new AliCFContainer(Form("fCFContCascadePIDXiMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDoff",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{-} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar ); \r
+ } else if (!fkSDDSelectionOn) fCFContCascadePIDXiMinus = new AliCFContainer(Form("fCFContCascadePIDXiMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_woSDD",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{-} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );\r
+ //Setting the bin limits \r
+ fCFContCascadePIDXiMinus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)\r
+ fCFContCascadePIDXiMinus->SetBinLimits(1, 1.2 , 2.0 ); // Xi Effective mass\r
+ fCFContCascadePIDXiMinus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity\r
+ //Setting the step title : one per PID case\r
+ fCFContCascadePIDXiMinus->SetStepTitle(0, "No PID");\r
+ fCFContCascadePIDXiMinus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");\r
+ fCFContCascadePIDXiMinus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");\r
+ fCFContCascadePIDXiMinus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");\r
+ fCFContCascadePIDXiMinus->SetStepTitle(4, "Comb. PID / Bachelor");\r
+ fCFContCascadePIDXiMinus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");\r
+ fCFContCascadePIDXiMinus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson"); \r
+ //Setting the variable title, per axis\r
+ fCFContCascadePIDXiMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");\r
+ fCFContCascadePIDXiMinus->SetVarTitle(1, "M( #Lambda , #pi^{-} ) (GeV/c^{2})");\r
+ fCFContCascadePIDXiMinus->SetVarTitle(2, "Y_{#Xi}");\r
+ fListHistCascade->Add(fCFContCascadePIDXiMinus);\r
+ }\r
+ // - CFContainer PID study Xi plus\r
+ if (!fCFContCascadePIDXiPlus) {\r
+ const Int_t lNbSteps = 7 ;\r
+ const Int_t lNbVariables = 3 ;\r
+ //Array for the number of bins in each dimension :\r
+ Int_t lNbBinsPerVar[3] = {0};\r
+ lNbBinsPerVar[0] = 100;\r
+ lNbBinsPerVar[1] = 800;\r
+ lNbBinsPerVar[2] = 22;\r
+ if (fkSDDSelectionOn) {\r
+ if (fwithSDD) fCFContCascadePIDXiPlus = new AliCFContainer(Form("fCFContCascadePIDXiPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDon",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{+} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );\r
+ else if (!fwithSDD) fCFContCascadePIDXiPlus = new AliCFContainer(Form("fCFContCascadePIDXiPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDoff",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{+} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );\r
+ } else if (!fkSDDSelectionOn) fCFContCascadePIDXiPlus = new AliCFContainer(Form("fCFContCascadePIDXiPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_woSDD",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{+} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );\r
+ //Setting the bin limits \r
+ fCFContCascadePIDXiPlus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)\r
+ fCFContCascadePIDXiPlus->SetBinLimits(1, 1.2 , 2.0 ); // Xi Effective mass\r
+ fCFContCascadePIDXiPlus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity\r
+ //Setting the step title : one per PID case\r
+ fCFContCascadePIDXiPlus->SetStepTitle(0, "No PID");\r
+ fCFContCascadePIDXiPlus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");\r
+ fCFContCascadePIDXiPlus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");\r
+ fCFContCascadePIDXiPlus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");\r
+ fCFContCascadePIDXiPlus->SetStepTitle(4, "Comb. PID / Bachelor");\r
+ fCFContCascadePIDXiPlus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");\r
+ fCFContCascadePIDXiPlus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");\r
+ //Setting the variable title, per axis\r
+ fCFContCascadePIDXiPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");\r
+ fCFContCascadePIDXiPlus->SetVarTitle(1, "M( #Lambda , #pi^{+} ) (GeV/c^{2})");\r
+ fCFContCascadePIDXiPlus->SetVarTitle(2, "Y_{#Xi}");\r
+ fListHistCascade->Add(fCFContCascadePIDXiPlus);\r
+ }\r
+ // - CFContainer PID study Omega minus\r
+ if(!fCFContCascadePIDOmegaMinus) {\r
+ const Int_t lNbSteps = 7 ;\r
+ const Int_t lNbVariables = 3 ;\r
+ //Array for the number of bins in each dimension :\r
+ Int_t lNbBinsPerVar[3] = {0};\r
+ lNbBinsPerVar[0] = 100;\r
+ lNbBinsPerVar[1] = 1000;\r
+ lNbBinsPerVar[2] = 22;\r
+ if (fkSDDSelectionOn) {\r
+ if (fwithSDD) fCFContCascadePIDOmegaMinus = new AliCFContainer(Form("fCFContCascadePIDOmegaMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDon",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{-} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );\r
+ else if (!fwithSDD) fCFContCascadePIDOmegaMinus = new AliCFContainer(Form("fCFContCascadePIDOmegaMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDoff",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{-} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );\r
+ } else if (!fkSDDSelectionOn) fCFContCascadePIDOmegaMinus = new AliCFContainer(Form("fCFContCascadePIDOmegaMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_woSDD",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{-} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );\r
+ //Setting the bin limits \r
+ fCFContCascadePIDOmegaMinus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)\r
+ fCFContCascadePIDOmegaMinus->SetBinLimits(1, 1.5 , 2.5 ); // Omega Effective mass\r
+ fCFContCascadePIDOmegaMinus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity\r
+ //Setting the step title : one per PID case\r
+ fCFContCascadePIDOmegaMinus->SetStepTitle(0, "No PID");\r
+ fCFContCascadePIDOmegaMinus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");\r
+ fCFContCascadePIDOmegaMinus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");\r
+ fCFContCascadePIDOmegaMinus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");\r
+ fCFContCascadePIDOmegaMinus->SetStepTitle(4, "Comb. PID / Bachelor");\r
+ fCFContCascadePIDOmegaMinus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");\r
+ fCFContCascadePIDOmegaMinus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");\r
+ //Setting the variable title, per axis\r
+ fCFContCascadePIDOmegaMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");\r
+ fCFContCascadePIDOmegaMinus->SetVarTitle(1, "M( #Lambda , K^{-} ) (GeV/c^{2})");\r
+ fCFContCascadePIDOmegaMinus->SetVarTitle(2, "Y_{#Omega}");\r
+ fListHistCascade->Add(fCFContCascadePIDOmegaMinus);\r
+ }\r
+ // - CFContainer PID study Omega plus\r
+ if(!fCFContCascadePIDOmegaPlus) {\r
+ const Int_t lNbSteps = 7 ;\r
+ const Int_t lNbVariables = 3 ;\r
+ //Array for the number of bins in each dimension :\r
+ Int_t lNbBinsPerVar[3] = {0};\r
+ lNbBinsPerVar[0] = 100;\r
+ lNbBinsPerVar[1] = 1000;\r
+ lNbBinsPerVar[2] = 22; \r
+ if (fkSDDSelectionOn) {\r
+ if (fwithSDD) fCFContCascadePIDOmegaPlus = new AliCFContainer(Form("fCFContCascadePIDOmegaPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDon",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{+} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );\r
+ else if (!fwithSDD) fCFContCascadePIDOmegaPlus = new AliCFContainer(Form("fCFContCascadePIDOmegaPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDoff",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{+} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );\r
+ } else if (!fkSDDSelectionOn) fCFContCascadePIDOmegaPlus = new AliCFContainer(Form("fCFContCascadePIDOmegaPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_woSDD",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{+} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );\r
+ //Setting the bin limits \r
+ fCFContCascadePIDOmegaPlus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)\r
+ fCFContCascadePIDOmegaPlus->SetBinLimits(1, 1.5 , 2.5 ); // Omega Effective mass\r
+ fCFContCascadePIDOmegaPlus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity \r
+ //Setting the step title : one per PID case\r
+ fCFContCascadePIDOmegaPlus->SetStepTitle(0, "No PID");\r
+ fCFContCascadePIDOmegaPlus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");\r
+ fCFContCascadePIDOmegaPlus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");\r
+ fCFContCascadePIDOmegaPlus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");\r
+ fCFContCascadePIDOmegaPlus->SetStepTitle(4, "Comb. PID / Bachelor");\r
+ fCFContCascadePIDOmegaPlus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");\r
+ fCFContCascadePIDOmegaPlus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");\r
+ //Setting the variable title, per axis\r
+ fCFContCascadePIDOmegaPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");\r
+ fCFContCascadePIDOmegaPlus->SetVarTitle(1, "M( #Lambda , K^{+} ) (GeV/c^{2})");\r
+ fCFContCascadePIDOmegaPlus->SetVarTitle(2, "Y_{#Omega}"); \r
+ fListHistCascade->Add(fCFContCascadePIDOmegaPlus);\r
+ }\r
+ // - CFContainer: towards the optimisation of topological selections\r
+ if(! fCFContCascadeCuts) {\r
+ // Container meant to store all the relevant distributions corresponding to the cut variables.\r
+ // NB: overflow/underflow of variables on which we want to cut later should be 0!!! \r
+ const Int_t lNbSteps = 4 ;\r
+ const Int_t lNbVariables = 19 ;\r
+ //Array for the number of bins in each dimension :\r
+ Int_t lNbBinsPerVar[lNbVariables] = {0};\r
+ lNbBinsPerVar[0] = 25; //DcaCascDaughters : [0.0,2.4,3.0] -> Rec.Cut = 2.0;\r
+ lNbBinsPerVar[1] = 25; //DcaBachToPrimVertex : [0.0,0.24,100.0] -> Rec.Cut = 0.01; \r
+ lNbBinsPerVar[2] = 60; //CascCosineOfPointingAngle : [0.94,1.0] -> Rec.Cut = 0.95;\r
+ lNbBinsPerVar[3] = 40; //CascRadius : [0.0,3.9,1000.0] -> Rec.Cut = 0.2;\r
+ lNbBinsPerVar[4] = 30; //InvMassLambdaAsCascDghter : [1.1,1.3] -> Rec.Cut = 0.008;\r
+ lNbBinsPerVar[5] = 20; //DcaV0Daughters : [0.0,2.0] -> Rec.Cut = 1.5;\r
+ lNbBinsPerVar[6] = 201; //V0CosineOfPointingAngleToXi : [0.89,1.0] -> No Rec.Cut;\r
+ lNbBinsPerVar[7] = 40; //V0Radius : [0.0,3.9,1000.0] -> Rec.Cut = 0.2;\r
+ lNbBinsPerVar[8] = 40; //DcaV0ToPrimVertex : [0.0,0.39,110.0] -> Rec.Cut = 0.01; \r
+ lNbBinsPerVar[9] = 25; //DcaPosToPrimVertex : [0.0,0.24,100.0] -> Rec.Cut = 0.01;\r
+ lNbBinsPerVar[10] = 25; //DcaNegToPrimVertex : [0.0,0.24,100.0] -> Rec.Cut = 0.01;\r
+ lNbBinsPerVar[11] = 150; //InvMassXi : 2-MeV/c2 bins\r
+ lNbBinsPerVar[12] = 120; //InvMassOmega : 2-MeV/c2 bins\r
+ lNbBinsPerVar[13] = 100; //XiTransvMom : [0.0,10.0]\r
+ lNbBinsPerVar[14] = 110; //Y(Xi) : 0.02 in rapidity units\r
+ lNbBinsPerVar[15] = 110; //Y(Omega) : 0.02 in rapidity units\r
+ lNbBinsPerVar[16] = 112; //Proper lenght of cascade \r
+ lNbBinsPerVar[17] = 112; //Proper lenght of V0\r
+ lNbBinsPerVar[18] = 112; //Distance V0-Xi in transverse plane\r
+ if (fkSDDSelectionOn) {\r
+ if (fwithSDD) fCFContCascadeCuts = new AliCFContainer(Form("fCFContCascadeCuts_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDon",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Container for Cascade cuts", lNbSteps, lNbVariables, lNbBinsPerVar);\r
+ else if (!fwithSDD) fCFContCascadeCuts = new AliCFContainer(Form("fCFContCascadeCuts_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_wSDDoff",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Container for Cascade cuts", lNbSteps, lNbVariables, lNbBinsPerVar);\r
+ } else if (!fkSDDSelectionOn) fCFContCascadeCuts = new AliCFContainer(Form("fCFContCascadeCuts_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f_woSDD",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Container for Cascade cuts", lNbSteps, lNbVariables, lNbBinsPerVar);\r
+ //Setting the bin limits \r
+ //0 - DcaXiDaughters\r
+ Double_t *lBinLim0 = new Double_t[ lNbBinsPerVar[0] + 1 ];\r
+ 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;\r
+ lBinLim0[ lNbBinsPerVar[0] ] = 3.0;\r
+ fCFContCascadeCuts -> SetBinLimits(0, lBinLim0); \r
+ delete [] lBinLim0;\r
+ //1 - DcaToPrimVertexXi\r
+ Double_t *lBinLim1 = new Double_t[ lNbBinsPerVar[1] + 1 ];\r
+ 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;\r
+ lBinLim1[ lNbBinsPerVar[1] ] = 100.0;\r
+ fCFContCascadeCuts -> SetBinLimits(1, lBinLim1); \r
+ delete [] lBinLim1; \r
+ //2 - CascCosineOfPointingAngle \r
+ fCFContCascadeCuts->SetBinLimits(2, 0.94, 1.);\r
+ //3 - CascRadius\r
+ Double_t *lBinLim3 = new Double_t[ lNbBinsPerVar[3]+1 ];\r
+ 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 ;\r
+ lBinLim3[ lNbBinsPerVar[3] ] = 1000.0;\r
+ fCFContCascadeCuts -> SetBinLimits(3, lBinLim3 ); \r
+ delete [] lBinLim3;\r
+ //4 - InvMassLambdaAsCascDghter\r
+ fCFContCascadeCuts->SetBinLimits(4, 1.1, 1.13);\r
+ //5 - DcaV0Daughters\r
+ fCFContCascadeCuts -> SetBinLimits(5, 0., 2.);\r
+ //6 - V0CosineOfPointingAngle\r
+ fCFContCascadeCuts -> SetBinLimits(6, 0.8, 1.001);\r
+ //7 - V0Radius\r
+ Double_t *lBinLim7 = new Double_t[ lNbBinsPerVar[7] + 1];\r
+ 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;\r
+ lBinLim7[ lNbBinsPerVar[7] ] = 1000.0;\r
+ fCFContCascadeCuts -> SetBinLimits(7, lBinLim7); \r
+ delete [] lBinLim7;\r
+ //8 - DcaV0ToPrimVertex\r
+ Double_t *lBinLim8 = new Double_t[ lNbBinsPerVar[8]+1 ];\r
+ 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 ;\r
+ lBinLim8[ lNbBinsPerVar[8] ] = 100.0;\r
+ fCFContCascadeCuts -> SetBinLimits(8, lBinLim8 ); \r
+ delete [] lBinLim8;\r
+ //9 - DcaPosToPrimVertex\r
+ Double_t *lBinLim9 = new Double_t[ lNbBinsPerVar[9]+1 ];\r
+ 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 ;\r
+ lBinLim9[ lNbBinsPerVar[9] ] = 100.0;\r
+ fCFContCascadeCuts -> SetBinLimits(9, lBinLim9 ); \r
+ delete [] lBinLim9;\r
+ //10 - DcaNegToPrimVertex\r
+ Double_t *lBinLim10 = new Double_t[ lNbBinsPerVar[10]+1 ];\r
+ 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 ;\r
+ lBinLim10[ lNbBinsPerVar[10] ] = 100.0;\r
+ fCFContCascadeCuts -> SetBinLimits(10, lBinLim10 ); // DcaPosToPrimVertexXi : 0.0 to 0.25 \r
+ delete [] lBinLim10;\r
+ //11 - InvMassXi\r
+ fCFContCascadeCuts->SetBinLimits(11, 1.25, 1.40);\r
+ //12 - InvMassOmega\r
+ fCFContCascadeCuts->SetBinLimits(12, 1.62, 1.74);\r
+ //13 - XiTransvMom\r
+ fCFContCascadeCuts->SetBinLimits(13, 0.0, 10.0); \r
+ //14 - Y(Xi)\r
+ fCFContCascadeCuts->SetBinLimits(14, -1.1, 1.1);\r
+ //15 - Y(Omega)\r
+ fCFContCascadeCuts->SetBinLimits(15, -1.1, 1.1);\r
+ //16 - Proper time of cascade\r
+ Double_t *lBinLim16 = new Double_t[ lNbBinsPerVar[16]+1 ];\r
+ for(Int_t i=0; i< lNbBinsPerVar[16];i++) lBinLim16[i] = (Double_t) -1. + (110. + 1.0 ) / (lNbBinsPerVar[16] - 1) * (Double_t) i;\r
+ lBinLim16[ lNbBinsPerVar[16] ] = 2000.0;\r
+ fCFContCascadeCuts->SetBinLimits(16, lBinLim16);\r
+ //17 - Proper time of V0\r
+ fCFContCascadeCuts->SetBinLimits(17, lBinLim16);\r
+ //18 - Distance V0-Xi in transverse plane\r
+ fCFContCascadeCuts->SetBinLimits(18, lBinLim16);\r
+ // Setting the number of steps : one for each cascade species (Xi-, Xi+ and Omega-, Omega+)\r
+ fCFContCascadeCuts->SetStepTitle(0, "#Xi^{-} candidates");\r
+ fCFContCascadeCuts->SetStepTitle(1, "#bar{#Xi}^{+} candidates");\r
+ fCFContCascadeCuts->SetStepTitle(2, "#Omega^{-} candidates");\r
+ fCFContCascadeCuts->SetStepTitle(3, "#bar{#Omega}^{+} candidates");\r
+ // Setting the variable title, per axis\r
+ fCFContCascadeCuts->SetVarTitle(0, "Dca(cascade daughters) (cm)");\r
+ fCFContCascadeCuts->SetVarTitle(1, "ImpactParamToPV(bachelor) (cm)");\r
+ fCFContCascadeCuts->SetVarTitle(2, "cos(cascade PA)");\r
+ fCFContCascadeCuts->SetVarTitle(3, "R_{2d}(cascade decay) (cm)");\r
+ fCFContCascadeCuts->SetVarTitle(4, "M_{#Lambda}(as casc dghter) (GeV/c^{2})");\r
+ fCFContCascadeCuts->SetVarTitle(5, "Dca(V0 daughters) in Xi (cm)");\r
+ fCFContCascadeCuts->SetVarTitle(6, "cos(V0 PA) to cascade vtx");\r
+ fCFContCascadeCuts->SetVarTitle(7, "R_{2d}(V0 decay) (cm)");\r
+ fCFContCascadeCuts->SetVarTitle(8, "ImpactParamToPV(V0) (cm)");\r
+ fCFContCascadeCuts->SetVarTitle(9, "ImpactParamToPV(Pos) (cm)");\r
+ fCFContCascadeCuts->SetVarTitle(10, "ImpactParamToPV(Neg) (cm)");\r
+ fCFContCascadeCuts->SetVarTitle(11, "Inv. Mass(Xi) (GeV/c^{2})");\r
+ fCFContCascadeCuts->SetVarTitle(12, "Inv. Mass(Omega) (GeV/c^{2})");\r
+ fCFContCascadeCuts->SetVarTitle(13, "pt(cascade) (GeV/c)");\r
+ fCFContCascadeCuts->SetVarTitle(14, "Y(Xi)");\r
+ fCFContCascadeCuts->SetVarTitle(15, "Y(Omega)");\r
+ fCFContCascadeCuts->SetVarTitle(16, "mL/p (cascade) (cm)");\r
+ fCFContCascadeCuts->SetVarTitle(17, "mL/p (V0) (cm)");\r
+ fCFContCascadeCuts->SetVarTitle(18, "Distance V0-Cascade in transverse plane (cm)");\r
+ fListHistCascade->Add(fCFContCascadeCuts);\r
+ }\r
+\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDXiMinus);\r
+ PostData(3, fCFContCascadePIDXiPlus);\r
+ PostData(4, fCFContCascadePIDOmegaMinus);\r
+ PostData(5, fCFContCascadePIDOmegaPlus);\r
+ PostData(6, fCFContCascadeCuts);\r
+} // end UserCreateOutputObjects\r
+\r
+\r
+//________________________________________________________________________\r
+void AliAnalysisTaskCheckCascadepp276::UserExec(Option_t *) {\r
+\r
+ //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r
+ // Main loop (called for each event)\r
+ //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r
+ \r
+ //----------------\r
+ //Define variables \r
+ AliESDEvent *lESDevent = 0x0;\r
+ AliAODEvent *lAODevent = 0x0;\r
+\r
+ //---------------------\r
+ //Check the PIDresponse\r
+ if(!fPIDResponse) {\r
+ AliError("Cannot get pid response");\r
+ return;\r
+ }\r
+\r
+ ///////////////////\r
+ // EVENT SELECTIONS\r
+ ///////////////////\r
+ // In order:\r
+ // 1) SDD selection\r
+ // 2) Physics selection\r
+ // 3) Select only looking at events with well-established PV\r
+ // 4) Pileup selection\r
+ // 5) |Z| < 10 cm\r
+\r
+ //----------------------\r
+ // Before any selections\r
+ //----------------------\r
+ //- Define the variables\r
+ Int_t ncascadesBeforeAnySel = 0;\r
+ Int_t nTrackMultiplicityBeforeAnySel = 0;\r
+ if (fAnalysisType == "ESD") {\r
+ // - Load the InputEvent and check\r
+ lESDevent = dynamic_cast<AliESDEvent*>( InputEvent() );\r
+ if (!lESDevent) {\r
+ AliWarning("ERROR: lESDevent not available \n");\r
+ return;\r
+ }\r
+ // - Take the number of cascades and tracks before any events selection\r
+ ncascadesBeforeAnySel = lESDevent->GetNumberOfCascades();\r
+ nTrackMultiplicityBeforeAnySel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);\r
+ } else if (fAnalysisType == "AOD") {\r
+ // - Load the InputEvent and check\r
+ lAODevent = dynamic_cast<AliAODEvent*>( InputEvent() );\r
+ if (!lAODevent) {\r
+ AliWarning("ERROR: lAODevent not available \n");\r
+ return;\r
+ }\r
+ // - Take the number of cascades and tracks before any events selection\r
+ ncascadesBeforeAnySel = lAODevent->GetNumberOfCascades();\r
+ nTrackMultiplicityBeforeAnySel = -100; //FIXME: I can't find the equivalent method for the AOD \r
+ } else {\r
+ Printf("Analysis type (ESD or AOD) not specified \n");\r
+ return;\r
+ }\r
+ // - Fill the plots\r
+ fHistCascadeMultiplicityBeforeAnySel->Fill(ncascadesBeforeAnySel);\r
+ fHistTrackMultiplicityBeforeAnySel->Fill(nTrackMultiplicityBeforeAnySel);\r
+ \r
+ //--------------\r
+ // SDD selection\r
+ //--------------\r
+ // - Define the variables\r
+ Int_t ncascadesAfterSDDSel = 0;\r
+ Int_t nTrackMultiplicityAfterSDDSel = 0;\r
+ // - Selection for ESD and AOD\r
+ if (fAnalysisType == "ESD") {\r
+ if (fkSDDSelectionOn) {\r
+ TString trcl = lESDevent->GetFiredTriggerClasses();\r
+ //cout<<"Fired Trigger Classes: "<<trcl<<endl;\r
+ if (fwithSDD){\r
+ if(!(trcl.Contains("ALLNOTRD"))) {\r
+ cout<<"We are selecting events with SDD turn ON. This event has the SDD turn OFF. => RETURN!! (Exclude it)..."<<endl;\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDXiMinus);\r
+ PostData(3, fCFContCascadePIDXiPlus);\r
+ PostData(4, fCFContCascadePIDOmegaMinus);\r
+ PostData(5, fCFContCascadePIDOmegaPlus);\r
+ PostData(6, fCFContCascadeCuts);\r
+ return;\r
+ }\r
+ } else if (!fwithSDD){\r
+ if((trcl.Contains("ALLNOTRD"))) {\r
+ cout<<"We are selecting events with SDD turn OFF. This event has the SDD turn ON. => RETURN!! (Exclude it)..."<<endl;\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDXiMinus);\r
+ PostData(3, fCFContCascadePIDXiPlus);\r
+ PostData(4, fCFContCascadePIDOmegaMinus);\r
+ PostData(5, fCFContCascadePIDOmegaPlus);\r
+ PostData(6, fCFContCascadeCuts);\r
+ return;\r
+ }\r
+ }\r
+ }\r
+ // - Take the number of cascades and tracks after the SDD selection\r
+ ncascadesAfterSDDSel = lESDevent->GetNumberOfCascades();\r
+ nTrackMultiplicityAfterSDDSel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);\r
+ } else if (fAnalysisType == "AOD") {\r
+ if (fkSDDSelectionOn) {\r
+ TString trcl = lAODevent->GetFiredTriggerClasses();\r
+ if (fwithSDD){\r
+ if(!(trcl.Contains("ALLNOTRD"))) {\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDXiMinus);\r
+ PostData(3, fCFContCascadePIDXiPlus);\r
+ PostData(4, fCFContCascadePIDOmegaMinus);\r
+ PostData(5, fCFContCascadePIDOmegaPlus);\r
+ PostData(6, fCFContCascadeCuts);\r
+ cout<<"We are selecting events with SDD turn ON. This event has the SDD turn OFF. => RETURN!! (Exclude it)..."<<endl;\r
+ return;\r
+ }\r
+ } else if (!fwithSDD) {\r
+ if((trcl.Contains("ALLNOTRD"))) {\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDXiMinus);\r
+ PostData(3, fCFContCascadePIDXiPlus);\r
+ PostData(4, fCFContCascadePIDOmegaMinus);\r
+ PostData(5, fCFContCascadePIDOmegaPlus);\r
+ PostData(6, fCFContCascadeCuts);\r
+ cout<<"We are selecting events with SDD turn OFF. This event has the SDD turn ON. => RETURN!! (Exclude it)..."<<endl;\r
+ return;\r
+ }\r
+ }\r
+ }\r
+ // - Take the number of cascades and tracks after the SDD selection\r
+ ncascadesAfterSDDSel = lAODevent->GetNumberOfCascades();\r
+ nTrackMultiplicityAfterSDDSel = -100; //FIXME: I can't find the equivalent method for the AOD\r
+ }\r
+ // - Fill the plots\r
+ fHistCascadeMultiplicityAfterSDDSel->Fill(ncascadesAfterSDDSel);\r
+ fHistTrackMultiplicityAfterSDDSel->Fill(nTrackMultiplicityAfterSDDSel);\r
+\r
+ //----------------------------------------------\r
+ // Physics selection (+ re-vertexer for the ESD)\r
+ //----------------------------------------------\r
+ // - Define the variables\r
+ Int_t ncascadesAfterPhysicsSel = 0;\r
+ Int_t nTrackMultiplicityAfterPhysicsSel = 0;\r
+ // - Selection for ESD and AOD\r
+ if (fAnalysisType == "ESD") {\r
+ UInt_t maskIsSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();\r
+ Bool_t isSelected = 0;\r
+ isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB;\r
+ if(! isSelected){\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDXiMinus);\r
+ PostData(3, fCFContCascadePIDXiPlus);\r
+ PostData(4, fCFContCascadePIDOmegaMinus);\r
+ PostData(5, fCFContCascadePIDOmegaPlus);\r
+ PostData(6, fCFContCascadeCuts);\r
+ cout<<"We are selecting the events that past tha Physics Selection. This event does not pass the Physics Selection. => RETURN!! (Exclude it)..."<<endl;\r
+ return;\r
+ }\r
+ // - Take the number of cascades and tracks after physics selection\r
+ ncascadesAfterPhysicsSel = lESDevent->GetNumberOfCascades(); \r
+ nTrackMultiplicityAfterPhysicsSel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5); \r
+ // - Cascade vertexer (ESD)\r
+ // Relaunch V0 and Cascade vertexers\r
+ if (fkRerunV0CascVertexers) { \r
+ lESDevent->ResetCascades();\r
+ lESDevent->ResetV0s();\r
+ AliV0vertexer *lV0vtxer = new AliV0vertexer();\r
+ AliCascadeVertexer *lCascVtxer = new AliCascadeVertexer();\r
+ //lV0vtxer->GetCuts(fV0Sels);\r
+ //lCascVtxer->GetCuts(fCascSels);\r
+ lV0vtxer->SetCuts(fV0Sels); // NB don't use SetDefaultCuts!! because it acts on static variables \r
+ lCascVtxer->SetCuts(fCascSels);\r
+ lV0vtxer->Tracks2V0vertices(lESDevent);\r
+ lCascVtxer->V0sTracks2CascadeVertices(lESDevent);\r
+ //delete lV0vtxer;\r
+ //delete lCascVtxer;\r
+ } \r
+ } else if (fAnalysisType == "AOD") {\r
+ UInt_t maskIsSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();\r
+ Bool_t isSelected = 0;\r
+ isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB;\r
+ if(! isSelected){\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDXiMinus);\r
+ PostData(3, fCFContCascadePIDXiPlus);\r
+ PostData(4, fCFContCascadePIDOmegaMinus);\r
+ PostData(5, fCFContCascadePIDOmegaPlus);\r
+ PostData(6, fCFContCascadeCuts);\r
+ cout<<"We are selecting the events that past tha Physics Selection. This event does not pass the Physics Selection. => RETURN!! (Exclude it)..."<<endl;\r
+ return;\r
+ } \r
+ // - Take the number of cascades and tracks after the physics selection\r
+ ncascadesAfterPhysicsSel = lAODevent->GetNumberOfCascades();\r
+ nTrackMultiplicityAfterPhysicsSel = -100; //FIXME: I can't find the equivalent method for the AOD \r
+ } \r
+ // - Fill the plots\r
+ fHistCascadeMultiplicityAfterPhysicsSel->Fill(ncascadesAfterPhysicsSel);\r
+ fHistTrackMultiplicityAfterPhysicsSel->Fill(nTrackMultiplicityAfterPhysicsSel);\r
+\r
+ //------------------------------\r
+ // Well-established PV selection\r
+ //------------------------------\r
+ // - Define variables\r
+ Int_t ncascadesForSelEvtNoTPCOnly = 0;\r
+ Int_t nTrackMultiplicityForSelEvtNoTPCOnly = 0;\r
+ // - Selection for ESD and AOD\r
+ if (fAnalysisType == "ESD") {\r
+ // - Vertex coordinates: get the PVs stored in the ESD found with tracks and SPD\r
+ const AliESDVertex *lPrimaryTrackingESDVtx = lESDevent->GetPrimaryVertexTracks();\r
+ const AliESDVertex *lPrimarySPDVtx = lESDevent->GetPrimaryVertexSPD();\r
+ // - Select only looking at events with well-established PV\r
+ if (fkQualityCutNoTPConlyPrimVtx) {\r
+ if (!lPrimarySPDVtx->GetStatus() && !lPrimaryTrackingESDVtx->GetStatus() ){\r
+ AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !");\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDXiMinus);\r
+ PostData(3, fCFContCascadePIDXiPlus);\r
+ PostData(4, fCFContCascadePIDOmegaMinus);\r
+ PostData(5, fCFContCascadePIDOmegaPlus);\r
+ PostData(6, fCFContCascadeCuts);\r
+ return;\r
+ }\r
+ }\r
+ // - Take the number of cascades and tracks after TPConly selection\r
+ ncascadesForSelEvtNoTPCOnly = lESDevent->GetNumberOfCascades();\r
+ nTrackMultiplicityForSelEvtNoTPCOnly = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);\r
+ } else if (fAnalysisType == "AOD") {\r
+ // - Vertex coordinates: get the PVs stored in the AOD found with tracks and SPD\r
+ const AliAODVertex *lPrimarySPDVtx = lAODevent->GetPrimaryVertexSPD();\r
+ const AliAODVertex *lPrimaryTrackingAODVtx = lAODevent->GetPrimaryVertex();\r
+ // - Select only looking at events with well-established PV\r
+ if (fkQualityCutNoTPConlyPrimVtx) {\r
+ if (!lPrimarySPDVtx && !lPrimaryTrackingAODVtx) {\r
+ AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !");\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDXiMinus);\r
+ PostData(3, fCFContCascadePIDXiPlus);\r
+ PostData(4, fCFContCascadePIDOmegaMinus);\r
+ PostData(5, fCFContCascadePIDOmegaPlus);\r
+ PostData(6, fCFContCascadeCuts);\r
+ return;\r
+ }\r
+ }\r
+ // - Take the number of cascades and tracks after TPConly selection\r
+ ncascadesForSelEvtNoTPCOnly = lAODevent->GetNumberOfCascades();\r
+ nTrackMultiplicityForSelEvtNoTPCOnly = -100; //FIXME: I can't find the equivalent method for the AOD\r
+ }\r
+ // - Fill the plots\r
+ fHistCascadeMultiplicityForSelEvtNoTPCOnly->Fill(ncascadesForSelEvtNoTPCOnly);\r
+ fHistTrackMultiplicityForSelEvtNoTPCOnly->Fill(nTrackMultiplicityForSelEvtNoTPCOnly);\r
+ \r
+ //----------------\r
+ // Pilup selection\r
+ //----------------\r
+ // - Define variables\r
+ Int_t ncascadesForSelEvtNoTPCOnlyNoPileup = 0;\r
+ Int_t nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = 0;\r
+ // - Selection for ESD and AOD\r
+ if (fAnalysisType == "ESD") {\r
+ if (fkQualityCutPileup) {\r
+ if(lESDevent->IsPileupFromSPD()){\r
+ AliWarning("Pb / Pile-up event ... return!");\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDXiMinus);\r
+ PostData(3, fCFContCascadePIDXiPlus);\r
+ PostData(4, fCFContCascadePIDOmegaMinus);\r
+ PostData(5, fCFContCascadePIDOmegaPlus);\r
+ PostData(6, fCFContCascadeCuts);\r
+ return;\r
+ }\r
+ }\r
+ // - Take the number of cascades and tracks after Pileup selection\r
+ ncascadesForSelEvtNoTPCOnlyNoPileup = lESDevent->GetNumberOfCascades();\r
+ nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);\r
+ } else if (fAnalysisType == "AOD") {\r
+ if (fkQualityCutPileup) {\r
+ if(lAODevent->IsPileupFromSPD()){\r
+ AliWarning("Pb / Pile-up event ... return!");\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDXiMinus);\r
+ PostData(3, fCFContCascadePIDXiPlus);\r
+ PostData(4, fCFContCascadePIDOmegaMinus);\r
+ PostData(5, fCFContCascadePIDOmegaPlus);\r
+ PostData(6, fCFContCascadeCuts);\r
+ return;\r
+ }\r
+ }\r
+ // - Take the number of cascades and tracks after Pileup selection\r
+ ncascadesForSelEvtNoTPCOnlyNoPileup = lAODevent->GetNumberOfCascades();\r
+ nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = -100; //FIXME: I can't find the equivalent method for the AOD\r
+ }\r
+ fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup->Fill(ncascadesForSelEvtNoTPCOnlyNoPileup);\r
+ fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup->Fill(nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup);\r
+ \r
+ //----------------------------------------------------\r
+ // Vertex Z position selection (+ magnetic field info)\r
+ //----------------------------------------------------\r
+ // - Define variables\r
+ Double_t lBestPrimaryVtxPos[3] = {-100.0, -100.0, -100.0};\r
+ Double_t lMagneticField = -10.;\r
+ Double_t tPrimaryVtxPosition[3] = {-100.0, -100.0, -100.0};\r
+ Int_t ncascadesAfterVertexSel = 0;\r
+ Int_t nTrackMultiplicityAfterVertexSel = 0; \r
+ // - Selection for ESD and AOD\r
+ if (fAnalysisType == "ESD") {\r
+ // - Vertex coordinates: get the best primary vertex available for the event \r
+ const AliESDVertex *lPrimaryBestESDVtx = lESDevent->GetPrimaryVertex(); \r
+ if (!lPrimaryBestESDVtx){\r
+ AliWarning("No prim. vertex in ESD... return!");\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDXiMinus);\r
+ PostData(3, fCFContCascadePIDXiPlus);\r
+ PostData(4, fCFContCascadePIDOmegaMinus);\r
+ PostData(5, fCFContCascadePIDOmegaPlus);\r
+ PostData(6, fCFContCascadeCuts);\r
+ return;\r
+ }\r
+ lPrimaryBestESDVtx->GetXYZ( lBestPrimaryVtxPos );\r
+ // - Fill the vertex plots before any event selection on vertex position\r
+ const AliVVertex *primaryVtx = lESDevent->GetPrimaryVertex();\r
+ tPrimaryVtxPosition[0] = primaryVtx->GetX();\r
+ tPrimaryVtxPosition[1] = primaryVtx->GetY();\r
+ tPrimaryVtxPosition[2] = primaryVtx->GetZ();\r
+ fHistPVx->Fill( tPrimaryVtxPosition[0] );\r
+ fHistPVy->Fill( tPrimaryVtxPosition[1] );\r
+ fHistPVz->Fill( tPrimaryVtxPosition[2] ); \r
+ // - Get magnetic filed info\r
+ lMagneticField = lESDevent->GetMagneticField();\r
+ //if(TMath::Abs(lMagneticField ) < 10e-6) continue;\r
+ // - Selection on the primary vertex Z position \r
+ if (fkQualityCutZprimVtxPos) {\r
+ if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange || TMath::Abs(lBestPrimaryVtxPos[2]) < fVtxRangeMin) {\r
+ AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDXiMinus);\r
+ PostData(3, fCFContCascadePIDXiPlus);\r
+ PostData(4, fCFContCascadePIDOmegaMinus);\r
+ PostData(5, fCFContCascadePIDOmegaPlus);\r
+ PostData(6, fCFContCascadeCuts);\r
+ return;\r
+ }\r
+ }\r
+ // - Take the number of cascades and tracks after vertex Z position selection\r
+ ncascadesAfterVertexSel = lESDevent->GetNumberOfCascades();\r
+ nTrackMultiplicityAfterVertexSel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5); \r
+ } else if (fAnalysisType == "AOD") {\r
+ // - Vertex coordinates: get the best primary vertex available for the event\r
+ const AliAODVertex *lPrimaryBestAODVtx = lAODevent->GetPrimaryVertex();\r
+ if (!lPrimaryBestAODVtx){\r
+ AliWarning("No prim. vertex in AOD... return!");\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDXiMinus);\r
+ PostData(3, fCFContCascadePIDXiPlus);\r
+ PostData(4, fCFContCascadePIDOmegaMinus);\r
+ PostData(5, fCFContCascadePIDOmegaPlus);\r
+ PostData(6, fCFContCascadeCuts);\r
+ return;\r
+ }\r
+ lPrimaryBestAODVtx->GetXYZ( lBestPrimaryVtxPos );\r
+ // - Fill the vertex plots before any event selection on vertex position\r
+ const AliVVertex *primaryVtx = lAODevent->GetPrimaryVertex();\r
+ tPrimaryVtxPosition[0] = primaryVtx->GetX();\r
+ tPrimaryVtxPosition[1] = primaryVtx->GetY();\r
+ tPrimaryVtxPosition[2] = primaryVtx->GetZ();\r
+ fHistPVx->Fill( tPrimaryVtxPosition[0] );\r
+ fHistPVy->Fill( tPrimaryVtxPosition[1] );\r
+ fHistPVz->Fill( tPrimaryVtxPosition[2] );\r
+ // - Get magnetic filed info\r
+ lMagneticField = lAODevent->GetMagneticField();\r
+ //if(TMath::Abs(lMagneticField ) < 10e-6) continue;\r
+ // - Selection on the primary vertex Z position \r
+ if (fkQualityCutZprimVtxPos) {\r
+ if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange || TMath::Abs(lBestPrimaryVtxPos[2]) < fVtxRangeMin) {\r
+ AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDXiMinus);\r
+ PostData(3, fCFContCascadePIDXiPlus);\r
+ PostData(4, fCFContCascadePIDOmegaMinus);\r
+ PostData(5, fCFContCascadePIDOmegaPlus);\r
+ PostData(6, fCFContCascadeCuts);\r
+ return;\r
+ }\r
+ }\r
+ // - Take the number of cascades and tracks after vertex Z position selection\r
+ ncascadesAfterVertexSel = lAODevent->GetNumberOfCascades();\r
+ nTrackMultiplicityAfterVertexSel = -100; //FIXME: I can't find the equivalent method for the AOD\r
+ } \r
+ // - Fill the plots\r
+ fHistCascadeMultiplicityAfterVertexCutSel->Fill(ncascadesAfterVertexSel);\r
+ fHistTrackMultiplicityAfterVertexCutSel->Fill(nTrackMultiplicityAfterVertexSel);\r
+\r
+ // - Vertex position plots: after any event selections\r
+ tPrimaryVtxPosition[0] = -100.0;\r
+ tPrimaryVtxPosition[1] = -100.0;\r
+ tPrimaryVtxPosition[2] = -100.0;\r
+ if (fAnalysisType == "ESD") {\r
+ const AliVVertex *primaryVtx = lESDevent->GetPrimaryVertex();\r
+ tPrimaryVtxPosition[0] = primaryVtx->GetX();\r
+ tPrimaryVtxPosition[1] = primaryVtx->GetY();\r
+ tPrimaryVtxPosition[2] = primaryVtx->GetZ();\r
+ } else if (fAnalysisType == "AOD") {\r
+ const AliVVertex *primaryVtx = lAODevent->GetPrimaryVertex();\r
+ tPrimaryVtxPosition[0] = primaryVtx->GetX();\r
+ tPrimaryVtxPosition[1] = primaryVtx->GetY();\r
+ tPrimaryVtxPosition[2] = primaryVtx->GetZ();\r
+ }\r
+ fHistPVxAnalysis->Fill( tPrimaryVtxPosition[0] );\r
+ fHistPVyAnalysis->Fill( tPrimaryVtxPosition[1] );\r
+ fHistPVzAnalysis->Fill( tPrimaryVtxPosition[2] );\r
+ \r
+\r
+\r
+ //////////////////////////////\r
+ // CASCADE RECONSTRUCTION PART\r
+ //////////////////////////////\r
+ \r
+ //%%%%%%%%%%%%%\r
+ // Cascade loop\r
+ Int_t ncascades = 0;\r
+ if (fAnalysisType == "ESD") ncascades = lESDevent->GetNumberOfCascades();\r
+ else if (fAnalysisType == "AOD") ncascades = lAODevent->GetNumberOfCascades();\r
+\r
+ for (Int_t iXi = 0; iXi < ncascades; iXi++) {// This is the begining of the Cascade loop (ESD or AOD)\r
+ \r
+ // -----------------------------------------------------------------------\r
+ // - Initialisation of the local variables that will be needed for ESD/AOD\r
+\r
+ // - 0th part of initialisation : around primary vertex ...\r
+ //Double_t lBestPrimaryVtxRadius3D = -500.0;\r
+ // - 1st part of initialisation : variables needed to store AliESDCascade data members\r
+ Double_t lEffMassXi = 0.;\r
+ Double_t lDcaXiDaughters = -1.;\r
+ Double_t lXiCosineOfPointingAngle = -1.;\r
+ Double_t lPosXi[3] = { -1000.0, -1000.0, -1000.0 };\r
+ Double_t lXiRadius = -1000. ;\r
+ // - 2nd part of initialisation : Nbr of clusters within TPC for the 3 daughter cascade tracks\r
+ UShort_t lPosTPCClusters = -1; // For ESD only ...\r
+ UShort_t lNegTPCClusters = -1; // For ESD only ...\r
+ UShort_t lBachTPCClusters = -1; // For ESD only ...\r
+ Double_t lInnerWallMomCascDghters[3] = {-100., -100., -100.};\r
+ Double_t lTPCSignalCascDghters [3] = {-100., -100., -100.};\r
+ // - 3rd part of initialisation : about V0 part in cascades\r
+ Double_t lInvMassLambdaAsCascDghter = 0.;\r
+ Double_t lDcaV0DaughtersXi = -1.;\r
+ Double_t lDcaBachToPrimVertexXi = -1.;\r
+ Double_t lDcaV0ToPrimVertexXi = -1.;\r
+ Double_t lDcaPosToPrimVertexXi = -1.;\r
+ Double_t lDcaNegToPrimVertexXi = -1.;\r
+ Double_t lV0CosineOfPointingAngleXi = -1. ;\r
+ Double_t lPosV0Xi[3] = { -1000. , -1000., -1000. }; // Position of VO coming from cascade\r
+ Double_t lV0RadiusXi = -1000.0;\r
+ Double_t lV0quality = 0.;\r
+ // - 4th part of initialisation : Effective masses\r
+ Double_t lInvMassXiMinus = 0.;\r
+ Double_t lInvMassXiPlus = 0.;\r
+ Double_t lInvMassOmegaMinus = 0.;\r
+ Double_t lInvMassOmegaPlus = 0.;\r
+ // - 5th part of initialisation : PID treatment\r
+ Bool_t lIsPosInXiProton = kFALSE;\r
+ Bool_t lIsPosInXiPion = kFALSE;\r
+ Bool_t lIsPosInOmegaProton = kFALSE;\r
+ Bool_t lIsPosInOmegaPion = kFALSE;\r
+ Bool_t lIsNegInXiProton = kFALSE;\r
+ Bool_t lIsNegInXiPion = kFALSE;\r
+ Bool_t lIsNegInOmegaProton = kFALSE;\r
+ Bool_t lIsNegInOmegaPion = kFALSE;\r
+ Bool_t lIsBachelorKaon = kFALSE;\r
+ Bool_t lIsBachelorPion = kFALSE; \r
+ Bool_t lIsBachelorKaonForTPC = kFALSE; \r
+ Bool_t lIsBachelorPionForTPC = kFALSE; \r
+ Bool_t lIsNegPionForTPC = kFALSE; \r
+ Bool_t lIsPosPionForTPC = kFALSE; \r
+ Bool_t lIsNegProtonForTPC = kFALSE; \r
+ Bool_t lIsPosProtonForTPC = kFALSE; \r
+ // - 6th part of initialisation : extra info for QA\r
+ Double_t lXiMomX = 0.;\r
+ Double_t lXiMomY = 0.;\r
+ Double_t lXiMomZ = 0.;\r
+ Double_t lXiTransvMom = 0.;\r
+ Double_t lXiTotMom = 0.;\r
+ Double_t lV0PMomX = 0.;\r
+ Double_t lV0PMomY = 0.;\r
+ Double_t lV0PMomZ = 0.;\r
+ Double_t lV0NMomX = 0.;\r
+ Double_t lV0NMomY = 0.;\r
+ Double_t lV0NMomZ = 0.;\r
+ Double_t lV0TotMom = 0.;\r
+ Double_t lBachMomX = 0.;\r
+ Double_t lBachMomY = 0.;\r
+ Double_t lBachMomZ = 0.;\r
+ Double_t lBachTransvMom = 0.;\r
+ Double_t lBachTotMom = 0.;\r
+ Double_t lpTrackTransvMom = 0.;\r
+ Double_t lnTrackTransvMom = 0.;\r
+ Short_t lChargeXi = -2;\r
+ Double_t lV0toXiCosineOfPointingAngle = 0.;\r
+ Double_t lRapXi = -20.0, lRapOmega = -20.0, lEta = -20.0, lTheta = 360., lPhi = 720.;\r
+ Double_t lAlphaXi = -200., lPtArmXi = -200.0;\r
+ Double_t etaPos = 0., etaNeg = 0., etaBach = 0.;\r
+ \r
+ if (fAnalysisType == "ESD") { \r
+ \r
+ // -------------------------------------\r
+ // - Load the cascades from the handler\r
+ AliESDcascade *xi = lESDevent->GetCascade(iXi);\r
+ if (!xi) continue;\r
+\r
+ //---------------------------------------------------------------------------- \r
+ // - Assigning the necessary variables for specific AliESDcascade data members \r
+ lV0quality = 0.;\r
+ xi->ChangeMassHypothesis(lV0quality , 3312); // default working hypothesis: cascade = Xi-decay\r
+ lEffMassXi = xi->GetEffMassXi();\r
+ lDcaXiDaughters = xi->GetDcaXiDaughters();\r
+ lXiCosineOfPointingAngle = xi->GetCascadeCosineOfPointingAngle( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2] );\r
+ //Take care : the best available vertex should be used (like in AliCascadeVertexer)\r
+ xi->GetXYZcascade( lPosXi[0], lPosXi[1], lPosXi[2] ); \r
+ lXiRadius = TMath::Sqrt( lPosXi[0]*lPosXi[0] + lPosXi[1]*lPosXi[1] );\r
+ \r
+ //-------------------------------------------------------------------------------------------------------------------------------\r
+ // - Around the tracks: Bach + V0 (ESD). Necessary variables for ESDcascade data members coming from the ESDv0 part (inheritance)\r
+ UInt_t lIdxPosXi = (UInt_t) TMath::Abs( xi->GetPindex() );\r
+ UInt_t lIdxNegXi = (UInt_t) TMath::Abs( xi->GetNindex() );\r
+ UInt_t lBachIdx = (UInt_t) TMath::Abs( xi->GetBindex() );\r
+ //Care track label can be negative in MC production (linked with the track quality)\r
+ //However = normally, not the case for track index ...\r
+ // - Rejection of a double use of a daughter track (nothing but just a crosscheck of what is done in the cascade vertexer)\r
+ if (lBachIdx == lIdxNegXi) { AliWarning("Pb / Idx(Bach. track) = Idx(Neg. track) ... continue!"); continue; }\r
+ if (lBachIdx == lIdxPosXi) { AliWarning("Pb / Idx(Bach. track) = Idx(Pos. track) ... continue!"); continue; }\r
+ // - Get the track for the daughters\r
+ AliESDtrack *pTrackXi = lESDevent->GetTrack( lIdxPosXi );\r
+ AliESDtrack *nTrackXi = lESDevent->GetTrack( lIdxNegXi );\r
+ AliESDtrack *bachTrackXi = lESDevent->GetTrack( lBachIdx );\r
+ if (!pTrackXi || !nTrackXi || !bachTrackXi ) {\r
+ AliWarning("ERROR: Could not retrieve one of the 3 ESD daughter tracks of the cascade ...");\r
+ continue;\r
+ }\r
+ // - Get the TPCnumber of cluster for the daughters\r
+ lPosTPCClusters = pTrackXi->GetTPCNcls();\r
+ lNegTPCClusters = nTrackXi->GetTPCNcls();\r
+ lBachTPCClusters = bachTrackXi->GetTPCNcls();\r
+\r
+ //-------------------------------------\r
+ // - Rejection of a poor quality tracks\r
+ if (fkQualityCutTPCrefit) {\r
+ // - Poor quality related to TPCrefit\r
+ ULong_t pStatus = pTrackXi->GetStatus();\r
+ ULong_t nStatus = nTrackXi->GetStatus();\r
+ ULong_t bachStatus = bachTrackXi->GetStatus();\r
+ if ((pStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Pos. track has no TPCrefit ... continue!"); continue; }\r
+ if ((nStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Neg. track has no TPCrefit ... continue!"); continue; }\r
+ if ((bachStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / Bach. track has no TPCrefit ... continue!"); continue; }\r
+ }\r
+ if (fkQualityCutnTPCcls) {\r
+ // - Poor quality related to TPC clusters\r
+ if (lPosTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Pos. track has less than 80 TPC clusters ... continue!"); continue; }\r
+ if (lNegTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Neg. track has less than 80 TPC clusters ... continue!"); continue; }\r
+ if (lBachTPCClusters < fMinnTPCcls) { AliWarning("Pb / Bach. track has less than 80 TPC clusters ... continue!"); continue; }\r
+ }\r
+\r
+ //-----------------------------------\r
+ const AliExternalTrackParam *pExtTrack = pTrackXi->GetInnerParam();\r
+ const AliExternalTrackParam *nExtTrack = nTrackXi->GetInnerParam();\r
+ const AliExternalTrackParam *bachExtTrack = bachTrackXi->GetInnerParam();\r
+ if (pExtTrack) {\r
+ lInnerWallMomCascDghters[0] = pExtTrack->GetP() * pExtTrack->Charge();\r
+ lTPCSignalCascDghters [0] = pTrackXi->GetTPCsignal();\r
+ }\r
+ if (nExtTrack) {\r
+ lInnerWallMomCascDghters[1] = nExtTrack->GetP() * nExtTrack->Charge();\r
+ lTPCSignalCascDghters [1] = nTrackXi->GetTPCsignal();\r
+ }\r
+ if (bachExtTrack) {\r
+ lInnerWallMomCascDghters[2] = bachExtTrack->GetP() * bachExtTrack->Charge();\r
+ lTPCSignalCascDghters [2] = bachTrackXi->GetTPCsignal();\r
+ }\r
+ etaPos = pTrackXi->Eta();\r
+ etaNeg = nTrackXi->Eta();\r
+ etaBach = bachTrackXi->Eta();\r
+ lInvMassLambdaAsCascDghter = xi->GetEffMass(); //This value shouldn't change, whatever the working hyp. is : Xi-, Xi+, Omega-, Omega+\r
+ lDcaV0DaughtersXi = xi->GetDcaV0Daughters(); \r
+ lV0CosineOfPointingAngleXi = xi->GetV0CosineOfPointingAngle(lBestPrimaryVtxPos[0],\r
+ lBestPrimaryVtxPos[1],\r
+ lBestPrimaryVtxPos[2] );\r
+ lDcaV0ToPrimVertexXi = xi->GetD( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2] );\r
+ lDcaBachToPrimVertexXi = TMath::Abs( bachTrackXi->GetD( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lMagneticField ) ); //Note: AliExternalTrackParam::GetD returns an algebraic value ...\r
+ xi->GetXYZ( lPosV0Xi[0], lPosV0Xi[1], lPosV0Xi[2] ); \r
+ lV0RadiusXi = TMath::Sqrt( lPosV0Xi[0]*lPosV0Xi[0] + lPosV0Xi[1]*lPosV0Xi[1] ); \r
+ lDcaPosToPrimVertexXi = TMath::Abs( pTrackXi ->GetD( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lMagneticField ) ); \r
+ lDcaNegToPrimVertexXi = TMath::Abs( nTrackXi ->GetD( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lMagneticField ) ); \r
+\r
+ //-----------------------------------------\r
+ // - Extra-selection for cascade candidates\r
+ if (fkExtraSelections) { //in AliCascadeVertexer\r
+ if (lDcaXiDaughters > 0.3) continue; \r
+ if (lXiCosineOfPointingAngle < 0.999 ) continue; \r
+ if (lDcaV0ToPrimVertexXi < 0.05) continue; \r
+ if (lDcaBachToPrimVertexXi < 0.03) continue; \r
+ //if (TMath::Abs(lInvMassLambdaAsCascDghter-1.11568) > 0.006 ) continue; \r
+ if (lDcaV0DaughtersXi > 1.) continue; \r
+ if (lV0CosineOfPointingAngleXi < 0.998) continue; \r
+ if (lDcaPosToPrimVertexXi < 0.1) continue; \r
+ if (lDcaNegToPrimVertexXi < 0.1) continue; \r
+ if (lXiRadius < .9) continue; \r
+ //if (lXiRadius > 100) continue; \r
+ if (lV0RadiusXi < 0.9) continue; \r
+ //if (lV0RadiusXi > 100) continue; \r
+ }\r
+\r
+ //---------------------------------------------------------------------------------------------------- \r
+ // - Around effective masses. Change mass hypotheses to cover all the possibilities: Xi-/+, Omega -/+\r
+ if ( bachTrackXi->Charge() < 0 ) {\r
+ //Calculate the effective mass of the Xi- candidate: Xi- hyp. (pdg code 3312)\r
+ lV0quality = 0.;\r
+ xi->ChangeMassHypothesis(lV0quality , 3312); \r
+ lInvMassXiMinus = xi->GetEffMassXi();\r
+ //Calculate the effective mass of the Xi- candidate: Omega- hyp. (pdg code 3334)\r
+ lV0quality = 0.;\r
+ xi->ChangeMassHypothesis(lV0quality , 3334); \r
+ lInvMassOmegaMinus = xi->GetEffMassXi();\r
+ //Back to "default" hyp. (Xi-)\r
+ lV0quality = 0.;\r
+ xi->ChangeMassHypothesis(lV0quality , 3312); \r
+ } // end if negative bachelor\r
+ if ( bachTrackXi->Charge() > 0 ) {\r
+ //Calculate the effective mass of the Xi- candidate: Xi+ hyp. (pdg code -3312)\r
+ lV0quality = 0.;\r
+ xi->ChangeMassHypothesis(lV0quality , -3312); \r
+ lInvMassXiPlus = xi->GetEffMassXi();\r
+ //Calculate the effective mass of the Xi- candidate: Omega+ hyp. (pdg code -3334)\r
+ lV0quality = 0.;\r
+ xi->ChangeMassHypothesis(lV0quality , -3334); \r
+ lInvMassOmegaPlus = xi->GetEffMassXi();\r
+ //Back to "default" hyp. (Xi-)\r
+ lV0quality = 0.;\r
+ xi->ChangeMassHypothesis(lV0quality , -3312); \r
+ } // end if positive bachelor\r
+\r
+ //--------------------------------\r
+ // - PID on the daughter tracks\r
+ // - Combined PID -> removed, add when will be used\r
+\r
+ // - TPC PID : 3-sigma bands on Bethe-Bloch curve\r
+ //Bachelor\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 4) lIsBachelorKaonForTPC = kTRUE;\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 4) lIsBachelorPionForTPC = kTRUE;\r
+ //Negative V0 daughter\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 4) lIsNegPionForTPC = kTRUE;\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kProton )) < 4) lIsNegProtonForTPC = kTRUE;\r
+ //Positive V0 daughter\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 4) lIsPosPionForTPC = kTRUE;\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 4) lIsPosProtonForTPC = kTRUE;\r
+ /*\r
+ const AliExternalTrackParam *pInnerWallTrackXi = pTrackXi ->GetInnerParam();\r
+ const AliExternalTrackParam *nInnerWallTrackXi = nTrackXi ->GetInnerParam();\r
+ const AliExternalTrackParam *bachInnerWallTrackXi = bachTrackXi ->GetInnerParam();\r
+ if (pInnerWallTrackXi && nInnerWallTrackXi && bachInnerWallTrackXi ) { \r
+ Double_t pMomInnerWall = pInnerWallTrackXi ->GetP();\r
+ Double_t nMomInnerWall = nInnerWallTrackXi ->GetP();\r
+ Double_t bachMomInnerWall = bachInnerWallTrackXi->GetP();\r
+ //Bachelor\r
+ if (TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 3) lIsBachelorPionForTPC = kTRUE;\r
+ if (bachMomInnerWall < 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 5) lIsBachelorKaonForTPC = kTRUE;\r
+ if (bachMomInnerWall > 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 3) lIsBachelorKaonForTPC = kTRUE; \r
+ //Negative V0 daughter\r
+ if (TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 3 ) lIsNegPionForTPC = kTRUE;\r
+ if (nMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 5 ) lIsNegProtonForTPC = kTRUE;\r
+ if (nMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 3 ) lIsNegProtonForTPC = kTRUE; \r
+ //Positive V0 daughter\r
+ if (TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 3 ) lIsPosPionForTPC = kTRUE;\r
+ if (pMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 5) lIsPosProtonForTPC = kTRUE;\r
+ if (pMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 3) lIsPosProtonForTPC = kTRUE;\r
+ }*/\r
+ \r
+ //---------------------------------\r
+ // - Extra info for QA (ESD)\r
+ // Miscellaneous pieces of info that may help regarding data quality assessment.\r
+ // Cascade transverse and total momentum\r
+ xi->GetPxPyPz( lXiMomX, lXiMomY, lXiMomZ );\r
+ lXiTransvMom = TMath::Sqrt( lXiMomX*lXiMomX + lXiMomY*lXiMomY );\r
+ lXiTotMom = TMath::Sqrt( lXiMomX*lXiMomX + lXiMomY*lXiMomY + lXiMomZ*lXiMomZ );\r
+ // V0 total momentum\r
+ xi->GetNPxPyPz(lV0NMomX,lV0NMomY,lV0NMomZ);\r
+ xi->GetPPxPyPz(lV0PMomX,lV0PMomY,lV0PMomZ);\r
+ lV0TotMom = TMath::Sqrt(TMath::Power(lV0NMomX+lV0PMomX,2) + TMath::Power(lV0NMomY+lV0PMomY,2) + TMath::Power(lV0NMomZ+lV0PMomZ,2));\r
+ // Bachelor total momentum\r
+ xi->GetBPxPyPz( lBachMomX, lBachMomY, lBachMomZ );\r
+ lBachTransvMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY );\r
+ lBachTotMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY + lBachMomZ*lBachMomZ );\r
+ lnTrackTransvMom = TMath::Sqrt( lV0NMomX*lV0NMomX + lV0NMomY*lV0NMomY );\r
+ lpTrackTransvMom = TMath::Sqrt( lV0PMomX*lV0PMomX + lV0PMomY*lV0PMomY );\r
+ lChargeXi = xi->Charge();\r
+ lV0toXiCosineOfPointingAngle = xi->GetV0CosineOfPointingAngle( lPosXi[0], lPosXi[1], lPosXi[2] );\r
+ lRapXi = xi->RapXi();\r
+ lRapOmega = xi->RapOmega();\r
+ lEta = xi->Eta();\r
+ lTheta = xi->Theta()*180.0/TMath::Pi();\r
+ lPhi = xi->Phi()*180.0/TMath::Pi();\r
+ lAlphaXi = xi->AlphaXi();\r
+ lPtArmXi = xi->PtArmXi();\r
+ // Extra-cut = Anti-splitting cut for lambda daughters\r
+ Bool_t kAntiSplittingLambda = kFALSE; \r
+ if (kAntiSplittingLambda) { // not used\r
+ Double_t lNMomX = 0., lNMomY = 0., lNMomZ = 0.;\r
+ Double_t lPMomX = 0., lPMomY = 0., lPMomZ = 0.;\r
+ xi->GetPPxPyPz(lPMomX, lPMomY, lPMomZ); \r
+ xi->GetNPxPyPz(lNMomX, lNMomY, lNMomZ); \r
+ if ( xi->Charge() < 0) {// Xi- or Omega-\r
+ if (TMath::Abs(lBachTransvMom - TMath::Sqrt( lNMomX*lNMomX + lNMomY*lNMomY ) ) < 0.075) continue;\r
+ } else { //Xi+ or Omega+\r
+ if(TMath::Abs(lBachTransvMom - TMath::Sqrt( lPMomX*lPMomX + lPMomY*lPMomY ) ) < 0.075) continue;\r
+ }\r
+ }\r
+\r
+ } // end of ESD treatment\r
+ \r
+ else if (fAnalysisType == "AOD") {\r
+\r
+ // -------------------------------------\r
+ // - Load the cascades from the handler\r
+ const AliAODcascade *xi = lAODevent->GetCascade(iXi);\r
+ if (!xi) continue;\r
+ \r
+ //---------------------------------------------------------------------------- \r
+ // - Assigning the necessary variables for specific AliESDcascade data members \r
+ lEffMassXi = xi->MassXi(); // default working hypothesis : cascade = Xi- decay\r
+ lDcaXiDaughters = xi->DcaXiDaughters();\r
+ lXiCosineOfPointingAngle = xi->CosPointingAngleXi( lBestPrimaryVtxPos[0], \r
+ lBestPrimaryVtxPos[1], \r
+ lBestPrimaryVtxPos[2] );\r
+ lPosXi[0] = xi->DecayVertexXiX();\r
+ lPosXi[1] = xi->DecayVertexXiY();\r
+ lPosXi[2] = xi->DecayVertexXiZ();\r
+ lXiRadius = TMath::Sqrt( lPosXi[0]*lPosXi[0] + lPosXi[1]*lPosXi[1] );\r
+\r
+ //-------------------------------------------------------------------------------------------------------------------------------\r
+ // - Around the tracks: Bach + V0 (ESD). Necessary variables for ESDcascade data members coming from the ESDv0 part (inheritance)\r
+ AliAODTrack *pTrackXi = dynamic_cast<AliAODTrack*>( xi->GetDaughter(0) );\r
+ AliAODTrack *nTrackXi = dynamic_cast<AliAODTrack*>( xi->GetDaughter(1) );\r
+ AliAODTrack *bachTrackXi = dynamic_cast<AliAODTrack*>( xi->GetDecayVertexXi()->GetDaughter(0) );\r
+ if (!pTrackXi || !nTrackXi || !bachTrackXi ) {\r
+ AliWarning("ERROR: Could not retrieve one of the 3 AOD daughter tracks of the cascade ...");\r
+ continue;\r
+ }\r
+ UInt_t lIdxPosXi = (UInt_t) TMath::Abs( pTrackXi->GetID() ); \r
+ UInt_t lIdxNegXi = (UInt_t) TMath::Abs( nTrackXi->GetID() );\r
+ UInt_t lBachIdx = (UInt_t) TMath::Abs( bachTrackXi->GetID() );\r
+ // Care track label can be negative in MC production (linked with the track quality)\r
+ // However = normally, not the case for track index ...\r
+ // - Rejection of a double use of a daughter track (nothing but just a crosscheck of what is done in the cascade vertexer)\r
+ if (lBachIdx == lIdxNegXi) { AliWarning("Pb / Idx(Bach. track) = Idx(Neg. track) ... continue!"); continue; }\r
+ if (lBachIdx == lIdxPosXi) { AliWarning("Pb / Idx(Bach. track) = Idx(Pos. track) ... continue!"); continue; }\r
+ // - Get the TPCnumber of cluster for the daughters\r
+ lPosTPCClusters = pTrackXi->GetTPCNcls(); // FIXME: Is this ok? or something like in LambdaK0PbPb task AOD?\r
+ lNegTPCClusters = nTrackXi->GetTPCNcls();\r
+ lBachTPCClusters = bachTrackXi->GetTPCNcls();\r
+\r
+ //-------------------------------------\r
+ // - Rejection of a poor quality tracks\r
+ if (fkQualityCutTPCrefit) {\r
+ // - Poor quality related to TPCrefit\r
+ if (!(pTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / V0 Pos. track has no TPCrefit ... continue!"); continue; }\r
+ if (!(nTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / V0 Neg. track has no TPCrefit ... continue!"); continue; }\r
+ if (!(bachTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / Bach. track has no TPCrefit ... continue!"); continue; }\r
+ }\r
+ if (fkQualityCutnTPCcls) {\r
+ // - Poor quality related to TPC clusters\r
+ if (lPosTPCClusters < fMinnTPCcls) { //AliWarning("Pb / V0 Pos. track has less than 80 TPC clusters ... continue!");\r
+ continue; }\r
+ if (lNegTPCClusters < fMinnTPCcls) { //AliWarning("Pb / V0 Neg. track has less than 80 TPC clusters ... continue!");\r
+ continue; }\r
+ if (lBachTPCClusters < fMinnTPCcls) { //AliWarning("Pb / Bach. track has less than 80 TPC clusters ... continue!");\r
+ continue; }\r
+ }\r
+\r
+ //---------------------------------------\r
+ // - Around the tracks: Bach + V0 (AOD). Necessary variables for AODcascade data members coming from the AODv0 part (inheritance)\r
+ etaPos = pTrackXi->Eta();\r
+ etaNeg = nTrackXi->Eta();\r
+ etaBach = bachTrackXi->Eta();\r
+ lChargeXi = xi->ChargeXi();\r
+ if ( lChargeXi < 0) lInvMassLambdaAsCascDghter = xi->MassLambda();\r
+ else lInvMassLambdaAsCascDghter = xi->MassAntiLambda();\r
+ lDcaV0DaughtersXi = xi->DcaV0Daughters(); \r
+ lDcaV0ToPrimVertexXi = xi->DcaV0ToPrimVertex();\r
+ lDcaBachToPrimVertexXi = xi->DcaBachToPrimVertex(); \r
+ lPosV0Xi[0] = xi->DecayVertexV0X();\r
+ lPosV0Xi[1] = xi->DecayVertexV0Y();\r
+ lPosV0Xi[2] = xi->DecayVertexV0Z(); \r
+ lV0RadiusXi = TMath::Sqrt( lPosV0Xi[0]*lPosV0Xi[0] + lPosV0Xi[1]*lPosV0Xi[1] );\r
+ lV0CosineOfPointingAngleXi = xi->CosPointingAngle( lBestPrimaryVtxPos ); \r
+ lDcaPosToPrimVertexXi = xi->DcaPosToPrimVertex(); \r
+ lDcaNegToPrimVertexXi = xi->DcaNegToPrimVertex(); \r
+\r
+ //---------------------------------------------------------------------------------------------------- \r
+ // - Around effective masses. Change mass hypotheses to cover all the possibilities: Xi-/+, Omega -/+\r
+ if ( lChargeXi < 0 ) lInvMassXiMinus = xi->MassXi();\r
+ if ( lChargeXi > 0 ) lInvMassXiPlus = xi->MassXi();\r
+ if ( lChargeXi < 0 ) lInvMassOmegaMinus = xi->MassOmega();\r
+ if ( lChargeXi > 0 ) lInvMassOmegaPlus = xi->MassOmega();\r
+\r
+ //--------------------------------\r
+ // - PID on the daughter tracks\r
+ // - Combined PID -> removed, add when will be used\r
+\r
+ // - TPC PID : 3-sigma bands on Bethe-Bloch curve\r
+ //Bachelor\r
+ if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 4) lIsBachelorKaonForTPC = kTRUE;\r
+ if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 4) lIsBachelorPionForTPC = kTRUE;\r
+ //Negative V0 daughter\r
+ if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 4) lIsNegPionForTPC = kTRUE;\r
+ if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kProton )) < 4) lIsNegProtonForTPC = kTRUE;\r
+ //Positive V0 daughter\r
+ if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 4) lIsPosPionForTPC = kTRUE;\r
+ if(TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 4) lIsPosProtonForTPC = kTRUE;\r
+\r
+ //---------------------------------\r
+ // - Extra info for QA (AOD)\r
+ // Miscellaneous pieces of info that may help regarding data quality assessment.\r
+ // Cascade transverse and total momentum \r
+ lXiMomX = xi->MomXiX();\r
+ lXiMomY = xi->MomXiY();\r
+ lXiMomZ = xi->MomXiZ();\r
+ lXiTransvMom = TMath::Sqrt( lXiMomX*lXiMomX + lXiMomY*lXiMomY );\r
+ lXiTotMom = TMath::Sqrt( lXiMomX*lXiMomX + lXiMomY*lXiMomY + lXiMomZ*lXiMomZ );\r
+ Double_t lV0MomX = xi->MomV0X();\r
+ Double_t lV0MomY = xi->MomV0Y();\r
+ Double_t lV0MomZ = xi->MomV0Z();\r
+ lV0TotMom = TMath::Sqrt(TMath::Power(lV0MomX,2)+TMath::Power(lV0MomY,2)+TMath::Power(lV0MomZ,2));\r
+ lBachMomX = xi->MomBachX();\r
+ lBachMomY = xi->MomBachY();\r
+ lBachMomZ = xi->MomBachZ(); \r
+ lBachTransvMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY );\r
+ lBachTotMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY + lBachMomZ*lBachMomZ );\r
+ lV0NMomX = xi->MomNegX();\r
+ lV0NMomY = xi->MomNegY();\r
+ lV0PMomX = xi->MomPosX();\r
+ lV0PMomY = xi->MomPosY();\r
+ lnTrackTransvMom = TMath::Sqrt( lV0NMomX*lV0NMomX + lV0NMomY*lV0NMomY );\r
+ lpTrackTransvMom = TMath::Sqrt( lV0PMomX*lV0PMomX + lV0PMomY*lV0PMomY );\r
+ lV0toXiCosineOfPointingAngle = xi->CosPointingAngle( xi->GetDecayVertexXi() );\r
+ lRapXi = xi->RapXi();\r
+ lRapOmega = xi->RapOmega();\r
+ lEta = xi->Eta(); // Will not work ! need a method Pz(), Py() Px() \r
+ lTheta = xi->Theta() *180.0/TMath::Pi(); // in AODcascade.\r
+ lPhi = xi->Phi() *180.0/TMath::Pi(); // Here, we will get eta, theta, phi for the V0 ...\r
+ lAlphaXi = xi->AlphaXi();\r
+ lPtArmXi = xi->PtArmXi();\r
+\r
+ } // end of AOD treatment\r
+\r
+ // Cut on pt of the three daughter tracks\r
+ if (lBachTransvMom<fMinPtCutOnDaughterTracks) continue;\r
+ if (lpTrackTransvMom<fMinPtCutOnDaughterTracks) continue;\r
+ if (lnTrackTransvMom<fMinPtCutOnDaughterTracks) continue;\r
+ \r
+ // Cut on pseudorapidity of the three daughter tracks\r
+ if (TMath::Abs(etaBach)>fEtaCutOnDaughterTracks) continue;\r
+ if (TMath::Abs(etaPos)>fEtaCutOnDaughterTracks) continue;\r
+ if (TMath::Abs(etaNeg)>fEtaCutOnDaughterTracks) continue;\r
+ \r
+ \r
+ //----------------------------------\r
+ // Calculate proper lenght for cascade\r
+ Double_t cascadeMass = 0.;\r
+ if ( ( (lChargeXi<0) && lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) ||\r
+ ( (lChargeXi>0) && lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) ) cascadeMass = 1.321;\r
+ if ( ( (lChargeXi<0) && lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) ||\r
+ ( (lChargeXi>0) && lIsBachelorKaonForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) ) cascadeMass = 1.672;\r
+ 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));\r
+ if (lXiTotMom!=0) lctau = lctau*cascadeMass/lXiTotMom;\r
+ else lctau = -1.;\r
+\r
+ //-------------------------------------------------\r
+ // Calculate proper lenght for Lambda (reconstructed)\r
+ Float_t lambdaMass = 1.115683; // PDG mass\r
+ 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));\r
+ Float_t lctauV0 = -1.;\r
+ if (lV0TotMom!=0) lctauV0 = distV0Xi*lambdaMass/lV0TotMom;\r
+ Float_t distTV0Xi = TMath::Sqrt(TMath::Power((lPosV0Xi[0]-lPosXi[0]),2)+TMath::Power((lPosV0Xi[1]-lPosXi[1]),2));\r
+\r
+ //--------------\r
+ /*// For AliEVE \r
+ if(lChargeXi < 0&& lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) {\r
+ if (lXiTransvMom>2.&&lXiTransvMom<4.&&(lInvMassXiMinus<1.322&&lInvMassXiMinus>1.320)&&(lXiRadius<8.&&lXiRadius>3.)) {\r
+ // FIXME : Just to know which file is currently open : locate the file containing Xi\r
+ cout << "Name of the file containing Xi candidate(s) :" \r
+ << CurrentFileName() \r
+ << " / entry: " << Entry()\r
+ << " / in file: " << lESDevent->GetEventNumberInFile() // <- Cvetan / From Mihaela: AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()->GetTree()->GetReadEntry();\r
+ << " AliESDcascade number " << iXi \r
+ << " : mass(Xi-) = " << lInvMassXiMinus\r
+ << " / charge = " << lChargeXi\r
+ << " / pt(Casc) = " << lXiTransvMom\r
+ << " / Decay 2d R(Xi) = " << lXiRadius \r
+ << endl;\r
+ }\r
+ }\r
+ if(lChargeXi < 0&& lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) {\r
+ if (lXiTransvMom>2&&lXiTransvMom<4&&(lInvMassOmegaMinus<1.674&&lInvMassOmegaMinus>1.670)&&(lXiRadius<8.&&lXiRadius>3.)) {\r
+ cout << "Name of the file containing Omega candidate(s) :"\r
+ << CurrentFileName()\r
+ << " / entry: " << Entry()\r
+ << " / in file: " << lESDevent->GetEventNumberInFile() // <- Cvetan / From Mihaela: AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()->GetTree()->GetReadEntry();\r
+ << " AliESDcascade number " << iXi \r
+ << " : mass(Omega-) = " << lInvMassOmegaMinus\r
+ << " / charge = " << lChargeXi\r
+ << " / pt(Casc) = " << lXiTransvMom\r
+ << " / Decay 2d R(Xi) = " << lXiRadius\r
+ << endl;\r
+\r
+ }\r
+ }*/\r
+ \r
+\r
+ // - \r
+ fHistPosV0TPCClusters->Fill( lPosTPCClusters );\r
+ fHistNegV0TPCClusters->Fill( lNegTPCClusters );\r
+ fHistBachTPCClusters->Fill( lBachTPCClusters );\r
+ f2dHistTPCdEdxOfCascDghters->Fill( lInnerWallMomCascDghters[0] , lTPCSignalCascDghters[0] );\r
+ f2dHistTPCdEdxOfCascDghters->Fill( lInnerWallMomCascDghters[1] , lTPCSignalCascDghters[1] );\r
+ f2dHistTPCdEdxOfCascDghters->Fill( lInnerWallMomCascDghters[2] , lTPCSignalCascDghters[2] );\r
+\r
+ //----------------\r
+ //Plot with PID on \r
+ if ( ( (lChargeXi<0) && lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) ||\r
+ ( (lChargeXi>0) && lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) ) {\r
+ // NOTE : \r
+ // with this condition, it could happen that a cascade candidate satisfies the wrong requirement,\r
+ // e.g. one looks at a Xi- candidate for which lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC = kFALSE\r
+ // Expectation: it should be excluded, but lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC = kTRUE\r
+ // then this bad Xi-candidate will contribute anyway (OR condition).\r
+ // Hence: the extra condition on the sign of the Cascade\r
+ //if (TMath::Abs( lInvMassXiMinus-1.3217 ) < 0.010 || TMath::Abs( lInvMassXiPlus-1.3217 ) < 0.010)\r
+ fHistEffMassXi->Fill( lEffMassXi );\r
+ fHistDcaXiDaughters->Fill( lDcaXiDaughters ); // Flag CascadeVtxer: Cut Variable e \r
+ fHistDcaBachToPrimVertex->Fill( lDcaBachToPrimVertexXi ); // Flag CascadeVtxer: Cut Variable d\r
+ fHistXiCosineOfPointingAngle->Fill( lXiCosineOfPointingAngle ); // Flag CascadeVtxer: Cut Variable f\r
+ fHistXiRadius->Fill( lXiRadius ); // Flag CascadeVtxer: Cut Variable g+h\r
+ fHistMassLambdaAsCascDghter->Fill( lInvMassLambdaAsCascDghter ); // Flag CascadeVtxer: Cut Variable c\r
+ fHistDcaV0DaughtersXi->Fill( lDcaV0DaughtersXi );\r
+ fHistV0CosineOfPointingAngleXi->Fill( lV0CosineOfPointingAngleXi ); \r
+ fHistV0RadiusXi->Fill( lV0RadiusXi );\r
+ fHistDcaV0ToPrimVertexXi->Fill( lDcaV0ToPrimVertexXi ); // Flag CascadeVtxer: Cut Variable b\r
+ fHistDcaPosToPrimVertexXi->Fill( lDcaPosToPrimVertexXi );\r
+ fHistDcaNegToPrimVertexXi->Fill( lDcaNegToPrimVertexXi );\r
+ fHistChargeXi->Fill( lChargeXi );\r
+ fHistV0toXiCosineOfPointingAngle->Fill( lV0toXiCosineOfPointingAngle );\r
+ if ( TMath::Abs( lInvMassXiMinus-1.3217 ) < 0.012 || TMath::Abs( lInvMassXiPlus-1.3217 ) < 0.012) { // One InvMass should be different from 0\r
+ fHistXiTransvMom->Fill( lXiTransvMom );\r
+ fHistXiTotMom->Fill( lXiTotMom );\r
+ fHistBachTransvMomXi->Fill( lBachTransvMom );\r
+ fHistBachTotMomXi->Fill( lBachTotMom );\r
+ fHistRapXi->Fill( lRapXi );\r
+ fHistEtaXi->Fill( lEta );\r
+ if (lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC) {\r
+ fHistEtaBachXi->Fill( etaBach );\r
+ fHistEtaPosXi->Fill( etaPos );\r
+ fHistEtaNegXi->Fill( etaNeg );\r
+ }\r
+ fHistThetaXi->Fill( lTheta );\r
+ fHistPhiXi->Fill( lPhi );\r
+ }\r
+ if ( TMath::Abs( lInvMassOmegaMinus-1.672 ) < 0.012 || TMath::Abs( lInvMassOmegaPlus-1.672 ) < 0.012 ) { // One InvMass should be different from 0\r
+ fHistRapOmega->Fill( lRapOmega ); \r
+ }\r
+ f2dHistArmenteros->Fill( lAlphaXi, lPtArmXi );\r
+ } // end with PID ...\r
+\r
+ //-----------------------\r
+ // - Invariant mass plots\r
+ //Plots 1D\r
+ if ( lChargeXi < 0 ) {\r
+ fHistMassXiMinus->Fill( lInvMassXiMinus );\r
+ fHistMassOmegaMinus->Fill( lInvMassOmegaMinus );\r
+ f2dHistDcaXiDaughtersvsInvMass->Fill(lDcaXiDaughters,lInvMassXiMinus);\r
+ f2dHistDcaBachToPrimVertexvsInvMass->Fill(lDcaBachToPrimVertexXi,lInvMassXiMinus); \r
+ f2dHistXiCosineOfPointingAnglevsInvMass->Fill(lXiCosineOfPointingAngle,lInvMassXiMinus);\r
+ f2dHistMassLambdaAsCascDghtervsInvMass->Fill(lInvMassLambdaAsCascDghter,lInvMassXiMinus);\r
+ f2dHistDcaV0DaughtersXivsInvMass->Fill(lDcaV0DaughtersXi,lInvMassXiMinus);\r
+ f2dHistDcaV0ToPrimVertexXivsInvMass->Fill(lDcaV0ToPrimVertexXi,lInvMassXiMinus);\r
+ }\r
+ if ( lChargeXi > 0 ) {\r
+ fHistMassXiPlus->Fill( lInvMassXiPlus );\r
+ fHistMassOmegaPlus->Fill( lInvMassOmegaPlus );\r
+ }\r
+ //Plots 2D, 3D\r
+ if ( lChargeXi < 0 ) {\r
+ f2dHistEffMassLambdaVsEffMassXiMinus->Fill( lInvMassLambdaAsCascDghter, lInvMassXiMinus ); \r
+ f2dHistEffMassXiVsEffMassOmegaMinus ->Fill( lInvMassXiMinus, lInvMassOmegaMinus );\r
+ f2dHistXiRadiusVsEffMassXiMinus ->Fill( lXiRadius, lInvMassXiMinus );\r
+ f2dHistXiRadiusVsEffMassOmegaMinus ->Fill( lXiRadius, lInvMassOmegaMinus );\r
+ } else {\r
+ f2dHistEffMassLambdaVsEffMassXiPlus ->Fill( lInvMassLambdaAsCascDghter, lInvMassXiPlus );\r
+ f2dHistEffMassXiVsEffMassOmegaPlus ->Fill( lInvMassXiPlus, lInvMassOmegaPlus );\r
+ f2dHistXiRadiusVsEffMassXiPlus ->Fill( lXiRadius, lInvMassXiPlus);\r
+ f2dHistXiRadiusVsEffMassOmegaPlus ->Fill( lXiRadius, lInvMassOmegaPlus );\r
+ }\r
+\r
+ //--------------------------------------------- \r
+ // - Filling the AliCFContainers related to PID\r
+ Double_t lContainerPIDVars[3] = {0.0};\r
+ // Xi Minus \r
+ if ( lChargeXi < 0 ) {\r
+ lContainerPIDVars[0] = lXiTransvMom;\r
+ lContainerPIDVars[1] = lInvMassXiMinus;\r
+ lContainerPIDVars[2] = lRapXi;\r
+ //No PID\r
+ fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 0); // No PID\r
+ //TPC PID\r
+ if ( lIsBachelorPionForTPC ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track \r
+ if ( lIsBachelorPionForTPC && lIsPosProtonForTPC ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks\r
+ if ( lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks\r
+ //Combined PID\r
+ if ( lIsBachelorPion ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor \r
+ if ( lIsBachelorPion && lIsPosInXiProton ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon\r
+ if (lIsBachelorPion && lIsPosInXiProton && lIsNegInXiPion ) fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson\r
+ }\r
+ lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.; \r
+ // Xi Plus \r
+ if ( lChargeXi > 0 ) {\r
+ lContainerPIDVars[0] = lXiTransvMom;\r
+ lContainerPIDVars[1] = lInvMassXiPlus;\r
+ lContainerPIDVars[2] = lRapXi;\r
+ //No PID\r
+ fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 0); // No PID\r
+ //TPC PID\r
+ if ( lIsBachelorPionForTPC ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track\r
+ if ( lIsBachelorPionForTPC && lIsNegProtonForTPC ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks\r
+ if ( lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks\r
+ //Combined PID\r
+ if ( lIsBachelorPion ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor\r
+ if ( lIsBachelorPion && lIsNegInXiProton ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon\r
+ if (lIsBachelorPion && lIsNegInXiProton && lIsPosInXiPion ) fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson\r
+ }\r
+ lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.; \r
+ // Omega Minus \r
+ if ( lChargeXi < 0 ) {\r
+ lContainerPIDVars[0] = lXiTransvMom;\r
+ lContainerPIDVars[1] = lInvMassOmegaMinus;\r
+ lContainerPIDVars[2] = lRapOmega;\r
+ //No PID\r
+ fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 0); // No PID\r
+ //TPC PID\r
+ if ( lIsBachelorKaonForTPC ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track\r
+ if ( lIsBachelorKaonForTPC && lIsPosProtonForTPC ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks\r
+ if ( lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks\r
+ //Combined PID\r
+ if ( lIsBachelorKaon ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor\r
+ if ( lIsBachelorKaon && lIsPosInOmegaProton ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon\r
+ if (lIsBachelorKaon && lIsPosInOmegaProton && lIsNegInOmegaPion ) fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson\r
+ }\r
+ lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.;\r
+ // Omega Plus \r
+ if ( lChargeXi > 0 ) {\r
+ lContainerPIDVars[0] = lXiTransvMom;\r
+ lContainerPIDVars[1] = lInvMassOmegaPlus;\r
+ lContainerPIDVars[2] = lRapOmega;\r
+ // No PID\r
+ fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 0); // No PID\r
+ // TPC PID\r
+ if ( lIsBachelorKaonForTPC )\r
+ fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track\r
+ if( lIsBachelorKaonForTPC && \r
+ lIsNegProtonForTPC )\r
+ fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks\r
+ if ( lIsBachelorKaonForTPC && \r
+ lIsNegProtonForTPC && \r
+ lIsPosPionForTPC )\r
+ fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks\r
+ // Combined PID\r
+ if ( lIsBachelorKaon )\r
+ fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor\r
+ if ( lIsBachelorKaon && \r
+ lIsNegInOmegaProton )\r
+ fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon\r
+ if (lIsBachelorKaon && \r
+ lIsNegInOmegaProton && \r
+ lIsPosInOmegaPion )\r
+ fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson\r
+ }\r
+ \r
+ //--------------------------------------------------------------------\r
+ // Filling the AliCFContainer (optimisation of topological selections)\r
+ Double_t lContainerCutVars[19] = {0.0};\r
+ \r
+ lContainerCutVars[0] = lDcaXiDaughters;\r
+ lContainerCutVars[1] = lDcaBachToPrimVertexXi;\r
+ lContainerCutVars[2] = lXiCosineOfPointingAngle;\r
+ lContainerCutVars[3] = lXiRadius;\r
+ lContainerCutVars[4] = lInvMassLambdaAsCascDghter;\r
+ lContainerCutVars[5] = lDcaV0DaughtersXi;\r
+ lContainerCutVars[6] = lV0toXiCosineOfPointingAngle;\r
+ lContainerCutVars[7] = lV0RadiusXi;\r
+ lContainerCutVars[8] = lDcaV0ToPrimVertexXi; \r
+ lContainerCutVars[9] = lDcaPosToPrimVertexXi;\r
+ lContainerCutVars[10] = lDcaNegToPrimVertexXi;\r
+ lContainerCutVars[13] = lXiTransvMom;\r
+ lContainerCutVars[16] = lctau;\r
+ lContainerCutVars[17] = lctauV0;\r
+ lContainerCutVars[18] = distTV0Xi;\r
+ \r
+ if ( lChargeXi < 0 ) {\r
+ lContainerCutVars[11] = lInvMassXiMinus;\r
+ lContainerCutVars[12] = lInvMassOmegaMinus;\r
+ lContainerCutVars[14] = lRapXi;\r
+ lContainerCutVars[15] = -1.;\r
+ if (lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC) fCFContCascadeCuts->Fill(lContainerCutVars,0); // for Xi-\r
+ lContainerCutVars[11] = lInvMassXiMinus;\r
+ lContainerCutVars[12] = lInvMassOmegaMinus;\r
+ lContainerCutVars[14] = -1.;\r
+ lContainerCutVars[15] = lRapOmega;\r
+ if (lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC) fCFContCascadeCuts->Fill(lContainerCutVars,2); // for Omega-\r
+ } else {\r
+ lContainerCutVars[11] = lInvMassXiPlus;\r
+ lContainerCutVars[12] = lInvMassOmegaPlus; \r
+ lContainerCutVars[14] = lRapXi;\r
+ lContainerCutVars[15] = -1.; \r
+ if (lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC) fCFContCascadeCuts->Fill(lContainerCutVars,1); // for Xi+\r
+ lContainerCutVars[11] = lInvMassXiPlus;\r
+ lContainerCutVars[12] = lInvMassOmegaPlus;\r
+ lContainerCutVars[14] = -1.;\r
+ lContainerCutVars[15] = lRapOmega;\r
+ if (lIsBachelorKaonForTPC && lIsNegProtonForTPC && lIsPosPionForTPC) fCFContCascadeCuts->Fill(lContainerCutVars,3); // for Omega+ \r
+ } \r
+ } //end of the Cascade loop (ESD or AOD)\r
+ \r
+ // Post output data.\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDXiMinus);\r
+ PostData(3, fCFContCascadePIDXiPlus);\r
+ PostData(4, fCFContCascadePIDOmegaMinus);\r
+ PostData(5, fCFContCascadePIDOmegaPlus);\r
+ PostData(6, fCFContCascadeCuts);\r
+}\r
+\r
+//________________________________________________________________________\r
+Int_t AliAnalysisTaskCheckCascadepp276::DoESDTrackWithTPCrefitMultiplicity(const AliESDEvent *lESDevent) {\r
+ // Checking the number of tracks with TPCrefit for each event\r
+ // Needed for a rough assessment of the event multiplicity\r
+ \r
+ Int_t nTrackWithTPCrefitMultiplicity = 0;\r
+ for (Int_t iTrackIdx = 0; iTrackIdx < (InputEvent())->GetNumberOfTracks(); iTrackIdx++) {\r
+ AliESDtrack *esdTrack = 0x0;\r
+ esdTrack = lESDevent->GetTrack( iTrackIdx );\r
+ if (!esdTrack) { AliWarning("Pb / Could not retrieve one track within the track loop for TPCrefit check ..."); continue; }\r
+\r
+ ULong_t lTrackStatus = esdTrack->GetStatus();\r
+ if ((lTrackStatus&AliESDtrack::kTPCrefit) == 0) continue;\r
+ else nTrackWithTPCrefitMultiplicity++;\r
+ // FIXME :\r
+ // The goal here is to get a better assessment of the event multiplicity.\r
+ // (InputEvent())->GetNumberOfTracks() takes into account ITS std alone tracks + global tracks\r
+ // This may introduce a bias. Hence the number of TPC refit tracks.\r
+ // Note : the event multiplicity = analysis on its own... See Jacek's or Jan Fiete's analysis on dN/d(eta)\r
+\r
+ } // end loop over all event tracks\r
+ return nTrackWithTPCrefitMultiplicity;\r
+}\r
+\r
+\r
+//________________________________________________________________________\r
+void AliAnalysisTaskCheckCascadepp276::Terminate(Option_t *) \r
+{\r
+ // Draw result to the screen\r
+ // Called once at the end of the query\r
+\r
+/* TList *cRetrievedList = 0x0;\r
+ cRetrievedList = (TList*)GetOutputData(1);\r
+ if(!cRetrievedList){\r
+ AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: ouput data container list not available\n"); return;\r
+ }\r
+ fHistTrackMultiplicity = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistTrackMultiplicity") );\r
+ if (!fHistTrackMultiplicity) {\r
+ AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: fHistTrackMultiplicity not available\n"); return;\r
+ }\r
+ fHistMassXiMinus = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistMassXiMinus") ); \r
+ if (!fHistMassXiMinus) {\r
+ AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: fHistMassXiMinus not available\n"); return;\r
+ }\r
+ fHistMassXiPlus = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistMassXiPlus") );\r
+ if (!fHistMassXiPlus) {\r
+ AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: fHistMassXiPlus not available\n"); return;\r
+ } \r
+ fHistMassOmegaMinus = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistMassOmegaMinus") );\r
+ if (!fHistMassOmegaMinus) {\r
+ AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: fHistMassOmegaMinus not available\n"); return;\r
+ }\r
+ fHistMassOmegaPlus = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistMassOmegaPlus") ); \r
+ if (!fHistMassOmegaPlus) {\r
+ AliWarning("ERROR - AliAnalysisTaskCheckCascadepp276: fHistMassOmegaPlus not available\n"); return;\r
+ }\r
+ \r
+ TCanvas *canCheckCascade = new TCanvas("AliAnalysisTaskCheckCascadep276","CheckCascade overview",10,10,1010,660);\r
+ canCheckCascade->Divide(2,2);\r
+ \r
+ canCheckCascade->cd(1);\r
+ canCheckCascade->cd(1)->SetLogy();\r
+ fHistTrackMultiplicity->SetMarkerStyle(kFullStar); \r
+ fHistTrackMultiplicity->GetXaxis()->SetLabelFont(42);\r
+ fHistTrackMultiplicity->GetYaxis()->SetLabelFont(42);\r
+ fHistTrackMultiplicity->SetTitleFont(42, "xy");\r
+ fHistTrackMultiplicity->GetXaxis()->SetTitleOffset(1.1);\r
+ fHistTrackMultiplicity->DrawCopy("H");\r
+ \r
+ canCheckCascade->cd(2); \r
+ fHistMassXiMinus ->SetMarkerStyle(kFullCircle);\r
+ fHistMassXiMinus ->SetMarkerSize(0.5);\r
+ fHistMassXiMinus ->GetXaxis()->SetLabelFont(42);\r
+ fHistMassXiMinus ->GetYaxis()->SetLabelFont(42);\r
+ fHistMassXiMinus ->SetTitleFont(42, "xy");\r
+ fHistMassXiMinus ->GetXaxis()->SetTitleOffset(1.1);\r
+ fHistMassXiMinus ->GetYaxis()->SetTitleOffset(1.3);\r
+ //fHistMassXiMinus->Rebin(2);\r
+ fHistMassXiMinus ->GetXaxis()->SetRangeUser(1.24, 1.42);\r
+ fHistMassXiMinus ->DrawCopy("E");\r
+ \r
+ fHistMassXiPlus ->SetMarkerStyle(kOpenCircle);\r
+ fHistMassXiPlus ->SetMarkerColor(kRed+2);\r
+ fHistMassXiPlus ->SetLineColor(kRed+2);\r
+ fHistMassXiPlus ->SetMarkerSize(0.5);\r
+ //fHistMassXiPlus ->Rebin(2);\r
+ fHistMassXiPlus ->DrawCopy("ESAME");\r
+ \r
+ \r
+ TLegend *legendXi =new TLegend(0.67,0.34,0.97,0.54);\r
+ legendXi->SetTextFont(42);\r
+ legendXi->SetTextSize(0.05);\r
+ legendXi->SetFillColor(kWhite);\r
+ legendXi->AddEntry( fHistMassXiMinus,"#Xi^{-} candidates","lp");\r
+ legendXi->AddEntry( fHistMassXiPlus,"#Xi^{+} candidates","lp");\r
+ legendXi->Draw();\r
+ \r
+ \r
+ canCheckCascade->cd(3); \r
+ fHistMassOmegaPlus ->SetMarkerStyle(kOpenCircle);\r
+ fHistMassOmegaPlus ->SetMarkerColor(kRed+2);\r
+ fHistMassOmegaPlus ->SetLineColor(kRed+2);\r
+ fHistMassOmegaPlus ->SetMarkerSize(0.5);\r
+ fHistMassOmegaPlus ->GetXaxis()->SetLabelFont(42);\r
+ fHistMassOmegaPlus ->GetYaxis()->SetLabelFont(42);\r
+ fHistMassOmegaPlus ->SetTitleFont(42, "xy");\r
+ fHistMassOmegaPlus ->GetXaxis()->SetTitleOffset(1.1);\r
+ fHistMassOmegaPlus ->GetYaxis()->SetTitleOffset(1.25);\r
+ //fHistMassOmegaPlus ->Rebin(2);\r
+ fHistMassOmegaPlus ->GetXaxis()->SetRangeUser(1.6, 1.84);\r
+ fHistMassOmegaPlus ->DrawCopy("E");\r
+ \r
+ fHistMassOmegaMinus->SetMarkerStyle(kFullCircle);\r
+ fHistMassOmegaMinus->SetMarkerSize(0.5);\r
+ //fHistMassOmegaMinus->Rebin(2);\r
+ fHistMassOmegaMinus->DrawCopy("ESAME");\r
+\r
+ \r
+ TLegend *legendOmega = new TLegend(0.67,0.34,0.97,0.54);\r
+ legendOmega->SetTextFont(42);\r
+ legendOmega->SetTextSize(0.05);\r
+ legendOmega->SetFillColor(kWhite);\r
+ legendOmega->AddEntry( fHistMassOmegaMinus,"#Omega^{-} candidates","lp");\r
+ legendOmega->AddEntry( fHistMassOmegaPlus,"#Omega^{+} candidates","lp");\r
+ legendOmega->Draw();\r
+ */\r
+}\r
-/*************************************************************** *
- * Authors : Antonin Maire, Boris Hippolyte
- * Contributors are mentioned in the code where appropriate. *
- * *
- * Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
- * without fee, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission notice *
- * appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpose. It is *
- * provided "as is" without express or implied warranty. *
- **************************************************************************/
-
-//-----------------------------------------------------------------
-// AliAnalysisTaskCheckPerformanceCascadePbPb class
-// This task is for a performance study of cascade identification in PbPb.
-// It works with MC info and ESD/AOD.
-// Origin : AliAnalysisTaskCheckPerformanceCascade class by A. Maire Nov2010, antonin.maire@ires.in2p3.fr
-// Modified for PbPb analysis: M. Nicassio Feb2011, maria.nicassio@ba.infn.it:
-// - physics selection moved to the run.C macro
-// - added centrality selection and possibility to select events in nTracks ranges
-// - added new histograms
-// - modified binning of some histograms and containers
-// - flag to enable CF container usage
-// - check in the destructor for CAF usage
-// - flag for acceptance cut in the MC part
-// - in the MC particle selection IsPhysicalPrimary added and number of particles taken as appropriate for HIJING
-// (however for cascades one gets the same if runs on Nprimaries in the stack and does not check IsPhysicalPrimary)
-// - automatic settings for PID
-// - selection of injected cascades and HIJING cascades (kind of "bug" in method IsFromBGEvent())
-// - added proper time histograms for cascades and lambdas
-// - cos of PA V0 wrt Xi vertex and not primary vertex
-// - distance xi-V0 added in the container
-// - AOD analysis developed (January 2012)
-//
-//
-//
-// Adapted to pp 2.76 analysis: D. Colella, domenico.colella@ba.infn.it (Nov. 2012):
-// - added new and removed other histograms
-// - Physics selection moved here (mainly for normalization in the efficiency calcuation)
-// - Centrality selection deleted
-// - 3DHisto denominator moved before any event selection for Normalization
-// - injected and natural part of MC selection removed
-//
-//
-//
-//-----------------------------------------------------------------
-
-
-#include <Riostream.h>
-
-#include "TList.h"
-#include "TFile.h"
-#include "TH1F.h"
-#include "TH2F.h"
-#include "TH3F.h"
-#include "TVector3.h"
-#include "TCanvas.h"
-#include "TParticle.h"
-#include "TMath.h"
-
-#include "AliLog.h"
-#include "AliHeader.h"
-#include "AliMCEvent.h"
-#include "AliStack.h"
-#include "AliMultiplicity.h"
-#include "AliInputEventHandler.h"
-#include "AliAnalysisManager.h"
-
-#include "AliCFContainer.h"
-
-#include "AliESDVZERO.h"
-
-#include "AliGenEventHeader.h"
-#include "AliGenCocktailEventHeader.h"
-#include "AliGenHijingEventHeader.h"
-#include "AliESDtrackCuts.h"
-#include "AliPIDResponse.h"
-//#include "AliV0vertexer.h"
-//#include "AliCascadeVertexer.h"
-#include "AliESDEvent.h"
-#include "AliESDcascade.h"
-#include "AliAODEvent.h"
-#include "AliAODMCParticle.h"
-#include "AliAnalysisTaskCheckPerformanceCascadepp276.h"
-
-using std::cout;
-using std::endl;
-
-ClassImp(AliAnalysisTaskCheckPerformanceCascadepp276)
-
-
-
-//________________________________________________________________________________________
-AliAnalysisTaskCheckPerformanceCascadepp276::AliAnalysisTaskCheckPerformanceCascadepp276()
-: AliAnalysisTaskSE(), // <- take care to AliAnalysisTask( empty )
- fAnalysisType ("ESD"),
- fESDtrackCuts (0),
- fPIDResponse (0),
- fkRerunV0CascVertexers (0),
- fkSDDselectionOn (kTRUE),
- fkQualityCutZprimVtxPos (kTRUE),
- fkRejectEventPileUp (kTRUE),
- fkQualityCutNoTPConlyPrimVtx (kTRUE),
- fkQualityCutTPCrefit (kTRUE),
- fkQualityCutnTPCcls (kTRUE),
- fwithSDD (kTRUE),
- fMinnTPCcls (0),
- fkExtraSelections (0),
- fVtxRange (0),
- fVtxRangeMin (0),
- fApplyAccCut (0),
- fMinPtCutOnDaughterTracks (0),
- fEtaCutOnDaughterTracks (0),
-
- // - Plots initialisation
- fListHistCascade(0),
-
- // - General Plots
- // Cascade multiplicity plots
- fHistCascadeMultiplicityBeforeAnySel(0),
- fHistCascadeMultiplicityAfterSDDSel(0),
- fHistCascadeMultiplicityAfterPhysicsSel(0),
- fHistCascadeMultiplicityForSelEvtNoTPCOnly(0),
- fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup(0),
- fHistCascadeMultiplicityAfterVertexCutSel(0),
- fHistnXiPlusPerEvTot(0), // After any event selections, in all the eta and pt range
- fHistnXiMinusPerEvTot(0), // After any event selections, in all the eta and pt range
- fHistnOmegaPlusPerEvTot(0), // After any event selections, in all the eta and pt range
- fHistnOmegaMinusPerEvTot(0), // After any event selections, in all the eta and pt range
- fHistnXiPlusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum
- fHistnXiMinusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum
- fHistnOmegaPlusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum
- fHistnOmegaMinusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum
- fHistnAssoXiMinus(0), // For the Reconstructed-Associated cascades
- fHistnAssoXiPlus(0), // For the Reconstructed-Associated cascades
- fHistnAssoOmegaMinus(0), // For the Reconstructed-Associated cascades
- fHistnAssoOmegaPlus(0), // For the Reconstructed-Associated cascades
- // Tracks multiplicity plots
- fHistTrackMultiplicityBeforeAnySel(0),
- fHistTrackMultiplicityAfterSDDSel(0),
- fHistTrackMultiplicityAfterPhysicsSel(0),
- fHistTrackMultiplicityForSelEvtNoTPCOnly(0),
- fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup(0),
- fHistTrackMultiplicityAfterVertexCutSel(0),
- // Vertex position plots (BestVertex)
- fHistPVx(0), // After any selections but before |Z| < 10 cm
- fHistPVy(0), // After any selections but before |Z| < 10 cm
- fHistPVz(0), // After any selections but before |Z| < 10 cm
- fHistPVxAnalysis(0), // After any event selections
- fHistPVyAnalysis(0), // After any event selections
- fHistPVzAnalysis(0), // After any event selections
- // - Plots before Physics Selection
- f3dHistGenPtVsGenYvsNtracksXiMinus(0), // After the SDD event selection (For efficinecy calculation)
- f3dHistGenPtVsGenctauvsYXiMinus(0), // After the SDD event selection (For efficinecy calculation)
- f3dHistGenPtVsGenYvsNtracksXiPlus(0), // After the SDD event selection (For efficinecy calculation)
- f3dHistGenPtVsGenctauvsYXiPlus(0), // After the SDD event selection (For efficinecy calculation)
- f3dHistGenPtVsGenYvsNtracksOmegaMinus(0), // After the SDD event selection (For efficinecy calculation)
- f3dHistGenPtVsGenctauvsYOmegaMinus(0), // After the SDD event selection (For efficinecy calculation)
- f3dHistGenPtVsGenYvsNtracksOmegaPlus(0), // After the SDD event selection (For efficinecy calculation)
- f3dHistGenPtVsGenctauvsYOmegaPlus(0), // After the SDD event selection (For efficinecy calculation)
- // - Generated cascade plots
- // After all the event selections
- //Xi-
- fHistEtaGenCascXiMinus(0), // In all the eta and pt range (as they are generated)
- fHistThetaGenCascXiMinus(0), // In all the eta and pt range (as they are generated)
- f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff(0), //
- f3dHistGenPtVsGenctauvsYXiMinusPhysEff(0), //
- f2dHistGenPtVsGenYFdblXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaLambdaXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaBachXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaMesDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaBarDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtBachXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtMesDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtBarDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- //Xi+
- fHistEtaGenCascXiPlus(0), // In all the eta and pt range (as they are generated)
- fHistThetaGenCascXiPlus(0), // In all the eta and pt range (as they are generated)
- f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff(0), //
- f3dHistGenPtVsGenctauvsYXiPlusPhysEff(0), //
- f2dHistGenPtVsGenYFdblXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaLambdaXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaBachXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaMesDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaBarDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtBachXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtMesDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtBarDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- //Omega-
- fHistEtaGenCascOmegaMinus(0), // In all the eta and pt range (as they are generated)
- fHistThetaGenCascOmegaMinus(0), // In all the eta and pt range (as they are generated)
- f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff(0), //
- f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff(0), //
- f2dHistGenPtVsGenYFdblOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaLambdaOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaBachOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaMesDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaBarDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtBachOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtMesDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtBarDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- //Omega+
- fHistEtaGenCascOmegaPlus(0), // In all the eta and pt range (as they are generated)
- fHistThetaGenCascOmegaPlus(0), // In all the eta and pt range (as they are generated)
- f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff(0), //
- f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff(0), //
- f2dHistGenPtVsGenYFdblOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaLambdaOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaBachOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaMesDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaBarDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtBachOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtMesDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtBarDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
-
- // - Associated to MC cascade plots
- fHistMassXiMinus(0), // For the Reconstructed-Associated cascades
- fHistMassXiPlus(0), // For the Reconstructed-Associated cascades
- fHistMassOmegaMinus(0), // For the Reconstructed-Associated cascades
- fHistMassOmegaPlus(0), // For the Reconstructed-Associated cascades
- // Effective mass histos with combined PID
- fHistMassWithCombPIDXiMinus(0),
- fHistMassWithCombPIDXiPlus(0),
- fHistMassWithCombPIDOmegaMinus(0),
- fHistMassWithCombPIDOmegaPlus(0),
- // PID Probability versus MC Pt(bachelor track)
- f2dHistPIDprobaKaonVsMCPtBach(0), f2dHistPIDprobaPionVsMCPtBach(0),
- // Effective mass histos with perfect MC PID on the bachelor
- fHistMassWithMcPIDXiMinus(0), fHistMassWithMcPIDXiPlus(0),
- fHistMassWithMcPIDOmegaMinus(0), fHistMassWithMcPIDOmegaPlus(0),
- // Effective mass histos for the cascade candidates associated with MC
- fHistAsMCMassXiMinus(0),
- fHistAsMCMassXiPlus(0),
- fHistAsMCMassOmegaMinus(0),
- fHistAsMCMassOmegaPlus(0),
- // Generated Pt Vs generated y, for the cascade candidates associated with MC + Info Comb. PID
- f2dHistAsMCandCombPIDGenPtVsGenYXiMinus(0),
- f2dHistAsMCandCombPIDGenPtVsGenYXiPlus(0),
- f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus(0),
- f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus(0),
- // Generated Pt Vs generated y, for the cascade candidates associated with MC
- f2dHistAsMCGenPtVsGenYXiMinus(0),
- f2dHistAsMCGenPtVsGenYXiPlus(0),
- f2dHistAsMCGenPtVsGenYOmegaMinus(0),
- f2dHistAsMCGenPtVsGenYOmegaPlus(0),
- // Generated Eta of the the cascade candidates associated with MC
- fHistAsMCGenEtaXiMinus(0),
- fHistAsMCGenEtaXiPlus(0),
- fHistAsMCGenEtaOmegaMinus(0),
- fHistAsMCGenEtaOmegaPlus(0),
- // Resolution in Pt as function of generated Pt
- f2dHistAsMCResPtXiMinus(0),
- f2dHistAsMCResPtXiPlus(0),
- f2dHistAsMCResPtOmegaMinus(0),
- f2dHistAsMCResPtOmegaPlus(0),
- // Resolution in R(2D) as function of generated R
- f2dHistAsMCResRXiMinus(0),
- f2dHistAsMCResRXiPlus(0),
- f2dHistAsMCResROmegaMinus(0),
- f2dHistAsMCResROmegaPlus(0),
- // Resolution in phi as function of generated Pt
- f2dHistAsMCResPhiXiMinus(0),
- f2dHistAsMCResPhiXiPlus(0),
- f2dHistAsMCResPhiOmegaMinus(0),
- f2dHistAsMCResPhiOmegaPlus(0),
- // Correlation between proton (antiproton) daughter MC pt and Xi/Omega MC pt (to apply Geat/Fluka correction)
- f2dHistAsMCptProtonMCptXiMinus(0),
- f2dHistAsMCptAntiprotonMCptXiPlus(0),
- f2dHistAsMCptProtonMCptOmegaMinus(0),
- f2dHistAsMCptAntiprotonMCptOmegaPlus(0),
- // QA plots
- fHistV0toXiCosineOfPointingAngle(0),
- fHistV0CosineOfPointingAnglevsPtXi(0),
- fHistV0CosineOfPointingAnglevsPtOmega(0),
-
- // Containers
- fCFContCascadePIDAsXiMinus(0),
- fCFContCascadePIDAsXiPlus(0),
- fCFContCascadePIDAsOmegaMinus(0),
- fCFContCascadePIDAsOmegaPlus(0),
- fCFContAsCascadeCuts(0)
-
- //____Dummy costructor____
- {
- for(Int_t iV0selIdx = 0; iV0selIdx < 7; iV0selIdx++ ) { fV0Sels [iV0selIdx ] = -1.; }
- for(Int_t iCascSelIdx = 0; iCascSelIdx < 8; iCascSelIdx++ ) { fCascSels [iCascSelIdx ] = -1.; }
- }
-
-
-
-//_____Non-default Constructor________________________________________________________________
-AliAnalysisTaskCheckPerformanceCascadepp276::AliAnalysisTaskCheckPerformanceCascadepp276(const char *name)
- : AliAnalysisTaskSE(name),
- fAnalysisType ("ESD"),
- fESDtrackCuts (0),
- fPIDResponse (0),
- fkRerunV0CascVertexers (0),
- fkSDDselectionOn (kTRUE),
- fkQualityCutZprimVtxPos (kTRUE),
- fkRejectEventPileUp (kTRUE),
- fkQualityCutNoTPConlyPrimVtx (kTRUE),
- fkQualityCutTPCrefit (kTRUE),
- fkQualityCutnTPCcls (kTRUE),
- fwithSDD (kTRUE),
- fMinnTPCcls (0),
- fkExtraSelections (0),
- fVtxRange (0),
- fVtxRangeMin (0),
- fApplyAccCut (0),
- fMinPtCutOnDaughterTracks (0),
- fEtaCutOnDaughterTracks (0),
-
- // - Plots initialisation
- fListHistCascade(0),
-
- // - General Plots
- // Cascade multiplicity plots
- fHistCascadeMultiplicityBeforeAnySel(0),
- fHistCascadeMultiplicityAfterSDDSel(0),
- fHistCascadeMultiplicityAfterPhysicsSel(0),
- fHistCascadeMultiplicityForSelEvtNoTPCOnly(0),
- fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup(0),
- fHistCascadeMultiplicityAfterVertexCutSel(0),
- fHistnXiPlusPerEvTot(0), // After any event selections, in all the eta and pt range
- fHistnXiMinusPerEvTot(0), // After any event selections, in all the eta and pt range
- fHistnOmegaPlusPerEvTot(0), // After any event selections, in all the eta and pt range
- fHistnOmegaMinusPerEvTot(0), // After any event selections, in all the eta and pt range
- fHistnXiPlusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum
- fHistnXiMinusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum
- fHistnOmegaPlusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum
- fHistnOmegaMinusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum
- fHistnAssoXiMinus(0), // For the Reconstructed-Associated cascades
- fHistnAssoXiPlus(0), // For the Reconstructed-Associated cascades
- fHistnAssoOmegaMinus(0), // For the Reconstructed-Associated cascades
- fHistnAssoOmegaPlus(0), // For the Reconstructed-Associated cascades
- // Tracks multiplicity plots
- fHistTrackMultiplicityBeforeAnySel(0),
- fHistTrackMultiplicityAfterSDDSel(0),
- fHistTrackMultiplicityAfterPhysicsSel(0),
- fHistTrackMultiplicityForSelEvtNoTPCOnly(0),
- fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup(0),
- fHistTrackMultiplicityAfterVertexCutSel(0),
- // Vertex position plots (BestVertex)
- fHistPVx(0), // After any selections but before |Z| < 10 cm
- fHistPVy(0), // After any selections but before |Z| < 10 cm
- fHistPVz(0), // After any selections but before |Z| < 10 cm
- fHistPVxAnalysis(0), // After any event selections
- fHistPVyAnalysis(0), // After any event selections
- fHistPVzAnalysis(0), // After any event selections
- // - Plots before Physics Selection
- f3dHistGenPtVsGenYvsNtracksXiMinus(0), // After the SDD event selection (For efficiency calculation)
- f3dHistGenPtVsGenctauvsYXiMinus(0), // After the SDD event selection (For efficiency calculation)
- f3dHistGenPtVsGenYvsNtracksXiPlus(0), // After the SDD event selection (For efficiency calculation)
- f3dHistGenPtVsGenctauvsYXiPlus(0), // After the SDD event selection (For efficiency calculation)
- f3dHistGenPtVsGenYvsNtracksOmegaMinus(0), // After the SDD event selection (For efficiency calculation)
- f3dHistGenPtVsGenctauvsYOmegaMinus(0), // After the SDD event selection (For efficiency calculation)
- f3dHistGenPtVsGenYvsNtracksOmegaPlus(0), // After the SDD event selection (For efficiency calculation)
- f3dHistGenPtVsGenctauvsYOmegaPlus(0), // After the SDD event selection (For efficiency calculation)
- // - Generated cascade plots
- // After all the event selections
- //Xi-
- fHistEtaGenCascXiMinus(0), // In all the eta and pt range (as they are generated)
- fHistThetaGenCascXiMinus(0), // In all the eta and pt range (as they are generated)
- f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff(0), //
- f3dHistGenPtVsGenctauvsYXiMinusPhysEff(0), //
- f2dHistGenPtVsGenYFdblXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaLambdaXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaBachXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaMesDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaBarDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtBachXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtMesDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtBarDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- //Xi+
- fHistEtaGenCascXiPlus(0), // In all the eta and pt range (as they are generated)
- fHistThetaGenCascXiPlus(0), // In all the eta and pt range (as they are generated)
- f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff(0), //
- f3dHistGenPtVsGenctauvsYXiPlusPhysEff(0), //
- f2dHistGenPtVsGenYFdblXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaLambdaXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaBachXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaMesDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaBarDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtBachXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtMesDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtBarDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- //Omega-
- fHistEtaGenCascOmegaMinus(0), // In all the eta and pt range (as they are generated)
- fHistThetaGenCascOmegaMinus(0), // In all the eta and pt range (as they are generated)
- f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff(0), //
- f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff(0), //
- f2dHistGenPtVsGenYFdblOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaLambdaOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaBachOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaMesDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaBarDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtBachOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtMesDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtBarDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- //Omega+
- fHistEtaGenCascOmegaPlus(0), // In all the eta and pt range (as they are generated)
- fHistThetaGenCascOmegaPlus(0), // In all the eta and pt range (as they are generated)
- f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff(0), //
- f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff(0), //
- f2dHistGenPtVsGenYFdblOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaLambdaOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaBachOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaMesDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistThetaBarDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtBachOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtMesDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
- fHistPtBarDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)
-
- // - Associated to MC cascade plots
- fHistMassXiMinus(0), // For the Reconstructed-Associated cascades
- fHistMassXiPlus(0), // For the Reconstructed-Associated cascades
- fHistMassOmegaMinus(0), // For the Reconstructed-Associated cascades
- fHistMassOmegaPlus(0), // For the Reconstructed-Associated cascades
- // Effective mass histos with combined PID
- fHistMassWithCombPIDXiMinus(0),
- fHistMassWithCombPIDXiPlus(0),
- fHistMassWithCombPIDOmegaMinus(0),
- fHistMassWithCombPIDOmegaPlus(0),
- // PID Probability versus MC Pt(bachelor track)
- f2dHistPIDprobaKaonVsMCPtBach(0), f2dHistPIDprobaPionVsMCPtBach(0),
- // Effective mass histos with perfect MC PID on the bachelor
- fHistMassWithMcPIDXiMinus(0), fHistMassWithMcPIDXiPlus(0),
- fHistMassWithMcPIDOmegaMinus(0), fHistMassWithMcPIDOmegaPlus(0),
- // Effective mass histos for the cascade candidates associated with MC
- fHistAsMCMassXiMinus(0),
- fHistAsMCMassXiPlus(0),
- fHistAsMCMassOmegaMinus(0),
- fHistAsMCMassOmegaPlus(0),
- // Generated Pt Vs generated y, for the cascade candidates associated with MC + Info Comb. PID
- f2dHistAsMCandCombPIDGenPtVsGenYXiMinus(0),
- f2dHistAsMCandCombPIDGenPtVsGenYXiPlus(0),
- f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus(0),
- f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus(0),
- // Generated Pt Vs generated y, for the cascade candidates associated with MC
- f2dHistAsMCGenPtVsGenYXiMinus(0),
- f2dHistAsMCGenPtVsGenYXiPlus(0),
- f2dHistAsMCGenPtVsGenYOmegaMinus(0),
- f2dHistAsMCGenPtVsGenYOmegaPlus(0),
- // Generated Eta of the the cascade candidates associated with MC
- fHistAsMCGenEtaXiMinus(0),
- fHistAsMCGenEtaXiPlus(0),
- fHistAsMCGenEtaOmegaMinus(0),
- fHistAsMCGenEtaOmegaPlus(0),
- // Resolution in Pt as function of generated Pt
- f2dHistAsMCResPtXiMinus(0),
- f2dHistAsMCResPtXiPlus(0),
- f2dHistAsMCResPtOmegaMinus(0),
- f2dHistAsMCResPtOmegaPlus(0),
- // Resolution in R(2D) as function of generated R
- f2dHistAsMCResRXiMinus(0),
- f2dHistAsMCResRXiPlus(0),
- f2dHistAsMCResROmegaMinus(0),
- f2dHistAsMCResROmegaPlus(0),
- // Resolution in phi as function of generated Pt
- f2dHistAsMCResPhiXiMinus(0),
- f2dHistAsMCResPhiXiPlus(0),
- f2dHistAsMCResPhiOmegaMinus(0),
- f2dHistAsMCResPhiOmegaPlus(0),
- // Correlation between proton (antiproton) daughter MC pt and Xi/Omega MC pt (to apply Geat/Fluka correction)
- f2dHistAsMCptProtonMCptXiMinus(0),
- f2dHistAsMCptAntiprotonMCptXiPlus(0),
- f2dHistAsMCptProtonMCptOmegaMinus(0),
- f2dHistAsMCptAntiprotonMCptOmegaPlus(0),
- // QA plots
- fHistV0toXiCosineOfPointingAngle(0),
- fHistV0CosineOfPointingAnglevsPtXi(0),
- fHistV0CosineOfPointingAnglevsPtOmega(0),
-
- // Containers
- fCFContCascadePIDAsXiMinus(0),
- fCFContCascadePIDAsXiPlus(0),
- fCFContCascadePIDAsOmegaMinus(0),
- fCFContCascadePIDAsOmegaPlus(0),
- fCFContAsCascadeCuts(0)
-
- //____Costructor____
- {
- // Define input and output slots here
- // Input slot #0 works with a TChain
- // Output slot #1 writes into a TList container (cascade)
-
- // PbPb default cuts
- fV0Sels[0] = 33. ; // max allowed chi2
- fV0Sels[1] = 0.1; // min allowed impact parameter for the 1st daughter
- fV0Sels[2] = 0.1; // min allowed impact parameter for the 2nd daughter
- fV0Sels[3] = 1.0 ; // max allowed DCA between the daughter tracks
- fV0Sels[4] = 0.998 ; // min allowed cosine of V0's pointing angle
- fV0Sels[5] = 0.9; // min radius of the fiducial volume
- fV0Sels[6] = 100. ; // max radius of the fiducial volume
- fCascSels[0] = 33. ; // max allowed chi2
- fCascSels[1] = 0.05; // min allowed V0 impact parameter
- fCascSels[2] = 0.008; // "window" around the Lambda mass
- fCascSels[3] = 0.03; // min allowed bachelor's impact parameter
- fCascSels[4] = 0.3 ; // max allowed DCA between the V0 and the bachelor
- fCascSels[5] = 0.999; // min allowed cosine of the cascade pointing angle
- fCascSels[6] = 0.9 ; // min radius of the fiducial volume
- fCascSels[7] = 100. ; // max radius of the fiducial volume
-
- DefineOutput(1, TList::Class());
- DefineOutput(2, AliCFContainer::Class());
- DefineOutput(3, AliCFContainer::Class());
- DefineOutput(4, AliCFContainer::Class());
- DefineOutput(5, AliCFContainer::Class());
- DefineOutput(6, AliCFContainer::Class());
- }
-
- //____Destructor____
- AliAnalysisTaskCheckPerformanceCascadepp276::~AliAnalysisTaskCheckPerformanceCascadepp276()
- {
- // For all TH1, 2, 3 HnSparse and CFContainer are in the fListCascade TList.
- // They will be deleted when fListCascade is deleted by the TSelector dtor
- // Because of TList::SetOwner()
- if (fListHistCascade && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fListHistCascade; fListHistCascade = 0x0;}
- if (fCFContCascadePIDAsXiMinus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fCFContCascadePIDAsXiMinus; fCFContCascadePIDAsXiMinus = 0x0;}
- if (fCFContCascadePIDAsXiPlus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fCFContCascadePIDAsXiPlus; fCFContCascadePIDAsXiPlus = 0x0;}
- if (fCFContCascadePIDAsOmegaMinus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fCFContCascadePIDAsOmegaMinus; fCFContCascadePIDAsOmegaMinus = 0x0;}
- if (fCFContCascadePIDAsOmegaPlus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fCFContCascadePIDAsOmegaPlus; fCFContCascadePIDAsOmegaPlus = 0x0;}
- if (fCFContAsCascadeCuts && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fCFContAsCascadeCuts; fCFContAsCascadeCuts = 0x0;}
- if (fESDtrackCuts) {delete fESDtrackCuts; fESDtrackCuts = 0x0;}
- }
-
-
-//________________________________________________________________________
-void AliAnalysisTaskCheckPerformanceCascadepp276::UserCreateOutputObjects() {
- // Create histograms
- // Called once
-
- // - Option for AliLog: to suppress the extensive info prompted by a run with MC
- AliLog::SetGlobalLogLevel(AliLog::kError);
-
- // - Definition of the output datamembers
- fListHistCascade = new TList();
- fListHistCascade->SetOwner(); // See http://root.cern.ch/root/html/TCollection.html#TCollection:SetOwner
-
- //-----------------------------------------------
- // Particle Identification Setup (new PID object)
- //-----------------------------------------------
- AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager();
- AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
- fPIDResponse = inputHandler->GetPIDResponse();
-
- // - Only used to get the number of primary reconstructed tracks
- if (! fESDtrackCuts ){
- fESDtrackCuts = new AliESDtrackCuts();
- }
-
- //----------------------
- // Initialize the histos
- //----------------------
-
- //----------------------------------
- // - Same general binning definition
- Double_t ptBinLimits[101];
- for (Int_t iptbin = 0; iptbin<101; ++iptbin) ptBinLimits[iptbin]=iptbin*0.1;
- Double_t yBinLimits[111];
- for (Int_t iybin = 0; iybin<111; ++iybin) yBinLimits[iybin]=-1.1+iybin*0.02;
- Double_t ctauBinLimits[112];
- for (Int_t ict = 0; ict<112; ++ict) ctauBinLimits[ict] = (Double_t) (ict-1.);
-
- //------------------
- // - General plots
- // - Cascades multiplicity plots
- if(! fHistCascadeMultiplicityBeforeAnySel) {
- fHistCascadeMultiplicityBeforeAnySel = new TH1F("fHistCascadeMultiplicityBeforeAnySel",
- "Cascades per event (before any selections);Nbr of Cascades/Evt;Events", 50, 0, 50);
- fListHistCascade->Add(fHistCascadeMultiplicityBeforeAnySel);
- }
- if(! fHistCascadeMultiplicityAfterSDDSel) {
- fHistCascadeMultiplicityAfterSDDSel = new TH1F("fHistCascadeMultiplicityAfterSDDSel",
- "Cascades per event (after only the SDD selection);Nbr of Cascades/Evt;Events", 50, 0, 50);
- fListHistCascade->Add(fHistCascadeMultiplicityAfterSDDSel);
- }
- if(! fHistCascadeMultiplicityAfterPhysicsSel) {
- fHistCascadeMultiplicityAfterPhysicsSel = new TH1F("fHistCascadeMultiplicityAfterPhysicsSel",
- "Cascades per event (after physics selection);Nbr of Cascades/Evt;Events", 50, 0, 50);
- fListHistCascade->Add(fHistCascadeMultiplicityAfterPhysicsSel);
- }
- if(! fHistCascadeMultiplicityForSelEvtNoTPCOnly) {
- fHistCascadeMultiplicityForSelEvtNoTPCOnly = new TH1F("fHistCascadeMultiplicityForSelEvtNoTPCOnly",
- "Cascades per event (for selected events with well-established PV);Nbr of Cascades/Evt;Events", 50, 0, 50);
- fListHistCascade->Add(fHistCascadeMultiplicityForSelEvtNoTPCOnly);
- }
- if(! fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup) {
- fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup = new TH1F("fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup",
- "Cascades per event (for selected events with well-establisched PV and no pile-up);Nbr of Cascades/Evt;Events", 50, 0, 50);
- fListHistCascade->Add(fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup);
- }
- if(! fHistCascadeMultiplicityAfterVertexCutSel) {
- fHistCascadeMultiplicityAfterVertexCutSel = new TH1F("fHistCascadeMultiplicityAfterVertexCutSel",
- "Cascades per event (after vertex cut selection);Nbr of Cascades/Evt;Events", 50, 0, 50);
- fListHistCascade->Add(fHistCascadeMultiplicityAfterVertexCutSel);
- }
- // - Tracks multiplicity plots
- if(! fHistTrackMultiplicityBeforeAnySel) {
- fHistTrackMultiplicityBeforeAnySel = new TH1F("fHistTrackMultiplicityBeforeAnySel",
- "Tracks per event (before any selections);Nbr of Tracks/Evt;Events", 200, 0, 200);
- fListHistCascade->Add(fHistTrackMultiplicityBeforeAnySel);
- }
- if(! fHistTrackMultiplicityAfterSDDSel) {
- fHistTrackMultiplicityAfterSDDSel = new TH1F("fHistTrackMultiplicityAfterSDDSel",
- "Tracks per event (after only the SDD selection);Nbr of Tracks/Evt;Events", 200, 0, 200);
- fListHistCascade->Add(fHistTrackMultiplicityAfterSDDSel);
- }
- if(! fHistTrackMultiplicityAfterPhysicsSel) {
- fHistTrackMultiplicityAfterPhysicsSel = new TH1F("fHistTrackMultiplicityAfterPhysicsSel",
- "Tracks per event (after physics selection);Nbr of Tracks/Evt;Events", 200, 0, 200);
- fListHistCascade->Add(fHistTrackMultiplicityAfterPhysicsSel);
- }
- if(! fHistTrackMultiplicityForSelEvtNoTPCOnly) {
- fHistTrackMultiplicityForSelEvtNoTPCOnly = new TH1F("fHistTrackMultiplicityForSelEvtNoTPCOnly",
- "Tracks per event (for selected events with well-established PV);Nbr of Tracks/Evt;Events", 200, 0, 200);
- fListHistCascade->Add(fHistTrackMultiplicityForSelEvtNoTPCOnly);
- }
- if(! fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup) {
- fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = new TH1F("fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup",
- "Tracks per event (for selected events with well-establisched PV and no pile-up);Nbr of Tracks/Evt;Events", 200, 0, 200);
- fListHistCascade->Add(fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup);
- }
- if(! fHistTrackMultiplicityAfterVertexCutSel) {
- fHistTrackMultiplicityAfterVertexCutSel = new TH1F("fHistTrackMultiplicityAfterVertexCutSel",
- "Tracks per event (after vertex cut selection);Nbr of Tracks/Evt;Events", 200, 0, 200);
- fListHistCascade->Add(fHistTrackMultiplicityAfterVertexCutSel);
- }
- // - Vertex position plots
- if(! fHistPVx ){
- fHistPVx = new TH1F("fHistPVx", "Best PV position in x; x (cm); Events", 2000, -0.5, 0.5);
- fListHistCascade->Add(fHistPVx);
- }
- if(! fHistPVy ){
- fHistPVy = new TH1F("fHistPVy", "Best PV position in y; y (cm); Events", 2000, -0.5, 0.5);
- fListHistCascade->Add(fHistPVy);
- }
- if(! fHistPVz ){
- fHistPVz = new TH1F("fHistPVz", "Best PV position in z; z (cm); Events", 400, -20, 20);
- fListHistCascade->Add(fHistPVz);
- }
- if(! fHistPVxAnalysis ){
- fHistPVxAnalysis = new TH1F("fHistPVxAnalysis", "Best PV position in x (after events selections); x (cm); Events", 2000, -0.5, 0.5);
- fListHistCascade->Add(fHistPVxAnalysis);
- }
- if(! fHistPVyAnalysis ){
- fHistPVyAnalysis = new TH1F("fHistPVyAnalysis", "Best PV position in y (after events selections); y (cm); Events" , 2000, -0.5, 0.5);
- fListHistCascade->Add(fHistPVyAnalysis);
- }
- if(! fHistPVzAnalysis ){
- fHistPVzAnalysis = new TH1F("fHistPVzAnalysis", "Best PV position in z (after events selections); z (cm); Events", 400, -20, 20);
- fListHistCascade->Add(fHistPVzAnalysis);
- }
-
- //--------------------------
- // - Generated cascade plots
- // - Generated Cascade multiplicity distributions (for singol cascade)
- fHistnXiPlusPerEvTot = new TH1F("fHistnXiPlusPerEvTot", "", 25, 0, 25);
- fListHistCascade->Add(fHistnXiPlusPerEvTot);
- fHistnXiMinusPerEvTot = new TH1F("fHistnXiMinusPerEvTot", "", 25, 0, 25);
- fListHistCascade->Add(fHistnXiMinusPerEvTot);
- fHistnOmegaPlusPerEvTot = new TH1F("fHistnOmegaPlusPerEvTot", "", 25, 0, 25);
- fListHistCascade->Add(fHistnOmegaPlusPerEvTot);
- fHistnOmegaMinusPerEvTot = new TH1F("fHistnOmegaMinusPerEvTot", "", 25, 0, 25);
- fListHistCascade->Add(fHistnOmegaMinusPerEvTot);
- fHistnXiPlusPerEv = new TH1F("fHistnXiPlusPerEv", "", 25, 0, 25);
- fListHistCascade->Add(fHistnXiPlusPerEv);
- fHistnXiMinusPerEv = new TH1F("fHistnXiMinusPerEv", "", 25, 0, 25);
- fListHistCascade->Add(fHistnXiMinusPerEv);
- fHistnOmegaPlusPerEv = new TH1F("fHistnOmegaPlusPerEv", "", 25, 0, 25);
- fListHistCascade->Add(fHistnOmegaPlusPerEv);
- fHistnOmegaMinusPerEv = new TH1F("fHistnOmegaMinusPerEv", "", 25, 0, 25);
- fListHistCascade->Add(fHistnOmegaMinusPerEv);
- // - Xi-
- // - Pseudo-Rapidity distribution
- if (!fHistEtaGenCascXiMinus) {
- fHistEtaGenCascXiMinus = new TH1F("fHistEtaGenCascXiMinus", "#eta of any gen. #Xi^{-}; #eta; Number of Casc", 200, -10, 10);
- fListHistCascade->Add(fHistEtaGenCascXiMinus);
- }
- if (!f3dHistGenPtVsGenYvsNtracksXiMinus) {
- f3dHistGenPtVsGenYvsNtracksXiMinus = new TH3D("f3dHistGenPtVsGenYvsNtracksXiMinus", "MC P_{t} Vs MC Y of Gen #Xi^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.);
- fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksXiMinus);
- }
- if (!f3dHistGenPtVsGenctauvsYXiMinus) {
- f3dHistGenPtVsGenctauvsYXiMinus = new TH3D("f3dHistGenPtVsGenctauvsYXiMinus", "MC P_{t} Vs MC ctau Vs Y of Gen #Xi^{-}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits);
- fListHistCascade->Add(f3dHistGenPtVsGenctauvsYXiMinus);
- }
- if (!f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff) {
- f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff = new TH3D("f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff", "MC P_{t} Vs MC Y of Gen #Xi^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.);
- fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff);
- }
- if (!f3dHistGenPtVsGenctauvsYXiMinusPhysEff) {
- f3dHistGenPtVsGenctauvsYXiMinusPhysEff = new TH3D("f3dHistGenPtVsGenctauvsYXiMinusPhysEff", "MC P_{t} Vs MC ctau Vs Y of Gen #Xi^{-}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits);
- fListHistCascade->Add(f3dHistGenPtVsGenctauvsYXiMinusPhysEff);
- }
- // - Info at the generation level of multi-strange particle
- if (!fHistThetaGenCascXiMinus) {
- fHistThetaGenCascXiMinus = new TH1F("fHistThetaGenCascXiMinus", "#theta of gen. #Xi^{-}; #theta; Number of Casc.", 200, -10, 190);
- fListHistCascade->Add(fHistThetaGenCascXiMinus);
- }
- if (!f2dHistGenPtVsGenYFdblXiMinus) {
- f2dHistGenPtVsGenYFdblXiMinus = new TH2D("f2dHistGenPtVsGenYFdblXiMinus", "MC P_{t} Vs MC Y of findable Gen #Xi^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1);
- fListHistCascade->Add(f2dHistGenPtVsGenYFdblXiMinus);
- }
- // - Theta distribution the daughters (control plots)
- if (!fHistThetaLambdaXiMinus) {
- fHistThetaLambdaXiMinus = new TH1F("fHistThetaLambdaXiMinus", "#theta of gen. #Lambda (Xi dghter); #theta_{#Lambda}; Number of #Lambda^0", 200, -10, 190);
- fListHistCascade->Add(fHistThetaLambdaXiMinus);
- }
- if (!fHistThetaBachXiMinus) {
- fHistThetaBachXiMinus = new TH1F("fHistThetaBachXiMinus", "#theta of gen. Bach.; #theta_{Bach}; Number of Bach.", 200, -10, 190);
- fListHistCascade->Add(fHistThetaBachXiMinus);
- }
- if (!fHistThetaMesDghterXiMinus) {
- fHistThetaMesDghterXiMinus = new TH1F("fHistThetaMesDghterXiMinus", "#theta of gen. Meson #Lambda dghter; #theta_{MesDght}; Number of Mes.", 200, -10, 190);
- fListHistCascade->Add(fHistThetaMesDghterXiMinus);
- }
- if (!fHistThetaBarDghterXiMinus) {
- fHistThetaBarDghterXiMinus = new TH1F("fHistThetaBarDghterXiMinus", "#theta of gen. Baryon #Lambda dghter; #theta_{BarDght}; Number of Bar.", 200, -10, 190);
- fListHistCascade->Add(fHistThetaBarDghterXiMinus);
- }
- // - Pt distribution (control plots)
- if (!fHistPtBachXiMinus) {
- fHistPtBachXiMinus = new TH1F("fHistPtBachXiMinus", "p_{t} of gen. Bach.; pt_{Bach}; Number of Bach.", 200, 0, 10);
- fListHistCascade->Add(fHistPtBachXiMinus);
- }
- if (!fHistPtMesDghterXiMinus) {
- fHistPtMesDghterXiMinus = new TH1F("fHistPtMesDghterXiMinus", "p_{t} of gen. Meson #Lambda dghter; pt_{MesDght}; Number of Mes.", 200, 0, 10);
- fListHistCascade->Add(fHistPtMesDghterXiMinus);
- }
- if (!fHistPtBarDghterXiMinus) {
- fHistPtBarDghterXiMinus = new TH1F("fHistPtBarDghterXiMinus", "p_{t} of gen. Baryon #Lambda dghter; pt_{BarDght}; Number of Bar.", 200, 0, 10);
- fListHistCascade->Add(fHistPtBarDghterXiMinus);
- }
- // - Xi+
- // - Pseudo-Rapidity distribution
- if (!fHistEtaGenCascXiPlus) {
- fHistEtaGenCascXiPlus = new TH1F("fHistEtaGenCascXiPlus", "#eta of any gen. #Xi^{+}; #eta; Number of Casc", 200, -10, 10);
- fListHistCascade->Add(fHistEtaGenCascXiPlus);
- }
- if (!f3dHistGenPtVsGenYvsNtracksXiPlus) {
- f3dHistGenPtVsGenYvsNtracksXiPlus = new TH3D("f3dHistGenPtVsGenYvsNtracksXiPlus", "MC P_{t} Vs MC Y of Gen #Xi^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.);
- fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksXiPlus);
- }
- if (!f3dHistGenPtVsGenctauvsYXiPlus) {
- f3dHistGenPtVsGenctauvsYXiPlus = new TH3D("f3dHistGenPtVsGenctauvsYXiPlus", "MC P_{t} Vs MC ctau Vs Yof Gen #Xi^{+}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits);
- fListHistCascade->Add(f3dHistGenPtVsGenctauvsYXiPlus);
- }
- if (!f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff) {
- f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff = new TH3D("f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff", "MC P_{t} Vs MC Y of Gen #Xi^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.);
- fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff);
- }
- if (!f3dHistGenPtVsGenctauvsYXiPlusPhysEff) {
- f3dHistGenPtVsGenctauvsYXiPlusPhysEff = new TH3D("f3dHistGenPtVsGenctauvsYXiPlusPhysEff", "MC P_{t} Vs MC ctau Vs Yof Gen #Xi^{+}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits);
- fListHistCascade->Add(f3dHistGenPtVsGenctauvsYXiPlusPhysEff);
- }
- // - Info at the generation level of multi-strange particle
- if (!fHistThetaGenCascXiPlus) {
- fHistThetaGenCascXiPlus = new TH1F("fHistThetaGenCascXiPlus", "#theta of gen. #Xi^{+}; #theta; Number of Casc.", 200, -10, 190);
- fListHistCascade->Add(fHistThetaGenCascXiPlus);
- }
- if (!f2dHistGenPtVsGenYFdblXiPlus) {
- f2dHistGenPtVsGenYFdblXiPlus = new TH2D("f2dHistGenPtVsGenYFdblXiPlus", "MC P_{t} Vs MC Y of findable Gen #Xi^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1);
- fListHistCascade->Add(f2dHistGenPtVsGenYFdblXiPlus);
- }
- // - Theta distribution the daughters (control plots)
- if (!fHistThetaLambdaXiPlus) {
- fHistThetaLambdaXiPlus = new TH1F("fHistThetaLambdaXiPlus", "#theta of gen. #Lambda (Xi dghter); #theta_{#Lambda}; Number of #Lambda", 200, -10, 190);
- fListHistCascade->Add(fHistThetaLambdaXiPlus);
- }
- if (!fHistThetaBachXiPlus) {
- fHistThetaBachXiPlus = new TH1F("fHistThetaBachXiPlus", "#theta of gen. Bach.; #theta_{Bach}; Number of Bach.", 200, -10, 190);
- fListHistCascade->Add(fHistThetaBachXiPlus);
- }
- if (!fHistThetaMesDghterXiPlus) {
- fHistThetaMesDghterXiPlus = new TH1F("fHistThetaMesDghterXiPlus", "#theta of gen. Meson #Lambda dghter; #theta_{MesDght}; Number of Mes.", 200, -10, 190);
- fListHistCascade->Add(fHistThetaMesDghterXiPlus);
- }
- if (!fHistThetaBarDghterXiPlus) {
- fHistThetaBarDghterXiPlus = new TH1F("fHistThetaBarDghterXiPlus", "#theta of gen. Baryon #Lambda dghter; #theta_{BarDght}; Number of Bar.", 200, -10, 190);
- fListHistCascade->Add(fHistThetaBarDghterXiPlus);
- }
- // - Pt distribution (control plots)
- if (!fHistPtBachXiPlus) {
- fHistPtBachXiPlus = new TH1F("fHistPtBachXiPlus", "p_{t} of gen. Bach.; pt_{Bach}; Number of Bach.", 200, 0, 10);
- fListHistCascade->Add(fHistPtBachXiPlus);
- }
- if (!fHistPtMesDghterXiPlus) {
- fHistPtMesDghterXiPlus = new TH1F("fHistPtMesDghterXiPlus", "p_{t} of gen. Meson #Lambda dghter; pt_{MesDght}; Number of Mes.", 200, 0, 10);
- fListHistCascade->Add(fHistPtMesDghterXiPlus);
- }
- if (!fHistPtBarDghterXiPlus) {
- fHistPtBarDghterXiPlus = new TH1F("fHistPtBarDghterXiPlus", "p_{t} of gen. Baryon #Lambda dghter); pt_{BarDght}; Number of Bar.", 200, 0, 10);
- fListHistCascade->Add(fHistPtBarDghterXiPlus);
- }
- // - Omega-
- // - Pseudo-Rapidity distribution
- if (!fHistEtaGenCascOmegaMinus) {
- fHistEtaGenCascOmegaMinus = new TH1F("fHistEtaGenCascOmegaMinus", "#eta of any gen. #Omega^{-}; #eta; Number of Casc", 200, -10, 10);
- fListHistCascade->Add(fHistEtaGenCascOmegaMinus);
- }
- if (!f3dHistGenPtVsGenYvsNtracksOmegaMinus) {
- f3dHistGenPtVsGenYvsNtracksOmegaMinus = new TH3D("f3dHistGenPtVsGenYvsNtracksOmegaMinus", "MC P_{t} Vs MC Y of Gen #Omega^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.);
- fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksOmegaMinus);
- }
- if (!f3dHistGenPtVsGenctauvsYOmegaMinus) {
- f3dHistGenPtVsGenctauvsYOmegaMinus = new TH3D("f3dHistGenPtVsGenctauvsYOmegaMinus", "MC P_{t} Vs MC ctau Vs Y of Gen #Omega^{-} ", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits);
- fListHistCascade->Add(f3dHistGenPtVsGenctauvsYOmegaMinus);
- }
- if (!f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff) {
- f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff = new TH3D("f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff", "MC P_{t} Vs MC Y of Gen #Omega^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.);
- fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff);
- }
- if (!f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff) {
- f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff = new TH3D("f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff", "MC P_{t} Vs MC ctau Vs Y of Gen #Omega^{-}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits);
- fListHistCascade->Add(f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff);
- }
- // - Info at the generation level of multi-strange particle
- if (!fHistThetaGenCascOmegaMinus) {
- fHistThetaGenCascOmegaMinus = new TH1F("fHistThetaGenCascOmegaMinus", "#theta of gen. #Omega^{-}; #theta; Number of Casc.", 200, -10, 190);
- fListHistCascade->Add(fHistThetaGenCascOmegaMinus);
- }
- if (!f2dHistGenPtVsGenYFdblOmegaMinus) {
- f2dHistGenPtVsGenYFdblOmegaMinus = new TH2D("f2dHistGenPtVsGenYFdblOmegaMinus", "MC P_{t} Vs MC Y of findable Gen #Omega^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1);
- fListHistCascade->Add(f2dHistGenPtVsGenYFdblOmegaMinus);
- }
- // - Theta distribution the daughters (control plots)
- if (!fHistThetaLambdaOmegaMinus) {
- fHistThetaLambdaOmegaMinus = new TH1F("fHistThetaLambdaOmegaMinus", "#theta of gen. #Lambda (Omega dghter); #theta_{#Lambda}; Number of #Lambda", 200, -10, 190);
- fListHistCascade->Add(fHistThetaLambdaOmegaMinus);
- }
- if (!fHistThetaBachOmegaMinus) {
- fHistThetaBachOmegaMinus = new TH1F("fHistThetaBachOmegaMinus", "#theta of gen. Bach.;#theta_{Bach};Number of Bach.", 200, -10, 190);
- fListHistCascade->Add(fHistThetaBachOmegaMinus);
- }
- if (!fHistThetaMesDghterOmegaMinus) {
- fHistThetaMesDghterOmegaMinus = new TH1F("fHistThetaMesDghterOmegaMinus", "#theta of gen. Meson #Lambda dghter; #theta_{MesDght}; Number of Mes.", 200, -10, 190);
- fListHistCascade->Add(fHistThetaMesDghterOmegaMinus);
- }
- if (!fHistThetaBarDghterOmegaMinus) {
- fHistThetaBarDghterOmegaMinus = new TH1F("fHistThetaBarDghterOmegaMinus", "#theta of gen. Baryon #Lambda dghter; #theta_{BarDght}; Number of Bar.", 200, -10, 190);
- fListHistCascade->Add(fHistThetaBarDghterOmegaMinus);
- }
- // - Pt distribution (control plots)
- if (!fHistPtBachOmegaMinus) {
- fHistPtBachOmegaMinus = new TH1F("fHistPtBachOmegaMinus", "p_{t} of gen. Bach.; pt_{Bach}; Number of Bach.", 200, 0, 10);
- fListHistCascade->Add(fHistPtBachOmegaMinus);
- }
- if (!fHistPtMesDghterOmegaMinus) {
- fHistPtMesDghterOmegaMinus = new TH1F("fHistPtMesDghterOmegaMinus", "p_{t} of gen. Meson #Lambda dghter); pt_{MesDght}; Number of Mes.", 200, 0, 10);
- fListHistCascade->Add(fHistPtMesDghterOmegaMinus);
- }
- if (!fHistPtBarDghterOmegaMinus) {
- fHistPtBarDghterOmegaMinus = new TH1F("fHistPtBarDghterOmegaMinus", "p_{t} of gen. Baryon #Lambda dghter); pt_{BarDght}; Number of Bar.", 200, 0, 10);
- fListHistCascade->Add(fHistPtBarDghterOmegaMinus);
- }
- // - Omega+
- // - Pseudo-Rapidity distribution
- if (!fHistEtaGenCascOmegaPlus) {
- fHistEtaGenCascOmegaPlus = new TH1F("fHistEtaGenCascOmegaPlus", "#eta of any gen. #Omega^{+}; #eta; Number of Casc", 200, -10, 10);
- fListHistCascade->Add(fHistEtaGenCascOmegaPlus);
- }
- if (!f3dHistGenPtVsGenYvsNtracksOmegaPlus) {
- f3dHistGenPtVsGenYvsNtracksOmegaPlus = new TH3D("f3dHistGenPtVsGenYvsNtracksOmegaPlus", "MC P_{t} Vs MC Y of Gen #Omega^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.);
- fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksOmegaPlus);
- }
- if (!f3dHistGenPtVsGenctauvsYOmegaPlus) {
- f3dHistGenPtVsGenctauvsYOmegaPlus = new TH3D("f3dHistGenPtVsGenctauvsYOmegaPlus", "MC P_{t} Vs MC ctau Vs Y of Gen #Omega^{+} ", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits);
- fListHistCascade->Add(f3dHistGenPtVsGenctauvsYOmegaPlus);
- }
- if (!f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff) {
- f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff = new TH3D("f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff", "MC P_{t} Vs MC Y of Gen #Omega^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.);
- fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff);
- }
- if (!f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff) {
- f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff = new TH3D("f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff", "MC P_{t} Vs MC ctau Vs Y of Gen #Omega^{+}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits);
- fListHistCascade->Add(f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff);
- }
- // - Info at the generation level of multi-strange particle
- if (!fHistThetaGenCascOmegaPlus) {
- fHistThetaGenCascOmegaPlus = new TH1F("fHistThetaGenCascOmegaPlus", "#theta of gen. #Omega^{+}; #theta; Number of Casc.", 200, -10, 190);
- fListHistCascade->Add(fHistThetaGenCascOmegaPlus);
- }
- if (!f2dHistGenPtVsGenYFdblOmegaPlus) {
- f2dHistGenPtVsGenYFdblOmegaPlus = new TH2D("f2dHistGenPtVsGenYFdblOmegaPlus", "MC P_{t} Vs MC Y of findable Gen #Omega^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1);
- fListHistCascade->Add(f2dHistGenPtVsGenYFdblOmegaPlus);
- }
- // - Info at the generation level of multi-strange particle
- if (!fHistThetaGenCascOmegaPlus) {
- fHistThetaGenCascOmegaPlus = new TH1F("fHistThetaGenCascOmegaPlus", "#theta of gen. #Omega^{+}; #theta; Number of Casc.", 200, -10, 190);
- fListHistCascade->Add(fHistThetaGenCascOmegaPlus);
- }
- if (!f2dHistGenPtVsGenYFdblOmegaPlus) {
- f2dHistGenPtVsGenYFdblOmegaPlus = new TH2D("f2dHistGenPtVsGenYFdblOmegaPlus", "MC P_{t} Vs MC Y of findable Gen #Omega^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1);
- fListHistCascade->Add(f2dHistGenPtVsGenYFdblOmegaPlus);
- }
- // - Theta distribution the daughters (control plots)
- if (!fHistThetaLambdaOmegaPlus) {
- fHistThetaLambdaOmegaPlus = new TH1F("fHistThetaLambdaOmegaPlus", "#theta of gen. #Lambda (Omega dghter); #theta_{#Lambda}; Number of #Lambda", 200, -10, 190);
- fListHistCascade->Add(fHistThetaLambdaOmegaPlus);
- }
- if (!fHistThetaBachOmegaPlus) {
- fHistThetaBachOmegaPlus = new TH1F("fHistThetaBachOmegaPlus", "#theta of gen. Bach.; #theta_{Bach}; Number of Bach.", 200, -10, 190);
- fListHistCascade->Add(fHistThetaBachOmegaPlus);
- }
- if (!fHistThetaMesDghterOmegaPlus) {
- fHistThetaMesDghterOmegaPlus = new TH1F("fHistThetaMesDghterOmegaPlus", "#theta of gen. Meson #Lambda dghter; #theta_{MesDght}; Number of Mes.", 200, -10, 190);
- fListHistCascade->Add(fHistThetaMesDghterOmegaPlus);
- }
- if (!fHistThetaBarDghterOmegaPlus) {
- fHistThetaBarDghterOmegaPlus = new TH1F("fHistThetaBarDghterOmegaPlus", "#theta of gen. Baryon #Lambda dghter; #theta_{BarDght}; Number of Bar.", 200, -10, 190);
- fListHistCascade->Add(fHistThetaBarDghterOmegaPlus);
- }
- // - Pt distribution (control plots)
- if (!fHistPtBachOmegaPlus) {
- fHistPtBachOmegaPlus = new TH1F("fHistPtBachOmegaPlus", "p_{t} of gen. Bach.; pt_{Bach}; Number of Bach.", 200, 0, 10);
- fListHistCascade->Add(fHistPtBachOmegaPlus);
- }
- if (!fHistPtMesDghterOmegaPlus) {
- fHistPtMesDghterOmegaPlus = new TH1F("fHistPtMesDghterOmegaPlus", "p_{t} of gen. Meson #Lambda dghter; pt_{MesDght}; Number of Mes.", 200, 0, 10);
- fListHistCascade->Add(fHistPtMesDghterOmegaPlus);
- }
- if (!fHistPtBarDghterOmegaPlus) {
- fHistPtBarDghterOmegaPlus = new TH1F("fHistPtBarDghterOmegaPlus", "p_{t} of gen. Baryon #Lambda dghter); pt_{BarDght}; Number of Bar.", 200, 0, 10);
- fListHistCascade->Add(fHistPtBarDghterOmegaPlus);
- }
-
- //-------------------------------------------------------------------------
- // - Any reconstructed cascades + reconstructed cascades associated with MC
-
- // - Multiplicity cascde plots
- fHistnAssoXiMinus= new TH1F("fHistnAssoXiMinus", "", 25, 0, 25);
- fListHistCascade->Add(fHistnAssoXiMinus);
- fHistnAssoXiPlus= new TH1F("fHistnAssoXiPlus", "", 25, 0, 25);
- fListHistCascade->Add(fHistnAssoXiPlus);
- fHistnAssoOmegaMinus= new TH1F("fHistnAssoOmegaMinus", "", 25, 0, 25);
- fListHistCascade->Add(fHistnAssoOmegaMinus);
- fHistnAssoOmegaPlus= new TH1F("fHistnAssoOmegaPlus", "", 25, 0, 25);
- fListHistCascade->Add(fHistnAssoOmegaPlus);
- // - Effective mass histos for cascades candidates.
- if (! fHistMassXiMinus) {
- fHistMassXiMinus = new TH1F("fHistMassXiMinus","#Xi^{-} candidates; M( #Lambda , #pi^{-} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0);
- fListHistCascade->Add(fHistMassXiMinus);
- }
- if (! fHistMassXiPlus) {
- fHistMassXiPlus = new TH1F("fHistMassXiPlus","#Xi^{+} candidates; M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0);
- fListHistCascade->Add(fHistMassXiPlus);
- }
- if (! fHistMassOmegaMinus) {
- fHistMassOmegaMinus = new TH1F("fHistMassOmegaMinus","#Omega^{-} candidates; M( #Lambda , K^{-} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5);
- fListHistCascade->Add(fHistMassOmegaMinus);
- }
- if (! fHistMassOmegaPlus) {
- fHistMassOmegaPlus = new TH1F("fHistMassOmegaPlus","#Omega^{+} candidates; M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5);
- fListHistCascade->Add(fHistMassOmegaPlus);
- }
- // - Effective mass histos with combined PID
- if (! fHistMassWithCombPIDXiMinus) {
- fHistMassWithCombPIDXiMinus = new TH1F("fHistMassWithCombPIDXiMinus","#Xi^{-} candidates, with Bach. comb. PID; M( #Lambda , #pi^{-} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0);
- fListHistCascade->Add(fHistMassWithCombPIDXiMinus);
- }
- if (! fHistMassWithCombPIDXiPlus) {
- fHistMassWithCombPIDXiPlus = new TH1F("fHistMassWithCombPIDXiPlus","#Xi^{+} candidates, with Bach. comb. PID; M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0);
- fListHistCascade->Add(fHistMassWithCombPIDXiPlus);
- }
- if (! fHistMassWithCombPIDOmegaMinus) {
- fHistMassWithCombPIDOmegaMinus = new TH1F("fHistMassWithCombPIDOmegaMinus","#Omega^{-} candidates, with Bach. comb. PID; M( #Lambda , K^{-} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5);
- fListHistCascade->Add(fHistMassWithCombPIDOmegaMinus);
- }
- if (! fHistMassWithCombPIDOmegaPlus) {
- fHistMassWithCombPIDOmegaPlus = new TH1F("fHistMassWithCombPIDOmegaPlus","#Omega^{+} candidates, with Bach. comb. PID; M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5);
- fListHistCascade->Add(fHistMassWithCombPIDOmegaPlus);
- }
- // - PID Probability versus MC Pt(bachelor track)
- if (! f2dHistPIDprobaKaonVsMCPtBach ){
- f2dHistPIDprobaKaonVsMCPtBach = new TH2F("f2dHistPIDprobaKaonVsMCPtBach", "Comb. PID proba to be K^{#pm} Vs MC Bach. Pt; Pt_{MC}(Bach.) (GeV/c); Comb. PID Proba (Bach. = K^{#pm})", 100, 0.0, 5.0, 110, 0.0, 1.10);
- fListHistCascade->Add(f2dHistPIDprobaKaonVsMCPtBach);
- }
- if(! f2dHistPIDprobaPionVsMCPtBach ){
- f2dHistPIDprobaPionVsMCPtBach = new TH2F("f2dHistPIDprobaPionVsMCPtBach", "Comb. PID proba to be #pi^{#pm} Vs MC Bach. Pt; Pt_{MC}(Bach.) (GeV/c); Comb. PID Proba (Bach. = #pi^{#pm})", 100, 0.0, 5.0, 110, 0.0, 1.10);
- fListHistCascade->Add(f2dHistPIDprobaPionVsMCPtBach);
- }
- // - Effective mass histos with perfect MC PID on the bachelor
- if (! fHistMassWithMcPIDXiMinus) {
- fHistMassWithMcPIDXiMinus = new TH1F("fHistMassWithMcPIDXiMinus", "#Xi^{-} candidates, with Bach. MC PID; M( #Lambda , #pi^{-} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0);
- fListHistCascade->Add(fHistMassWithMcPIDXiMinus);
- }
- if (! fHistMassWithMcPIDXiPlus) {
- fHistMassWithMcPIDXiPlus = new TH1F("fHistMassWithMcPIDXiPlus", "#Xi^{+} candidates, with Bach. MC PID; M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0);
- fListHistCascade->Add(fHistMassWithMcPIDXiPlus);
- }
- if (! fHistMassWithMcPIDOmegaMinus) {
- fHistMassWithMcPIDOmegaMinus = new TH1F("fHistMassWithMcPIDOmegaMinus", "#Omega^{-} candidates, with Bach. MC PID; M( #Lambda , K^{-} ) (GeV/c^{2});Counts", 500, 1.5, 2.5);
- fListHistCascade->Add(fHistMassWithMcPIDOmegaMinus);
- }
- if (! fHistMassWithMcPIDOmegaPlus) {
- fHistMassWithMcPIDOmegaPlus = new TH1F("fHistMassWithMcPIDOmegaPlus", "#Omega^{+} candidates, with Bach. MC PID; M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5);
- fListHistCascade->Add(fHistMassWithMcPIDOmegaPlus);
- }
- // - Effective mass histos for cascades candidates ASSOCIATED with MC.
- if (! fHistAsMCMassXiMinus) {
- fHistAsMCMassXiMinus = new TH1F("fHistAsMCMassXiMinus", "#Xi^{-} candidates associated to MC; M( #Lambda , #pi^{-} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0);
- fListHistCascade->Add(fHistAsMCMassXiMinus);
- }
- if (! fHistAsMCMassXiPlus) {
- fHistAsMCMassXiPlus = new TH1F("fHistAsMCMassXiPlus", "#Xi^{+} candidates associated to MC; M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0);
- fListHistCascade->Add(fHistAsMCMassXiPlus);
- }
- if (! fHistAsMCMassOmegaMinus) {
- fHistAsMCMassOmegaMinus = new TH1F("fHistAsMCMassOmegaMinus", "#Omega^{-} candidates associated to MC; M( #Lambda , K^{-} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5);
- fListHistCascade->Add(fHistAsMCMassOmegaMinus);
- }
- if (! fHistAsMCMassOmegaPlus) {
- fHistAsMCMassOmegaPlus = new TH1F("fHistAsMCMassOmegaPlus", "#Omega^{+} candidates associated to MC; M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5);
- fListHistCascade->Add(fHistAsMCMassOmegaPlus);
- }
- // - Generated Pt Vs generated Y of the cascade candidates associated with MC + having the proper maximum proba of combined PID for the bachelor
- if (!f2dHistAsMCandCombPIDGenPtVsGenYXiMinus) {
- f2dHistAsMCandCombPIDGenPtVsGenYXiMinus = new TH2F("f2dHistAsMCandCombPIDGenPtVsGenYXiMinus", "MC P_{t} Vs MC Y of #Xi^{-} (associated+Bach.PID); Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 220, -1.1, 1.1);
- fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYXiMinus);
- }
- if (!f2dHistAsMCandCombPIDGenPtVsGenYXiPlus) {
- f2dHistAsMCandCombPIDGenPtVsGenYXiPlus = new TH2F("f2dHistAsMCandCombPIDGenPtVsGenYXiPlus", "MC P_{t} Vs MC Y of #Xi^{+} (associated+Bach.PID); Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1);
- fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYXiPlus);
- }
- if (!f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus) {
- f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus = new TH2F("f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus", "MC P_{t} Vs MC Y of #Omega^{-} (associated+Bach.PID); Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 220, -1.1, 1.1);
- fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus);
- }
- if (!f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus) {
- f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus = new TH2F("f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus", "MC P_{t} Vs MC Y of #Omega^{+} (associated+Bach.PID); Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 220, -1.1, 1.1);
- fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus);
- }
- // - Generated Pt Vs Generated Y, for the cascade candidates associated with MC
- if (!f2dHistAsMCGenPtVsGenYXiMinus) {
- f2dHistAsMCGenPtVsGenYXiMinus = new TH2F("f2dHistAsMCGenPtVsGenYXiMinus", "MC P_{t} Vs MC Y of gen. #Xi^{-} (associated); Pt_{MC} (GeV/c); Rapidity, Y_{MC}",200, 0., 10., 220, -1.1, 1.1);
- fListHistCascade->Add(f2dHistAsMCGenPtVsGenYXiMinus );
- }
- if (!f2dHistAsMCGenPtVsGenYXiPlus) {
- f2dHistAsMCGenPtVsGenYXiPlus = new TH2F("f2dHistAsMCGenPtVsGenYXiPlus", "MC P_{t} Vs MC Y of gen. #Xi^{+} (associated); Pt_{MC} (GeV/c); Rapidity, Y_{MC}",200, 0., 10., 220, -1.1, 1.1);
- fListHistCascade->Add(f2dHistAsMCGenPtVsGenYXiPlus );
- }
- if (!f2dHistAsMCGenPtVsGenYOmegaMinus) {
- f2dHistAsMCGenPtVsGenYOmegaMinus = new TH2F("f2dHistAsMCGenPtVsGenYOmegaMinus", "MC P_{t} Vs MC Y of gen. #Omega^{-} (associated); Pt_{MC} (GeV/c); Rapidity, Y_{MC}",200, 0., 10., 220, -1.1, 1.1);
- fListHistCascade->Add(f2dHistAsMCGenPtVsGenYOmegaMinus );
- }
- if (!f2dHistAsMCGenPtVsGenYOmegaPlus) {
- f2dHistAsMCGenPtVsGenYOmegaPlus = new TH2F("f2dHistAsMCGenPtVsGenYOmegaPlus", "MC P_{t} Vs MC Y of gen. #Omega^{+} (associated); Pt_{MC} (GeV/c); Rapidity, Y_{MC}",200, 0., 10., 220, -1.1, 1.1);
- fListHistCascade->Add(f2dHistAsMCGenPtVsGenYOmegaPlus );
- }
- // - Generated Eta of the the cascade candidates associated with MC
- if (!fHistAsMCGenEtaXiMinus) {
- fHistAsMCGenEtaXiMinus = new TH1F("fHistAsMCGenEtaXiMinus", "#eta of gen. #Xi^{-} (associated); #eta; Count", 100, -5, 5);
- fListHistCascade->Add( fHistAsMCGenEtaXiMinus );
- }
- if (!fHistAsMCGenEtaXiPlus) {
- fHistAsMCGenEtaXiPlus = new TH1F("fHistAsMCGenEtaXiPlus", "#eta of gen. #Xi^{+} (associated); #eta; Count", 100, -5, 5);
- fListHistCascade->Add( fHistAsMCGenEtaXiPlus );
- }
- if (!fHistAsMCGenEtaOmegaMinus) {
- fHistAsMCGenEtaOmegaMinus = new TH1F("fHistAsMCGenEtaOmegaMinus", "#eta of gen. #Omega^{-} (associated);#eta;Number of Casc", 100, -5, 5);
- fListHistCascade->Add( fHistAsMCGenEtaOmegaMinus );
- }
- if (!fHistAsMCGenEtaOmegaPlus) {
- fHistAsMCGenEtaOmegaPlus = new TH1F("fHistAsMCGenEtaOmegaPlus", "#eta of gen. #Omega^{+} (associated); #eta; Count", 100, -5, 5);
- fListHistCascade->Add( fHistAsMCGenEtaOmegaPlus );
- }
- // - Resolution in Pt as function of generated Pt
- if (! f2dHistAsMCResPtXiMinus) {
- f2dHistAsMCResPtXiMinus = new TH2F("f2dHistAsMCResPtXiMinus", "Resolution in Pt reconstruction for #Xi^{-}; Pt_{MC} (GeV/c); (Pt_{reco} - Pt_{MC}) / Pt_{MC}", 200, 0., 10., 200, -0.1, 0.1);
- fListHistCascade->Add(f2dHistAsMCResPtXiMinus);
- }
- if (! f2dHistAsMCResPtXiPlus) {
- f2dHistAsMCResPtXiPlus = new TH2F("f2dHistAsMCResPtXiPlus", "Resolution in Pt reconstruction for #Xi^{+}; Pt_{MC} (GeV/c); (Pt_{reco} - Pt_{MC}) / Pt_{MC}", 200, 0., 10., 200, -0.1, 0.1);
- fListHistCascade->Add(f2dHistAsMCResPtXiPlus);
- }
- if (! f2dHistAsMCResPtOmegaMinus) {
- f2dHistAsMCResPtOmegaMinus = new TH2F("f2dHistAsMCResPtOmegaMinus", "Resolution in Pt reconstruction for #Omega^{-}; Pt_{MC} (GeV/c); (Pt_{reco} - Pt_{MC}) / Pt_{MC}", 200, 0., 10., 200, -0.1, 0.1);
- fListHistCascade->Add(f2dHistAsMCResPtOmegaMinus);
- }
- if (! f2dHistAsMCResPtOmegaPlus) {
- f2dHistAsMCResPtOmegaPlus = new TH2F("f2dHistAsMCResPtOmegaPlus", "Resolution in Pt reconstruction for #Omega^{+}; Pt_{MC} (GeV/c); (Pt_{reco} - Pt_{MC}) / Pt_{MC}", 200, 0., 10., 200, -0.1, 0.1);
- fListHistCascade->Add(f2dHistAsMCResPtOmegaPlus);
- }
- // - Resolution in R(2D) as function of generated R
- if (! f2dHistAsMCResRXiMinus) {
- f2dHistAsMCResRXiMinus = new TH2F("f2dHistAsMCResRXiMinus", "Resolution in transv. position for #Xi^{-}; R_{MC} (cm); (R_{reco} - R_{MC}) / R_{MC}", 450, 0., 45.0, 240, -0.3, 0.3);
- fListHistCascade->Add(f2dHistAsMCResRXiMinus);
- }
- if (! f2dHistAsMCResRXiPlus) {
- f2dHistAsMCResRXiPlus = new TH2F("f2dHistAsMCResRXiPlus", "Resolution in transv. position for #Xi^{+}; R_{MC} (cm); (R_{reco} - R_{MC}) / R_{MC}", 450, 0., 45.0, 240, -0.3, 0.3);
- fListHistCascade->Add(f2dHistAsMCResRXiPlus);
- }
- if (! f2dHistAsMCResROmegaMinus) {
- f2dHistAsMCResROmegaMinus = new TH2F("f2dHistAsMCResROmegaMinus", "Resolution in transv. position for #Omega^{-}; R_{MC} (cm); (R_{reco} - R_{MC}) / R_{MC}", 450, 0., 45.0, 240, -0.3, 0.3);
- fListHistCascade->Add(f2dHistAsMCResROmegaMinus);
- }
- if (! f2dHistAsMCResROmegaPlus) {
- f2dHistAsMCResROmegaPlus = new TH2F("f2dHistAsMCResROmegaPlus", "Resolution in transv. position for #Omega^{+}; R_{MC} (cm); (R_{reco} - R_{MC}) / R_{MC}", 450, 0., 45.0, 240, -0.3, 0.3);
- fListHistCascade->Add(f2dHistAsMCResROmegaPlus);
- }
- // - Resolution in phi as function of generated Pt
- if (! f2dHistAsMCResPhiXiMinus) {
- f2dHistAsMCResPhiXiMinus = new TH2F("f2dHistAsMCResPhiXiMinus", "Resolution in #phi for #Xi^{-}; Pt_{MC} (GeV/c); #phi(MC) - #phi(reco) (deg)", 200, 0., 10., 60, -30., 30.);
- fListHistCascade->Add(f2dHistAsMCResPhiXiMinus);
- }
- if (! f2dHistAsMCResPhiXiPlus) {
- f2dHistAsMCResPhiXiPlus = new TH2F("f2dHistAsMCResPhiXiPlus", "Resolution in #phi for #Xi^{+}; Pt_{MC} (GeV/c); #phi(MC) - #phi(reco) (deg)", 200, 0., 10., 60, -30., 30.);
- fListHistCascade->Add(f2dHistAsMCResPhiXiPlus);
- }
- if (! f2dHistAsMCResPhiOmegaMinus) {
- f2dHistAsMCResPhiOmegaMinus = new TH2F("f2dHistAsMCResPhiOmegaMinus", "Resolution in #phi for #Omega^{-}; Pt_{MC} (GeV/c); #phi(MC) - #phi(reco) (deg)", 200, 0., 10., 60, -30., 30.);
- fListHistCascade->Add(f2dHistAsMCResPhiOmegaMinus);
- }
- if (! f2dHistAsMCResPhiOmegaPlus) {
- f2dHistAsMCResPhiOmegaPlus = new TH2F("f2dHistAsMCResPhiOmegaPlus", "Resolution in #phi for #Omega^{+}; Pt_{MC} (GeV/c); #phi(MC) - #phi(reco) (deg)", 200, 0., 10., 60, -30., 30.);
- fListHistCascade->Add(f2dHistAsMCResPhiOmegaPlus);
- }
- // - Correlation between proton (antiproton) daughter MC pt and Xi/Omega MC pt (to apply Geant/Fluka correction)
- if (!f2dHistAsMCptProtonMCptXiMinus) {
- f2dHistAsMCptProtonMCptXiMinus = new TH2F("f2dHistAsMCptProtonMCptXiMinus", "Proton MC pt vs Xi- MC pt", 100, 0., 10., 100, 0., 10.);
- fListHistCascade->Add(f2dHistAsMCptProtonMCptXiMinus);
- }
- if (!f2dHistAsMCptAntiprotonMCptXiPlus) {
- f2dHistAsMCptAntiprotonMCptXiPlus = new TH2F("f2dHistAsMCptAntiprotonMCptXiPlus", "Antiproton MC pt vs Xi+ MC pt", 100, 0., 10., 100, 0., 10.);
- fListHistCascade->Add(f2dHistAsMCptAntiprotonMCptXiPlus);
- }
- if (!f2dHistAsMCptProtonMCptOmegaMinus) {
- f2dHistAsMCptProtonMCptOmegaMinus = new TH2F("f2dHistAsMCptProtonMCptOmegaMinus", "Proton MC pt vs Omega- MC pt", 100, 0., 10., 100, 0., 10.);
- fListHistCascade->Add(f2dHistAsMCptProtonMCptOmegaMinus);
- }
- if (!f2dHistAsMCptAntiprotonMCptOmegaPlus) {
- f2dHistAsMCptAntiprotonMCptOmegaPlus = new TH2F("f2dHistAsMCptAntiprotonMCptOmegaPlus", "Antiproton MC pt vs Omega+ MC pt", 100, 0., 10., 100, 0., 10.);
- fListHistCascade->Add(f2dHistAsMCptAntiprotonMCptOmegaPlus);
- }
- // - Cosine of Pointing angle
- if (! fHistV0toXiCosineOfPointingAngle) {
- fHistV0toXiCosineOfPointingAngle = new TH1F("fHistV0toXiCosineOfPointingAngle", "Cos. of V0 Ptng Angl / Xi vtx ; Cos(V0 Point. Angl / Xi vtx); Counts", 200, 0.95, 1.0001);
- fListHistCascade->Add(fHistV0toXiCosineOfPointingAngle);
- }
- if (! fHistV0CosineOfPointingAnglevsPtXi) {
- fHistV0CosineOfPointingAnglevsPtXi = new TH2F("fHistV0CosineOfPointingAnglevsPtXi", "Cos. of V0 Ptng Angl vs cascade Pt; Cos(V0 Point. Angl); Counts", 100, 0., 10., 200, 0.95, 1.0001);
- fListHistCascade->Add(fHistV0CosineOfPointingAnglevsPtXi);
- }
- if (! fHistV0CosineOfPointingAnglevsPtOmega) {
- fHistV0CosineOfPointingAnglevsPtOmega = new TH2F("fHistV0CosineOfPointingAnglevsPtOmega", "Cos. of V0 Ptng Angl vs cascade Pt; Cos(V0 Point. Angl); Counts", 100, 0., 10., 200, 0.95, 1.0001);
- fListHistCascade->Add(fHistV0CosineOfPointingAnglevsPtOmega);
- }
-
- //--------------
- // - CFContainer
- // PID container Xi-
- if(! fCFContCascadePIDAsXiMinus) {
- const Int_t lNbSteps = 7;
- const Int_t lNbVariables = 3;
- //Array for the number of bins in each dimension:
- Int_t lNbBinsPerVar[3] = {0};
- lNbBinsPerVar[0] = 100;
- lNbBinsPerVar[1] = 800;
- lNbBinsPerVar[2] = 22;
- fCFContCascadePIDAsXiMinus = new AliCFContainer(Form("fCFContCascadePIDAsXiMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{-} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );
- //Setting the bin limits
- fCFContCascadePIDAsXiMinus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)
- fCFContCascadePIDAsXiMinus->SetBinLimits(1, 1.2 , 2.0 ); // Xi Effective mass
- fCFContCascadePIDAsXiMinus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity
- //Setting the step title : one per PID case
- fCFContCascadePIDAsXiMinus->SetStepTitle(0, "No PID");
- fCFContCascadePIDAsXiMinus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");
- fCFContCascadePIDAsXiMinus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");
- fCFContCascadePIDAsXiMinus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");
- fCFContCascadePIDAsXiMinus->SetStepTitle(4, "Comb. PID / Bachelor");
- fCFContCascadePIDAsXiMinus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");
- fCFContCascadePIDAsXiMinus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");
- //Setting the variable title, per axis
- fCFContCascadePIDAsXiMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
- fCFContCascadePIDAsXiMinus->SetVarTitle(1, "M( #Lambda , #pi^{-} ) (GeV/c^{2})");
- fCFContCascadePIDAsXiMinus->SetVarTitle(2, "Y_{#Xi}");
- fListHistCascade->Add(fCFContCascadePIDAsXiMinus);
- }
- // PID container Xi+
- if(! fCFContCascadePIDAsXiPlus) {
- const Int_t lNbSteps = 7;
- const Int_t lNbVariables = 3;
- //Array for the number of bins in each dimension :
- Int_t lNbBinsPerVar[3] = {0};
- lNbBinsPerVar[0] = 100;
- lNbBinsPerVar[1] = 800;
- lNbBinsPerVar[2] = 22;
- fCFContCascadePIDAsXiPlus = new AliCFContainer(Form("fCFContCascadePIDAsXiPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{+} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );
- //Setting the bin limits (valid for v4-18-10-AN)
- fCFContCascadePIDAsXiPlus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)
- fCFContCascadePIDAsXiPlus->SetBinLimits(1, 1.2 , 2.0 ); // Xi Effective mass
- fCFContCascadePIDAsXiPlus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity
- //Setting the step title : one per PID case
- fCFContCascadePIDAsXiPlus->SetStepTitle(0, "No PID");
- fCFContCascadePIDAsXiPlus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");
- fCFContCascadePIDAsXiPlus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");
- fCFContCascadePIDAsXiPlus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");
- fCFContCascadePIDAsXiPlus->SetStepTitle(4, "Comb. PID / Bachelor");
- fCFContCascadePIDAsXiPlus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");
- fCFContCascadePIDAsXiPlus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");
- //Setting the variable title, per axis
- fCFContCascadePIDAsXiPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
- fCFContCascadePIDAsXiPlus->SetVarTitle(1, "M( #Lambda , #pi^{+} ) (GeV/c^{2})");
- fCFContCascadePIDAsXiPlus->SetVarTitle(2, "Y_{#Xi}");
- fListHistCascade->Add(fCFContCascadePIDAsXiPlus);
- }
- // PID container Omega-
- if(! fCFContCascadePIDAsOmegaMinus) {
- const Int_t lNbSteps = 7;
- const Int_t lNbVariables = 3;
- //Array for the number of bins in each dimension :
- Int_t lNbBinsPerVar[3] = {0};
- lNbBinsPerVar[0] = 100;
- lNbBinsPerVar[1] = 1000;
- lNbBinsPerVar[2] = 22;
- fCFContCascadePIDAsOmegaMinus = new AliCFContainer(Form("fCFContCascadePIDAsOmegaMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{-} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
- //Setting the bin limits
- fCFContCascadePIDAsOmegaMinus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)
- fCFContCascadePIDAsOmegaMinus->SetBinLimits(1, 1.5 , 2.5 ); // Omega Effective mass
- fCFContCascadePIDAsOmegaMinus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity
- //Setting the step title : one per PID case
- fCFContCascadePIDAsOmegaMinus->SetStepTitle(0, "No PID");
- fCFContCascadePIDAsOmegaMinus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");
- fCFContCascadePIDAsOmegaMinus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");
- fCFContCascadePIDAsOmegaMinus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");
- fCFContCascadePIDAsOmegaMinus->SetStepTitle(4, "Comb. PID / Bachelor");
- fCFContCascadePIDAsOmegaMinus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");
- fCFContCascadePIDAsOmegaMinus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");
- //Setting the variable title, per axis
- fCFContCascadePIDAsOmegaMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
- fCFContCascadePIDAsOmegaMinus->SetVarTitle(1, "M( #Lambda , K^{-} ) (GeV/c^{2})");
- fCFContCascadePIDAsOmegaMinus->SetVarTitle(2, "Y_{#Omega}");
- fListHistCascade->Add(fCFContCascadePIDAsOmegaMinus);
- }
- // PID container Omega+
- if(! fCFContCascadePIDAsOmegaPlus) {
- const Int_t lNbSteps = 7;
- const Int_t lNbVariables = 3;
- //Array for the number of bins in each dimension :
- Int_t lNbBinsPerVar[3]= {0};
- lNbBinsPerVar[0] = 100;
- lNbBinsPerVar[1] = 1000;
- lNbBinsPerVar[2] = 22;
- fCFContCascadePIDAsOmegaPlus = new AliCFContainer(Form("fCFContCascadePIDAsOmegaPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{+} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
- //Setting the bin limits
- fCFContCascadePIDAsOmegaPlus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)
- fCFContCascadePIDAsOmegaPlus->SetBinLimits(1, 1.5 , 2.5 ); // Omega Effective mass
- fCFContCascadePIDAsOmegaPlus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity
- //Setting the step title : one per PID case
- fCFContCascadePIDAsOmegaPlus->SetStepTitle(0, "No PID");
- fCFContCascadePIDAsOmegaPlus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");
- fCFContCascadePIDAsOmegaPlus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");
- fCFContCascadePIDAsOmegaPlus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");
- fCFContCascadePIDAsOmegaPlus->SetStepTitle(4, "Comb. PID / Bachelor");
- fCFContCascadePIDAsOmegaPlus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");
- fCFContCascadePIDAsOmegaPlus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");
- //Setting the variable title, per axis
- fCFContCascadePIDAsOmegaPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
- fCFContCascadePIDAsOmegaPlus->SetVarTitle(1, "M( #Lambda , K^{+} ) (GeV/c^{2})");
- fCFContCascadePIDAsOmegaPlus->SetVarTitle(2, "Y_{#Omega}");
- fListHistCascade->Add(fCFContCascadePIDAsOmegaPlus);
- }
- // Container for optimisation of topological selections
- if(! fCFContAsCascadeCuts){
- // Container meant to store all the relevant distributions corresponding to the cut variables.
- // - NB overflow/underflow of variables on which we want to cut later should be 0!!!
- const Int_t lNbSteps = 4;
- const Int_t lNbVariables = 19;
- //Array for the number of bins in each dimension :
- Int_t lNbBinsPerVar[lNbVariables] = {0};
- lNbBinsPerVar[0] = 25; //DcaCascDaughters : [0.0,2.,3.0] -> Rec.Cut = 2.0;
- lNbBinsPerVar[1] = 25; //DcaBachToPrimVertex : [0.0,0.24,100.0] -> Rec.Cur = 0.01;
- lNbBinsPerVar[2] = 30; //CascCosineOfPointingAngle : [0.97,1.] -> Rec.Cut = 0.98;
- lNbBinsPerVar[3] = 40; //CascRadius : [0.0,3.9,1000.0] -> Rec.Cut = 0.2;
- lNbBinsPerVar[4] = 30; //InvMassLambdaAsCascDghter : [1.1,1.3] -> Rec.Cut = 0.008;
- lNbBinsPerVar[5] = 20; //DcaV0Daughters : [0.0,2.0] -> Rec.Cut = 1.5;
- lNbBinsPerVar[6] = 201; //V0CosineOfPointingAngle : [0.89,1.0] -> Rec.Cut = 0.9;
- lNbBinsPerVar[7] = 40; //V0Radius : [0.0,3.9,1000.0] -> Rec.Cut = 0.2;
- lNbBinsPerVar[8] = 40; //DcaV0ToPrimVertex : [0.0,0.39,110.0] -> Rec.Cut = 0.01;
- lNbBinsPerVar[9] = 25; //DcaPosToPrimVertex : [0.0,0.24,100.0] -> Rec.Cut = 0.05;
- lNbBinsPerVar[10] = 25; //DcaNegToPrimVertex : [0.0,0.24,100.0] -> Rec.Cut = 0.05;
- lNbBinsPerVar[11] = 150; //InvMassXi : 2-MeV/c2 bins
- lNbBinsPerVar[12] = 120; //InvMassOmega : 2-MeV/c2 bins
- lNbBinsPerVar[13] = 100; //CascTransvMom : [0.0,10.0]
- lNbBinsPerVar[14] = 110; //Y(Xi) : 0.02 unit of y per bin
- lNbBinsPerVar[15] = 110; //Y(Omega) : 0.02 unit of y per bin
- lNbBinsPerVar[16] = 112; //Proper lenght of cascade
- lNbBinsPerVar[17] = 112; //Proper lenght of V0
- lNbBinsPerVar[18] = 112; //Distance V0-Xi in the transverse plane
- fCFContAsCascadeCuts = new AliCFContainer(Form("fCFContAsCascadeCuts_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Cut Container for Asso. Cascades", lNbSteps, lNbVariables, lNbBinsPerVar );
- //Setting the bin limits
- //0 - DcaCascDaughters
- Double_t *lBinLim0 = new Double_t[ lNbBinsPerVar[0]+1 ];
- 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;
- lBinLim0[ lNbBinsPerVar[0] ] = 3.0;
- fCFContAsCascadeCuts -> SetBinLimits(0, lBinLim0);
- delete[] lBinLim0;
- //1 - DcaBachToPrimVertex
- Double_t *lBinLim1 = new Double_t[ lNbBinsPerVar[1]+1 ];
- 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;
- lBinLim1[ lNbBinsPerVar[1] ] = 100.0;
- fCFContAsCascadeCuts -> SetBinLimits(1, lBinLim1);
- delete [] lBinLim1;
- //2 - CascCosineOfPointingAngle
- fCFContAsCascadeCuts -> SetBinLimits(2, .97, 1.);
- //3 - CascRadius
- Double_t *lBinLim3 = new Double_t[ lNbBinsPerVar[3]+1 ];
- 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;
- lBinLim3[ lNbBinsPerVar[3] ] = 1000.0;
- fCFContAsCascadeCuts -> SetBinLimits(3, lBinLim3);
- delete[] lBinLim3;
- //4 - InvMassLambdaAsCascDghter
- fCFContAsCascadeCuts->SetBinLimits(4, 1.1, 1.13);
- //5 - DcaV0Daughters
- fCFContAsCascadeCuts->SetBinLimits(5, 0., 2.);
- //6 - V0CosineOfPointingAngle
- fCFContAsCascadeCuts->SetBinLimits(6, 0.8, 1.001);
- //7 - V0Radius
- Double_t *lBinLim7 = new Double_t[ lNbBinsPerVar[7]+1 ];
- 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 ;
- lBinLim7[ lNbBinsPerVar[7] ] = 1000.0;
- fCFContAsCascadeCuts -> SetBinLimits(7, lBinLim7);
- delete [] lBinLim7;
- //8 - DcaV0ToPrimVertexXi : 0. to 0.4
- Double_t *lBinLim8 = new Double_t[ lNbBinsPerVar[8]+1 ];
- 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 ;
- lBinLim8[ lNbBinsPerVar[8] ] = 100.0;
- fCFContAsCascadeCuts -> SetBinLimits(8, lBinLim8);
- delete [] lBinLim8;
- //9 - DcaPosToPrimVertexXi
- Double_t *lBinLim9 = new Double_t[ lNbBinsPerVar[9]+1 ];
- 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;
- lBinLim9[ lNbBinsPerVar[9] ] = 100.0;
- fCFContAsCascadeCuts -> SetBinLimits(9, lBinLim9);
- delete [] lBinLim9;
- //10 - DcaNegToPrimVertexXi
- Double_t *lBinLim10 = new Double_t[ lNbBinsPerVar[10]+1 ];
- 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;
- lBinLim10[ lNbBinsPerVar[10] ] = 100.0;
- fCFContAsCascadeCuts -> SetBinLimits(10, lBinLim10);
- delete [] lBinLim10;
- //11 - InvMassXi
- fCFContAsCascadeCuts -> SetBinLimits(11, 1.25, 1.40);
- //12 - InvMassOmega
- fCFContAsCascadeCuts -> SetBinLimits(12, 1.62, 1.74);
- //13 - XiTransvMom
- fCFContAsCascadeCuts -> SetBinLimits(13, 0.0, 10.0);
- //14 - Y(Xi)
- fCFContAsCascadeCuts -> SetBinLimits(14, -1.1, 1.1);
- //15 - Y(Omega)
- fCFContAsCascadeCuts -> SetBinLimits(15, -1.1, 1.1);
- //16 - Proper time cascade
- Double_t *lBinLim16 = new Double_t[ lNbBinsPerVar[16]+1 ];
- for(Int_t i=0; i<lNbBinsPerVar[16]; i++) lBinLim16[i] = (Double_t)-1. + (110. + 1.0 )/(lNbBinsPerVar[16] - 1) * (Double_t)i;
- lBinLim16[ lNbBinsPerVar[16] ] = 2000.0;
- fCFContAsCascadeCuts -> SetBinLimits(16, lBinLim16);
- //17 - Proper time V0
- fCFContAsCascadeCuts -> SetBinLimits(17, lBinLim16);
- //18 - Distance V0-Xi in the transverse plane
- fCFContAsCascadeCuts -> SetBinLimits(18, lBinLim16);
- delete [] lBinLim16;
- // Setting the number of steps : one for each cascade species (Xi-, Xi+ and Omega-, Omega+)
- fCFContAsCascadeCuts->SetStepTitle(0, "#Xi^{-} candidates associated to MC");
- fCFContAsCascadeCuts->SetStepTitle(1, "#bar{#Xi}^{+} candidates associated to MC");
- fCFContAsCascadeCuts->SetStepTitle(2, "#Omega^{-} candidates associated to MC");
- fCFContAsCascadeCuts->SetStepTitle(3, "#bar{#Omega}^{+} candidates associated to MC");
- // Setting the variable title, per axis
- fCFContAsCascadeCuts->SetVarTitle(0, "DCA(cascade daughters) (cm)");
- fCFContAsCascadeCuts->SetVarTitle(1, "ImpactParamToPV(bachelor) (cm)");
- fCFContAsCascadeCuts->SetVarTitle(2, "cos(cascade PA)");
- fCFContAsCascadeCuts->SetVarTitle(3, "R_{2d}(cascade decay) (cm)");
- fCFContAsCascadeCuts->SetVarTitle(4, "M_{#Lambda}(as casc dghter) (GeV/c^{2})");
- fCFContAsCascadeCuts->SetVarTitle(5, "DCA(V0 daughters) (cm)");
- fCFContAsCascadeCuts->SetVarTitle(6, "cos(V0 PA) in cascade");
- fCFContAsCascadeCuts->SetVarTitle(7, "R_{2d}(V0 decay) (cm)");
- fCFContAsCascadeCuts->SetVarTitle(8, "ImpactParamToPV(V0) (cm)");
- fCFContAsCascadeCuts->SetVarTitle(9, "ImpactParamToPV(Pos) (cm)");
- fCFContAsCascadeCuts->SetVarTitle(10, "ImpactParamToPV(Neg) (cm)");
- fCFContAsCascadeCuts->SetVarTitle(11, "Inv. Mass(Xi) (GeV/c^{2})");
- fCFContAsCascadeCuts->SetVarTitle(12, "Inv. Mass(Omega) (GeV/c^{2})");
- fCFContAsCascadeCuts->SetVarTitle(13, "Pt_{MC}(cascade) (GeV/c)");
- fCFContAsCascadeCuts->SetVarTitle(14, "Y_{MC}(Xi)");
- fCFContAsCascadeCuts->SetVarTitle(15, "Y_{MC}(Omega)");
- fCFContAsCascadeCuts->SetVarTitle(16, "mL/p cascade (cm)");
- fCFContAsCascadeCuts->SetVarTitle(17, "mL/p V0 (cm)");
- fCFContAsCascadeCuts->SetVarTitle(18, "Distance V0-Cascade in the transverse plane (cm)");
- fListHistCascade->Add(fCFContAsCascadeCuts);
- }
-
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDAsXiMinus);
- PostData(3, fCFContCascadePIDAsXiPlus);
- PostData(4, fCFContCascadePIDAsOmegaMinus);
- PostData(5, fCFContCascadePIDAsOmegaPlus);
- PostData(6, fCFContAsCascadeCuts);
-
-}// end CreateOutputObjects
-
-
-//________________________________________________________________________
-void AliAnalysisTaskCheckPerformanceCascadepp276::UserExec(Option_t *) {
-
- //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- // Main loop (called for each event)
- //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
- //------------------
- // - Define variables
- AliESDEvent *lESDevent = 0x0;
- AliAODEvent *lAODevent = 0x0;
- AliMCEvent *lMCevent = 0x0;
- AliStack *lMCstack = 0x0;
- TClonesArray *arrayMC = 0;
-
- //-------------------------
- // - Check the PID response
- if (!fPIDResponse) {
- AliError("Cannot get pid response");
- return;
- }
-
-
- //////////////////
- // Event selection
- //////////////////
- // In order:
- // 1) SDD selection
- // 2) Physics selection
- // 3) Select only looking at events with well-established PV
- // 4) Pileup selection
- // 5) |Z| < 10 cm
-
- //---------------------------------------------------------
- // Load the InputEvent and check it (for the ESD and AOD)
- if (fAnalysisType == "ESD") {
- lESDevent = dynamic_cast<AliESDEvent*>( InputEvent() );
- if (!lESDevent) {
- Printf("ERROR: lESDevent not available \n");
- cout << "Name of the file with pb :" << CurrentFileName() << endl;
- return;
- }
- lMCevent = MCEvent();
- if (!lMCevent) {
- Printf("ERROR: Could not retrieve MC event \n");
- cout << "Name of the file with pb :" << CurrentFileName() << endl;
- return;
- }
- lMCstack = lMCevent->Stack();
- if (!lMCstack) {
- Printf("ERROR: Could not retrieve MC stack \n");
- cout << "Name of the file with pb :" << CurrentFileName() << endl;
- return;
- }
- // - Cascade vertexer (ESD)
- // Relaunch V0 and Cascade vertexer
- if (fkRerunV0CascVertexers) {
- lESDevent->ResetCascades();
- lESDevent->ResetV0s();
- //AliV0vertexer lV0vtxer;
- //AliCascadeVertexer lCascVtxer;
- //lV0vtxer.SetCuts(fV0Sels);
- //lCascVtxer.SetCuts(fCascSels);
- //lV0vtxer.Tracks2V0vertices(lESDevent);
- //lCascVtxer.V0sTracks2CascadeVertices(lESDevent);
- }
- } else if (fAnalysisType == "AOD") {
- lAODevent = dynamic_cast<AliAODEvent*>( InputEvent() );
- if (!lAODevent) {
- Printf("ERROR: lAODevent not available \n");
- cout << "Name of the file with pb :" << CurrentFileName() << endl;
- return;
- }
- arrayMC = (TClonesArray*) lAODevent->GetList()->FindObject(AliAODMCParticle::StdBranchName());
- if (!arrayMC) AliFatal("Error: MC particles branch not found!\n");
- } else {
- Printf("Analysis type (ESD or AOD) not specified \n");
- return;
- }
-
- //------------------------------
- // - Plots Before any selections
- //------------------------------
- // - Define variables
- Int_t ncascadesBeforeAnySel = -1; //number of cascades before any selections
- Int_t nTrackMultiplicityBeforeAnySel = -1; //number of tracks before any selections
- if (fAnalysisType == "ESD") {
- //Multiplicity
- Int_t lMultiplicity = -100;
- lMultiplicity = fESDtrackCuts->GetReferenceMultiplicity(lESDevent, AliESDtrackCuts::kTrackletsITSTPC, 0.5);
- nTrackMultiplicityBeforeAnySel = lMultiplicity;
- ncascadesBeforeAnySel = lESDevent->GetNumberOfCascades();
- } else if (fAnalysisType == "AOD") {
- //Multiplicity
- Int_t lMultiplicity = -100;
- nTrackMultiplicityBeforeAnySel = lMultiplicity;
- ncascadesBeforeAnySel = lAODevent->GetNumberOfCascades();
- }
- fHistTrackMultiplicityBeforeAnySel->Fill(nTrackMultiplicityBeforeAnySel);
- fHistCascadeMultiplicityBeforeAnySel->Fill(ncascadesBeforeAnySel);
-
- //----------------
- // - SDD selection
- //----------------
- // - Define variables
- Int_t ncascadesAfterSDDSel = -1; //number of cascades after SDD selection
- Int_t nTrackMultiplicityAfterSDDSel = -1; //number of tracks after SDD selection
- if (fkSDDselectionOn) {
- TString trcl = " ";
- trcl = lESDevent->GetFiredTriggerClasses();
- if (fAnalysisType == "ESD") trcl = lESDevent->GetFiredTriggerClasses();
- else if (fAnalysisType == "AOD") trcl = lAODevent->GetFiredTriggerClasses();
- if (fwithSDD){ // ---> Select event with SDD ON
- if(!(trcl.Contains("ALLNOTRD"))) {
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDAsXiMinus);
- PostData(3, fCFContCascadePIDAsXiPlus);
- PostData(4, fCFContCascadePIDAsOmegaMinus);
- PostData(5, fCFContCascadePIDAsOmegaPlus);
- PostData(6, fCFContAsCascadeCuts);
- cout<<"Bad event: SDD turn OFF => RETURN!! (Exclude it)..."<<endl;
- return;
- } else {
- cout<<"Good event: SDD turn ON."<<endl;
- }
- } else if (!fwithSDD){ // ---> Select event with SDD OFF
- if((trcl.Contains("ALLNOTRD"))) {
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDAsXiMinus);
- PostData(3, fCFContCascadePIDAsXiPlus);
- PostData(4, fCFContCascadePIDAsOmegaMinus);
- PostData(5, fCFContCascadePIDAsOmegaPlus);
- PostData(6, fCFContAsCascadeCuts);
- cout<<"Bad event: SDD turn ON => RETURN!! (Exclude it)..."<<endl;
- return;
- } else {
- cout<<"Good event: SDD turn OFF."<<endl;
- }
- }
- }
- // - Take the number of cascades and tracks after the SDD selection
- if (fAnalysisType == "ESD") {
- Int_t lMultiplicity = -100;
- lMultiplicity = fESDtrackCuts->GetReferenceMultiplicity(lESDevent, AliESDtrackCuts::kTrackletsITSTPC, 0.5);
- ncascadesAfterSDDSel = lESDevent->GetNumberOfCascades();
- nTrackMultiplicityAfterSDDSel = lMultiplicity;
- } else if (fAnalysisType == "AOD") {
- Int_t lMultiplicity = -100;
- ncascadesAfterSDDSel = lAODevent->GetNumberOfCascades();
- nTrackMultiplicityAfterSDDSel = lMultiplicity;
- }
- // - Fill the plots
- fHistTrackMultiplicityAfterSDDSel->Fill(nTrackMultiplicityAfterSDDSel);
- fHistCascadeMultiplicityAfterSDDSel->Fill(ncascadesAfterSDDSel);
-
- //------------------------------
- // - Plots pre-physics selection
- //------------------------------
- // - Produce the 3Dhisto for the efficiency denominator
- Int_t lNbMCPrimary = 0;
- lNbMCPrimary = lMCstack->GetNprimary();
-
- for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < lNbMCPrimary; iCurrentLabelStack++) {
-
- Double_t partEnergy = 0.;
- Double_t partPz = 0.;
- Double_t partP = 0.;
- Double_t partPt = 0.;
- Double_t partVx = 0.;
- Double_t partVy = 0.;
- Double_t partVz = 0.;
- Double_t bacVx = 0.;
- Double_t bacVy = 0.;
- Double_t bacVz = 0.;
- Double_t partMass = 0.;
- Int_t PDGcode = 0;
- Int_t lPrimaryTrackMultiplicity = nTrackMultiplicityAfterSDDSel;
-
- if ( fAnalysisType == "ESD" ) {
- TParticle* lCurrentParticlePrimary = 0x0;
- lCurrentParticlePrimary = lMCstack->Particle( iCurrentLabelStack );
- if (!lCurrentParticlePrimary) {
- Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack );
- continue;
- }
- if (!lMCstack->IsPhysicalPrimary(iCurrentLabelStack)) continue;
- TParticle* xiMC = 0x0;
- xiMC = lCurrentParticlePrimary;
- if (!xiMC) {
- Printf("MC TParticle pointer to Cascade = 0x0 ! Skip ...");
- continue;
- }
- partEnergy = xiMC->Energy();
- partPz = xiMC->Pz();
- partPt = xiMC->Pt();
- partP = xiMC->P();
- partMass = xiMC->GetMass();
- partVx = xiMC->Vx();
- partVy = xiMC->Vy();
- partVz = xiMC->Vz();
- if (xiMC->GetDaughter(0)>=0) {
- TParticle *mcBach = lMCstack->Particle(xiMC->GetDaughter(0));
- if (mcBach) {
- bacVx = mcBach->Vx();
- bacVy = mcBach->Vy();
- bacVz = mcBach->Vz();
- }
- }
- PDGcode = lCurrentParticlePrimary->GetPdgCode();
- } else if ( fAnalysisType == "AOD" ) {
- AliAODMCParticle *lCurrentParticleaod = (AliAODMCParticle*) arrayMC->At(iCurrentLabelStack);
- if (!lCurrentParticleaod) {
- Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack );
- continue;
- }
- if (!lCurrentParticleaod->IsPhysicalPrimary()) continue;
- partEnergy = lCurrentParticleaod->E();
- partPz = lCurrentParticleaod->Pz();
- partP = lCurrentParticleaod->P();
- partPt = lCurrentParticleaod->Pt();
- partMass = lCurrentParticleaod->M();
- partVx = lCurrentParticleaod->Xv();
- partVy = lCurrentParticleaod->Yv();
- partVz = lCurrentParticleaod->Zv();
- if (lCurrentParticleaod->GetDaughter(0)>=0) {
- AliAODMCParticle *mcBach = (AliAODMCParticle*) arrayMC->At(lCurrentParticleaod->GetDaughter(0));
- if (mcBach) {
- bacVx = mcBach->Xv();
- bacVy = mcBach->Yv();
- bacVz = mcBach->Zv();
- }
- }
- PDGcode = lCurrentParticleaod->GetPdgCode();
- }
-
- // - Calculate rapidity
- Double_t lRapXiMC = 0.5*TMath::Log((partEnergy + partPz) / (partEnergy - partPz + 1.e-13));
- // - Calculate proper lenght
- Double_t lctau = TMath::Sqrt((partVx-bacVx)*(partVx-bacVx)+(partVy-bacVy)*(partVy-bacVy)+(partVz-bacVz)*(partVz-bacVz));
- if (partP != 0.) lctau = lctau*partMass/partP;
- else lctau = -1.;
- // - Fill Histograms
- if (PDGcode == 3312) {
- f3dHistGenPtVsGenYvsNtracksXiMinus->Fill(partPt, lRapXiMC, lPrimaryTrackMultiplicity);
- f3dHistGenPtVsGenctauvsYXiMinus->Fill(partPt, lctau, lRapXiMC);
- }
- if (PDGcode == -3312) {
- f3dHistGenPtVsGenYvsNtracksXiPlus->Fill(partPt, lRapXiMC, lPrimaryTrackMultiplicity);
- f3dHistGenPtVsGenctauvsYXiPlus->Fill(partPt, lctau, lRapXiMC);
- }
- if (PDGcode == 3334) {
- f3dHistGenPtVsGenYvsNtracksOmegaMinus->Fill(partPt, lRapXiMC, lPrimaryTrackMultiplicity);
- f3dHistGenPtVsGenctauvsYOmegaMinus->Fill(partPt, lctau, lRapXiMC);
- }
- if (PDGcode == -3334) {
- f3dHistGenPtVsGenYvsNtracksOmegaPlus->Fill(partPt, lRapXiMC, lPrimaryTrackMultiplicity);
- f3dHistGenPtVsGenctauvsYOmegaPlus->Fill(partPt, lctau, lRapXiMC);
- }
- }
-
-
- //--------------------
- // - Physics selection
- //--------------------
- // - Define new variables
- Int_t ncascadesAfterPhysicsSel = -1; //number of cascades after physics selection
- Int_t nTrackMultiplicityAfterPhysicsSel = -1; //number of tracks after physics selection
- // - Selection for ESD and AOD
- if (fAnalysisType == "ESD") {
- UInt_t maskIsSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
- Bool_t isSelected = 0;
- isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB;
- if(!isSelected){
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDAsXiMinus);
- PostData(3, fCFContCascadePIDAsXiPlus);
- PostData(4, fCFContCascadePIDAsOmegaMinus);
- PostData(5, fCFContCascadePIDAsOmegaPlus);
- PostData(6, fCFContAsCascadeCuts);
- return;
- }
- // - Take the number of cascades and tracks after physics selection
- ncascadesAfterPhysicsSel = lESDevent->GetNumberOfCascades();
- nTrackMultiplicityAfterPhysicsSel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent, AliESDtrackCuts::kTrackletsITSTPC, 0.5);
- } else if (fAnalysisType == "AOD") {
- UInt_t maskIsSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
- Bool_t isSelected = 0;
- isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB;
- if(!isSelected){
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDAsXiMinus);
- PostData(3, fCFContCascadePIDAsXiPlus);
- PostData(4, fCFContCascadePIDAsOmegaMinus);
- PostData(5, fCFContCascadePIDAsOmegaPlus);
- PostData(6, fCFContAsCascadeCuts);
- return;
- }
- // - Take the number of cascades and tracks after physics selection
- ncascadesAfterPhysicsSel = lAODevent->GetNumberOfCascades();
- nTrackMultiplicityAfterPhysicsSel = -100;
- }
- fHistCascadeMultiplicityAfterPhysicsSel->Fill(ncascadesAfterPhysicsSel);
- fHistTrackMultiplicityAfterPhysicsSel->Fill(nTrackMultiplicityAfterPhysicsSel);
-
- //-------------------------------------------------------
- // Select only looking at events with well-established PV
- //-------------------------------------------------------
- Int_t ncascadesForSelEvtNoTPCOnly = -1; //number of cascades after the TPConly selection
- Int_t nTrackMultiplicityForSelEvtNoTPCOnly = -1; //number of tracks after the TPConly selection
- if (fAnalysisType == "ESD" ) {
- // - Select only looking at events with well-established PV
- if (fkQualityCutNoTPConlyPrimVtx) {
- const AliESDVertex *lPrimarySPDVtx = lESDevent->GetPrimaryVertexSPD();
- const AliESDVertex *lPrimaryTrackingVtx = lESDevent->GetPrimaryVertexTracks();
- if (!lPrimarySPDVtx->GetStatus() && !lPrimaryTrackingVtx->GetStatus() ){
- AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !");
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDAsXiMinus);
- PostData(3, fCFContCascadePIDAsXiPlus);
- PostData(4, fCFContCascadePIDAsOmegaMinus);
- PostData(5, fCFContCascadePIDAsOmegaPlus);
- PostData(6, fCFContAsCascadeCuts);
- return;
- }
- }
- // - Take the number of cascades and tracks after TPConly selection
- ncascadesForSelEvtNoTPCOnly = lESDevent->GetNumberOfCascades();
- nTrackMultiplicityForSelEvtNoTPCOnly = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
- } else if (fAnalysisType == "AOD") {
- // - Select only looking at events with well-established PV
- if (fkQualityCutNoTPConlyPrimVtx) {
- const AliAODVertex *lPrimarySPDVtx = lAODevent->GetPrimaryVertexSPD();
- const AliAODVertex *lPrimaryTrackingAODVtx = lAODevent->GetPrimaryVertex();
- if (!lPrimarySPDVtx && !lPrimaryTrackingAODVtx) {
- AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !");
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDAsXiMinus);
- PostData(3, fCFContCascadePIDAsXiPlus);
- PostData(4, fCFContCascadePIDAsOmegaMinus);
- PostData(5, fCFContCascadePIDAsOmegaPlus);
- PostData(6, fCFContAsCascadeCuts);
- return;
- }
- }
- // - Take the number of cascades and tracks after TPConly selection
- ncascadesForSelEvtNoTPCOnly = lAODevent->GetNumberOfCascades();
- nTrackMultiplicityForSelEvtNoTPCOnly = -100; //FIXME
- }
- fHistCascadeMultiplicityForSelEvtNoTPCOnly->Fill(ncascadesForSelEvtNoTPCOnly);
- fHistTrackMultiplicityForSelEvtNoTPCOnly->Fill(nTrackMultiplicityForSelEvtNoTPCOnly);
-
- //-----------------
- // Pileup selection
- //-----------------
- Int_t ncascadesForSelEvtNoTPCOnlyNoPileup = -1; //number of cascades after the NoPileup selection
- Int_t nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = -1; //number of tracks after the Pileup selection
- if (fAnalysisType == "ESD" ) {
- // - Selection for pile up
- if (fkRejectEventPileUp) {
- if(lESDevent->IsPileupFromSPD()){
- AliWarning("Pb / Pile-up event ... return!");
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDAsXiMinus);
- PostData(3, fCFContCascadePIDAsXiPlus);
- PostData(4, fCFContCascadePIDAsOmegaMinus);
- PostData(5, fCFContCascadePIDAsOmegaPlus);
- PostData(6, fCFContAsCascadeCuts);
- return;
- }
- }
- // - Take the number of cascades and tracks after Pileup selection
- ncascadesForSelEvtNoTPCOnlyNoPileup = lESDevent->GetNumberOfCascades();
- nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
- } else if (fAnalysisType == "AOD") {
- // - Selection for pile up
- if (fkRejectEventPileUp) {
- if(lAODevent->IsPileupFromSPD()){
- AliWarning("Pb / Pile-up event ... return!");
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDAsXiMinus);
- PostData(3, fCFContCascadePIDAsXiPlus);
- PostData(4, fCFContCascadePIDAsOmegaMinus);
- PostData(5, fCFContCascadePIDAsOmegaPlus);
- PostData(6, fCFContAsCascadeCuts);
- return;
- }
- }
- // - Take the number of cascades and tracks after Pileup selection
- ncascadesForSelEvtNoTPCOnlyNoPileup = lAODevent->GetNumberOfCascades();
- nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = -100;
- }
- fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup->Fill(ncascadesForSelEvtNoTPCOnlyNoPileup);
- fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup->Fill(nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup);
-
- //-------------------
- // - Vertex selection
- //-------------------
- Int_t ncascadesAfterVertexSel = -1; //number of cascades after vertex selection
- Int_t nTrackMultiplicityAfterVertexSel = -1; //number of tracks after vertex selection
- Double_t lBestPrimaryVtxPos[3] = {-100.0, -100.0, -100.0};
- Double_t tPrimaryVtxPosition[3] = {-100.0, -100.0, -100.0};
- Double_t lMagneticField = -10.;
- if (fAnalysisType == "ESD" ) {
- // - Primary vertex definition
- const AliESDVertex *lPrimaryBestVtx = lESDevent->GetPrimaryVertex();
- if (!lPrimaryBestVtx) {
- AliWarning("No prim. vertex in AOD... return!");
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDAsXiMinus);
- PostData(3, fCFContCascadePIDAsXiPlus);
- PostData(4, fCFContCascadePIDAsOmegaMinus);
- PostData(5, fCFContCascadePIDAsOmegaPlus);
- PostData(6, fCFContAsCascadeCuts);
- return;
- }
- lPrimaryBestVtx->GetXYZ( lBestPrimaryVtxPos );
- // - Vertex position before any event selection on vertex position
- const AliVVertex *primaryVtx = lESDevent->GetPrimaryVertex();
- tPrimaryVtxPosition[0] = primaryVtx->GetX();
- tPrimaryVtxPosition[1] = primaryVtx->GetY();
- tPrimaryVtxPosition[2] = primaryVtx->GetZ();
- fHistPVx->Fill( tPrimaryVtxPosition[0] );
- fHistPVy->Fill( tPrimaryVtxPosition[1] );
- fHistPVz->Fill( tPrimaryVtxPosition[2] );
- // - Get magnetic filed info
- lMagneticField = lESDevent->GetMagneticField();
- // - Selection on the primary vertex Z position
- if (fkQualityCutZprimVtxPos) {
- if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange || TMath::Abs(lBestPrimaryVtxPos[2]) < fVtxRangeMin) {
- AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDAsXiMinus);
- PostData(3, fCFContCascadePIDAsXiPlus);
- PostData(4, fCFContCascadePIDAsOmegaMinus);
- PostData(5, fCFContCascadePIDAsOmegaPlus);
- PostData(6, fCFContAsCascadeCuts);
- return;
- }
- }
- // - Take the number of cascades and tracks after vertex Z position selection
- ncascadesAfterVertexSel = lESDevent->GetNumberOfCascades();
- nTrackMultiplicityAfterVertexSel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
- } else if (fAnalysisType == "AOD") {
- // - Primary vertex definition
- const AliAODVertex *lPrimaryBestAODVtx = lAODevent->GetPrimaryVertex(); // get the best primary vertex available for the event GetVertex(0)
- if (!lPrimaryBestAODVtx) {
- AliWarning("No prim. vertex in AOD... return!");
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDAsXiMinus);
- PostData(3, fCFContCascadePIDAsXiPlus);
- PostData(4, fCFContCascadePIDAsOmegaMinus);
- PostData(5, fCFContCascadePIDAsOmegaPlus);
- PostData(6, fCFContAsCascadeCuts);
- return;
- }
- lPrimaryBestAODVtx->GetXYZ( lBestPrimaryVtxPos );
- // - Vertex position before any event selection on vertex position
- const AliVVertex *primaryVtx = lAODevent->GetPrimaryVertex();
- tPrimaryVtxPosition[0] = primaryVtx->GetX();
- tPrimaryVtxPosition[1] = primaryVtx->GetY();
- tPrimaryVtxPosition[2] = primaryVtx->GetZ();
- fHistPVx->Fill( tPrimaryVtxPosition[0] );
- fHistPVy->Fill( tPrimaryVtxPosition[1] );
- fHistPVz->Fill( tPrimaryVtxPosition[2] );
- // - Get magnetic filed info
- lMagneticField = lAODevent->GetMagneticField();
- // - Selection on the primary vertex Z position
- if (fkQualityCutZprimVtxPos) {
- if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange && TMath::Abs(lBestPrimaryVtxPos[2]) < fVtxRangeMin) {
- AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDAsXiMinus);
- PostData(3, fCFContCascadePIDAsXiPlus);
- PostData(4, fCFContCascadePIDAsOmegaMinus);
- PostData(5, fCFContCascadePIDAsOmegaPlus);
- PostData(6, fCFContAsCascadeCuts);
- return;
- }
- }
- // - Take the number of cascades and tracks after vertex Z position selection
- ncascadesAfterVertexSel = lAODevent->GetNumberOfCascades();
- nTrackMultiplicityAfterVertexSel = -100;
- }
- // - Fill the plots
- fHistCascadeMultiplicityAfterVertexCutSel->Fill(ncascadesAfterVertexSel);
- fHistTrackMultiplicityAfterVertexCutSel->Fill(nTrackMultiplicityAfterVertexSel);
-
- // - Vertex position plots: after any event selections
- tPrimaryVtxPosition[0] = 0;
- tPrimaryVtxPosition[1] = 0;
- tPrimaryVtxPosition[2] = 0;
- if (fAnalysisType == "ESD" ) {
- const AliVVertex *primaryVtx = lESDevent->GetPrimaryVertex();
- tPrimaryVtxPosition[0] = primaryVtx->GetX();
- tPrimaryVtxPosition[1] = primaryVtx->GetY();
- tPrimaryVtxPosition[2] = primaryVtx->GetZ();
- } else if (fAnalysisType == "AOD") {
- const AliVVertex *primaryVtx = lAODevent->GetPrimaryVertex();
- tPrimaryVtxPosition[0] = primaryVtx->GetX();
- tPrimaryVtxPosition[1] = primaryVtx->GetY();
- tPrimaryVtxPosition[2] = primaryVtx->GetZ();
- }
- fHistPVxAnalysis->Fill( tPrimaryVtxPosition[0] );
- fHistPVyAnalysis->Fill( tPrimaryVtxPosition[1] );
- fHistPVzAnalysis->Fill( tPrimaryVtxPosition[2] );
-
-
- //----------------------------------------------------------------------
- // - Loop over the different types of GENERATED cascades (Xi-+, Omega-+)
- //----------------------------------------------------------------------
- // - Initialisation of useful local variables
- Int_t lPdgCodeCasc = 0;
- Int_t lPdgCodeBach = 0;
- Int_t lPdgCodeLambda = 0;
- Int_t lPdgCodeDghtMesV0 = 0;
- Int_t lPdgCodeDghtBarV0 = 0;
- TH1F *lHistEtaGenCasc = 0;
- TH3D *l3dHistGenPtVsGenYvsNtracksPhysEff = 0;
- TH3D *l3dHistGenPtVsGenctauvsYPhysEff = 0;
- TH1F *lHistThetaGenCasc = 0;
- TH2D *l2dHistGenPtVsGenYFdbl = 0;
- TH1F *lHistThetaLambda = 0;
- TH1F *lHistThetaBach = 0;
- TH1F *lHistThetaBarDghter = 0;
- TH1F *lHistThetaMesDghter = 0;
- TH1F *lHistPtBach = 0;
- TH1F *lHistPtBarDghter = 0;
- TH1F *lHistPtMesDghter = 0;
- Int_t ncascperev = 0;
- Int_t ncascperevtot = 0;
-
- for (Int_t iCascType = 1; iCascType < 5; iCascType++) {
- ncascperev = 0;
- ncascperevtot = 0;
- Int_t lPrimaryTrackMultiplicity = nTrackMultiplicityAfterSDDSel;
-
- switch (iCascType) {
- case 1: // Xi-
- lPdgCodeCasc = 3312; //Xi-
- lPdgCodeBach = -211; //Pi-
- lPdgCodeLambda = 3122; //Lambda0
- lPdgCodeDghtMesV0 = -211; //Pi-
- lPdgCodeDghtBarV0 = 2212; //Proton
- lHistEtaGenCasc = fHistEtaGenCascXiMinus; // this plot for any Xi-
- lHistThetaGenCasc = fHistThetaGenCascXiMinus; // cascades generated within acceptance (cut in pt + theta)
- l3dHistGenPtVsGenYvsNtracksPhysEff = f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff;
- l3dHistGenPtVsGenctauvsYPhysEff = f3dHistGenPtVsGenctauvsYXiMinusPhysEff;
- l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblXiMinus;
- lHistThetaLambda = fHistThetaLambdaXiMinus;
- lHistThetaBach = fHistThetaBachXiMinus;
- lHistThetaBarDghter = fHistThetaBarDghterXiMinus;
- lHistThetaMesDghter = fHistThetaMesDghterXiMinus;
- lHistPtBach = fHistPtBachXiMinus;
- lHistPtBarDghter = fHistPtBarDghterXiMinus;
- lHistPtMesDghter = fHistPtMesDghterXiMinus;
- break;
- case 2: // Xi+
- lPdgCodeCasc = -3312; //Xi+
- lPdgCodeBach = 211; //Pi+
- lPdgCodeLambda = -3122; //AntiLambda0
- lPdgCodeDghtMesV0 = 211; //Pi+
- lPdgCodeDghtBarV0 = -2212; //AntiProton
- lHistEtaGenCasc = fHistEtaGenCascXiPlus; // this plot for any Xi+
- lHistThetaGenCasc = fHistThetaGenCascXiPlus; // cascades generated within acceptance (cut in pt + theta)
- l3dHistGenPtVsGenYvsNtracksPhysEff = f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff;
- l3dHistGenPtVsGenctauvsYPhysEff = f3dHistGenPtVsGenctauvsYXiPlusPhysEff;
- l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblXiPlus;
- lHistThetaLambda = fHistThetaLambdaXiPlus;
- lHistThetaBach = fHistThetaBachXiPlus;
- lHistThetaBarDghter = fHistThetaBarDghterXiPlus;
- lHistThetaMesDghter = fHistThetaMesDghterXiPlus;
- lHistPtBach = fHistPtBachXiPlus;
- lHistPtBarDghter = fHistPtBarDghterXiPlus;
- lHistPtMesDghter = fHistPtMesDghterXiPlus;
- break;
- case 3: // Omega-
- lPdgCodeCasc = 3334; //Omega-
- lPdgCodeBach = -321; //K-
- lPdgCodeLambda = 3122; //Lambda0
- lPdgCodeDghtMesV0 = -211; //Pi-
- lPdgCodeDghtBarV0 = 2212; //Proton
- lHistEtaGenCasc = fHistEtaGenCascOmegaMinus; // this plot for any Omega+
- lHistThetaGenCasc = fHistThetaGenCascOmegaMinus; // cascades generated within acceptance (cut in pt + theta)
- l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblOmegaMinus;
- l3dHistGenPtVsGenYvsNtracksPhysEff = f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff;
- l3dHistGenPtVsGenctauvsYPhysEff = f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff;
- lHistThetaLambda = fHistThetaLambdaOmegaMinus;
- lHistThetaBach = fHistThetaBachOmegaMinus;
- lHistThetaBarDghter = fHistThetaBarDghterOmegaMinus;
- lHistThetaMesDghter = fHistThetaMesDghterOmegaMinus;
- lHistPtBach = fHistPtBachOmegaMinus;
- lHistPtBarDghter = fHistPtBarDghterOmegaMinus;
- lHistPtMesDghter = fHistPtMesDghterOmegaMinus;
- break;
- case 4: // Omega+
- lPdgCodeCasc = -3334; //Omega+
- lPdgCodeBach = 321; //K+
- lPdgCodeLambda = -3122; //AntiLambda0
- lPdgCodeDghtMesV0 = 211; //Pi+
- lPdgCodeDghtBarV0 = -2212; //AntiProton
- lHistEtaGenCasc = fHistEtaGenCascOmegaPlus; // this plot for any Omega-
- lHistThetaGenCasc = fHistThetaGenCascOmegaPlus; // cascades generated within acceptance (cut in pt + theta)
- l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblOmegaPlus;
- l3dHistGenPtVsGenYvsNtracksPhysEff = f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff;
- l3dHistGenPtVsGenctauvsYPhysEff = f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff;
- lHistThetaLambda = fHistThetaLambdaOmegaPlus;
- lHistThetaBach = fHistThetaBachOmegaPlus;
- lHistThetaBarDghter = fHistThetaBarDghterOmegaPlus;
- lHistThetaMesDghter = fHistThetaMesDghterOmegaPlus;
- lHistPtBach = fHistPtBachOmegaPlus;
- lHistPtBarDghter = fHistPtBarDghterOmegaPlus;
- lHistPtMesDghter = fHistPtMesDghterOmegaPlus;
- break;
- }
-
- for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < lNbMCPrimary; iCurrentLabelStack++) {
-
- Double_t partEnergy = 0.;
- Double_t partPz = 0.;
- Double_t partEta = 0.;
- Double_t partTheta = 0.;
- Double_t partP = 0.;
- Double_t partPt = 0.;
- Double_t partVx = 0.;
- Double_t partVy = 0.;
- Double_t partVz = 0.;
- Double_t bacVx = 0.;
- Double_t bacVy = 0.;
- Double_t bacVz = 0.;
- Double_t partMass = 0.;
-
- if ( fAnalysisType == "ESD" ) {
- TParticle* lCurrentParticle = 0x0;
- lCurrentParticle = lMCstack->Particle( iCurrentLabelStack );
- if (!lCurrentParticle) {
- Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack );
- continue;
- }
- if (!lMCstack->IsPhysicalPrimary(iCurrentLabelStack)) continue;
- if (lCurrentParticle->GetPdgCode() == lPdgCodeCasc) { // Here !
- TParticle* xiMC = 0x0;
- xiMC = lCurrentParticle;
- if (!xiMC) {
- Printf("MC TParticle pointer to Cascade = 0x0 ! Skip ...");
- continue;
- }
- partEnergy = xiMC->Energy();
- partPz = xiMC->Pz();
- partEta = xiMC->Eta();
- partPt = xiMC->Pt();
- partP = xiMC->P();
- partTheta = xiMC->Theta();
- partMass = xiMC->GetMass();
- partVx = xiMC->Vx();
- partVy = xiMC->Vy();
- partVz = xiMC->Vz();
- if (xiMC->GetDaughter(0)>=0) {
- TParticle *mcBach = lMCstack->Particle(xiMC->GetDaughter(0));
- if (mcBach) {
- bacVx = mcBach->Vx();
- bacVy = mcBach->Vy();
- bacVz = mcBach->Vz();
- }
- }
- } else continue;
- } else if ( fAnalysisType == "AOD" ) {
- AliAODMCParticle *lCurrentParticleaod = (AliAODMCParticle*) arrayMC->At(iCurrentLabelStack);
- if (!lCurrentParticleaod) {
- Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack );
- continue;
- }
- if (!lCurrentParticleaod->IsPhysicalPrimary()) continue;
- if (!(lCurrentParticleaod->PdgCode() == lPdgCodeCasc)) continue;
- partEnergy = lCurrentParticleaod->E();
- partPz = lCurrentParticleaod->Pz();
- partEta = lCurrentParticleaod->Eta();
- partP = lCurrentParticleaod->P();
- partPt = lCurrentParticleaod->Pt();
- partTheta = lCurrentParticleaod->Theta();
- partMass = lCurrentParticleaod->M(); //FIXME: not sure this works, seems not implemented
- partVx = lCurrentParticleaod->Xv();
- partVy = lCurrentParticleaod->Yv();
- partVz = lCurrentParticleaod->Zv();
- if (lCurrentParticleaod->GetDaughter(0)>=0) {
- AliAODMCParticle *mcBach = (AliAODMCParticle*) arrayMC->At(lCurrentParticleaod->GetDaughter(0));
- if (mcBach) {
- bacVx = mcBach->Xv();
- bacVy = mcBach->Yv();
- bacVz = mcBach->Zv();
- }
- }
- }
- ncascperevtot++;
- // - Fill the first histos : = any generated Xi, not necessarily within the acceptance
- Double_t lRapXiMC = 0.5*TMath::Log((partEnergy + partPz) / (partEnergy - partPz +1.e-13));
- // - Calculate proper time
- Double_t lctau = TMath::Sqrt((partVx-bacVx)*(partVx-bacVx)+(partVy-bacVy)*(partVy-bacVy)+(partVz-bacVz)*(partVz-bacVz));
- if (partP!=0.) lctau = lctau*partMass/partP;
- else lctau = -1.;
- Double_t lRadToDeg = 180.0/TMath::Pi();
- // - Fill the first histos : = any generated Xi, not necessarily within the acceptance
- lHistEtaGenCasc->Fill( partEta );
- l3dHistGenPtVsGenYvsNtracksPhysEff->Fill( partPt, lRapXiMC, lPrimaryTrackMultiplicity );
- l3dHistGenPtVsGenctauvsYPhysEff->Fill( partPt, lctau, lRapXiMC );
- lHistThetaGenCasc->Fill( lRadToDeg * partTheta );
-
- //--------------------------------------------------------------------------------------------
- // - Check the emission of particle stays within the acceptance of the detector (cut in theta)
- if (fApplyAccCut) { if( partTheta < TMath::Pi()/4.0 || partTheta > 3.0*TMath::Pi()/4.0 ) continue;}
-
- Float_t lambdaTheta = 0.;
- Float_t bacTheta = 0.;
- Float_t dghtBarV0Theta = 0.;
- Float_t dghtMesV0Theta = 0.;
- Float_t bacPt = 0.;
- Float_t dghtBarV0Pt = 0.;
- Float_t dghtMesV0Pt = 0.;
-
- if ( fAnalysisType == "ESD" ) {
- TParticle* xiMC = lMCstack->Particle( iCurrentLabelStack );
- if ( xiMC->GetNDaughters() != 2) continue;
- if ( xiMC->GetDaughter(0) < 0 ) continue;
- if ( xiMC->GetDaughter(1) < 0 ) continue;
- TParticle* lDght0ofXi = lMCstack->Particle( xiMC->GetDaughter(0) );
- TParticle* lDght1ofXi = lMCstack->Particle( xiMC->GetDaughter(1) );
- TParticle* lLambda = 0;
- TParticle* lBach = 0;
-
- // Xi - Case 1
- if ( lDght0ofXi->GetPdgCode() == lPdgCodeLambda && lDght1ofXi->GetPdgCode() == lPdgCodeBach ){
- lLambda = lDght0ofXi; // dghter0 = Lambda
- lBach = lDght1ofXi; // dghter1 = Pi-
- }
- // Xi - Case 2
- else if ( lDght0ofXi->GetPdgCode() == lPdgCodeBach && lDght1ofXi->GetPdgCode() == lPdgCodeLambda ){
- lBach = lDght0ofXi; // dghter0 = Pi-
- lLambda = lDght1ofXi; // dghter1 = Lambda
- }
- // Otherwise - Case 3
- else continue;
-
- // - Check the emission of particle stays within the acceptance of the detector (cut in pt + theta)
- if (fApplyAccCut) {
- if( lLambda->Theta() < TMath::Pi()/4.0 || lLambda->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
- if( lBach->Theta() < TMath::Pi()/4.0 || lBach->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
- if( lBach->Pt() < 0.150 ) continue; //FIXME: maybe tuned for Xi but not for K- from Omega ...
- }
-
- //---------
- // - V0 level
- TParticle* lDghtBarV0 = 0;
- TParticle* lDghtMesV0 = 0;
- if( lLambda->GetNDaughters() != 2 ) continue;
- if( lLambda->GetDaughter(0) < 0 ) continue;
- if( lLambda->GetDaughter(1) < 0 ) continue;
- TParticle* lDght0ofLambda = lMCstack->Particle( lLambda->GetDaughter(0) );
- TParticle* lDght1ofLambda = lMCstack->Particle( lLambda->GetDaughter(1) );
-
- // V0 - Case 1
- if ( lDght0ofLambda->GetPdgCode() == lPdgCodeDghtBarV0 && lDght1ofLambda->GetPdgCode() == lPdgCodeDghtMesV0 ) { // Here !
- lDghtBarV0 = lDght0ofLambda; // dghter0 = Proton
- lDghtMesV0 = lDght1ofLambda; // dghter1 = Pi-
- }
- // V0 - Case 2
- else if ( lDght0ofLambda->GetPdgCode() == lPdgCodeDghtMesV0 && lDght1ofLambda->GetPdgCode() == lPdgCodeDghtBarV0 ) { // Here !
- lDghtMesV0 = lDght0ofLambda; // dghter0 = Pi-
- lDghtBarV0 = lDght1ofLambda; // dghter1 = Proton
- }
- // Otherwise - Case 3
- else continue;
-
- // - Check the emission of particle stays within the acceptance of the detector
- if (fApplyAccCut) {
- if( lDghtBarV0->Theta() < TMath::Pi()/4.0 || lDghtBarV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
- if( lDghtMesV0->Theta() < TMath::Pi()/4.0 || lDghtMesV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
- if( lDghtBarV0->Pt() < 0.250 ) continue;
- if( lDghtMesV0->Pt() < 0.150 ) continue;
- }
-
- lambdaTheta = lLambda->Theta();
- bacTheta = lBach->Theta();
- dghtBarV0Theta = lDghtBarV0->Theta();
- dghtMesV0Theta = lDghtMesV0->Theta();
- bacPt = lBach->Pt();
- dghtBarV0Pt = lDghtBarV0->Pt();
- dghtMesV0Pt = lDghtMesV0->Pt();
-
- } else if ( fAnalysisType == "AOD") {
-
- AliAODMCParticle *xiMC = (AliAODMCParticle*) arrayMC->At(iCurrentLabelStack);
- if (xiMC->GetNDaughters() != 2) continue;
- if (xiMC->GetDaughter(0) < 0 ) continue;
- if (xiMC->GetDaughter(1) < 0 ) continue;
-
- AliAODMCParticle* lDght0ofXi = (AliAODMCParticle*) arrayMC->At( xiMC->GetDaughter(0) );
- AliAODMCParticle* lDght1ofXi = (AliAODMCParticle*) arrayMC->At( xiMC->GetDaughter(1) );
-
- AliAODMCParticle* lLambda = 0;
- AliAODMCParticle* lBach = 0;
-
- // Xi - Case 1
- if ( lDght0ofXi->PdgCode() == lPdgCodeLambda && lDght1ofXi->PdgCode() == lPdgCodeBach ){
- lLambda = lDght0ofXi; // dghter0 = Lambda
- lBach = lDght1ofXi; // dghter1 = Pi-
- }
- // Xi - Case 2
- else if ( lDght0ofXi->PdgCode() == lPdgCodeBach && lDght1ofXi->PdgCode() == lPdgCodeLambda ){
- lBach = lDght0ofXi; // dghter0 = Pi
- lLambda = lDght1ofXi; //dghter1 = Lambda
- }
- // Otherwise - Case 3
- else continue;
-
- // - Check the emission of particle stays within the acceptance of the detector (cut in pt + theta)
- if (fApplyAccCut) {
- if ( lLambda->Theta() < TMath::Pi()/4.0 || lLambda->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
- if( lBach->Theta() < TMath::Pi()/4.0 || lBach->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
- if( lBach->Pt() < 0.150 ) continue; //FIXME : maybe tuned for Xi but not for K- from Omega ...
- }
-
- //-----------
- // - V0 level
- AliAODMCParticle* lDghtBarV0 = 0;
- AliAODMCParticle* lDghtMesV0 = 0;
-
- if( lLambda->GetNDaughters() != 2 ) continue;
- if( lLambda->GetDaughter(0) < 0 ) continue;
- if( lLambda->GetDaughter(1) < 0 ) continue;
-
- AliAODMCParticle* lDght0ofLambda = (AliAODMCParticle*) arrayMC->At( lLambda->GetDaughter(0) );
- AliAODMCParticle* lDght1ofLambda = (AliAODMCParticle*) arrayMC->At( lLambda->GetDaughter(1) );
-
- // V0 - Case 1
- if ( lDght0ofLambda->PdgCode() == lPdgCodeDghtBarV0 && lDght1ofLambda->PdgCode() == lPdgCodeDghtMesV0 ) {
- lDghtBarV0 = lDght0ofLambda; // dghter0 = Proton
- lDghtMesV0 = lDght1ofLambda; // dghter1 = Pi-
- }
- // V0 - Case 2
- else if ( lDght0ofLambda->PdgCode() == lPdgCodeDghtMesV0 && lDght1ofLambda->PdgCode() == lPdgCodeDghtBarV0 ) {
- lDghtMesV0 = lDght0ofLambda; // dghter0 = Pi-
- lDghtBarV0 = lDght1ofLambda; // dghter1 = proton
- }
- // V0 otherwise - Case 3
- else continue;
-
- // - Check the emission of particle stays within the acceptance of the detector
- if (fApplyAccCut) {
- if( lDghtBarV0->Theta() < TMath::Pi()/4.0 || lDghtBarV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
- if( lDghtMesV0->Theta() < TMath::Pi()/4.0 || lDghtMesV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
- if( lDghtBarV0->Pt() < 0.250 ) continue;
- if( lDghtMesV0->Pt() < 0.150 ) continue;
- }
-
- lambdaTheta = lLambda->Theta();
- bacTheta = lBach->Theta();
- dghtBarV0Theta = lDghtBarV0->Theta();
- dghtMesV0Theta = lDghtMesV0->Theta();
- bacPt = lBach->Pt();
- dghtBarV0Pt = lDghtBarV0->Pt();
- dghtMesV0Pt = lDghtMesV0->Pt();
- }
-
- //---------------------------------------
- // - Filling histos for findable cascades
- // - Fill theta histos
- lHistThetaLambda->Fill( lRadToDeg * lambdaTheta );
- lHistThetaBach->Fill( lRadToDeg * bacTheta );
- lHistThetaBarDghter->Fill( lRadToDeg * dghtBarV0Theta );
- lHistThetaMesDghter->Fill( lRadToDeg * dghtMesV0Theta );
- // - Fill pt histos
- lHistPtBach ->Fill( bacPt );
- lHistPtBarDghter ->Fill( dghtBarV0Pt );
- lHistPtMesDghter ->Fill( dghtMesV0Pt );
- l2dHistGenPtVsGenYFdbl ->Fill( partPt, lRapXiMC );
-
- ncascperev++;
-
- }// This is the end of the loop on primaries
-
- if (iCascType == 1) {
- fHistnXiMinusPerEv->Fill(ncascperev);
- fHistnXiMinusPerEvTot->Fill(ncascperevtot);
- }
- if (iCascType == 2) {
- fHistnXiPlusPerEv->Fill(ncascperev);
- fHistnXiPlusPerEvTot->Fill(ncascperevtot);
- }
- if (iCascType == 3) {
- fHistnOmegaMinusPerEv->Fill(ncascperev);
- fHistnOmegaMinusPerEvTot->Fill(ncascperevtot);
- }
- if (iCascType == 4) {
- fHistnOmegaPlusPerEv->Fill(ncascperev);
- fHistnOmegaPlusPerEvTot->Fill(ncascperevtot);
- }
-
- // - Re-initialisation of the local THF pointers
- lHistEtaGenCasc = 0x0;
- lHistThetaGenCasc = 0x0;
- l2dHistGenPtVsGenYFdbl = 0x0;
- lHistThetaLambda = 0x0;
- lHistThetaBach = 0x0;
- lHistThetaBarDghter = 0x0;
- lHistThetaMesDghter = 0x0;
- lHistPtBach = 0x0;
- lHistPtBarDghter = 0x0;
- lHistPtMesDghter = 0x0;
-
- } // end of loop over the different types of cascades (Xi-+, Omega-+)
-
-
-
- //-----------------------------------------
- // - Loop over the reconstructed candidates
- //-----------------------------------------
- Int_t nAssoXiMinus = 0;
- Int_t nAssoXiPlus = 0;
- Int_t nAssoOmegaMinus = 0;
- Int_t nAssoOmegaPlus = 0;
- Int_t lPosTPCClusters = 0;
- Int_t lNegTPCClusters = 0;
- Int_t lBachTPCClusters = 0;
- Double_t lDcaXiDaughters = -1. ;
- Double_t lDcaBachToPrimVertexXi = -1. ;
- Double_t lXiCosineOfPointingAngle = -1. ;
- Double_t lPosXi[3] = { -1000.0, -1000.0, -1000.0 };
- Double_t lXiRadius = -1000. ;
- Double_t lInvMassLambdaAsCascDghter = 0.;
- Double_t lDcaV0DaughtersXi = -1.;
- Double_t lV0CosineOfPointingAngleXi = -1.;
- Double_t lV0CosineOfPointingAngle = -1.;
- Double_t lPosV0Xi[3] = { -1000. , -1000., -1000. }; // Position of VO coming from cascade
- Double_t lV0RadiusXi = -1000.;
- Double_t lDcaV0ToPrimVertexXi = -1.;
- Double_t lDcaPosToPrimVertexXi = -1.;
- Double_t lDcaNegToPrimVertexXi = -1.;
- Double_t lChargeXi = -1.;
- Double_t lV0mom = -1000.;
- Double_t lmcPt = -1.;
- Double_t lmcRapCasc = -1.;
- Double_t lmcEta = -1000.;
- Double_t lmcTransvRadius = -1000.;
- Double_t lrecoPt = -100.;
- Double_t lrecoTransvRadius = -1000.;
- Double_t lDeltaPhiMcReco = -1.;
- Double_t lBachTransvMom = 0.;
- Double_t lpTrackTransvMom = 0.;
- Double_t lnTrackTransvMom = 0.;
- Double_t lmcPtPosV0Dghter = -100.;
- Double_t lmcPtNegV0Dghter = -100.;
- Double_t lrecoP = -100.;
- Double_t lmcPtBach = -100.;
- Double_t cascadeMass = 0.;
-
- // - Get the number of cascades
- Int_t ncascades = 0;
- if ( fAnalysisType == "ESD" ) { ncascades = lESDevent->GetNumberOfCascades(); }
- else if ( fAnalysisType == "AOD" ) { ncascades = lAODevent->GetNumberOfCascades(); }
-
- //-------------------------------
- // - Begining of the Cascade Loop
- for (Int_t iXi = 0; iXi < ncascades; iXi++) {
-
- Bool_t lIsPosInXiProton = kFALSE;
- Bool_t lIsPosInXiPion = kFALSE;
- Bool_t lIsPosInOmegaProton = kFALSE;
- Bool_t lIsPosInOmegaPion = kFALSE;
- Bool_t lIsNegInXiProton = kFALSE;
- Bool_t lIsNegInXiPion = kFALSE;
- Bool_t lIsNegInOmegaProton = kFALSE;
- Bool_t lIsNegInOmegaPion = kFALSE;
- Bool_t lIsBachelorKaon = kFALSE;
- Bool_t lIsBachelorPion = kFALSE;
- Bool_t lIsBachelorKaonForTPC = kFALSE;
- Bool_t lIsBachelorPionForTPC = kFALSE;
- Bool_t lIsNegPionForTPC = kFALSE;
- Bool_t lIsPosPionForTPC = kFALSE;
- Bool_t lIsNegProtonForTPC = kFALSE;
- Bool_t lIsPosProtonForTPC = kFALSE;
-
- // - Combined PID
- // Reasonable guess for the priors for the cascade track sample (e-, mu, pi, K, p)
- Double_t lPriorsGuessXi[14] = {0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0};
- Double_t lPriorsGuessOmega[14] = {0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0};
- Double_t ppionBach = 0.0, pkaonBach = 0.0;
- Bool_t lIsBachelorMCPiMinus = kFALSE;
- Bool_t lIsBachelorMCPiPlus = kFALSE;
- Bool_t lIsBachelorMCKMinus = kFALSE;
- Bool_t lIsBachelorMCKPlus = kFALSE;
- Double_t lInvMassXiMinus = 0.;
- Double_t lInvMassXiPlus = 0.;
- Double_t lInvMassOmegaMinus = 0.;
- Double_t lInvMassOmegaPlus = 0.;
- Bool_t lAssoXiMinus = kFALSE;
- Bool_t lAssoXiPlus = kFALSE;
- Bool_t lAssoOmegaMinus = kFALSE;
- Bool_t lAssoOmegaPlus = kFALSE;
-
- Float_t etaBach = 0.;
- Float_t etaPos = 0.;
- Float_t etaNeg = 0.;
-
- if ( fAnalysisType == "ESD" ) {
-
- // - Load the cascade
- AliESDcascade *xiESD = lESDevent->GetCascade(iXi);
- if (!xiESD) continue;
-
- // - Connection to daughter tracks of the current cascade
- UInt_t lIdxPosXi = (UInt_t) TMath::Abs( xiESD->GetPindex() );
- UInt_t lIdxNegXi = (UInt_t) TMath::Abs( xiESD->GetNindex() );
- UInt_t lBachIdx = (UInt_t) TMath::Abs( xiESD->GetBindex() );
-
- // - Rejection of a double use of a daughter track (nothing but just a crosscheck of what is done in the cascade vertexer)
- if(lBachIdx == lIdxNegXi) {
- AliWarning("Pb / Idx(Bach. track) = Idx(Neg. track) ... continue!"); continue;
- }
- if(lBachIdx == lIdxPosXi) {
- AliWarning("Pb / Idx(Bach. track) = Idx(Pos. track) ... continue!"); continue;
- }
-
- // - Get the daughter tracks
- AliESDtrack *pTrackXi = lESDevent->GetTrack( lIdxPosXi );
- AliESDtrack *nTrackXi = lESDevent->GetTrack( lIdxNegXi );
- AliESDtrack *bachTrackXi = lESDevent->GetTrack( lBachIdx );
- if (!pTrackXi || !nTrackXi || !bachTrackXi ) {
- Printf("ERROR: Could not retrieve one of the 3 daughter tracks of the cascade ...");
- continue;
- }
-
- // Get the number of TPC clusters
- lPosTPCClusters = pTrackXi->GetTPCNcls();
- lNegTPCClusters = nTrackXi->GetTPCNcls();
- lBachTPCClusters = bachTrackXi->GetTPCNcls();
- // - Rejection of a poor quality tracks
- if(fkQualityCutTPCrefit){
- // - Poor quality related to TPCrefit
- ULong_t pStatus = pTrackXi->GetStatus();
- ULong_t nStatus = nTrackXi->GetStatus();
- ULong_t bachStatus = bachTrackXi->GetStatus();
- if ((pStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Pos. track has no TPCrefit ... continue!"); continue; }
- if ((nStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Neg. track has no TPCrefit ... continue!"); continue; }
- if ((bachStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / Bach. track has no TPCrefit ... continue!"); continue; }
- }
- if(fkQualityCutnTPCcls){
- // - Poor quality related to TPC clusters
- if(lPosTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Pos. track has less than 80 TPC clusters ... continue!"); continue; }
- if(lNegTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Neg. track has less than 80 TPC clusters ... continue!"); continue; }
- if(lBachTPCClusters < fMinnTPCcls) { AliWarning("Pb / Bach. track has less than 80 TPC clusters ... continue!"); continue; }
- }
-
- etaPos = pTrackXi->Eta();
- etaNeg = nTrackXi->Eta();
- etaBach = bachTrackXi->Eta();
-
- // - Info over reconstructed cascades
- Double_t lV0quality = 0.;
- if( bachTrackXi->Charge() < 0 ) {
- //Calculate the effective mass of the Xi- candidate: Xi- hyp. (pdg code 3312
- lV0quality = 0.;
- xiESD->ChangeMassHypothesis(lV0quality , 3312);
- lInvMassXiMinus = xiESD->GetEffMassXi();
- //Calculate the effective mass of the Xi- candidate: Omega- hyp. (pdg code 3334)
- lV0quality = 0.;
- xiESD->ChangeMassHypothesis(lV0quality , 3334);
- lInvMassOmegaMinus = xiESD->GetEffMassXi();
- //Back to "default" hyp. (Xi-)
- lV0quality = 0.;
- xiESD->ChangeMassHypothesis(lV0quality , 3312);
- }
- if( bachTrackXi->Charge() > 0 ){
- //Calculate the effective mass of the Xi- candidate: Xi+ hyp. (pdg code -3312)
- lV0quality = 0.;
- xiESD->ChangeMassHypothesis(lV0quality , -3312);
- lInvMassXiPlus = xiESD->GetEffMassXi();
- //Calculate the effective mass of the Xi- candidate: Omega+ hyp. (pdg code -3334)
- lV0quality = 0.;
- xiESD->ChangeMassHypothesis(lV0quality , -3334);
- lInvMassOmegaPlus = xiESD->GetEffMassXi();
- //Back to "default" hyp. (Xi-)
- lV0quality = 0.;
- xiESD->ChangeMassHypothesis(lV0quality , -3312);
- }
- lDcaXiDaughters = xiESD->GetDcaXiDaughters();
- lDcaBachToPrimVertexXi = TMath::Abs( bachTrackXi->GetD(lBestPrimaryVtxPos[0],lBestPrimaryVtxPos[1],lMagneticField) );
- lXiCosineOfPointingAngle = xiESD->GetCascadeCosineOfPointingAngle( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2] );
- xiESD->GetXYZcascade( lPosXi[0], lPosXi[1], lPosXi[2] );
- lInvMassLambdaAsCascDghter = xiESD->GetEffMass();
- lDcaV0DaughtersXi = xiESD->GetDcaV0Daughters();
- lV0CosineOfPointingAngleXi = xiESD->GetV0CosineOfPointingAngle( lPosXi[0], lPosXi[1], lPosXi[2] );
- lV0CosineOfPointingAngle = xiESD->GetV0CosineOfPointingAngle( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2]);
- xiESD->GetXYZ( lPosV0Xi[0], lPosV0Xi[1], lPosV0Xi[2] );
- lDcaV0ToPrimVertexXi = xiESD->GetD( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2] );
- lDcaPosToPrimVertexXi = TMath::Abs( pTrackXi->GetD(lBestPrimaryVtxPos[0],lBestPrimaryVtxPos[1],lMagneticField) );
- lDcaNegToPrimVertexXi = TMath::Abs( nTrackXi->GetD(lBestPrimaryVtxPos[0],lBestPrimaryVtxPos[1],lMagneticField) );
- lChargeXi = xiESD->Charge();
-
- //------------------
- // - PID Information
-
- // - Combined VO-positive-daughter PID
- AliPID pPidXi; pPidXi.SetPriors( lPriorsGuessXi );
- AliPID pPidOmega; pPidOmega.SetPriors( lPriorsGuessOmega );
- if( pTrackXi->IsOn(AliESDtrack::kESDpid) ){
- Double_t r[10] = {0.}; pTrackXi->GetESDpid(r);
- pPidXi.SetProbabilities(r);
- pPidOmega.SetProbabilities(r);
- // Check if the V0 positive track is a proton (case for Xi-)
- Double_t pproton = pPidXi.GetProbability(AliPID::kProton);
- if (pproton > pPidXi.GetProbability(AliPID::kElectron) &&
- pproton > pPidXi.GetProbability(AliPID::kMuon) &&
- pproton > pPidXi.GetProbability(AliPID::kPion) &&
- pproton > pPidXi.GetProbability(AliPID::kKaon) ) lIsPosInXiProton = kTRUE;
- // Check if the V0 positive track is a pi+ (case for Xi+)
- Double_t ppion = pPidXi.GetProbability(AliPID::kPion);
- if (ppion > pPidXi.GetProbability(AliPID::kElectron) &&
- ppion > pPidXi.GetProbability(AliPID::kMuon) &&
- ppion > pPidXi.GetProbability(AliPID::kKaon) &&
- ppion > pPidXi.GetProbability(AliPID::kProton) ) lIsPosInXiPion = kTRUE;
- // Check if the V0 positive track is a proton (case for Omega-)
- pproton = 0.;
- pproton = pPidOmega.GetProbability(AliPID::kProton);
- if (pproton > pPidOmega.GetProbability(AliPID::kElectron) &&
- pproton > pPidOmega.GetProbability(AliPID::kMuon) &&
- pproton > pPidOmega.GetProbability(AliPID::kPion) &&
- pproton > pPidOmega.GetProbability(AliPID::kKaon) ) lIsPosInOmegaProton = kTRUE;
- // Check if the V0 positive track is a pi+ (case for Omega+)
- ppion = 0.;
- ppion = pPidOmega.GetProbability(AliPID::kPion);
- if (ppion > pPidOmega.GetProbability(AliPID::kElectron) &&
- ppion > pPidOmega.GetProbability(AliPID::kMuon) &&
- ppion > pPidOmega.GetProbability(AliPID::kKaon) &&
- ppion > pPidOmega.GetProbability(AliPID::kProton) ) lIsPosInOmegaPion = kTRUE;
- }
- // - Combined VO-negative-daughter PID
- AliPID nPidXi; nPidXi.SetPriors( lPriorsGuessXi );
- AliPID nPidOmega; nPidOmega.SetPriors( lPriorsGuessOmega );
- if( nTrackXi->IsOn(AliESDtrack::kESDpid) ) {
- Double_t r[10] = {0.}; nTrackXi->GetESDpid(r);
- nPidXi.SetProbabilities(r);
- nPidOmega.SetProbabilities(r);
- // Check if the V0 negative track is a pi- (case for Xi-)
- Double_t ppion = nPidXi.GetProbability(AliPID::kPion);
- if (ppion > nPidXi.GetProbability(AliPID::kElectron) &&
- ppion > nPidXi.GetProbability(AliPID::kMuon) &&
- ppion > nPidXi.GetProbability(AliPID::kKaon) &&
- ppion > nPidXi.GetProbability(AliPID::kProton) ) lIsNegInXiPion = kTRUE;
- // Check if the V0 negative track is an anti-proton (case for Xi+)
- Double_t pproton = nPidXi.GetProbability(AliPID::kProton);
- if (pproton > nPidXi.GetProbability(AliPID::kElectron) &&
- pproton > nPidXi.GetProbability(AliPID::kMuon) &&
- pproton > nPidXi.GetProbability(AliPID::kPion) &&
- pproton > nPidXi.GetProbability(AliPID::kKaon) ) lIsNegInXiProton = kTRUE;
- // Check if the V0 negative track is a pi- (case for Omega-)
- ppion = 0.;
- ppion = nPidOmega.GetProbability(AliPID::kPion);
- if (ppion > nPidOmega.GetProbability(AliPID::kElectron) &&
- ppion > nPidOmega.GetProbability(AliPID::kMuon) &&
- ppion > nPidOmega.GetProbability(AliPID::kKaon) &&
- ppion > nPidOmega.GetProbability(AliPID::kProton) ) lIsNegInOmegaPion = kTRUE;
- // Check if the V0 negative track is an anti-proton (case for Omega+)
- pproton = 0.;
- pproton = nPidOmega.GetProbability(AliPID::kProton);
- if (pproton > nPidOmega.GetProbability(AliPID::kElectron) &&
- pproton > nPidOmega.GetProbability(AliPID::kMuon) &&
- pproton > nPidOmega.GetProbability(AliPID::kPion) &&
- pproton > nPidOmega.GetProbability(AliPID::kKaon) ) lIsNegInOmegaProton = kTRUE;
- }
- // - Combined bachelor PID
- AliPID bachPidXi; bachPidXi.SetPriors( lPriorsGuessXi );
- AliPID bachPidOmega; bachPidOmega.SetPriors( lPriorsGuessOmega );
- if ( bachTrackXi->IsOn(AliESDtrack::kESDpid) ) {
- Double_t r[10] = {0.}; bachTrackXi->GetESDpid(r);
- bachPidXi.SetProbabilities(r);
- bachPidOmega.SetProbabilities(r);
- // Check if the bachelor track is a pion
- ppionBach = bachPidXi.GetProbability(AliPID::kPion);
- if (ppionBach > bachPidXi.GetProbability(AliPID::kElectron) &&
- ppionBach > bachPidXi.GetProbability(AliPID::kMuon) &&
- ppionBach > bachPidXi.GetProbability(AliPID::kKaon) &&
- ppionBach > bachPidXi.GetProbability(AliPID::kProton) ) lIsBachelorPion = kTRUE;
- // Check if the bachelor track is a kaon
- pkaonBach = bachPidOmega.GetProbability(AliPID::kKaon);
- if (pkaonBach > bachPidOmega.GetProbability(AliPID::kElectron) &&
- pkaonBach > bachPidOmega.GetProbability(AliPID::kMuon) &&
- pkaonBach > bachPidOmega.GetProbability(AliPID::kPion) &&
- pkaonBach > bachPidOmega.GetProbability(AliPID::kProton) ) lIsBachelorKaon = kTRUE;
- }
- // - 4-sigma bands on Bethe-Bloch curve
- // Bachelor
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 4) lIsBachelorKaonForTPC = kTRUE;
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 4) lIsBachelorPionForTPC = kTRUE;
- // Negative V0 daughter
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 4) lIsNegPionForTPC = kTRUE;
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kProton )) < 4) lIsNegProtonForTPC = kTRUE;
- // Positive V0 daughter
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 4) lIsPosPionForTPC = kTRUE;
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 4) lIsPosProtonForTPC = kTRUE;
- /*
- const AliExternalTrackParam *pInnerWallTrackXi = pTrackXi ->GetInnerParam(); // Do not use GetTPCInnerWall
- const AliExternalTrackParam *nInnerWallTrackXi = nTrackXi ->GetInnerParam();
- const AliExternalTrackParam *bachInnerWallTrackXi = bachTrackXi ->GetInnerParam();
- if(pInnerWallTrackXi && nInnerWallTrackXi && bachInnerWallTrackXi ){
- Double_t pMomInnerWall = pInnerWallTrackXi ->GetP();
- Double_t nMomInnerWall = nInnerWallTrackXi ->GetP();
- Double_t bachMomInnerWall = bachInnerWallTrackXi->GetP();
- // Bachelor
- if (TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 3) lIsBachelorPionForTPC = kTRUE;
- if (bachMomInnerWall < 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 5) lIsBachelorKaonForTPC = kTRUE;
- if (bachMomInnerWall > 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 3) lIsBachelorKaonForTPC = kTRUE;
- // Negative V0 daughter
- if (TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 3 ) lIsNegPionForTPC = kTRUE;
- if (nMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 5 ) lIsNegProtonForTPC = kTRUE;
- if (nMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 3 ) lIsNegProtonForTPC = kTRUE;
- // Positive V0 daughter
- if (TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 3 ) lIsPosPionForTPC = kTRUE;
- if (pMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 5) lIsPosProtonForTPC = kTRUE;
- if (pMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 3) lIsPosProtonForTPC = kTRUE;
- }*/
- // - PID proba Vs Pt(Bach)
- Int_t lblBachForPID = (Int_t) TMath::Abs( bachTrackXi->GetLabel() );
- TParticle* mcBachForPID = lMCstack->Particle( lblBachForPID );
- lmcPtBach = mcBachForPID->Pt();
- // - MC perfect PID
- if( mcBachForPID->GetPdgCode() == -211) lIsBachelorMCPiMinus = kTRUE;
- if( mcBachForPID->GetPdgCode() == 211) lIsBachelorMCPiPlus = kTRUE;
- if( mcBachForPID->GetPdgCode() == -321) lIsBachelorMCKMinus = kTRUE;
- if( mcBachForPID->GetPdgCode() == 321) lIsBachelorMCKPlus = kTRUE;
-
-
- //---------------------------------------------------------------
- // - MC association (care : lots of "continue;" below this line)
- if(fDebug > 5) cout<< "MC EventNumber: "<<lMCevent->Header()->GetEvent()<<" / MC event Number in Run : "<<lMCevent->Header()->GetEventNrInRun()<<endl;
- // - Level of the V0 daughters
- Int_t lblPosV0Dghter = (Int_t) TMath::Abs( pTrackXi->GetLabel() );
- Int_t lblNegV0Dghter = (Int_t) TMath::Abs( nTrackXi->GetLabel() );
- TParticle* mcPosV0Dghter = lMCstack->Particle( lblPosV0Dghter );
- TParticle* mcNegV0Dghter = lMCstack->Particle( lblNegV0Dghter );
- // - Level of the Xi daughters
- Int_t lblMotherPosV0Dghter = mcPosV0Dghter->GetFirstMother() ;
- Int_t lblMotherNegV0Dghter = mcNegV0Dghter->GetFirstMother();
- if( lblMotherPosV0Dghter != lblMotherNegV0Dghter) continue; // same mother
- if( lblMotherPosV0Dghter < 0 ) continue; // this particle is primary, no mother
- if( lblMotherNegV0Dghter < 0 ) continue; // this particle is primary, no mother
- // mothers = Lambda candidate ... a priori
- TParticle* mcMotherPosV0Dghter = lMCstack->Particle( lblMotherPosV0Dghter );
- TParticle* mcMotherNegV0Dghter = lMCstack->Particle( lblMotherNegV0Dghter ); // MN: redundant?? already checked that labels are the same...-->same part from stack
- Int_t lblBach = (Int_t) TMath::Abs( bachTrackXi->GetLabel() );
- TParticle* mcBach = lMCstack->Particle( lblBach );
- // - Level of Xi candidate
- Int_t lblGdMotherPosV0Dghter = mcMotherPosV0Dghter->GetFirstMother() ;
- Int_t lblGdMotherNegV0Dghter = mcMotherNegV0Dghter->GetFirstMother() ;
- if( lblGdMotherPosV0Dghter != lblGdMotherNegV0Dghter ) continue;
- if( lblGdMotherPosV0Dghter < 0 ) continue; // primary lambda ...
- if( lblGdMotherNegV0Dghter < 0 ) continue; // primary lambda ...
- // Gd mothers = Xi candidate ... a priori
- TParticle* mcGdMotherPosV0Dghter = lMCstack->Particle( lblGdMotherPosV0Dghter );
- TParticle* mcGdMotherNegV0Dghter = lMCstack->Particle( lblGdMotherNegV0Dghter );
- Int_t lblMotherBach = (Int_t) TMath::Abs( mcBach->GetFirstMother() );
- if( lblMotherBach != lblGdMotherPosV0Dghter ) continue; //same mother for bach and V0 daughters
- TParticle* mcMotherBach = lMCstack->Particle( lblMotherBach );
-
- // - Check if cascade is primary
- if (!(lMCstack->IsPhysicalPrimary(lblMotherBach))) continue;
-
- // - Manage boolean for association
- if ( mcMotherBach ->GetPdgCode() == 3312 &&
- mcGdMotherPosV0Dghter ->GetPdgCode() == 3312 &&
- mcGdMotherNegV0Dghter ->GetPdgCode() == 3312 ) {lAssoXiMinus = kTRUE;
- cascadeMass = 1.321;
- nAssoXiMinus++; }
- else if( mcMotherBach ->GetPdgCode() == -3312 &&
- mcGdMotherPosV0Dghter ->GetPdgCode() == -3312 &&
- mcGdMotherNegV0Dghter ->GetPdgCode() == -3312 ) {lAssoXiPlus = kTRUE;
- cascadeMass = 1.321;
- nAssoXiPlus++; }
- else if( mcMotherBach ->GetPdgCode() == 3334 &&
- mcGdMotherPosV0Dghter ->GetPdgCode() == 3334 &&
- mcGdMotherNegV0Dghter ->GetPdgCode() == 3334 ) {lAssoOmegaMinus = kTRUE;
- cascadeMass = 1.672;
- nAssoOmegaMinus++; }
- else if( mcMotherBach ->GetPdgCode() == -3334 &&
- mcGdMotherPosV0Dghter ->GetPdgCode() == -3334 &&
- mcGdMotherNegV0Dghter ->GetPdgCode() == -3334 ) {lAssoOmegaPlus = kTRUE;
- cascadeMass = 1.672;
- nAssoOmegaPlus++; }
- // If a proper association exists ...
- if(fDebug > 4){
- cout<<"XiMinus = "<<lAssoXiMinus <<endl;
- cout<<"XiPlus = "<<lAssoXiPlus <<endl;
- cout<<"OmegaMinus = "<<lAssoOmegaMinus<<endl;
- cout<<"OmegaPlus = "<<lAssoOmegaPlus <<endl
- <<"----" <<endl;
- }
- if(fDebug > 5){
- cout<<endl;
- cout<<"- V0 daughters - "<<endl;
- cout<<" + V0 Pos. / Label : "<<lblPosV0Dghter<<" - Pdg Code : "<<mcPosV0Dghter->GetTitle()<<endl;
- cout<<" - V0 Neg. / Label : "<<lblNegV0Dghter<<" - Pdg Code : "<<mcNegV0Dghter->GetTitle()<<endl;
-
- cout<<"- Xi daughters - "<<endl;
- cout<<" + V0 Pos. mother / Label : "<<lblMotherPosV0Dghter<<" - Pdg Code : "<<mcMotherPosV0Dghter->GetTitle()<<endl;
- cout<<" - V0 Neg. mother / Label : "<<lblMotherNegV0Dghter<<" - Pdg Code : "<<mcMotherNegV0Dghter->GetTitle()<<endl;
-
- cout<<" -- Bach. / Label :"<<lblBach<<" - Pdg Code : "<<mcBach->GetTitle()<<endl;
-
- cout<<"- Xi candidate -"<<endl;
- cout<<" + V0 Pos. Gd Mother / Label : "<<lblGdMotherPosV0Dghter<<" - Pdg Code : "<< mcGdMotherPosV0Dghter->GetTitle()<<endl;
- cout<<" - V0 Neg. Gd Mother / Label : "<<lblGdMotherNegV0Dghter<<" - Pdg Code : "<< mcGdMotherNegV0Dghter->GetTitle()<<endl;
-
- cout<<" -- Mother Bach. / Label : "<<lblMotherBach<<" - Pdg Code : "<<mcMotherBach->GetTitle()<<endl;
- cout<<endl;
- }
-
- lmcPt = mcMotherBach->Pt();
- lmcRapCasc = 0.5*TMath::Log( (mcMotherBach->Energy() + mcMotherBach->Pz()) / (mcMotherBach->Energy() - mcMotherBach->Pz() +1.e-13) );
- lmcEta = mcMotherBach->Eta();
- lmcTransvRadius = mcBach->R(); // to get the decay point of Xi, = the production vertex of Bachelor ...
- TVector3 lmcTVect3Mom( mcMotherBach->Px(), mcMotherBach->Py(), mcMotherBach->Pz() );
- lrecoPt = xiESD->Pt();
- lrecoTransvRadius = TMath::Sqrt( xiESD->Xv() * xiESD->Xv() + xiESD->Yv() * xiESD->Yv() );
- TVector3 lrecoTVect3Mom( xiESD->Px(), xiESD->Py(), xiESD->Pz() );
- lDeltaPhiMcReco = lmcTVect3Mom.DeltaPhi( lrecoTVect3Mom ) * 180.0/TMath::Pi();
- lmcPtPosV0Dghter = mcPosV0Dghter->Pt() ;
- lmcPtNegV0Dghter = mcNegV0Dghter->Pt();
- lrecoP = xiESD->P();
- Double_t nV0mom[3] = {0. ,0. ,0. };
- Double_t pV0mom[3] = {0. ,0. ,0. };
- xiESD->GetNPxPyPz(nV0mom[0],nV0mom[1],nV0mom[2]);
- xiESD->GetPPxPyPz(pV0mom[0],pV0mom[1],pV0mom[2]);
- lV0mom = TMath::Sqrt(TMath::Power(nV0mom[0]+pV0mom[0],2)+TMath::Power(nV0mom[1]+pV0mom[1],2)+TMath::Power(nV0mom[2]+pV0mom[2],2));
- Double_t lBachMomX = 0.; Double_t lBachMomY = 0.; Double_t lBachMomZ = 0.;
- xiESD->GetBPxPyPz( lBachMomX, lBachMomY, lBachMomZ );
- lBachTransvMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY );
- lnTrackTransvMom = TMath::Sqrt( nV0mom[0]*nV0mom[0] + nV0mom[1]*nV0mom[1] );
- lpTrackTransvMom = TMath::Sqrt( pV0mom[0]*pV0mom[0] + pV0mom[1]*pV0mom[1] );
-
- } else if ( fAnalysisType == "AOD" ) {
-
- // - Load the cascade
- const AliAODcascade *xiAOD = lAODevent->GetCascade(iXi);
- if (!xiAOD) continue;
-
- // - Connection to daughter tracks of the current cascade
- AliAODTrack *pTrackXi = dynamic_cast<AliAODTrack*>( xiAOD->GetDaughter(0) );
- AliAODTrack *nTrackXi = dynamic_cast<AliAODTrack*>( xiAOD->GetDaughter(1) );
- AliAODTrack *bachTrackXi = dynamic_cast<AliAODTrack*>( xiAOD->GetDecayVertexXi()->GetDaughter(0) );
- if (!pTrackXi || !nTrackXi || !bachTrackXi ) {
- AliWarning("ERROR: Could not retrieve one of the 3 AOD daughter tracks of the cascade ...");
- continue;
- }
- UInt_t lIdxPosXi = (UInt_t) TMath::Abs( pTrackXi->GetID() );
- UInt_t lIdxNegXi = (UInt_t) TMath::Abs( nTrackXi->GetID() );
- UInt_t lBachIdx = (UInt_t) TMath::Abs( bachTrackXi->GetID() );
-
- // - Rejection of a double use of a daughter track (nothing but just a crosscheck of what is done in the cascade vertexer)
- if(lBachIdx == lIdxNegXi) {
- AliWarning("Pb / Idx(Bach. track) = Idx(Neg. track) ... continue!"); continue;
- }
- if(lBachIdx == lIdxPosXi) {
- AliWarning("Pb / Idx(Bach. track) = Idx(Pos. track) ... continue!"); continue;
- }
- lPosTPCClusters = pTrackXi->GetTPCNcls();
- lNegTPCClusters = nTrackXi->GetTPCNcls();
- lBachTPCClusters = bachTrackXi->GetTPCNcls();
-
- // - Rejection of a poor quality tracks
- if (fkQualityCutTPCrefit) {
- // - Poor quality related to TPCrefit
- if (!(pTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / V0 Pos. track has no TPCrefit ... continue!"); continue; }
- if (!(nTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / V0 Neg. track has no TPCrefit ... continue!"); continue; }
- if (!(bachTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / Bach. track has no TPCrefit ... continue!"); continue; }
- }
- if (fkQualityCutnTPCcls) {
- // - Poor quality related to TPC clusters
- if(lPosTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Pos. track has less than 80 TPC clusters ... continue!"); continue; }
- if(lNegTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Neg. track has less than 80 TPC clusters ... continue!"); continue; }
- if(lBachTPCClusters < fMinnTPCcls) { AliWarning("Pb / Bach. track has less than 80 TPC clusters ... continue!"); continue; }
- }
-
- etaPos = pTrackXi->Eta();
- etaNeg = nTrackXi->Eta();
- etaBach = bachTrackXi->Eta();
-
- // - Info over reconstructed cascades
- if( bachTrackXi->Charge() < 0 ) {
- lInvMassXiMinus = xiAOD->MassXi();
- lInvMassOmegaMinus = xiAOD->MassOmega();
- }
- if( bachTrackXi->Charge() > 0 ){
- lInvMassXiPlus = xiAOD->MassXi();
- lInvMassOmegaPlus = xiAOD->MassOmega();
- }
- lDcaXiDaughters = xiAOD->DcaXiDaughters();
- lDcaBachToPrimVertexXi = xiAOD->DcaBachToPrimVertex();
- lXiCosineOfPointingAngle = xiAOD->CosPointingAngleXi( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2] );
- lPosXi[0] = xiAOD->DecayVertexXiX();
- lPosXi[1] = xiAOD->DecayVertexXiY();
- lPosXi[2] = xiAOD->DecayVertexXiZ();
- lInvMassLambdaAsCascDghter = xiAOD->MassLambda();
- lDcaV0DaughtersXi = xiAOD->DcaV0Daughters();
- lV0CosineOfPointingAngleXi = xiAOD->CosPointingAngle( lPosXi );
- lV0CosineOfPointingAngle = xiAOD->CosPointingAngle( lBestPrimaryVtxPos );
- lPosV0Xi[0] = xiAOD->DecayVertexV0X();
- lPosV0Xi[1] = xiAOD->DecayVertexV0Y();
- lPosV0Xi[2] = xiAOD->DecayVertexV0Z();
- lDcaV0ToPrimVertexXi = xiAOD->DcaV0ToPrimVertex();
- lDcaPosToPrimVertexXi = xiAOD->DcaPosToPrimVertex();
- lDcaNegToPrimVertexXi = xiAOD->DcaNegToPrimVertex();
- lChargeXi = xiAOD->ChargeXi();
-
- //------------------
- // - PID Information
- // Combined VO-positive-daughter PID
- // Combined bachelor PID
- /*
- AliPID bachPidXi; bachPidXi.SetPriors( lPriorsGuessXi );
- AliPID bachPidOmega; bachPidOmega.SetPriors( lPriorsGuessOmega );
-
- if ( bachTrackXi->IsOn(AliESDtrack::kESDpid) ) { // Combined PID exists
- Double_t r[10] = {0.}; bachTrackXi->GetESDpid(r);
- bachPidXi.SetProbabilities(r);
- bachPidOmega.SetProbabilities(r);
- // Check if the bachelor track is a pion
- ppionBach = bachPidXi.GetProbability(AliPID::kPion);
- if (ppionBach > bachPidXi.GetProbability(AliPID::kElectron) &&
- ppionBach > bachPidXi.GetProbability(AliPID::kMuon) &&
- ppionBach > bachPidXi.GetProbability(AliPID::kKaon) &&
- ppionBach > bachPidXi.GetProbability(AliPID::kProton) ) lIsBachelorPion = kTRUE;
- // Check if the bachelor track is a kaon
- pkaonBach = bachPidOmega.GetProbability(AliPID::kKaon);
- if (pkaonBach > bachPidOmega.GetProbability(AliPID::kElectron) &&
- pkaonBach > bachPidOmega.GetProbability(AliPID::kMuon) &&
- pkaonBach > bachPidOmega.GetProbability(AliPID::kPion) &&
- pkaonBach > bachPidOmega.GetProbability(AliPID::kProton) ) lIsBachelorKaon = kTRUE;
- }// end if bachelor track with existing combined PID
- */
-
- // - TPC PID: 4-sigma bands on Bethe-Bloch curve
- // Bachelor
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 4) lIsBachelorKaonForTPC = kTRUE;
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 4) lIsBachelorPionForTPC = kTRUE;
- // Negative V0 daughter
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 4) lIsNegPionForTPC = kTRUE;
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kProton )) < 4) lIsNegProtonForTPC = kTRUE;
- // Positive V0 daughter
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 4) lIsPosPionForTPC = kTRUE;
- if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 4) lIsPosProtonForTPC = kTRUE;
- /*
- const AliExternalTrackParam *pInnerWallTrackXi = pTrackXi ->GetInnerParam(); // Do not use GetTPCInnerWall
- const AliExternalTrackParam *nInnerWallTrackXi = nTrackXi ->GetInnerParam();
- const AliExternalTrackParam *bachInnerWallTrackXi = bachTrackXi ->GetInnerParam();
- if(pInnerWallTrackXi && nInnerWallTrackXi && bachInnerWallTrackXi ){
- Double_t pMomInnerWall = pInnerWallTrackXi ->GetP();
- Double_t nMomInnerWall = nInnerWallTrackXi ->GetP();
- Double_t bachMomInnerWall = bachInnerWallTrackXi->GetP();
- // Bachelor
- if (TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 3) lIsBachelorPionForTPC = kTRUE;
- if (bachMomInnerWall < 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 5) lIsBachelorKaonForTPC = kTRUE;
- if (bachMomInnerWall > 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 3) lIsBachelorKaonForTPC = kTRUE;
- // Negative V0 daughter
- if (TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 3 ) lIsNegPionForTPC = kTRUE;
- if (nMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 5 ) lIsNegProtonForTPC = kTRUE;
- if (nMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 3 ) lIsNegProtonForTPC = kTRUE;
- // Positive V0 daughter
- if (TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 3 ) lIsPosPionForTPC = kTRUE;
- if (pMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 5) lIsPosProtonForTPC = kTRUE;
- if (pMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 3) lIsPosProtonForTPC = kTRUE;
- }*/
-
- // - PID proba Vs Pt(Bach)
- Int_t lblBachForPID = (Int_t) TMath::Abs( bachTrackXi->GetLabel() );
- AliAODMCParticle* mcBachForPID = (AliAODMCParticle*) arrayMC->At( lblBachForPID );
- lmcPtBach = mcBachForPID->Pt();
-
- // - MC perfect PID
- if( mcBachForPID->PdgCode() == -211) lIsBachelorMCPiMinus = kTRUE;
- if( mcBachForPID->PdgCode() == 211) lIsBachelorMCPiPlus = kTRUE;
- if( mcBachForPID->PdgCode() == -321) lIsBachelorMCKMinus = kTRUE;
- if( mcBachForPID->PdgCode() == 321) lIsBachelorMCKPlus = kTRUE;
-
- //--------------------------------------------------------------
- // - MC association (care : lots of "continue;" below this line)
- if(fDebug > 5) cout<<"MC EventNumber : "<<lMCevent->Header()->GetEvent()<<" / MC event Number in Run : "<<lMCevent->Header()->GetEventNrInRun()<<endl;
- // - Level of the V0 daughters
- Int_t lblPosV0Dghter = (Int_t) TMath::Abs( pTrackXi->GetLabel() );
- Int_t lblNegV0Dghter = (Int_t) TMath::Abs( nTrackXi->GetLabel() );
- AliAODMCParticle* mcPosV0Dghter = (AliAODMCParticle*) arrayMC->At( lblPosV0Dghter );
- AliAODMCParticle* mcNegV0Dghter = (AliAODMCParticle*) arrayMC->At( lblNegV0Dghter );
- // - Level of the Xi daughters
- Int_t lblMotherPosV0Dghter = mcPosV0Dghter->GetMother();
- Int_t lblMotherNegV0Dghter = mcNegV0Dghter->GetMother();
- if( lblMotherPosV0Dghter != lblMotherNegV0Dghter) continue; // same mother
- if( lblMotherPosV0Dghter < 0 ) continue; // this particle is primary, no mother
- if( lblMotherNegV0Dghter < 0 ) continue; // this particle is primary, no mother
- // mothers = Lambda candidate ... a priori
- AliAODMCParticle* mcMotherPosV0Dghter = (AliAODMCParticle*) arrayMC->At( lblMotherPosV0Dghter );
- AliAODMCParticle* mcMotherNegV0Dghter = (AliAODMCParticle*) arrayMC->At( lblMotherNegV0Dghter );
- Int_t lblBach = (Int_t) TMath::Abs( bachTrackXi->GetLabel() );
- AliAODMCParticle* mcBach = (AliAODMCParticle*) arrayMC->At( lblBach );
- // - Level of Xi candidate
- Int_t lblGdMotherPosV0Dghter = mcMotherPosV0Dghter->GetMother() ;
- Int_t lblGdMotherNegV0Dghter = mcMotherNegV0Dghter->GetMother() ;
- if( lblGdMotherPosV0Dghter != lblGdMotherNegV0Dghter ) continue;
- if( lblGdMotherPosV0Dghter < 0 ) continue; // primary lambda ...
- if( lblGdMotherNegV0Dghter < 0 ) continue; // primary lambda ...
- // Gd mothers = Xi candidate ... a priori
- AliAODMCParticle* mcGdMotherPosV0Dghter = (AliAODMCParticle*) arrayMC->At( lblGdMotherPosV0Dghter );
- AliAODMCParticle* mcGdMotherNegV0Dghter = (AliAODMCParticle*) arrayMC->At( lblGdMotherNegV0Dghter );
- Int_t lblMotherBach = (Int_t) TMath::Abs( mcBach->GetMother() );
- if( lblMotherBach != lblGdMotherPosV0Dghter ) continue; //same mother for bach and V0 daughters
- AliAODMCParticle* mcMotherBach = (AliAODMCParticle*) arrayMC->At( lblMotherBach );
-
- // - Check if cascade is primary
- if (!(mcMotherBach->IsPhysicalPrimary())) continue;
-
- // - Manage boolean for association
- if ( mcMotherBach ->GetPdgCode() == 3312 &&
- mcGdMotherPosV0Dghter ->GetPdgCode() == 3312 &&
- mcGdMotherNegV0Dghter ->GetPdgCode() == 3312 ) {lAssoXiMinus = kTRUE;
- cascadeMass = 1.321;
- nAssoXiMinus++; }
- else if( mcMotherBach ->GetPdgCode() == -3312 &&
- mcGdMotherPosV0Dghter ->GetPdgCode() == -3312 &&
- mcGdMotherNegV0Dghter ->GetPdgCode() == -3312 ) {lAssoXiPlus = kTRUE;
- cascadeMass = 1.321;
- nAssoXiPlus++; }
- else if( mcMotherBach ->GetPdgCode() == 3334 &&
- mcGdMotherPosV0Dghter ->GetPdgCode() == 3334 &&
- mcGdMotherNegV0Dghter ->GetPdgCode() == 3334 ) {lAssoOmegaMinus = kTRUE;
- cascadeMass = 1.672;
- nAssoOmegaMinus++; }
- else if( mcMotherBach ->GetPdgCode() == -3334 &&
- mcGdMotherPosV0Dghter ->GetPdgCode() == -3334 &&
- mcGdMotherNegV0Dghter ->GetPdgCode() == -3334 ) {lAssoOmegaPlus = kTRUE;
- cascadeMass = 1.672;
- nAssoOmegaPlus++; }
-
- lmcPt = mcMotherBach->Pt();
- lmcRapCasc = 0.5*TMath::Log( (mcMotherBach->E() + mcMotherBach->Pz()) / (mcMotherBach->E() - mcMotherBach->Pz() +1.e-13) );
- lmcEta = mcMotherBach->Eta();
- Float_t decayCascX = mcBach->Xv();
- Float_t decayCascY = mcBach->Yv();
- lmcTransvRadius = TMath::Sqrt(decayCascX*decayCascX+decayCascY*decayCascY); // decay point of Xi, = the production vertex of Bachelor ...
- TVector3 lmcTVect3Mom( mcMotherBach->Px(), mcMotherBach->Py(), mcMotherBach->Pz() );
- Double_t xiMomX = xiAOD->MomXiX();
- Double_t xiMomY = xiAOD->MomXiY();
- Double_t xiMomZ = xiAOD->MomXiZ();
- lrecoPt = TMath::Sqrt( xiMomX*xiMomX + xiMomY*xiMomY );
- lrecoTransvRadius = TMath::Sqrt( xiAOD->DecayVertexXiX() * xiAOD->DecayVertexXiX() + xiAOD->DecayVertexXiY() * xiAOD->DecayVertexXiY() );
- TVector3 lrecoTVect3Mom( xiMomX, xiMomY, xiMomZ );
- lDeltaPhiMcReco = lmcTVect3Mom.DeltaPhi( lrecoTVect3Mom ) * 180.0/TMath::Pi();
- lmcPtPosV0Dghter = mcPosV0Dghter->Pt() ;
- lmcPtNegV0Dghter = mcNegV0Dghter->Pt();
- lrecoP = TMath::Sqrt( xiMomX*xiMomX + xiMomY*xiMomY + xiMomZ*xiMomZ );;
- Double_t lV0momX = xiAOD->MomV0X();
- Double_t lV0momY = xiAOD->MomV0Y();
- Double_t lV0momZ = xiAOD->MomV0Z();
- lV0mom = TMath::Sqrt(TMath::Power(lV0momX,2)+TMath::Power(lV0momY,2)+TMath::Power(lV0momZ,2));
- Double_t lBachMomX = xiAOD->MomBachX();
- Double_t lBachMomY = xiAOD->MomBachY();
- lBachTransvMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY );
- Double_t lV0NMomX = xiAOD->MomNegX();
- Double_t lV0NMomY = xiAOD->MomNegY();
- Double_t lV0PMomX = xiAOD->MomPosX();
- Double_t lV0PMomY = xiAOD->MomPosY();
- lnTrackTransvMom = TMath::Sqrt( lV0NMomX*lV0NMomX + lV0NMomY*lV0NMomY );
- lpTrackTransvMom = TMath::Sqrt( lV0PMomX*lV0PMomX + lV0PMomY*lV0PMomY );
-
- }
-
- lXiRadius = TMath::Sqrt( lPosXi[0]*lPosXi[0] + lPosXi[1]*lPosXi[1] );
- lV0RadiusXi = TMath::Sqrt( lPosV0Xi[0]*lPosV0Xi[0] + lPosV0Xi[1]*lPosV0Xi[1] );
-
- // - Cut on pt of the three daughter tracks
- if (lBachTransvMom<fMinPtCutOnDaughterTracks) continue;
- if (lpTrackTransvMom<fMinPtCutOnDaughterTracks) continue;
- if (lnTrackTransvMom<fMinPtCutOnDaughterTracks) continue;
-
- // - Cut on pseudorapidity of the three daughter tracks
- if (TMath::Abs(etaBach)>fEtaCutOnDaughterTracks) continue;
- if (TMath::Abs(etaPos)>fEtaCutOnDaughterTracks) continue;
- if (TMath::Abs(etaNeg)>fEtaCutOnDaughterTracks) continue;
-
- // - Extra-selection for cascade candidates
- if (fkExtraSelections) {
- if (lDcaXiDaughters > 0.3) continue; // in AliCascadeVertexer
- if (lXiCosineOfPointingAngle < 0.999 ) continue; // in AliCascadeVertexer
- if (lDcaV0ToPrimVertexXi < 0.05) continue; // in AliCascadeVertexer
- if (lDcaBachToPrimVertexXi < 0.03) continue; // in AliCascadeVertexer
- if (lDcaV0DaughtersXi > 1.) continue; // in AliV0vertexer
- if (lV0CosineOfPointingAngleXi < 0.998) continue; // in AliV0vertexer
- if (lDcaPosToPrimVertexXi < 0.1) continue; // in AliV0vertexer
- if (lDcaNegToPrimVertexXi < 0.1) continue; // in AliV0vertexer
- if(lXiRadius < .9) continue; // in AliCascadeVertexer
- if(lV0RadiusXi < 0.9) continue; // in AliV0vertexer
- }
-
- //-------------------------
- // - Fill combined PID TH1s
- if( lChargeXi < 0 && lIsBachelorPion ) fHistMassWithCombPIDXiMinus ->Fill( lInvMassXiMinus );
- if( lChargeXi > 0 && lIsBachelorPion ) fHistMassWithCombPIDXiPlus ->Fill( lInvMassXiPlus );
- if( lChargeXi < 0 && lIsBachelorKaon ) fHistMassWithCombPIDOmegaMinus ->Fill( lInvMassOmegaMinus );
- if( lChargeXi > 0 && lIsBachelorKaon ) fHistMassWithCombPIDOmegaPlus ->Fill( lInvMassOmegaPlus );
- if( lChargeXi < 0 ) fHistMassXiMinus ->Fill( lInvMassXiMinus );
- if( lChargeXi > 0 ) fHistMassXiPlus ->Fill( lInvMassXiPlus );
- if( lChargeXi < 0 ) fHistMassOmegaMinus ->Fill( lInvMassOmegaMinus );
- if( lChargeXi > 0 ) fHistMassOmegaPlus ->Fill( lInvMassOmegaPlus );
- if(lIsBachelorPion) f2dHistPIDprobaPionVsMCPtBach->Fill( lmcPtBach, ppionBach );
- if(lIsBachelorKaon) f2dHistPIDprobaKaonVsMCPtBach->Fill( lmcPtBach, pkaonBach );
- if( lChargeXi < 0 && lIsBachelorMCPiMinus ) fHistMassWithMcPIDXiMinus ->Fill( lInvMassXiMinus );
- if( lChargeXi > 0 && lIsBachelorMCPiPlus ) fHistMassWithMcPIDXiPlus ->Fill( lInvMassXiPlus );
- if( lChargeXi < 0 && lIsBachelorMCKMinus ) fHistMassWithMcPIDOmegaMinus ->Fill( lInvMassOmegaMinus );
- if( lChargeXi > 0 && lIsBachelorMCKPlus ) fHistMassWithMcPIDOmegaPlus ->Fill( lInvMassOmegaPlus );
-
-
- // - No association, skip the rest of the code
- if(!lAssoXiMinus && !lAssoXiPlus && !lAssoOmegaMinus && !lAssoOmegaPlus) continue;
-
- //--------------
- // - Proper time
- // For cascade (reconstructed)
- 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));
- if (lrecoP!=0) lctau = lctau*cascadeMass/lrecoP;
- else lctau = -1.;
- // For Lambda (reconstructed)
- Float_t lambdaMass = 1.115683; // PDG mass
- 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));
- Float_t lctauV0 = -1.;
- if (lV0mom!=0) lctauV0 = distV0Xi*lambdaMass/lV0mom;
- // Distance
- Float_t distTV0Xi = TMath::Sqrt(TMath::Power((lPosV0Xi[0]-lPosXi[0]),2)+TMath::Power((lPosV0Xi[1]-lPosXi[1]),2));
-
- //------------------------------------------------------------
- // - Fill histos for the cascade candidates associated with MC
- if( lChargeXi < 0 && lAssoXiMinus){
- fHistAsMCMassXiMinus ->Fill( lInvMassXiMinus );
- if(lIsBachelorPion) f2dHistAsMCandCombPIDGenPtVsGenYXiMinus->Fill( lmcPt, lmcRapCasc );
- f2dHistAsMCGenPtVsGenYXiMinus ->Fill( lmcPt, lmcRapCasc);
- fHistAsMCGenEtaXiMinus ->Fill( lmcEta );
- f2dHistAsMCResPtXiMinus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt );
- f2dHistAsMCResRXiMinus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius );
- f2dHistAsMCResPhiXiMinus ->Fill( lmcPt, lDeltaPhiMcReco );
- f2dHistAsMCptProtonMCptXiMinus->Fill(lmcPt,lmcPtPosV0Dghter);
- fHistV0CosineOfPointingAnglevsPtXi->Fill(lmcPt,lV0CosineOfPointingAngle);
- }
- else if( lChargeXi > 0 && lAssoXiPlus){
- fHistAsMCMassXiPlus ->Fill( lInvMassXiPlus );
- if(lIsBachelorPion) f2dHistAsMCandCombPIDGenPtVsGenYXiPlus->Fill( lmcPt, lmcRapCasc );
- f2dHistAsMCGenPtVsGenYXiPlus ->Fill( lmcPt, lmcRapCasc);
- fHistAsMCGenEtaXiPlus ->Fill( lmcEta );
- f2dHistAsMCResPtXiPlus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt );
- f2dHistAsMCResRXiPlus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius );
- f2dHistAsMCResPhiXiPlus ->Fill( lmcPt, lDeltaPhiMcReco );
- f2dHistAsMCptAntiprotonMCptXiPlus->Fill(lmcPt,lmcPtNegV0Dghter);
- fHistV0CosineOfPointingAnglevsPtXi->Fill(lmcPt,lV0CosineOfPointingAngle);
- }
- else if( lChargeXi < 0 && lAssoOmegaMinus){
- fHistAsMCMassOmegaMinus ->Fill( lInvMassOmegaMinus );
- if(lIsBachelorKaon) f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus->Fill( lmcPt, lmcRapCasc );
- f2dHistAsMCGenPtVsGenYOmegaMinus ->Fill( lmcPt, lmcRapCasc );
- fHistAsMCGenEtaOmegaMinus ->Fill( lmcEta );
- f2dHistAsMCResPtOmegaMinus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt );
- f2dHistAsMCResROmegaMinus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius );
- f2dHistAsMCResPhiOmegaMinus ->Fill( lmcPt, lDeltaPhiMcReco );
- f2dHistAsMCptProtonMCptOmegaMinus->Fill(lmcPt,lmcPtPosV0Dghter);
- fHistV0CosineOfPointingAnglevsPtOmega->Fill(lmcPt,lV0CosineOfPointingAngle);
- }
- else if( lChargeXi > 0 && lAssoOmegaPlus){
- fHistAsMCMassOmegaPlus ->Fill( lInvMassOmegaPlus );
- if(lIsBachelorKaon) f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus->Fill( lmcPt, lmcRapCasc );
- f2dHistAsMCGenPtVsGenYOmegaPlus ->Fill( lmcPt, lmcRapCasc );
- fHistAsMCGenEtaOmegaPlus ->Fill( lmcEta );
- f2dHistAsMCResPtOmegaPlus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt );
- f2dHistAsMCResROmegaPlus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius );
- f2dHistAsMCResPhiOmegaPlus ->Fill( lmcPt, lDeltaPhiMcReco );
- f2dHistAsMCptAntiprotonMCptOmegaPlus->Fill(lmcPt,lmcPtNegV0Dghter);
- fHistV0CosineOfPointingAnglevsPtOmega->Fill(lmcPt,lV0CosineOfPointingAngle);
- }
- fHistV0toXiCosineOfPointingAngle->Fill(lV0CosineOfPointingAngleXi);
-
- //------------------
- // - Fill containers
-
- // - Filling the AliCFContainer (optimisation of topological selections + systematics)
- Double_t lContainerCutVars[19] = {0.0};
- lContainerCutVars[0] = lDcaXiDaughters;
- lContainerCutVars[1] = lDcaBachToPrimVertexXi;
- lContainerCutVars[2] = lXiCosineOfPointingAngle;
- lContainerCutVars[3] = lXiRadius;
- lContainerCutVars[4] = lInvMassLambdaAsCascDghter;
- lContainerCutVars[5] = lDcaV0DaughtersXi;
- lContainerCutVars[6] = lV0CosineOfPointingAngleXi;
- lContainerCutVars[7] = lV0RadiusXi;
- lContainerCutVars[8] = lDcaV0ToPrimVertexXi;
- lContainerCutVars[9] = lDcaPosToPrimVertexXi;
- lContainerCutVars[10] = lDcaNegToPrimVertexXi;
- lContainerCutVars[13] = lmcPt;
- lContainerCutVars[16] = lctau;
- lContainerCutVars[17] = lctauV0;
- lContainerCutVars[18] = distTV0Xi;
- // All cases should be covered below
- if( lChargeXi < 0 && lAssoXiMinus ) {
- lContainerCutVars[11] = lInvMassXiMinus;
- lContainerCutVars[12] = lInvMassOmegaMinus;//1.63;
- lContainerCutVars[14] = lmcRapCasc;
- lContainerCutVars[15] = -1.;
- if ( lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC )
- fCFContAsCascadeCuts->Fill(lContainerCutVars,0); // for Xi-
- }
- if( lChargeXi > 0 && lAssoXiPlus ) {
- lContainerCutVars[11] = lInvMassXiPlus;
- lContainerCutVars[12] = lInvMassOmegaPlus;//1.26;
- lContainerCutVars[14] = lmcRapCasc;
- lContainerCutVars[15] = -1.;
- if ( lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC )
- fCFContAsCascadeCuts->Fill(lContainerCutVars,1); // for Xi+
- }
- if( lChargeXi < 0 && lAssoOmegaMinus ) {
- lContainerCutVars[11] = lInvMassXiMinus;//1.63;
- lContainerCutVars[12] = lInvMassOmegaMinus;
- lContainerCutVars[14] = -1.;
- lContainerCutVars[15] = lmcRapCasc;
- if ( lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC )
- fCFContAsCascadeCuts->Fill(lContainerCutVars,2); // for Omega-
- }
- if( lChargeXi > 0 && lAssoOmegaPlus ) {
- lContainerCutVars[11] = lInvMassXiPlus;//1.26;
- lContainerCutVars[12] = lInvMassOmegaPlus;
- lContainerCutVars[14] = -1.;
- lContainerCutVars[15] = lmcRapCasc;
- if ( lIsBachelorKaonForTPC && lIsNegProtonForTPC && lIsPosPionForTPC )
- fCFContAsCascadeCuts->Fill(lContainerCutVars,3); // for Omega+
- }
-
- // - Filling the AliCFContainers related to PID
- Double_t lContainerPIDVars[3] = {0.0};
-
- // Xi Minus
- if( lChargeXi < 0 && lAssoXiMinus ) {
- lContainerPIDVars[0] = lmcPt;
- lContainerPIDVars[1] = lInvMassXiMinus;
- lContainerPIDVars[2] = lmcRapCasc;
- // No PID
- fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 0); // No PID
- // TPC PID
- if( lIsBachelorPionForTPC ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track
- if( lIsBachelorPionForTPC && lIsPosProtonForTPC ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks
- if( lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks
- // Combined PID
- if( lIsBachelorPion ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor
- if( lIsBachelorPion && lIsPosInXiProton ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon
- if( lIsBachelorPion && lIsPosInXiProton && lIsNegInXiPion ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson
- }
- lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.;
-
- // Xi Plus
- if( lChargeXi > 0 && lAssoXiPlus ) {
- lContainerPIDVars[0] = lmcPt;
- lContainerPIDVars[1] = lInvMassXiPlus;
- lContainerPIDVars[2] = lmcRapCasc;
- // No PID
- fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 0); // No PID
- // TPC PID
- if( lIsBachelorPionForTPC ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track
- if( lIsBachelorPionForTPC && lIsNegProtonForTPC ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks
- if( lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks
- // Combined PID
- if( lIsBachelorPion ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor
- if( lIsBachelorPion && lIsNegInXiProton ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon
- if( lIsBachelorPion && lIsNegInXiProton && lIsPosInXiPion ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson
- }
- lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.;
-
- // Omega Minus
- if( lChargeXi < 0 && lAssoOmegaMinus ) {
- lContainerPIDVars[0] = lmcPt;
- lContainerPIDVars[1] = lInvMassOmegaMinus;
- lContainerPIDVars[2] = lmcRapCasc;
- // No PID
- fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 0); // No PID
- // TPC PID
- if( lIsBachelorKaonForTPC ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track
- if( lIsBachelorKaonForTPC && lIsPosProtonForTPC ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks
- if( lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks
- // Combined PID
- if( lIsBachelorKaon ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor
- if( lIsBachelorKaon && lIsPosInOmegaProton ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon
- if( lIsBachelorKaon && lIsPosInOmegaProton && lIsNegInOmegaPion ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson
- }
- lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.;
-
- // Omega Plus
- if( lChargeXi > 0 && lAssoOmegaPlus) {
- lContainerPIDVars[0] = lmcPt;
- lContainerPIDVars[1] = lInvMassOmegaPlus;
- lContainerPIDVars[2] = lmcRapCasc;
- // No PID
- fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 0); // No PID
- // TPC PID
- if( lIsBachelorKaonForTPC ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track
- if( lIsBachelorKaonForTPC && lIsNegProtonForTPC ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks
- if( lIsBachelorKaonForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks
- // Combined PID
- if( lIsBachelorKaon ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor
- if( lIsBachelorKaon && lIsNegInOmegaProton ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon
- if( lIsBachelorKaon && lIsNegInOmegaProton && lIsPosInOmegaPion ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson
- }
-
- }// End of loop over reconstructed cascades
-
- fHistnAssoXiMinus->Fill(nAssoXiMinus);
- fHistnAssoXiPlus->Fill(nAssoXiPlus);
- fHistnAssoOmegaMinus->Fill(nAssoOmegaMinus);
- fHistnAssoOmegaPlus->Fill(nAssoOmegaPlus);
-
- // Post output data.
- PostData(1, fListHistCascade);
- PostData(2, fCFContCascadePIDAsXiMinus);
- PostData(3, fCFContCascadePIDAsXiPlus);
- PostData(4, fCFContCascadePIDAsOmegaMinus);
- PostData(5, fCFContCascadePIDAsOmegaPlus);
- PostData(6, fCFContAsCascadeCuts);
-
-}
-
-
-//________________________________________________________________________
-void AliAnalysisTaskCheckPerformanceCascadepp276::Terminate(Option_t *) {
- // Draw result to the screen
- // Called once at the end of the query
-
- /* TList *cRetrievedList = 0x0;
- cRetrievedList = (TList*)GetOutputData(1);
- if(!cRetrievedList) {
- Printf("ERROR - AliAnalysisTaskCheckPerformanceCascadepp276 : ouput data container list not available\n");
- return;
- }
-
- fHistTrackMultiplicityBeforeAnySel = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistTrackMultiplicityBeforeAnySel") );
- if (!fHistTrackMultiplicityBeforeAnySel) {
- Printf("ERROR - AliAnalysisTaskCheckPerformanceCascadepp276 : fHistTrackMultiplicityBeforeAnySel not available");
- return;
- }
-
-
- TCanvas *canCheckPerformanceCascade = new TCanvas("AliAnalysisTaskCheckPerformanceCascadepp276","Multiplicity",10,10,510,510);
- canCheckPerformanceCascade->cd(1)->SetLogy();
-
- fHistTrackMultiplicityBeforeAnySel->SetMarkerStyle(22);
- fHistTrackMultiplicityBeforeAnySel->DrawCopy("E");
- */
-}
+/*************************************************************** *\r
+ * Authors : Antonin Maire, Boris Hippolyte \r
+ * Contributors are mentioned in the code where appropriate. *\r
+ * *\r
+ * Permission to use, copy, modify and distribute this software and its *\r
+ * documentation strictly for non-commercial purposes is hereby granted *\r
+ * without fee, provided that the above copyright notice appears in all *\r
+ * copies and that both the copyright notice and this permission notice *\r
+ * appear in the supporting documentation. The authors make no claims *\r
+ * about the suitability of this software for any purpose. It is *\r
+ * provided "as is" without express or implied warranty. *\r
+ **************************************************************************/\r
+\r
+//-----------------------------------------------------------------\r
+// AliAnalysisTaskCheckPerformanceCascadePbPb class\r
+// This task is for a performance study of cascade identification in PbPb.\r
+// It works with MC info and ESD/AOD.\r
+// Origin : AliAnalysisTaskCheckPerformanceCascade class by A. Maire Nov2010, antonin.maire@ires.in2p3.fr\r
+// Modified for PbPb analysis: M. Nicassio Feb2011, maria.nicassio@ba.infn.it:\r
+// - physics selection moved to the run.C macro\r
+// - added centrality selection and possibility to select events in nTracks ranges \r
+// - added new histograms \r
+// - modified binning of some histograms and containers \r
+// - flag to enable CF container usage \r
+// - check in the destructor for CAF usage\r
+// - flag for acceptance cut in the MC part\r
+// - in the MC particle selection IsPhysicalPrimary added and number of particles taken as appropriate for HIJING \r
+// (however for cascades one gets the same if runs on Nprimaries in the stack and does not check IsPhysicalPrimary)\r
+// - automatic settings for PID \r
+// - selection of injected cascades and HIJING cascades (kind of "bug" in method IsFromBGEvent())\r
+// - added proper time histograms for cascades and lambdas\r
+// - cos of PA V0 wrt Xi vertex and not primary vertex \r
+// - distance xi-V0 added in the container\r
+// - AOD analysis developed (January 2012)\r
+//\r
+//\r
+//\r
+// Adapted to pp 2.76 analysis: D. Colella, domenico.colella@ba.infn.it (Nov. 2012):\r
+// - added new and removed other histograms \r
+// - Physics selection moved here (mainly for normalization in the efficiency calcuation)\r
+// - Centrality selection deleted\r
+// - 3DHisto denominator moved before any event selection for Normalization\r
+// - injected and natural part of MC selection removed\r
+// \r
+//\r
+//\r
+//-----------------------------------------------------------------\r
+\r
+\r
+#include <Riostream.h>\r
+\r
+#include "TList.h"\r
+#include "TFile.h"\r
+#include "TH1F.h"\r
+#include "TH2F.h"\r
+#include "TH3F.h"\r
+#include "TVector3.h"\r
+#include "TCanvas.h"\r
+#include "TParticle.h"\r
+#include "TMath.h"\r
+\r
+#include "AliLog.h"\r
+#include "AliHeader.h"\r
+#include "AliMCEvent.h"\r
+#include "AliStack.h"\r
+#include "AliMultiplicity.h"\r
+#include "AliInputEventHandler.h"\r
+#include "AliAnalysisManager.h"\r
+\r
+#include "AliCFContainer.h"\r
+\r
+#include "AliESDVZERO.h"\r
+\r
+#include "AliGenEventHeader.h"\r
+#include "AliGenCocktailEventHeader.h"\r
+#include "AliGenHijingEventHeader.h"\r
+#include "AliESDtrackCuts.h"\r
+#include "AliPIDResponse.h"\r
+#include "AliV0vertexer.h"\r
+#include "AliCascadeVertexer.h"\r
+#include "AliESDEvent.h"\r
+#include "AliESDcascade.h"\r
+#include "AliAODEvent.h"\r
+#include "AliAODMCParticle.h" \r
+#include "AliAnalysisTaskCheckPerformanceCascadepp276.h"\r
+\r
+using std::cout;\r
+using std::endl;\r
+\r
+ClassImp(AliAnalysisTaskCheckPerformanceCascadepp276)\r
+\r
+\r
+\r
+//________________________________________________________________________________________\r
+AliAnalysisTaskCheckPerformanceCascadepp276::AliAnalysisTaskCheckPerformanceCascadepp276() \r
+: AliAnalysisTaskSE(), // <- take care to AliAnalysisTask( empty )\r
+ fAnalysisType ("ESD"), \r
+ fESDtrackCuts (0), \r
+ fPIDResponse (0),\r
+ fkRerunV0CascVertexers (0),\r
+ fkSDDselectionOn (kTRUE),\r
+ fkQualityCutZprimVtxPos (kTRUE),\r
+ fkRejectEventPileUp (kTRUE),\r
+ fkQualityCutNoTPConlyPrimVtx (kTRUE),\r
+ fkQualityCutTPCrefit (kTRUE),\r
+ fkQualityCutnTPCcls (kTRUE),\r
+ fwithSDD (kTRUE),\r
+ fMinnTPCcls (0),\r
+ fkExtraSelections (0),\r
+ fVtxRange (0),\r
+ fVtxRangeMin (0),\r
+ fApplyAccCut (0),\r
+ fMinPtCutOnDaughterTracks (0),\r
+ fEtaCutOnDaughterTracks (0),\r
+ \r
+ // - Plots initialisation\r
+ fListHistCascade(0),\r
+\r
+ // - General Plots\r
+ // Cascade multiplicity plots\r
+ fHistCascadeMultiplicityBeforeAnySel(0),\r
+ fHistCascadeMultiplicityAfterSDDSel(0),\r
+ fHistCascadeMultiplicityAfterPhysicsSel(0),\r
+ fHistCascadeMultiplicityForSelEvtNoTPCOnly(0),\r
+ fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup(0),\r
+ fHistCascadeMultiplicityAfterVertexCutSel(0),\r
+ fHistnXiPlusPerEvTot(0), // After any event selections, in all the eta and pt range\r
+ fHistnXiMinusPerEvTot(0), // After any event selections, in all the eta and pt range\r
+ fHistnOmegaPlusPerEvTot(0), // After any event selections, in all the eta and pt range\r
+ fHistnOmegaMinusPerEvTot(0), // After any event selections, in all the eta and pt range\r
+ fHistnXiPlusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum\r
+ fHistnXiMinusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum\r
+ fHistnOmegaPlusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum\r
+ fHistnOmegaMinusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum\r
+ fHistnAssoXiMinus(0), // For the Reconstructed-Associated cascades \r
+ fHistnAssoXiPlus(0), // For the Reconstructed-Associated cascades \r
+ fHistnAssoOmegaMinus(0), // For the Reconstructed-Associated cascades \r
+ fHistnAssoOmegaPlus(0), // For the Reconstructed-Associated cascades \r
+ // Tracks multiplicity plots\r
+ fHistTrackMultiplicityBeforeAnySel(0),\r
+ fHistTrackMultiplicityAfterSDDSel(0),\r
+ fHistTrackMultiplicityAfterPhysicsSel(0),\r
+ fHistTrackMultiplicityForSelEvtNoTPCOnly(0),\r
+ fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup(0),\r
+ fHistTrackMultiplicityAfterVertexCutSel(0),\r
+ // Vertex position plots (BestVertex)\r
+ fHistPVx(0), // After any selections but before |Z| < 10 cm\r
+ fHistPVy(0), // After any selections but before |Z| < 10 cm\r
+ fHistPVz(0), // After any selections but before |Z| < 10 cm\r
+ fHistPVxAnalysis(0), // After any event selections\r
+ fHistPVyAnalysis(0), // After any event selections\r
+ fHistPVzAnalysis(0), // After any event selections\r
+ // - Plots before Physics Selection\r
+ f3dHistGenPtVsGenYvsNtracksXiMinus(0), // After the SDD event selection (For efficinecy calculation)\r
+ f3dHistGenPtVsGenctauvsYXiMinus(0), // After the SDD event selection (For efficinecy calculation)\r
+ f3dHistGenPtVsGenYvsNtracksXiPlus(0), // After the SDD event selection (For efficinecy calculation)\r
+ f3dHistGenPtVsGenctauvsYXiPlus(0), // After the SDD event selection (For efficinecy calculation)\r
+ f3dHistGenPtVsGenYvsNtracksOmegaMinus(0), // After the SDD event selection (For efficinecy calculation)\r
+ f3dHistGenPtVsGenctauvsYOmegaMinus(0), // After the SDD event selection (For efficinecy calculation)\r
+ f3dHistGenPtVsGenYvsNtracksOmegaPlus(0), // After the SDD event selection (For efficinecy calculation)\r
+ f3dHistGenPtVsGenctauvsYOmegaPlus(0), // After the SDD event selection (For efficinecy calculation)\r
+ // - Generated cascade plots\r
+ // After all the event selections \r
+ //Xi-\r
+ fHistEtaGenCascXiMinus(0), // In all the eta and pt range (as they are generated)\r
+ fHistThetaGenCascXiMinus(0), // In all the eta and pt range (as they are generated)\r
+ f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff(0), // \r
+ f3dHistGenPtVsGenctauvsYXiMinusPhysEff(0), // \r
+ f2dHistGenPtVsGenYFdblXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaLambdaXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaBachXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaMesDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaBarDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtBachXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtMesDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtBarDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ //Xi+\r
+ fHistEtaGenCascXiPlus(0), // In all the eta and pt range (as they are generated)\r
+ fHistThetaGenCascXiPlus(0), // In all the eta and pt range (as they are generated)\r
+ f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff(0), // \r
+ f3dHistGenPtVsGenctauvsYXiPlusPhysEff(0), //\r
+ f2dHistGenPtVsGenYFdblXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaLambdaXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaBachXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaMesDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaBarDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtBachXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtMesDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtBarDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ //Omega-\r
+ fHistEtaGenCascOmegaMinus(0), // In all the eta and pt range (as they are generated)\r
+ fHistThetaGenCascOmegaMinus(0), // In all the eta and pt range (as they are generated)\r
+ f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff(0), // \r
+ f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff(0), //\r
+ f2dHistGenPtVsGenYFdblOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaLambdaOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaBachOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaMesDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaBarDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtBachOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtMesDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtBarDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ //Omega+ \r
+ fHistEtaGenCascOmegaPlus(0), // In all the eta and pt range (as they are generated)\r
+ fHistThetaGenCascOmegaPlus(0), // In all the eta and pt range (as they are generated)\r
+ f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff(0), // \r
+ f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff(0), //\r
+ f2dHistGenPtVsGenYFdblOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaLambdaOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaBachOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaMesDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaBarDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtBachOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtMesDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtBarDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+\r
+ // - Associated to MC cascade plots\r
+ fHistMassXiMinus(0), // For the Reconstructed-Associated cascades\r
+ fHistMassXiPlus(0), // For the Reconstructed-Associated cascades\r
+ fHistMassOmegaMinus(0), // For the Reconstructed-Associated cascades\r
+ fHistMassOmegaPlus(0), // For the Reconstructed-Associated cascades\r
+ // Effective mass histos with combined PID\r
+ fHistMassWithCombPIDXiMinus(0), \r
+ fHistMassWithCombPIDXiPlus(0),\r
+ fHistMassWithCombPIDOmegaMinus(0), \r
+ fHistMassWithCombPIDOmegaPlus(0), \r
+ // PID Probability versus MC Pt(bachelor track)\r
+ f2dHistPIDprobaKaonVsMCPtBach(0), f2dHistPIDprobaPionVsMCPtBach(0),\r
+ // Effective mass histos with perfect MC PID on the bachelor\r
+ fHistMassWithMcPIDXiMinus(0), fHistMassWithMcPIDXiPlus(0),\r
+ fHistMassWithMcPIDOmegaMinus(0), fHistMassWithMcPIDOmegaPlus(0),\r
+ // Effective mass histos for the cascade candidates associated with MC\r
+ fHistAsMCMassXiMinus(0), \r
+ fHistAsMCMassXiPlus(0), \r
+ fHistAsMCMassOmegaMinus(0),\r
+ fHistAsMCMassOmegaPlus(0),\r
+ // Generated Pt Vs generated y, for the cascade candidates associated with MC + Info Comb. PID\r
+ f2dHistAsMCandCombPIDGenPtVsGenYXiMinus(0),\r
+ f2dHistAsMCandCombPIDGenPtVsGenYXiPlus(0),\r
+ f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus(0),\r
+ f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus(0),\r
+ // Generated Pt Vs generated y, for the cascade candidates associated with MC\r
+ f2dHistAsMCGenPtVsGenYXiMinus(0),\r
+ f2dHistAsMCGenPtVsGenYXiPlus(0),\r
+ f2dHistAsMCGenPtVsGenYOmegaMinus(0),\r
+ f2dHistAsMCGenPtVsGenYOmegaPlus(0),\r
+ // Generated Eta of the the cascade candidates associated with MC\r
+ fHistAsMCGenEtaXiMinus(0),\r
+ fHistAsMCGenEtaXiPlus(0),\r
+ fHistAsMCGenEtaOmegaMinus(0),\r
+ fHistAsMCGenEtaOmegaPlus(0),\r
+ // Resolution in Pt as function of generated Pt\r
+ f2dHistAsMCResPtXiMinus(0), \r
+ f2dHistAsMCResPtXiPlus(0), \r
+ f2dHistAsMCResPtOmegaMinus(0),\r
+ f2dHistAsMCResPtOmegaPlus(0), \r
+ // Resolution in R(2D) as function of generated R\r
+ f2dHistAsMCResRXiMinus(0), \r
+ f2dHistAsMCResRXiPlus(0), \r
+ f2dHistAsMCResROmegaMinus(0),\r
+ f2dHistAsMCResROmegaPlus(0),\r
+ // Resolution in phi as function of generated Pt\r
+ f2dHistAsMCResPhiXiMinus(0),\r
+ f2dHistAsMCResPhiXiPlus(0),\r
+ f2dHistAsMCResPhiOmegaMinus(0),\r
+ f2dHistAsMCResPhiOmegaPlus(0),\r
+ // Correlation between proton (antiproton) daughter MC pt and Xi/Omega MC pt (to apply Geat/Fluka correction)\r
+ f2dHistAsMCptProtonMCptXiMinus(0),\r
+ f2dHistAsMCptAntiprotonMCptXiPlus(0),\r
+ f2dHistAsMCptProtonMCptOmegaMinus(0),\r
+ f2dHistAsMCptAntiprotonMCptOmegaPlus(0),\r
+ // QA plots\r
+ fHistV0toXiCosineOfPointingAngle(0),\r
+ fHistV0CosineOfPointingAnglevsPtXi(0),\r
+ fHistV0CosineOfPointingAnglevsPtOmega(0), \r
+ \r
+ // Containers \r
+ fCFContCascadePIDAsXiMinus(0),\r
+ fCFContCascadePIDAsXiPlus(0),\r
+ fCFContCascadePIDAsOmegaMinus(0),\r
+ fCFContCascadePIDAsOmegaPlus(0),\r
+ fCFContAsCascadeCuts(0)\r
+\r
+ //____Dummy costructor____\r
+ {\r
+ for(Int_t iV0selIdx = 0; iV0selIdx < 7; iV0selIdx++ ) { fV0Sels [iV0selIdx ] = -1.; }\r
+ for(Int_t iCascSelIdx = 0; iCascSelIdx < 8; iCascSelIdx++ ) { fCascSels [iCascSelIdx ] = -1.; }\r
+ }\r
+ \r
+ \r
+ \r
+//_____Non-default Constructor________________________________________________________________\r
+AliAnalysisTaskCheckPerformanceCascadepp276::AliAnalysisTaskCheckPerformanceCascadepp276(const char *name) \r
+ : AliAnalysisTaskSE(name),\r
+ fAnalysisType ("ESD"), \r
+ fESDtrackCuts (0),\r
+ fPIDResponse (0),\r
+ fkRerunV0CascVertexers (0),\r
+ fkSDDselectionOn (kTRUE),\r
+ fkQualityCutZprimVtxPos (kTRUE),\r
+ fkRejectEventPileUp (kTRUE),\r
+ fkQualityCutNoTPConlyPrimVtx (kTRUE),\r
+ fkQualityCutTPCrefit (kTRUE),\r
+ fkQualityCutnTPCcls (kTRUE),\r
+ fwithSDD (kTRUE),\r
+ fMinnTPCcls (0),\r
+ fkExtraSelections (0),\r
+ fVtxRange (0),\r
+ fVtxRangeMin (0),\r
+ fApplyAccCut (0),\r
+ fMinPtCutOnDaughterTracks (0),\r
+ fEtaCutOnDaughterTracks (0),\r
+\r
+ // - Plots initialisation\r
+ fListHistCascade(0),\r
+\r
+ // - General Plots\r
+ // Cascade multiplicity plots\r
+ fHistCascadeMultiplicityBeforeAnySel(0),\r
+ fHistCascadeMultiplicityAfterSDDSel(0),\r
+ fHistCascadeMultiplicityAfterPhysicsSel(0),\r
+ fHistCascadeMultiplicityForSelEvtNoTPCOnly(0),\r
+ fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup(0),\r
+ fHistCascadeMultiplicityAfterVertexCutSel(0),\r
+ fHistnXiPlusPerEvTot(0), // After any event selections, in all the eta and pt range\r
+ fHistnXiMinusPerEvTot(0), // After any event selections, in all the eta and pt range\r
+ fHistnOmegaPlusPerEvTot(0), // After any event selections, in all the eta and pt range\r
+ fHistnOmegaMinusPerEvTot(0), // After any event selections, in all the eta and pt range\r
+ fHistnXiPlusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum\r
+ fHistnXiMinusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum\r
+ fHistnOmegaPlusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum\r
+ fHistnOmegaMinusPerEv(0), // After any event selections, in the detector acceptance and over a pt minimum\r
+ fHistnAssoXiMinus(0), // For the Reconstructed-Associated cascades \r
+ fHistnAssoXiPlus(0), // For the Reconstructed-Associated cascades \r
+ fHistnAssoOmegaMinus(0), // For the Reconstructed-Associated cascades \r
+ fHistnAssoOmegaPlus(0), // For the Reconstructed-Associated cascades \r
+ // Tracks multiplicity plots\r
+ fHistTrackMultiplicityBeforeAnySel(0),\r
+ fHistTrackMultiplicityAfterSDDSel(0),\r
+ fHistTrackMultiplicityAfterPhysicsSel(0),\r
+ fHistTrackMultiplicityForSelEvtNoTPCOnly(0),\r
+ fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup(0),\r
+ fHistTrackMultiplicityAfterVertexCutSel(0),\r
+ // Vertex position plots (BestVertex)\r
+ fHistPVx(0), // After any selections but before |Z| < 10 cm\r
+ fHistPVy(0), // After any selections but before |Z| < 10 cm\r
+ fHistPVz(0), // After any selections but before |Z| < 10 cm\r
+ fHistPVxAnalysis(0), // After any event selections\r
+ fHistPVyAnalysis(0), // After any event selections\r
+ fHistPVzAnalysis(0), // After any event selections\r
+ // - Plots before Physics Selection\r
+ f3dHistGenPtVsGenYvsNtracksXiMinus(0), // After the SDD event selection (For efficiency calculation)\r
+ f3dHistGenPtVsGenctauvsYXiMinus(0), // After the SDD event selection (For efficiency calculation)\r
+ f3dHistGenPtVsGenYvsNtracksXiPlus(0), // After the SDD event selection (For efficiency calculation)\r
+ f3dHistGenPtVsGenctauvsYXiPlus(0), // After the SDD event selection (For efficiency calculation)\r
+ f3dHistGenPtVsGenYvsNtracksOmegaMinus(0), // After the SDD event selection (For efficiency calculation)\r
+ f3dHistGenPtVsGenctauvsYOmegaMinus(0), // After the SDD event selection (For efficiency calculation)\r
+ f3dHistGenPtVsGenYvsNtracksOmegaPlus(0), // After the SDD event selection (For efficiency calculation)\r
+ f3dHistGenPtVsGenctauvsYOmegaPlus(0), // After the SDD event selection (For efficiency calculation)\r
+ // - Generated cascade plots\r
+ // After all the event selections \r
+ //Xi-\r
+ fHistEtaGenCascXiMinus(0), // In all the eta and pt range (as they are generated)\r
+ fHistThetaGenCascXiMinus(0), // In all the eta and pt range (as they are generated)\r
+ f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff(0), // \r
+ f3dHistGenPtVsGenctauvsYXiMinusPhysEff(0), //\r
+ f2dHistGenPtVsGenYFdblXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaLambdaXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaBachXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaMesDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaBarDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtBachXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtMesDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtBarDghterXiMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ //Xi+\r
+ fHistEtaGenCascXiPlus(0), // In all the eta and pt range (as they are generated)\r
+ fHistThetaGenCascXiPlus(0), // In all the eta and pt range (as they are generated)\r
+ f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff(0), // \r
+ f3dHistGenPtVsGenctauvsYXiPlusPhysEff(0), //\r
+ f2dHistGenPtVsGenYFdblXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaLambdaXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaBachXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaMesDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaBarDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtBachXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtMesDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtBarDghterXiPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ //Omega-\r
+ fHistEtaGenCascOmegaMinus(0), // In all the eta and pt range (as they are generated)\r
+ fHistThetaGenCascOmegaMinus(0), // In all the eta and pt range (as they are generated)\r
+ f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff(0), // \r
+ f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff(0), //\r
+ f2dHistGenPtVsGenYFdblOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaLambdaOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaBachOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaMesDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaBarDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtBachOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtMesDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtBarDghterOmegaMinus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ //Omega+ \r
+ fHistEtaGenCascOmegaPlus(0), // In all the eta and pt range (as they are generated)\r
+ fHistThetaGenCascOmegaPlus(0), // In all the eta and pt range (as they are generated)\r
+ f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff(0), // \r
+ f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff(0), //\r
+ f2dHistGenPtVsGenYFdblOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaLambdaOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaBachOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaMesDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistThetaBarDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtBachOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtMesDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+ fHistPtBarDghterOmegaPlus(0), // In the detector acceptance and over a pt minimum (Findable particle)\r
+\r
+ // - Associated to MC cascade plots\r
+ fHistMassXiMinus(0), // For the Reconstructed-Associated cascades\r
+ fHistMassXiPlus(0), // For the Reconstructed-Associated cascades\r
+ fHistMassOmegaMinus(0), // For the Reconstructed-Associated cascades\r
+ fHistMassOmegaPlus(0), // For the Reconstructed-Associated cascades\r
+ // Effective mass histos with combined PID\r
+ fHistMassWithCombPIDXiMinus(0),\r
+ fHistMassWithCombPIDXiPlus(0),\r
+ fHistMassWithCombPIDOmegaMinus(0),\r
+ fHistMassWithCombPIDOmegaPlus(0),\r
+ // PID Probability versus MC Pt(bachelor track)\r
+ f2dHistPIDprobaKaonVsMCPtBach(0), f2dHistPIDprobaPionVsMCPtBach(0),\r
+ // Effective mass histos with perfect MC PID on the bachelor\r
+ fHistMassWithMcPIDXiMinus(0), fHistMassWithMcPIDXiPlus(0),\r
+ fHistMassWithMcPIDOmegaMinus(0), fHistMassWithMcPIDOmegaPlus(0),\r
+ // Effective mass histos for the cascade candidates associated with MC\r
+ fHistAsMCMassXiMinus(0),\r
+ fHistAsMCMassXiPlus(0),\r
+ fHistAsMCMassOmegaMinus(0),\r
+ fHistAsMCMassOmegaPlus(0),\r
+ // Generated Pt Vs generated y, for the cascade candidates associated with MC + Info Comb. PID\r
+ f2dHistAsMCandCombPIDGenPtVsGenYXiMinus(0),\r
+ f2dHistAsMCandCombPIDGenPtVsGenYXiPlus(0),\r
+ f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus(0),\r
+ f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus(0),\r
+ // Generated Pt Vs generated y, for the cascade candidates associated with MC\r
+ f2dHistAsMCGenPtVsGenYXiMinus(0),\r
+ f2dHistAsMCGenPtVsGenYXiPlus(0),\r
+ f2dHistAsMCGenPtVsGenYOmegaMinus(0),\r
+ f2dHistAsMCGenPtVsGenYOmegaPlus(0),\r
+ // Generated Eta of the the cascade candidates associated with MC\r
+ fHistAsMCGenEtaXiMinus(0),\r
+ fHistAsMCGenEtaXiPlus(0),\r
+ fHistAsMCGenEtaOmegaMinus(0),\r
+ fHistAsMCGenEtaOmegaPlus(0),\r
+ // Resolution in Pt as function of generated Pt\r
+ f2dHistAsMCResPtXiMinus(0),\r
+ f2dHistAsMCResPtXiPlus(0),\r
+ f2dHistAsMCResPtOmegaMinus(0),\r
+ f2dHistAsMCResPtOmegaPlus(0),\r
+ // Resolution in R(2D) as function of generated R\r
+ f2dHistAsMCResRXiMinus(0),\r
+ f2dHistAsMCResRXiPlus(0),\r
+ f2dHistAsMCResROmegaMinus(0),\r
+ f2dHistAsMCResROmegaPlus(0),\r
+ // Resolution in phi as function of generated Pt\r
+ f2dHistAsMCResPhiXiMinus(0),\r
+ f2dHistAsMCResPhiXiPlus(0),\r
+ f2dHistAsMCResPhiOmegaMinus(0),\r
+ f2dHistAsMCResPhiOmegaPlus(0),\r
+ // Correlation between proton (antiproton) daughter MC pt and Xi/Omega MC pt (to apply Geat/Fluka correction)\r
+ f2dHistAsMCptProtonMCptXiMinus(0),\r
+ f2dHistAsMCptAntiprotonMCptXiPlus(0),\r
+ f2dHistAsMCptProtonMCptOmegaMinus(0),\r
+ f2dHistAsMCptAntiprotonMCptOmegaPlus(0),\r
+ // QA plots\r
+ fHistV0toXiCosineOfPointingAngle(0),\r
+ fHistV0CosineOfPointingAnglevsPtXi(0),\r
+ fHistV0CosineOfPointingAnglevsPtOmega(0),\r
+\r
+ // Containers \r
+ fCFContCascadePIDAsXiMinus(0),\r
+ fCFContCascadePIDAsXiPlus(0),\r
+ fCFContCascadePIDAsOmegaMinus(0),\r
+ fCFContCascadePIDAsOmegaPlus(0),\r
+ fCFContAsCascadeCuts(0)\r
+\r
+ //____Costructor____\r
+ {\r
+ // Define input and output slots here\r
+ // Input slot #0 works with a TChain\r
+ // Output slot #1 writes into a TList container (cascade)\r
+ \r
+ // PbPb default cuts \r
+ fV0Sels[0] = 33.; // max allowed chi2\r
+ fV0Sels[1] = 0.1; // min allowed impact parameter for the 1st daughter \r
+ fV0Sels[2] = 0.1; // min allowed impact parameter for the 2nd daughter \r
+ fV0Sels[3] = 1.5 ; // max allowed DCA between the daughter tracks \r
+ fV0Sels[4] = 0.9 ; // min allowed cosine of V0's pointing angle \r
+ fV0Sels[5] = 0.2; // min radius of the fiducial volume \r
+ fV0Sels[6] = 200. ; // max radius of the fiducial volume \r
+ fCascSels[0] = 33.; // max allowed chi2 \r
+ fCascSels[1] = 0.01; // min allowed V0 impact parameter \r
+ fCascSels[2] = 0.008; // "window" around the Lambda mass \r
+ fCascSels[3] = 0.01; // min allowed bachelor's impact parameter \r
+ fCascSels[4] = 2.0 ; // max allowed DCA between the V0 and the bachelor \r
+ fCascSels[5] = 0.95; // min allowed cosine of the cascade pointing angle \r
+ fCascSels[6] = 0.2 ; // min radius of the fiducial volume \r
+ fCascSels[7] = 100. ; // max radius of the fiducial volume \r
+ \r
+ DefineOutput(1, TList::Class());\r
+ DefineOutput(2, AliCFContainer::Class());\r
+ DefineOutput(3, AliCFContainer::Class());\r
+ DefineOutput(4, AliCFContainer::Class());\r
+ DefineOutput(5, AliCFContainer::Class());\r
+ DefineOutput(6, AliCFContainer::Class());\r
+ }\r
+\r
+ //____Destructor____\r
+ AliAnalysisTaskCheckPerformanceCascadepp276::~AliAnalysisTaskCheckPerformanceCascadepp276()\r
+ {\r
+ // For all TH1, 2, 3 HnSparse and CFContainer are in the fListCascade TList.\r
+ // They will be deleted when fListCascade is deleted by the TSelector dtor\r
+ // Because of TList::SetOwner()\r
+ if (fListHistCascade && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fListHistCascade; fListHistCascade = 0x0;} \r
+ if (fCFContCascadePIDAsXiMinus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fCFContCascadePIDAsXiMinus; fCFContCascadePIDAsXiMinus = 0x0;}\r
+ if (fCFContCascadePIDAsXiPlus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fCFContCascadePIDAsXiPlus; fCFContCascadePIDAsXiPlus = 0x0;}\r
+ if (fCFContCascadePIDAsOmegaMinus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fCFContCascadePIDAsOmegaMinus; fCFContCascadePIDAsOmegaMinus = 0x0;}\r
+ if (fCFContCascadePIDAsOmegaPlus && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fCFContCascadePIDAsOmegaPlus; fCFContCascadePIDAsOmegaPlus = 0x0;}\r
+ if (fCFContAsCascadeCuts && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {delete fCFContAsCascadeCuts; fCFContAsCascadeCuts = 0x0;}\r
+ if (fESDtrackCuts) {delete fESDtrackCuts; fESDtrackCuts = 0x0;}\r
+ }\r
+\r
+\r
+//________________________________________________________________________\r
+void AliAnalysisTaskCheckPerformanceCascadepp276::UserCreateOutputObjects() {\r
+ // Create histograms\r
+ // Called once\r
+\r
+ // - Option for AliLog: to suppress the extensive info prompted by a run with MC\r
+ AliLog::SetGlobalLogLevel(AliLog::kError); \r
+\r
+ // - Definition of the output datamembers \r
+ fListHistCascade = new TList();\r
+ fListHistCascade->SetOwner(); // See http://root.cern.ch/root/html/TCollection.html#TCollection:SetOwner\r
+\r
+ //-----------------------------------------------\r
+ // Particle Identification Setup (new PID object)\r
+ //-----------------------------------------------\r
+ AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager();\r
+ AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());\r
+ fPIDResponse = inputHandler->GetPIDResponse();\r
+ \r
+ // - Only used to get the number of primary reconstructed tracks\r
+ if (! fESDtrackCuts ){\r
+ fESDtrackCuts = new AliESDtrackCuts();\r
+ }\r
+ \r
+ //----------------------\r
+ // Initialize the histos\r
+ //----------------------\r
+\r
+ //----------------------------------\r
+ // - Same general binning definition\r
+ Double_t ptBinLimits[101];\r
+ for (Int_t iptbin = 0; iptbin<101; ++iptbin) ptBinLimits[iptbin]=iptbin*0.1;\r
+ Double_t yBinLimits[111];\r
+ for (Int_t iybin = 0; iybin<111; ++iybin) yBinLimits[iybin]=-1.1+iybin*0.02;\r
+ Double_t ctauBinLimits[112];\r
+ for (Int_t ict = 0; ict<112; ++ict) ctauBinLimits[ict] = (Double_t) (ict-1.); \r
+ \r
+ //------------------\r
+ // - General plots\r
+ // - Cascades multiplicity plots \r
+ if(! fHistCascadeMultiplicityBeforeAnySel) {\r
+ fHistCascadeMultiplicityBeforeAnySel = new TH1F("fHistCascadeMultiplicityBeforeAnySel",\r
+ "Cascades per event (before any selections);Nbr of Cascades/Evt;Events", 50, 0, 50);\r
+ fListHistCascade->Add(fHistCascadeMultiplicityBeforeAnySel);\r
+ }\r
+ if(! fHistCascadeMultiplicityAfterSDDSel) {\r
+ fHistCascadeMultiplicityAfterSDDSel = new TH1F("fHistCascadeMultiplicityAfterSDDSel",\r
+ "Cascades per event (after only the SDD selection);Nbr of Cascades/Evt;Events", 50, 0, 50);\r
+ fListHistCascade->Add(fHistCascadeMultiplicityAfterSDDSel);\r
+ }\r
+ if(! fHistCascadeMultiplicityAfterPhysicsSel) {\r
+ fHistCascadeMultiplicityAfterPhysicsSel = new TH1F("fHistCascadeMultiplicityAfterPhysicsSel",\r
+ "Cascades per event (after physics selection);Nbr of Cascades/Evt;Events", 50, 0, 50);\r
+ fListHistCascade->Add(fHistCascadeMultiplicityAfterPhysicsSel);\r
+ }\r
+ if(! fHistCascadeMultiplicityForSelEvtNoTPCOnly) {\r
+ fHistCascadeMultiplicityForSelEvtNoTPCOnly = new TH1F("fHistCascadeMultiplicityForSelEvtNoTPCOnly",\r
+ "Cascades per event (for selected events with well-established PV);Nbr of Cascades/Evt;Events", 50, 0, 50);\r
+ fListHistCascade->Add(fHistCascadeMultiplicityForSelEvtNoTPCOnly);\r
+ }\r
+ if(! fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup) {\r
+ fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup = new TH1F("fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup",\r
+ "Cascades per event (for selected events with well-establisched PV and no pile-up);Nbr of Cascades/Evt;Events", 50, 0, 50);\r
+ fListHistCascade->Add(fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup);\r
+ }\r
+ if(! fHistCascadeMultiplicityAfterVertexCutSel) {\r
+ fHistCascadeMultiplicityAfterVertexCutSel = new TH1F("fHistCascadeMultiplicityAfterVertexCutSel",\r
+ "Cascades per event (after vertex cut selection);Nbr of Cascades/Evt;Events", 50, 0, 50);\r
+ fListHistCascade->Add(fHistCascadeMultiplicityAfterVertexCutSel);\r
+ }\r
+ // - Tracks multiplicity plots \r
+ if(! fHistTrackMultiplicityBeforeAnySel) {\r
+ fHistTrackMultiplicityBeforeAnySel = new TH1F("fHistTrackMultiplicityBeforeAnySel",\r
+ "Tracks per event (before any selections);Nbr of Tracks/Evt;Events", 200, 0, 200);\r
+ fListHistCascade->Add(fHistTrackMultiplicityBeforeAnySel);\r
+ }\r
+ if(! fHistTrackMultiplicityAfterSDDSel) {\r
+ fHistTrackMultiplicityAfterSDDSel = new TH1F("fHistTrackMultiplicityAfterSDDSel",\r
+ "Tracks per event (after only the SDD selection);Nbr of Tracks/Evt;Events", 200, 0, 200);\r
+ fListHistCascade->Add(fHistTrackMultiplicityAfterSDDSel);\r
+ }\r
+ if(! fHistTrackMultiplicityAfterPhysicsSel) {\r
+ fHistTrackMultiplicityAfterPhysicsSel = new TH1F("fHistTrackMultiplicityAfterPhysicsSel",\r
+ "Tracks per event (after physics selection);Nbr of Tracks/Evt;Events", 200, 0, 200);\r
+ fListHistCascade->Add(fHistTrackMultiplicityAfterPhysicsSel);\r
+ }\r
+ if(! fHistTrackMultiplicityForSelEvtNoTPCOnly) {\r
+ fHistTrackMultiplicityForSelEvtNoTPCOnly = new TH1F("fHistTrackMultiplicityForSelEvtNoTPCOnly",\r
+ "Tracks per event (for selected events with well-established PV);Nbr of Tracks/Evt;Events", 200, 0, 200);\r
+ fListHistCascade->Add(fHistTrackMultiplicityForSelEvtNoTPCOnly);\r
+ }\r
+ if(! fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup) {\r
+ fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = new TH1F("fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup",\r
+ "Tracks per event (for selected events with well-establisched PV and no pile-up);Nbr of Tracks/Evt;Events", 200, 0, 200);\r
+ fListHistCascade->Add(fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup);\r
+ }\r
+ if(! fHistTrackMultiplicityAfterVertexCutSel) {\r
+ fHistTrackMultiplicityAfterVertexCutSel = new TH1F("fHistTrackMultiplicityAfterVertexCutSel",\r
+ "Tracks per event (after vertex cut selection);Nbr of Tracks/Evt;Events", 200, 0, 200);\r
+ fListHistCascade->Add(fHistTrackMultiplicityAfterVertexCutSel);\r
+ }\r
+ // - Vertex position plots\r
+ if(! fHistPVx ){\r
+ fHistPVx = new TH1F("fHistPVx", "Best PV position in x; x (cm); Events", 2000, -0.5, 0.5);\r
+ fListHistCascade->Add(fHistPVx);\r
+ }\r
+ if(! fHistPVy ){\r
+ fHistPVy = new TH1F("fHistPVy", "Best PV position in y; y (cm); Events", 2000, -0.5, 0.5);\r
+ fListHistCascade->Add(fHistPVy);\r
+ }\r
+ if(! fHistPVz ){\r
+ fHistPVz = new TH1F("fHistPVz", "Best PV position in z; z (cm); Events", 400, -20, 20);\r
+ fListHistCascade->Add(fHistPVz);\r
+ }\r
+ if(! fHistPVxAnalysis ){\r
+ fHistPVxAnalysis = new TH1F("fHistPVxAnalysis", "Best PV position in x (after events selections); x (cm); Events", 2000, -0.5, 0.5);\r
+ fListHistCascade->Add(fHistPVxAnalysis);\r
+ }\r
+ if(! fHistPVyAnalysis ){\r
+ fHistPVyAnalysis = new TH1F("fHistPVyAnalysis", "Best PV position in y (after events selections); y (cm); Events" , 2000, -0.5, 0.5);\r
+ fListHistCascade->Add(fHistPVyAnalysis);\r
+ }\r
+ if(! fHistPVzAnalysis ){\r
+ fHistPVzAnalysis = new TH1F("fHistPVzAnalysis", "Best PV position in z (after events selections); z (cm); Events", 400, -20, 20);\r
+ fListHistCascade->Add(fHistPVzAnalysis);\r
+ }\r
+\r
+ //--------------------------\r
+ // - Generated cascade plots\r
+ // - Generated Cascade multiplicity distributions (for singol cascade)\r
+ fHistnXiPlusPerEvTot = new TH1F("fHistnXiPlusPerEvTot", "", 25, 0, 25);\r
+ fListHistCascade->Add(fHistnXiPlusPerEvTot);\r
+ fHistnXiMinusPerEvTot = new TH1F("fHistnXiMinusPerEvTot", "", 25, 0, 25);\r
+ fListHistCascade->Add(fHistnXiMinusPerEvTot);\r
+ fHistnOmegaPlusPerEvTot = new TH1F("fHistnOmegaPlusPerEvTot", "", 25, 0, 25);\r
+ fListHistCascade->Add(fHistnOmegaPlusPerEvTot);\r
+ fHistnOmegaMinusPerEvTot = new TH1F("fHistnOmegaMinusPerEvTot", "", 25, 0, 25);\r
+ fListHistCascade->Add(fHistnOmegaMinusPerEvTot); \r
+ fHistnXiPlusPerEv = new TH1F("fHistnXiPlusPerEv", "", 25, 0, 25);\r
+ fListHistCascade->Add(fHistnXiPlusPerEv);\r
+ fHistnXiMinusPerEv = new TH1F("fHistnXiMinusPerEv", "", 25, 0, 25);\r
+ fListHistCascade->Add(fHistnXiMinusPerEv);\r
+ fHistnOmegaPlusPerEv = new TH1F("fHistnOmegaPlusPerEv", "", 25, 0, 25);\r
+ fListHistCascade->Add(fHistnOmegaPlusPerEv);\r
+ fHistnOmegaMinusPerEv = new TH1F("fHistnOmegaMinusPerEv", "", 25, 0, 25);\r
+ fListHistCascade->Add(fHistnOmegaMinusPerEv);\r
+ // - Xi- \r
+ // - Pseudo-Rapidity distribution\r
+ if (!fHistEtaGenCascXiMinus) {\r
+ fHistEtaGenCascXiMinus = new TH1F("fHistEtaGenCascXiMinus", "#eta of any gen. #Xi^{-}; #eta; Number of Casc", 200, -10, 10);\r
+ fListHistCascade->Add(fHistEtaGenCascXiMinus);\r
+ }\r
+ if (!f3dHistGenPtVsGenYvsNtracksXiMinus) {\r
+ f3dHistGenPtVsGenYvsNtracksXiMinus = new TH3D("f3dHistGenPtVsGenYvsNtracksXiMinus", "MC P_{t} Vs MC Y of Gen #Xi^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.);\r
+ fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksXiMinus);\r
+ }\r
+ if (!f3dHistGenPtVsGenctauvsYXiMinus) {\r
+ f3dHistGenPtVsGenctauvsYXiMinus = new TH3D("f3dHistGenPtVsGenctauvsYXiMinus", "MC P_{t} Vs MC ctau Vs Y of Gen #Xi^{-}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits);\r
+ fListHistCascade->Add(f3dHistGenPtVsGenctauvsYXiMinus);\r
+ }\r
+ if (!f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff) {\r
+ f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff = new TH3D("f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff", "MC P_{t} Vs MC Y of Gen #Xi^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.);\r
+ fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff);\r
+ }\r
+ if (!f3dHistGenPtVsGenctauvsYXiMinusPhysEff) {\r
+ f3dHistGenPtVsGenctauvsYXiMinusPhysEff = new TH3D("f3dHistGenPtVsGenctauvsYXiMinusPhysEff", "MC P_{t} Vs MC ctau Vs Y of Gen #Xi^{-}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits);\r
+ fListHistCascade->Add(f3dHistGenPtVsGenctauvsYXiMinusPhysEff);\r
+ }\r
+ // - Info at the generation level of multi-strange particle\r
+ if (!fHistThetaGenCascXiMinus) {\r
+ fHistThetaGenCascXiMinus = new TH1F("fHistThetaGenCascXiMinus", "#theta of gen. #Xi^{-}; #theta; Number of Casc.", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaGenCascXiMinus);\r
+ }\r
+ if (!f2dHistGenPtVsGenYFdblXiMinus) {\r
+ f2dHistGenPtVsGenYFdblXiMinus = new TH2D("f2dHistGenPtVsGenYFdblXiMinus", "MC P_{t} Vs MC Y of findable Gen #Xi^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1);\r
+ fListHistCascade->Add(f2dHistGenPtVsGenYFdblXiMinus);\r
+ }\r
+ // - Theta distribution the daughters (control plots)\r
+ if (!fHistThetaLambdaXiMinus) {\r
+ fHistThetaLambdaXiMinus = new TH1F("fHistThetaLambdaXiMinus", "#theta of gen. #Lambda (Xi dghter); #theta_{#Lambda}; Number of #Lambda^0", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaLambdaXiMinus);\r
+ }\r
+ if (!fHistThetaBachXiMinus) {\r
+ fHistThetaBachXiMinus = new TH1F("fHistThetaBachXiMinus", "#theta of gen. Bach.; #theta_{Bach}; Number of Bach.", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaBachXiMinus);\r
+ }\r
+ if (!fHistThetaMesDghterXiMinus) {\r
+ fHistThetaMesDghterXiMinus = new TH1F("fHistThetaMesDghterXiMinus", "#theta of gen. Meson #Lambda dghter; #theta_{MesDght}; Number of Mes.", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaMesDghterXiMinus);\r
+ }\r
+ if (!fHistThetaBarDghterXiMinus) {\r
+ fHistThetaBarDghterXiMinus = new TH1F("fHistThetaBarDghterXiMinus", "#theta of gen. Baryon #Lambda dghter; #theta_{BarDght}; Number of Bar.", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaBarDghterXiMinus);\r
+ }\r
+ // - Pt distribution (control plots)\r
+ if (!fHistPtBachXiMinus) {\r
+ fHistPtBachXiMinus = new TH1F("fHistPtBachXiMinus", "p_{t} of gen. Bach.; pt_{Bach}; Number of Bach.", 200, 0, 10);\r
+ fListHistCascade->Add(fHistPtBachXiMinus);\r
+ }\r
+ if (!fHistPtMesDghterXiMinus) {\r
+ fHistPtMesDghterXiMinus = new TH1F("fHistPtMesDghterXiMinus", "p_{t} of gen. Meson #Lambda dghter; pt_{MesDght}; Number of Mes.", 200, 0, 10);\r
+ fListHistCascade->Add(fHistPtMesDghterXiMinus);\r
+ }\r
+ if (!fHistPtBarDghterXiMinus) {\r
+ fHistPtBarDghterXiMinus = new TH1F("fHistPtBarDghterXiMinus", "p_{t} of gen. Baryon #Lambda dghter; pt_{BarDght}; Number of Bar.", 200, 0, 10);\r
+ fListHistCascade->Add(fHistPtBarDghterXiMinus);\r
+ }\r
+ // - Xi+ \r
+ // - Pseudo-Rapidity distribution\r
+ if (!fHistEtaGenCascXiPlus) {\r
+ fHistEtaGenCascXiPlus = new TH1F("fHistEtaGenCascXiPlus", "#eta of any gen. #Xi^{+}; #eta; Number of Casc", 200, -10, 10);\r
+ fListHistCascade->Add(fHistEtaGenCascXiPlus);\r
+ }\r
+ if (!f3dHistGenPtVsGenYvsNtracksXiPlus) {\r
+ f3dHistGenPtVsGenYvsNtracksXiPlus = new TH3D("f3dHistGenPtVsGenYvsNtracksXiPlus", "MC P_{t} Vs MC Y of Gen #Xi^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.);\r
+ fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksXiPlus);\r
+ }\r
+ if (!f3dHistGenPtVsGenctauvsYXiPlus) {\r
+ f3dHistGenPtVsGenctauvsYXiPlus = new TH3D("f3dHistGenPtVsGenctauvsYXiPlus", "MC P_{t} Vs MC ctau Vs Yof Gen #Xi^{+}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits);\r
+ fListHistCascade->Add(f3dHistGenPtVsGenctauvsYXiPlus);\r
+ }\r
+ if (!f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff) {\r
+ f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff = new TH3D("f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff", "MC P_{t} Vs MC Y of Gen #Xi^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.);\r
+ fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff);\r
+ }\r
+ if (!f3dHistGenPtVsGenctauvsYXiPlusPhysEff) {\r
+ f3dHistGenPtVsGenctauvsYXiPlusPhysEff = new TH3D("f3dHistGenPtVsGenctauvsYXiPlusPhysEff", "MC P_{t} Vs MC ctau Vs Yof Gen #Xi^{+}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits);\r
+ fListHistCascade->Add(f3dHistGenPtVsGenctauvsYXiPlusPhysEff);\r
+ }\r
+ // - Info at the generation level of multi-strange particle\r
+ if (!fHistThetaGenCascXiPlus) {\r
+ fHistThetaGenCascXiPlus = new TH1F("fHistThetaGenCascXiPlus", "#theta of gen. #Xi^{+}; #theta; Number of Casc.", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaGenCascXiPlus);\r
+ }\r
+ if (!f2dHistGenPtVsGenYFdblXiPlus) {\r
+ f2dHistGenPtVsGenYFdblXiPlus = new TH2D("f2dHistGenPtVsGenYFdblXiPlus", "MC P_{t} Vs MC Y of findable Gen #Xi^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1);\r
+ fListHistCascade->Add(f2dHistGenPtVsGenYFdblXiPlus);\r
+ }\r
+ // - Theta distribution the daughters (control plots)\r
+ if (!fHistThetaLambdaXiPlus) {\r
+ fHistThetaLambdaXiPlus = new TH1F("fHistThetaLambdaXiPlus", "#theta of gen. #Lambda (Xi dghter); #theta_{#Lambda}; Number of #Lambda", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaLambdaXiPlus);\r
+ }\r
+ if (!fHistThetaBachXiPlus) {\r
+ fHistThetaBachXiPlus = new TH1F("fHistThetaBachXiPlus", "#theta of gen. Bach.; #theta_{Bach}; Number of Bach.", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaBachXiPlus);\r
+ }\r
+ if (!fHistThetaMesDghterXiPlus) {\r
+ fHistThetaMesDghterXiPlus = new TH1F("fHistThetaMesDghterXiPlus", "#theta of gen. Meson #Lambda dghter; #theta_{MesDght}; Number of Mes.", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaMesDghterXiPlus);\r
+ }\r
+ if (!fHistThetaBarDghterXiPlus) {\r
+ fHistThetaBarDghterXiPlus = new TH1F("fHistThetaBarDghterXiPlus", "#theta of gen. Baryon #Lambda dghter; #theta_{BarDght}; Number of Bar.", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaBarDghterXiPlus);\r
+ }\r
+ // - Pt distribution (control plots)\r
+ if (!fHistPtBachXiPlus) {\r
+ fHistPtBachXiPlus = new TH1F("fHistPtBachXiPlus", "p_{t} of gen. Bach.; pt_{Bach}; Number of Bach.", 200, 0, 10);\r
+ fListHistCascade->Add(fHistPtBachXiPlus);\r
+ }\r
+ if (!fHistPtMesDghterXiPlus) {\r
+ fHistPtMesDghterXiPlus = new TH1F("fHistPtMesDghterXiPlus", "p_{t} of gen. Meson #Lambda dghter; pt_{MesDght}; Number of Mes.", 200, 0, 10);\r
+ fListHistCascade->Add(fHistPtMesDghterXiPlus);\r
+ }\r
+ if (!fHistPtBarDghterXiPlus) {\r
+ fHistPtBarDghterXiPlus = new TH1F("fHistPtBarDghterXiPlus", "p_{t} of gen. Baryon #Lambda dghter); pt_{BarDght}; Number of Bar.", 200, 0, 10);\r
+ fListHistCascade->Add(fHistPtBarDghterXiPlus);\r
+ }\r
+ // - Omega- \r
+ // - Pseudo-Rapidity distribution\r
+ if (!fHistEtaGenCascOmegaMinus) {\r
+ fHistEtaGenCascOmegaMinus = new TH1F("fHistEtaGenCascOmegaMinus", "#eta of any gen. #Omega^{-}; #eta; Number of Casc", 200, -10, 10);\r
+ fListHistCascade->Add(fHistEtaGenCascOmegaMinus);\r
+ }\r
+ if (!f3dHistGenPtVsGenYvsNtracksOmegaMinus) {\r
+ f3dHistGenPtVsGenYvsNtracksOmegaMinus = new TH3D("f3dHistGenPtVsGenYvsNtracksOmegaMinus", "MC P_{t} Vs MC Y of Gen #Omega^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.);\r
+ fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksOmegaMinus);\r
+ }\r
+ if (!f3dHistGenPtVsGenctauvsYOmegaMinus) {\r
+ f3dHistGenPtVsGenctauvsYOmegaMinus = new TH3D("f3dHistGenPtVsGenctauvsYOmegaMinus", "MC P_{t} Vs MC ctau Vs Y of Gen #Omega^{-} ", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits);\r
+ fListHistCascade->Add(f3dHistGenPtVsGenctauvsYOmegaMinus);\r
+ }\r
+ if (!f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff) {\r
+ f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff = new TH3D("f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff", "MC P_{t} Vs MC Y of Gen #Omega^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.);\r
+ fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff);\r
+ }\r
+ if (!f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff) {\r
+ f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff = new TH3D("f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff", "MC P_{t} Vs MC ctau Vs Y of Gen #Omega^{-}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits);\r
+ fListHistCascade->Add(f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff);\r
+ }\r
+ // - Info at the generation level of multi-strange particle\r
+ if (!fHistThetaGenCascOmegaMinus) {\r
+ fHistThetaGenCascOmegaMinus = new TH1F("fHistThetaGenCascOmegaMinus", "#theta of gen. #Omega^{-}; #theta; Number of Casc.", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaGenCascOmegaMinus);\r
+ }\r
+ if (!f2dHistGenPtVsGenYFdblOmegaMinus) {\r
+ f2dHistGenPtVsGenYFdblOmegaMinus = new TH2D("f2dHistGenPtVsGenYFdblOmegaMinus", "MC P_{t} Vs MC Y of findable Gen #Omega^{-}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1);\r
+ fListHistCascade->Add(f2dHistGenPtVsGenYFdblOmegaMinus);\r
+ }\r
+ // - Theta distribution the daughters (control plots)\r
+ if (!fHistThetaLambdaOmegaMinus) {\r
+ fHistThetaLambdaOmegaMinus = new TH1F("fHistThetaLambdaOmegaMinus", "#theta of gen. #Lambda (Omega dghter); #theta_{#Lambda}; Number of #Lambda", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaLambdaOmegaMinus);\r
+ }\r
+ if (!fHistThetaBachOmegaMinus) {\r
+ fHistThetaBachOmegaMinus = new TH1F("fHistThetaBachOmegaMinus", "#theta of gen. Bach.;#theta_{Bach};Number of Bach.", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaBachOmegaMinus);\r
+ }\r
+ if (!fHistThetaMesDghterOmegaMinus) {\r
+ fHistThetaMesDghterOmegaMinus = new TH1F("fHistThetaMesDghterOmegaMinus", "#theta of gen. Meson #Lambda dghter; #theta_{MesDght}; Number of Mes.", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaMesDghterOmegaMinus);\r
+ }\r
+ if (!fHistThetaBarDghterOmegaMinus) {\r
+ fHistThetaBarDghterOmegaMinus = new TH1F("fHistThetaBarDghterOmegaMinus", "#theta of gen. Baryon #Lambda dghter; #theta_{BarDght}; Number of Bar.", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaBarDghterOmegaMinus);\r
+ }\r
+ // - Pt distribution (control plots)\r
+ if (!fHistPtBachOmegaMinus) {\r
+ fHistPtBachOmegaMinus = new TH1F("fHistPtBachOmegaMinus", "p_{t} of gen. Bach.; pt_{Bach}; Number of Bach.", 200, 0, 10);\r
+ fListHistCascade->Add(fHistPtBachOmegaMinus);\r
+ }\r
+ if (!fHistPtMesDghterOmegaMinus) {\r
+ fHistPtMesDghterOmegaMinus = new TH1F("fHistPtMesDghterOmegaMinus", "p_{t} of gen. Meson #Lambda dghter); pt_{MesDght}; Number of Mes.", 200, 0, 10);\r
+ fListHistCascade->Add(fHistPtMesDghterOmegaMinus);\r
+ }\r
+ if (!fHistPtBarDghterOmegaMinus) {\r
+ fHistPtBarDghterOmegaMinus = new TH1F("fHistPtBarDghterOmegaMinus", "p_{t} of gen. Baryon #Lambda dghter); pt_{BarDght}; Number of Bar.", 200, 0, 10);\r
+ fListHistCascade->Add(fHistPtBarDghterOmegaMinus);\r
+ }\r
+ // - Omega+ \r
+ // - Pseudo-Rapidity distribution\r
+ if (!fHistEtaGenCascOmegaPlus) {\r
+ fHistEtaGenCascOmegaPlus = new TH1F("fHistEtaGenCascOmegaPlus", "#eta of any gen. #Omega^{+}; #eta; Number of Casc", 200, -10, 10);\r
+ fListHistCascade->Add(fHistEtaGenCascOmegaPlus);\r
+ }\r
+ if (!f3dHistGenPtVsGenYvsNtracksOmegaPlus) {\r
+ f3dHistGenPtVsGenYvsNtracksOmegaPlus = new TH3D("f3dHistGenPtVsGenYvsNtracksOmegaPlus", "MC P_{t} Vs MC Y of Gen #Omega^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.);\r
+ fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksOmegaPlus);\r
+ }\r
+ if (!f3dHistGenPtVsGenctauvsYOmegaPlus) {\r
+ f3dHistGenPtVsGenctauvsYOmegaPlus = new TH3D("f3dHistGenPtVsGenctauvsYOmegaPlus", "MC P_{t} Vs MC ctau Vs Y of Gen #Omega^{+} ", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits);\r
+ fListHistCascade->Add(f3dHistGenPtVsGenctauvsYOmegaPlus);\r
+ }\r
+ if (!f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff) {\r
+ f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff = new TH3D("f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff", "MC P_{t} Vs MC Y of Gen #Omega^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 110, -1.1, 1.1, 200, 0., 200.);\r
+ fListHistCascade->Add(f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff);\r
+ }\r
+ if (!f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff) {\r
+ f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff = new TH3D("f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff", "MC P_{t} Vs MC ctau Vs Y of Gen #Omega^{+}", 100, ptBinLimits, 111, ctauBinLimits, 110, yBinLimits);\r
+ fListHistCascade->Add(f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff);\r
+ }\r
+ // - Info at the generation level of multi-strange particle\r
+ if (!fHistThetaGenCascOmegaPlus) {\r
+ fHistThetaGenCascOmegaPlus = new TH1F("fHistThetaGenCascOmegaPlus", "#theta of gen. #Omega^{+}; #theta; Number of Casc.", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaGenCascOmegaPlus);\r
+ }\r
+ if (!f2dHistGenPtVsGenYFdblOmegaPlus) {\r
+ f2dHistGenPtVsGenYFdblOmegaPlus = new TH2D("f2dHistGenPtVsGenYFdblOmegaPlus", "MC P_{t} Vs MC Y of findable Gen #Omega^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1);\r
+ fListHistCascade->Add(f2dHistGenPtVsGenYFdblOmegaPlus);\r
+ }\r
+ // - Info at the generation level of multi-strange particle\r
+ if (!fHistThetaGenCascOmegaPlus) {\r
+ fHistThetaGenCascOmegaPlus = new TH1F("fHistThetaGenCascOmegaPlus", "#theta of gen. #Omega^{+}; #theta; Number of Casc.", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaGenCascOmegaPlus);\r
+ }\r
+ if (!f2dHistGenPtVsGenYFdblOmegaPlus) {\r
+ f2dHistGenPtVsGenYFdblOmegaPlus = new TH2D("f2dHistGenPtVsGenYFdblOmegaPlus", "MC P_{t} Vs MC Y of findable Gen #Omega^{+}; Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1);\r
+ fListHistCascade->Add(f2dHistGenPtVsGenYFdblOmegaPlus);\r
+ }\r
+ // - Theta distribution the daughters (control plots)\r
+ if (!fHistThetaLambdaOmegaPlus) {\r
+ fHistThetaLambdaOmegaPlus = new TH1F("fHistThetaLambdaOmegaPlus", "#theta of gen. #Lambda (Omega dghter); #theta_{#Lambda}; Number of #Lambda", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaLambdaOmegaPlus);\r
+ }\r
+ if (!fHistThetaBachOmegaPlus) {\r
+ fHistThetaBachOmegaPlus = new TH1F("fHistThetaBachOmegaPlus", "#theta of gen. Bach.; #theta_{Bach}; Number of Bach.", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaBachOmegaPlus);\r
+ }\r
+ if (!fHistThetaMesDghterOmegaPlus) {\r
+ fHistThetaMesDghterOmegaPlus = new TH1F("fHistThetaMesDghterOmegaPlus", "#theta of gen. Meson #Lambda dghter; #theta_{MesDght}; Number of Mes.", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaMesDghterOmegaPlus);\r
+ }\r
+ if (!fHistThetaBarDghterOmegaPlus) {\r
+ fHistThetaBarDghterOmegaPlus = new TH1F("fHistThetaBarDghterOmegaPlus", "#theta of gen. Baryon #Lambda dghter; #theta_{BarDght}; Number of Bar.", 200, -10, 190);\r
+ fListHistCascade->Add(fHistThetaBarDghterOmegaPlus);\r
+ }\r
+ // - Pt distribution (control plots)\r
+ if (!fHistPtBachOmegaPlus) {\r
+ fHistPtBachOmegaPlus = new TH1F("fHistPtBachOmegaPlus", "p_{t} of gen. Bach.; pt_{Bach}; Number of Bach.", 200, 0, 10);\r
+ fListHistCascade->Add(fHistPtBachOmegaPlus);\r
+ }\r
+ if (!fHistPtMesDghterOmegaPlus) {\r
+ fHistPtMesDghterOmegaPlus = new TH1F("fHistPtMesDghterOmegaPlus", "p_{t} of gen. Meson #Lambda dghter; pt_{MesDght}; Number of Mes.", 200, 0, 10);\r
+ fListHistCascade->Add(fHistPtMesDghterOmegaPlus);\r
+ }\r
+ if (!fHistPtBarDghterOmegaPlus) {\r
+ fHistPtBarDghterOmegaPlus = new TH1F("fHistPtBarDghterOmegaPlus", "p_{t} of gen. Baryon #Lambda dghter); pt_{BarDght}; Number of Bar.", 200, 0, 10);\r
+ fListHistCascade->Add(fHistPtBarDghterOmegaPlus);\r
+ }\r
+ \r
+ //-------------------------------------------------------------------------\r
+ // - Any reconstructed cascades + reconstructed cascades associated with MC\r
+ \r
+ // - Multiplicity cascde plots\r
+ fHistnAssoXiMinus= new TH1F("fHistnAssoXiMinus", "", 25, 0, 25);\r
+ fListHistCascade->Add(fHistnAssoXiMinus);\r
+ fHistnAssoXiPlus= new TH1F("fHistnAssoXiPlus", "", 25, 0, 25);\r
+ fListHistCascade->Add(fHistnAssoXiPlus);\r
+ fHistnAssoOmegaMinus= new TH1F("fHistnAssoOmegaMinus", "", 25, 0, 25);\r
+ fListHistCascade->Add(fHistnAssoOmegaMinus);\r
+ fHistnAssoOmegaPlus= new TH1F("fHistnAssoOmegaPlus", "", 25, 0, 25);\r
+ fListHistCascade->Add(fHistnAssoOmegaPlus);\r
+ // - Effective mass histos for cascades candidates. \r
+ if (! fHistMassXiMinus) {\r
+ fHistMassXiMinus = new TH1F("fHistMassXiMinus","#Xi^{-} candidates; M( #Lambda , #pi^{-} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0);\r
+ fListHistCascade->Add(fHistMassXiMinus);\r
+ }\r
+ if (! fHistMassXiPlus) {\r
+ fHistMassXiPlus = new TH1F("fHistMassXiPlus","#Xi^{+} candidates; M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0);\r
+ fListHistCascade->Add(fHistMassXiPlus);\r
+ }\r
+ if (! fHistMassOmegaMinus) {\r
+ fHistMassOmegaMinus = new TH1F("fHistMassOmegaMinus","#Omega^{-} candidates; M( #Lambda , K^{-} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5);\r
+ fListHistCascade->Add(fHistMassOmegaMinus);\r
+ } \r
+ if (! fHistMassOmegaPlus) {\r
+ fHistMassOmegaPlus = new TH1F("fHistMassOmegaPlus","#Omega^{+} candidates; M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5);\r
+ fListHistCascade->Add(fHistMassOmegaPlus);\r
+ }\r
+ // - Effective mass histos with combined PID\r
+ if (! fHistMassWithCombPIDXiMinus) {\r
+ fHistMassWithCombPIDXiMinus = new TH1F("fHistMassWithCombPIDXiMinus","#Xi^{-} candidates, with Bach. comb. PID; M( #Lambda , #pi^{-} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0);\r
+ fListHistCascade->Add(fHistMassWithCombPIDXiMinus);\r
+ }\r
+ if (! fHistMassWithCombPIDXiPlus) {\r
+ fHistMassWithCombPIDXiPlus = new TH1F("fHistMassWithCombPIDXiPlus","#Xi^{+} candidates, with Bach. comb. PID; M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0);\r
+ fListHistCascade->Add(fHistMassWithCombPIDXiPlus);\r
+ }\r
+ if (! fHistMassWithCombPIDOmegaMinus) {\r
+ fHistMassWithCombPIDOmegaMinus = new TH1F("fHistMassWithCombPIDOmegaMinus","#Omega^{-} candidates, with Bach. comb. PID; M( #Lambda , K^{-} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5);\r
+ fListHistCascade->Add(fHistMassWithCombPIDOmegaMinus);\r
+ }\r
+ if (! fHistMassWithCombPIDOmegaPlus) {\r
+ fHistMassWithCombPIDOmegaPlus = new TH1F("fHistMassWithCombPIDOmegaPlus","#Omega^{+} candidates, with Bach. comb. PID; M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5);\r
+ fListHistCascade->Add(fHistMassWithCombPIDOmegaPlus);\r
+ }\r
+ // - PID Probability versus MC Pt(bachelor track)\r
+ if (! f2dHistPIDprobaKaonVsMCPtBach ){\r
+ f2dHistPIDprobaKaonVsMCPtBach = new TH2F("f2dHistPIDprobaKaonVsMCPtBach", "Comb. PID proba to be K^{#pm} Vs MC Bach. Pt; Pt_{MC}(Bach.) (GeV/c); Comb. PID Proba (Bach. = K^{#pm})", 100, 0.0, 5.0, 110, 0.0, 1.10);\r
+ fListHistCascade->Add(f2dHistPIDprobaKaonVsMCPtBach);\r
+ }\r
+ if(! f2dHistPIDprobaPionVsMCPtBach ){\r
+ f2dHistPIDprobaPionVsMCPtBach = new TH2F("f2dHistPIDprobaPionVsMCPtBach", "Comb. PID proba to be #pi^{#pm} Vs MC Bach. Pt; Pt_{MC}(Bach.) (GeV/c); Comb. PID Proba (Bach. = #pi^{#pm})", 100, 0.0, 5.0, 110, 0.0, 1.10);\r
+ fListHistCascade->Add(f2dHistPIDprobaPionVsMCPtBach);\r
+ }\r
+ // - Effective mass histos with perfect MC PID on the bachelor\r
+ if (! fHistMassWithMcPIDXiMinus) {\r
+ fHistMassWithMcPIDXiMinus = new TH1F("fHistMassWithMcPIDXiMinus", "#Xi^{-} candidates, with Bach. MC PID; M( #Lambda , #pi^{-} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0);\r
+ fListHistCascade->Add(fHistMassWithMcPIDXiMinus);\r
+ }\r
+ if (! fHistMassWithMcPIDXiPlus) {\r
+ fHistMassWithMcPIDXiPlus = new TH1F("fHistMassWithMcPIDXiPlus", "#Xi^{+} candidates, with Bach. MC PID; M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0);\r
+ fListHistCascade->Add(fHistMassWithMcPIDXiPlus);\r
+ }\r
+ if (! fHistMassWithMcPIDOmegaMinus) {\r
+ fHistMassWithMcPIDOmegaMinus = new TH1F("fHistMassWithMcPIDOmegaMinus", "#Omega^{-} candidates, with Bach. MC PID; M( #Lambda , K^{-} ) (GeV/c^{2});Counts", 500, 1.5, 2.5);\r
+ fListHistCascade->Add(fHistMassWithMcPIDOmegaMinus);\r
+ }\r
+ if (! fHistMassWithMcPIDOmegaPlus) {\r
+ fHistMassWithMcPIDOmegaPlus = new TH1F("fHistMassWithMcPIDOmegaPlus", "#Omega^{+} candidates, with Bach. MC PID; M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5);\r
+ fListHistCascade->Add(fHistMassWithMcPIDOmegaPlus);\r
+ }\r
+ // - Effective mass histos for cascades candidates ASSOCIATED with MC.\r
+ if (! fHistAsMCMassXiMinus) {\r
+ fHistAsMCMassXiMinus = new TH1F("fHistAsMCMassXiMinus", "#Xi^{-} candidates associated to MC; M( #Lambda , #pi^{-} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0);\r
+ fListHistCascade->Add(fHistAsMCMassXiMinus);\r
+ }\r
+ if (! fHistAsMCMassXiPlus) {\r
+ fHistAsMCMassXiPlus = new TH1F("fHistAsMCMassXiPlus", "#Xi^{+} candidates associated to MC; M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2}); Counts", 400, 1.2, 2.0);\r
+ fListHistCascade->Add(fHistAsMCMassXiPlus);\r
+ }\r
+ if (! fHistAsMCMassOmegaMinus) {\r
+ fHistAsMCMassOmegaMinus = new TH1F("fHistAsMCMassOmegaMinus", "#Omega^{-} candidates associated to MC; M( #Lambda , K^{-} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5);\r
+ fListHistCascade->Add(fHistAsMCMassOmegaMinus);\r
+ }\r
+ if (! fHistAsMCMassOmegaPlus) {\r
+ fHistAsMCMassOmegaPlus = new TH1F("fHistAsMCMassOmegaPlus", "#Omega^{+} candidates associated to MC; M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2}); Counts", 500, 1.5, 2.5);\r
+ fListHistCascade->Add(fHistAsMCMassOmegaPlus);\r
+ }\r
+ // - Generated Pt Vs generated Y of the cascade candidates associated with MC + having the proper maximum proba of combined PID for the bachelor\r
+ if (!f2dHistAsMCandCombPIDGenPtVsGenYXiMinus) {\r
+ f2dHistAsMCandCombPIDGenPtVsGenYXiMinus = new TH2F("f2dHistAsMCandCombPIDGenPtVsGenYXiMinus", "MC P_{t} Vs MC Y of #Xi^{-} (associated+Bach.PID); Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 220, -1.1, 1.1);\r
+ fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYXiMinus);\r
+ }\r
+ if (!f2dHistAsMCandCombPIDGenPtVsGenYXiPlus) {\r
+ f2dHistAsMCandCombPIDGenPtVsGenYXiPlus = new TH2F("f2dHistAsMCandCombPIDGenPtVsGenYXiPlus", "MC P_{t} Vs MC Y of #Xi^{+} (associated+Bach.PID); Pt_{MC} (GeV/c); Y_{MC}", 100, 0., 10., 220, -1.1, 1.1);\r
+ fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYXiPlus);\r
+ } \r
+ if (!f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus) {\r
+ f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus = new TH2F("f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus", "MC P_{t} Vs MC Y of #Omega^{-} (associated+Bach.PID); Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 220, -1.1, 1.1);\r
+ fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus);\r
+ }\r
+ if (!f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus) {\r
+ f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus = new TH2F("f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus", "MC P_{t} Vs MC Y of #Omega^{+} (associated+Bach.PID); Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 220, -1.1, 1.1);\r
+ fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus);\r
+ }\r
+ // - Generated Pt Vs Generated Y, for the cascade candidates associated with MC\r
+ if (!f2dHistAsMCGenPtVsGenYXiMinus) {\r
+ f2dHistAsMCGenPtVsGenYXiMinus = new TH2F("f2dHistAsMCGenPtVsGenYXiMinus", "MC P_{t} Vs MC Y of gen. #Xi^{-} (associated); Pt_{MC} (GeV/c); Rapidity, Y_{MC}",200, 0., 10., 220, -1.1, 1.1);\r
+ fListHistCascade->Add(f2dHistAsMCGenPtVsGenYXiMinus );\r
+ }\r
+ if (!f2dHistAsMCGenPtVsGenYXiPlus) {\r
+ f2dHistAsMCGenPtVsGenYXiPlus = new TH2F("f2dHistAsMCGenPtVsGenYXiPlus", "MC P_{t} Vs MC Y of gen. #Xi^{+} (associated); Pt_{MC} (GeV/c); Rapidity, Y_{MC}",200, 0., 10., 220, -1.1, 1.1);\r
+ fListHistCascade->Add(f2dHistAsMCGenPtVsGenYXiPlus );\r
+ }\r
+ if (!f2dHistAsMCGenPtVsGenYOmegaMinus) {\r
+ f2dHistAsMCGenPtVsGenYOmegaMinus = new TH2F("f2dHistAsMCGenPtVsGenYOmegaMinus", "MC P_{t} Vs MC Y of gen. #Omega^{-} (associated); Pt_{MC} (GeV/c); Rapidity, Y_{MC}",200, 0., 10., 220, -1.1, 1.1);\r
+ fListHistCascade->Add(f2dHistAsMCGenPtVsGenYOmegaMinus );\r
+ }\r
+ if (!f2dHistAsMCGenPtVsGenYOmegaPlus) {\r
+ f2dHistAsMCGenPtVsGenYOmegaPlus = new TH2F("f2dHistAsMCGenPtVsGenYOmegaPlus", "MC P_{t} Vs MC Y of gen. #Omega^{+} (associated); Pt_{MC} (GeV/c); Rapidity, Y_{MC}",200, 0., 10., 220, -1.1, 1.1);\r
+ fListHistCascade->Add(f2dHistAsMCGenPtVsGenYOmegaPlus );\r
+ } \r
+ // - Generated Eta of the the cascade candidates associated with MC\r
+ if (!fHistAsMCGenEtaXiMinus) {\r
+ fHistAsMCGenEtaXiMinus = new TH1F("fHistAsMCGenEtaXiMinus", "#eta of gen. #Xi^{-} (associated); #eta; Count", 100, -5, 5);\r
+ fListHistCascade->Add( fHistAsMCGenEtaXiMinus );\r
+ }\r
+ if (!fHistAsMCGenEtaXiPlus) {\r
+ fHistAsMCGenEtaXiPlus = new TH1F("fHistAsMCGenEtaXiPlus", "#eta of gen. #Xi^{+} (associated); #eta; Count", 100, -5, 5);\r
+ fListHistCascade->Add( fHistAsMCGenEtaXiPlus );\r
+ }\r
+ if (!fHistAsMCGenEtaOmegaMinus) {\r
+ fHistAsMCGenEtaOmegaMinus = new TH1F("fHistAsMCGenEtaOmegaMinus", "#eta of gen. #Omega^{-} (associated);#eta;Number of Casc", 100, -5, 5);\r
+ fListHistCascade->Add( fHistAsMCGenEtaOmegaMinus );\r
+ }\r
+ if (!fHistAsMCGenEtaOmegaPlus) {\r
+ fHistAsMCGenEtaOmegaPlus = new TH1F("fHistAsMCGenEtaOmegaPlus", "#eta of gen. #Omega^{+} (associated); #eta; Count", 100, -5, 5);\r
+ fListHistCascade->Add( fHistAsMCGenEtaOmegaPlus );\r
+ }\r
+ // - Resolution in Pt as function of generated Pt\r
+ if (! f2dHistAsMCResPtXiMinus) {\r
+ f2dHistAsMCResPtXiMinus = new TH2F("f2dHistAsMCResPtXiMinus", "Resolution in Pt reconstruction for #Xi^{-}; Pt_{MC} (GeV/c); (Pt_{reco} - Pt_{MC}) / Pt_{MC}", 200, 0., 10., 200, -0.1, 0.1);\r
+ fListHistCascade->Add(f2dHistAsMCResPtXiMinus);\r
+ }\r
+ if (! f2dHistAsMCResPtXiPlus) {\r
+ f2dHistAsMCResPtXiPlus = new TH2F("f2dHistAsMCResPtXiPlus", "Resolution in Pt reconstruction for #Xi^{+}; Pt_{MC} (GeV/c); (Pt_{reco} - Pt_{MC}) / Pt_{MC}", 200, 0., 10., 200, -0.1, 0.1);\r
+ fListHistCascade->Add(f2dHistAsMCResPtXiPlus);\r
+ }\r
+ if (! f2dHistAsMCResPtOmegaMinus) {\r
+ f2dHistAsMCResPtOmegaMinus = new TH2F("f2dHistAsMCResPtOmegaMinus", "Resolution in Pt reconstruction for #Omega^{-}; Pt_{MC} (GeV/c); (Pt_{reco} - Pt_{MC}) / Pt_{MC}", 200, 0., 10., 200, -0.1, 0.1);\r
+ fListHistCascade->Add(f2dHistAsMCResPtOmegaMinus);\r
+ }\r
+ if (! f2dHistAsMCResPtOmegaPlus) {\r
+ f2dHistAsMCResPtOmegaPlus = new TH2F("f2dHistAsMCResPtOmegaPlus", "Resolution in Pt reconstruction for #Omega^{+}; Pt_{MC} (GeV/c); (Pt_{reco} - Pt_{MC}) / Pt_{MC}", 200, 0., 10., 200, -0.1, 0.1);\r
+ fListHistCascade->Add(f2dHistAsMCResPtOmegaPlus);\r
+ }\r
+ // - Resolution in R(2D) as function of generated R\r
+ if (! f2dHistAsMCResRXiMinus) {\r
+ f2dHistAsMCResRXiMinus = new TH2F("f2dHistAsMCResRXiMinus", "Resolution in transv. position for #Xi^{-}; R_{MC} (cm); (R_{reco} - R_{MC}) / R_{MC}", 450, 0., 45.0, 240, -0.3, 0.3);\r
+ fListHistCascade->Add(f2dHistAsMCResRXiMinus);\r
+ }\r
+ if (! f2dHistAsMCResRXiPlus) {\r
+ f2dHistAsMCResRXiPlus = new TH2F("f2dHistAsMCResRXiPlus", "Resolution in transv. position for #Xi^{+}; R_{MC} (cm); (R_{reco} - R_{MC}) / R_{MC}", 450, 0., 45.0, 240, -0.3, 0.3);\r
+ fListHistCascade->Add(f2dHistAsMCResRXiPlus);\r
+ } \r
+ if (! f2dHistAsMCResROmegaMinus) {\r
+ f2dHistAsMCResROmegaMinus = new TH2F("f2dHistAsMCResROmegaMinus", "Resolution in transv. position for #Omega^{-}; R_{MC} (cm); (R_{reco} - R_{MC}) / R_{MC}", 450, 0., 45.0, 240, -0.3, 0.3);\r
+ fListHistCascade->Add(f2dHistAsMCResROmegaMinus);\r
+ }\r
+ if (! f2dHistAsMCResROmegaPlus) {\r
+ f2dHistAsMCResROmegaPlus = new TH2F("f2dHistAsMCResROmegaPlus", "Resolution in transv. position for #Omega^{+}; R_{MC} (cm); (R_{reco} - R_{MC}) / R_{MC}", 450, 0., 45.0, 240, -0.3, 0.3);\r
+ fListHistCascade->Add(f2dHistAsMCResROmegaPlus);\r
+ }\r
+ // - Resolution in phi as function of generated Pt \r
+ if (! f2dHistAsMCResPhiXiMinus) {\r
+ f2dHistAsMCResPhiXiMinus = new TH2F("f2dHistAsMCResPhiXiMinus", "Resolution in #phi for #Xi^{-}; Pt_{MC} (GeV/c); #phi(MC) - #phi(reco) (deg)", 200, 0., 10., 60, -30., 30.);\r
+ fListHistCascade->Add(f2dHistAsMCResPhiXiMinus);\r
+ }\r
+ if (! f2dHistAsMCResPhiXiPlus) {\r
+ f2dHistAsMCResPhiXiPlus = new TH2F("f2dHistAsMCResPhiXiPlus", "Resolution in #phi for #Xi^{+}; Pt_{MC} (GeV/c); #phi(MC) - #phi(reco) (deg)", 200, 0., 10., 60, -30., 30.);\r
+ fListHistCascade->Add(f2dHistAsMCResPhiXiPlus);\r
+ }\r
+ if (! f2dHistAsMCResPhiOmegaMinus) {\r
+ f2dHistAsMCResPhiOmegaMinus = new TH2F("f2dHistAsMCResPhiOmegaMinus", "Resolution in #phi for #Omega^{-}; Pt_{MC} (GeV/c); #phi(MC) - #phi(reco) (deg)", 200, 0., 10., 60, -30., 30.); \r
+ fListHistCascade->Add(f2dHistAsMCResPhiOmegaMinus);\r
+ }\r
+ if (! f2dHistAsMCResPhiOmegaPlus) {\r
+ f2dHistAsMCResPhiOmegaPlus = new TH2F("f2dHistAsMCResPhiOmegaPlus", "Resolution in #phi for #Omega^{+}; Pt_{MC} (GeV/c); #phi(MC) - #phi(reco) (deg)", 200, 0., 10., 60, -30., 30.);\r
+ fListHistCascade->Add(f2dHistAsMCResPhiOmegaPlus);\r
+ }\r
+ // - Correlation between proton (antiproton) daughter MC pt and Xi/Omega MC pt (to apply Geant/Fluka correction)\r
+ if (!f2dHistAsMCptProtonMCptXiMinus) {\r
+ f2dHistAsMCptProtonMCptXiMinus = new TH2F("f2dHistAsMCptProtonMCptXiMinus", "Proton MC pt vs Xi- MC pt", 100, 0., 10., 100, 0., 10.); \r
+ fListHistCascade->Add(f2dHistAsMCptProtonMCptXiMinus);\r
+ }\r
+ if (!f2dHistAsMCptAntiprotonMCptXiPlus) {\r
+ f2dHistAsMCptAntiprotonMCptXiPlus = new TH2F("f2dHistAsMCptAntiprotonMCptXiPlus", "Antiproton MC pt vs Xi+ MC pt", 100, 0., 10., 100, 0., 10.);\r
+ fListHistCascade->Add(f2dHistAsMCptAntiprotonMCptXiPlus);\r
+ }\r
+ if (!f2dHistAsMCptProtonMCptOmegaMinus) {\r
+ f2dHistAsMCptProtonMCptOmegaMinus = new TH2F("f2dHistAsMCptProtonMCptOmegaMinus", "Proton MC pt vs Omega- MC pt", 100, 0., 10., 100, 0., 10.);\r
+ fListHistCascade->Add(f2dHistAsMCptProtonMCptOmegaMinus);\r
+ }\r
+ if (!f2dHistAsMCptAntiprotonMCptOmegaPlus) {\r
+ f2dHistAsMCptAntiprotonMCptOmegaPlus = new TH2F("f2dHistAsMCptAntiprotonMCptOmegaPlus", "Antiproton MC pt vs Omega+ MC pt", 100, 0., 10., 100, 0., 10.);\r
+ fListHistCascade->Add(f2dHistAsMCptAntiprotonMCptOmegaPlus);\r
+ }\r
+ // - Cosine of Pointing angle\r
+ if (! fHistV0toXiCosineOfPointingAngle) {\r
+ fHistV0toXiCosineOfPointingAngle = new TH1F("fHistV0toXiCosineOfPointingAngle", "Cos. of V0 Ptng Angl / Xi vtx ; Cos(V0 Point. Angl / Xi vtx); Counts", 200, 0.95, 1.0001);\r
+ fListHistCascade->Add(fHistV0toXiCosineOfPointingAngle);\r
+ }\r
+ if (! fHistV0CosineOfPointingAnglevsPtXi) {\r
+ fHistV0CosineOfPointingAnglevsPtXi = new TH2F("fHistV0CosineOfPointingAnglevsPtXi", "Cos. of V0 Ptng Angl vs cascade Pt; Cos(V0 Point. Angl); Counts", 100, 0., 10., 200, 0.95, 1.0001);\r
+ fListHistCascade->Add(fHistV0CosineOfPointingAnglevsPtXi);\r
+ }\r
+ if (! fHistV0CosineOfPointingAnglevsPtOmega) {\r
+ fHistV0CosineOfPointingAnglevsPtOmega = new TH2F("fHistV0CosineOfPointingAnglevsPtOmega", "Cos. of V0 Ptng Angl vs cascade Pt; Cos(V0 Point. Angl); Counts", 100, 0., 10., 200, 0.95, 1.0001);\r
+ fListHistCascade->Add(fHistV0CosineOfPointingAnglevsPtOmega);\r
+ }\r
+\r
+ //--------------\r
+ // - CFContainer\r
+ // PID container Xi-\r
+ if(! fCFContCascadePIDAsXiMinus) {\r
+ const Int_t lNbSteps = 7;\r
+ const Int_t lNbVariables = 3;\r
+ //Array for the number of bins in each dimension:\r
+ Int_t lNbBinsPerVar[3] = {0};\r
+ lNbBinsPerVar[0] = 100;\r
+ lNbBinsPerVar[1] = 800;\r
+ lNbBinsPerVar[2] = 22;\r
+ fCFContCascadePIDAsXiMinus = new AliCFContainer(Form("fCFContCascadePIDAsXiMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{-} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );\r
+ //Setting the bin limits \r
+ fCFContCascadePIDAsXiMinus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)\r
+ fCFContCascadePIDAsXiMinus->SetBinLimits(1, 1.2 , 2.0 ); // Xi Effective mass\r
+ fCFContCascadePIDAsXiMinus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity\r
+ //Setting the step title : one per PID case\r
+ fCFContCascadePIDAsXiMinus->SetStepTitle(0, "No PID");\r
+ fCFContCascadePIDAsXiMinus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");\r
+ fCFContCascadePIDAsXiMinus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");\r
+ fCFContCascadePIDAsXiMinus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");\r
+ fCFContCascadePIDAsXiMinus->SetStepTitle(4, "Comb. PID / Bachelor");\r
+ fCFContCascadePIDAsXiMinus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");\r
+ fCFContCascadePIDAsXiMinus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");\r
+ //Setting the variable title, per axis\r
+ fCFContCascadePIDAsXiMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");\r
+ fCFContCascadePIDAsXiMinus->SetVarTitle(1, "M( #Lambda , #pi^{-} ) (GeV/c^{2})");\r
+ fCFContCascadePIDAsXiMinus->SetVarTitle(2, "Y_{#Xi}");\r
+ fListHistCascade->Add(fCFContCascadePIDAsXiMinus); \r
+ }\r
+ // PID container Xi+\r
+ if(! fCFContCascadePIDAsXiPlus) {\r
+ const Int_t lNbSteps = 7;\r
+ const Int_t lNbVariables = 3;\r
+ //Array for the number of bins in each dimension :\r
+ Int_t lNbBinsPerVar[3] = {0};\r
+ lNbBinsPerVar[0] = 100;\r
+ lNbBinsPerVar[1] = 800;\r
+ lNbBinsPerVar[2] = 22;\r
+ fCFContCascadePIDAsXiPlus = new AliCFContainer(Form("fCFContCascadePIDAsXiPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Xi^{+} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );\r
+ //Setting the bin limits (valid for v4-18-10-AN)\r
+ fCFContCascadePIDAsXiPlus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)\r
+ fCFContCascadePIDAsXiPlus->SetBinLimits(1, 1.2 , 2.0 ); // Xi Effective mass\r
+ fCFContCascadePIDAsXiPlus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity \r
+ //Setting the step title : one per PID case\r
+ fCFContCascadePIDAsXiPlus->SetStepTitle(0, "No PID");\r
+ fCFContCascadePIDAsXiPlus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");\r
+ fCFContCascadePIDAsXiPlus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");\r
+ fCFContCascadePIDAsXiPlus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");\r
+ fCFContCascadePIDAsXiPlus->SetStepTitle(4, "Comb. PID / Bachelor");\r
+ fCFContCascadePIDAsXiPlus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");\r
+ fCFContCascadePIDAsXiPlus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson"); \r
+ //Setting the variable title, per axis\r
+ fCFContCascadePIDAsXiPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");\r
+ fCFContCascadePIDAsXiPlus->SetVarTitle(1, "M( #Lambda , #pi^{+} ) (GeV/c^{2})");\r
+ fCFContCascadePIDAsXiPlus->SetVarTitle(2, "Y_{#Xi}");\r
+ fListHistCascade->Add(fCFContCascadePIDAsXiPlus);\r
+ }\r
+ // PID container Omega-\r
+ if(! fCFContCascadePIDAsOmegaMinus) {\r
+ const Int_t lNbSteps = 7;\r
+ const Int_t lNbVariables = 3;\r
+ //Array for the number of bins in each dimension :\r
+ Int_t lNbBinsPerVar[3] = {0};\r
+ lNbBinsPerVar[0] = 100;\r
+ lNbBinsPerVar[1] = 1000;\r
+ lNbBinsPerVar[2] = 22;\r
+ fCFContCascadePIDAsOmegaMinus = new AliCFContainer(Form("fCFContCascadePIDAsOmegaMinus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{-} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );\r
+ //Setting the bin limits \r
+ fCFContCascadePIDAsOmegaMinus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)\r
+ fCFContCascadePIDAsOmegaMinus->SetBinLimits(1, 1.5 , 2.5 ); // Omega Effective mass\r
+ fCFContCascadePIDAsOmegaMinus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity\r
+ //Setting the step title : one per PID case\r
+ fCFContCascadePIDAsOmegaMinus->SetStepTitle(0, "No PID");\r
+ fCFContCascadePIDAsOmegaMinus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");\r
+ fCFContCascadePIDAsOmegaMinus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");\r
+ fCFContCascadePIDAsOmegaMinus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");\r
+ fCFContCascadePIDAsOmegaMinus->SetStepTitle(4, "Comb. PID / Bachelor");\r
+ fCFContCascadePIDAsOmegaMinus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");\r
+ fCFContCascadePIDAsOmegaMinus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");\r
+ //Setting the variable title, per axis\r
+ fCFContCascadePIDAsOmegaMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");\r
+ fCFContCascadePIDAsOmegaMinus->SetVarTitle(1, "M( #Lambda , K^{-} ) (GeV/c^{2})");\r
+ fCFContCascadePIDAsOmegaMinus->SetVarTitle(2, "Y_{#Omega}");\r
+ fListHistCascade->Add(fCFContCascadePIDAsOmegaMinus);\r
+ }\r
+ // PID container Omega+\r
+ if(! fCFContCascadePIDAsOmegaPlus) {\r
+ const Int_t lNbSteps = 7;\r
+ const Int_t lNbVariables = 3;\r
+ //Array for the number of bins in each dimension :\r
+ Int_t lNbBinsPerVar[3]= {0};\r
+ lNbBinsPerVar[0] = 100;\r
+ lNbBinsPerVar[1] = 1000;\r
+ lNbBinsPerVar[2] = 22; \r
+ fCFContCascadePIDAsOmegaPlus = new AliCFContainer(Form("fCFContCascadePIDAsOmegaPlus_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Pt_{cascade} Vs M_{#Omega^{+} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );\r
+ //Setting the bin limits \r
+ fCFContCascadePIDAsOmegaPlus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)\r
+ fCFContCascadePIDAsOmegaPlus->SetBinLimits(1, 1.5 , 2.5 ); // Omega Effective mass\r
+ fCFContCascadePIDAsOmegaPlus->SetBinLimits(2, -1.1 , 1.1 ); // Rapidity\r
+ //Setting the step title : one per PID case\r
+ fCFContCascadePIDAsOmegaPlus->SetStepTitle(0, "No PID");\r
+ fCFContCascadePIDAsOmegaPlus->SetStepTitle(1, "TPC PID / 4-#sigma cut on Bachelor track");\r
+ fCFContCascadePIDAsOmegaPlus->SetStepTitle(2, "TPC PID / 4-#sigma cut on Bachelor+Baryon tracks");\r
+ fCFContCascadePIDAsOmegaPlus->SetStepTitle(3, "TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks");\r
+ fCFContCascadePIDAsOmegaPlus->SetStepTitle(4, "Comb. PID / Bachelor");\r
+ fCFContCascadePIDAsOmegaPlus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");\r
+ fCFContCascadePIDAsOmegaPlus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");\r
+ //Setting the variable title, per axis\r
+ fCFContCascadePIDAsOmegaPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");\r
+ fCFContCascadePIDAsOmegaPlus->SetVarTitle(1, "M( #Lambda , K^{+} ) (GeV/c^{2})");\r
+ fCFContCascadePIDAsOmegaPlus->SetVarTitle(2, "Y_{#Omega}");\r
+ fListHistCascade->Add(fCFContCascadePIDAsOmegaPlus);\r
+ }\r
+ // Container for optimisation of topological selections \r
+ if(! fCFContAsCascadeCuts){\r
+ // Container meant to store all the relevant distributions corresponding to the cut variables.\r
+ // - NB overflow/underflow of variables on which we want to cut later should be 0!!!\r
+ const Int_t lNbSteps = 4;\r
+ const Int_t lNbVariables = 19;\r
+ //Array for the number of bins in each dimension :\r
+ Int_t lNbBinsPerVar[lNbVariables] = {0};\r
+ lNbBinsPerVar[0] = 25; //DcaCascDaughters : [0.0,2.,3.0] -> Rec.Cut = 2.0; \r
+ lNbBinsPerVar[1] = 25; //DcaBachToPrimVertex : [0.0,0.24,100.0] -> Rec.Cur = 0.01;\r
+ lNbBinsPerVar[2] = 60; //CascCosineOfPointingAngle : [0.94,1.0] -> Rec.Cut = 0.95;\r
+ //lNbBinsPerVar[2] = 30; //CascCosineOfPointingAngle : [0.97,1.] -> Rec.Cut = 0.98;\r
+ lNbBinsPerVar[3] = 40; //CascRadius : [0.0,3.9,1000.0] -> Rec.Cut = 0.2;\r
+ lNbBinsPerVar[4] = 30; //InvMassLambdaAsCascDghter : [1.1,1.3] -> Rec.Cut = 0.008;\r
+ lNbBinsPerVar[5] = 20; //DcaV0Daughters : [0.0,2.0] -> Rec.Cut = 1.5;\r
+ lNbBinsPerVar[6] = 201; //V0CosineOfPointingAngle : [0.89,1.0] -> Rec.Cut = 0.9;\r
+ lNbBinsPerVar[7] = 40; //V0Radius : [0.0,3.9,1000.0] -> Rec.Cut = 0.2;\r
+ lNbBinsPerVar[8] = 40; //DcaV0ToPrimVertex : [0.0,0.39,110.0] -> Rec.Cut = 0.01;\r
+ lNbBinsPerVar[9] = 25; //DcaPosToPrimVertex : [0.0,0.24,100.0] -> Rec.Cut = 0.05;\r
+ lNbBinsPerVar[10] = 25; //DcaNegToPrimVertex : [0.0,0.24,100.0] -> Rec.Cut = 0.05;\r
+ lNbBinsPerVar[11] = 150; //InvMassXi : 2-MeV/c2 bins\r
+ lNbBinsPerVar[12] = 120; //InvMassOmega : 2-MeV/c2 bins\r
+ lNbBinsPerVar[13] = 100; //CascTransvMom : [0.0,10.0]\r
+ lNbBinsPerVar[14] = 110; //Y(Xi) : 0.02 unit of y per bin \r
+ lNbBinsPerVar[15] = 110; //Y(Omega) : 0.02 unit of y per bin\r
+ lNbBinsPerVar[16] = 112; //Proper lenght of cascade\r
+ lNbBinsPerVar[17] = 112; //Proper lenght of V0 \r
+ lNbBinsPerVar[18] = 112; //Distance V0-Xi in the transverse plane \r
+ fCFContAsCascadeCuts = new AliCFContainer(Form("fCFContAsCascadeCuts_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",fMinnTPCcls,fVtxRange,fVtxRangeMin,fMinPtCutOnDaughterTracks,fEtaCutOnDaughterTracks),"Cut Container for Asso. Cascades", lNbSteps, lNbVariables, lNbBinsPerVar );\r
+ //Setting the bin limits \r
+ //0 - DcaCascDaughters\r
+ Double_t *lBinLim0 = new Double_t[ lNbBinsPerVar[0]+1 ];\r
+ 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;\r
+ lBinLim0[ lNbBinsPerVar[0] ] = 3.0;\r
+ fCFContAsCascadeCuts -> SetBinLimits(0, lBinLim0);\r
+ delete[] lBinLim0;\r
+ //1 - DcaBachToPrimVertex\r
+ Double_t *lBinLim1 = new Double_t[ lNbBinsPerVar[1]+1 ];\r
+ 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;\r
+ lBinLim1[ lNbBinsPerVar[1] ] = 100.0;\r
+ fCFContAsCascadeCuts -> SetBinLimits(1, lBinLim1);\r
+ delete [] lBinLim1;\r
+ //2 - CascCosineOfPointingAngle\r
+ fCFContAsCascadeCuts -> SetBinLimits(2, .94, 1.); \r
+ //3 - CascRadius\r
+ Double_t *lBinLim3 = new Double_t[ lNbBinsPerVar[3]+1 ];\r
+ 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;\r
+ lBinLim3[ lNbBinsPerVar[3] ] = 1000.0;\r
+ fCFContAsCascadeCuts -> SetBinLimits(3, lBinLim3);\r
+ delete[] lBinLim3;\r
+ //4 - InvMassLambdaAsCascDghter\r
+ fCFContAsCascadeCuts->SetBinLimits(4, 1.1, 1.13); \r
+ //5 - DcaV0Daughters\r
+ fCFContAsCascadeCuts->SetBinLimits(5, 0., 2.); \r
+ //6 - V0CosineOfPointingAngle\r
+ fCFContAsCascadeCuts->SetBinLimits(6, 0.8, 1.001);\r
+ //7 - V0Radius\r
+ Double_t *lBinLim7 = new Double_t[ lNbBinsPerVar[7]+1 ];\r
+ 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 ;\r
+ lBinLim7[ lNbBinsPerVar[7] ] = 1000.0;\r
+ fCFContAsCascadeCuts -> SetBinLimits(7, lBinLim7);\r
+ delete [] lBinLim7; \r
+ //8 - DcaV0ToPrimVertexXi : 0. to 0.4 \r
+ Double_t *lBinLim8 = new Double_t[ lNbBinsPerVar[8]+1 ];\r
+ 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 ;\r
+ lBinLim8[ lNbBinsPerVar[8] ] = 100.0;\r
+ fCFContAsCascadeCuts -> SetBinLimits(8, lBinLim8);\r
+ delete [] lBinLim8; \r
+ //9 - DcaPosToPrimVertexXi\r
+ Double_t *lBinLim9 = new Double_t[ lNbBinsPerVar[9]+1 ];\r
+ 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;\r
+ lBinLim9[ lNbBinsPerVar[9] ] = 100.0;\r
+ fCFContAsCascadeCuts -> SetBinLimits(9, lBinLim9);\r
+ delete [] lBinLim9; \r
+ //10 - DcaNegToPrimVertexXi\r
+ Double_t *lBinLim10 = new Double_t[ lNbBinsPerVar[10]+1 ];\r
+ 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;\r
+ lBinLim10[ lNbBinsPerVar[10] ] = 100.0;\r
+ fCFContAsCascadeCuts -> SetBinLimits(10, lBinLim10);\r
+ delete [] lBinLim10; \r
+ //11 - InvMassXi\r
+ fCFContAsCascadeCuts -> SetBinLimits(11, 1.25, 1.40);\r
+ //12 - InvMassOmega\r
+ fCFContAsCascadeCuts -> SetBinLimits(12, 1.62, 1.74);\r
+ //13 - XiTransvMom \r
+ fCFContAsCascadeCuts -> SetBinLimits(13, 0.0, 10.0);\r
+ //14 - Y(Xi) \r
+ fCFContAsCascadeCuts -> SetBinLimits(14, -1.1, 1.1);\r
+ //15 - Y(Omega)\r
+ fCFContAsCascadeCuts -> SetBinLimits(15, -1.1, 1.1); \r
+ //16 - Proper time cascade \r
+ Double_t *lBinLim16 = new Double_t[ lNbBinsPerVar[16]+1 ];\r
+ for(Int_t i=0; i<lNbBinsPerVar[16]; i++) lBinLim16[i] = (Double_t)-1. + (110. + 1.0 )/(lNbBinsPerVar[16] - 1) * (Double_t)i;\r
+ lBinLim16[ lNbBinsPerVar[16] ] = 2000.0;\r
+ fCFContAsCascadeCuts -> SetBinLimits(16, lBinLim16);\r
+ //17 - Proper time V0 \r
+ fCFContAsCascadeCuts -> SetBinLimits(17, lBinLim16);\r
+ //18 - Distance V0-Xi in the transverse plane\r
+ fCFContAsCascadeCuts -> SetBinLimits(18, lBinLim16);\r
+ delete [] lBinLim16;\r
+ // Setting the number of steps : one for each cascade species (Xi-, Xi+ and Omega-, Omega+)\r
+ fCFContAsCascadeCuts->SetStepTitle(0, "#Xi^{-} candidates associated to MC");\r
+ fCFContAsCascadeCuts->SetStepTitle(1, "#bar{#Xi}^{+} candidates associated to MC");\r
+ fCFContAsCascadeCuts->SetStepTitle(2, "#Omega^{-} candidates associated to MC");\r
+ fCFContAsCascadeCuts->SetStepTitle(3, "#bar{#Omega}^{+} candidates associated to MC");\r
+ // Setting the variable title, per axis\r
+ fCFContAsCascadeCuts->SetVarTitle(0, "DCA(cascade daughters) (cm)");\r
+ fCFContAsCascadeCuts->SetVarTitle(1, "ImpactParamToPV(bachelor) (cm)");\r
+ fCFContAsCascadeCuts->SetVarTitle(2, "cos(cascade PA)");\r
+ fCFContAsCascadeCuts->SetVarTitle(3, "R_{2d}(cascade decay) (cm)");\r
+ fCFContAsCascadeCuts->SetVarTitle(4, "M_{#Lambda}(as casc dghter) (GeV/c^{2})");\r
+ fCFContAsCascadeCuts->SetVarTitle(5, "DCA(V0 daughters) (cm)");\r
+ fCFContAsCascadeCuts->SetVarTitle(6, "cos(V0 PA) in cascade");\r
+ fCFContAsCascadeCuts->SetVarTitle(7, "R_{2d}(V0 decay) (cm)");\r
+ fCFContAsCascadeCuts->SetVarTitle(8, "ImpactParamToPV(V0) (cm)");\r
+ fCFContAsCascadeCuts->SetVarTitle(9, "ImpactParamToPV(Pos) (cm)");\r
+ fCFContAsCascadeCuts->SetVarTitle(10, "ImpactParamToPV(Neg) (cm)");\r
+ fCFContAsCascadeCuts->SetVarTitle(11, "Inv. Mass(Xi) (GeV/c^{2})");\r
+ fCFContAsCascadeCuts->SetVarTitle(12, "Inv. Mass(Omega) (GeV/c^{2})");\r
+ fCFContAsCascadeCuts->SetVarTitle(13, "Pt_{MC}(cascade) (GeV/c)");\r
+ fCFContAsCascadeCuts->SetVarTitle(14, "Y_{MC}(Xi)");\r
+ fCFContAsCascadeCuts->SetVarTitle(15, "Y_{MC}(Omega)");\r
+ fCFContAsCascadeCuts->SetVarTitle(16, "mL/p cascade (cm)");\r
+ fCFContAsCascadeCuts->SetVarTitle(17, "mL/p V0 (cm)"); \r
+ fCFContAsCascadeCuts->SetVarTitle(18, "Distance V0-Cascade in the transverse plane (cm)");\r
+ fListHistCascade->Add(fCFContAsCascadeCuts);\r
+ }\r
+\r
+ PostData(1, fListHistCascade); \r
+ PostData(2, fCFContCascadePIDAsXiMinus);\r
+ PostData(3, fCFContCascadePIDAsXiPlus);\r
+ PostData(4, fCFContCascadePIDAsOmegaMinus);\r
+ PostData(5, fCFContCascadePIDAsOmegaPlus);\r
+ PostData(6, fCFContAsCascadeCuts);\r
+\r
+}// end CreateOutputObjects\r
+\r
+\r
+//________________________________________________________________________\r
+void AliAnalysisTaskCheckPerformanceCascadepp276::UserExec(Option_t *) {\r
+ \r
+ //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r
+ // Main loop (called for each event)\r
+ //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r
+ \r
+ //------------------\r
+ // - Define variables\r
+ AliESDEvent *lESDevent = 0x0;\r
+ AliAODEvent *lAODevent = 0x0;\r
+ AliMCEvent *lMCevent = 0x0; \r
+ AliStack *lMCstack = 0x0; \r
+ TClonesArray *arrayMC = 0;\r
+\r
+ //-------------------------\r
+ // - Check the PID response\r
+ if (!fPIDResponse) {\r
+ AliError("Cannot get pid response");\r
+ return;\r
+ }\r
+\r
+\r
+ ////////////////// \r
+ // Event selection \r
+ //////////////////\r
+ // In order:\r
+ // 1) SDD selection\r
+ // 2) Physics selection\r
+ // 3) Select only looking at events with well-established PV\r
+ // 4) Pileup selection\r
+ // 5) |Z| < 10 cm\r
+ \r
+ //---------------------------------------------------------\r
+ // Load the InputEvent and check it (for the ESD and AOD)\r
+ if (fAnalysisType == "ESD") {\r
+ lESDevent = dynamic_cast<AliESDEvent*>( InputEvent() );\r
+ if (!lESDevent) {\r
+ Printf("ERROR: lESDevent not available \n");\r
+ cout << "Name of the file with pb :" << CurrentFileName() << endl; \r
+ return;\r
+ }\r
+ lMCevent = MCEvent();\r
+ if (!lMCevent) {\r
+ Printf("ERROR: Could not retrieve MC event \n");\r
+ cout << "Name of the file with pb :" << CurrentFileName() << endl;\r
+ return;\r
+ }\r
+ lMCstack = lMCevent->Stack();\r
+ if (!lMCstack) {\r
+ Printf("ERROR: Could not retrieve MC stack \n");\r
+ cout << "Name of the file with pb :" << CurrentFileName() << endl;\r
+ return;\r
+ }\r
+ // - Cascade vertexer (ESD)\r
+ // Relaunch V0 and Cascade vertexer\r
+ if (fkRerunV0CascVertexers) { \r
+ lESDevent->ResetCascades();\r
+ lESDevent->ResetV0s();\r
+ AliV0vertexer *lV0vtxer = new AliV0vertexer();\r
+ AliCascadeVertexer *lCascVtxer = new AliCascadeVertexer();\r
+ //lV0vtxer->GetCuts(fV0Sels);\r
+ //lCascVtxer->GetCuts(fCascSels);\r
+ lV0vtxer->SetCuts(fV0Sels); // NB don't use SetDefaultCuts!! because it acts on static variables \r
+ lCascVtxer->SetCuts(fCascSels);\r
+ lV0vtxer->Tracks2V0vertices(lESDevent);\r
+ lCascVtxer->V0sTracks2CascadeVertices(lESDevent);\r
+ //delete lV0vtxer;\r
+ //delete lCascVtxer; \r
+ //---\r
+ //lESDevent->ResetCascades();\r
+ //lESDevent->ResetV0s();\r
+ //AliV0vertexer lV0vtxer;\r
+ //AliCascadeVertexer lCascVtxer;\r
+ //lV0vtxer.SetCuts(fV0Sels);\r
+ //lCascVtxer.SetCuts(fCascSels);\r
+ //lV0vtxer.Tracks2V0vertices(lESDevent);\r
+ //lCascVtxer.V0sTracks2CascadeVertices(lESDevent);\r
+ }\r
+ } else if (fAnalysisType == "AOD") { \r
+ lAODevent = dynamic_cast<AliAODEvent*>( InputEvent() ); \r
+ if (!lAODevent) {\r
+ Printf("ERROR: lAODevent not available \n");\r
+ cout << "Name of the file with pb :" << CurrentFileName() << endl;\r
+ return;\r
+ }\r
+ arrayMC = (TClonesArray*) lAODevent->GetList()->FindObject(AliAODMCParticle::StdBranchName());\r
+ if (!arrayMC) AliFatal("Error: MC particles branch not found!\n");\r
+ } else {\r
+ Printf("Analysis type (ESD or AOD) not specified \n");\r
+ return;\r
+ }\r
+\r
+ //------------------------------\r
+ // - Plots Before any selections\r
+ //------------------------------\r
+ // - Define variables\r
+ Int_t ncascadesBeforeAnySel = -1; //number of cascades before any selections\r
+ Int_t nTrackMultiplicityBeforeAnySel = -1; //number of tracks before any selections\r
+ if (fAnalysisType == "ESD") {\r
+ //Multiplicity\r
+ Int_t lMultiplicity = -100;\r
+ lMultiplicity = fESDtrackCuts->GetReferenceMultiplicity(lESDevent, AliESDtrackCuts::kTrackletsITSTPC, 0.5);\r
+ nTrackMultiplicityBeforeAnySel = lMultiplicity;\r
+ ncascadesBeforeAnySel = lESDevent->GetNumberOfCascades();\r
+ } else if (fAnalysisType == "AOD") {\r
+ //Multiplicity\r
+ Int_t lMultiplicity = -100;\r
+ nTrackMultiplicityBeforeAnySel = lMultiplicity;\r
+ ncascadesBeforeAnySel = lAODevent->GetNumberOfCascades();\r
+ }\r
+ fHistTrackMultiplicityBeforeAnySel->Fill(nTrackMultiplicityBeforeAnySel);\r
+ fHistCascadeMultiplicityBeforeAnySel->Fill(ncascadesBeforeAnySel);\r
+\r
+ //----------------\r
+ // - SDD selection\r
+ //----------------\r
+ // - Define variables\r
+ Int_t ncascadesAfterSDDSel = -1; //number of cascades after SDD selection\r
+ Int_t nTrackMultiplicityAfterSDDSel = -1; //number of tracks after SDD selection\r
+ if (fkSDDselectionOn) {\r
+ TString trcl = " ";\r
+ trcl = lESDevent->GetFiredTriggerClasses();\r
+ if (fAnalysisType == "ESD") trcl = lESDevent->GetFiredTriggerClasses();\r
+ else if (fAnalysisType == "AOD") trcl = lAODevent->GetFiredTriggerClasses();\r
+ if (fwithSDD){ // ---> Select event with SDD ON\r
+ if(!(trcl.Contains("ALLNOTRD"))) {\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDAsXiMinus);\r
+ PostData(3, fCFContCascadePIDAsXiPlus);\r
+ PostData(4, fCFContCascadePIDAsOmegaMinus);\r
+ PostData(5, fCFContCascadePIDAsOmegaPlus);\r
+ PostData(6, fCFContAsCascadeCuts);\r
+ cout<<"Bad event: SDD turn OFF => RETURN!! (Exclude it)..."<<endl;\r
+ return;\r
+ } else {\r
+ cout<<"Good event: SDD turn ON."<<endl;\r
+ }\r
+ } else if (!fwithSDD){ // ---> Select event with SDD OFF\r
+ if((trcl.Contains("ALLNOTRD"))) {\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDAsXiMinus);\r
+ PostData(3, fCFContCascadePIDAsXiPlus);\r
+ PostData(4, fCFContCascadePIDAsOmegaMinus);\r
+ PostData(5, fCFContCascadePIDAsOmegaPlus);\r
+ PostData(6, fCFContAsCascadeCuts);\r
+ cout<<"Bad event: SDD turn ON => RETURN!! (Exclude it)..."<<endl;\r
+ return;\r
+ } else {\r
+ cout<<"Good event: SDD turn OFF."<<endl;\r
+ }\r
+ }\r
+ }\r
+ // - Take the number of cascades and tracks after the SDD selection\r
+ if (fAnalysisType == "ESD") {\r
+ Int_t lMultiplicity = -100;\r
+ lMultiplicity = fESDtrackCuts->GetReferenceMultiplicity(lESDevent, AliESDtrackCuts::kTrackletsITSTPC, 0.5);\r
+ ncascadesAfterSDDSel = lESDevent->GetNumberOfCascades();\r
+ nTrackMultiplicityAfterSDDSel = lMultiplicity;\r
+ } else if (fAnalysisType == "AOD") {\r
+ Int_t lMultiplicity = -100;\r
+ ncascadesAfterSDDSel = lAODevent->GetNumberOfCascades();\r
+ nTrackMultiplicityAfterSDDSel = lMultiplicity;\r
+ }\r
+ // - Fill the plots\r
+ fHistTrackMultiplicityAfterSDDSel->Fill(nTrackMultiplicityAfterSDDSel);\r
+ fHistCascadeMultiplicityAfterSDDSel->Fill(ncascadesAfterSDDSel);\r
+\r
+ //------------------------------\r
+ // - Plots pre-physics selection\r
+ //------------------------------\r
+ // - Produce the 3Dhisto for the efficiency denominator\r
+ Int_t lNbMCPrimary = 0;\r
+ lNbMCPrimary = lMCstack->GetNprimary();\r
+\r
+ for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < lNbMCPrimary; iCurrentLabelStack++) {\r
+\r
+ Double_t partEnergy = 0.;\r
+ Double_t partPz = 0.;\r
+ Double_t partP = 0.;\r
+ Double_t partPt = 0.;\r
+ Double_t partVx = 0.;\r
+ Double_t partVy = 0.;\r
+ Double_t partVz = 0.;\r
+ Double_t bacVx = 0.;\r
+ Double_t bacVy = 0.;\r
+ Double_t bacVz = 0.;\r
+ Double_t partMass = 0.;\r
+ Int_t PDGcode = 0;\r
+ Int_t lPrimaryTrackMultiplicity = nTrackMultiplicityAfterSDDSel;\r
+\r
+ if ( fAnalysisType == "ESD" ) {\r
+ TParticle* lCurrentParticlePrimary = 0x0;\r
+ lCurrentParticlePrimary = lMCstack->Particle( iCurrentLabelStack ); \r
+ if (!lCurrentParticlePrimary) {\r
+ Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack );\r
+ continue;\r
+ }\r
+ if (!lMCstack->IsPhysicalPrimary(iCurrentLabelStack)) continue;\r
+ TParticle* xiMC = 0x0;\r
+ xiMC = lCurrentParticlePrimary;\r
+ if (!xiMC) {\r
+ Printf("MC TParticle pointer to Cascade = 0x0 ! Skip ...");\r
+ continue;\r
+ }\r
+ partEnergy = xiMC->Energy();\r
+ partPz = xiMC->Pz();\r
+ partPt = xiMC->Pt();\r
+ partP = xiMC->P();\r
+ partMass = xiMC->GetMass();\r
+ partVx = xiMC->Vx();\r
+ partVy = xiMC->Vy();\r
+ partVz = xiMC->Vz();\r
+ if (xiMC->GetDaughter(0)>=0) { \r
+ TParticle *mcBach = lMCstack->Particle(xiMC->GetDaughter(0));\r
+ if (mcBach) {\r
+ bacVx = mcBach->Vx();\r
+ bacVy = mcBach->Vy();\r
+ bacVz = mcBach->Vz();\r
+ }\r
+ }\r
+ PDGcode = lCurrentParticlePrimary->GetPdgCode();\r
+ } else if ( fAnalysisType == "AOD" ) {\r
+ AliAODMCParticle *lCurrentParticleaod = (AliAODMCParticle*) arrayMC->At(iCurrentLabelStack);\r
+ if (!lCurrentParticleaod) {\r
+ Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack );\r
+ continue;\r
+ }\r
+ if (!lCurrentParticleaod->IsPhysicalPrimary()) continue;\r
+ partEnergy = lCurrentParticleaod->E();\r
+ partPz = lCurrentParticleaod->Pz();\r
+ partP = lCurrentParticleaod->P();\r
+ partPt = lCurrentParticleaod->Pt();\r
+ partMass = lCurrentParticleaod->M(); \r
+ partVx = lCurrentParticleaod->Xv();\r
+ partVy = lCurrentParticleaod->Yv();\r
+ partVz = lCurrentParticleaod->Zv();\r
+ if (lCurrentParticleaod->GetDaughter(0)>=0) {\r
+ AliAODMCParticle *mcBach = (AliAODMCParticle*) arrayMC->At(lCurrentParticleaod->GetDaughter(0));\r
+ if (mcBach) {\r
+ bacVx = mcBach->Xv();\r
+ bacVy = mcBach->Yv();\r
+ bacVz = mcBach->Zv();\r
+ }\r
+ } \r
+ PDGcode = lCurrentParticleaod->GetPdgCode();\r
+ }\r
+\r
+ // - Calculate rapidity\r
+ Double_t lRapXiMC = 0.5*TMath::Log((partEnergy + partPz) / (partEnergy - partPz + 1.e-13));\r
+ // - Calculate proper lenght\r
+ Double_t lctau = TMath::Sqrt((partVx-bacVx)*(partVx-bacVx)+(partVy-bacVy)*(partVy-bacVy)+(partVz-bacVz)*(partVz-bacVz));\r
+ if (partP != 0.) lctau = lctau*partMass/partP;\r
+ else lctau = -1.;\r
+ // - Fill Histograms\r
+ if (PDGcode == 3312) {\r
+ f3dHistGenPtVsGenYvsNtracksXiMinus->Fill(partPt, lRapXiMC, lPrimaryTrackMultiplicity);\r
+ f3dHistGenPtVsGenctauvsYXiMinus->Fill(partPt, lctau, lRapXiMC);\r
+ }\r
+ if (PDGcode == -3312) {\r
+ f3dHistGenPtVsGenYvsNtracksXiPlus->Fill(partPt, lRapXiMC, lPrimaryTrackMultiplicity);\r
+ f3dHistGenPtVsGenctauvsYXiPlus->Fill(partPt, lctau, lRapXiMC);\r
+ }\r
+ if (PDGcode == 3334) {\r
+ f3dHistGenPtVsGenYvsNtracksOmegaMinus->Fill(partPt, lRapXiMC, lPrimaryTrackMultiplicity);\r
+ f3dHistGenPtVsGenctauvsYOmegaMinus->Fill(partPt, lctau, lRapXiMC);\r
+ }\r
+ if (PDGcode == -3334) {\r
+ f3dHistGenPtVsGenYvsNtracksOmegaPlus->Fill(partPt, lRapXiMC, lPrimaryTrackMultiplicity);\r
+ f3dHistGenPtVsGenctauvsYOmegaPlus->Fill(partPt, lctau, lRapXiMC);\r
+ }\r
+ }\r
+\r
+ \r
+ //--------------------\r
+ // - Physics selection\r
+ //--------------------\r
+ // - Define new variables\r
+ Int_t ncascadesAfterPhysicsSel = -1; //number of cascades after physics selection\r
+ Int_t nTrackMultiplicityAfterPhysicsSel = -1; //number of tracks after physics selection\r
+ // - Selection for ESD and AOD\r
+ if (fAnalysisType == "ESD") {\r
+ UInt_t maskIsSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();\r
+ Bool_t isSelected = 0;\r
+ isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB;\r
+ if(!isSelected){\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDAsXiMinus);\r
+ PostData(3, fCFContCascadePIDAsXiPlus);\r
+ PostData(4, fCFContCascadePIDAsOmegaMinus);\r
+ PostData(5, fCFContCascadePIDAsOmegaPlus);\r
+ PostData(6, fCFContAsCascadeCuts);\r
+ return;\r
+ }\r
+ // - Take the number of cascades and tracks after physics selection\r
+ ncascadesAfterPhysicsSel = lESDevent->GetNumberOfCascades();\r
+ nTrackMultiplicityAfterPhysicsSel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent, AliESDtrackCuts::kTrackletsITSTPC, 0.5);\r
+ } else if (fAnalysisType == "AOD") {\r
+ UInt_t maskIsSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();\r
+ Bool_t isSelected = 0;\r
+ isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB;\r
+ if(!isSelected){\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDAsXiMinus);\r
+ PostData(3, fCFContCascadePIDAsXiPlus);\r
+ PostData(4, fCFContCascadePIDAsOmegaMinus);\r
+ PostData(5, fCFContCascadePIDAsOmegaPlus);\r
+ PostData(6, fCFContAsCascadeCuts);\r
+ return;\r
+ }\r
+ // - Take the number of cascades and tracks after physics selection\r
+ ncascadesAfterPhysicsSel = lAODevent->GetNumberOfCascades();\r
+ nTrackMultiplicityAfterPhysicsSel = -100;\r
+ }\r
+ fHistCascadeMultiplicityAfterPhysicsSel->Fill(ncascadesAfterPhysicsSel);\r
+ fHistTrackMultiplicityAfterPhysicsSel->Fill(nTrackMultiplicityAfterPhysicsSel);\r
+\r
+ //-------------------------------------------------------\r
+ // Select only looking at events with well-established PV\r
+ //-------------------------------------------------------\r
+ Int_t ncascadesForSelEvtNoTPCOnly = -1; //number of cascades after the TPConly selection\r
+ Int_t nTrackMultiplicityForSelEvtNoTPCOnly = -1; //number of tracks after the TPConly selection\r
+ if (fAnalysisType == "ESD" ) {\r
+ // - Select only looking at events with well-established PV\r
+ if (fkQualityCutNoTPConlyPrimVtx) {\r
+ const AliESDVertex *lPrimarySPDVtx = lESDevent->GetPrimaryVertexSPD();\r
+ const AliESDVertex *lPrimaryTrackingVtx = lESDevent->GetPrimaryVertexTracks();\r
+ if (!lPrimarySPDVtx->GetStatus() && !lPrimaryTrackingVtx->GetStatus() ){\r
+ AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !");\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDAsXiMinus);\r
+ PostData(3, fCFContCascadePIDAsXiPlus);\r
+ PostData(4, fCFContCascadePIDAsOmegaMinus);\r
+ PostData(5, fCFContCascadePIDAsOmegaPlus);\r
+ PostData(6, fCFContAsCascadeCuts);\r
+ return;\r
+ }\r
+ }\r
+ // - Take the number of cascades and tracks after TPConly selection\r
+ ncascadesForSelEvtNoTPCOnly = lESDevent->GetNumberOfCascades();\r
+ nTrackMultiplicityForSelEvtNoTPCOnly = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);\r
+ } else if (fAnalysisType == "AOD") {\r
+ // - Select only looking at events with well-established PV\r
+ if (fkQualityCutNoTPConlyPrimVtx) {\r
+ const AliAODVertex *lPrimarySPDVtx = lAODevent->GetPrimaryVertexSPD();\r
+ const AliAODVertex *lPrimaryTrackingAODVtx = lAODevent->GetPrimaryVertex();\r
+ if (!lPrimarySPDVtx && !lPrimaryTrackingAODVtx) {\r
+ AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !");\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDAsXiMinus);\r
+ PostData(3, fCFContCascadePIDAsXiPlus);\r
+ PostData(4, fCFContCascadePIDAsOmegaMinus);\r
+ PostData(5, fCFContCascadePIDAsOmegaPlus);\r
+ PostData(6, fCFContAsCascadeCuts);\r
+ return;\r
+ }\r
+ }\r
+ // - Take the number of cascades and tracks after TPConly selection\r
+ ncascadesForSelEvtNoTPCOnly = lAODevent->GetNumberOfCascades();\r
+ nTrackMultiplicityForSelEvtNoTPCOnly = -100; //FIXME\r
+ }\r
+ fHistCascadeMultiplicityForSelEvtNoTPCOnly->Fill(ncascadesForSelEvtNoTPCOnly);\r
+ fHistTrackMultiplicityForSelEvtNoTPCOnly->Fill(nTrackMultiplicityForSelEvtNoTPCOnly);\r
+ \r
+ //-----------------\r
+ // Pileup selection\r
+ //-----------------\r
+ Int_t ncascadesForSelEvtNoTPCOnlyNoPileup = -1; //number of cascades after the NoPileup selection\r
+ Int_t nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = -1; //number of tracks after the Pileup selection\r
+ if (fAnalysisType == "ESD" ) {\r
+ // - Selection for pile up\r
+ if (fkRejectEventPileUp) {\r
+ if(lESDevent->IsPileupFromSPD()){\r
+ AliWarning("Pb / Pile-up event ... return!");\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDAsXiMinus);\r
+ PostData(3, fCFContCascadePIDAsXiPlus);\r
+ PostData(4, fCFContCascadePIDAsOmegaMinus);\r
+ PostData(5, fCFContCascadePIDAsOmegaPlus);\r
+ PostData(6, fCFContAsCascadeCuts);\r
+ return;\r
+ }\r
+ }\r
+ // - Take the number of cascades and tracks after Pileup selection\r
+ ncascadesForSelEvtNoTPCOnlyNoPileup = lESDevent->GetNumberOfCascades();\r
+ nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);\r
+ } else if (fAnalysisType == "AOD") {\r
+ // - Selection for pile up\r
+ if (fkRejectEventPileUp) {\r
+ if(lAODevent->IsPileupFromSPD()){\r
+ AliWarning("Pb / Pile-up event ... return!");\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDAsXiMinus);\r
+ PostData(3, fCFContCascadePIDAsXiPlus);\r
+ PostData(4, fCFContCascadePIDAsOmegaMinus);\r
+ PostData(5, fCFContCascadePIDAsOmegaPlus);\r
+ PostData(6, fCFContAsCascadeCuts);\r
+ return;\r
+ }\r
+ }\r
+ // - Take the number of cascades and tracks after Pileup selection\r
+ ncascadesForSelEvtNoTPCOnlyNoPileup = lAODevent->GetNumberOfCascades();\r
+ nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup = -100;\r
+ }\r
+ fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup->Fill(ncascadesForSelEvtNoTPCOnlyNoPileup);\r
+ fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup->Fill(nTrackMultiplicityForSelEvtNoTPCOnlyNoPileup);\r
+ \r
+ //-------------------\r
+ // - Vertex selection \r
+ //-------------------\r
+ Int_t ncascadesAfterVertexSel = -1; //number of cascades after vertex selection\r
+ Int_t nTrackMultiplicityAfterVertexSel = -1; //number of tracks after vertex selection\r
+ Double_t lBestPrimaryVtxPos[3] = {-100.0, -100.0, -100.0};\r
+ Double_t tPrimaryVtxPosition[3] = {-100.0, -100.0, -100.0}; \r
+ Double_t lMagneticField = -10.;\r
+ if (fAnalysisType == "ESD" ) {\r
+ // - Primary vertex definition\r
+ const AliESDVertex *lPrimaryBestVtx = lESDevent->GetPrimaryVertex();\r
+ if (!lPrimaryBestVtx) {\r
+ AliWarning("No prim. vertex in AOD... return!");\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDAsXiMinus);\r
+ PostData(3, fCFContCascadePIDAsXiPlus);\r
+ PostData(4, fCFContCascadePIDAsOmegaMinus);\r
+ PostData(5, fCFContCascadePIDAsOmegaPlus);\r
+ PostData(6, fCFContAsCascadeCuts);\r
+ return;\r
+ }\r
+ lPrimaryBestVtx->GetXYZ( lBestPrimaryVtxPos );\r
+ // - Vertex position before any event selection on vertex position\r
+ const AliVVertex *primaryVtx = lESDevent->GetPrimaryVertex();\r
+ tPrimaryVtxPosition[0] = primaryVtx->GetX();\r
+ tPrimaryVtxPosition[1] = primaryVtx->GetY();\r
+ tPrimaryVtxPosition[2] = primaryVtx->GetZ();\r
+ fHistPVx->Fill( tPrimaryVtxPosition[0] );\r
+ fHistPVy->Fill( tPrimaryVtxPosition[1] );\r
+ fHistPVz->Fill( tPrimaryVtxPosition[2] );\r
+ // - Get magnetic filed info\r
+ lMagneticField = lESDevent->GetMagneticField();\r
+ // - Selection on the primary vertex Z position \r
+ if (fkQualityCutZprimVtxPos) {\r
+ if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange || TMath::Abs(lBestPrimaryVtxPos[2]) < fVtxRangeMin) {\r
+ AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDAsXiMinus);\r
+ PostData(3, fCFContCascadePIDAsXiPlus);\r
+ PostData(4, fCFContCascadePIDAsOmegaMinus);\r
+ PostData(5, fCFContCascadePIDAsOmegaPlus);\r
+ PostData(6, fCFContAsCascadeCuts);\r
+ return;\r
+ }\r
+ }\r
+ // - Take the number of cascades and tracks after vertex Z position selection\r
+ ncascadesAfterVertexSel = lESDevent->GetNumberOfCascades();\r
+ nTrackMultiplicityAfterVertexSel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);\r
+ } else if (fAnalysisType == "AOD") {\r
+ // - Primary vertex definition\r
+ const AliAODVertex *lPrimaryBestAODVtx = lAODevent->GetPrimaryVertex(); // get the best primary vertex available for the event GetVertex(0)\r
+ if (!lPrimaryBestAODVtx) {\r
+ AliWarning("No prim. vertex in AOD... return!");\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDAsXiMinus);\r
+ PostData(3, fCFContCascadePIDAsXiPlus);\r
+ PostData(4, fCFContCascadePIDAsOmegaMinus);\r
+ PostData(5, fCFContCascadePIDAsOmegaPlus);\r
+ PostData(6, fCFContAsCascadeCuts);\r
+ return;\r
+ }\r
+ lPrimaryBestAODVtx->GetXYZ( lBestPrimaryVtxPos );\r
+ // - Vertex position before any event selection on vertex position\r
+ const AliVVertex *primaryVtx = lAODevent->GetPrimaryVertex();\r
+ tPrimaryVtxPosition[0] = primaryVtx->GetX();\r
+ tPrimaryVtxPosition[1] = primaryVtx->GetY();\r
+ tPrimaryVtxPosition[2] = primaryVtx->GetZ();\r
+ fHistPVx->Fill( tPrimaryVtxPosition[0] );\r
+ fHistPVy->Fill( tPrimaryVtxPosition[1] );\r
+ fHistPVz->Fill( tPrimaryVtxPosition[2] );\r
+ // - Get magnetic filed info\r
+ lMagneticField = lAODevent->GetMagneticField();\r
+ // - Selection on the primary vertex Z position \r
+ if (fkQualityCutZprimVtxPos) {\r
+ if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange && TMath::Abs(lBestPrimaryVtxPos[2]) < fVtxRangeMin) {\r
+ AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDAsXiMinus);\r
+ PostData(3, fCFContCascadePIDAsXiPlus);\r
+ PostData(4, fCFContCascadePIDAsOmegaMinus);\r
+ PostData(5, fCFContCascadePIDAsOmegaPlus);\r
+ PostData(6, fCFContAsCascadeCuts);\r
+ return;\r
+ }\r
+ }\r
+ // - Take the number of cascades and tracks after vertex Z position selection\r
+ ncascadesAfterVertexSel = lAODevent->GetNumberOfCascades();\r
+ nTrackMultiplicityAfterVertexSel = -100;\r
+ }\r
+ // - Fill the plots\r
+ fHistCascadeMultiplicityAfterVertexCutSel->Fill(ncascadesAfterVertexSel);\r
+ fHistTrackMultiplicityAfterVertexCutSel->Fill(nTrackMultiplicityAfterVertexSel);\r
+\r
+ // - Vertex position plots: after any event selections\r
+ tPrimaryVtxPosition[0] = 0;\r
+ tPrimaryVtxPosition[1] = 0;\r
+ tPrimaryVtxPosition[2] = 0;\r
+ if (fAnalysisType == "ESD" ) {\r
+ const AliVVertex *primaryVtx = lESDevent->GetPrimaryVertex();\r
+ tPrimaryVtxPosition[0] = primaryVtx->GetX();\r
+ tPrimaryVtxPosition[1] = primaryVtx->GetY();\r
+ tPrimaryVtxPosition[2] = primaryVtx->GetZ();\r
+ } else if (fAnalysisType == "AOD") {\r
+ const AliVVertex *primaryVtx = lAODevent->GetPrimaryVertex();\r
+ tPrimaryVtxPosition[0] = primaryVtx->GetX();\r
+ tPrimaryVtxPosition[1] = primaryVtx->GetY();\r
+ tPrimaryVtxPosition[2] = primaryVtx->GetZ();\r
+ }\r
+ fHistPVxAnalysis->Fill( tPrimaryVtxPosition[0] );\r
+ fHistPVyAnalysis->Fill( tPrimaryVtxPosition[1] );\r
+ fHistPVzAnalysis->Fill( tPrimaryVtxPosition[2] );\r
+ \r
+\r
+ //---------------------------------------------------------------------- \r
+ // - Loop over the different types of GENERATED cascades (Xi-+, Omega-+) \r
+ //----------------------------------------------------------------------\r
+ // - Initialisation of useful local variables \r
+ Int_t lPdgCodeCasc = 0;\r
+ Int_t lPdgCodeBach = 0;\r
+ Int_t lPdgCodeLambda = 0;\r
+ Int_t lPdgCodeDghtMesV0 = 0;\r
+ Int_t lPdgCodeDghtBarV0 = 0; \r
+ TH1F *lHistEtaGenCasc = 0; \r
+ TH3D *l3dHistGenPtVsGenYvsNtracksPhysEff = 0;\r
+ TH3D *l3dHistGenPtVsGenctauvsYPhysEff = 0;\r
+ TH1F *lHistThetaGenCasc = 0;\r
+ TH2D *l2dHistGenPtVsGenYFdbl = 0;\r
+ TH1F *lHistThetaLambda = 0;\r
+ TH1F *lHistThetaBach = 0;\r
+ TH1F *lHistThetaBarDghter = 0;\r
+ TH1F *lHistThetaMesDghter = 0;\r
+ TH1F *lHistPtBach = 0;\r
+ TH1F *lHistPtBarDghter = 0;\r
+ TH1F *lHistPtMesDghter = 0;\r
+ Int_t ncascperev = 0; \r
+ Int_t ncascperevtot = 0;\r
+\r
+ for (Int_t iCascType = 1; iCascType < 5; iCascType++) { \r
+ ncascperev = 0;\r
+ ncascperevtot = 0;\r
+ Int_t lPrimaryTrackMultiplicity = nTrackMultiplicityAfterSDDSel;\r
+\r
+ switch (iCascType) {\r
+ case 1: // Xi-\r
+ lPdgCodeCasc = 3312; //Xi-\r
+ lPdgCodeBach = -211; //Pi-\r
+ lPdgCodeLambda = 3122; //Lambda0\r
+ lPdgCodeDghtMesV0 = -211; //Pi-\r
+ lPdgCodeDghtBarV0 = 2212; //Proton \r
+ lHistEtaGenCasc = fHistEtaGenCascXiMinus; // this plot for any Xi- \r
+ lHistThetaGenCasc = fHistThetaGenCascXiMinus; // cascades generated within acceptance (cut in pt + theta)\r
+ l3dHistGenPtVsGenYvsNtracksPhysEff = f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff;\r
+ l3dHistGenPtVsGenctauvsYPhysEff = f3dHistGenPtVsGenctauvsYXiMinusPhysEff;\r
+ l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblXiMinus;\r
+ lHistThetaLambda = fHistThetaLambdaXiMinus;\r
+ lHistThetaBach = fHistThetaBachXiMinus;\r
+ lHistThetaBarDghter = fHistThetaBarDghterXiMinus;\r
+ lHistThetaMesDghter = fHistThetaMesDghterXiMinus;\r
+ lHistPtBach = fHistPtBachXiMinus;\r
+ lHistPtBarDghter = fHistPtBarDghterXiMinus;\r
+ lHistPtMesDghter = fHistPtMesDghterXiMinus;\r
+ break; \r
+ case 2: // Xi+\r
+ lPdgCodeCasc = -3312; //Xi+\r
+ lPdgCodeBach = 211; //Pi+\r
+ lPdgCodeLambda = -3122; //AntiLambda0\r
+ lPdgCodeDghtMesV0 = 211; //Pi+\r
+ lPdgCodeDghtBarV0 = -2212; //AntiProton \r
+ lHistEtaGenCasc = fHistEtaGenCascXiPlus; // this plot for any Xi+\r
+ lHistThetaGenCasc = fHistThetaGenCascXiPlus; // cascades generated within acceptance (cut in pt + theta)\r
+ l3dHistGenPtVsGenYvsNtracksPhysEff = f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff;\r
+ l3dHistGenPtVsGenctauvsYPhysEff = f3dHistGenPtVsGenctauvsYXiPlusPhysEff;\r
+ l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblXiPlus;\r
+ lHistThetaLambda = fHistThetaLambdaXiPlus;\r
+ lHistThetaBach = fHistThetaBachXiPlus;\r
+ lHistThetaBarDghter = fHistThetaBarDghterXiPlus;\r
+ lHistThetaMesDghter = fHistThetaMesDghterXiPlus;\r
+ lHistPtBach = fHistPtBachXiPlus;\r
+ lHistPtBarDghter = fHistPtBarDghterXiPlus;\r
+ lHistPtMesDghter = fHistPtMesDghterXiPlus; \r
+ break;\r
+ case 3: // Omega-\r
+ lPdgCodeCasc = 3334; //Omega-\r
+ lPdgCodeBach = -321; //K-\r
+ lPdgCodeLambda = 3122; //Lambda0\r
+ lPdgCodeDghtMesV0 = -211; //Pi-\r
+ lPdgCodeDghtBarV0 = 2212; //Proton\r
+ lHistEtaGenCasc = fHistEtaGenCascOmegaMinus; // this plot for any Omega+ \r
+ lHistThetaGenCasc = fHistThetaGenCascOmegaMinus; // cascades generated within acceptance (cut in pt + theta)\r
+ l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblOmegaMinus;\r
+ l3dHistGenPtVsGenYvsNtracksPhysEff = f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff;\r
+ l3dHistGenPtVsGenctauvsYPhysEff = f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff;\r
+ lHistThetaLambda = fHistThetaLambdaOmegaMinus;\r
+ lHistThetaBach = fHistThetaBachOmegaMinus;\r
+ lHistThetaBarDghter = fHistThetaBarDghterOmegaMinus;\r
+ lHistThetaMesDghter = fHistThetaMesDghterOmegaMinus;\r
+ lHistPtBach = fHistPtBachOmegaMinus;\r
+ lHistPtBarDghter = fHistPtBarDghterOmegaMinus;\r
+ lHistPtMesDghter = fHistPtMesDghterOmegaMinus; \r
+ break;\r
+ case 4: // Omega+\r
+ lPdgCodeCasc = -3334; //Omega+\r
+ lPdgCodeBach = 321; //K+\r
+ lPdgCodeLambda = -3122; //AntiLambda0\r
+ lPdgCodeDghtMesV0 = 211; //Pi+\r
+ lPdgCodeDghtBarV0 = -2212; //AntiProton \r
+ lHistEtaGenCasc = fHistEtaGenCascOmegaPlus; // this plot for any Omega-\r
+ lHistThetaGenCasc = fHistThetaGenCascOmegaPlus; // cascades generated within acceptance (cut in pt + theta)\r
+ l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblOmegaPlus;\r
+ l3dHistGenPtVsGenYvsNtracksPhysEff = f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff;\r
+ l3dHistGenPtVsGenctauvsYPhysEff = f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff;\r
+ lHistThetaLambda = fHistThetaLambdaOmegaPlus;\r
+ lHistThetaBach = fHistThetaBachOmegaPlus;\r
+ lHistThetaBarDghter = fHistThetaBarDghterOmegaPlus;\r
+ lHistThetaMesDghter = fHistThetaMesDghterOmegaPlus;\r
+ lHistPtBach = fHistPtBachOmegaPlus;\r
+ lHistPtBarDghter = fHistPtBarDghterOmegaPlus;\r
+ lHistPtMesDghter = fHistPtMesDghterOmegaPlus; \r
+ break;\r
+ }\r
+\r
+ for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < lNbMCPrimary; iCurrentLabelStack++) {\r
+\r
+ Double_t partEnergy = 0.;\r
+ Double_t partPz = 0.;\r
+ Double_t partEta = 0.;\r
+ Double_t partTheta = 0.;\r
+ Double_t partP = 0.;\r
+ Double_t partPt = 0.;\r
+ Double_t partVx = 0.;\r
+ Double_t partVy = 0.; \r
+ Double_t partVz = 0.;\r
+ Double_t bacVx = 0.;\r
+ Double_t bacVy = 0.;\r
+ Double_t bacVz = 0.; \r
+ Double_t partMass = 0.;\r
+\r
+ if ( fAnalysisType == "ESD" ) { \r
+ TParticle* lCurrentParticle = 0x0; \r
+ lCurrentParticle = lMCstack->Particle( iCurrentLabelStack );\r
+ if (!lCurrentParticle) {\r
+ Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack );\r
+ continue;\r
+ }\r
+ if (!lMCstack->IsPhysicalPrimary(iCurrentLabelStack)) continue; \r
+ if (lCurrentParticle->GetPdgCode() == lPdgCodeCasc) { // Here ! \r
+ TParticle* xiMC = 0x0;\r
+ xiMC = lCurrentParticle;\r
+ if (!xiMC) {\r
+ Printf("MC TParticle pointer to Cascade = 0x0 ! Skip ...");\r
+ continue;\r
+ }\r
+ partEnergy = xiMC->Energy();\r
+ partPz = xiMC->Pz();\r
+ partEta = xiMC->Eta();\r
+ partPt = xiMC->Pt();\r
+ partP = xiMC->P();\r
+ partTheta = xiMC->Theta();\r
+ partMass = xiMC->GetMass();\r
+ partVx = xiMC->Vx();\r
+ partVy = xiMC->Vy();\r
+ partVz = xiMC->Vz();\r
+ if (xiMC->GetDaughter(0)>=0) {\r
+ TParticle *mcBach = lMCstack->Particle(xiMC->GetDaughter(0));\r
+ if (mcBach) {\r
+ bacVx = mcBach->Vx();\r
+ bacVy = mcBach->Vy();\r
+ bacVz = mcBach->Vz();\r
+ }\r
+ }\r
+ } else continue;\r
+ } else if ( fAnalysisType == "AOD" ) {\r
+ AliAODMCParticle *lCurrentParticleaod = (AliAODMCParticle*) arrayMC->At(iCurrentLabelStack);\r
+ if (!lCurrentParticleaod) {\r
+ Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack );\r
+ continue;\r
+ }\r
+ if (!lCurrentParticleaod->IsPhysicalPrimary()) continue; \r
+ if (!(lCurrentParticleaod->PdgCode() == lPdgCodeCasc)) continue;\r
+ partEnergy = lCurrentParticleaod->E();\r
+ partPz = lCurrentParticleaod->Pz();\r
+ partEta = lCurrentParticleaod->Eta();\r
+ partP = lCurrentParticleaod->P();\r
+ partPt = lCurrentParticleaod->Pt();\r
+ partTheta = lCurrentParticleaod->Theta();\r
+ partMass = lCurrentParticleaod->M(); //FIXME: not sure this works, seems not implemented\r
+ partVx = lCurrentParticleaod->Xv();\r
+ partVy = lCurrentParticleaod->Yv();\r
+ partVz = lCurrentParticleaod->Zv();\r
+ if (lCurrentParticleaod->GetDaughter(0)>=0) {\r
+ AliAODMCParticle *mcBach = (AliAODMCParticle*) arrayMC->At(lCurrentParticleaod->GetDaughter(0));\r
+ if (mcBach) {\r
+ bacVx = mcBach->Xv();\r
+ bacVy = mcBach->Yv();\r
+ bacVz = mcBach->Zv();\r
+ } \r
+ }\r
+ }\r
+ ncascperevtot++; \r
+ // - Fill the first histos : = any generated Xi, not necessarily within the acceptance\r
+ Double_t lRapXiMC = 0.5*TMath::Log((partEnergy + partPz) / (partEnergy - partPz +1.e-13));\r
+ // - Calculate proper time\r
+ Double_t lctau = TMath::Sqrt((partVx-bacVx)*(partVx-bacVx)+(partVy-bacVy)*(partVy-bacVy)+(partVz-bacVz)*(partVz-bacVz));\r
+ if (partP!=0.) lctau = lctau*partMass/partP;\r
+ else lctau = -1.;\r
+ Double_t lRadToDeg = 180.0/TMath::Pi();\r
+ // - Fill the first histos : = any generated Xi, not necessarily within the acceptance \r
+ lHistEtaGenCasc->Fill( partEta ); \r
+ l3dHistGenPtVsGenYvsNtracksPhysEff->Fill( partPt, lRapXiMC, lPrimaryTrackMultiplicity );\r
+ l3dHistGenPtVsGenctauvsYPhysEff->Fill( partPt, lctau, lRapXiMC );\r
+ lHistThetaGenCasc->Fill( lRadToDeg * partTheta );\r
+\r
+ //--------------------------------------------------------------------------------------------\r
+ // - Check the emission of particle stays within the acceptance of the detector (cut in theta)\r
+ if (fApplyAccCut) { if( partTheta < TMath::Pi()/4.0 || partTheta > 3.0*TMath::Pi()/4.0 ) continue;} \r
+\r
+ Float_t lambdaTheta = 0.;\r
+ Float_t bacTheta = 0.;\r
+ Float_t dghtBarV0Theta = 0.;\r
+ Float_t dghtMesV0Theta = 0.;\r
+ Float_t bacPt = 0.;\r
+ Float_t dghtBarV0Pt = 0.;\r
+ Float_t dghtMesV0Pt = 0.;\r
+\r
+ if ( fAnalysisType == "ESD" ) { \r
+ TParticle* xiMC = lMCstack->Particle( iCurrentLabelStack ); \r
+ if ( xiMC->GetNDaughters() != 2) continue;\r
+ if ( xiMC->GetDaughter(0) < 0 ) continue;\r
+ if ( xiMC->GetDaughter(1) < 0 ) continue; \r
+ TParticle* lDght0ofXi = lMCstack->Particle( xiMC->GetDaughter(0) );\r
+ TParticle* lDght1ofXi = lMCstack->Particle( xiMC->GetDaughter(1) );\r
+ TParticle* lLambda = 0;\r
+ TParticle* lBach = 0;\r
+\r
+ // Xi - Case 1\r
+ if ( lDght0ofXi->GetPdgCode() == lPdgCodeLambda && lDght1ofXi->GetPdgCode() == lPdgCodeBach ){ \r
+ lLambda = lDght0ofXi; // dghter0 = Lambda\r
+ lBach = lDght1ofXi; // dghter1 = Pi-\r
+ } \r
+ // Xi - Case 2\r
+ else if ( lDght0ofXi->GetPdgCode() == lPdgCodeBach && lDght1ofXi->GetPdgCode() == lPdgCodeLambda ){ \r
+ lBach = lDght0ofXi; // dghter0 = Pi-\r
+ lLambda = lDght1ofXi; // dghter1 = Lambda\r
+ }\r
+ // Otherwise - Case 3 \r
+ else continue;\r
+\r
+ // - Check the emission of particle stays within the acceptance of the detector (cut in pt + theta)\r
+ if (fApplyAccCut) { \r
+ if( lLambda->Theta() < TMath::Pi()/4.0 || lLambda->Theta() > 3.0*TMath::Pi()/4.0 ) continue;\r
+ if( lBach->Theta() < TMath::Pi()/4.0 || lBach->Theta() > 3.0*TMath::Pi()/4.0 ) continue;\r
+ if( lBach->Pt() < 0.150 ) continue; //FIXME: maybe tuned for Xi but not for K- from Omega ...\r
+ } \r
+ \r
+ //---------\r
+ // - V0 level\r
+ TParticle* lDghtBarV0 = 0;\r
+ TParticle* lDghtMesV0 = 0;\r
+ if( lLambda->GetNDaughters() != 2 ) continue;\r
+ if( lLambda->GetDaughter(0) < 0 ) continue;\r
+ if( lLambda->GetDaughter(1) < 0 ) continue;\r
+ TParticle* lDght0ofLambda = lMCstack->Particle( lLambda->GetDaughter(0) );\r
+ TParticle* lDght1ofLambda = lMCstack->Particle( lLambda->GetDaughter(1) );\r
+\r
+ // V0 - Case 1\r
+ if ( lDght0ofLambda->GetPdgCode() == lPdgCodeDghtBarV0 && lDght1ofLambda->GetPdgCode() == lPdgCodeDghtMesV0 ) { // Here ! \r
+ lDghtBarV0 = lDght0ofLambda; // dghter0 = Proton\r
+ lDghtMesV0 = lDght1ofLambda; // dghter1 = Pi-\r
+ } \r
+ // V0 - Case 2\r
+ else if ( lDght0ofLambda->GetPdgCode() == lPdgCodeDghtMesV0 && lDght1ofLambda->GetPdgCode() == lPdgCodeDghtBarV0 ) { // Here !\r
+ lDghtMesV0 = lDght0ofLambda; // dghter0 = Pi-\r
+ lDghtBarV0 = lDght1ofLambda; // dghter1 = Proton\r
+ } \r
+ // Otherwise - Case 3\r
+ else continue;\r
+ \r
+ // - Check the emission of particle stays within the acceptance of the detector\r
+ if (fApplyAccCut) { \r
+ if( lDghtBarV0->Theta() < TMath::Pi()/4.0 || lDghtBarV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue;\r
+ if( lDghtMesV0->Theta() < TMath::Pi()/4.0 || lDghtMesV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue;\r
+ if( lDghtBarV0->Pt() < 0.250 ) continue;\r
+ if( lDghtMesV0->Pt() < 0.150 ) continue;\r
+ }\r
+ \r
+ lambdaTheta = lLambda->Theta();\r
+ bacTheta = lBach->Theta();\r
+ dghtBarV0Theta = lDghtBarV0->Theta(); \r
+ dghtMesV0Theta = lDghtMesV0->Theta();\r
+ bacPt = lBach->Pt();\r
+ dghtBarV0Pt = lDghtBarV0->Pt();\r
+ dghtMesV0Pt = lDghtMesV0->Pt();\r
+ \r
+ } else if ( fAnalysisType == "AOD") {\r
+\r
+ AliAODMCParticle *xiMC = (AliAODMCParticle*) arrayMC->At(iCurrentLabelStack);\r
+ if (xiMC->GetNDaughters() != 2) continue;\r
+ if (xiMC->GetDaughter(0) < 0 ) continue;\r
+ if (xiMC->GetDaughter(1) < 0 ) continue;\r
+\r
+ AliAODMCParticle* lDght0ofXi = (AliAODMCParticle*) arrayMC->At( xiMC->GetDaughter(0) );\r
+ AliAODMCParticle* lDght1ofXi = (AliAODMCParticle*) arrayMC->At( xiMC->GetDaughter(1) );\r
+\r
+ AliAODMCParticle* lLambda = 0;\r
+ AliAODMCParticle* lBach = 0;\r
+\r
+ // Xi - Case 1\r
+ if ( lDght0ofXi->PdgCode() == lPdgCodeLambda && lDght1ofXi->PdgCode() == lPdgCodeBach ){ \r
+ lLambda = lDght0ofXi; // dghter0 = Lambda\r
+ lBach = lDght1ofXi; // dghter1 = Pi-\r
+ }\r
+ // Xi - Case 2\r
+ else if ( lDght0ofXi->PdgCode() == lPdgCodeBach && lDght1ofXi->PdgCode() == lPdgCodeLambda ){\r
+ lBach = lDght0ofXi; // dghter0 = Pi\r
+ lLambda = lDght1ofXi; //dghter1 = Lambda\r
+ }\r
+ // Otherwise - Case 3\r
+ else continue;\r
+\r
+ // - Check the emission of particle stays within the acceptance of the detector (cut in pt + theta)\r
+ if (fApplyAccCut) {\r
+ if ( lLambda->Theta() < TMath::Pi()/4.0 || lLambda->Theta() > 3.0*TMath::Pi()/4.0 ) continue;\r
+ if( lBach->Theta() < TMath::Pi()/4.0 || lBach->Theta() > 3.0*TMath::Pi()/4.0 ) continue;\r
+ if( lBach->Pt() < 0.150 ) continue; //FIXME : maybe tuned for Xi but not for K- from Omega ...\r
+ }\r
+\r
+ //-----------\r
+ // - V0 level \r
+ AliAODMCParticle* lDghtBarV0 = 0;\r
+ AliAODMCParticle* lDghtMesV0 = 0;\r
+\r
+ if( lLambda->GetNDaughters() != 2 ) continue;\r
+ if( lLambda->GetDaughter(0) < 0 ) continue;\r
+ if( lLambda->GetDaughter(1) < 0 ) continue;\r
+\r
+ AliAODMCParticle* lDght0ofLambda = (AliAODMCParticle*) arrayMC->At( lLambda->GetDaughter(0) );\r
+ AliAODMCParticle* lDght1ofLambda = (AliAODMCParticle*) arrayMC->At( lLambda->GetDaughter(1) );\r
+\r
+ // V0 - Case 1\r
+ if ( lDght0ofLambda->PdgCode() == lPdgCodeDghtBarV0 && lDght1ofLambda->PdgCode() == lPdgCodeDghtMesV0 ) { \r
+ lDghtBarV0 = lDght0ofLambda; // dghter0 = Proton\r
+ lDghtMesV0 = lDght1ofLambda; // dghter1 = Pi-\r
+ } \r
+ // V0 - Case 2\r
+ else if ( lDght0ofLambda->PdgCode() == lPdgCodeDghtMesV0 && lDght1ofLambda->PdgCode() == lPdgCodeDghtBarV0 ) { \r
+ lDghtMesV0 = lDght0ofLambda; // dghter0 = Pi-\r
+ lDghtBarV0 = lDght1ofLambda; // dghter1 = proton\r
+ } \r
+ // V0 otherwise - Case 3\r
+ else continue;\r
+\r
+ // - Check the emission of particle stays within the acceptance of the detector\r
+ if (fApplyAccCut) {\r
+ if( lDghtBarV0->Theta() < TMath::Pi()/4.0 || lDghtBarV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue;\r
+ if( lDghtMesV0->Theta() < TMath::Pi()/4.0 || lDghtMesV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue;\r
+ if( lDghtBarV0->Pt() < 0.250 ) continue;\r
+ if( lDghtMesV0->Pt() < 0.150 ) continue;\r
+ }\r
+\r
+ lambdaTheta = lLambda->Theta();\r
+ bacTheta = lBach->Theta();\r
+ dghtBarV0Theta = lDghtBarV0->Theta();\r
+ dghtMesV0Theta = lDghtMesV0->Theta();\r
+ bacPt = lBach->Pt();\r
+ dghtBarV0Pt = lDghtBarV0->Pt();\r
+ dghtMesV0Pt = lDghtMesV0->Pt();\r
+ }\r
+\r
+ //---------------------------------------\r
+ // - Filling histos for findable cascades\r
+ // - Fill theta histos \r
+ lHistThetaLambda->Fill( lRadToDeg * lambdaTheta );\r
+ lHistThetaBach->Fill( lRadToDeg * bacTheta );\r
+ lHistThetaBarDghter->Fill( lRadToDeg * dghtBarV0Theta );\r
+ lHistThetaMesDghter->Fill( lRadToDeg * dghtMesV0Theta );\r
+ // - Fill pt histos\r
+ lHistPtBach ->Fill( bacPt );\r
+ lHistPtBarDghter ->Fill( dghtBarV0Pt );\r
+ lHistPtMesDghter ->Fill( dghtMesV0Pt );\r
+ l2dHistGenPtVsGenYFdbl ->Fill( partPt, lRapXiMC );\r
+\r
+ ncascperev++; \r
+ \r
+ }// This is the end of the loop on primaries\r
+ \r
+ if (iCascType == 1) {\r
+ fHistnXiMinusPerEv->Fill(ncascperev);\r
+ fHistnXiMinusPerEvTot->Fill(ncascperevtot);\r
+ }\r
+ if (iCascType == 2) {\r
+ fHistnXiPlusPerEv->Fill(ncascperev);\r
+ fHistnXiPlusPerEvTot->Fill(ncascperevtot);\r
+ }\r
+ if (iCascType == 3) {\r
+ fHistnOmegaMinusPerEv->Fill(ncascperev);\r
+ fHistnOmegaMinusPerEvTot->Fill(ncascperevtot);\r
+ }\r
+ if (iCascType == 4) {\r
+ fHistnOmegaPlusPerEv->Fill(ncascperev);\r
+ fHistnOmegaPlusPerEvTot->Fill(ncascperevtot);\r
+ }\r
+\r
+ // - Re-initialisation of the local THF pointers\r
+ lHistEtaGenCasc = 0x0;\r
+ lHistThetaGenCasc = 0x0;\r
+ l2dHistGenPtVsGenYFdbl = 0x0;\r
+ lHistThetaLambda = 0x0;\r
+ lHistThetaBach = 0x0;\r
+ lHistThetaBarDghter = 0x0;\r
+ lHistThetaMesDghter = 0x0;\r
+ lHistPtBach = 0x0;\r
+ lHistPtBarDghter = 0x0;\r
+ lHistPtMesDghter = 0x0; \r
+\r
+ } // end of loop over the different types of cascades (Xi-+, Omega-+)\r
+ \r
+ \r
+ \r
+ //----------------------------------------- \r
+ // - Loop over the reconstructed candidates\r
+ //-----------------------------------------\r
+ Int_t nAssoXiMinus = 0;\r
+ Int_t nAssoXiPlus = 0;\r
+ Int_t nAssoOmegaMinus = 0;\r
+ Int_t nAssoOmegaPlus = 0;\r
+ Int_t lPosTPCClusters = 0;\r
+ Int_t lNegTPCClusters = 0;\r
+ Int_t lBachTPCClusters = 0;\r
+ Double_t lDcaXiDaughters = -1. ;\r
+ Double_t lDcaBachToPrimVertexXi = -1. ;\r
+ Double_t lXiCosineOfPointingAngle = -1. ;\r
+ Double_t lPosXi[3] = { -1000.0, -1000.0, -1000.0 };\r
+ Double_t lXiRadius = -1000. ;\r
+ Double_t lInvMassLambdaAsCascDghter = 0.;\r
+ Double_t lDcaV0DaughtersXi = -1.;\r
+ Double_t lV0CosineOfPointingAngleXi = -1.;\r
+ Double_t lV0CosineOfPointingAngle = -1.;\r
+ Double_t lPosV0Xi[3] = { -1000. , -1000., -1000. }; // Position of VO coming from cascade\r
+ Double_t lV0RadiusXi = -1000.;\r
+ Double_t lDcaV0ToPrimVertexXi = -1.;\r
+ Double_t lDcaPosToPrimVertexXi = -1.;\r
+ Double_t lDcaNegToPrimVertexXi = -1.;\r
+ Double_t lChargeXi = -1.;\r
+ Double_t lV0mom = -1000.;\r
+ Double_t lmcPt = -1.; \r
+ Double_t lmcRapCasc = -1.; \r
+ Double_t lmcEta = -1000.; \r
+ Double_t lmcTransvRadius = -1000.; \r
+ Double_t lrecoPt = -100.; \r
+ Double_t lrecoTransvRadius = -1000.; \r
+ Double_t lDeltaPhiMcReco = -1.;\r
+ Double_t lBachTransvMom = 0.;\r
+ Double_t lpTrackTransvMom = 0.;\r
+ Double_t lnTrackTransvMom = 0.;\r
+ Double_t lmcPtPosV0Dghter = -100.;\r
+ Double_t lmcPtNegV0Dghter = -100.;\r
+ Double_t lrecoP = -100.;\r
+ Double_t lmcPtBach = -100.;\r
+ Double_t cascadeMass = 0.;\r
+\r
+ // - Get the number of cascades\r
+ Int_t ncascades = 0;\r
+ if ( fAnalysisType == "ESD" ) { ncascades = lESDevent->GetNumberOfCascades(); }\r
+ else if ( fAnalysisType == "AOD" ) { ncascades = lAODevent->GetNumberOfCascades(); }\r
+\r
+ //-------------------------------\r
+ // - Begining of the Cascade Loop\r
+ for (Int_t iXi = 0; iXi < ncascades; iXi++) {\r
+\r
+ Bool_t lIsPosInXiProton = kFALSE;\r
+ Bool_t lIsPosInXiPion = kFALSE;\r
+ Bool_t lIsPosInOmegaProton = kFALSE;\r
+ Bool_t lIsPosInOmegaPion = kFALSE;\r
+ Bool_t lIsNegInXiProton = kFALSE;\r
+ Bool_t lIsNegInXiPion = kFALSE;\r
+ Bool_t lIsNegInOmegaProton = kFALSE;\r
+ Bool_t lIsNegInOmegaPion = kFALSE;\r
+ Bool_t lIsBachelorKaon = kFALSE;\r
+ Bool_t lIsBachelorPion = kFALSE;\r
+ Bool_t lIsBachelorKaonForTPC = kFALSE;\r
+ Bool_t lIsBachelorPionForTPC = kFALSE;\r
+ Bool_t lIsNegPionForTPC = kFALSE;\r
+ Bool_t lIsPosPionForTPC = kFALSE;\r
+ Bool_t lIsNegProtonForTPC = kFALSE;\r
+ Bool_t lIsPosProtonForTPC = kFALSE;\r
+\r
+ // - Combined PID\r
+ // Reasonable guess for the priors for the cascade track sample (e-, mu, pi, K, p)\r
+ Double_t lPriorsGuessXi[14] = {0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0};\r
+ Double_t lPriorsGuessOmega[14] = {0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0};\r
+ Double_t ppionBach = 0.0, pkaonBach = 0.0;\r
+ Bool_t lIsBachelorMCPiMinus = kFALSE;\r
+ Bool_t lIsBachelorMCPiPlus = kFALSE;\r
+ Bool_t lIsBachelorMCKMinus = kFALSE;\r
+ Bool_t lIsBachelorMCKPlus = kFALSE;\r
+ Double_t lInvMassXiMinus = 0.;\r
+ Double_t lInvMassXiPlus = 0.;\r
+ Double_t lInvMassOmegaMinus = 0.;\r
+ Double_t lInvMassOmegaPlus = 0.;\r
+ Bool_t lAssoXiMinus = kFALSE;\r
+ Bool_t lAssoXiPlus = kFALSE;\r
+ Bool_t lAssoOmegaMinus = kFALSE;\r
+ Bool_t lAssoOmegaPlus = kFALSE;\r
+ \r
+ Float_t etaBach = 0.;\r
+ Float_t etaPos = 0.;\r
+ Float_t etaNeg = 0.;\r
+\r
+ if ( fAnalysisType == "ESD" ) { \r
+\r
+ // - Load the cascade\r
+ AliESDcascade *xiESD = lESDevent->GetCascade(iXi);\r
+ if (!xiESD) continue;\r
+ \r
+ // - Connection to daughter tracks of the current cascade \r
+ UInt_t lIdxPosXi = (UInt_t) TMath::Abs( xiESD->GetPindex() );\r
+ UInt_t lIdxNegXi = (UInt_t) TMath::Abs( xiESD->GetNindex() );\r
+ UInt_t lBachIdx = (UInt_t) TMath::Abs( xiESD->GetBindex() );\r
+ \r
+ // - Rejection of a double use of a daughter track (nothing but just a crosscheck of what is done in the cascade vertexer)\r
+ if(lBachIdx == lIdxNegXi) {\r
+ AliWarning("Pb / Idx(Bach. track) = Idx(Neg. track) ... continue!"); continue;\r
+ }\r
+ if(lBachIdx == lIdxPosXi) {\r
+ AliWarning("Pb / Idx(Bach. track) = Idx(Pos. track) ... continue!"); continue;\r
+ }\r
+ \r
+ // - Get the daughter tracks\r
+ AliESDtrack *pTrackXi = lESDevent->GetTrack( lIdxPosXi );\r
+ AliESDtrack *nTrackXi = lESDevent->GetTrack( lIdxNegXi );\r
+ AliESDtrack *bachTrackXi = lESDevent->GetTrack( lBachIdx );\r
+ if (!pTrackXi || !nTrackXi || !bachTrackXi ) {\r
+ Printf("ERROR: Could not retrieve one of the 3 daughter tracks of the cascade ...");\r
+ continue;\r
+ }\r
+ \r
+ // Get the number of TPC clusters\r
+ lPosTPCClusters = pTrackXi->GetTPCNcls();\r
+ lNegTPCClusters = nTrackXi->GetTPCNcls();\r
+ lBachTPCClusters = bachTrackXi->GetTPCNcls(); \r
+ // - Rejection of a poor quality tracks\r
+ if(fkQualityCutTPCrefit){\r
+ // - Poor quality related to TPCrefit\r
+ ULong_t pStatus = pTrackXi->GetStatus();\r
+ ULong_t nStatus = nTrackXi->GetStatus();\r
+ ULong_t bachStatus = bachTrackXi->GetStatus();\r
+ if ((pStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Pos. track has no TPCrefit ... continue!"); continue; }\r
+ if ((nStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Neg. track has no TPCrefit ... continue!"); continue; }\r
+ if ((bachStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / Bach. track has no TPCrefit ... continue!"); continue; }\r
+ } \r
+ if(fkQualityCutnTPCcls){\r
+ // - Poor quality related to TPC clusters\r
+ if(lPosTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Pos. track has less than 80 TPC clusters ... continue!"); continue; }\r
+ if(lNegTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Neg. track has less than 80 TPC clusters ... continue!"); continue; }\r
+ if(lBachTPCClusters < fMinnTPCcls) { AliWarning("Pb / Bach. track has less than 80 TPC clusters ... continue!"); continue; }\r
+ }\r
+\r
+ etaPos = pTrackXi->Eta();\r
+ etaNeg = nTrackXi->Eta();\r
+ etaBach = bachTrackXi->Eta();\r
+ \r
+ // - Info over reconstructed cascades\r
+ Double_t lV0quality = 0.;\r
+ if( bachTrackXi->Charge() < 0 ) {\r
+ //Calculate the effective mass of the Xi- candidate: Xi- hyp. (pdg code 3312\r
+ lV0quality = 0.;\r
+ xiESD->ChangeMassHypothesis(lV0quality , 3312); \r
+ lInvMassXiMinus = xiESD->GetEffMassXi();\r
+ //Calculate the effective mass of the Xi- candidate: Omega- hyp. (pdg code 3334)\r
+ lV0quality = 0.;\r
+ xiESD->ChangeMassHypothesis(lV0quality , 3334); \r
+ lInvMassOmegaMinus = xiESD->GetEffMassXi();\r
+ //Back to "default" hyp. (Xi-) \r
+ lV0quality = 0.;\r
+ xiESD->ChangeMassHypothesis(lV0quality , 3312);\r
+ }\r
+ if( bachTrackXi->Charge() > 0 ){\r
+ //Calculate the effective mass of the Xi- candidate: Xi+ hyp. (pdg code -3312)\r
+ lV0quality = 0.;\r
+ xiESD->ChangeMassHypothesis(lV0quality , -3312); \r
+ lInvMassXiPlus = xiESD->GetEffMassXi();\r
+ //Calculate the effective mass of the Xi- candidate: Omega+ hyp. (pdg code -3334)\r
+ lV0quality = 0.;\r
+ xiESD->ChangeMassHypothesis(lV0quality , -3334); \r
+ lInvMassOmegaPlus = xiESD->GetEffMassXi();\r
+ //Back to "default" hyp. (Xi-)\r
+ lV0quality = 0.;\r
+ xiESD->ChangeMassHypothesis(lV0quality , -3312);\r
+ }\r
+ lDcaXiDaughters = xiESD->GetDcaXiDaughters();\r
+ lDcaBachToPrimVertexXi = TMath::Abs( bachTrackXi->GetD(lBestPrimaryVtxPos[0],lBestPrimaryVtxPos[1],lMagneticField) );\r
+ lXiCosineOfPointingAngle = xiESD->GetCascadeCosineOfPointingAngle( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2] );\r
+ xiESD->GetXYZcascade( lPosXi[0], lPosXi[1], lPosXi[2] ); \r
+ lInvMassLambdaAsCascDghter = xiESD->GetEffMass();\r
+ lDcaV0DaughtersXi = xiESD->GetDcaV0Daughters();\r
+ lV0CosineOfPointingAngleXi = xiESD->GetV0CosineOfPointingAngle( lPosXi[0], lPosXi[1], lPosXi[2] );\r
+ lV0CosineOfPointingAngle = xiESD->GetV0CosineOfPointingAngle( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2]); \r
+ xiESD->GetXYZ( lPosV0Xi[0], lPosV0Xi[1], lPosV0Xi[2] );\r
+ lDcaV0ToPrimVertexXi = xiESD->GetD( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2] );\r
+ lDcaPosToPrimVertexXi = TMath::Abs( pTrackXi->GetD(lBestPrimaryVtxPos[0],lBestPrimaryVtxPos[1],lMagneticField) );\r
+ lDcaNegToPrimVertexXi = TMath::Abs( nTrackXi->GetD(lBestPrimaryVtxPos[0],lBestPrimaryVtxPos[1],lMagneticField) );\r
+ lChargeXi = xiESD->Charge();\r
+ \r
+ //------------------\r
+ // - PID Information\r
+\r
+ // - Combined VO-positive-daughter PID\r
+ AliPID pPidXi; pPidXi.SetPriors( lPriorsGuessXi );\r
+ AliPID pPidOmega; pPidOmega.SetPriors( lPriorsGuessOmega ); \r
+ if( pTrackXi->IsOn(AliESDtrack::kESDpid) ){ \r
+ Double_t r[10] = {0.}; pTrackXi->GetESDpid(r);\r
+ pPidXi.SetProbabilities(r);\r
+ pPidOmega.SetProbabilities(r); \r
+ // Check if the V0 positive track is a proton (case for Xi-)\r
+ Double_t pproton = pPidXi.GetProbability(AliPID::kProton);\r
+ if (pproton > pPidXi.GetProbability(AliPID::kElectron) &&\r
+ pproton > pPidXi.GetProbability(AliPID::kMuon) &&\r
+ pproton > pPidXi.GetProbability(AliPID::kPion) &&\r
+ pproton > pPidXi.GetProbability(AliPID::kKaon) ) lIsPosInXiProton = kTRUE;\r
+ // Check if the V0 positive track is a pi+ (case for Xi+)\r
+ Double_t ppion = pPidXi.GetProbability(AliPID::kPion);\r
+ if (ppion > pPidXi.GetProbability(AliPID::kElectron) &&\r
+ ppion > pPidXi.GetProbability(AliPID::kMuon) &&\r
+ ppion > pPidXi.GetProbability(AliPID::kKaon) &&\r
+ ppion > pPidXi.GetProbability(AliPID::kProton) ) lIsPosInXiPion = kTRUE;\r
+ // Check if the V0 positive track is a proton (case for Omega-)\r
+ pproton = 0.;\r
+ pproton = pPidOmega.GetProbability(AliPID::kProton);\r
+ if (pproton > pPidOmega.GetProbability(AliPID::kElectron) &&\r
+ pproton > pPidOmega.GetProbability(AliPID::kMuon) &&\r
+ pproton > pPidOmega.GetProbability(AliPID::kPion) &&\r
+ pproton > pPidOmega.GetProbability(AliPID::kKaon) ) lIsPosInOmegaProton = kTRUE;\r
+ // Check if the V0 positive track is a pi+ (case for Omega+)\r
+ ppion = 0.;\r
+ ppion = pPidOmega.GetProbability(AliPID::kPion);\r
+ if (ppion > pPidOmega.GetProbability(AliPID::kElectron) &&\r
+ ppion > pPidOmega.GetProbability(AliPID::kMuon) &&\r
+ ppion > pPidOmega.GetProbability(AliPID::kKaon) &&\r
+ ppion > pPidOmega.GetProbability(AliPID::kProton) ) lIsPosInOmegaPion = kTRUE;\r
+ } \r
+ // - Combined VO-negative-daughter PID\r
+ AliPID nPidXi; nPidXi.SetPriors( lPriorsGuessXi );\r
+ AliPID nPidOmega; nPidOmega.SetPriors( lPriorsGuessOmega ); \r
+ if( nTrackXi->IsOn(AliESDtrack::kESDpid) ) { \r
+ Double_t r[10] = {0.}; nTrackXi->GetESDpid(r);\r
+ nPidXi.SetProbabilities(r);\r
+ nPidOmega.SetProbabilities(r);\r
+ // Check if the V0 negative track is a pi- (case for Xi-)\r
+ Double_t ppion = nPidXi.GetProbability(AliPID::kPion);\r
+ if (ppion > nPidXi.GetProbability(AliPID::kElectron) &&\r
+ ppion > nPidXi.GetProbability(AliPID::kMuon) &&\r
+ ppion > nPidXi.GetProbability(AliPID::kKaon) &&\r
+ ppion > nPidXi.GetProbability(AliPID::kProton) ) lIsNegInXiPion = kTRUE;\r
+ // Check if the V0 negative track is an anti-proton (case for Xi+)\r
+ Double_t pproton = nPidXi.GetProbability(AliPID::kProton);\r
+ if (pproton > nPidXi.GetProbability(AliPID::kElectron) &&\r
+ pproton > nPidXi.GetProbability(AliPID::kMuon) &&\r
+ pproton > nPidXi.GetProbability(AliPID::kPion) &&\r
+ pproton > nPidXi.GetProbability(AliPID::kKaon) ) lIsNegInXiProton = kTRUE;\r
+ // Check if the V0 negative track is a pi- (case for Omega-)\r
+ ppion = 0.;\r
+ ppion = nPidOmega.GetProbability(AliPID::kPion);\r
+ if (ppion > nPidOmega.GetProbability(AliPID::kElectron) &&\r
+ ppion > nPidOmega.GetProbability(AliPID::kMuon) &&\r
+ ppion > nPidOmega.GetProbability(AliPID::kKaon) &&\r
+ ppion > nPidOmega.GetProbability(AliPID::kProton) ) lIsNegInOmegaPion = kTRUE;\r
+ // Check if the V0 negative track is an anti-proton (case for Omega+)\r
+ pproton = 0.;\r
+ pproton = nPidOmega.GetProbability(AliPID::kProton);\r
+ if (pproton > nPidOmega.GetProbability(AliPID::kElectron) &&\r
+ pproton > nPidOmega.GetProbability(AliPID::kMuon) &&\r
+ pproton > nPidOmega.GetProbability(AliPID::kPion) &&\r
+ pproton > nPidOmega.GetProbability(AliPID::kKaon) ) lIsNegInOmegaProton = kTRUE;\r
+ }\r
+ // - Combined bachelor PID\r
+ AliPID bachPidXi; bachPidXi.SetPriors( lPriorsGuessXi );\r
+ AliPID bachPidOmega; bachPidOmega.SetPriors( lPriorsGuessOmega );\r
+ if ( bachTrackXi->IsOn(AliESDtrack::kESDpid) ) { \r
+ Double_t r[10] = {0.}; bachTrackXi->GetESDpid(r);\r
+ bachPidXi.SetProbabilities(r);\r
+ bachPidOmega.SetProbabilities(r);\r
+ // Check if the bachelor track is a pion\r
+ ppionBach = bachPidXi.GetProbability(AliPID::kPion);\r
+ if (ppionBach > bachPidXi.GetProbability(AliPID::kElectron) &&\r
+ ppionBach > bachPidXi.GetProbability(AliPID::kMuon) &&\r
+ ppionBach > bachPidXi.GetProbability(AliPID::kKaon) &&\r
+ ppionBach > bachPidXi.GetProbability(AliPID::kProton) ) lIsBachelorPion = kTRUE;\r
+ // Check if the bachelor track is a kaon\r
+ pkaonBach = bachPidOmega.GetProbability(AliPID::kKaon);\r
+ if (pkaonBach > bachPidOmega.GetProbability(AliPID::kElectron) &&\r
+ pkaonBach > bachPidOmega.GetProbability(AliPID::kMuon) &&\r
+ pkaonBach > bachPidOmega.GetProbability(AliPID::kPion) &&\r
+ pkaonBach > bachPidOmega.GetProbability(AliPID::kProton) ) lIsBachelorKaon = kTRUE; \r
+ }\r
+ // - 4-sigma bands on Bethe-Bloch curve\r
+ // Bachelor\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 4) lIsBachelorKaonForTPC = kTRUE;\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 4) lIsBachelorPionForTPC = kTRUE;\r
+ // Negative V0 daughter\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 4) lIsNegPionForTPC = kTRUE;\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kProton )) < 4) lIsNegProtonForTPC = kTRUE;\r
+ // Positive V0 daughter\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 4) lIsPosPionForTPC = kTRUE;\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 4) lIsPosProtonForTPC = kTRUE;\r
+ /* \r
+ const AliExternalTrackParam *pInnerWallTrackXi = pTrackXi ->GetInnerParam(); // Do not use GetTPCInnerWall\r
+ const AliExternalTrackParam *nInnerWallTrackXi = nTrackXi ->GetInnerParam();\r
+ const AliExternalTrackParam *bachInnerWallTrackXi = bachTrackXi ->GetInnerParam();\r
+ if(pInnerWallTrackXi && nInnerWallTrackXi && bachInnerWallTrackXi ){ \r
+ Double_t pMomInnerWall = pInnerWallTrackXi ->GetP();\r
+ Double_t nMomInnerWall = nInnerWallTrackXi ->GetP();\r
+ Double_t bachMomInnerWall = bachInnerWallTrackXi->GetP();\r
+ // Bachelor\r
+ if (TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 3) lIsBachelorPionForTPC = kTRUE;\r
+ if (bachMomInnerWall < 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 5) lIsBachelorKaonForTPC = kTRUE;\r
+ if (bachMomInnerWall > 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 3) lIsBachelorKaonForTPC = kTRUE;\r
+ // Negative V0 daughter\r
+ if (TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 3 ) lIsNegPionForTPC = kTRUE;\r
+ if (nMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 5 ) lIsNegProtonForTPC = kTRUE;\r
+ if (nMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 3 ) lIsNegProtonForTPC = kTRUE;\r
+ // Positive V0 daughter\r
+ if (TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 3 ) lIsPosPionForTPC = kTRUE;\r
+ if (pMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 5) lIsPosProtonForTPC = kTRUE;\r
+ if (pMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 3) lIsPosProtonForTPC = kTRUE;\r
+ }*/\r
+ // - PID proba Vs Pt(Bach)\r
+ Int_t lblBachForPID = (Int_t) TMath::Abs( bachTrackXi->GetLabel() );\r
+ TParticle* mcBachForPID = lMCstack->Particle( lblBachForPID );\r
+ lmcPtBach = mcBachForPID->Pt();\r
+ // - MC perfect PID\r
+ if( mcBachForPID->GetPdgCode() == -211) lIsBachelorMCPiMinus = kTRUE;\r
+ if( mcBachForPID->GetPdgCode() == 211) lIsBachelorMCPiPlus = kTRUE;\r
+ if( mcBachForPID->GetPdgCode() == -321) lIsBachelorMCKMinus = kTRUE;\r
+ if( mcBachForPID->GetPdgCode() == 321) lIsBachelorMCKPlus = kTRUE;\r
+ \r
+ \r
+ //---------------------------------------------------------------\r
+ // - MC association (care : lots of "continue;" below this line)\r
+ if(fDebug > 5) cout<< "MC EventNumber: "<<lMCevent->Header()->GetEvent()<<" / MC event Number in Run : "<<lMCevent->Header()->GetEventNrInRun()<<endl;\r
+ // - Level of the V0 daughters\r
+ Int_t lblPosV0Dghter = (Int_t) TMath::Abs( pTrackXi->GetLabel() ); \r
+ Int_t lblNegV0Dghter = (Int_t) TMath::Abs( nTrackXi->GetLabel() ); \r
+ TParticle* mcPosV0Dghter = lMCstack->Particle( lblPosV0Dghter );\r
+ TParticle* mcNegV0Dghter = lMCstack->Particle( lblNegV0Dghter );\r
+ // - Level of the Xi daughters \r
+ Int_t lblMotherPosV0Dghter = mcPosV0Dghter->GetFirstMother() ; \r
+ Int_t lblMotherNegV0Dghter = mcNegV0Dghter->GetFirstMother();\r
+ if( lblMotherPosV0Dghter != lblMotherNegV0Dghter) continue; // same mother\r
+ if( lblMotherPosV0Dghter < 0 ) continue; // this particle is primary, no mother \r
+ if( lblMotherNegV0Dghter < 0 ) continue; // this particle is primary, no mother\r
+ // mothers = Lambda candidate ... a priori\r
+ TParticle* mcMotherPosV0Dghter = lMCstack->Particle( lblMotherPosV0Dghter );\r
+ TParticle* mcMotherNegV0Dghter = lMCstack->Particle( lblMotherNegV0Dghter ); // MN: redundant?? already checked that labels are the same...-->same part from stack\r
+ Int_t lblBach = (Int_t) TMath::Abs( bachTrackXi->GetLabel() );\r
+ TParticle* mcBach = lMCstack->Particle( lblBach ); \r
+ // - Level of Xi candidate\r
+ Int_t lblGdMotherPosV0Dghter = mcMotherPosV0Dghter->GetFirstMother() ;\r
+ Int_t lblGdMotherNegV0Dghter = mcMotherNegV0Dghter->GetFirstMother() ;\r
+ if( lblGdMotherPosV0Dghter != lblGdMotherNegV0Dghter ) continue;\r
+ if( lblGdMotherPosV0Dghter < 0 ) continue; // primary lambda ... \r
+ if( lblGdMotherNegV0Dghter < 0 ) continue; // primary lambda ... \r
+ // Gd mothers = Xi candidate ... a priori\r
+ TParticle* mcGdMotherPosV0Dghter = lMCstack->Particle( lblGdMotherPosV0Dghter );\r
+ TParticle* mcGdMotherNegV0Dghter = lMCstack->Particle( lblGdMotherNegV0Dghter ); \r
+ Int_t lblMotherBach = (Int_t) TMath::Abs( mcBach->GetFirstMother() ); \r
+ if( lblMotherBach != lblGdMotherPosV0Dghter ) continue; //same mother for bach and V0 daughters\r
+ TParticle* mcMotherBach = lMCstack->Particle( lblMotherBach );\r
+ \r
+ // - Check if cascade is primary\r
+ if (!(lMCstack->IsPhysicalPrimary(lblMotherBach))) continue; \r
+\r
+ // - Manage boolean for association\r
+ if ( mcMotherBach ->GetPdgCode() == 3312 &&\r
+ mcGdMotherPosV0Dghter ->GetPdgCode() == 3312 &&\r
+ mcGdMotherNegV0Dghter ->GetPdgCode() == 3312 ) {lAssoXiMinus = kTRUE;\r
+ cascadeMass = 1.321;\r
+ nAssoXiMinus++; }\r
+ else if( mcMotherBach ->GetPdgCode() == -3312 &&\r
+ mcGdMotherPosV0Dghter ->GetPdgCode() == -3312 &&\r
+ mcGdMotherNegV0Dghter ->GetPdgCode() == -3312 ) {lAssoXiPlus = kTRUE;\r
+ cascadeMass = 1.321;\r
+ nAssoXiPlus++; }\r
+ else if( mcMotherBach ->GetPdgCode() == 3334 &&\r
+ mcGdMotherPosV0Dghter ->GetPdgCode() == 3334 &&\r
+ mcGdMotherNegV0Dghter ->GetPdgCode() == 3334 ) {lAssoOmegaMinus = kTRUE;\r
+ cascadeMass = 1.672;\r
+ nAssoOmegaMinus++; }\r
+ else if( mcMotherBach ->GetPdgCode() == -3334 &&\r
+ mcGdMotherPosV0Dghter ->GetPdgCode() == -3334 &&\r
+ mcGdMotherNegV0Dghter ->GetPdgCode() == -3334 ) {lAssoOmegaPlus = kTRUE;\r
+ cascadeMass = 1.672;\r
+ nAssoOmegaPlus++; }\r
+ // If a proper association exists ... \r
+ if(fDebug > 4){\r
+ cout<<"XiMinus = "<<lAssoXiMinus <<endl;\r
+ cout<<"XiPlus = "<<lAssoXiPlus <<endl;\r
+ cout<<"OmegaMinus = "<<lAssoOmegaMinus<<endl;\r
+ cout<<"OmegaPlus = "<<lAssoOmegaPlus <<endl \r
+ <<"----" <<endl; \r
+ }\r
+ if(fDebug > 5){\r
+ cout<<endl;\r
+ cout<<"- V0 daughters - "<<endl;\r
+ cout<<" + V0 Pos. / Label : "<<lblPosV0Dghter<<" - Pdg Code : "<<mcPosV0Dghter->GetTitle()<<endl;\r
+ cout<<" - V0 Neg. / Label : "<<lblNegV0Dghter<<" - Pdg Code : "<<mcNegV0Dghter->GetTitle()<<endl;\r
+\r
+ cout<<"- Xi daughters - "<<endl;\r
+ cout<<" + V0 Pos. mother / Label : "<<lblMotherPosV0Dghter<<" - Pdg Code : "<<mcMotherPosV0Dghter->GetTitle()<<endl;\r
+ cout<<" - V0 Neg. mother / Label : "<<lblMotherNegV0Dghter<<" - Pdg Code : "<<mcMotherNegV0Dghter->GetTitle()<<endl;\r
+ \r
+ cout<<" -- Bach. / Label :"<<lblBach<<" - Pdg Code : "<<mcBach->GetTitle()<<endl;\r
+ \r
+ cout<<"- Xi candidate -"<<endl;\r
+ cout<<" + V0 Pos. Gd Mother / Label : "<<lblGdMotherPosV0Dghter<<" - Pdg Code : "<< mcGdMotherPosV0Dghter->GetTitle()<<endl;\r
+ cout<<" - V0 Neg. Gd Mother / Label : "<<lblGdMotherNegV0Dghter<<" - Pdg Code : "<< mcGdMotherNegV0Dghter->GetTitle()<<endl;\r
+ \r
+ cout<<" -- Mother Bach. / Label : "<<lblMotherBach<<" - Pdg Code : "<<mcMotherBach->GetTitle()<<endl;\r
+ cout<<endl;\r
+ }\r
+ \r
+ lmcPt = mcMotherBach->Pt();\r
+ lmcRapCasc = 0.5*TMath::Log( (mcMotherBach->Energy() + mcMotherBach->Pz()) / (mcMotherBach->Energy() - mcMotherBach->Pz() +1.e-13) );\r
+ lmcEta = mcMotherBach->Eta();\r
+ lmcTransvRadius = mcBach->R(); // to get the decay point of Xi, = the production vertex of Bachelor ...\r
+ TVector3 lmcTVect3Mom( mcMotherBach->Px(), mcMotherBach->Py(), mcMotherBach->Pz() );\r
+ lrecoPt = xiESD->Pt();\r
+ lrecoTransvRadius = TMath::Sqrt( xiESD->Xv() * xiESD->Xv() + xiESD->Yv() * xiESD->Yv() );\r
+ TVector3 lrecoTVect3Mom( xiESD->Px(), xiESD->Py(), xiESD->Pz() );\r
+ lDeltaPhiMcReco = lmcTVect3Mom.DeltaPhi( lrecoTVect3Mom ) * 180.0/TMath::Pi();\r
+ lmcPtPosV0Dghter = mcPosV0Dghter->Pt() ;\r
+ lmcPtNegV0Dghter = mcNegV0Dghter->Pt();\r
+ lrecoP = xiESD->P();\r
+ Double_t nV0mom[3] = {0. ,0. ,0. };\r
+ Double_t pV0mom[3] = {0. ,0. ,0. };\r
+ xiESD->GetNPxPyPz(nV0mom[0],nV0mom[1],nV0mom[2]); \r
+ xiESD->GetPPxPyPz(pV0mom[0],pV0mom[1],pV0mom[2]);\r
+ lV0mom = TMath::Sqrt(TMath::Power(nV0mom[0]+pV0mom[0],2)+TMath::Power(nV0mom[1]+pV0mom[1],2)+TMath::Power(nV0mom[2]+pV0mom[2],2));\r
+ Double_t lBachMomX = 0.; Double_t lBachMomY = 0.; Double_t lBachMomZ = 0.;\r
+ xiESD->GetBPxPyPz( lBachMomX, lBachMomY, lBachMomZ );\r
+ lBachTransvMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY );\r
+ lnTrackTransvMom = TMath::Sqrt( nV0mom[0]*nV0mom[0] + nV0mom[1]*nV0mom[1] );\r
+ lpTrackTransvMom = TMath::Sqrt( pV0mom[0]*pV0mom[0] + pV0mom[1]*pV0mom[1] );\r
+ \r
+ } else if ( fAnalysisType == "AOD" ) {\r
+\r
+ // - Load the cascade\r
+ const AliAODcascade *xiAOD = lAODevent->GetCascade(iXi);\r
+ if (!xiAOD) continue;\r
+\r
+ // - Connection to daughter tracks of the current cascade\r
+ AliAODTrack *pTrackXi = dynamic_cast<AliAODTrack*>( xiAOD->GetDaughter(0) );\r
+ AliAODTrack *nTrackXi = dynamic_cast<AliAODTrack*>( xiAOD->GetDaughter(1) );\r
+ AliAODTrack *bachTrackXi = dynamic_cast<AliAODTrack*>( xiAOD->GetDecayVertexXi()->GetDaughter(0) );\r
+ if (!pTrackXi || !nTrackXi || !bachTrackXi ) {\r
+ AliWarning("ERROR: Could not retrieve one of the 3 AOD daughter tracks of the cascade ...");\r
+ continue;\r
+ }\r
+ UInt_t lIdxPosXi = (UInt_t) TMath::Abs( pTrackXi->GetID() );\r
+ UInt_t lIdxNegXi = (UInt_t) TMath::Abs( nTrackXi->GetID() );\r
+ UInt_t lBachIdx = (UInt_t) TMath::Abs( bachTrackXi->GetID() );\r
+\r
+ // - Rejection of a double use of a daughter track (nothing but just a crosscheck of what is done in the cascade vertexer)\r
+ if(lBachIdx == lIdxNegXi) {\r
+ AliWarning("Pb / Idx(Bach. track) = Idx(Neg. track) ... continue!"); continue;\r
+ }\r
+ if(lBachIdx == lIdxPosXi) {\r
+ AliWarning("Pb / Idx(Bach. track) = Idx(Pos. track) ... continue!"); continue;\r
+ }\r
+ lPosTPCClusters = pTrackXi->GetTPCNcls();\r
+ lNegTPCClusters = nTrackXi->GetTPCNcls();\r
+ lBachTPCClusters = bachTrackXi->GetTPCNcls();\r
+\r
+ // - Rejection of a poor quality tracks\r
+ if (fkQualityCutTPCrefit) {\r
+ // - Poor quality related to TPCrefit\r
+ if (!(pTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / V0 Pos. track has no TPCrefit ... continue!"); continue; }\r
+ if (!(nTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / V0 Neg. track has no TPCrefit ... continue!"); continue; }\r
+ if (!(bachTrackXi->IsOn(AliAODTrack::kTPCrefit))) { AliWarning("Pb / Bach. track has no TPCrefit ... continue!"); continue; }\r
+ }\r
+ if (fkQualityCutnTPCcls) {\r
+ // - Poor quality related to TPC clusters\r
+ if(lPosTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Pos. track has less than 80 TPC clusters ... continue!"); continue; }\r
+ if(lNegTPCClusters < fMinnTPCcls) { AliWarning("Pb / V0 Neg. track has less than 80 TPC clusters ... continue!"); continue; }\r
+ if(lBachTPCClusters < fMinnTPCcls) { AliWarning("Pb / Bach. track has less than 80 TPC clusters ... continue!"); continue; }\r
+ }\r
+\r
+ etaPos = pTrackXi->Eta();\r
+ etaNeg = nTrackXi->Eta();\r
+ etaBach = bachTrackXi->Eta();\r
+\r
+ // - Info over reconstructed cascades\r
+ if( bachTrackXi->Charge() < 0 ) {\r
+ lInvMassXiMinus = xiAOD->MassXi();\r
+ lInvMassOmegaMinus = xiAOD->MassOmega();\r
+ }\r
+ if( bachTrackXi->Charge() > 0 ){\r
+ lInvMassXiPlus = xiAOD->MassXi();\r
+ lInvMassOmegaPlus = xiAOD->MassOmega();\r
+ }\r
+ lDcaXiDaughters = xiAOD->DcaXiDaughters();\r
+ lDcaBachToPrimVertexXi = xiAOD->DcaBachToPrimVertex();\r
+ lXiCosineOfPointingAngle = xiAOD->CosPointingAngleXi( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lBestPrimaryVtxPos[2] );\r
+ lPosXi[0] = xiAOD->DecayVertexXiX();\r
+ lPosXi[1] = xiAOD->DecayVertexXiY();\r
+ lPosXi[2] = xiAOD->DecayVertexXiZ();\r
+ lInvMassLambdaAsCascDghter = xiAOD->MassLambda();\r
+ lDcaV0DaughtersXi = xiAOD->DcaV0Daughters();\r
+ lV0CosineOfPointingAngleXi = xiAOD->CosPointingAngle( lPosXi );\r
+ lV0CosineOfPointingAngle = xiAOD->CosPointingAngle( lBestPrimaryVtxPos );\r
+ lPosV0Xi[0] = xiAOD->DecayVertexV0X();\r
+ lPosV0Xi[1] = xiAOD->DecayVertexV0Y();\r
+ lPosV0Xi[2] = xiAOD->DecayVertexV0Z();\r
+ lDcaV0ToPrimVertexXi = xiAOD->DcaV0ToPrimVertex();\r
+ lDcaPosToPrimVertexXi = xiAOD->DcaPosToPrimVertex();\r
+ lDcaNegToPrimVertexXi = xiAOD->DcaNegToPrimVertex();\r
+ lChargeXi = xiAOD->ChargeXi();\r
+\r
+ //------------------\r
+ // - PID Information\r
+ // Combined VO-positive-daughter PID\r
+ // Combined bachelor PID\r
+ /* \r
+ AliPID bachPidXi; bachPidXi.SetPriors( lPriorsGuessXi );\r
+ AliPID bachPidOmega; bachPidOmega.SetPriors( lPriorsGuessOmega );\r
+\r
+ if ( bachTrackXi->IsOn(AliESDtrack::kESDpid) ) { // Combined PID exists\r
+ Double_t r[10] = {0.}; bachTrackXi->GetESDpid(r);\r
+ bachPidXi.SetProbabilities(r);\r
+ bachPidOmega.SetProbabilities(r);\r
+ // Check if the bachelor track is a pion\r
+ ppionBach = bachPidXi.GetProbability(AliPID::kPion);\r
+ if (ppionBach > bachPidXi.GetProbability(AliPID::kElectron) &&\r
+ ppionBach > bachPidXi.GetProbability(AliPID::kMuon) &&\r
+ ppionBach > bachPidXi.GetProbability(AliPID::kKaon) &&\r
+ ppionBach > bachPidXi.GetProbability(AliPID::kProton) ) lIsBachelorPion = kTRUE;\r
+ // Check if the bachelor track is a kaon\r
+ pkaonBach = bachPidOmega.GetProbability(AliPID::kKaon);\r
+ if (pkaonBach > bachPidOmega.GetProbability(AliPID::kElectron) &&\r
+ pkaonBach > bachPidOmega.GetProbability(AliPID::kMuon) &&\r
+ pkaonBach > bachPidOmega.GetProbability(AliPID::kPion) &&\r
+ pkaonBach > bachPidOmega.GetProbability(AliPID::kProton) ) lIsBachelorKaon = kTRUE;\r
+ }// end if bachelor track with existing combined PID\r
+ */\r
+\r
+ // - TPC PID: 4-sigma bands on Bethe-Bloch curve\r
+ // Bachelor\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 4) lIsBachelorKaonForTPC = kTRUE;\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 4) lIsBachelorPionForTPC = kTRUE;\r
+ // Negative V0 daughter\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 4) lIsNegPionForTPC = kTRUE;\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( nTrackXi,AliPID::kProton )) < 4) lIsNegProtonForTPC = kTRUE;\r
+ // Positive V0 daughter\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 4) lIsPosPionForTPC = kTRUE;\r
+ if (TMath::Abs(fPIDResponse->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 4) lIsPosProtonForTPC = kTRUE;\r
+ /*\r
+ const AliExternalTrackParam *pInnerWallTrackXi = pTrackXi ->GetInnerParam(); // Do not use GetTPCInnerWall\r
+ const AliExternalTrackParam *nInnerWallTrackXi = nTrackXi ->GetInnerParam();\r
+ const AliExternalTrackParam *bachInnerWallTrackXi = bachTrackXi ->GetInnerParam();\r
+ if(pInnerWallTrackXi && nInnerWallTrackXi && bachInnerWallTrackXi ){\r
+ Double_t pMomInnerWall = pInnerWallTrackXi ->GetP();\r
+ Double_t nMomInnerWall = nInnerWallTrackXi ->GetP();\r
+ Double_t bachMomInnerWall = bachInnerWallTrackXi->GetP();\r
+ // Bachelor\r
+ if (TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 3) lIsBachelorPionForTPC = kTRUE;\r
+ if (bachMomInnerWall < 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 5) lIsBachelorKaonForTPC = kTRUE;\r
+ if (bachMomInnerWall > 0.350 && TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 3) lIsBachelorKaonForTPC = kTRUE;\r
+ // Negative V0 daughter\r
+ if (TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 3 ) lIsNegPionForTPC = kTRUE;\r
+ if (nMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 5 ) lIsNegProtonForTPC = kTRUE;\r
+ if (nMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton ) ) < 3 ) lIsNegProtonForTPC = kTRUE;\r
+ // Positive V0 daughter\r
+ if (TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 3 ) lIsPosPionForTPC = kTRUE;\r
+ if (pMomInnerWall < 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 5) lIsPosProtonForTPC = kTRUE;\r
+ if (pMomInnerWall > 0.6 && TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 3) lIsPosProtonForTPC = kTRUE;\r
+ }*/\r
+\r
+ // - PID proba Vs Pt(Bach)\r
+ Int_t lblBachForPID = (Int_t) TMath::Abs( bachTrackXi->GetLabel() );\r
+ AliAODMCParticle* mcBachForPID = (AliAODMCParticle*) arrayMC->At( lblBachForPID );\r
+ lmcPtBach = mcBachForPID->Pt();\r
+\r
+ // - MC perfect PID\r
+ if( mcBachForPID->PdgCode() == -211) lIsBachelorMCPiMinus = kTRUE;\r
+ if( mcBachForPID->PdgCode() == 211) lIsBachelorMCPiPlus = kTRUE;\r
+ if( mcBachForPID->PdgCode() == -321) lIsBachelorMCKMinus = kTRUE;\r
+ if( mcBachForPID->PdgCode() == 321) lIsBachelorMCKPlus = kTRUE;\r
+\r
+ //--------------------------------------------------------------\r
+ // - MC association (care : lots of "continue;" below this line)\r
+ if(fDebug > 5) cout<<"MC EventNumber : "<<lMCevent->Header()->GetEvent()<<" / MC event Number in Run : "<<lMCevent->Header()->GetEventNrInRun()<<endl;\r
+ // - Level of the V0 daughters\r
+ Int_t lblPosV0Dghter = (Int_t) TMath::Abs( pTrackXi->GetLabel() );\r
+ Int_t lblNegV0Dghter = (Int_t) TMath::Abs( nTrackXi->GetLabel() );\r
+ AliAODMCParticle* mcPosV0Dghter = (AliAODMCParticle*) arrayMC->At( lblPosV0Dghter );\r
+ AliAODMCParticle* mcNegV0Dghter = (AliAODMCParticle*) arrayMC->At( lblNegV0Dghter );\r
+ // - Level of the Xi daughters\r
+ Int_t lblMotherPosV0Dghter = mcPosV0Dghter->GetMother(); \r
+ Int_t lblMotherNegV0Dghter = mcNegV0Dghter->GetMother();\r
+ if( lblMotherPosV0Dghter != lblMotherNegV0Dghter) continue; // same mother\r
+ if( lblMotherPosV0Dghter < 0 ) continue; // this particle is primary, no mother\r
+ if( lblMotherNegV0Dghter < 0 ) continue; // this particle is primary, no mother\r
+ // mothers = Lambda candidate ... a priori\r
+ AliAODMCParticle* mcMotherPosV0Dghter = (AliAODMCParticle*) arrayMC->At( lblMotherPosV0Dghter );\r
+ AliAODMCParticle* mcMotherNegV0Dghter = (AliAODMCParticle*) arrayMC->At( lblMotherNegV0Dghter ); \r
+ Int_t lblBach = (Int_t) TMath::Abs( bachTrackXi->GetLabel() );\r
+ AliAODMCParticle* mcBach = (AliAODMCParticle*) arrayMC->At( lblBach );\r
+ // - Level of Xi candidate\r
+ Int_t lblGdMotherPosV0Dghter = mcMotherPosV0Dghter->GetMother() ;\r
+ Int_t lblGdMotherNegV0Dghter = mcMotherNegV0Dghter->GetMother() ;\r
+ if( lblGdMotherPosV0Dghter != lblGdMotherNegV0Dghter ) continue;\r
+ if( lblGdMotherPosV0Dghter < 0 ) continue; // primary lambda ...\r
+ if( lblGdMotherNegV0Dghter < 0 ) continue; // primary lambda ...\r
+ // Gd mothers = Xi candidate ... a priori\r
+ AliAODMCParticle* mcGdMotherPosV0Dghter = (AliAODMCParticle*) arrayMC->At( lblGdMotherPosV0Dghter );\r
+ AliAODMCParticle* mcGdMotherNegV0Dghter = (AliAODMCParticle*) arrayMC->At( lblGdMotherNegV0Dghter );\r
+ Int_t lblMotherBach = (Int_t) TMath::Abs( mcBach->GetMother() );\r
+ if( lblMotherBach != lblGdMotherPosV0Dghter ) continue; //same mother for bach and V0 daughters\r
+ AliAODMCParticle* mcMotherBach = (AliAODMCParticle*) arrayMC->At( lblMotherBach );\r
+\r
+ // - Check if cascade is primary\r
+ if (!(mcMotherBach->IsPhysicalPrimary())) continue;\r
+\r
+ // - Manage boolean for association\r
+ if ( mcMotherBach ->GetPdgCode() == 3312 &&\r
+ mcGdMotherPosV0Dghter ->GetPdgCode() == 3312 &&\r
+ mcGdMotherNegV0Dghter ->GetPdgCode() == 3312 ) {lAssoXiMinus = kTRUE;\r
+ cascadeMass = 1.321;\r
+ nAssoXiMinus++; }\r
+ else if( mcMotherBach ->GetPdgCode() == -3312 &&\r
+ mcGdMotherPosV0Dghter ->GetPdgCode() == -3312 &&\r
+ mcGdMotherNegV0Dghter ->GetPdgCode() == -3312 ) {lAssoXiPlus = kTRUE;\r
+ cascadeMass = 1.321;\r
+ nAssoXiPlus++; }\r
+ else if( mcMotherBach ->GetPdgCode() == 3334 &&\r
+ mcGdMotherPosV0Dghter ->GetPdgCode() == 3334 &&\r
+ mcGdMotherNegV0Dghter ->GetPdgCode() == 3334 ) {lAssoOmegaMinus = kTRUE;\r
+ cascadeMass = 1.672;\r
+ nAssoOmegaMinus++; }\r
+ else if( mcMotherBach ->GetPdgCode() == -3334 &&\r
+ mcGdMotherPosV0Dghter ->GetPdgCode() == -3334 &&\r
+ mcGdMotherNegV0Dghter ->GetPdgCode() == -3334 ) {lAssoOmegaPlus = kTRUE;\r
+ cascadeMass = 1.672;\r
+ nAssoOmegaPlus++; }\r
+\r
+ lmcPt = mcMotherBach->Pt();\r
+ lmcRapCasc = 0.5*TMath::Log( (mcMotherBach->E() + mcMotherBach->Pz()) / (mcMotherBach->E() - mcMotherBach->Pz() +1.e-13) );\r
+ lmcEta = mcMotherBach->Eta();\r
+ Float_t decayCascX = mcBach->Xv();\r
+ Float_t decayCascY = mcBach->Yv();\r
+ lmcTransvRadius = TMath::Sqrt(decayCascX*decayCascX+decayCascY*decayCascY); // decay point of Xi, = the production vertex of Bachelor ...\r
+ TVector3 lmcTVect3Mom( mcMotherBach->Px(), mcMotherBach->Py(), mcMotherBach->Pz() );\r
+ Double_t xiMomX = xiAOD->MomXiX();\r
+ Double_t xiMomY = xiAOD->MomXiY();\r
+ Double_t xiMomZ = xiAOD->MomXiZ();\r
+ lrecoPt = TMath::Sqrt( xiMomX*xiMomX + xiMomY*xiMomY ); \r
+ lrecoTransvRadius = TMath::Sqrt( xiAOD->DecayVertexXiX() * xiAOD->DecayVertexXiX() + xiAOD->DecayVertexXiY() * xiAOD->DecayVertexXiY() );\r
+ TVector3 lrecoTVect3Mom( xiMomX, xiMomY, xiMomZ );\r
+ lDeltaPhiMcReco = lmcTVect3Mom.DeltaPhi( lrecoTVect3Mom ) * 180.0/TMath::Pi();\r
+ lmcPtPosV0Dghter = mcPosV0Dghter->Pt() ;\r
+ lmcPtNegV0Dghter = mcNegV0Dghter->Pt();\r
+ lrecoP = TMath::Sqrt( xiMomX*xiMomX + xiMomY*xiMomY + xiMomZ*xiMomZ );;\r
+ Double_t lV0momX = xiAOD->MomV0X();\r
+ Double_t lV0momY = xiAOD->MomV0Y();\r
+ Double_t lV0momZ = xiAOD->MomV0Z();\r
+ lV0mom = TMath::Sqrt(TMath::Power(lV0momX,2)+TMath::Power(lV0momY,2)+TMath::Power(lV0momZ,2));\r
+ Double_t lBachMomX = xiAOD->MomBachX();\r
+ Double_t lBachMomY = xiAOD->MomBachY();\r
+ lBachTransvMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY );\r
+ Double_t lV0NMomX = xiAOD->MomNegX();\r
+ Double_t lV0NMomY = xiAOD->MomNegY();\r
+ Double_t lV0PMomX = xiAOD->MomPosX();\r
+ Double_t lV0PMomY = xiAOD->MomPosY();\r
+ lnTrackTransvMom = TMath::Sqrt( lV0NMomX*lV0NMomX + lV0NMomY*lV0NMomY );\r
+ lpTrackTransvMom = TMath::Sqrt( lV0PMomX*lV0PMomX + lV0PMomY*lV0PMomY );\r
+ \r
+ }\r
+\r
+ lXiRadius = TMath::Sqrt( lPosXi[0]*lPosXi[0] + lPosXi[1]*lPosXi[1] );\r
+ lV0RadiusXi = TMath::Sqrt( lPosV0Xi[0]*lPosV0Xi[0] + lPosV0Xi[1]*lPosV0Xi[1] ); \r
+\r
+ // - Cut on pt of the three daughter tracks\r
+ if (lBachTransvMom<fMinPtCutOnDaughterTracks) continue;\r
+ if (lpTrackTransvMom<fMinPtCutOnDaughterTracks) continue;\r
+ if (lnTrackTransvMom<fMinPtCutOnDaughterTracks) continue;\r
+ \r
+ // - Cut on pseudorapidity of the three daughter tracks\r
+ if (TMath::Abs(etaBach)>fEtaCutOnDaughterTracks) continue;\r
+ if (TMath::Abs(etaPos)>fEtaCutOnDaughterTracks) continue;\r
+ if (TMath::Abs(etaNeg)>fEtaCutOnDaughterTracks) continue;\r
+ \r
+ // - Extra-selection for cascade candidates\r
+ if (fkExtraSelections) {\r
+ if (lDcaXiDaughters > 0.3) continue; // in AliCascadeVertexer\r
+ if (lXiCosineOfPointingAngle < 0.999 ) continue; // in AliCascadeVertexer\r
+ if (lDcaV0ToPrimVertexXi < 0.05) continue; // in AliCascadeVertexer\r
+ if (lDcaBachToPrimVertexXi < 0.03) continue; // in AliCascadeVertexer\r
+ if (lDcaV0DaughtersXi > 1.) continue; // in AliV0vertexer\r
+ if (lV0CosineOfPointingAngleXi < 0.998) continue; // in AliV0vertexer\r
+ if (lDcaPosToPrimVertexXi < 0.1) continue; // in AliV0vertexer\r
+ if (lDcaNegToPrimVertexXi < 0.1) continue; // in AliV0vertexer\r
+ if(lXiRadius < .9) continue; // in AliCascadeVertexer\r
+ if(lV0RadiusXi < 0.9) continue; // in AliV0vertexer\r
+ }\r
+\r
+ //-------------------------\r
+ // - Fill combined PID TH1s\r
+ if( lChargeXi < 0 && lIsBachelorPion ) fHistMassWithCombPIDXiMinus ->Fill( lInvMassXiMinus );\r
+ if( lChargeXi > 0 && lIsBachelorPion ) fHistMassWithCombPIDXiPlus ->Fill( lInvMassXiPlus );\r
+ if( lChargeXi < 0 && lIsBachelorKaon ) fHistMassWithCombPIDOmegaMinus ->Fill( lInvMassOmegaMinus );\r
+ if( lChargeXi > 0 && lIsBachelorKaon ) fHistMassWithCombPIDOmegaPlus ->Fill( lInvMassOmegaPlus );\r
+ if( lChargeXi < 0 ) fHistMassXiMinus ->Fill( lInvMassXiMinus );\r
+ if( lChargeXi > 0 ) fHistMassXiPlus ->Fill( lInvMassXiPlus );\r
+ if( lChargeXi < 0 ) fHistMassOmegaMinus ->Fill( lInvMassOmegaMinus );\r
+ if( lChargeXi > 0 ) fHistMassOmegaPlus ->Fill( lInvMassOmegaPlus );\r
+ if(lIsBachelorPion) f2dHistPIDprobaPionVsMCPtBach->Fill( lmcPtBach, ppionBach );\r
+ if(lIsBachelorKaon) f2dHistPIDprobaKaonVsMCPtBach->Fill( lmcPtBach, pkaonBach );\r
+ if( lChargeXi < 0 && lIsBachelorMCPiMinus ) fHistMassWithMcPIDXiMinus ->Fill( lInvMassXiMinus );\r
+ if( lChargeXi > 0 && lIsBachelorMCPiPlus ) fHistMassWithMcPIDXiPlus ->Fill( lInvMassXiPlus );\r
+ if( lChargeXi < 0 && lIsBachelorMCKMinus ) fHistMassWithMcPIDOmegaMinus ->Fill( lInvMassOmegaMinus );\r
+ if( lChargeXi > 0 && lIsBachelorMCKPlus ) fHistMassWithMcPIDOmegaPlus ->Fill( lInvMassOmegaPlus );\r
+\r
+\r
+ // - No association, skip the rest of the code\r
+ if(!lAssoXiMinus && !lAssoXiPlus && !lAssoOmegaMinus && !lAssoOmegaPlus) continue; \r
+\r
+ //--------------\r
+ // - Proper time \r
+ // For cascade (reconstructed) \r
+ 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));\r
+ if (lrecoP!=0) lctau = lctau*cascadeMass/lrecoP; \r
+ else lctau = -1.;\r
+ // For Lambda (reconstructed)\r
+ Float_t lambdaMass = 1.115683; // PDG mass \r
+ 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)); \r
+ Float_t lctauV0 = -1.;\r
+ if (lV0mom!=0) lctauV0 = distV0Xi*lambdaMass/lV0mom; \r
+ // Distance\r
+ Float_t distTV0Xi = TMath::Sqrt(TMath::Power((lPosV0Xi[0]-lPosXi[0]),2)+TMath::Power((lPosV0Xi[1]-lPosXi[1]),2));\r
+ \r
+ //------------------------------------------------------------\r
+ // - Fill histos for the cascade candidates associated with MC\r
+ if( lChargeXi < 0 && lAssoXiMinus){ \r
+ fHistAsMCMassXiMinus ->Fill( lInvMassXiMinus );\r
+ if(lIsBachelorPion) f2dHistAsMCandCombPIDGenPtVsGenYXiMinus->Fill( lmcPt, lmcRapCasc );\r
+ f2dHistAsMCGenPtVsGenYXiMinus ->Fill( lmcPt, lmcRapCasc);\r
+ fHistAsMCGenEtaXiMinus ->Fill( lmcEta );\r
+ f2dHistAsMCResPtXiMinus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt );\r
+ f2dHistAsMCResRXiMinus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius );\r
+ f2dHistAsMCResPhiXiMinus ->Fill( lmcPt, lDeltaPhiMcReco );\r
+ f2dHistAsMCptProtonMCptXiMinus->Fill(lmcPt,lmcPtPosV0Dghter);\r
+ fHistV0CosineOfPointingAnglevsPtXi->Fill(lmcPt,lV0CosineOfPointingAngle);\r
+ } \r
+ else if( lChargeXi > 0 && lAssoXiPlus){ \r
+ fHistAsMCMassXiPlus ->Fill( lInvMassXiPlus );\r
+ if(lIsBachelorPion) f2dHistAsMCandCombPIDGenPtVsGenYXiPlus->Fill( lmcPt, lmcRapCasc );\r
+ f2dHistAsMCGenPtVsGenYXiPlus ->Fill( lmcPt, lmcRapCasc);\r
+ fHistAsMCGenEtaXiPlus ->Fill( lmcEta );\r
+ f2dHistAsMCResPtXiPlus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt );\r
+ f2dHistAsMCResRXiPlus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius );\r
+ f2dHistAsMCResPhiXiPlus ->Fill( lmcPt, lDeltaPhiMcReco );\r
+ f2dHistAsMCptAntiprotonMCptXiPlus->Fill(lmcPt,lmcPtNegV0Dghter);\r
+ fHistV0CosineOfPointingAnglevsPtXi->Fill(lmcPt,lV0CosineOfPointingAngle);\r
+ }\r
+ else if( lChargeXi < 0 && lAssoOmegaMinus){ \r
+ fHistAsMCMassOmegaMinus ->Fill( lInvMassOmegaMinus );\r
+ if(lIsBachelorKaon) f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus->Fill( lmcPt, lmcRapCasc );\r
+ f2dHistAsMCGenPtVsGenYOmegaMinus ->Fill( lmcPt, lmcRapCasc );\r
+ fHistAsMCGenEtaOmegaMinus ->Fill( lmcEta );\r
+ f2dHistAsMCResPtOmegaMinus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt );\r
+ f2dHistAsMCResROmegaMinus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius );\r
+ f2dHistAsMCResPhiOmegaMinus ->Fill( lmcPt, lDeltaPhiMcReco );\r
+ f2dHistAsMCptProtonMCptOmegaMinus->Fill(lmcPt,lmcPtPosV0Dghter);\r
+ fHistV0CosineOfPointingAnglevsPtOmega->Fill(lmcPt,lV0CosineOfPointingAngle);\r
+ } \r
+ else if( lChargeXi > 0 && lAssoOmegaPlus){ \r
+ fHistAsMCMassOmegaPlus ->Fill( lInvMassOmegaPlus );\r
+ if(lIsBachelorKaon) f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus->Fill( lmcPt, lmcRapCasc );\r
+ f2dHistAsMCGenPtVsGenYOmegaPlus ->Fill( lmcPt, lmcRapCasc );\r
+ fHistAsMCGenEtaOmegaPlus ->Fill( lmcEta );\r
+ f2dHistAsMCResPtOmegaPlus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt );\r
+ f2dHistAsMCResROmegaPlus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius );\r
+ f2dHistAsMCResPhiOmegaPlus ->Fill( lmcPt, lDeltaPhiMcReco );\r
+ f2dHistAsMCptAntiprotonMCptOmegaPlus->Fill(lmcPt,lmcPtNegV0Dghter);\r
+ fHistV0CosineOfPointingAnglevsPtOmega->Fill(lmcPt,lV0CosineOfPointingAngle);\r
+ }\r
+ fHistV0toXiCosineOfPointingAngle->Fill(lV0CosineOfPointingAngleXi);\r
+\r
+ //------------------ \r
+ // - Fill containers\r
+ \r
+ // - Filling the AliCFContainer (optimisation of topological selections + systematics)\r
+ Double_t lContainerCutVars[19] = {0.0};\r
+ lContainerCutVars[0] = lDcaXiDaughters;\r
+ lContainerCutVars[1] = lDcaBachToPrimVertexXi;\r
+ lContainerCutVars[2] = lXiCosineOfPointingAngle;\r
+ lContainerCutVars[3] = lXiRadius;\r
+ lContainerCutVars[4] = lInvMassLambdaAsCascDghter;\r
+ lContainerCutVars[5] = lDcaV0DaughtersXi;\r
+ lContainerCutVars[6] = lV0CosineOfPointingAngleXi;\r
+ lContainerCutVars[7] = lV0RadiusXi;\r
+ lContainerCutVars[8] = lDcaV0ToPrimVertexXi; \r
+ lContainerCutVars[9] = lDcaPosToPrimVertexXi;\r
+ lContainerCutVars[10] = lDcaNegToPrimVertexXi;\r
+ lContainerCutVars[13] = lmcPt;\r
+ lContainerCutVars[16] = lctau;\r
+ lContainerCutVars[17] = lctauV0;\r
+ lContainerCutVars[18] = distTV0Xi;\r
+ // All cases should be covered below\r
+ if( lChargeXi < 0 && lAssoXiMinus ) {\r
+ lContainerCutVars[11] = lInvMassXiMinus;\r
+ lContainerCutVars[12] = lInvMassOmegaMinus;//1.63;\r
+ lContainerCutVars[14] = lmcRapCasc;\r
+ lContainerCutVars[15] = -1.;\r
+ if ( lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) \r
+ fCFContAsCascadeCuts->Fill(lContainerCutVars,0); // for Xi-\r
+ }\r
+ if( lChargeXi > 0 && lAssoXiPlus ) {\r
+ lContainerCutVars[11] = lInvMassXiPlus;\r
+ lContainerCutVars[12] = lInvMassOmegaPlus;//1.26;\r
+ lContainerCutVars[14] = lmcRapCasc;\r
+ lContainerCutVars[15] = -1.; \r
+ if ( lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) \r
+ fCFContAsCascadeCuts->Fill(lContainerCutVars,1); // for Xi+\r
+ }\r
+ if( lChargeXi < 0 && lAssoOmegaMinus ) {\r
+ lContainerCutVars[11] = lInvMassXiMinus;//1.63;\r
+ lContainerCutVars[12] = lInvMassOmegaMinus;\r
+ lContainerCutVars[14] = -1.;\r
+ lContainerCutVars[15] = lmcRapCasc;\r
+ if ( lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) \r
+ fCFContAsCascadeCuts->Fill(lContainerCutVars,2); // for Omega-\r
+ }\r
+ if( lChargeXi > 0 && lAssoOmegaPlus ) {\r
+ lContainerCutVars[11] = lInvMassXiPlus;//1.26;\r
+ lContainerCutVars[12] = lInvMassOmegaPlus;\r
+ lContainerCutVars[14] = -1.;\r
+ lContainerCutVars[15] = lmcRapCasc;\r
+ if ( lIsBachelorKaonForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) \r
+ fCFContAsCascadeCuts->Fill(lContainerCutVars,3); // for Omega+\r
+ }\r
+ \r
+ // - Filling the AliCFContainers related to PID\r
+ Double_t lContainerPIDVars[3] = {0.0};\r
+ \r
+ // Xi Minus \r
+ if( lChargeXi < 0 && lAssoXiMinus ) {\r
+ lContainerPIDVars[0] = lmcPt;\r
+ lContainerPIDVars[1] = lInvMassXiMinus;\r
+ lContainerPIDVars[2] = lmcRapCasc;\r
+ // No PID\r
+ fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 0); // No PID\r
+ // TPC PID\r
+ if( lIsBachelorPionForTPC ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track\r
+ if( lIsBachelorPionForTPC && lIsPosProtonForTPC ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks \r
+ if( lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks\r
+ // Combined PID\r
+ if( lIsBachelorPion ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor\r
+ if( lIsBachelorPion && lIsPosInXiProton ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon\r
+ if( lIsBachelorPion && lIsPosInXiProton && lIsNegInXiPion ) fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson\r
+ } \r
+ lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.; \r
+ \r
+ // Xi Plus \r
+ if( lChargeXi > 0 && lAssoXiPlus ) {\r
+ lContainerPIDVars[0] = lmcPt;\r
+ lContainerPIDVars[1] = lInvMassXiPlus;\r
+ lContainerPIDVars[2] = lmcRapCasc;\r
+ // No PID\r
+ fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 0); // No PID\r
+ // TPC PID\r
+ if( lIsBachelorPionForTPC ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track\r
+ if( lIsBachelorPionForTPC && lIsNegProtonForTPC ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks\r
+ if( lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks\r
+ // Combined PID\r
+ if( lIsBachelorPion ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor\r
+ if( lIsBachelorPion && lIsNegInXiProton ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon\r
+ if( lIsBachelorPion && lIsNegInXiProton && lIsPosInXiPion ) fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson\r
+ } \r
+ lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.; \r
+ \r
+ // Omega Minus \r
+ if( lChargeXi < 0 && lAssoOmegaMinus ) {\r
+ lContainerPIDVars[0] = lmcPt;\r
+ lContainerPIDVars[1] = lInvMassOmegaMinus;\r
+ lContainerPIDVars[2] = lmcRapCasc; \r
+ // No PID\r
+ fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 0); // No PID\r
+ // TPC PID\r
+ if( lIsBachelorKaonForTPC ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track\r
+ if( lIsBachelorKaonForTPC && lIsPosProtonForTPC ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks\r
+ if( lIsBachelorKaonForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks\r
+ // Combined PID\r
+ if( lIsBachelorKaon ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor\r
+ if( lIsBachelorKaon && lIsPosInOmegaProton ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon\r
+ if( lIsBachelorKaon && lIsPosInOmegaProton && lIsNegInOmegaPion ) fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson\r
+ } \r
+ lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.; \r
+ \r
+ // Omega Plus \r
+ if( lChargeXi > 0 && lAssoOmegaPlus) {\r
+ lContainerPIDVars[0] = lmcPt;\r
+ lContainerPIDVars[1] = lInvMassOmegaPlus;\r
+ lContainerPIDVars[2] = lmcRapCasc; \r
+ // No PID\r
+ fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 0); // No PID\r
+ // TPC PID\r
+ if( lIsBachelorKaonForTPC ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 1); // TPC PID / 4-#sigma cut on Bachelor track\r
+ if( lIsBachelorKaonForTPC && lIsNegProtonForTPC ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 2); // TPC PID / 4-#sigma cut on Bachelor+Baryon tracks\r
+ if( lIsBachelorKaonForTPC && lIsNegProtonForTPC && lIsPosPionForTPC ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 3); // TPC PID / 4-#sigma cut on Bachelor+Baryon+Meson tracks\r
+ // Combined PID\r
+ if( lIsBachelorKaon ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor\r
+ if( lIsBachelorKaon && lIsNegInOmegaProton ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon\r
+ if( lIsBachelorKaon && lIsNegInOmegaProton && lIsPosInOmegaPion ) fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson\r
+ } \r
+ \r
+ }// End of loop over reconstructed cascades\r
+ \r
+ fHistnAssoXiMinus->Fill(nAssoXiMinus);\r
+ fHistnAssoXiPlus->Fill(nAssoXiPlus);\r
+ fHistnAssoOmegaMinus->Fill(nAssoOmegaMinus);\r
+ fHistnAssoOmegaPlus->Fill(nAssoOmegaPlus); \r
+ \r
+ // Post output data.\r
+ PostData(1, fListHistCascade);\r
+ PostData(2, fCFContCascadePIDAsXiMinus);\r
+ PostData(3, fCFContCascadePIDAsXiPlus);\r
+ PostData(4, fCFContCascadePIDAsOmegaMinus);\r
+ PostData(5, fCFContCascadePIDAsOmegaPlus);\r
+ PostData(6, fCFContAsCascadeCuts);\r
+\r
+} \r
+\r
+\r
+//________________________________________________________________________\r
+void AliAnalysisTaskCheckPerformanceCascadepp276::Terminate(Option_t *) {\r
+ // Draw result to the screen\r
+ // Called once at the end of the query\r
+ \r
+ /* TList *cRetrievedList = 0x0;\r
+ cRetrievedList = (TList*)GetOutputData(1);\r
+ if(!cRetrievedList) {\r
+ Printf("ERROR - AliAnalysisTaskCheckPerformanceCascadepp276 : ouput data container list not available\n");\r
+ return;\r
+ } \r
+ \r
+ fHistTrackMultiplicityBeforeAnySel = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistTrackMultiplicityBeforeAnySel") );\r
+ if (!fHistTrackMultiplicityBeforeAnySel) {\r
+ Printf("ERROR - AliAnalysisTaskCheckPerformanceCascadepp276 : fHistTrackMultiplicityBeforeAnySel not available");\r
+ return;\r
+ }\r
+ \r
+ \r
+ TCanvas *canCheckPerformanceCascade = new TCanvas("AliAnalysisTaskCheckPerformanceCascadepp276","Multiplicity",10,10,510,510);\r
+ canCheckPerformanceCascade->cd(1)->SetLogy();\r
+\r
+ fHistTrackMultiplicityBeforeAnySel->SetMarkerStyle(22);\r
+ fHistTrackMultiplicityBeforeAnySel->DrawCopy("E");\r
+ */\r
+}\r