Skip to content

Commit 3ac1f96

Browse files
[PWGLF] Fix rapidity calculation for Xi particles (#15202)
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
1 parent 9cd93d6 commit 3ac1f96

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2062,7 +2062,12 @@ struct derivedlambdakzeroanalysis {
20622062
return; // does not have mother particle in record, skip
20632063

20642064
auto v0mother = v0.motherMCPart();
2065-
float rapidityXi = RecoDecay::y(std::array{v0mother.px(), v0mother.py(), v0mother.pz()}, o2::constants::physics::MassXiMinus);
2065+
float rapidityXi = 999.;
2066+
if (std::abs(v0mother.pdgCode()) == PDG_t::kXiMinus)
2067+
rapidityXi = RecoDecay::y(std::array{v0mother.px(), v0mother.py(), v0mother.pz()}, o2::constants::physics::MassXiMinus);
2068+
if (std::abs(v0mother.pdgCode()) == o2::constants::physics::Pdg::kXi0)
2069+
rapidityXi = RecoDecay::y(std::array{v0mother.px(), v0mother.py(), v0mother.pz()}, o2::constants::physics::MassXi0);
2070+
20662071
if (std::fabs(rapidityXi) > 0.5f)
20672072
return; // not a valid mother rapidity (PDG selection is later)
20682073

0 commit comments

Comments
 (0)