diff --git a/Phys/DecayTreeFitter/python/DecayTreeFitter/DecayTreeFitter.py b/Phys/DecayTreeFitter/python/DecayTreeFitter/DecayTreeFitter.py index 966f477a1dfd01f600a134f0d21a00fb91ef9363..5f327d94a55deba5e7ba45f27694b0dde327e5b7 100644 --- a/Phys/DecayTreeFitter/python/DecayTreeFitter/DecayTreeFitter.py +++ b/Phys/DecayTreeFitter/python/DecayTreeFitter/DecayTreeFitter.py @@ -1,5 +1,5 @@ ############################################################################### -# (c) Copyright 2022-2023 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2022-2024 CERN for the benefit of the LHCb Collaboration # # # # This software is distributed under the terms of the GNU General Public # # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # @@ -157,17 +157,17 @@ class DecayTreeFitter: self.PERR = self.__call__( functor=F.MATH_ERROR @ F.MATH_SCALAR_MOMENTUM @ F.FOURMOMENTUM, apply_to_particle_params=True) - self.TAU = self.__call__( + self.CTAU = self.__call__( functor=F.MATH_VALUE @ F.PARTICLE_PARAMS_CTAU, apply_to_particle_params=True) - self.TAUERR = self.__call__( + self.CTAUERR = self.__call__( functor=F.MATH_ERROR @ F.PARTICLE_PARAMS_CTAU, apply_to_particle_params=True) self.FD = self.__call__( - functor=F.MATH_VALUE @ F.PARTICLE_PARAMS_DECAY_LENGTH, + functor=F.MATH_VALUE @ F.PARTICLE_PARAMS_FLIGHT_DISTANCE, apply_to_particle_params=True) self.FDERR = self.__call__( - functor=F.MATH_ERROR @ F.PARTICLE_PARAMS_DECAY_LENGTH, + functor=F.MATH_ERROR @ F.PARTICLE_PARAMS_FLIGHT_DISTANCE, apply_to_particle_params=True) def _apply_functor(self, functor: BoundFunctor, relation: DataHandle): diff --git a/Phys/FunctorCore/include/Functors/LHCbMath.h b/Phys/FunctorCore/include/Functors/LHCbMath.h index 3f784ec0f2ff1f5bd30e470a8d95057d059a825b..6299f88a4aa125a873da6dedb4ef1074b18160be 100644 --- a/Phys/FunctorCore/include/Functors/LHCbMath.h +++ b/Phys/FunctorCore/include/Functors/LHCbMath.h @@ -120,13 +120,13 @@ namespace Functors::LHCbMath { namespace ParticleParams { /** - * @brief decayLength, access the decay length of Gaudi::Math::ParticleParams + * @brief flightDistance, access the decay length of Gaudi::Math::ParticleParams */ - struct decayLength : public Function { + struct flightDistance : public Function { - constexpr auto name() const { return "ParticleParams::decayLength"; } + constexpr auto name() const { return "ParticleParams::flightDistance"; } - auto operator()( const Gaudi::Math::ParticleParams& input ) const { return input.decayLength(); } + auto operator()( const Gaudi::Math::ParticleParams& input ) const { return input.flightDistance(); } template <typename T> auto operator()( const T& p ) const -> decltype( Functors::Optional{( *this )( *p )} ) { @@ -136,7 +136,7 @@ namespace Functors::LHCbMath { template <typename... Data> auto operator()( Data... ) const { static_assert( detail::always_false<Data...>::value, - "The fucntor Functors::LHCbMath::ParticleParams::decayLength can only apply to " + "The fucntor Functors::LHCbMath::ParticleParams::flightDistance can only apply to " "Gaudi::Math::ParticleParams" ); } }; diff --git a/Phys/FunctorCore/python/Functors/__init__.py b/Phys/FunctorCore/python/Functors/__init__.py index 19e7120eb2487ffa9ce6cbc7a13c8a8d753428e3..f4c5d847b6303c1cb75a7bb875d1f05adfcf1b22 100644 --- a/Phys/FunctorCore/python/Functors/__init__.py +++ b/Phys/FunctorCore/python/Functors/__init__.py @@ -278,9 +278,10 @@ MATH_INVARIANT_MASS = Functor( 'MATH_INVARIANT_MASS', 'LHCbMath::invariantMass', 'Returns the scalar momentum by input.invariantMass()') # ParticleParams -PARTICLE_PARAMS_DECAY_LENGTH = Functor( - 'PARTICLE_PARAMS_DECAY_LENGTH', 'LHCbMath::ParticleParams::decayLength', - 'Returns the decay length of Gaudi::Math::ParticleParams') +PARTICLE_PARAMS_FLIGHT_DISTANCE = Functor( + 'PARTICLE_PARAMS_FLIGHT_DISTANCE', + 'LHCbMath::ParticleParams::flightDistance', + 'Returns the flight distance of Gaudi::Math::ParticleParams') PARTICLE_PARAMS_CTAU = Functor( 'PARTICLE_PARAMS_CTAU', 'LHCbMath::ParticleParams::ctau', 'Returns the c*tau of Gaudi::Math::ParticleParams') diff --git a/Phys/FunctorCore/tests/src/TestFunctors.cpp b/Phys/FunctorCore/tests/src/TestFunctors.cpp index 0c74a2ae647b86cf06778758e72d3928f513b543..216cff44ec3aa4cc0446f4f6d5a4983e1ab78c64 100644 --- a/Phys/FunctorCore/tests/src/TestFunctors.cpp +++ b/Phys/FunctorCore/tests/src/TestFunctors.cpp @@ -3035,13 +3035,13 @@ BOOST_AUTO_TEST_CASE( test_lhcb_math_functors ) { pos_mom( 2, 2 ) = 0.01; Gaudi::Math::ParticleParams params{pos, P4, decay_length, pos_mom, len_pos, len_mom}; - Functors::LHCbMath::ParticleParams::ctau CTAU; - Functors::LHCbMath::ParticleParams::decayLength DECAY_LENGTH; - Functors::LHCbMath::ParticleParams::lenPosCov LEN_POS_COV; - Functors::LHCbMath::ParticleParams::lenMomCov LEN_MOM_COV; + Functors::LHCbMath::ParticleParams::ctau CTAU; + Functors::LHCbMath::ParticleParams::flightDistance FLIGHT_DISTANCE; + Functors::LHCbMath::ParticleParams::lenPosCov LEN_POS_COV; + Functors::LHCbMath::ParticleParams::lenMomCov LEN_MOM_COV; BOOST_CHECK_EQUAL( CTAU( params ), params.ctau() ); - BOOST_CHECK_EQUAL( DECAY_LENGTH( params ), params.decayLength() ); + BOOST_CHECK_EQUAL( FLIGHT_DISTANCE( params ), params.flightDistance() ); BOOST_CHECK_EQUAL( LEN_POS_COV( params ), params.lenPosCov() ); BOOST_CHECK_EQUAL( LEN_MOM_COV( params ), params.lenMomCov() ); }