From 84fa54140e1cba11310b961032fc176c3a345093 Mon Sep 17 00:00:00 2001 From: scannito Date: Mon, 19 Jan 2026 12:05:41 +0100 Subject: [PATCH 01/11] Change deltaphi computation --- PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx b/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx index a8c51642ec3..f78486e79b9 100644 --- a/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx +++ b/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx @@ -380,6 +380,11 @@ struct PhiStrangenessCorrelation { return totalEfficiency <= 0.0f ? 1.0f : 1.0f / totalEfficiency; } + float getDeltaPhi(float phiTrigger, float phiAssociated) + { + return RecoDecay::constrainAngle(phiTrigger - phiAssociated, -o2::constants::math::PIHalf); + } + // Single track selection for strangeness sector template bool selectionTrackStrangeness(const T& track) @@ -555,7 +560,7 @@ struct PhiStrangenessCorrelation { /*float weightPhiK0S = computeWeight(BoundEfficiencyMap(effMapPhi, multiplicity, phiCand.pt(), phiCand.y()), BoundEfficiencyMap(effMapK0S, multiplicity, v0.pt(), v0.yK0Short()));*/ - histos.fill(HIST("phiK0S/h5PhiK0SData2PartCorr") + HIST(phiMassRegionLabels[i]), multiplicity, phiCand.pt(), v0.pt(), phiCand.y() - v0.yK0Short(), phiCand.phi() - v0.phi(), weightPhiK0S); + histos.fill(HIST("phiK0S/h5PhiK0SData2PartCorr") + HIST(phiMassRegionLabels[i]), multiplicity, phiCand.pt(), v0.pt(), phiCand.y() - v0.yK0Short(), getDeltaPhi(phiCand.phi(), v0.phi()), weightPhiK0S); } // Loop over all primary pion candidates @@ -573,7 +578,7 @@ struct PhiStrangenessCorrelation { float weightPhiPion = computeWeight(BoundEfficiencyMap(effMapPhi, multiplicity, phiCand.pt(), phiCand.y()), BoundEfficiencyMap(effMapPion, multiplicity, track.pt(), track.rapidity(massPi)));*/ - histos.fill(HIST("phiPi/h5PhiPiData2PartCorr") + HIST(phiMassRegionLabels[i]), multiplicity, phiCand.pt(), track.pt(), phiCand.y() - track.rapidity(massPi), phiCand.phi() - track.phi(), weightPhiPion); + histos.fill(HIST("phiPi/h5PhiPiData2PartCorr") + HIST(phiMassRegionLabels[i]), multiplicity, phiCand.pt(), track.pt(), phiCand.y() - track.rapidity(massPi), getDeltaPhi(phiCand.phi(), track.phi()), weightPhiPion); } }); } From c8453818e2da6d4852545cecf3fec79c55c3dc5d Mon Sep 17 00:00:00 2001 From: scannito Date: Mon, 19 Jan 2026 12:06:32 +0100 Subject: [PATCH 02/11] RdcoDecay header --- PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx b/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx index f78486e79b9..4fd8a9d0199 100644 --- a/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx +++ b/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx @@ -18,6 +18,7 @@ #include "PWGLF/DataModel/mcCentrality.h" #include "PWGLF/Utils/inelGt.h" +#include "Common/Core/RecoDecay.h" #include "Common/Core/TableHelper.h" #include "Common/Core/TrackSelection.h" #include "Common/Core/TrackSelectionDefaults.h" From a87a9fcfaf72c3f03c3af078cac4aaabad8cddbc Mon Sep 17 00:00:00 2001 From: scannito Date: Mon, 19 Jan 2026 14:13:09 +0100 Subject: [PATCH 03/11] Changed tables description --- PWGLF/DataModel/LFPhiStrangeCorrelationTables.h | 6 +++--- PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PWGLF/DataModel/LFPhiStrangeCorrelationTables.h b/PWGLF/DataModel/LFPhiStrangeCorrelationTables.h index e755053e077..589aebb3960 100644 --- a/PWGLF/DataModel/LFPhiStrangeCorrelationTables.h +++ b/PWGLF/DataModel/LFPhiStrangeCorrelationTables.h @@ -37,7 +37,7 @@ DECLARE_SOA_DYNAMIC_COLUMN(InMassRegion, inMassRegion, }); } // namespace lf_selection_phi_candidate -DECLARE_SOA_TABLE(PhimesonCandidatesData, "AOD", "PHICANDIDATESDATA", +DECLARE_SOA_TABLE(PhimesonCandidatesData, "AOD", "PHICANDDATA", lf_selection_phi_candidate::CollisionId, lf_selection_phi_candidate::M, lf_selection_phi_candidate::Pt, @@ -45,7 +45,7 @@ DECLARE_SOA_TABLE(PhimesonCandidatesData, "AOD", "PHICANDIDATESDATA", lf_selection_phi_candidate::Phi, lf_selection_phi_candidate::InMassRegion); -DECLARE_SOA_TABLE(PhimesonCandidatesMcReco, "AOD", "PHICANDIDATESMCRECO", +DECLARE_SOA_TABLE(PhimesonCandidatesMcReco, "AOD", "PHICANDMCRECO", lf_selection_phi_candidate::CollisionId, lf_selection_phi_candidate::M, lf_selection_phi_candidate::Pt, @@ -53,7 +53,7 @@ DECLARE_SOA_TABLE(PhimesonCandidatesMcReco, "AOD", "PHICANDIDATESMCRECO", lf_selection_phi_candidate::Phi, lf_selection_phi_candidate::InMassRegion); -DECLARE_SOA_TABLE(PhimesonCandidatesMcGen, "AOD", "PHICANDIDATESMCGEN", +DECLARE_SOA_TABLE(PhimesonCandidatesMcGen, "AOD", "PHICANDMCGEN", lf_selection_phi_candidate::CollisionId, lf_selection_phi_candidate::M, lf_selection_phi_candidate::Pt, diff --git a/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx b/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx index 55e4f024588..fb14e02b52d 100644 --- a/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx +++ b/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx @@ -62,7 +62,7 @@ using namespace o2::framework::expressions; struct PhiMesonCandProducer { // Produce the table with the phi candidates information Produces phimesonCandidatesData; - // Produces phimesonCandidatesMcReco; + Produces phimesonCandidatesMcReco; Produces phimesonCandidatesMcGen; HistogramRegistry histos{"phiCandidates", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; From 38f13ac24015e49e78ab562e2a56fcd2c9719469 Mon Sep 17 00:00:00 2001 From: scannito Date: Mon, 19 Jan 2026 14:27:12 +0100 Subject: [PATCH 04/11] PresliceUnsorted --- PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx b/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx index 4fd8a9d0199..4136939c786 100644 --- a/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx +++ b/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx @@ -283,7 +283,8 @@ struct PhiStrangenessCorrelation { Preslice collPerMCCollision = aod::mccollisionlabel::mcCollisionId; Preslice v0PerCollision = aod::v0::collisionId; Preslice trackPerCollision = aod::track::collisionId; - PresliceUnsorted phiCandPerCollision = aod::lf_selection_phi_candidate::collisionId; + // Preslice phiCandDataPerCollision = aod::lf_selection_phi_candidate::collisionId; + PresliceUnsorted phiCandPerCollision = aod::lf_selection_phi_candidate::collisionId; // Preslice mcPartPerMCCollision = aod::mcparticle::mcCollisionId; } preslices; From aa1f057bcc72e5ae633ab86a75ec5b8c7f2104c4 Mon Sep 17 00:00:00 2001 From: scannito Date: Mon, 19 Jan 2026 16:18:45 +0100 Subject: [PATCH 05/11] Naming --- PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx b/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx index 4136939c786..17b82700e5d 100644 --- a/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx +++ b/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx @@ -588,7 +588,7 @@ struct PhiStrangenessCorrelation { PROCESS_SWITCH(PhiStrangenessCorrelation, processPhiK0SPionDeltayDeltaphiData2D, "Process function for Phi-K0S and Phi-Pion Deltay and Deltaphi 2D Correlations in Data", true); - void processParticleEfficiency(MCCollisions::iterator const& mcCollision, SimCollisions const& collisions, FullMCTracks const& fullMCTracks, FullMCV0s const& V0s, V0DauMCTracks const&, aod::McParticles const& mcParticles, aod::PhimesonCandidatesData const& phiCandidates) + void processParticleEfficiency(MCCollisions::iterator const& mcCollision, SimCollisions const& collisions, FullMCTracks const& fullMCTracks, FullMCV0s const& V0s, V0DauMCTracks const&, aod::McParticles const& mcParticles, aod::PhimesonCandidatesMcReco const& phiCandidatesMcReco) { uint16_t numberAssocColls{0}; std::vector zVtxs; @@ -602,7 +602,7 @@ struct PhiStrangenessCorrelation { zVtxs.push_back(collision.posZ()); if (selectionType == 0) { - const auto phiCandidatesThisColl = phiCandidates.sliceBy(preslices.phiCandPerCollision, collision.globalIndex()); + const auto phiCandidatesThisColl = phiCandidatesMcReco.sliceBy(preslices.phiCandPerCollision, collision.globalIndex()); for (const auto& phiCand : phiCandidatesThisColl) { histos.fill(HIST("phi/h4PhiMCReco"), collision.posZ(), mcCollision.centFT0M(), phiCand.pt(), phiCand.y()); } From 9014de992072fefd7998b2ee83aa3ff353ea2285 Mon Sep 17 00:00:00 2001 From: scannito Date: Tue, 20 Jan 2026 11:57:55 +0100 Subject: [PATCH 06/11] McReco for Phi efficiency --- .../Strangeness/phiStrangeCorrelator.cxx | 36 ++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx b/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx index fb14e02b52d..ede3a51366c 100644 --- a/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx +++ b/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx @@ -196,7 +196,7 @@ struct PhiMesonCandProducer { } } - PROCESS_SWITCH(PhiMesonCandProducer, processData, "Process function to select Phi meson candidates in Data", true); + PROCESS_SWITCH(PhiMesonCandProducer, processData, "Process function to select Phi meson candidates in Data or in ", true); void processMCRecoDataLike(SimCollisions::iterator const& collision, FullMCTracks const&) { @@ -227,7 +227,7 @@ struct PhiMesonCandProducer { PROCESS_SWITCH(PhiMesonCandProducer, processMCRecoDataLike, "Process function to select Phi meson candidates in MCReco w/o MC truth", false); - /*void processMCReco(SimCollisions::iterator const& collision, FullMCTracks const&) + void processMCReco(SimCollisions::iterator const& collision, FullMCTracks const&, aod::McParticles const& mcParticles) { auto posThisColl = posMCTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); auto negThisColl = negMCTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); @@ -235,10 +235,16 @@ struct PhiMesonCandProducer { for (const auto& track1 : posThisColl) { if (!selectionTrackResonance(track1) || !selectionPIDKaonpTdependent(track1)) continue; + if (!track1.has_mcParticle()) + continue; + const auto track1McParticle = mcParticles.rawIteratorAt(track1.mcParticleId()); for (const auto& track2 : negThisColl) { if (!selectionTrackResonance(track2) || !selectionPIDKaonpTdependent(track2)) continue; + if (!track2.has_mcParticle()) + continue; + const auto track2McParticle = mcParticles.rawIteratorAt(track2.mcParticleId()); ROOT::Math::PxPyPzMVector recPhi = recMother(track1, track2, massKa, massKa); @@ -249,12 +255,34 @@ struct PhiMesonCandProducer { if (std::abs(recPhi.Rapidity()) > phiConfigs.cfgYAcceptance) continue; - phimesonCandidatesMcReco(collision.globalIndex(), recPhi.M(), recPhi.Pt(), recPhi.Rapidity(), recPhi.Phi()); + const auto track1mcPartMotherIndexes = track1McParticle.motherIds(); + const auto track2mcPartMotherIndexes = track2McParticle.motherIds(); + + auto genPhiMaybe = [&]() -> std::optional { + for (const auto& mother1Index : track1mcPartMotherIndexes) { + for (const auto& mother2Index : track2mcPartMotherIndexes) { + if (mother1Index != mother2Index) + continue; + + const auto motherMcParticle = mcParticles.rawIteratorAt(mother1Index); + if (std::abs(motherMcParticle.pdgCode()) == o2::constants::physics::Pdg::kPhi) + return motherMcParticle; + } + } + + return std::nullopt; + }(); + + if (!genPhiMaybe) + continue; + const auto genPhi = *genPhiMaybe; + + phimesonCandidatesMcReco(collision.globalIndex(), recPhi.M(), genPhi.pt(), genPhi.y(), genPhi.phi()); } } } - PROCESS_SWITCH(PhiMesonCandProducer, processMCReco, "Process function to select Phi meson candidates in MCReco w MC truth", false);*/ + PROCESS_SWITCH(PhiMesonCandProducer, processMCReco, "Process function to select Phi meson candidates in MCReco w MC truth", false); void processMCGen(aod::McCollisions::iterator const& mcCollision, aod::McParticles const& mcParticles) { From 70fbebab3c7f703dd3ad9649f08c9eeab3a7d47a Mon Sep 17 00:00:00 2001 From: scannito Date: Tue, 20 Jan 2026 12:04:06 +0100 Subject: [PATCH 07/11] Fix method name --- PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx b/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx index ede3a51366c..177061be5b2 100644 --- a/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx +++ b/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx @@ -255,8 +255,8 @@ struct PhiMesonCandProducer { if (std::abs(recPhi.Rapidity()) > phiConfigs.cfgYAcceptance) continue; - const auto track1mcPartMotherIndexes = track1McParticle.motherIds(); - const auto track2mcPartMotherIndexes = track2McParticle.motherIds(); + const auto track1mcPartMotherIndexes = track1McParticle.mothersIds(); + const auto track2mcPartMotherIndexes = track2McParticle.mothersIds(); auto genPhiMaybe = [&]() -> std::optional { for (const auto& mother1Index : track1mcPartMotherIndexes) { From a247a10cc1561001f4ea96cf1ec529b15d3f1280 Mon Sep 17 00:00:00 2001 From: scannito Date: Tue, 20 Jan 2026 14:07:22 +0100 Subject: [PATCH 08/11] Check daughter track pdg --- PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx b/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx index 177061be5b2..8694bba317a 100644 --- a/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx +++ b/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx @@ -238,6 +238,8 @@ struct PhiMesonCandProducer { if (!track1.has_mcParticle()) continue; const auto track1McParticle = mcParticles.rawIteratorAt(track1.mcParticleId()); + if (track1McParticle.pdgCode() != PDG_t::kKPlus || !track1McParticle.isPhysicalPrimary()) + continue; for (const auto& track2 : negThisColl) { if (!selectionTrackResonance(track2) || !selectionPIDKaonpTdependent(track2)) @@ -245,6 +247,8 @@ struct PhiMesonCandProducer { if (!track2.has_mcParticle()) continue; const auto track2McParticle = mcParticles.rawIteratorAt(track2.mcParticleId()); + if (track2McParticle.pdgCode() != PDG_t::kKMinus || !track2McParticle.isPhysicalPrimary()) + continue; ROOT::Math::PxPyPzMVector recPhi = recMother(track1, track2, massKa, massKa); From bd91231dc14a46255b0fa4477c0207fe3ca48309 Mon Sep 17 00:00:00 2001 From: scannito Date: Tue, 20 Jan 2026 16:34:07 +0100 Subject: [PATCH 09/11] Naming --- .../Strangeness/phiStrangeCorrelator.cxx | 4 +- .../Strangeness/phiStrangeCorrelation.cxx | 62 +++++++++++++++++-- 2 files changed, 59 insertions(+), 7 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx b/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx index 8694bba317a..bff0b64afd7 100644 --- a/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx +++ b/PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx @@ -196,8 +196,9 @@ struct PhiMesonCandProducer { } } - PROCESS_SWITCH(PhiMesonCandProducer, processData, "Process function to select Phi meson candidates in Data or in ", true); + PROCESS_SWITCH(PhiMesonCandProducer, processData, "Process function to select Phi meson candidates in Data or in McReco (w/o McTruth) analysis", true); + /* void processMCRecoDataLike(SimCollisions::iterator const& collision, FullMCTracks const&) { auto posThisColl = posMCTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); @@ -226,6 +227,7 @@ struct PhiMesonCandProducer { } PROCESS_SWITCH(PhiMesonCandProducer, processMCRecoDataLike, "Process function to select Phi meson candidates in MCReco w/o MC truth", false); + */ void processMCReco(SimCollisions::iterator const& collision, FullMCTracks const&, aod::McParticles const& mcParticles) { diff --git a/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx b/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx index 17b82700e5d..2524b6e55ea 100644 --- a/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx +++ b/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx @@ -318,8 +318,11 @@ struct PhiStrangenessCorrelation { histos.add("phi/h3PhiData", "Invariant mass of Phi in Data", kTH3F, {binnedmultAxis, binnedpTPhiAxis, massPhiAxis}); for (const auto& label : phiMassRegionLabels) { - histos.add(fmt::format("phiK0S/h5PhiK0SData2PartCorr{}", label).c_str(), "Deltay vs deltaphi for Phi and K0Short in Data", kTHnSparseF, {binnedmultAxis, binnedpTPhiAxis, binnedpTK0SAxis, deltayAxis, deltaphiAxis}); - histos.add(fmt::format("phiPi/h5PhiPiData2PartCorr{}", label).c_str(), "Deltay vs deltaphi for Phi and Pion in Data", kTHnSparseF, {binnedmultAxis, binnedpTPhiAxis, binnedpTPiAxis, deltayAxis, deltaphiAxis}); + histos.add(fmt::format("phiK0S/h5PhiK0SData{}", label).c_str(), "Deltay vs deltaphi for Phi and K0Short in Data", kTHnSparseF, {binnedmultAxis, binnedpTPhiAxis, binnedpTK0SAxis, deltayAxis, deltaphiAxis}); + histos.add(fmt::format("phiPi/h5PhiPiData{}", label).c_str(), "Deltay vs deltaphi for Phi and Pion in Data", kTHnSparseF, {binnedmultAxis, binnedpTPhiAxis, binnedpTPiAxis, deltayAxis, deltaphiAxis}); + + histos.add(fmt::format("phiK0S/h5PhiK0SDataME{}", label).c_str(), "Deltay vs deltaphi for Phi and K0Short in Data ME", kTHnSparseF, {binnedmultAxis, binnedpTPhiAxis, binnedpTK0SAxis, deltayAxis, deltaphiAxis}); + histos.add(fmt::format("phiPi/h5PhiPiDataME{}", label).c_str(), "Deltay vs deltaphi for Phi and Pion in Data ME", kTHnSparseF, {binnedmultAxis, binnedpTPhiAxis, binnedpTPiAxis, deltayAxis, deltaphiAxis}); } // histos.add("phiK0S/h5PhiK0SDataNewProc", "2D Invariant mass of Phi and K0Short in Data", kTHnSparseF, {deltayAxis, binnedmultAxis, binnedpTK0SAxis, massK0SAxis, massPhiAxis}); @@ -529,7 +532,7 @@ struct PhiStrangenessCorrelation { return true; } - void processPhiK0SPionDeltayDeltaphiData2D(SelCollisions::iterator const& collision, aod::PhimesonCandidatesData const& phiCandidates, FullTracks const& fullTracks, FullV0s const& V0s, V0DauTracks const&) + void processPhiK0SPionData(SelCollisions::iterator const& collision, aod::PhimesonCandidatesData const& phiCandidates, FullTracks const& fullTracks, FullV0s const& V0s, V0DauTracks const&) { float multiplicity = collision.centFT0M(); @@ -562,7 +565,7 @@ struct PhiStrangenessCorrelation { /*float weightPhiK0S = computeWeight(BoundEfficiencyMap(effMapPhi, multiplicity, phiCand.pt(), phiCand.y()), BoundEfficiencyMap(effMapK0S, multiplicity, v0.pt(), v0.yK0Short()));*/ - histos.fill(HIST("phiK0S/h5PhiK0SData2PartCorr") + HIST(phiMassRegionLabels[i]), multiplicity, phiCand.pt(), v0.pt(), phiCand.y() - v0.yK0Short(), getDeltaPhi(phiCand.phi(), v0.phi()), weightPhiK0S); + histos.fill(HIST("phiK0S/h5PhiK0SData") + HIST(phiMassRegionLabels[i]), multiplicity, phiCand.pt(), v0.pt(), phiCand.y() - v0.yK0Short(), getDeltaPhi(phiCand.phi(), v0.phi()), weightPhiK0S); } // Loop over all primary pion candidates @@ -580,13 +583,60 @@ struct PhiStrangenessCorrelation { float weightPhiPion = computeWeight(BoundEfficiencyMap(effMapPhi, multiplicity, phiCand.pt(), phiCand.y()), BoundEfficiencyMap(effMapPion, multiplicity, track.pt(), track.rapidity(massPi)));*/ - histos.fill(HIST("phiPi/h5PhiPiData2PartCorr") + HIST(phiMassRegionLabels[i]), multiplicity, phiCand.pt(), track.pt(), phiCand.y() - track.rapidity(massPi), getDeltaPhi(phiCand.phi(), track.phi()), weightPhiPion); + histos.fill(HIST("phiPi/h5PhiPiData") + HIST(phiMassRegionLabels[i]), multiplicity, phiCand.pt(), track.pt(), phiCand.y() - track.rapidity(massPi), getDeltaPhi(phiCand.phi(), track.phi()), weightPhiPion); + } + }); + } + } + + PROCESS_SWITCH(PhiStrangenessCorrelation, processPhiK0SPionData, "Process function for Phi-K0S and Phi-Pion Deltay and Deltaphi 2D Correlations in Data", true); + + /* + void processPhiK0SPionDataME(SelCollisions::iterator const& collision, aod::PhimesonCandidatesData const& phiCandidates, FullTracks const& fullTracks, FullV0s const& V0s, V0DauTracks const&) + { + Pair pairPhiK0S{binningOnVertexAndCent, cfgNoMixedEvents, -1, collisions, tracksV0sTuple, &cache}; + Triple triple{binningOnPositions, 5, -1, &cache}; + float multiplicity = collision.centFT0M(); + + const std::array, 2> phiMassRegions = {phiConfigs.rangeMPhiSignal, phiConfigs.rangeMPhiSideband}; + + // Loop over all positive tracks + for (const auto& phiCand : phiCandidates) { + static_for<0, phiMassRegionLabels.size() - 1>([&](auto i_idx) { + constexpr unsigned int i = i_idx.value; + + const auto& [minMass, maxMass] = phiMassRegions[i]; + if (!phiCand.inMassRegion(minMass, maxMass)) + return; + + // V0 already reconstructed by the builder + for (const auto& v0 : V0s) { + // Cut on V0 dynamic columns + if (!selectionV0(v0, collision)) + continue; + + float weightPhiK0S = computeWeight(BoundEfficiencyMap(effMaps[Phi], multiplicity, phiCand.pt(), phiCand.y()), + BoundEfficiencyMap(effMaps[K0S], multiplicity, v0.pt(), v0.yK0Short())); + + histos.fill(HIST("phiK0S/h5PhiK0SDataME") + HIST(phiMassRegionLabels[i]), multiplicity, phiCand.pt(), v0.pt(), phiCand.y() - v0.yK0Short(), getDeltaPhi(phiCand.phi(), v0.phi()), weightPhiK0S); + } + + // Loop over all primary pion candidates + for (const auto& track : fullTracks) { + if (!selectionPion(track)) + continue; + + float weightPhiPion = computeWeight(BoundEfficiencyMap(effMaps[Phi], multiplicity, phiCand.pt(), phiCand.y()), + BoundEfficiencyMap(effMaps[Pion], multiplicity, track.pt(), track.rapidity(massPi))); + + histos.fill(HIST("phiPi/h5PhiPiDataME") + HIST(phiMassRegionLabels[i]), multiplicity, phiCand.pt(), track.pt(), phiCand.y() - track.rapidity(massPi), getDeltaPhi(phiCand.phi(), track.phi()), weightPhiPion); } }); } } - PROCESS_SWITCH(PhiStrangenessCorrelation, processPhiK0SPionDeltayDeltaphiData2D, "Process function for Phi-K0S and Phi-Pion Deltay and Deltaphi 2D Correlations in Data", true); + PROCESS_SWITCH(PhiStrangenessCorrelation, processPhiK0SPionDataME, "Process function for Phi-K0S and Phi-Pion Deltay and Deltaphi 2D Correlations in Data ME", true); + */ void processParticleEfficiency(MCCollisions::iterator const& mcCollision, SimCollisions const& collisions, FullMCTracks const& fullMCTracks, FullMCV0s const& V0s, V0DauMCTracks const&, aod::McParticles const& mcParticles, aod::PhimesonCandidatesMcReco const& phiCandidatesMcReco) { From 8e20290a7af5f2ac72535623d4473e6ae116fcf0 Mon Sep 17 00:00:00 2001 From: scannito Date: Tue, 20 Jan 2026 18:51:53 +0100 Subject: [PATCH 10/11] PresliceUnsorted --- PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx b/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx index 2524b6e55ea..16ef7d4fc37 100644 --- a/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx +++ b/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx @@ -280,10 +280,10 @@ struct PhiStrangenessCorrelation { // Preslice for manual slicing struct : PresliceGroup { - Preslice collPerMCCollision = aod::mccollisionlabel::mcCollisionId; Preslice v0PerCollision = aod::v0::collisionId; Preslice trackPerCollision = aod::track::collisionId; // Preslice phiCandDataPerCollision = aod::lf_selection_phi_candidate::collisionId; + PresliceUnsorted collPerMCCollision = aod::mccollisionlabel::mcCollisionId; PresliceUnsorted phiCandPerCollision = aod::lf_selection_phi_candidate::collisionId; // Preslice mcPartPerMCCollision = aod::mcparticle::mcCollisionId; From 57e146e1e232dc725e012f76779565d36d55120e Mon Sep 17 00:00:00 2001 From: scannito Date: Tue, 20 Jan 2026 18:58:42 +0100 Subject: [PATCH 11/11] Preslice --- PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx b/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx index 16ef7d4fc37..2524b6e55ea 100644 --- a/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx +++ b/PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx @@ -280,10 +280,10 @@ struct PhiStrangenessCorrelation { // Preslice for manual slicing struct : PresliceGroup { + Preslice collPerMCCollision = aod::mccollisionlabel::mcCollisionId; Preslice v0PerCollision = aod::v0::collisionId; Preslice trackPerCollision = aod::track::collisionId; // Preslice phiCandDataPerCollision = aod::lf_selection_phi_candidate::collisionId; - PresliceUnsorted collPerMCCollision = aod::mccollisionlabel::mcCollisionId; PresliceUnsorted phiCandPerCollision = aod::lf_selection_phi_candidate::collisionId; // Preslice mcPartPerMCCollision = aod::mcparticle::mcCollisionId;