From 523908ebf0a677f74cd922eb57d7f9a8eff8d578 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 21 Jul 2026 12:25:16 +0000 Subject: [PATCH] Please consider the following formatting changes --- Framework/Core/include/Framework/AnalysisDataModel.h | 8 +++----- Framework/Core/include/Framework/DataTypes.h | 11 ++++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Framework/Core/include/Framework/AnalysisDataModel.h b/Framework/Core/include/Framework/AnalysisDataModel.h index 47dbb5361e8f4..5478f12a27424 100644 --- a/Framework/Core/include/Framework/AnalysisDataModel.h +++ b/Framework/Core/include/Framework/AnalysisDataModel.h @@ -1990,15 +1990,13 @@ namespace mcparticle_v2 // note: this has to be declared in a separate namespace so it does not conflict with existing // derived data table declarations in O2Physics DECLARE_SOA_DYNAMIC_COLUMN(IsPhysicalPrimary, isPhysicalPrimary, //! True if particle is considered a physical primary according to the ALICE definition - [](uint8_t input_flags, float vx, float vy) -> bool { - return (o2::aod::mcparticle::Tools::removeIsPhysicalPrimaryBit(input_flags, vx, vy) & o2::aod::mcparticle::enums::PhysicalPrimary) == o2::aod::mcparticle::enums::PhysicalPrimary; }); + [](uint8_t input_flags, float vx, float vy) -> bool { return (o2::aod::mcparticle::Tools::removeIsPhysicalPrimaryBit(input_flags, vx, vy) & o2::aod::mcparticle::enums::PhysicalPrimary) == o2::aod::mcparticle::enums::PhysicalPrimary; }); // avoid that the stored flags are provided unprotected via // the getter '.flags': analysers will get the correct bit map transparently -DECLARE_SOA_COLUMN(Flags, storedFlags, uint8_t); //! ALICE specific flags, see MCParticleFlags. Do not use directly. Use the dynamic columns, e.g. producedByGenerator() +DECLARE_SOA_COLUMN(Flags, storedFlags, uint8_t); //! ALICE specific flags, see MCParticleFlags. Do not use directly. Use the dynamic columns, e.g. producedByGenerator() DECLARE_SOA_DYNAMIC_COLUMN(ProtectedFlags, flags, //! protected against - [](uint8_t input_flags, float vx, float vy) -> uint8_t { - return o2::aod::mcparticle::Tools::removeIsPhysicalPrimaryBit(input_flags, vx, vy); }); + [](uint8_t input_flags, float vx, float vy) -> uint8_t { return o2::aod::mcparticle::Tools::removeIsPhysicalPrimaryBit(input_flags, vx, vy); }); } // namespace mcparticle_v2 diff --git a/Framework/Core/include/Framework/DataTypes.h b/Framework/Core/include/Framework/DataTypes.h index d03e482832976..98a40e8f561b0 100644 --- a/Framework/Core/include/Framework/DataTypes.h +++ b/Framework/Core/include/Framework/DataTypes.h @@ -164,15 +164,16 @@ namespace o2::aod::mcparticle constexpr float maxRadiusForPhysicalPrimary{5.f}; struct Tools { -// trivial helper to remove Physical Primary bit - static uint8_t removeIsPhysicalPrimaryBit(uint8_t input_flags, float vx, float vy){ - if((std::hypot(vx, vy) > o2::aod::mcparticle::maxRadiusForPhysicalPrimary) && ((input_flags & o2::aod::mcparticle::enums::PhysicalPrimary) == o2::aod::mcparticle::enums::PhysicalPrimary)){ + // trivial helper to remove Physical Primary bit + static uint8_t removeIsPhysicalPrimaryBit(uint8_t input_flags, float vx, float vy) + { + if ((std::hypot(vx, vy) > o2::aod::mcparticle::maxRadiusForPhysicalPrimary) && ((input_flags & o2::aod::mcparticle::enums::PhysicalPrimary) == o2::aod::mcparticle::enums::PhysicalPrimary)) { input_flags = input_flags & ~enums::PhysicalPrimary; // remove physical primary bit, keep others } - return input_flags; + return input_flags; } }; -} +} // namespace o2::aod::mcparticle namespace o2::aod::run2 {