From 0289348344bd887269a00b304b5a8de1762421cb Mon Sep 17 00:00:00 2001 From: SCHOTTER Romain <47983209+romainschotter@users.noreply.github.com> Date: Sat, 28 Feb 2026 17:16:51 +0100 Subject: [PATCH 1/4] Fix rapidity calculation for Xi particles --- PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx index 75d73541798..7f838ebb5e8 100644 --- a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx @@ -2062,7 +2062,12 @@ struct derivedlambdakzeroanalysis { return; // does not have mother particle in record, skip auto v0mother = v0.motherMCPart(); - float rapidityXi = RecoDecay::y(std::array{v0mother.px(), v0mother.py(), v0mother.pz()}, o2::constants::physics::MassXiMinus); + float rapidityXi = 0.; + if (std::abs(v0mother.pdgCode()) == PDG_t::kXiMinus) + rapidity = RecoDecay::y(std::array{v0mother.px(), v0mother.py(), v0mother.pz()}, o2::constants::physics::MassXiMinus); + if (std::abs(v0mother.pdgCode()) == o2::constants::physics::Pdg::kXi0) + rapidity = RecoDecay::y(std::array{v0mother.px(), v0mother.py(), v0mother.pz()}, o2::constants::physics::MassXi0); + if (std::fabs(rapidityXi) > 0.5f) return; // not a valid mother rapidity (PDG selection is later) From 6a81e57d80084a0bb2cc257ad05ec71deb8bd11a Mon Sep 17 00:00:00 2001 From: ALICE Builder Date: Sat, 28 Feb 2026 17:17:43 +0100 Subject: [PATCH 2/4] Please consider the following formatting changes to #15202 (#15203) --- PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx index 7f838ebb5e8..1860b1106ab 100644 --- a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx @@ -2067,7 +2067,7 @@ struct derivedlambdakzeroanalysis { rapidity = RecoDecay::y(std::array{v0mother.px(), v0mother.py(), v0mother.pz()}, o2::constants::physics::MassXiMinus); if (std::abs(v0mother.pdgCode()) == o2::constants::physics::Pdg::kXi0) rapidity = RecoDecay::y(std::array{v0mother.px(), v0mother.py(), v0mother.pz()}, o2::constants::physics::MassXi0); - + if (std::fabs(rapidityXi) > 0.5f) return; // not a valid mother rapidity (PDG selection is later) From c1df8f3f5f6587eb1c2006c7614707b56ac41352 Mon Sep 17 00:00:00 2001 From: SCHOTTER Romain <47983209+romainschotter@users.noreply.github.com> Date: Sat, 28 Feb 2026 17:19:37 +0100 Subject: [PATCH 3/4] Change default value --- PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx index 1860b1106ab..fbdd5c8774f 100644 --- a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx @@ -2062,7 +2062,7 @@ struct derivedlambdakzeroanalysis { return; // does not have mother particle in record, skip auto v0mother = v0.motherMCPart(); - float rapidityXi = 0.; + float rapidityXi = 999.; if (std::abs(v0mother.pdgCode()) == PDG_t::kXiMinus) rapidity = RecoDecay::y(std::array{v0mother.px(), v0mother.py(), v0mother.pz()}, o2::constants::physics::MassXiMinus); if (std::abs(v0mother.pdgCode()) == o2::constants::physics::Pdg::kXi0) From 63b31966845809375bae35ad1eded6a0ac433960 Mon Sep 17 00:00:00 2001 From: SCHOTTER Romain <47983209+romainschotter@users.noreply.github.com> Date: Sun, 1 Mar 2026 17:06:47 +0100 Subject: [PATCH 4/4] Fix compilation error --- PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx index fbdd5c8774f..28a6759f51e 100644 --- a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx @@ -2064,9 +2064,9 @@ struct derivedlambdakzeroanalysis { auto v0mother = v0.motherMCPart(); float rapidityXi = 999.; if (std::abs(v0mother.pdgCode()) == PDG_t::kXiMinus) - rapidity = RecoDecay::y(std::array{v0mother.px(), v0mother.py(), v0mother.pz()}, o2::constants::physics::MassXiMinus); + rapidityXi = RecoDecay::y(std::array{v0mother.px(), v0mother.py(), v0mother.pz()}, o2::constants::physics::MassXiMinus); if (std::abs(v0mother.pdgCode()) == o2::constants::physics::Pdg::kXi0) - rapidity = RecoDecay::y(std::array{v0mother.px(), v0mother.py(), v0mother.pz()}, o2::constants::physics::MassXi0); + rapidityXi = RecoDecay::y(std::array{v0mother.px(), v0mother.py(), v0mother.pz()}, o2::constants::physics::MassXi0); if (std::fabs(rapidityXi) > 0.5f) return; // not a valid mother rapidity (PDG selection is later)