Skip to content

Commit 0f08498

Browse files
committed
[PWGLF] Use the O2 charged pion mass constant in the K1 ML feature builder
The K1 ML feature contract SHA covers the 125 feature names and the three projection index lists only, so switching the pion mass from the local literal to o2::constants::physics::MassPionCharged does not change the contract identity. Feature values change at the 1e-8 relative level for the pair masses; exports written with the previous literal are therefore not byte-identical to new exports.
1 parent 58087ca commit 0f08498

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎PWGLF/Core/K1MlFeatures.h‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -744,11 +744,6 @@ static_assert(detail::isStrictlyIncreasingBelow(RelationalV1Projection, NMasterF
744744
static_assert(detail::isStrictlyIncreasingBelow(SubstructureV1Projection, NMasterFeatures), "SubstructureV1 projection indices must be strictly increasing and below NMasterFeatures");
745745
inline constexpr std::string_view FeatureContractSha256 = "39f38ece001581d8ebf57392fad045759a63ba49f57c411b9b566d7c1cc58b8a";
746746

747-
// The kaon mass is the O2 constant (exactly 0.493677). The pion mass keeps the
748-
// frozen feature-contract literal; O2 MassPionCharged differs (0.1395704).
749-
inline constexpr double K1ChargedKaonMassGeV = o2::constants::physics::MassKaonCharged;
750-
inline constexpr double ChargedPionMassGeV = 0.13957039; // o2-linter: disable=pdg/explicit-mass (frozen feature contract value; O2 MassPionCharged is 0.1395704)
751-
752747
inline FeaturePack buildMasterFeatures(CandidateSnapshot const& candidate)
753748
{
754749
FeaturePack pack;
@@ -769,7 +764,7 @@ inline FeaturePack buildMasterFeatures(CandidateSnapshot const& candidate)
769764

770765
std::array<detail::Kinematics, NCandidateTracks> kin{};
771766
for (std::size_t i = 0; i < NCandidateTracks; ++i) {
772-
if (!detail::getKinematics(candidate.tracks[i], i == 0 ? K1ChargedKaonMassGeV : ChargedPionMassGeV, kin[i])) {
767+
if (!detail::getKinematics(candidate.tracks[i], i == 0 ? o2::constants::physics::MassKaonCharged : o2::constants::physics::MassPionCharged, kin[i])) {
773768
pack.status = BuildStatus::InvalidKinematics;
774769
return pack;
775770
}

0 commit comments

Comments
 (0)