diff --git a/PWGLF/Tasks/Strangeness/forwardlambdakzeroanalysis.cxx b/PWGLF/Tasks/Strangeness/forwardlambdakzeroanalysis.cxx index 0fc840af0f0..346a6c18405 100644 --- a/PWGLF/Tasks/Strangeness/forwardlambdakzeroanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/forwardlambdakzeroanalysis.cxx @@ -28,15 +28,15 @@ // david.dobrigkeit.chinellato@cern.ch // -#include "PWGLF/DataModel/mcCentrality.h" #include "PWGMM/Mult/DataModel/bestCollisionTable.h" #include "PWGUD/Core/SGSelector.h" #include "Common/CCDB/EventSelectionParams.h" #include "Common/CCDB/RCTSelectionFlags.h" -#include "Common/CCDB/TriggerAliases.h" #include "Common/CCDB/ctpRateFetcher.h" #include "Common/Core/RecoDecay.h" +#include "Common/DataModel/Centrality.h" +#include "Common/DataModel/EventSelection.h" #include "Common/DataModel/Multiplicity.h" #include @@ -45,27 +45,29 @@ #include #include #include +#include +#include #include #include #include #include #include -#include #include #include #include #include #include +#include +#include +#include +#include #include #include -#include +#include #include -#include +#include -#include - -#include #include #include #include @@ -164,7 +166,10 @@ struct forwardlambdakzeroanalysis { Configurable rapidityMax{"rapidityMax", 0.5, "max rapidity"}; Configurable daughterEtaCutMin{"daughterEtaCutMin", 0.8, "min eta for daughters"}; Configurable daughterEtaCutMax{"daughterEtaCutMax", 0.8, "max eta for daughters"}; - Configurable minTrackPt{"minTrackPt", 0.8, "min track pT (GeV/c)"}; + Configurable minTrackPt{"minTrackPt", 0., "min track pT (GeV/c)"}; + Configurable maxTrackPt{"maxTrackPt", 1e+09, "max track pT (GeV/c)"}; + Configurable minTrackPz{"minTrackPz", -1e+09, "min track pZ (GeV/c)"}; + Configurable maxTrackPz{"maxTrackPz", 1e+09, "max track pZ (GeV/c)"}; // Standard 5 topological criteria Configurable v0CosPA{"v0CosPA", 0.97, "min V0 CosPA"}; @@ -221,19 +226,21 @@ struct forwardlambdakzeroanalysis { } ccdbConfigurations; o2::ccdb::CcdbApi ccdbApi; - Service ccdb; + Service ccdb{}; ctpRateFetcher rateFetcher; - int mRunNumber; - float magField; + int mRunNumber = 0; + float magField = 0.; std::map metadata; o2::parameters::GRPMagField* grpmag = nullptr; // CCDB options struct : ConfigurableGroup { ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f, 2.2f, 2.4f, 2.6f, 2.8f, 3.0f, 3.2f, 3.4f, 3.6f, 3.8f, 4.0f, 4.4f, 4.8f, 5.2f, 5.6f, 6.0f, 6.5f, 7.0f, 7.5f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 17.0f, 19.0f, 21.0f, 23.0f, 25.0f, 30.0f, 35.0f, 40.0f, 50.0f}, "pt axis for analysis"}; + ConfigurableAxis axisPz{"axisPz", {100, -10, 10}, "pz axis for analysis"}; ConfigurableAxis axisPtXi{"axisPtXi", {VARIABLE_WIDTH, 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f, 2.2f, 2.4f, 2.6f, 2.8f, 3.0f, 3.2f, 3.4f, 3.6f, 3.8f, 4.0f, 4.4f, 4.8f, 5.2f, 5.6f, 6.0f, 6.5f, 7.0f, 7.5f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 17.0f, 19.0f, 21.0f, 23.0f, 25.0f, 30.0f, 35.0f, 40.0f, 50.0f}, "pt axis for feeddown from Xi"}; ConfigurableAxis axisPtCoarse{"axisPtCoarse", {VARIABLE_WIDTH, 0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 7.0f, 10.0f, 15.0f}, "pt axis for QA"}; - ConfigurableAxis axisPtResol{"axisPtResol", {100, -1.0f, 1.0f}, "Axis for momentum resolution (GeV/c)"}; + ConfigurableAxis axisPtResol{"axisPtResol", {100, -1.0f, 1.0f}, "Axis for transverse momentum resolution (GeV/c)"}; + ConfigurableAxis axisPzResol{"axisPzResol", {100, -1.0f, 1.0f}, "Axis for longitudinal momentum resolution (GeV/c)"}; ConfigurableAxis axisK0Mass{"axisK0Mass", {200, 0.4f, 0.6f}, "Axis for K0S invariant mass (GeV/c2)"}; ConfigurableAxis axisLambdaMass{"axisLambdaMass", {200, 1.101f, 1.131f}, "Axis for Lambda invariant mass (GeV/c2)"}; ConfigurableAxis axisD0Mass{"axisD0Mass", {200, 1.75f, 1.95f}, "Axis for D0 invariant mass (GeV/c2)"}; @@ -264,6 +271,8 @@ struct forwardlambdakzeroanalysis { ConfigurableAxis axisMFTchi2{"axisMFTchi2", {1000, 0.0f, 1000.0f}, "#chi^{2}"}; ConfigurableAxis axisMFTchi2NDF{"axisMFTchi2NDF", {100, 0.0f, 100.0f}, "#chi^{2} per MFT clusters"}; ConfigurableAxis axisMFTclus{"axisMFTclus", {10, 0.0f, 10.0f}, "N MFT Clusters"}; + ConfigurableAxis axisPosition{"axisPosition", {100, -50, 50.0f}, "Position x, y, z (cm)"}; + ConfigurableAxis axisPositionDiff{"axisPositionDiff", {100, -10.0f, 10.0f}, "Position x, y, z recoed - generated (cm)"}; // UPC axes ConfigurableAxis axisSelGap{"axisSelGap", {4, -1.5, 2.5}, "Gap side"}; @@ -298,7 +307,7 @@ struct forwardlambdakzeroanalysis { Configurable useTGeoMatCorr{"useTGeoMatCorr", false, "Use material TGeo correction, instead of LUT material correction or no material correction."}; } fitterConfigurations; - o2::base::MatLayerCylSet* lut; // material LUT for DCA fitter + o2::base::MatLayerCylSet* lut{}; // material LUT for DCA fitter o2::vertexing::FwdDCAFitterN<2> fitter; // Taken from https://github.com/AliceO2Group/O2Physics/blob/master/PWGLF/TableProducer/Strangeness/sigma0builder.cxx#L319 @@ -310,6 +319,7 @@ struct forwardlambdakzeroanalysis { float Y = -999.f; float Z = -999.f; float Radius = -999.f; + float Zdist = -999.f; std::array positiveMomentum = {0.0f, 0.0f, 0.0f}; std::array negativeMomentum = {0.0f, 0.0f, 0.0f}; float dcaPosToPVxy = -999.f; @@ -347,6 +357,8 @@ struct forwardlambdakzeroanalysis { float xMc = -999.f; float yMc = -999.f; float zMc = -999.f; + float RadiusMc = -999.f; + float ZdistMc = -999.f; std::array momentumMc = {0.0f, 0.0f, 0.0f}; std::array positiveMomentumMc = {0.0f, 0.0f, 0.0f}; std::array negativeMomentumMc = {0.0f, 0.0f, 0.0f}; @@ -364,6 +376,15 @@ struct forwardlambdakzeroanalysis { int mcCollision = -1; bool isPhysicalPrimary = false; bool motherIsPhysicalPrimary = false; + + float positivePt() const { return std::hypot(positiveMomentum[0], positiveMomentum[1]); } + float negativePt() const { return std::hypot(negativeMomentum[0], negativeMomentum[1]); } + float positivePz() const { return positiveMomentum[2]; } + float negativePz() const { return negativeMomentum[2]; } + float positivePtMc() const { return std::hypot(positiveMomentumMc[0], positiveMomentumMc[1]); } + float negativePtMc() const { return std::hypot(negativeMomentumMc[0], negativeMomentumMc[1]); } + float positivePzMc() const { return positiveMomentumMc[2]; } + float negativePzMc() const { return negativeMomentumMc[2]; } }; // For manual sliceBy @@ -413,23 +434,23 @@ struct forwardlambdakzeroanalysis { selPhysPrimAntiD0, // for mc tagging }; - uint64_t maskTopological; - uint64_t maskTrackProperties; + uint64_t maskTopological = 0; + uint64_t maskTrackProperties = 0; - uint64_t maskK0ShortSpecific; - uint64_t maskLambdaSpecific; - uint64_t maskAntiLambdaSpecific; - uint64_t maskD0Specific; - uint64_t maskAntiD0Specific; + uint64_t maskK0ShortSpecific = 0; + uint64_t maskLambdaSpecific = 0; + uint64_t maskAntiLambdaSpecific = 0; + uint64_t maskD0Specific = 0; + uint64_t maskAntiD0Specific = 0; - uint64_t maskSelectionK0Short; - uint64_t maskSelectionLambda; - uint64_t maskSelectionAntiLambda; - uint64_t maskSelectionD0; - uint64_t maskSelectionAntiD0; + uint64_t maskSelectionK0Short = 0; + uint64_t maskSelectionLambda = 0; + uint64_t maskSelectionAntiLambda = 0; + uint64_t maskSelectionD0 = 0; + uint64_t maskSelectionAntiD0 = 0; - uint64_t secondaryMaskSelectionLambda; - uint64_t secondaryMaskSelectionAntiLambda; + uint64_t secondaryMaskSelectionLambda = 0; + uint64_t secondaryMaskSelectionAntiLambda = 0; void init(InitContext const&) { @@ -562,6 +583,11 @@ struct forwardlambdakzeroanalysis { histos.add("hEventPVzMC", "hEventPVzMC", kTH1D, {{100, -20.0f, +20.0f}}); histos.add("hCentralityVsPVzMC", "hCentralityVsPVzMC", kTH2D, {axisConfigurations.axisCentralityFine, {100, -20.0f, +20.0f}}); } + if (doprocessMonteCarlo) { + histos.add("hEventPVxDiff", "hEventPVxDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("hEventPVyDiff", "hEventPVyDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("hEventPVzDiff", "hEventPVzDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + } histos.add("hEventOccupancy", "hEventOccupancy", kTH1D, {axisConfigurations.axisOccupancy}); histos.add("hCentralityVsOccupancy", "hCentralityVsOccupancy", kTH2D, {axisConfigurations.axisCentralityFine, axisConfigurations.axisOccupancy}); @@ -745,8 +771,18 @@ struct forwardlambdakzeroanalysis { histos.add("hPositiveMFTchi2", "hPositiveMFTchi2", kTH1D, {axisConfigurations.axisMFTchi2}); histos.add("hNegativeMFTchi2", "hNegativeMFTchi2", kTH1D, {axisConfigurations.axisMFTchi2}); if (doprocessMonteCarlo) { - histos.add("hPositiveMomResolution", "hPositiveMomResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); - histos.add("hNegativeMomResolution", "hNegativeMomResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("hPositivePtResolution", "hPositivePtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("hNegativePtResolution", "hNegativePtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("hPositivePzResolution", "hPositivePzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); + histos.add("hNegativePzResolution", "hNegativePzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); + + histos.add("hV0XDiff", "hV0XDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("hV0YDiff", "hV0YDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("hV0ZDiff", "hV0ZDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("hV0RadiusDiff", "hV0RadiusDiff", kTH2D, {axisConfigurations.axisV0Radius, axisConfigurations.axisPositionDiff}); + histos.add("hV0DistZDiff", "hV0DistZDiff", kTH2D, {axisConfigurations.axisV0Z, axisConfigurations.axisPositionDiff}); + histos.add("hV0PtResolution", "hV0PtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("hV0PzResolution", "hV0PzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); } if (analyseK0Short) { histos.add("K0Short/hPosDCAToPVxy", "hPosDCAToPVxy", kTH1D, {axisConfigurations.axisDCAtoPVxy}); @@ -784,8 +820,18 @@ struct forwardlambdakzeroanalysis { histos.add("K0Short/hPositiveMFTchi2", "hPositiveMFTchi2", kTH1D, {axisConfigurations.axisMFTchi2}); histos.add("K0Short/hNegativeMFTchi2", "hNegativeMFTchi2", kTH1D, {axisConfigurations.axisMFTchi2}); if (doprocessMonteCarlo) { - histos.add("K0Short/hPositiveMomResolution", "hPositiveMomResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); - histos.add("K0Short/hNegativeMomResolution", "hNegativeMomResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("K0Short/hPositivePtResolution", "hPositivePtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("K0Short/hNegativePtResolution", "hNegativePtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("K0Short/hPositivePzResolution", "hPositivePzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); + histos.add("K0Short/hNegativePzResolution", "hNegativePzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); + + histos.add("K0Short/hV0XDiff", "hV0XDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("K0Short/hV0YDiff", "hV0YDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("K0Short/hV0ZDiff", "hV0ZDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("K0Short/hV0RadiusDiff", "hV0RadiusDiff", kTH2D, {axisConfigurations.axisV0Radius, axisConfigurations.axisPositionDiff}); + histos.add("K0Short/hV0DistZDiff", "hV0DistZDiff", kTH2D, {axisConfigurations.axisV0Z, axisConfigurations.axisPositionDiff}); + histos.add("K0Short/hV0PtResolution", "hV0PtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("K0Short/hV0PzResolution", "hV0PzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); } } if (analyseLambda) { @@ -823,8 +869,18 @@ struct forwardlambdakzeroanalysis { histos.add("Lambda/hPositiveMFTchi2", "hPositiveMFTchi2", kTH1D, {axisConfigurations.axisMFTchi2}); histos.add("Lambda/hNegativeMFTchi2", "hNegativeMFTchi2", kTH1D, {axisConfigurations.axisMFTchi2}); if (doprocessMonteCarlo) { - histos.add("Lambda/hPositiveMomResolution", "hPositiveMomResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); - histos.add("Lambda/hNegativeMomResolution", "hNegativeMomResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("Lambda/hPositivePtResolution", "hPositivePtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("Lambda/hNegativePtResolution", "hNegativePtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("Lambda/hPositivePzResolution", "hPositivePzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); + histos.add("Lambda/hNegativePzResolution", "hNegativePzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); + + histos.add("Lambda/hV0XDiff", "hV0XDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("Lambda/hV0YDiff", "hV0YDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("Lambda/hV0ZDiff", "hV0ZDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("Lambda/hV0RadiusDiff", "hV0RadiusDiff", kTH2D, {axisConfigurations.axisV0Radius, axisConfigurations.axisPositionDiff}); + histos.add("Lambda/hV0DistZDiff", "hV0DistZDiff", kTH2D, {axisConfigurations.axisV0Z, axisConfigurations.axisPositionDiff}); + histos.add("Lambda/hV0PtResolution", "hV0PtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("Lambda/hV0PzResolution", "hV0PzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); } } if (analyseAntiLambda) { @@ -862,8 +918,18 @@ struct forwardlambdakzeroanalysis { histos.add("AntiLambda/hPositiveMFTchi2", "hPositiveMFTchi2", kTH1D, {axisConfigurations.axisMFTchi2}); histos.add("AntiLambda/hNegativeMFTchi2", "hNegativeMFTchi2", kTH1D, {axisConfigurations.axisMFTchi2}); if (doprocessMonteCarlo) { - histos.add("AntiLambda/hPositiveMomResolution", "hPositiveMomResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); - histos.add("AntiLambda/hNegativeMomResolution", "hNegativeMomResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("AntiLambda/hPositivePtResolution", "hPositivePtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("AntiLambda/hNegativePtResolution", "hNegativePtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("AntiLambda/hPositivePzResolution", "hPositivePzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); + histos.add("AntiLambda/hNegativePzResolution", "hNegativePzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); + + histos.add("AntiLambda/hV0XDiff", "hV0XDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("AntiLambda/hV0YDiff", "hV0YDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("AntiLambda/hV0ZDiff", "hV0ZDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("AntiLambda/hV0RadiusDiff", "hV0RadiusDiff", kTH2D, {axisConfigurations.axisV0Radius, axisConfigurations.axisPositionDiff}); + histos.add("AntiLambda/hV0DistZDiff", "hV0DistZDiff", kTH2D, {axisConfigurations.axisV0Z, axisConfigurations.axisPositionDiff}); + histos.add("AntiLambda/hV0PtResolution", "hV0PtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("AntiLambda/hV0PzResolution", "hV0PzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); } } if (analyseD0) { @@ -901,8 +967,18 @@ struct forwardlambdakzeroanalysis { histos.add("D0/hPositiveMFTchi2", "hPositiveMFTchi2", kTH1D, {axisConfigurations.axisMFTchi2}); histos.add("D0/hNegativeMFTchi2", "hNegativeMFTchi2", kTH1D, {axisConfigurations.axisMFTchi2}); if (doprocessMonteCarlo) { - histos.add("D0/hPositiveMomResolution", "hPositiveMomResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); - histos.add("D0/hNegativeMomResolution", "hNegativeMomResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("D0/hPositivePtResolution", "hPositivePtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("D0/hNegativePtResolution", "hNegativePtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("D0/hPositivePzResolution", "hPositivePzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); + histos.add("D0/hNegativePzResolution", "hNegativePzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); + + histos.add("D0/hV0XDiff", "hV0XDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("D0/hV0YDiff", "hV0YDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("D0/hV0ZDiff", "hV0ZDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("D0/hV0RadiusDiff", "hV0RadiusDiff", kTH2D, {axisConfigurations.axisV0Radius, axisConfigurations.axisPositionDiff}); + histos.add("D0/hV0DistZDiff", "hV0DistZDiff", kTH2D, {axisConfigurations.axisV0Z, axisConfigurations.axisPositionDiff}); + histos.add("D0/hV0PtResolution", "hV0PtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("D0/hV0PzResolution", "hV0PzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); } } if (analyseAntiD0) { @@ -940,8 +1016,18 @@ struct forwardlambdakzeroanalysis { histos.add("AntiD0/hPositiveMFTchi2", "hPositiveMFTchi2", kTH1D, {axisConfigurations.axisMFTchi2}); histos.add("AntiD0/hNegativeMFTchi2", "hNegativeMFTchi2", kTH1D, {axisConfigurations.axisMFTchi2}); if (doprocessMonteCarlo) { - histos.add("AntiD0/hPositiveMomResolution", "hPositiveMomResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); - histos.add("AntiD0/hNegativeMomResolution", "hNegativeMomResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("AntiD0/hPositivePtResolution", "hPositivePtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("AntiD0/hNegativePtResolution", "hNegativePtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("AntiD0/hPositivePzResolution", "hPositivePzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); + histos.add("AntiD0/hNegativePzResolution", "hNegativePzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); + + histos.add("AntiD0/hV0XDiff", "hV0XDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("AntiD0/hV0YDiff", "hV0YDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("AntiD0/hV0ZDiff", "hV0ZDiff", kTH2D, {axisConfigurations.axisPosition, axisConfigurations.axisPositionDiff}); + histos.add("AntiD0/hV0RadiusDiff", "hV0RadiusDiff", kTH2D, {axisConfigurations.axisV0Radius, axisConfigurations.axisPositionDiff}); + histos.add("AntiD0/hV0DistZDiff", "hV0DistZDiff", kTH2D, {axisConfigurations.axisV0Z, axisConfigurations.axisPositionDiff}); + histos.add("AntiD0/hV0PtResolution", "hV0PtResolution", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPtResol}); + histos.add("AntiD0/hV0PzResolution", "hV0PzResolution", kTH2D, {axisConfigurations.axisPz, axisConfigurations.axisPzResol}); } } } @@ -1062,7 +1148,7 @@ struct forwardlambdakzeroanalysis { } template - void initCCDB(TBCs const& bcs, TCollision collision) + void initCCDB(TBCs const& bcs, TCollision const& collision) { auto bc = collision.template bc_as(); if (!bcs.size()) { @@ -1106,7 +1192,7 @@ struct forwardlambdakzeroanalysis { } template - uint64_t computeReconstructionBitmap(TV0 v0, float rapK0s, float rapLambda, float rapD0) + uint64_t computeReconstructionBitmap(TV0 const& v0, float rapK0s, float rapLambda, float rapD0) // precalculate this information so that a check is one mask operation, not many { uint64_t bitMap = 0; @@ -1121,10 +1207,10 @@ struct forwardlambdakzeroanalysis { BITSET(bitMap, selRadiusMax); } // v0 radius min/max selections - if (v0.Z > v0Selections.v0Zmin) { + if (v0.Zdist > v0Selections.v0Zmin) { BITSET(bitMap, selZmin); } - if (v0.Z < v0Selections.v0Zmax) { + if (v0.Zdist < v0Selections.v0Zmax) { BITSET(bitMap, selZmax); } // DCA proton and pion to PV for Lambda and AntiLambda decay hypotheses @@ -1330,7 +1416,7 @@ struct forwardlambdakzeroanalysis { histos.fill(HIST("hCosPA"), v0.CosPA); histos.fill(HIST("hOpeningAngle"), v0.OpAngle); histos.fill(HIST("hV0Radius"), v0.Radius); - histos.fill(HIST("hV0Z"), v0.Z); + histos.fill(HIST("hV0Z"), v0.Zdist); if (analyseK0Short) { histos.fill(HIST("hV0Rapidity"), v0.rapidityK0s); } else if (analyseLambda || analyseAntiLambda) { @@ -1367,8 +1453,18 @@ struct forwardlambdakzeroanalysis { histos.fill(HIST("hPositiveMFTchi2"), v0.posChi2); histos.fill(HIST("hNegativeMFTchi2"), v0.negChi2); if (doprocessMonteCarlo) { - histos.fill(HIST("hPositiveMomResolution"), v0.pTMc, v0.pTMc - v0.pT); - histos.fill(HIST("hNegativeMomResolution"), v0.pTMc, v0.pTMc - v0.pT); + histos.fill(HIST("hPositivePtResolution"), v0.positivePtMc(), (v0.positivePtMc() - v0.positivePt()) / v0.positivePtMc()); + histos.fill(HIST("hNegativePtResolution"), v0.negativePtMc(), (v0.negativePtMc() - v0.negativePt()) / v0.negativePtMc()); + histos.fill(HIST("hPositivePzResolution"), v0.positivePzMc(), (v0.positivePzMc() - v0.positivePz()) / v0.positivePzMc()); + histos.fill(HIST("hNegativePzResolution"), v0.negativePzMc(), (v0.negativePzMc() - v0.negativePz()) / v0.negativePzMc()); + + histos.fill(HIST("hV0XDiff"), v0.xMc, (v0.xMc - v0.X)); + histos.fill(HIST("hV0YDiff"), v0.yMc, (v0.yMc - v0.Y)); + histos.fill(HIST("hV0ZDiff"), v0.zMc, (v0.zMc - v0.Z)); + histos.fill(HIST("hV0RadiusDiff"), v0.RadiusMc, (v0.RadiusMc - v0.Radius) / v0.RadiusMc); + histos.fill(HIST("hV0DistZDiff"), v0.ZdistMc, (v0.ZdistMc - v0.Zdist) / v0.ZdistMc); + histos.fill(HIST("hV0PtResolution"), v0.pTMc, (v0.pTMc - v0.pT) / v0.pTMc); + histos.fill(HIST("hV0PzResolution"), v0.pZMc, (v0.pZMc - v0.pZ) / v0.pZMc); } } @@ -1407,7 +1503,7 @@ struct forwardlambdakzeroanalysis { histos.fill(HIST("K0Short/hCosPA"), v0.CosPA); histos.fill(HIST("K0Short/hOpeningAngle"), v0.OpAngle); histos.fill(HIST("K0Short/hV0Radius"), v0.Radius); - histos.fill(HIST("K0Short/hV0Z"), v0.Z); + histos.fill(HIST("K0Short/hV0Z"), v0.Zdist); histos.fill(HIST("K0Short/hV0Rapidity"), v0.rapidityK0s); histos.fill(HIST("K0Short/hV0LifetimeK0s"), v0.DistOverTotMom * o2::constants::physics::MassK0Short); histos.fill(HIST("K0Short/hV0LifetimeLambda"), v0.DistOverTotMom * o2::constants::physics::MassLambda); @@ -1434,8 +1530,18 @@ struct forwardlambdakzeroanalysis { histos.fill(HIST("K0Short/hPositiveMFTchi2"), v0.posChi2); histos.fill(HIST("K0Short/hNegativeMFTchi2"), v0.negChi2); if (doprocessMonteCarlo) { - histos.fill(HIST("K0Short/hPositiveMomResolution"), v0.pTMc, v0.pTMc - v0.pT); - histos.fill(HIST("K0Short/hNegativeMomResolution"), v0.pTMc, v0.pTMc - v0.pT); + histos.fill(HIST("K0Short/hPositivePtResolution"), v0.positivePtMc(), (v0.positivePtMc() - v0.positivePt()) / v0.positivePtMc()); + histos.fill(HIST("K0Short/hNegativePtResolution"), v0.negativePtMc(), (v0.negativePtMc() - v0.negativePt()) / v0.negativePtMc()); + histos.fill(HIST("K0Short/hPositivePzResolution"), v0.positivePzMc(), (v0.positivePzMc() - v0.positivePz()) / v0.positivePzMc()); + histos.fill(HIST("K0Short/hNegativePzResolution"), v0.negativePzMc(), (v0.negativePzMc() - v0.negativePz()) / v0.negativePzMc()); + + histos.fill(HIST("K0Short/hV0XDiff"), v0.xMc, (v0.xMc - v0.X)); + histos.fill(HIST("K0Short/hV0YDiff"), v0.yMc, (v0.yMc - v0.Y)); + histos.fill(HIST("K0Short/hV0ZDiff"), v0.zMc, (v0.zMc - v0.Z)); + histos.fill(HIST("K0Short/hV0RadiusDiff"), v0.RadiusMc, (v0.RadiusMc - v0.Radius) / v0.RadiusMc); + histos.fill(HIST("K0Short/hV0DistZDiff"), v0.ZdistMc, (v0.ZdistMc - v0.Zdist) / v0.ZdistMc); + histos.fill(HIST("K0Short/hV0PtResolution"), v0.pTMc, (v0.pTMc - v0.pT) / v0.pTMc); + histos.fill(HIST("K0Short/hV0PzResolution"), v0.pZMc, (v0.pZMc - v0.pZ) / v0.pZMc); } } nK0Shorts++; @@ -1464,7 +1570,7 @@ struct forwardlambdakzeroanalysis { histos.fill(HIST("Lambda/hCosPA"), v0.CosPA); histos.fill(HIST("Lambda/hOpeningAngle"), v0.OpAngle); histos.fill(HIST("Lambda/hV0Radius"), v0.Radius); - histos.fill(HIST("Lambda/hV0Z"), v0.Z); + histos.fill(HIST("Lambda/hV0Z"), v0.Zdist); histos.fill(HIST("Lambda/hV0Rapidity"), v0.rapidityLambda); histos.fill(HIST("Lambda/hV0LifetimeK0s"), v0.DistOverTotMom * o2::constants::physics::MassK0Short); histos.fill(HIST("Lambda/hV0LifetimeLambda"), v0.DistOverTotMom * o2::constants::physics::MassLambda); @@ -1490,8 +1596,18 @@ struct forwardlambdakzeroanalysis { histos.fill(HIST("Lambda/hPositiveMFTchi2"), v0.posChi2); histos.fill(HIST("Lambda/hNegativeMFTchi2"), v0.negChi2); if (doprocessMonteCarlo) { - histos.fill(HIST("Lambda/hPositiveMomResolution"), v0.pTMc, v0.pTMc - v0.pT); - histos.fill(HIST("Lambda/hNegativeMomResolution"), v0.pTMc, v0.pTMc - v0.pT); + histos.fill(HIST("Lambda/hPositivePtResolution"), v0.positivePtMc(), (v0.positivePtMc() - v0.positivePt()) / v0.positivePtMc()); + histos.fill(HIST("Lambda/hNegativePtResolution"), v0.negativePtMc(), (v0.negativePtMc() - v0.negativePt()) / v0.negativePtMc()); + histos.fill(HIST("Lambda/hPositivePzResolution"), v0.positivePzMc(), (v0.positivePzMc() - v0.positivePz()) / v0.positivePzMc()); + histos.fill(HIST("Lambda/hNegativePzResolution"), v0.negativePzMc(), (v0.negativePzMc() - v0.negativePz()) / v0.negativePzMc()); + + histos.fill(HIST("Lambda/hV0XDiff"), v0.xMc, (v0.xMc - v0.X)); + histos.fill(HIST("Lambda/hV0YDiff"), v0.yMc, (v0.yMc - v0.Y)); + histos.fill(HIST("Lambda/hV0ZDiff"), v0.zMc, (v0.zMc - v0.Z)); + histos.fill(HIST("Lambda/hV0RadiusDiff"), v0.RadiusMc, (v0.RadiusMc - v0.Radius) / v0.RadiusMc); + histos.fill(HIST("Lambda/hV0DistZDiff"), v0.ZdistMc, (v0.ZdistMc - v0.Zdist) / v0.ZdistMc); + histos.fill(HIST("Lambda/hV0PtResolution"), v0.pTMc, (v0.pTMc - v0.pT) / v0.pTMc); + histos.fill(HIST("Lambda/hV0PzResolution"), v0.pZMc, (v0.pZMc - v0.pZ) / v0.pZMc); } } nLambdas++; @@ -1520,7 +1636,7 @@ struct forwardlambdakzeroanalysis { histos.fill(HIST("AntiLambda/hCosPA"), v0.CosPA); histos.fill(HIST("AntiLambda/hOpeningAngle"), v0.OpAngle); histos.fill(HIST("AntiLambda/hV0Radius"), v0.Radius); - histos.fill(HIST("AntiLambda/hV0Z"), v0.Z); + histos.fill(HIST("AntiLambda/hV0Z"), v0.Zdist); histos.fill(HIST("AntiLambda/hV0Rapidity"), v0.rapidityLambda); histos.fill(HIST("AntiLambda/hV0LifetimeK0s"), v0.DistOverTotMom * o2::constants::physics::MassK0Short); histos.fill(HIST("AntiLambda/hV0LifetimeLambda"), v0.DistOverTotMom * o2::constants::physics::MassLambda); @@ -1546,8 +1662,18 @@ struct forwardlambdakzeroanalysis { histos.fill(HIST("AntiLambda/hPositiveMFTchi2"), v0.posChi2); histos.fill(HIST("AntiLambda/hNegativeMFTchi2"), v0.negChi2); if (doprocessMonteCarlo) { - histos.fill(HIST("AntiLambda/hPositiveMomResolution"), v0.pTMc, v0.pTMc - v0.pT); - histos.fill(HIST("AntiLambda/hNegativeMomResolution"), v0.pTMc, v0.pTMc - v0.pT); + histos.fill(HIST("AntiLambda/hPositivePtResolution"), v0.positivePtMc(), (v0.positivePtMc() - v0.positivePt()) / v0.positivePtMc()); + histos.fill(HIST("AntiLambda/hNegativePtResolution"), v0.negativePtMc(), (v0.negativePtMc() - v0.negativePt()) / v0.negativePtMc()); + histos.fill(HIST("AntiLambda/hPositivePzResolution"), v0.positivePzMc(), (v0.positivePzMc() - v0.positivePz()) / v0.positivePzMc()); + histos.fill(HIST("AntiLambda/hNegativePzResolution"), v0.negativePzMc(), (v0.negativePzMc() - v0.negativePz()) / v0.negativePzMc()); + + histos.fill(HIST("AntiLambda/hV0XDiff"), v0.xMc, (v0.xMc - v0.X)); + histos.fill(HIST("AntiLambda/hV0YDiff"), v0.yMc, (v0.yMc - v0.Y)); + histos.fill(HIST("AntiLambda/hV0ZDiff"), v0.zMc, (v0.zMc - v0.Z)); + histos.fill(HIST("AntiLambda/hV0RadiusDiff"), v0.RadiusMc, (v0.RadiusMc - v0.Radius) / v0.RadiusMc); + histos.fill(HIST("AntiLambda/hV0DistZDiff"), v0.ZdistMc, (v0.ZdistMc - v0.Zdist) / v0.Zdist); + histos.fill(HIST("AntiLambda/hV0PtResolution"), v0.pTMc, (v0.pTMc - v0.pT) / v0.pTMc); + histos.fill(HIST("AntiLambda/hV0PzResolution"), v0.pZMc, (v0.pZMc - v0.pZ) / v0.pZMc); } } nAntiLambdas++; @@ -1576,7 +1702,7 @@ struct forwardlambdakzeroanalysis { histos.fill(HIST("D0/hCosPA"), v0.CosPA); histos.fill(HIST("D0/hOpeningAngle"), v0.OpAngle); histos.fill(HIST("D0/hV0Radius"), v0.Radius); - histos.fill(HIST("D0/hV0Z"), v0.Z); + histos.fill(HIST("D0/hV0Z"), v0.Zdist); histos.fill(HIST("D0/hV0Rapidity"), v0.rapidityD0); histos.fill(HIST("D0/hV0LifetimeK0s"), v0.DistOverTotMom * o2::constants::physics::MassK0Short); histos.fill(HIST("D0/hV0LifetimeLambda"), v0.DistOverTotMom * o2::constants::physics::MassLambda); @@ -1602,8 +1728,18 @@ struct forwardlambdakzeroanalysis { histos.fill(HIST("D0/hPositiveMFTchi2"), v0.posChi2); histos.fill(HIST("D0/hNegativeMFTchi2"), v0.negChi2); if (doprocessMonteCarlo) { - histos.fill(HIST("D0/hPositiveMomResolution"), v0.pTMc, v0.pTMc - v0.pT); - histos.fill(HIST("D0/hNegativeMomResolution"), v0.pTMc, v0.pTMc - v0.pT); + histos.fill(HIST("D0/hPositivePtResolution"), v0.positivePtMc(), (v0.positivePtMc() - v0.positivePt()) / v0.positivePtMc()); + histos.fill(HIST("D0/hNegativePtResolution"), v0.negativePtMc(), (v0.negativePtMc() - v0.negativePt()) / v0.negativePtMc()); + histos.fill(HIST("D0/hPositivePzResolution"), v0.positivePzMc(), (v0.positivePzMc() - v0.positivePz()) / v0.positivePzMc()); + histos.fill(HIST("D0/hNegativePzResolution"), v0.negativePzMc(), (v0.negativePzMc() - v0.negativePz()) / v0.negativePzMc()); + + histos.fill(HIST("D0/hV0XDiff"), v0.xMc, (v0.xMc - v0.X)); + histos.fill(HIST("D0/hV0YDiff"), v0.yMc, (v0.yMc - v0.Y)); + histos.fill(HIST("D0/hV0ZDiff"), v0.zMc, (v0.zMc - v0.Z)); + histos.fill(HIST("D0/hV0RadiusDiff"), v0.RadiusMc, (v0.RadiusMc - v0.Radius) / v0.RadiusMc); + histos.fill(HIST("D0/hV0DistZDiff"), v0.ZdistMc, (v0.ZdistMc - v0.Zdist) / v0.ZdistMc); + histos.fill(HIST("D0/hV0PtResolution"), v0.pTMc, (v0.pTMc - v0.pT) / v0.pTMc); + histos.fill(HIST("D0/hV0PzResolution"), v0.pZMc, (v0.pZMc - v0.pZ) / v0.pZMc); } } nD0s++; @@ -1632,7 +1768,7 @@ struct forwardlambdakzeroanalysis { histos.fill(HIST("AntiD0/hCosPA"), v0.CosPA); histos.fill(HIST("AntiD0/hOpeningAngle"), v0.OpAngle); histos.fill(HIST("AntiD0/hV0Radius"), v0.Radius); - histos.fill(HIST("AntiD0/hV0Z"), v0.Z); + histos.fill(HIST("AntiD0/hV0Z"), v0.Zdist); histos.fill(HIST("AntiD0/hV0Rapidity"), v0.rapidityD0); histos.fill(HIST("AntiD0/hV0LifetimeK0s"), v0.DistOverTotMom * o2::constants::physics::MassK0Short); histos.fill(HIST("AntiD0/hV0LifetimeLambda"), v0.DistOverTotMom * o2::constants::physics::MassLambda); @@ -1658,8 +1794,18 @@ struct forwardlambdakzeroanalysis { histos.fill(HIST("AntiD0/hPositiveMFTchi2"), v0.posChi2); histos.fill(HIST("AntiD0/hNegativeMFTchi2"), v0.negChi2); if (doprocessMonteCarlo) { - histos.fill(HIST("AntiD0/hPositiveMomResolution"), v0.pTMc, v0.pTMc - v0.pT); - histos.fill(HIST("AntiD0/hNegativeMomResolution"), v0.pTMc, v0.pTMc - v0.pT); + histos.fill(HIST("AntiD0/hPositivePtResolution"), v0.positivePtMc(), (v0.positivePtMc() - v0.positivePt()) / v0.positivePtMc()); + histos.fill(HIST("AntiD0/hNegativePtResolution"), v0.negativePtMc(), (v0.negativePtMc() - v0.negativePt()) / v0.negativePtMc()); + histos.fill(HIST("AntiD0/hPositivePzResolution"), v0.positivePzMc(), (v0.positivePzMc() - v0.positivePz()) / v0.positivePzMc()); + histos.fill(HIST("AntiD0/hNegativePzResolution"), v0.negativePzMc(), (v0.negativePzMc() - v0.negativePz()) / v0.negativePzMc()); + + histos.fill(HIST("AntiD0/hV0XDiff"), v0.xMc, (v0.xMc - v0.X)); + histos.fill(HIST("AntiD0/hV0YDiff"), v0.yMc, (v0.yMc - v0.Y)); + histos.fill(HIST("AntiD0/hV0ZDiff"), v0.zMc, (v0.zMc - v0.Z)); + histos.fill(HIST("AntiD0/hV0RadiusDiff"), v0.RadiusMc, (v0.RadiusMc - v0.Radius) / v0.RadiusMc); + histos.fill(HIST("AntiD0/hV0DistZDiff"), v0.ZdistMc, (v0.ZdistMc - v0.Zdist) / v0.ZdistMc); + histos.fill(HIST("AntiD0/hV0PtResolution"), v0.pTMc, (v0.pTMc - v0.pT) / v0.pTMc); + histos.fill(HIST("AntiD0/hV0PzResolution"), v0.pZMc, (v0.pZMc - v0.pZ) / v0.pZMc); } } nAntiD0s++; @@ -1958,7 +2104,6 @@ struct forwardlambdakzeroanalysis { histos.fill(HIST("hCentralityVsInteractionRate"), centrality, interactionRate); histos.fill(HIST("hInteractionRateVsOccupancy"), interactionRate, collisionOccupancy); - return; } // ______________________________________________________ @@ -2018,7 +2163,6 @@ struct forwardlambdakzeroanalysis { histos.fill(HIST("hGenEventCentrality"), centrality); } } - return; } // BUILDER PART: largely inspired of the strangenessBuilderModule @@ -2087,6 +2231,19 @@ struct forwardlambdakzeroanalysis { continue; if (mftNegative.pt() < v0Selections.minTrackPt) continue; + if (mftPositive.pt() > v0Selections.maxTrackPt) + continue; + if (mftNegative.pt() > v0Selections.maxTrackPt) + continue; + + if (mftPositive.pz() < v0Selections.minTrackPz) + continue; + if (mftNegative.pz() < v0Selections.minTrackPz) + continue; + if (mftPositive.pz() > v0Selections.maxTrackPz) + continue; + if (mftNegative.pz() > v0Selections.maxTrackPz) + continue; // Consider only tracks of opposite charges if (mftPositive.sign() < 0) @@ -2141,9 +2298,9 @@ struct forwardlambdakzeroanalysis { // get decay vertex coordinates Vec3D vtx = fitter.getPCACandidate(); - pairInfo.X = vtx[0] - collision.posX(); - pairInfo.Y = vtx[1] - collision.posY(); - pairInfo.Z = vtx[2] - collision.posZ(); + pairInfo.X = vtx[0]; + pairInfo.Y = vtx[1]; + pairInfo.Z = vtx[2]; // get daughter DCA to PV pairInfo.dcaPosToPVxy = std::sqrt(dcaPosToPVx * dcaPosToPVx + dcaPosToPVy * dcaPosToPVy); @@ -2173,20 +2330,21 @@ struct forwardlambdakzeroanalysis { pairInfo.OpAngle = track1Momentum.Angle(track2Momentum); // Radius - pairInfo.Radius = std::sqrt(pairInfo.X * pairInfo.X + pairInfo.Y * pairInfo.Y); + pairInfo.Radius = std::hypot(pairInfo.X - collision.posX(), pairInfo.Y - collision.posY()); + pairInfo.Zdist = (pairInfo.Z - collision.posZ()); // Dist over tot mom. float px = pairInfo.positiveMomentum[0] + pairInfo.negativeMomentum[0]; float py = pairInfo.positiveMomentum[1] + pairInfo.negativeMomentum[1]; float pz = pairInfo.positiveMomentum[2] + pairInfo.negativeMomentum[2]; - pairInfo.DistOverTotMom = std::sqrt(pairInfo.X * pairInfo.X + pairInfo.Y * pairInfo.Y + pairInfo.Z * pairInfo.Z) / std::sqrt(px * px + py * py + pz * pz); + pairInfo.DistOverTotMom = std::hypot(pairInfo.X - collision.posX(), pairInfo.Y - collision.posY(), pairInfo.Z - collision.posZ()) / std::hypot(px, py, pz); // Z dist over pz - pairInfo.ZdistOverPz = pairInfo.Z / pz; + pairInfo.ZdistOverPz = (pairInfo.Z - collision.posZ()) / pz; // V0 Momenta - pairInfo.pT = std::sqrt(px * px + py * py); - pairInfo.pTot = std::sqrt(px * px + py * py + pz * pz); + pairInfo.pT = std::hypot(px, py); + pairInfo.pTot = std::hypot(px, py, pz); pairInfo.pZ = pz; // Armenteros-Podolanski variables @@ -2258,6 +2416,11 @@ struct forwardlambdakzeroanalysis { if (originatingV0.has_mcCollision()) { pairInfo.mcCollision = originatingV0.mcCollisionId(); // save this reference, please + + auto mcCollision = originatingV0.mcCollision(); + // Radius + pairInfo.RadiusMc = std::hypot(pairInfo.xMc - mcCollision.posX(), pairInfo.yMc - mcCollision.posY()); + pairInfo.ZdistMc = (pairInfo.zMc - mcCollision.posZ()); } // acquire information @@ -2266,8 +2429,8 @@ struct forwardlambdakzeroanalysis { pairInfo.momentumMc[0] = originatingV0.px(); pairInfo.momentumMc[1] = originatingV0.py(); pairInfo.momentumMc[2] = originatingV0.pz(); - pairInfo.pTotMc = std::sqrt(pairInfo.momentumMc[0] * pairInfo.momentumMc[0] + pairInfo.momentumMc[1] * pairInfo.momentumMc[1] + pairInfo.momentumMc[2] * pairInfo.momentumMc[2]); - pairInfo.pTMc = std::sqrt(pairInfo.momentumMc[0] * pairInfo.momentumMc[0] + pairInfo.momentumMc[1] * pairInfo.momentumMc[1]); + pairInfo.pTotMc = std::hypot(pairInfo.momentumMc[0], pairInfo.momentumMc[1], pairInfo.momentumMc[2]); + pairInfo.pTMc = std::hypot(pairInfo.momentumMc[0], pairInfo.momentumMc[1]); pairInfo.pZMc = pairInfo.momentumMc[2]; if (pairInfo.pdgCode == PDG_t::kK0Short) @@ -2388,6 +2551,13 @@ struct forwardlambdakzeroanalysis { // Fill recoed event properties fillReconstructedEventProperties(collision, bcs, centrality, collisionOccupancy, interactionRate, gapSide, selGapSide); + if (collision.has_mcCollision()) { + auto mcCollision = collision.mcCollision(); + histos.fill(HIST("hEventPVxDiff"), mcCollision.posX(), (mcCollision.posX() - collision.posX())); + histos.fill(HIST("hEventPVyDiff"), mcCollision.posY(), (mcCollision.posY() - collision.posY())); + histos.fill(HIST("hEventPVzDiff"), mcCollision.posZ(), (mcCollision.posZ() - collision.posZ())); + } + histos.fill(HIST("hInteractionRateVsOccupancy"), interactionRate, collisionOccupancy); // __________________________________________