X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PWG2%2FSPECTRA%2FAliAnalysisTaskCheckCascade.cxx;h=c37c6735f16f966778f060843d9bd74e7a0428ff;hb=317170cbc151b03eb212210e2e44aebf841edf00;hp=4c0c78e1a3f32cbc4d474eb9054f358df1eb5c4c;hpb=6dc8b2536838bccc2ccd4fe7e3b9d60b5c9d5183;p=u%2Fmrichter%2FAliRoot.git diff --git a/PWG2/SPECTRA/AliAnalysisTaskCheckCascade.cxx b/PWG2/SPECTRA/AliAnalysisTaskCheckCascade.cxx index 4c0c78e1a3f..c37c6735f16 100644 --- a/PWG2/SPECTRA/AliAnalysisTaskCheckCascade.cxx +++ b/PWG2/SPECTRA/AliAnalysisTaskCheckCascade.cxx @@ -14,14 +14,19 @@ //----------------------------------------------------------------- // AliAnalysisTaskCheckCascade class -// This task is for QAing the Cascades from ESD and AOD -// Origin : Antonin Maire Fev2008, antonin.maire@ires.in2p3.fr -// Modified : A.M Juillet 2008 +// (AliAnalysisTaskCheckCascade) +// This task has four roles : +// 1. QAing the Cascades from ESD and AOD +// Origin: AliAnalysisTaskESDCheckV0 by B.H. 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 Jan2010, antonin.maire@ires.in2p3.fr //----------------------------------------------------------------- - class TTree; class TParticle; class TVector3; @@ -35,19 +40,33 @@ class AliAODVertex; class AliESDv0; class AliAODv0; -#include +#include #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 "AliCascadeVertexer.h" +// #include "AliV0vertexer.h" +// #include "AliCascadeVertexer.h" +#include "AliESDpid.h" + +#include "AliInputEventHandler.h" +#include "AliAnalysisManager.h" +#include "AliMCEventHandler.h" + +#include "AliCFContainer.h" +#include "AliMultiplicity.h" #include "AliESDcascade.h" #include "AliAODcascade.h" @@ -60,11 +79,12 @@ ClassImp(AliAnalysisTaskCheckCascade) //________________________________________________________________________ AliAnalysisTaskCheckCascade::AliAnalysisTaskCheckCascade() - : AliAnalysisTaskSE(), fAnalysisType("ESD"), fCollidingSystems(0), + : AliAnalysisTaskSE(), fAnalysisType("ESD"), fCollidingSystems(0), fESDpid(0), // - Cascade part initialisation fListHistCascade(0), - fHistTrackMultiplicity(0), fHistCascadeMultiplicity(0), + fHistTrackMultiplicity(0), fHistTPCrefitTrackMultiplicity(0), fHistCascadeMultiplicity(0), fHistTPCrefitTrackMultiplicityForCascadeEvt(0), + fHistPosV0TPCClusters(0), fHistNegV0TPCClusters(0), fHistBachTPCClusters(0), fHistVtxStatus(0), fHistPosTrkgPrimaryVtxX(0), fHistPosTrkgPrimaryVtxY(0), fHistPosTrkgPrimaryVtxZ(0), fHistTrkgPrimaryVtxRadius(0), @@ -84,20 +104,40 @@ AliAnalysisTaskCheckCascade::AliAnalysisTaskCheckCascade() fHistMassXiMinus(0), fHistMassXiPlus(0), fHistMassOmegaMinus(0), fHistMassOmegaPlus(0), + fHistMassWithCombPIDXiMinus(0), fHistMassWithCombPIDXiPlus(0), + fHistMassWithCombPIDOmegaMinus(0), fHistMassWithCombPIDOmegaPlus(0), fHistXiTransvMom(0), fHistXiTotMom(0), - fHistBachTransvMom(0), fHistBachTotMom(0), + fHistBachTransvMomXi(0), fHistBachTotMomXi(0), fHistChargeXi(0), fHistV0toXiCosineOfPointingAngle(0), - fHistRapXi(0), fHistRapOmega(0), fHistEta(0), - fHistTheta(0), fHistPhi(0), + fHistRapXi(0), fHistRapOmega(0), fHistEtaXi(0), + fHistThetaXi(0), fHistPhiXi(0), f2dHistArmenteros(0), f2dHistEffMassLambdaVsEffMassXiMinus(0), f2dHistEffMassXiVsEffMassOmegaMinus(0), f2dHistEffMassLambdaVsEffMassXiPlus(0), f2dHistEffMassXiVsEffMassOmegaPlus(0), - f2dHistXiRadiusVsEffMassXiMinus(0), f2dHistXiRadiusVsEffMassXiPlus(0) + f2dHistXiRadiusVsEffMassXiMinus(0), f2dHistXiRadiusVsEffMassXiPlus(0), + f2dHistXiRadiusVsEffMassOmegaMinus(0), f2dHistXiRadiusVsEffMassOmegaPlus(0), + + f3dHistXiPtVsEffMassVsYXiMinus(0), f3dHistXiPtVsEffMassVsYXiPlus(0), + f3dHistXiPtVsEffMassVsYOmegaMinus(0), f3dHistXiPtVsEffMassVsYOmegaPlus(0), + + f3dHistXiPtVsEffMassVsYWithCombPIDXiMinus(0), f3dHistXiPtVsEffMassVsYWithCombPIDXiPlus(0), + f3dHistXiPtVsEffMassVsYWithCombPIDOmegaMinus(0), f3dHistXiPtVsEffMassVsYWithCombPIDOmegaPlus(0), + f3dHistXiPtVsEffMassVsYWith2CombPIDOmegaMinus(0), f3dHistXiPtVsEffMassVsYWith2CombPIDOmegaPlus(0), + f3dHistXiPtVsEffMassVsYWithTpcPIDOmegaMinus(0), + + fCFContCascadePIDXiMinus(0), + fCFContCascadePIDXiPlus(0), + fCFContCascadePIDOmegaMinus(0), + fCFContCascadePIDOmegaPlus(0), + fCFContCascadeCuts(0), + + fHnSpAngularCorrXiMinus(0), fHnSpAngularCorrXiPlus(0), + fHnSpAngularCorrOmegaMinus(0), fHnSpAngularCorrOmegaPlus(0) { // Dummy Constructor @@ -112,11 +152,12 @@ AliAnalysisTaskCheckCascade::AliAnalysisTaskCheckCascade() //________________________________________________________________________ AliAnalysisTaskCheckCascade::AliAnalysisTaskCheckCascade(const char *name) - : AliAnalysisTaskSE(name), fAnalysisType("ESD"), fCollidingSystems(0), + : AliAnalysisTaskSE(name), fAnalysisType("ESD"), fCollidingSystems(0), fESDpid(0), // - Cascade part initialisation fListHistCascade(0), - fHistTrackMultiplicity(0), fHistCascadeMultiplicity(0), + fHistTrackMultiplicity(0), fHistTPCrefitTrackMultiplicity(0), fHistCascadeMultiplicity(0), fHistTPCrefitTrackMultiplicityForCascadeEvt(0), + fHistPosV0TPCClusters(0), fHistNegV0TPCClusters(0), fHistBachTPCClusters(0), fHistVtxStatus(0), fHistPosTrkgPrimaryVtxX(0), fHistPosTrkgPrimaryVtxY(0), fHistPosTrkgPrimaryVtxZ(0), fHistTrkgPrimaryVtxRadius(0), @@ -136,22 +177,40 @@ AliAnalysisTaskCheckCascade::AliAnalysisTaskCheckCascade(const char *name) fHistMassXiMinus(0), fHistMassXiPlus(0), fHistMassOmegaMinus(0), fHistMassOmegaPlus(0), + fHistMassWithCombPIDXiMinus(0), fHistMassWithCombPIDXiPlus(0), + fHistMassWithCombPIDOmegaMinus(0), fHistMassWithCombPIDOmegaPlus(0), fHistXiTransvMom(0), fHistXiTotMom(0), - fHistBachTransvMom(0), fHistBachTotMom(0), + fHistBachTransvMomXi(0), fHistBachTotMomXi(0), fHistChargeXi(0), fHistV0toXiCosineOfPointingAngle(0), - fHistRapXi(0), fHistRapOmega(0), fHistEta(0), - fHistTheta(0), fHistPhi(0), + fHistRapXi(0), fHistRapOmega(0), fHistEtaXi(0), + fHistThetaXi(0), fHistPhiXi(0), f2dHistArmenteros(0), f2dHistEffMassLambdaVsEffMassXiMinus(0), f2dHistEffMassXiVsEffMassOmegaMinus(0), f2dHistEffMassLambdaVsEffMassXiPlus(0), f2dHistEffMassXiVsEffMassOmegaPlus(0), - f2dHistXiRadiusVsEffMassXiMinus(0), f2dHistXiRadiusVsEffMassXiPlus(0) - - + f2dHistXiRadiusVsEffMassXiMinus(0), f2dHistXiRadiusVsEffMassXiPlus(0), + f2dHistXiRadiusVsEffMassOmegaMinus(0), f2dHistXiRadiusVsEffMassOmegaPlus(0), + + f3dHistXiPtVsEffMassVsYXiMinus(0), f3dHistXiPtVsEffMassVsYXiPlus(0), + f3dHistXiPtVsEffMassVsYOmegaMinus(0), f3dHistXiPtVsEffMassVsYOmegaPlus(0), + + f3dHistXiPtVsEffMassVsYWithCombPIDXiMinus(0), f3dHistXiPtVsEffMassVsYWithCombPIDXiPlus(0), + f3dHistXiPtVsEffMassVsYWithCombPIDOmegaMinus(0), f3dHistXiPtVsEffMassVsYWithCombPIDOmegaPlus(0), + f3dHistXiPtVsEffMassVsYWith2CombPIDOmegaMinus(0), f3dHistXiPtVsEffMassVsYWith2CombPIDOmegaPlus(0), + f3dHistXiPtVsEffMassVsYWithTpcPIDOmegaMinus(0), + + fCFContCascadePIDXiMinus(0), + fCFContCascadePIDXiPlus(0), + fCFContCascadePIDOmegaMinus(0), + fCFContCascadePIDOmegaPlus(0), + fCFContCascadeCuts(0), + + fHnSpAngularCorrXiMinus(0), fHnSpAngularCorrXiPlus(0), + fHnSpAngularCorrOmegaMinus(0), fHnSpAngularCorrOmegaPlus(0) { // Constructor @@ -177,46 +236,87 @@ void AliAnalysisTaskCheckCascade::UserCreateOutputObjects() fListHistCascade = new TList(); - - + + // - General histos if(! fHistTrackMultiplicity) { if(fCollidingSystems)// AA collisions fHistTrackMultiplicity = new TH1F("fHistTrackMultiplicity", - "Multiplicity distribution;Number of tracks;Events", - 200, 0, 40000); + "Track Multiplicity;Nbr of tracks/Evt;Events", + 200, 0, 20000); else // pp collisions fHistTrackMultiplicity = new TH1F("fHistTrackMultiplicity", "Track Multiplicity;Nbr of tracks/Evt;Events", - 200, 0, 200); + 250, 0, 250); fListHistCascade->Add(fHistTrackMultiplicity); } +if(! fHistTPCrefitTrackMultiplicity) { + if(fCollidingSystems)// AA collisions + fHistTPCrefitTrackMultiplicity = new TH1F("fHistTPCrefitTrackMultiplicity", + "TPCrefit track Multiplicity;Nbr of TPCrefit tracks/Evt;Events", + 200, 0, 20000); + else // pp collisions + fHistTPCrefitTrackMultiplicity = new TH1F("fHistTPCrefitTrackMultiplicity", + "TPCrefit track Multiplicity;Nbr of TPCrefit tracks/Evt;Events", + 250, 0, 250); + fListHistCascade->Add(fHistTPCrefitTrackMultiplicity); +} + if(! fHistCascadeMultiplicity) { if(fCollidingSystems)// AA collisions fHistCascadeMultiplicity = new TH1F("fHistCascadeMultiplicity", - "Multiplicity distribution;Number of Cascades;Events", - 25, 0, 25); + "Cascades per event;Nbr of Cascades/Evt;Events", + 100, 0, 100); else // pp collisions fHistCascadeMultiplicity = new TH1F("fHistCascadeMultiplicity", "Cascades per event;Nbr of Cascades/Evt;Events", - 10, 0, 10); + 25, 0, 25); fListHistCascade->Add(fHistCascadeMultiplicity); } -if(! fHistVtxStatus ){ - fHistVtxStatus = new TH1F( "fHistVtxStatus" , "Does a Trckg Prim.vtx exist ?; true=1 or false=0; Nb of Events" , 4, -1.0, 3.0 ); - fListHistCascade->Add(fHistVtxStatus); +if(! fHistTPCrefitTrackMultiplicityForCascadeEvt) { + if(fCollidingSystems)// AA collisions + fHistTPCrefitTrackMultiplicityForCascadeEvt = new TH1F("fHistTPCrefitTrackMultiplicityForCascadeEvt", + "TPCrefit track Multiplicity (for evt with Casc.);Nbr of TPCrefit tracks/Evt with cascade(s);Events", + 200, 0, 20000); + else // pp collisions + fHistTPCrefitTrackMultiplicityForCascadeEvt = new TH1F("fHistTPCrefitTrackMultiplicityForCascadeEvt", + "TPCrefit track Multiplicity (for evt with Casc.);Nbr of TPCrefit tracks/Evt with cascade(s);Events", + 250, 0, 250); + fListHistCascade->Add(fHistTPCrefitTrackMultiplicityForCascadeEvt); } +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); +} + + + +if(! fHistVtxStatus ){ + fHistVtxStatus = new TH1F( "fHistVtxStatus" , "Does a Trckg Prim.vtx exist ?; true=1 or false=0; Nb of Events" , 4, -1.0, 3.0 ); + fListHistCascade->Add(fHistVtxStatus); +} + + // - Vertex Positions if(! fHistPosTrkgPrimaryVtxX ){ @@ -275,7 +375,7 @@ if(! f2dHistTrkgPrimVtxVsBestPrimVtx) { if(! fHistEffMassXi) { - fHistEffMassXi = new TH1F("fHistEffMassXi", "Cascade candidates ; Invariant Mass (GeV/c^{2}) ; Counts", 200, 1.2, 2.0); + fHistEffMassXi = new TH1F("fHistEffMassXi", "Cascade candidates ; Invariant Mass (GeV/c^{2}) ; Counts", 400, 1.2, 2.0); fListHistCascade->Add(fHistEffMassXi); } @@ -295,12 +395,12 @@ if(! fHistDcaBachToPrimVertex) { } if(! fHistXiCosineOfPointingAngle) { - fHistXiCosineOfPointingAngle = new TH1F("fHistXiCosineOfPointingAngle", "Cosine of Xi Pointing Angle; Cos (Xi Point.Angl);Number of Xis", 200, 0.98, 1.0); + fHistXiCosineOfPointingAngle = new TH1F("fHistXiCosineOfPointingAngle", "Cosine of Xi Pointing Angle; Cos (Xi Point.Angl);Number of Xis", 200, 0.99, 1.0); fListHistCascade->Add(fHistXiCosineOfPointingAngle); } if(! fHistXiRadius ){ - fHistXiRadius = new TH1F( "fHistXiRadius", "Casc. decay transv. radius; r (cm); Counts" , 200, 0., 20.0 ); + fHistXiRadius = new TH1F( "fHistXiRadius", "Casc. decay transv. radius; r (cm); Counts" , 1050, 0., 105.0 ); fListHistCascade->Add(fHistXiRadius); } @@ -310,7 +410,7 @@ if(! fHistXiRadius ){ if (! fHistMassLambdaAsCascDghter) { - fHistMassLambdaAsCascDghter = new TH1F("fHistMassLambdaAsCascDghter","#Lambda associated to Casc. candidates;Eff. Mass (GeV/c^{2});Counts", 160,1.00,1.8); + fHistMassLambdaAsCascDghter = new TH1F("fHistMassLambdaAsCascDghter","#Lambda associated to Casc. candidates;Eff. Mass (GeV/c^{2});Counts", 300,1.00,1.3); fListHistCascade->Add(fHistMassLambdaAsCascDghter); } @@ -335,7 +435,7 @@ if (! fHistV0CosineOfPointingAngleXi) { } if (! fHistV0RadiusXi) { - fHistV0RadiusXi = new TH1F("fHistV0RadiusXi", "V0 decay radius, in cascade; radius (cm); Counts", 200, 0, 20); + fHistV0RadiusXi = new TH1F("fHistV0RadiusXi", "V0 decay radius, in cascade; radius (cm); Counts", 1050, 0., 105.0); fListHistCascade->Add(fHistV0RadiusXi); } @@ -353,50 +453,71 @@ if (! fHistDcaNegToPrimVertexXi) { // - Effective mass histos for cascades. - +// By cascade hyp if (! fHistMassXiMinus) { - fHistMassXiMinus = new TH1F("fHistMassXiMinus","#Xi^{-} candidates;M( #Lambda , #pi^{-} ) (GeV/c^{2});Counts", 200,1.2,2.0); + 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",200,1.2,2.0); + 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", 250,1.5,2.5); + 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", 250,1.5,2.5); + fHistMassOmegaPlus = new TH1F("fHistMassOmegaPlus","#Omega^{+} candidates;M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2});Counts", 500,1.5,2.5); fListHistCascade->Add(fHistMassOmegaPlus); } +// By cascade hyp + bachelor 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); +} + // - Complements for QA if(! fHistXiTransvMom ){ - fHistXiTransvMom = new TH1F( "fHistXiTransvMom" , "Xi transverse momentum ; p_{t}(#Xi) (GeV/c); Counts", 100, 0.0, 10.0); + 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; p_{tot}(#Xi) (GeV/c); Counts", 150, 0.0, 15.0); + 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(! fHistBachTransvMom ){ - fHistBachTransvMom = new TH1F( "fHistBachTransvMom" , "Bach. transverse momentum ; p_{t}(Bach.) (GeV/c); Counts", 100, 0.0, 5.0); - fListHistCascade->Add(fHistBachTransvMom); +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(! fHistBachTotMom ){ - fHistBachTotMom = new TH1F( "fHistBachTotMom" , "Bach. momentum norm; p_{tot}(Bach.) (GeV/c); Counts", 100, 0.0, 5.0); - fListHistCascade->Add(fHistBachTotMom); +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); } @@ -413,28 +534,28 @@ if (! fHistV0toXiCosineOfPointingAngle) { if(! fHistRapXi ){ - fHistRapXi = new TH1F( "fHistRapXi" , "Rapidity of Xi candidates ; y ; Counts", 200, -5.0, 5.0); + fHistRapXi = new TH1F( "fHistRapXi" , "Rapidity of #Xi candidates (around the mass peak); y ; Counts", 200, -5.0, 5.0); fListHistCascade->Add(fHistRapXi); } if(! fHistRapOmega ){ - fHistRapOmega = new TH1F( "fHistRapOmega" , "Rapidity of Omega candidates ; y ; Counts", 200, -5.0, 5.0); + fHistRapOmega = new TH1F( "fHistRapOmega" , "Rapidity of #Omega candidates (around the mass peak); y ; Counts", 200, -5.0, 5.0); fListHistCascade->Add(fHistRapOmega); } -if(! fHistEta ){ - fHistEta = new TH1F( "fHistEta" , "Pseudo-rap. of casc. candidates ; #eta ; Counts", 120, -3.0, 3.0); - fListHistCascade->Add(fHistEta); +if(! fHistEtaXi ){ + fHistEtaXi = new TH1F( "fHistEtaXi" , "Pseudo-rap. of #Xi candidates (around the mass peak) ; #eta ; Counts", 120, -3.0, 3.0); + fListHistCascade->Add(fHistEtaXi); } -if(! fHistTheta ){ - fHistTheta = new TH1F( "fHistTheta" , "#theta of casc. candidates ; #theta (deg) ; Counts", 180, 0., 180.0); - fListHistCascade->Add(fHistTheta); +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(! fHistPhi ){ - fHistPhi = new TH1F( "fHistPhi" , "#phi of casc. candidates ; #phi (deg) ; Counts", 360, 0., 360.); - fListHistCascade->Add(fHistPhi); +if(! fHistPhiXi ){ + fHistPhiXi = new TH1F( "fHistPhiXi" , "#phi of #Xi candidates (around the mass peak); #phi (deg) ; Counts", 360, 0., 360.); + fListHistCascade->Add(fHistPhiXi); } @@ -443,38 +564,519 @@ if(! f2dHistArmenteros) { fListHistCascade->Add(f2dHistArmenteros); } +//------- + 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, 200, 1.2, 2.0); + 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})", 200, 1.2, 2.0, 250, 1.5, 2.5); + 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, 200, 1.2, 2.0); + 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})", 200, 1.2, 2.0, 250, 1.5, 2.5); + 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_{Xi} (cm); M( #Lambda , #pi^{-} ) (GeV/c^{2}) ", 450, 0., 45.0, 200, 1.2, 2.0); + 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_{Xi} (cm); M( #Lambda , #pi^{+} ) (GeV/c^{2}) ", 450, 0., 45.0, 200, 1.2, 2.0); + 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); +} + + +// Part 2 : Raw material for yield extraction ------- + +if(! f3dHistXiPtVsEffMassVsYXiMinus) { + f3dHistXiPtVsEffMassVsYXiMinus = new TH3F( "f3dHistXiPtVsEffMassVsYXiMinus", "Pt_{cascade} Vs M_{#Xi^{-} candidates} Vs Y_{#Xi}; Pt_{cascade} (GeV/c); M( #Lambda , #pi^{-} ) (GeV/c^{2}) ;Y_{#Xi} ", 100, 0., 10.0, 400, 1.2, 2.0, 48, -1.2,1.2); + fListHistCascade->Add(f3dHistXiPtVsEffMassVsYXiMinus); +} + +if(! f3dHistXiPtVsEffMassVsYXiPlus) { + f3dHistXiPtVsEffMassVsYXiPlus = new TH3F( "f3dHistXiPtVsEffMassVsYXiPlus", "Pt_{cascade} Vs M_{#Xi^{+} candidates} Vs Y_{#Xi}; Pt_{cascade} (GeV/c); M( #Lambda , #pi^{+} ) (GeV/c^{2}); Y_{#Xi}", 100, 0., 10.0, 400, 1.2, 2.0, 48, -1.2,1.2); + fListHistCascade->Add(f3dHistXiPtVsEffMassVsYXiPlus); +} + +if(! f3dHistXiPtVsEffMassVsYOmegaMinus) { + f3dHistXiPtVsEffMassVsYOmegaMinus = new TH3F( "f3dHistXiPtVsEffMassVsYOmegaMinus", "Pt_{cascade} Vs M_{#Omega^{-} candidates} Vs Y_{#Omega}; Pt_{cascade} (GeV/c); M( #Lambda , K^{-} ) (GeV/c^{2}); Y_{#Omega}", 100, 0., 10.0, 500, 1.5, 2.5, 48, -1.2,1.2); + fListHistCascade->Add(f3dHistXiPtVsEffMassVsYOmegaMinus); +} + +if(! f3dHistXiPtVsEffMassVsYOmegaPlus) { + f3dHistXiPtVsEffMassVsYOmegaPlus = new TH3F( "f3dHistXiPtVsEffMassVsYOmegaPlus", "Pt_{cascade} Vs M_{#Omega^{+} candidates} Vs Y_{#Omega}; Pt_{cascade} (GeV/c); M( #Lambda , K^{+} ) (GeV/c^{2}); Y_{#Omega}", 100, 0., 10.0, 500, 1.5, 2.5, 48, -1.2,1.2); + fListHistCascade->Add(f3dHistXiPtVsEffMassVsYOmegaPlus); +} + +//-- +if(! f3dHistXiPtVsEffMassVsYWithCombPIDXiMinus) { + f3dHistXiPtVsEffMassVsYWithCombPIDXiMinus = new TH3F( "f3dHistXiPtVsEffMassVsYWithCombPIDXiMinus", "Pt_{cascade} Vs M_{#Xi^{-} candidates, with PID} Vs Y_{#Xi}; Pt_{cascade} (GeV/c); M( #Lambda , #pi^{-} ) (GeV/c^{2}) ;Y_{#Xi} ", 100, 0., 10.0, 400, 1.2, 2.0, 48, -1.2,1.2); + fListHistCascade->Add(f3dHistXiPtVsEffMassVsYWithCombPIDXiMinus); +} + +if(! f3dHistXiPtVsEffMassVsYWithCombPIDXiPlus) { + f3dHistXiPtVsEffMassVsYWithCombPIDXiPlus = new TH3F( "f3dHistXiPtVsEffMassVsYWithCombPIDXiPlus", "Pt_{cascade} Vs M_{#Xi^{+} candidates, with PID} Vs Y_{#Xi}; Pt_{cascade} (GeV/c); M( #Lambda , #pi^{+} ) (GeV/c^{2}); Y_{#Xi}", 100, 0., 10.0, 400, 1.2, 2.0, 48, -1.2,1.2); + fListHistCascade->Add(f3dHistXiPtVsEffMassVsYWithCombPIDXiPlus); +} + +if(! f3dHistXiPtVsEffMassVsYWithCombPIDOmegaMinus) { + f3dHistXiPtVsEffMassVsYWithCombPIDOmegaMinus = new TH3F( "f3dHistXiPtVsEffMassVsYWithCombPIDOmegaMinus", "Pt_{cascade} Vs M_{#Omega^{-} candidates, with PID} Vs Y_{#Omega}; Pt_{cascade} (GeV/c); M( #Lambda , K^{-} ) (GeV/c^{2}); Y_{#Omega}", 100, 0., 10.0, 500, 1.5, 2.5, 48, -1.2,1.2); + fListHistCascade->Add(f3dHistXiPtVsEffMassVsYWithCombPIDOmegaMinus); +} + +if(! f3dHistXiPtVsEffMassVsYWithCombPIDOmegaPlus) { + f3dHistXiPtVsEffMassVsYWithCombPIDOmegaPlus = new TH3F( "f3dHistXiPtVsEffMassVsYWithCombPIDOmegaPlus", "Pt_{cascade} Vs M_{#Omega^{+} candidates, with PID} Vs Y_{#Omega}; Pt_{cascade} (GeV/c); M( #Lambda , K^{+} ) (GeV/c^{2}); Y_{#Omega}", 100, 0., 10.0, 500, 1.5, 2.5, 48, -1.2,1.2); + fListHistCascade->Add(f3dHistXiPtVsEffMassVsYWithCombPIDOmegaPlus); +} + +//-- +if(! f3dHistXiPtVsEffMassVsYWith2CombPIDOmegaMinus) { + f3dHistXiPtVsEffMassVsYWith2CombPIDOmegaMinus = new TH3F( "f3dHistXiPtVsEffMassVsYWith2CombPIDOmegaMinus", "Pt_{cascade} Vs M_{#Omega^{-} candidates, with 2 PID} Vs Y_{#Omega}; Pt_{cascade} (GeV/c); M( #Lambda , K^{-} ) (GeV/c^{2}); Y_{#Omega}", 100, 0., 10.0, 500, 1.5, 2.5, 48, -1.2,1.2); + fListHistCascade->Add(f3dHistXiPtVsEffMassVsYWith2CombPIDOmegaMinus); +} + +if(! f3dHistXiPtVsEffMassVsYWith2CombPIDOmegaPlus) { + f3dHistXiPtVsEffMassVsYWith2CombPIDOmegaPlus = new TH3F( "f3dHistXiPtVsEffMassVsYWith2CombPIDOmegaPlus", "Pt_{cascade} Vs M_{#Omega^{+} candidates, with 2 PID} Vs Y_{#Omega}; Pt_{cascade} (GeV/c); M( #Lambda , K^{+} ) (GeV/c^{2}); Y_{#Omega}", 100, 0., 10.0, 500, 1.5, 2.5, 48, -1.2,1.2); + fListHistCascade->Add(f3dHistXiPtVsEffMassVsYWith2CombPIDOmegaPlus); +} + + +if(! fESDpid){ + + Double_t lAlephParameters[5] = {0.}; + AliMCEventHandler *lmcEvtHandler = dynamic_cast( (AliAnalysisManager::GetAnalysisManager())->GetMCtruthEventHandler() ); + + if( !lmcEvtHandler ){ // !0x0 = real data or !1 = there is an MC handler available (useMC = kTRUE in AnalysisTrainNew), so = data from MC + + // Reasonable parameters extracted for real p-p event (Dec 2009 - GSI Pass5) - A.Kalweit + lAlephParameters[0] = 0.0283086; // No extra-division to apply in SetBlochParam + lAlephParameters[1] = 2.63394e+01; + lAlephParameters[2] = 5.04114e-11; + lAlephParameters[3] = 2.12543e+00; + lAlephParameters[4] = 4.88663e+00; + Printf("CheckCascade - Check Aleph Param in case of REAL Data (lAlephParameters[1] = %f)\n", lAlephParameters[1]); + } + else { + // Reasonable parameters extracted for p-p simulation (LHC09a4) - A.Kalweit + // lAlephParameters[0] = 4.23232575531564326e+00;//50*0.76176e-1; // do not forget to divide this value by 50 in SetBlochParam ! + // lAlephParameters[1] = 8.68482806165147636e+00;//10.632; + // lAlephParameters[2] = 1.34000000000000005e-05;//0.13279e-4; + // lAlephParameters[3] = 2.30445734159456084e+00;//1.8631; + // lAlephParameters[4] = 2.25624744086878559e+00;//1.9479; + + // Reasonable parameters extracted for MC LHC09d10 event (Jan 2010) - A.Kalweit + lAlephParameters[0] = 2.15898e+00/50.; + lAlephParameters[1] = 1.75295e+01; + lAlephParameters[2] = 3.40030e-09; + lAlephParameters[3] = 1.96178e+00; + lAlephParameters[4] = 3.91720e+00; + Printf("CheckCascade - Check Aleph Param win case MC data (lAlephParameters[1] = %f)\n", lAlephParameters[1]); + } + + + fESDpid = new AliESDpid(); + fESDpid->GetTPCResponse().SetBetheBlochParameters(lAlephParameters[0], + lAlephParameters[1], + lAlephParameters[2], + lAlephParameters[3], + lAlephParameters[4]); +} + + +if(! f3dHistXiPtVsEffMassVsYWithTpcPIDOmegaMinus) { + f3dHistXiPtVsEffMassVsYWithTpcPIDOmegaMinus = new TH3F( "f3dHistXiPtVsEffMassVsYWithTpcPIDOmegaMinus", "Pt_{cascade} Vs M_{#Omega^{-} candidates, with TPC PID} Vs Y_{#Omega}; Pt_{cascade} (GeV/c); M( #Lambda , K^{-} ) (GeV/c^{2}); Y_{#Omega}", 100, 0., 10.0, 500, 1.5, 2.5, 48, -1.2,1.2); + fListHistCascade->Add(f3dHistXiPtVsEffMassVsYWithTpcPIDOmegaMinus); +} + + + +if(! fCFContCascadePIDXiMinus) { + const Int_t lNbSteps = 7 ; + const Int_t lNbVariables = 4 ; + + //array for the number of bins in each dimension : + Int_t lNbBinsPerVar[4]; + lNbBinsPerVar[0] = 100; + lNbBinsPerVar[1] = 400; + lNbBinsPerVar[2] = 48; + lNbBinsPerVar[3] = 250; + + + fCFContCascadePIDXiMinus = new AliCFContainer("fCFContCascadePIDXiMinus","Pt_{cascade} Vs M_{#Xi^{-} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar ); + + //setting the bin limits (valid for v4-18-10-AN) + fCFContCascadePIDXiMinus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade) + fCFContCascadePIDXiMinus->SetBinLimits(1, 1.2 , 2.0 ); // Xi Effective mass + fCFContCascadePIDXiMinus->SetBinLimits(2, -1.2 , 1.2 ); // Rapidity + if(fCollidingSystems) + fCFContCascadePIDXiMinus->SetBinLimits(3, 0.0, 20000.0 ); // TPCrefitTrackMultiplicity + else + fCFContCascadePIDXiMinus->SetBinLimits(3, 0.0, 250.0 ); // TPCrefitTrackMultiplicity + + // Setting the step title : one per PID case + fCFContCascadePIDXiMinus->SetStepTitle(0, "No PID"); + fCFContCascadePIDXiMinus->SetStepTitle(1, "TPC PID / 3-#sigma cut on Bachelor track"); + fCFContCascadePIDXiMinus->SetStepTitle(2, "TPC PID / 3-#sigma cut on Bachelor+Baryon tracks"); + fCFContCascadePIDXiMinus->SetStepTitle(3, "TPC PID / 3-#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}"); + fCFContCascadePIDXiMinus->SetVarTitle(3, "TPCrefit track Multiplicity"); + + fListHistCascade->Add(fCFContCascadePIDXiMinus); + +} + +if(! fCFContCascadePIDXiPlus) { + const Int_t lNbSteps = 7 ; + const Int_t lNbVariables = 4 ; + + //array for the number of bins in each dimension : + Int_t lNbBinsPerVar[4]; + lNbBinsPerVar[0] = 100; + lNbBinsPerVar[1] = 400; + lNbBinsPerVar[2] = 48; + lNbBinsPerVar[3] = 250; + + + fCFContCascadePIDXiPlus = new AliCFContainer("fCFContCascadePIDXiPlus","Pt_{cascade} Vs M_{#Xi^{+} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar ); + + + //setting the bin limits (valid for v4-18-10-AN) + fCFContCascadePIDXiPlus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade) + fCFContCascadePIDXiPlus->SetBinLimits(1, 1.2 , 2.0 ); // Xi Effective mass + fCFContCascadePIDXiPlus->SetBinLimits(2, -1.2 , 1.2 ); // Rapidity + if(fCollidingSystems) + fCFContCascadePIDXiPlus->SetBinLimits(3, 0.0, 20000.0 ); // TPCrefitTrackMultiplicity + else + fCFContCascadePIDXiPlus->SetBinLimits(3, 0.0, 250.0 ); // TPCrefitTrackMultiplicity + + // Setting the step title : one per PID case + fCFContCascadePIDXiPlus->SetStepTitle(0, "No PID"); + fCFContCascadePIDXiPlus->SetStepTitle(1, "TPC PID / 3-#sigma cut on Bachelor track"); + fCFContCascadePIDXiPlus->SetStepTitle(2, "TPC PID / 3-#sigma cut on Bachelor+Baryon tracks"); + fCFContCascadePIDXiPlus->SetStepTitle(3, "TPC PID / 3-#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}"); + fCFContCascadePIDXiPlus->SetVarTitle(3, "TPCrefit track Multiplicity"); + + fListHistCascade->Add(fCFContCascadePIDXiPlus); + +} + + +if(! fCFContCascadePIDOmegaMinus) { + const Int_t lNbSteps = 7 ; + const Int_t lNbVariables = 4 ; + + //array for the number of bins in each dimension : + Int_t lNbBinsPerVar[4]; + lNbBinsPerVar[0] = 100; + lNbBinsPerVar[1] = 500; + lNbBinsPerVar[2] = 48; + lNbBinsPerVar[3] = 250; + + + fCFContCascadePIDOmegaMinus = new AliCFContainer("fCFContCascadePIDOmegaMinus","Pt_{cascade} Vs M_{#Omega^{-} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar ); + + + //setting the bin limits (valid for v4-18-10-AN) + fCFContCascadePIDOmegaMinus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade) + fCFContCascadePIDOmegaMinus->SetBinLimits(1, 1.5 , 2.5 ); // Omega Effective mass + fCFContCascadePIDOmegaMinus->SetBinLimits(2, -1.2 , 1.2 ); // Rapidity + if(fCollidingSystems) + fCFContCascadePIDOmegaMinus->SetBinLimits(3, 0.0, 20000.0 ); // TPCrefitTrackMultiplicity + else + fCFContCascadePIDOmegaMinus->SetBinLimits(3, 0.0, 250.0 ); // TPCrefitTrackMultiplicity + + // Setting the step title : one per PID case + fCFContCascadePIDOmegaMinus->SetStepTitle(0, "No PID"); + fCFContCascadePIDOmegaMinus->SetStepTitle(1, "TPC PID / 3-#sigma cut on Bachelor track"); + fCFContCascadePIDOmegaMinus->SetStepTitle(2, "TPC PID / 3-#sigma cut on Bachelor+Baryon tracks"); + fCFContCascadePIDOmegaMinus->SetStepTitle(3, "TPC PID / 3-#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}"); + fCFContCascadePIDOmegaMinus->SetVarTitle(3, "TPCrefit track Multiplicity"); + + fListHistCascade->Add(fCFContCascadePIDOmegaMinus); + +} + +if(! fCFContCascadePIDOmegaPlus) { + const Int_t lNbSteps = 7 ; + const Int_t lNbVariables = 4 ; + + //array for the number of bins in each dimension : + Int_t lNbBinsPerVar[4]; + lNbBinsPerVar[0] = 100; + lNbBinsPerVar[1] = 500; + lNbBinsPerVar[2] = 48; + lNbBinsPerVar[3] = 250; + + + fCFContCascadePIDOmegaPlus = new AliCFContainer("fCFContCascadePIDOmegaPlus","Pt_{cascade} Vs M_{#Omega^{+} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar ); + + + //setting the bin limits (valid for v4-18-10-AN) + fCFContCascadePIDOmegaPlus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade) + fCFContCascadePIDOmegaPlus->SetBinLimits(1, 1.5 , 2.5 ); // Omega Effective mass + fCFContCascadePIDOmegaPlus->SetBinLimits(2, -1.2 , 1.2 ); // Rapidity + if(fCollidingSystems) + fCFContCascadePIDOmegaPlus->SetBinLimits(3, 0.0, 20000.0 ); // TPCrefitTrackMultiplicity + else + fCFContCascadePIDOmegaPlus->SetBinLimits(3, 0.0, 250.0 ); // TPCrefitTrackMultiplicity + + // Setting the step title : one per PID case + fCFContCascadePIDOmegaPlus->SetStepTitle(0, "No PID"); + fCFContCascadePIDOmegaPlus->SetStepTitle(1, "TPC PID / 3-#sigma cut on Bachelor track"); + fCFContCascadePIDOmegaPlus->SetStepTitle(2, "TPC PID / 3-#sigma cut on Bachelor+Baryon tracks"); + fCFContCascadePIDOmegaPlus->SetStepTitle(3, "TPC PID / 3-#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}"); + fCFContCascadePIDOmegaPlus->SetVarTitle(3, "TPCrefit track Multiplicity"); + + fListHistCascade->Add(fCFContCascadePIDOmegaPlus); + +} + + + + + + + + + + + +// Part 3 : Towards the optimisation of topological selections ------- +if(! fCFContCascadeCuts){ + + // Container meant to store all the relevant distributions corresponding to the cut variables. + // So far, 19 variables have been identified. + // The following will be done in quite an inelegant way. + // Improvement expected later. + const Int_t lNbSteps = 2 ; + const Int_t lNbVariables = 18 ; + + //array for the number of bins in each dimension : + Int_t lNbBinsPerVar[18]; + lNbBinsPerVar[0] = 25; + lNbBinsPerVar[1] = 25; + lNbBinsPerVar[2] = 20; + lNbBinsPerVar[3] = 40; + lNbBinsPerVar[4] = 50; + lNbBinsPerVar[5] = 12; + + lNbBinsPerVar[6] = 20; + lNbBinsPerVar[7] = 40; + lNbBinsPerVar[8] = 40; + lNbBinsPerVar[9] = 25; + lNbBinsPerVar[10] = 25; + + lNbBinsPerVar[11] = 60; + lNbBinsPerVar[12] = 50; + + lNbBinsPerVar[13] = 20; + lNbBinsPerVar[14] = 20; + + lNbBinsPerVar[15] = 50; + lNbBinsPerVar[16] = 50; + lNbBinsPerVar[17] = 35; + + fCFContCascadeCuts = new AliCFContainer("fCFContCascadeCuts","Container for Cascade cuts", lNbSteps, lNbVariables, lNbBinsPerVar ); + + + //setting the bin limits (valid for v4-18-10-AN on) + fCFContCascadeCuts->SetBinLimits(0, 0.0 , 0.25 ); // DcaXiDaughters + fCFContCascadeCuts->SetBinLimits(1, 0.0 , 0.25 ); // DcaBachToPrimVertexXi + fCFContCascadeCuts->SetBinLimits(2, 0.995, 1.0 ); // XiCosineOfPointingAngle + fCFContCascadeCuts->SetBinLimits(3, 0.0 , 4.0 ); // XiRadius + fCFContCascadeCuts->SetBinLimits(4, 1.1 , 1.15 ); // InvMassLambdaAsCascDghter + fCFContCascadeCuts->SetBinLimits(5, 0.0 , 0.6 ); // DcaV0DaughtersXi + fCFContCascadeCuts->SetBinLimits(6, 0.98 , 1.0 ); // V0CosineOfPointingAngleXi + fCFContCascadeCuts->SetBinLimits(7, 0.0 , 20.0 ); // V0RadiusXi + fCFContCascadeCuts->SetBinLimits(8, 0.0 , 1.0 ); // DcaV0ToPrimVertexXi + fCFContCascadeCuts->SetBinLimits(9, 0.0 , 2.5 ); // DcaPosToPrimVertexXi + fCFContCascadeCuts->SetBinLimits(10, 0.0 , 2.5 ); // DcaNegToPrimVertexXi + fCFContCascadeCuts->SetBinLimits(11, 1.25 , 1.45 ); // InvMassXi + fCFContCascadeCuts->SetBinLimits(12, 1.6 , 1.8 ); // InvMassOmega + fCFContCascadeCuts->SetBinLimits(13, 0.0 , 10.0 ); // XiTransvMom + fCFContCascadeCuts->SetBinLimits(14, -10.0 , 10.0 ); // BestPrimaryVtxPosZ + if(fCollidingSystems){ + fCFContCascadeCuts->SetBinLimits(15, 0.0, 10000.0 ); // TPCrefitTrackMultiplicity + fCFContCascadeCuts->SetBinLimits(16, 0.0, 10000.0 ); // SPDTrackletsMultiplicity + } + else{ + fCFContCascadeCuts->SetBinLimits(15, 0.0, 250.0 ); // TPCrefitTrackMultiplicity + fCFContCascadeCuts->SetBinLimits(16, 0.0, 250.0 ); // SPDTrackletsMultiplicity + } + fCFContCascadeCuts->SetBinLimits(17, 25.0 ,165.0 ); // BachTPCClusters + + + + // Setting the number of steps : one for negative cascades (Xi- and Omega-), another for the positve cascades(Xi+ and Omega+) + fCFContCascadeCuts->SetStepTitle(0, "Negative Cascades"); + fCFContCascadeCuts->SetStepTitle(1, "Positive Cascades"); + + // Setting the variable title, per axis + // fCFContCascadeCuts->SetVarTitle(0, "Chi2Xi"); + fCFContCascadeCuts->SetVarTitle(0, "DcaXiDaughters"); + fCFContCascadeCuts->SetVarTitle(1, "DcaBachToPrimVertexXi"); + fCFContCascadeCuts->SetVarTitle(2, "XiCosineOfPointingAngle"); + fCFContCascadeCuts->SetVarTitle(3, "XiRadius"); + fCFContCascadeCuts->SetVarTitle(4, "InvMassLambdaAsCascDghter"); + // fCFContCascadeCuts->SetVarTitle(0, "V0Chi2Xi"); + fCFContCascadeCuts->SetVarTitle(5, "DcaV0DaughtersXi"); + + fCFContCascadeCuts->SetVarTitle(6, "V0CosineOfPointingAngleXi"); + fCFContCascadeCuts->SetVarTitle(7, "V0RadiusXi"); + fCFContCascadeCuts->SetVarTitle(8, "DcaV0ToPrimVertexXi"); + fCFContCascadeCuts->SetVarTitle(9, "DcaPosToPrimVertexXi"); + fCFContCascadeCuts->SetVarTitle(10, "DcaNegToPrimVertexXi"); + + fCFContCascadeCuts->SetVarTitle(11, "InvMassXi"); + fCFContCascadeCuts->SetVarTitle(12, "InvMassOmega"); + + fCFContCascadeCuts->SetVarTitle(13, "XiTransvMom"); + //fCFContCascadeCuts->SetVarTitle(14, "V0toXiCosineOfPointingAngle"); + fCFContCascadeCuts->SetVarTitle(14, "BestPrimaryVtxPosZ"); + + fCFContCascadeCuts->SetVarTitle(15, "TPCrefit track Multiplicity"); + fCFContCascadeCuts->SetVarTitle(16, "SPDTrackletsMultiplicity"); + fCFContCascadeCuts->SetVarTitle(17, "BachTPCClusters"); + + fListHistCascade->Add(fCFContCascadeCuts); +} + +// Part 4 : Angular correlation study ------- + +if(! fHnSpAngularCorrXiMinus){ + // Delta Phi(Casc,any trck) Vs Delta Eta(Casc,any trck) Vs Casc Pt Vs Pt of the tracks + // Delta Phi = 360 bins de -180., 180. + // Delta Eta = 120 bins de -3.0, 3.0 + // Pt Cascade = 100 bins de 0., 10.0, + // Pt track = 150 bins de 0., 15.0 + + Int_t bins[5] = { 360, 120, 100, 150, 40}; + Double_t xmin[5] = {-50., -3., 0., 0., 1.30}; + Double_t xmax[5] = { 310., 3., 10., 15., 1.34}; + fHnSpAngularCorrXiMinus = new THnSparseF("fHnSpAngularCorrXiMinus", "Angular Correlation for #Xi^{-}:", 5, bins, xmin, xmax); + fHnSpAngularCorrXiMinus->GetAxis(0)->SetTitle(" #Delta#phi(Casc,Track) (deg)"); + fHnSpAngularCorrXiMinus->GetAxis(1)->SetTitle(" #Delta#eta(Casc,Track)"); + fHnSpAngularCorrXiMinus->GetAxis(2)->SetTitle(" Pt_{Casc} (GeV/c)"); + fHnSpAngularCorrXiMinus->GetAxis(3)->SetTitle(" Pt_{any track} (GeV/c)"); + fHnSpAngularCorrXiMinus->GetAxis(4)->SetTitle(" Eff. Inv Mass (GeV/c^{2})"); + fHnSpAngularCorrXiMinus->Sumw2(); + fListHistCascade->Add(fHnSpAngularCorrXiMinus); +} + +if(! fHnSpAngularCorrXiPlus){ + // Delta Phi(Casc,any trck) Vs Delta Eta(Casc,any trck) Vs Casc Pt Vs Pt of the tracks + // Delta Phi = 360 bins de -180., 180. + // Delta Eta = 120 bins de -3.0, 3.0 + // Pt Cascade = 100 bins de 0., 10.0, + // Pt track = 150 bins de 0., 15.0 + Int_t bins[5] = { 360, 120, 100, 150, 40}; + Double_t xmin[5] = {-50., -3., 0., 0., 1.30}; + Double_t xmax[5] = { 310., 3., 10., 15., 1.34}; + fHnSpAngularCorrXiPlus = new THnSparseF("fHnSpAngularCorrXiPlus", "Angular Correlation for #Xi^{+}:", 5, bins, xmin, xmax); + fHnSpAngularCorrXiPlus->GetAxis(0)->SetTitle(" #Delta#phi(Casc,Track) (deg)"); + fHnSpAngularCorrXiPlus->GetAxis(1)->SetTitle(" #Delta#eta(Casc,Track)"); + fHnSpAngularCorrXiPlus->GetAxis(2)->SetTitle(" Pt_{Casc} (GeV/c)"); + fHnSpAngularCorrXiPlus->GetAxis(3)->SetTitle(" Pt_{any track} (GeV/c)"); + fHnSpAngularCorrXiPlus->GetAxis(4)->SetTitle(" Eff. Inv Mass (GeV/c^{2})"); + fHnSpAngularCorrXiPlus->Sumw2(); + fListHistCascade->Add(fHnSpAngularCorrXiPlus); +} + +if(! fHnSpAngularCorrOmegaMinus){ + // Delta Phi(Casc,any trck) Vs Delta Eta(Casc,any trck) Vs Casc Pt Vs Pt of the tracks + // Delta Phi = 360 bins de -180., 180. + // Delta Eta = 120 bins de -3.0, 3.0 + // Pt Cascade = 100 bins de 0., 10.0, + // Pt track = 150 bins de 0., 15.0 + + Int_t bins[5] = { 360, 120, 100, 150, 40}; + Double_t xmin[5] = {-50., -3., 0., 0., 1.65}; + Double_t xmax[5] = { 310., 3., 10., 15., 1.69}; + fHnSpAngularCorrOmegaMinus = new THnSparseF("fHnSpAngularCorrOmegaMinus", "Angular Correlation for #Omega^{-}:", 5, bins, xmin, xmax); + fHnSpAngularCorrOmegaMinus->GetAxis(0)->SetTitle(" #Delta#phi(Casc,Track) (deg)"); + fHnSpAngularCorrOmegaMinus->GetAxis(1)->SetTitle(" #Delta#eta(Casc,Track)"); + fHnSpAngularCorrOmegaMinus->GetAxis(2)->SetTitle(" Pt_{Casc} (GeV/c)"); + fHnSpAngularCorrOmegaMinus->GetAxis(3)->SetTitle(" Pt_{any track} (GeV/c)"); + fHnSpAngularCorrOmegaMinus->GetAxis(4)->SetTitle(" Eff. Inv Mass (GeV/c^{2})"); + fHnSpAngularCorrOmegaMinus->Sumw2(); + fListHistCascade->Add(fHnSpAngularCorrOmegaMinus); +} + +if(! fHnSpAngularCorrOmegaPlus){ + // Delta Phi(Casc,any trck) Vs Delta Eta(Casc,any trck) Vs Casc Pt Vs Pt of the tracks + // Delta Phi = 360 bins de -180., 180. + // Delta Eta = 120 bins de -3.0, 3.0 + // Pt Cascade = 100 bins de 0., 10.0, + // Pt track = 150 bins de 0., 15.0 + Int_t bins[5] = { 360, 120, 100, 150, 40}; + Double_t xmin[5] = {-50., -3., 0., 0., 1.65}; + Double_t xmax[5] = { 310., 3., 10., 15., 1.69}; + fHnSpAngularCorrOmegaPlus = new THnSparseF("fHnSpAngularCorrOmegaPlus", "Angular Correlation for #Omega^{+}:", 5, bins, xmin, xmax); + fHnSpAngularCorrOmegaPlus->GetAxis(0)->SetTitle(" #Delta#phi(Casc,Track) (deg)"); + fHnSpAngularCorrOmegaPlus->GetAxis(1)->SetTitle(" #Delta#eta(Casc,Track)"); + fHnSpAngularCorrOmegaPlus->GetAxis(2)->SetTitle(" Pt_{Casc} (GeV/c)"); + fHnSpAngularCorrOmegaPlus->GetAxis(3)->SetTitle(" Pt_{any track} (GeV/c)"); + fHnSpAngularCorrOmegaPlus->GetAxis(4)->SetTitle(" Eff. Inv Mass (GeV/c^{2})"); + fHnSpAngularCorrOmegaPlus->Sumw2(); + fListHistCascade->Add(fHnSpAngularCorrOmegaPlus); +} + }// end UserCreateOutputObjects @@ -488,10 +1090,12 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *) { // Main loop // Called for each event - - AliESDEvent *lESDevent = 0x0; - AliAODEvent *lAODevent = 0x0; - Int_t ncascades = -1; + + AliESDEvent *lESDevent = 0x0; + AliAODEvent *lAODevent = 0x0; + Int_t ncascades = -1; + Int_t nTrackMultiplicity = -1; + Int_t nTrackWithTPCrefitMultiplicity = 0; // Connect to the InputEvent @@ -500,125 +1104,197 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *) if(fAnalysisType == "ESD"){ lESDevent = dynamic_cast( InputEvent() ); if (!lESDevent) { - Printf("ERROR: lESDevent not available \n"); + AliWarning("ERROR: lESDevent not available \n"); return; } - ncascades = lESDevent->GetNumberOfCascades(); - } + //------------------------------------------------- + // 0 - Trigger managment + // FIXME : Check the availability of the proper trigger + + // 1st option + //if( !MCEvent() ){ // 0x0 = real data or 1 = there is MC truth available, so = data from MC + // if ( !( lESDevent->IsTriggerClassFired("CINT1B-ABCE-NOPF-ALL")) ) return; + //} + + // 2nd option - Presuppose the presence of AliPhysicsSelectionTask + Bool_t isSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected(); + if ( ! isSelected ) return; + //else Printf("Event selected ... \n"); + + + + //------------------------------------------------- + // 1 - Cascade vertexer (ESD) + + // if(fAnalysisType == "ESD" ){ + // lESDevent->ResetCascades(); + // lESDevent->ResetV0s(); + // + // AliV0vertexer V0vtxer; + // AliCascadeVertexer CascVtxer; + // + // Double_t v0sels[]={33, // max allowed chi2 + // 0.01, // min allowed impact parameter for the 1st daughter (LHC09a4 : 0.05) + // 0.01, // min allowed impact parameter for the 2nd daughter (LHC09a4 : 0.05) + // 2.0, // max allowed DCA between the daughter tracks (LHC09a4 : 0.5) + // 0.0, // max allowed cosine of V0's pointing angle (LHC09a4 : 0.99) + // 0.2, // min radius of the fiducial volume (LHC09a4 : 0.2) + // 100 // max radius of the fiducial volume (LHC09a4 : 100.0) + // }; + // V0vtxer.SetDefaultCuts(v0sels); + // + // Double_t xisels[]={33., // max allowed chi2 (same as PDC07) + // 0.02, // min allowed V0 impact parameter (PDC07 : 0.05 / LHC09a4 : 0.025 ) + // 0.008, // "window" around the Lambda mass (PDC07 : 0.008 / LHC09a4 : 0.010 ) + // 0.01 , // min allowed bachelor's impact parameter (PDC07 : 0.035 / LHC09a4 : 0.025 ) + // 0.5, // max allowed DCA between the V0 and the bachelor (PDC07 : 0.1 / LHC09a4 : 0.2 ) + // 0.98, // min allowed cosine of the cascade pointing angle (PDC07 : 0.9985 / LHC09a4 : 0.998 ) + // 0.2, // min radius of the fiducial volume (PDC07 : 0.9 / LHC09a4 : 0.2 ) + // 100 // max radius of the fiducial volume (PDC07 : 100 / LHC09a4 : 100 ) + // }; + // CascVtxer.SetDefaultCuts(xisels); + // + // V0vtxer.Tracks2V0vertices(lESDevent); + // CascVtxer.V0sTracks2CascadeVertices(lESDevent); + // } + + + //------------------------------------------------- + ncascades = lESDevent->GetNumberOfCascades(); + nTrackWithTPCrefitMultiplicity = DoESDTrackWithTPCrefitMultiplicity(lESDevent); + + + }//if (fAnalysisType == "ESD") if(fAnalysisType == "AOD"){ lAODevent = dynamic_cast( InputEvent() ); if (!lAODevent) { - Printf("ERROR: lAODevent not available \n"); + AliWarning("ERROR: lAODevent not available \n"); return; } ncascades = lAODevent->GetNumberOfCascades(); + // Printf("Number of cascade(s) = %d \n", ncascades); } - - // --------------------------------------------------------------- - // I - Initialisation of the local variables that will be needed - - // - 0th part of initialisation : around primary vertex ... - Short_t lStatusTrackingPrimVtx = -2; - Double_t lTrkgPrimaryVtxPos[3] = {-100.0, -100.0, -100.0}; - Double_t lTrkgPrimaryVtxRadius3D = -500.0; + nTrackMultiplicity = (InputEvent())->GetNumberOfTracks(); + - Double_t lBestPrimaryVtxPos[3] = {-100.0, -100.0, -100.0}; - Double_t lBestPrimaryVtxRadius3D = -500.0; - // - 1st part of initialisation : variables needed to store AliESDCascade data members - Double_t lEffMassXi = 0. ; - Double_t lChi2Xi = 0. ; - Double_t lDcaXiDaughters = 0. ; - Double_t lXiCosineOfPointingAngle = 0. ; - Double_t lPosXi[3] = { -1000.0, -1000.0, -1000.0 }; - Double_t lXiRadius = 0. ; - - // - 2nd part of initialisation : about V0 part in cascades + // --------------------------------------------------------------- + // I - General histos (filled for any event) - Double_t lInvMassLambdaAsCascDghter = 0.; - Double_t lV0Chi2Xi = 0. ; - Double_t lDcaV0DaughtersXi = 0.; - - Double_t lDcaBachToPrimVertexXi = 0., lDcaV0ToPrimVertexXi = 0.; - Double_t lDcaPosToPrimVertexXi = 0.; - Double_t lDcaNegToPrimVertexXi = 0.; - Double_t lV0CosineOfPointingAngleXi = 0. ; - Double_t lPosV0Xi[3] = { -1000. , -1000., -1000. }; // Position of VO coming from cascade - Double_t lV0RadiusXi = -1000.0; - Double_t lV0quality = 0.; + fHistTrackMultiplicity ->Fill( nTrackMultiplicity ); + fHistTPCrefitTrackMultiplicity ->Fill( nTrackWithTPCrefitMultiplicity ); + fHistCascadeMultiplicity ->Fill( ncascades ); - - // - 3rd part of initialisation : Effective masses - Double_t lInvMassXiMinus = 0.; - Double_t lInvMassXiPlus = 0.; - Double_t lInvMassOmegaMinus = 0.; - Double_t lInvMassOmegaPlus = 0.; - - - // - 4th part of initialisation : extra info for QA + // --------------------------------------------------------------- + // II - Calcultaion Part dedicated to Xi vertices - Double_t lXiMomX = 0., lXiMomY = 0., lXiMomZ = 0.; - Double_t lXiTransvMom = 0. ; - Double_t lXiTotMom = 0. ; - - Double_t lBachMomX = 0., lBachMomY = 0., lBachMomZ = 0.; - Double_t lBachTransvMom = 0.; - Double_t lBachTotMom = 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; - + for (Int_t iXi = 0; iXi < ncascades; iXi++) + {// This is the begining of the Cascade loop (ESD or AOD) + + // ------------------------------------- + // II.Init - Initialisation of the local variables that will be needed for ESD/AOD - //------------------------------------------------- - // O - Cascade vertexer (ESD) + // - 0th part of initialisation : around primary vertex ... + Short_t lStatusTrackingPrimVtx = -2; + Double_t lTrkgPrimaryVtxPos[3] = {-100.0, -100.0, -100.0}; + Double_t lTrkgPrimaryVtxRadius3D = -500.0; + + Double_t lBestPrimaryVtxPos[3] = {-100.0, -100.0, -100.0}; + Double_t lBestPrimaryVtxRadius3D = -500.0; + + // - 1st part of initialisation : variables needed to store AliESDCascade data members + Double_t lEffMassXi = 0. ; + Double_t lChi2Xi = 0. ; + Double_t lDcaXiDaughters = 0. ; + Double_t lXiCosineOfPointingAngle = 0. ; + Double_t lPosXi[3] = { -1000.0, -1000.0, -1000.0 }; + Double_t lXiRadius = 0. ; + + // - 2nd part of initialisation : Nbr of clusters within TPC for the 3 daughter cascade tracks + Int_t lPosTPCClusters = -1; // For ESD only ...//FIXME : wait for availability in AOD + Int_t lNegTPCClusters = -1; // For ESD only ... + Int_t lBachTPCClusters = -1; // For ESD only ... + + // - 3rd part of initialisation : about V0 part in cascades + Double_t lInvMassLambdaAsCascDghter = 0.; + Double_t lV0Chi2Xi = 0. ; + Double_t lDcaV0DaughtersXi = 0.; + + Double_t lDcaBachToPrimVertexXi = 0., lDcaV0ToPrimVertexXi = 0.; + Double_t lDcaPosToPrimVertexXi = 0.; + Double_t lDcaNegToPrimVertexXi = 0.; + Double_t lV0CosineOfPointingAngleXi = 0. ; + Double_t lPosV0Xi[3] = { -1000. , -1000., -1000. }; // Position of VO coming from cascade + Double_t lV0RadiusXi = -1000.0; + Double_t lV0quality = 0.; - // if(fAnalysisType == "ESD" ){ - // lESDevent->ResetCascades(); - // AliCascadeVertexer CascVtxer; - // CascVtxer.V0sTracks2CascadeVertices(lESDevent); - // } + + // - 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; // For ESD only ...//FIXME : wait for availability in AOD + Bool_t lIsBachelorPionForTPC = kFALSE; // For ESD only ... + Bool_t lIsNegPionForTPC = kFALSE; // For ESD only ... + Bool_t lIsPosPionForTPC = kFALSE; // For ESD only ... + Bool_t lIsNegProtonForTPC = kFALSE; // For ESD only ... + Bool_t lIsPosProtonForTPC = kFALSE; // For ESD only ... + + // - 6th part of initialisation : extra info for QA + Double_t lXiMomX = 0. , lXiMomY = 0., lXiMomZ = 0.; + Double_t lXiTransvMom = 0. ; + Double_t lXiTotMom = 0. ; + + Double_t lBachMomX = 0., lBachMomY = 0., lBachMomZ = 0.; + Double_t lBachTransvMom = 0.; + Double_t lBachTotMom = 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; + + // - 7th part of initialisation : variables for the AliCFContainer dedicated to cascade cut optmisiation + Int_t lSPDTrackletsMultiplicity = -1; - // --------------------------------------------------------------- - // I - General histos (filled for any event) - (ESD) + // - 8th part of initialisation : variables needed for Angular correlations + TVector3 lTVect3MomXi(0.,0.,0.); + Int_t lArrTrackID[3] = {-1, -1, -1}; - fHistTrackMultiplicity ->Fill( (InputEvent())->GetNumberOfTracks() ); - fHistCascadeMultiplicity->Fill( ncascades ); - - - - - for (Int_t iXi = 0; iXi < ncascades; iXi++) - {// This is the begining of the Cascade loop (ESD or AOD) - if(fAnalysisType == "ESD"){ // ------------------------------------- - // II - Calcultaion Part dedicated to Xi vertices (ESD) + // II.ESD - Calcultaion Part dedicated to Xi vertices (ESD) AliESDcascade *xi = lESDevent->GetCascade(iXi); if (!xi) continue; - - // Just to know which file is currently open : locate the file containing Xi - // cout << "Name of the file containing Xi candidate(s) :" - // << fInputHandler->GetTree()->GetCurrentFile()->GetName() - // << endl; - // - II.Step 1 : Characteristics of the event : prim. Vtx + magnetic field (ESD) //------------- - // For new code (v4-16-Release-Rev06 or trunk) - const AliESDVertex *lPrimaryTrackingVtx = lESDevent->GetPrimaryVertexTracks(); // get the vtx stored in ESD found with tracks @@ -640,7 +1316,23 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *) lBestPrimaryVtxRadius3D = TMath::Sqrt( lBestPrimaryVtxPos[0] * lBestPrimaryVtxPos[0] + lBestPrimaryVtxPos[1] * lBestPrimaryVtxPos[1] + lBestPrimaryVtxPos[2] * lBestPrimaryVtxPos[2] ); - + + // FIXME : quality cut on the z-position of the prim vertex. + Bool_t kQualityCutZprimVtxPos = kTRUE; + if(kQualityCutZprimVtxPos) { + if(TMath::Abs(lBestPrimaryVtxPos[2]) > 10.0 ) { AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !"); return; } + } + // FIXME : remove TPC-only primary vertex : retain only events with tracking + SPD vertex + Bool_t kQualityCutNoTPConlyPrimVtx = kTRUE; + if(kQualityCutNoTPConlyPrimVtx) { + const AliESDVertex *lPrimarySPDVtx = lESDevent->GetPrimaryVertexSPD(); + if (!lPrimarySPDVtx->GetStatus() && !lPrimaryTrackingVtx->GetStatus() ){ + AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !"); + return; + } + } + + // For older evts @@ -680,6 +1372,7 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *) // Back to normal Double_t lMagneticField = lESDevent->GetMagneticField( ); + // FIXME if(TMath::Abs(lMagneticField ) < 10e-6) continue; @@ -705,20 +1398,53 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *) // ~ 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 ... - + 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 ... + + // FIXME : 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; + } + 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; - } + if (!pTrackXi || !nTrackXi || !bachTrackXi ) { + AliWarning("ERROR: Could not retrieve one of the 3 ESD daughter tracks of the cascade ..."); + continue; + } + + lPosTPCClusters = pTrackXi->GetTPCNcls(); + lNegTPCClusters = nTrackXi->GetTPCNcls(); + lBachTPCClusters = bachTrackXi->GetTPCNcls(); + + // FIXME : rejection of a poor quality tracks + Bool_t kQualityCutTPCrefit = kTRUE; + Bool_t kQualityCut80TPCcls = kTRUE; + + if(kQualityCutTPCrefit){ + // 1 - 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(kQualityCut80TPCcls){ + // 2 - Poor quality related to TPC clusters + if(lPosTPCClusters < 80) { AliWarning("Pb / V0 Pos. track has less than 80 TPC clusters ... continue!"); continue; } + if(lNegTPCClusters < 80) { AliWarning("Pb / V0 Neg. track has less than 80 TPC clusters ... continue!"); continue; } + if(lBachTPCClusters < 80) { AliWarning("Pb / Bach. track has less than 80 TPC clusters ... continue!"); continue; } + } + lInvMassLambdaAsCascDghter = xi->GetEffMass(); // This value shouldn't change, whatever the working hyp. is : Xi-, Xi+, Omega-, Omega+ lDcaV0DaughtersXi = xi->GetDcaV0Daughters(); @@ -747,42 +1473,210 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *) lDcaNegToPrimVertexXi = TMath::Abs( nTrackXi ->GetD( lBestPrimaryVtxPos[0], lBestPrimaryVtxPos[1], lMagneticField ) ); + + // - II.Step 3' : extra-selection for cascade candidates + // Towards optimisation of AA selection + // FIXME + Bool_t kExtraSelections = kFALSE; + + if(kExtraSelections){ + // if(lChi2Xi > 2000) continue; + // if(lV0Chi2Xi > 2000) continue; + + if(lDcaXiDaughters > 0.05) continue; // > 0.1 by default + //if(lXiCosineOfPointingAngle < 0.999 ) continue; + if(lXiRadius < 1.0) continue; + if(lXiRadius > 100) continue; + if(TMath::Abs(lInvMassLambdaAsCascDghter-1.11568) > 0.007) continue; + if(lDcaV0DaughtersXi > 0.3) continue; + + if(lV0CosineOfPointingAngleXi > 0.9999) continue; + //if(lDcaV0ToPrimVertexXi < 0.09) continue; + if(lDcaBachToPrimVertexXi < 0.04) continue; + + if(lV0RadiusXi < 1.0) continue; + if(lV0RadiusXi > 100) continue; + //if(lDcaPosToPrimVertexXi < 0.6) continue; + //if(lDcaNegToPrimVertexXi < 0.6) continue; + } + // - II.Step 4 : around effective masses (ESD) // ~ change mass hypotheses to cover all the possibilities : Xi-/+, Omega -/+ //------------- - lV0quality = 0.; - xi->ChangeMassHypothesis(lV0quality , 3312); // Calculate the effective mass of the Xi- candidate. - // pdg code 3312 = Xi- - if( bachTrackXi->Charge() < 0 ) - lInvMassXiMinus = xi->GetEffMassXi(); - - lV0quality = 0.; - xi->ChangeMassHypothesis(lV0quality , -3312); // Calculate the effective mass of the Xi+ candidate. - // pdg code -3312 = Xi+ - if( bachTrackXi->Charge() > 0 ) - lInvMassXiPlus = xi->GetEffMassXi(); - - lV0quality = 0.; - xi->ChangeMassHypothesis(lV0quality , 3334); // Calculate the effective mass of the Xi- candidate. - // pdg code 3334 = Omega- - if( bachTrackXi->Charge() < 0 ) - lInvMassOmegaMinus = xi->GetEffMassXi(); + + if( bachTrackXi->Charge() < 0 ) { + lV0quality = 0.; + xi->ChangeMassHypothesis(lV0quality , 3312); + // Calculate the effective mass of the Xi- candidate. + // pdg code 3312 = Xi- + lInvMassXiMinus = xi->GetEffMassXi(); - lV0quality = 0.; - xi->ChangeMassHypothesis(lV0quality , -3334); // Calculate the effective mass of the Xi+ candidate. - // pdg code -3334 = Omega+ - if( bachTrackXi->Charge() > 0 ) - lInvMassOmegaPlus = xi->GetEffMassXi(); - - lV0quality = 0.; - xi->ChangeMassHypothesis(lV0quality , 3312); // Back to default hyp. - - - // - II.Step 5 : extra info for QA (ESD) - // miscellaneous pieces onf info that may help regarding data quality assessment. + lV0quality = 0.; + xi->ChangeMassHypothesis(lV0quality , 3334); + // Calculate the effective mass of the Xi- candidate. + // pdg code 3334 = Omega- + lInvMassOmegaMinus = xi->GetEffMassXi(); + + lV0quality = 0.; + xi->ChangeMassHypothesis(lV0quality , 3312); // Back to default hyp. + }// end if negative bachelor + + + if( bachTrackXi->Charge() > 0 ){ + lV0quality = 0.; + xi->ChangeMassHypothesis(lV0quality , -3312); + // Calculate the effective mass of the Xi+ candidate. + // pdg code -3312 = Xi+ + lInvMassXiPlus = xi->GetEffMassXi(); + + lV0quality = 0.; + xi->ChangeMassHypothesis(lV0quality , -3334); + // Calculate the effective mass of the Xi+ candidate. + // pdg code -3334 = Omega+ + lInvMassOmegaPlus = xi->GetEffMassXi(); + + lV0quality = 0.; + xi->ChangeMassHypothesis(lV0quality , -3312); // Back to "default" hyp. + }// end if positive bachelor + + + + // - II.Step 5 : PID on the daughter tracks + //------------- + + // A - Combined PID + // Reasonable guess for the priors for the cascade track sample (e-, mu, pi, K, p) + Double_t lPriorsGuessXi[5] = {0, 0, 2, 0, 1}; + Double_t lPriorsGuessOmega[5] = {0, 0, 1, 1, 1}; + + // Combined VO-positive-daughter PID + AliPID pPidXi; pPidXi.SetPriors( lPriorsGuessXi ); + AliPID pPidOmega; pPidOmega.SetPriors( lPriorsGuessOmega ); + + if( pTrackXi->IsOn(AliESDtrack::kESDpid) ){ // Combined PID exists + 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; + + }// end if V0 positive track with existing combined PID + + + // Combined VO-negative-daughter PID + AliPID nPidXi; nPidXi.SetPriors( lPriorsGuessXi ); + AliPID nPidOmega; nPidOmega.SetPriors( lPriorsGuessOmega ); + + if( nTrackXi->IsOn(AliESDtrack::kESDpid) ){ // Combined PID exists + 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; + + }// end if V0 negative track with existing combined 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 + Double_t ppion = bachPidXi.GetProbability(AliPID::kPion); + if (ppion > bachPidXi.GetProbability(AliPID::kElectron) && + ppion > bachPidXi.GetProbability(AliPID::kMuon) && + ppion > bachPidXi.GetProbability(AliPID::kKaon) && + ppion > bachPidXi.GetProbability(AliPID::kProton) ) lIsBachelorPion = kTRUE; + // Check if the bachelor track is a kaon + Double_t pkaon = bachPidOmega.GetProbability(AliPID::kKaon); + if (pkaon > bachPidOmega.GetProbability(AliPID::kElectron) && + pkaon > bachPidOmega.GetProbability(AliPID::kMuon) && + pkaon > bachPidOmega.GetProbability(AliPID::kPion) && + pkaon > bachPidOmega.GetProbability(AliPID::kProton) ) lIsBachelorKaon = kTRUE; + }// end if bachelor track with existing combined PID + + + // B - TPC PID : 3-sigma bands on Bethe-Bloch curve + // Bachelor + if (TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 3) lIsBachelorKaonForTPC = kTRUE; + if (TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 3) lIsBachelorPionForTPC = kTRUE; + + // Negative V0 daughter + if (TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 3) lIsNegPionForTPC = kTRUE; + if (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 (TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 3) lIsPosProtonForTPC = kTRUE; + + + + // - II.Step 6 : extra info for QA (ESD) + // miscellaneous pieces of info that may help regarding data quality assessment. //------------- xi->GetPxPyPz( lXiMomX, lXiMomY, lXiMomZ ); @@ -806,13 +1700,56 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *) lPtArmXi = xi->PtArmXi(); + //FIXME : Extra-cut = Anti-splitting cut for lambda daughters + Bool_t kAntiSplittingLambda = kFALSE; + + if(kAntiSplittingLambda){ + 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; + } + } + + // FIXME : Just to know which file is currently open : locate the file containing Xi + // cout << "Name of the file containing Xi candidate(s) after anti-splitting cut :" + // << CurrentFileName() + // << " / entry: " << Entry() + // << " / in file: " << lESDevent->GetEventNumberInFile() // <- Cvetan / From Mihaela: AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()->GetTree()->GetReadEntry(); + // << " : mass(Xi) = " << xi->GetEffMassXi() + // << " / pt(Casc) = " << lXiTransvMom + // << " / Decay 2d R(Xi) = " << lXiRadius + // << endl; + + + // II.Step 7 - Complementary info for monitoring the cascade cut variables + + const AliMultiplicity *lAliMult = lESDevent->GetMultiplicity(); + lSPDTrackletsMultiplicity = lAliMult->GetNumberOfTracklets(); + + // II.Step 8 - Azimuthal correlation study + //------------- + + lTVect3MomXi.SetXYZ( lXiMomX, lXiMomY, lXiMomZ ); + lArrTrackID[0] = pTrackXi ->GetID(); + lArrTrackID[1] = nTrackXi ->GetID(); + lArrTrackID[2] = bachTrackXi->GetID(); + + }// end of ESD treatment if(fAnalysisType == "AOD"){ // ------------------------------------- - // II - Calcultaion Part dedicated to Xi vertices (ESD) + // II.AOD - Calcultaion Part dedicated to Xi vertices (ESD) const AliAODcascade *xi = lAODevent->GetCascade(iXi); if (!xi) continue; @@ -899,7 +1836,43 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *) if( lChargeXi > 0 ) lInvMassOmegaPlus = xi->MassOmega(); - // - II.Step 5 : extra info for QA (AOD) + // - II.Step 5 : PID on the daughters (To be developed ...) + //------------- + + // Combined PID + + /* + // Reasonable guess for the priors for the cascade track sample + Double_t lPriorsGuessXi[5] = {0.0, 0.0, 2, 0, 1}; + Double_t lPriorsGuessOmega[5] = {0.0, 0.0, 1, 1, 1}; + AliPID bachPidXi; bachPidXi.SetPriors( lPriorsGuessXi ); + AliPID bachPidOmega; bachPidOmega.SetPriors( lPriorsGuessOmega ); + + const AliAODTrack *bachTrackXi = lAODevent->GetTrack( xi->GetBachID() ); // FIXME : GetBachID not implemented ? + + if( bachTrackXi->IsOn(AliESDtrack::kESDpid) ){ // Combined PID exists, the AOD flags = a copy of the ESD ones + Double_t r[10]; bachTrackXi->GetPID(r); + bachPidXi.SetProbabilities(r); + bachPidOmega.SetProbabilities(r); + // Check if the bachelor track is a pion + Double_t ppion = bachPidXi.GetProbability(AliPID::kPion); + if (ppion > bachPidXi.GetProbability(AliPID::kElectron) && + ppion > bachPidXi.GetProbability(AliPID::kMuon) && + ppion > bachPidXi.GetProbability(AliPID::kKaon) && + ppion > bachPidXi.GetProbability(AliPID::kProton) ) lIsBachelorPion = kTRUE; + // Check if the bachelor track is a kaon + Double_t pkaon = bachPidOmega.GetProbability(AliPID::kKaon); + if (pkaon > bachPidOmega.GetProbability(AliPID::kElectron) && + pkaon > bachPidOmega.GetProbability(AliPID::kMuon) && + pkaon > bachPidOmega.GetProbability(AliPID::kPion) && + pkaon > bachPidOmega.GetProbability(AliPID::kProton) ) lIsBachelorKaon = kTRUE; + + }// end if bachelor track with existing combined PID + */ + + // TPC PID + + // - II.Step 6 : extra info for QA (AOD) // miscellaneous pieces onf info that may help regarding data quality assessment. //------------- @@ -926,15 +1899,40 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *) lAlphaXi = xi->AlphaXi(); lPtArmXi = xi->PtArmXi(); - + // II.Step 7 - Complementary info for monitoring the cascade cut variables + //FIXME : missing for AOD : Tacklet Multiplicity + TPCCluster + + // II.Step 8 - Azimuthal correlation study + //------------- + + lTVect3MomXi.SetXYZ( lXiMomX, lXiMomY, lXiMomZ ); + + AliAODTrack *pTrackXi = dynamic_cast( xi->GetDaughter(0) ); + AliAODTrack *nTrackXi = dynamic_cast( xi->GetDaughter(1) ); + AliAODTrack *bachTrackXi = dynamic_cast( xi->GetDecayVertexXi()->GetDaughter(0) ); + if (!pTrackXi || !nTrackXi || !bachTrackXi ) { + AliWarning("ERROR: Could not retrieve one of the 3 AOD daughter tracks of the cascade ..."); + continue; + } + + lArrTrackID[0] = pTrackXi ->GetID(); + lArrTrackID[1] = nTrackXi ->GetID(); + lArrTrackID[2] = bachTrackXi->GetID(); + }// end of AOD treatment - // ------------------------------------- - // III - Filling the TH1Fs + // ------------------------------------- + // II.Fill - Filling the TH1,2,3Fs - // - III.Step 1 + // - II.Fill.Step 1 : primary vertex + + fHistTPCrefitTrackMultiplicityForCascadeEvt->Fill( nTrackWithTPCrefitMultiplicity ); + + fHistPosV0TPCClusters ->Fill( lPosTPCClusters ); + fHistNegV0TPCClusters ->Fill( lNegTPCClusters ); + fHistBachTPCClusters ->Fill( lBachTPCClusters ); fHistVtxStatus ->Fill( lStatusTrackingPrimVtx ); // 1 if tracking vtx = ok @@ -953,7 +1951,7 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *) f2dHistTrkgPrimVtxVsBestPrimVtx->Fill( lTrkgPrimaryVtxRadius3D, lBestPrimaryVtxRadius3D ); - // - III.Step 2 + // II.Fill.Step 2 fHistEffMassXi ->Fill( lEffMassXi ); fHistChi2Xi ->Fill( lChi2Xi ); // Flag CascadeVtxer: Cut Variable a fHistDcaXiDaughters ->Fill( lDcaXiDaughters ); // Flag CascadeVtxer: Cut Variable e @@ -962,7 +1960,7 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *) fHistXiRadius ->Fill( lXiRadius ); // Flag CascadeVtxer: Cut Variable g+h - // - III.Step 3 + // II.Fill.Step 3 fHistMassLambdaAsCascDghter ->Fill( lInvMassLambdaAsCascDghter ); // Flag CascadeVtxer: Cut Variable c fHistV0Chi2Xi ->Fill( lV0Chi2Xi ); fHistDcaV0DaughtersXi ->Fill( lDcaV0DaughtersXi ); @@ -974,48 +1972,276 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *) fHistDcaNegToPrimVertexXi ->Fill( lDcaNegToPrimVertexXi ); - // - III.Step 4 - 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( bachTrackXi->Charge() < 0 ) fHistMassXiMinus ->Fill( lInvMassXiMinus ); -// if( bachTrackXi->Charge() > 0 ) fHistMassXiPlus ->Fill( lInvMassXiPlus ); -// if( bachTrackXi->Charge() < 0 ) fHistMassOmegaMinus ->Fill( lInvMassOmegaMinus ); -// if( bachTrackXi->Charge() > 0 ) fHistMassOmegaPlus ->Fill( lInvMassOmegaPlus ); + // II.Fill.Step 4 : extra QA info + + 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 ); - // - III.Step 5 - fHistXiTransvMom ->Fill( lXiTransvMom ); - fHistXiTotMom ->Fill( lXiTotMom ); - - fHistBachTransvMom ->Fill( lBachTransvMom ); - fHistBachTotMom ->Fill( lBachTotMom ); + fHistBachTransvMomXi ->Fill( lBachTransvMom ); + fHistBachTotMomXi ->Fill( lBachTotMom ); - fHistChargeXi ->Fill( lChargeXi ); - fHistV0toXiCosineOfPointingAngle->Fill( lV0toXiCosineOfPointingAngle ); + fHistRapXi ->Fill( lRapXi ); + fHistEtaXi ->Fill( lEta ); + fHistThetaXi ->Fill( lTheta ); + fHistPhiXi ->Fill( lPhi ); + } - fHistRapXi ->Fill( lRapXi ); - fHistRapOmega ->Fill( lRapOmega ); - fHistEta ->Fill( lEta ); - fHistTheta ->Fill( lTheta ); - fHistPhi ->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 ); + f2dHistArmenteros ->Fill( lAlphaXi, lPtArmXi ); + + // II.Fill.Step 5 : inv mass plots 1D + if( lChargeXi < 0 ){ + fHistMassXiMinus ->Fill( lInvMassXiMinus ); + fHistMassOmegaMinus ->Fill( lInvMassOmegaMinus ); + if(lIsBachelorPion) fHistMassWithCombPIDXiMinus ->Fill( lInvMassXiMinus ); + if(lIsBachelorKaon) fHistMassWithCombPIDOmegaMinus ->Fill( lInvMassOmegaMinus ); + } + + if( lChargeXi > 0 ){ + fHistMassXiPlus ->Fill( lInvMassXiPlus ); + fHistMassOmegaPlus ->Fill( lInvMassOmegaPlus ); + if(lIsBachelorPion) fHistMassWithCombPIDXiPlus ->Fill( lInvMassXiPlus ); + if(lIsBachelorKaon) fHistMassWithCombPIDOmegaPlus ->Fill( lInvMassOmegaPlus ); + } + + + // II.Fill.Step 6 : inv mass plots 2D, 3D if( lChargeXi < 0 ) { f2dHistEffMassLambdaVsEffMassXiMinus->Fill( lInvMassLambdaAsCascDghter, lInvMassXiMinus ); f2dHistEffMassXiVsEffMassOmegaMinus ->Fill( lInvMassXiMinus, lInvMassOmegaMinus ); f2dHistXiRadiusVsEffMassXiMinus ->Fill( lXiRadius, lInvMassXiMinus ); + f2dHistXiRadiusVsEffMassOmegaMinus ->Fill( lXiRadius, lInvMassOmegaMinus ); + f3dHistXiPtVsEffMassVsYXiMinus ->Fill( lXiTransvMom, lInvMassXiMinus, lRapXi ); + f3dHistXiPtVsEffMassVsYOmegaMinus ->Fill( lXiTransvMom, lInvMassOmegaMinus, lRapOmega ); + if(lIsPosInXiProton) f3dHistXiPtVsEffMassVsYWithCombPIDXiMinus ->Fill( lXiTransvMom, lInvMassXiMinus, lRapXi ); + if(lIsBachelorKaon) f3dHistXiPtVsEffMassVsYWithCombPIDOmegaMinus ->Fill( lXiTransvMom, lInvMassOmegaMinus, lRapOmega ); + if(lIsBachelorKaon && lIsPosInOmegaProton) f3dHistXiPtVsEffMassVsYWith2CombPIDOmegaMinus ->Fill( lXiTransvMom, lInvMassOmegaMinus, lRapOmega ); + if(lIsBachelorKaonForTPC) f3dHistXiPtVsEffMassVsYWithTpcPIDOmegaMinus ->Fill( lXiTransvMom, lInvMassOmegaMinus, lRapOmega ); } else{ f2dHistEffMassLambdaVsEffMassXiPlus ->Fill( lInvMassLambdaAsCascDghter, lInvMassXiPlus ); f2dHistEffMassXiVsEffMassOmegaPlus ->Fill( lInvMassXiPlus, lInvMassOmegaPlus ); - f2dHistXiRadiusVsEffMassXiPlus->Fill( lXiRadius, lInvMassXiPlus); + f2dHistXiRadiusVsEffMassXiPlus ->Fill( lXiRadius, lInvMassXiPlus); + f2dHistXiRadiusVsEffMassOmegaPlus ->Fill( lXiRadius, lInvMassOmegaPlus ); + f3dHistXiPtVsEffMassVsYXiPlus ->Fill( lXiTransvMom, lInvMassXiPlus, lRapXi ); + f3dHistXiPtVsEffMassVsYOmegaPlus ->Fill( lXiTransvMom, lInvMassOmegaPlus, lRapOmega ); + if(lIsNegInXiProton) f3dHistXiPtVsEffMassVsYWithCombPIDXiPlus ->Fill( lXiTransvMom, lInvMassXiPlus, lRapXi ); + if(lIsBachelorKaon ) f3dHistXiPtVsEffMassVsYWithCombPIDOmegaPlus ->Fill( lXiTransvMom, lInvMassOmegaPlus, lRapOmega ); + if(lIsBachelorKaon && lIsNegInOmegaProton) f3dHistXiPtVsEffMassVsYWith2CombPIDOmegaPlus ->Fill( lXiTransvMom, lInvMassOmegaPlus, lRapOmega ); } + + // - Filling the AliCFContainers related to PID + + Double_t lContainerPIDVars[4] = {0.0}; + + // Xi Minus + if( lChargeXi < 0 ) { + lContainerPIDVars[0] = lXiTransvMom ; + lContainerPIDVars[1] = lInvMassXiMinus ; + lContainerPIDVars[2] = lRapXi ; + lContainerPIDVars[3] = nTrackWithTPCrefitMultiplicity ; + + // No PID + fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 0); // No PID + // TPC PID + if( lIsBachelorPionForTPC ) + fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 1); // TPC PID / 3-#sigma cut on Bachelor track - + if( lIsBachelorPionForTPC && + lIsPosProtonForTPC ) + fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 2); // TPC PID / 3-#sigma cut on Bachelor+Baryon tracks + + if( lIsBachelorPionForTPC && + lIsPosProtonForTPC && + lIsNegPionForTPC ) + fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 3); // TPC PID / 3-#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.; lContainerPIDVars[3] = 0.; + + // Xi Plus + if( lChargeXi > 0 ) { + lContainerPIDVars[0] = lXiTransvMom ; + lContainerPIDVars[1] = lInvMassXiPlus ; + lContainerPIDVars[2] = lRapXi ; + lContainerPIDVars[3] = nTrackWithTPCrefitMultiplicity ; + + // No PID + fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 0); // No PID + // TPC PID + if( lIsBachelorPionForTPC ) + fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 1); // TPC PID / 3-#sigma cut on Bachelor track + + if( lIsBachelorPionForTPC && + lIsNegProtonForTPC ) + fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 2); // TPC PID / 3-#sigma cut on Bachelor+Baryon tracks + + if( lIsBachelorPionForTPC && + lIsNegProtonForTPC && + lIsPosPionForTPC ) + fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 3); // TPC PID / 3-#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.; lContainerPIDVars[3] = 0.; + + // Omega Minus + if( lChargeXi < 0 ) { + lContainerPIDVars[0] = lXiTransvMom ; + lContainerPIDVars[1] = lInvMassOmegaMinus ; + lContainerPIDVars[2] = lRapOmega ; + lContainerPIDVars[3] = nTrackWithTPCrefitMultiplicity ; + + // No PID + fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 0); // No PID + // TPC PID + if( lIsBachelorKaonForTPC ) + fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 1); // TPC PID / 3-#sigma cut on Bachelor track + + if( lIsBachelorKaonForTPC && + lIsPosProtonForTPC ) + fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 2); // TPC PID / 3-#sigma cut on Bachelor+Baryon tracks + + if( lIsBachelorKaonForTPC && + lIsPosProtonForTPC && + lIsNegPionForTPC ) + fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 3); // TPC PID / 3-#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.; lContainerPIDVars[3] = 0.; + + // Omega Plus + if( lChargeXi > 0 ) { + lContainerPIDVars[0] = lXiTransvMom ; + lContainerPIDVars[1] = lInvMassOmegaPlus ; + lContainerPIDVars[2] = lRapOmega ; + lContainerPIDVars[3] = nTrackWithTPCrefitMultiplicity ; + + // No PID + fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 0); // No PID + // TPC PID + if( lIsBachelorKaonForTPC ) + fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 1); // TPC PID / 3-#sigma cut on Bachelor track + + if( lIsBachelorKaonForTPC && + lIsNegProtonForTPC ) + fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 2); // TPC PID / 3-#sigma cut on Bachelor+Baryon tracks + + if( lIsBachelorKaonForTPC && + lIsNegProtonForTPC && + lIsPosPionForTPC ) + fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 3); // TPC PID / 3-#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 + } + + + + + + // II.Fill.Step 7 : filling the AliCFContainer (optimisation of topological selections) + Double_t lContainerCutVars[18] = {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; + + if( lChargeXi < 0 ) { + lContainerCutVars[11] = lInvMassXiMinus; + lContainerCutVars[12] = lInvMassOmegaMinus; + } + else { + lContainerCutVars[11] = lInvMassXiPlus; + lContainerCutVars[12] = lInvMassOmegaPlus; + } + + lContainerCutVars[13] = lXiTransvMom; + lContainerCutVars[14] = lBestPrimaryVtxPos[2]; + lContainerCutVars[15] = nTrackWithTPCrefitMultiplicity; // FIXME : nTrackWithTPCrefitMultiplicity not checked for AOD ... = 0 + lContainerCutVars[16] = lSPDTrackletsMultiplicity; // FIXME : SPDTrackletsMultiplicity is not available for AOD ... = -1 + lContainerCutVars[17] = lBachTPCClusters; // FIXME : BachTPCClusters is not available for AOD ... = -1 + + if( lChargeXi < 0 ) fCFContCascadeCuts->Fill(lContainerCutVars,0); // for negative cascades = Xi- and Omega- + else fCFContCascadeCuts->Fill(lContainerCutVars,1); // for negative cascades = Xi+ and Omega+ + + + // II.Fill.Step 8 : angular correlations + + if( lChargeXi < 0 ){ + DoAngularCorrelation("Xi-", lInvMassXiMinus, lArrTrackID, lTVect3MomXi, lEta); + DoAngularCorrelation("Omega-", lInvMassOmegaMinus, lArrTrackID, lTVect3MomXi, lEta); + } + else{ + DoAngularCorrelation("Xi+", lInvMassXiPlus, lArrTrackID, lTVect3MomXi, lEta); + DoAngularCorrelation("Omega+", lInvMassOmegaPlus, lArrTrackID, lTVect3MomXi, lEta); + } + + }// end of the Cascade loop (ESD or AOD) @@ -1024,9 +2250,111 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *) } +void AliAnalysisTaskCheckCascade::DoAngularCorrelation( const Char_t *lCascType, + Double_t lInvMassCascade, + const Int_t *lArrTrackID, + TVector3 &lTVect3MomXi, + Double_t lEtaXi ){ + // Perform the Delta(Phi)Delta(Eta) analysis + // by properly filling the THnSparseF + + TString lStrCascType( lCascType ); + + Double_t lCascPdgMass = 0.0; + if( lStrCascType.Contains("Xi") ) lCascPdgMass = 1.3217; + if( lStrCascType.Contains("Omega") ) lCascPdgMass = 1.6724; + + if( lInvMassCascade > lCascPdgMass + 0.010) return; + if( lInvMassCascade < lCascPdgMass - 0.010) return; + // Check the Xi- candidate is within the proper mass window m0 +- 10 MeV + + + // 1st loop: check there is no track with a higher pt ... + // = The cascade is meant to be a leading particle : Pt(Casc) > any track in the event + for(Int_t TrckIdx = 0; TrckIdx < (InputEvent())->GetNumberOfTracks() ; TrckIdx++ ) + {// Loop over all the tracks of the event + + AliVTrack *lCurrentTrck = dynamic_cast( (InputEvent())->GetTrack( TrckIdx ) ); + if (!lCurrentTrck ) { + AliWarning("ERROR Correl. Study : Could not retrieve a track while looping over the event tracks ..."); + continue; + } + if(lTVect3MomXi.Pt() < lCurrentTrck->Pt() ) return; + // Room for improvement: //FIXME + // 1. There is a given resolution on pt : maybe release the cut Pt(casc) < Pt(track)*90% ? + // 2. Apply this cut only when DeltaPhi(casc, track) > 90 deg = when track is in the away-side ? + // 3. Anti-splitting cut (like in Femto analysis) ? + + }// end control loop + + // 2nd loop: filling loop + for(Int_t TrckIdx = 0; TrckIdx < (InputEvent())->GetNumberOfTracks() ; TrckIdx++ ) + {// Loop over all the tracks of the event + + AliVTrack *lCurrentTrck = dynamic_cast( (InputEvent())->GetTrack( TrckIdx ) ); + if (!lCurrentTrck ) { + AliWarning("ERROR Correl. Study : Could not retrieve a track while looping over the event tracks ..."); + continue; + } + + // Room for improvement: //FIXME + // 1. Loop only on primary tracks ? + // 2. Exclude the tracks that build the condisdered cascade = the bachelor + the V0 dghters + // This may bias the outcome, especially for low multplicity events. + // Note : For ESD event, track ID == track index. + if(lCurrentTrck->GetID() == lArrTrackID[0]) continue; + if(lCurrentTrck->GetID() == lArrTrackID[1]) continue; + if(lCurrentTrck->GetID() == lArrTrackID[2]) continue; + + TVector3 lTVect3MomTrck(lCurrentTrck->Px(), lCurrentTrck->Py(), lCurrentTrck->Pz() ); + + // 2 hypotheses made here : + // - The Xi trajectory is a straight line, + // - The Xi doesn't loose any energy by crossing the first layer(s) of ITS, if ever; + // So, meaning hyp: vect p(Xi) at the emission = vect p(Xi) at the decay vertex + // By doing this, we introduce a systematic error on the cascade Phi ... + // Room for improvement: take into account the curvature of the Xi trajectory //FIXME + + Double_t lHnSpFillVar[5] = {0.}; + lHnSpFillVar[0] = lTVect3MomXi.DeltaPhi(lTVect3MomTrck) * 180.0/TMath::Pi(); // Delta phi(Casc,Track) (deg) + if(lHnSpFillVar[0] < -50.0) lHnSpFillVar[0] += 360.0; + lHnSpFillVar[1] = lEtaXi - lCurrentTrck->Eta(); // Delta eta(Casc,Track) + lHnSpFillVar[2] = lTVect3MomXi.Pt(); // Pt_{Casc} + lHnSpFillVar[3] = lCurrentTrck->Pt(); // Pt_{any track} + lHnSpFillVar[4] = lInvMassCascade; // Eff. Inv Mass (control var) + + if( lStrCascType.Contains("Xi-") ) fHnSpAngularCorrXiMinus ->Fill( lHnSpFillVar ); + else if( lStrCascType.Contains("Xi+") ) fHnSpAngularCorrXiPlus ->Fill( lHnSpFillVar ); + else if( lStrCascType.Contains("Omega-") ) fHnSpAngularCorrOmegaMinus ->Fill( lHnSpFillVar ); + else if( lStrCascType.Contains("Omega+") ) fHnSpAngularCorrOmegaPlus ->Fill( lHnSpFillVar ); + + }// end - Loop over all the tracks in the event +} - +Int_t AliAnalysisTaskCheckCascade::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; +} @@ -1038,25 +2366,115 @@ void AliAnalysisTaskCheckCascade::Terminate(Option_t *) // Draw result to the screen // Called once at the end of the query - fHistTrackMultiplicity = dynamic_cast ( ((TList*)GetOutputData(1))->FindObject("fHistTrackMultiplicity") ); + TList *cRetrievedList = 0x0; + cRetrievedList = (TList*)GetOutputData(1); + if(!cRetrievedList){ + AliWarning("ERROR - AliAnalysisTaskCheckCascade: ouput data container list not available\n"); return; + } + + fHistTrackMultiplicity = dynamic_cast ( cRetrievedList->FindObject("fHistTrackMultiplicity") ); if (!fHistTrackMultiplicity) { - Printf("ERROR: fHistTrackMultiplicity not available"); - return; - } + AliWarning("ERROR - AliAnalysisTaskCheckCascade: fHistTrackMultiplicity not available\n"); return; + } - fHistCascadeMultiplicity = dynamic_cast ( ((TList*)GetOutputData(1))->FindObject("fHistCascadeMultiplicity")); - if (!fHistCascadeMultiplicity) { - Printf("ERROR: fHistCascadeMultiplicity not available"); - return; - } - - TCanvas *c2 = new TCanvas("AliAnalysisTaskCheckCascade","Multiplicity",10,10,510,510); - c2->cd(1)->SetLogy(); - - fHistTrackMultiplicity->SetMarkerStyle(22); - fHistTrackMultiplicity->DrawCopy("E"); + fHistCascadeMultiplicity = dynamic_cast ( cRetrievedList->FindObject("fHistCascadeMultiplicity") ); + if (!fHistCascadeMultiplicity) { + AliWarning("ERROR - AliAnalysisTaskCheckCascade: fHistCascadeMultiplicity not available\n"); return; + } + + fHistMassXiMinus = dynamic_cast ( cRetrievedList->FindObject("fHistMassXiMinus") ); + if (!fHistMassXiMinus) { + AliWarning("ERROR - AliAnalysisTaskCheckCascade: fHistMassXiMinus not available\n"); return; + } + fHistMassXiPlus = dynamic_cast ( cRetrievedList->FindObject("fHistMassXiPlus") ); + if (!fHistMassXiPlus) { + AliWarning("ERROR - AliAnalysisTaskCheckCascade: fHistMassXiPlus not available\n"); return; + } + fHistMassOmegaMinus = dynamic_cast ( cRetrievedList->FindObject("fHistMassOmegaMinus") ); + if (!fHistMassOmegaMinus) { + AliWarning("ERROR - AliAnalysisTaskCheckCascade: fHistMassOmegaMinus not available\n"); return; + } + fHistMassOmegaPlus = dynamic_cast ( cRetrievedList->FindObject("fHistMassOmegaPlus") ); + if (!fHistMassOmegaPlus) { + AliWarning("ERROR - AliAnalysisTaskCheckCascade: fHistMassOmegaPlus not available\n"); return; + } + + TCanvas *canCheckCascade = new TCanvas("AliAnalysisTaskCheckCascade","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); + canCheckCascade->cd(2)->SetLogy(); + fHistCascadeMultiplicity->SetMarkerStyle(kOpenSquare); + fHistCascadeMultiplicity->GetXaxis()->SetLabelFont(42); + fHistCascadeMultiplicity->GetYaxis()->SetLabelFont(42); + fHistCascadeMultiplicity->SetTitleFont(42, "xy"); + fHistCascadeMultiplicity->GetXaxis()->SetTitleOffset(1.1); + fHistCascadeMultiplicity->DrawCopy("E"); + + canCheckCascade->cd(3); + 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"); - fHistCascadeMultiplicity->SetMarkerStyle(26); - fHistCascadeMultiplicity->DrawCopy("ESAME"); + TLegend *legendeXi =new TLegend(0.67,0.34,0.97,0.54); + legendeXi->SetTextFont(42); + legendeXi->SetTextSize(0.05); + legendeXi->SetFillColor(kWhite); + legendeXi->AddEntry( fHistMassXiMinus,"#Xi^{-} candidates","lp"); + legendeXi->AddEntry( fHistMassXiPlus,"#Xi^{+} candidates","lp"); + legendeXi->Draw(); + + + canCheckCascade->cd(4); + 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 *legendeOmega = new TLegend(0.67,0.34,0.97,0.54); + legendeOmega->SetTextFont(42); + legendeOmega->SetTextSize(0.05); + legendeOmega->SetFillColor(kWhite); + legendeOmega->AddEntry( fHistMassOmegaMinus,"#Omega^{-} candidates","lp"); + legendeOmega->AddEntry( fHistMassOmegaPlus,"#Omega^{+} candidates","lp"); + legendeOmega->Draw(); + }