diff --git a/Phys/FunctorCore/python/Functors/__init__.py b/Phys/FunctorCore/python/Functors/__init__.py index 2c6e1a633032282e7a83dbdb39b96855033e2b9f..2541e2814843fced0f4420ef2857dfb296567881 100644 --- a/Phys/FunctorCore/python/Functors/__init__.py +++ b/Phys/FunctorCore/python/Functors/__init__.py @@ -595,17 +595,11 @@ def BPV_POS(Vertices: DataHandle = None): return TOLINALG @ (POSITION @ BPV(Vertices)) -def OWNPV_POS(): - """ Position of :py:func:`~OWNPV` - - Functor's call operator expects a particle-like object. - - Args: - Vertices: DataHandle of the vertices - - """ - # FIXME remove linalg trafo hack - return TOLINALG @ (POSITION @ OWNPV) +# FIXME remove linalg trafo hack +OWNPV_POS = setComposedFunctor( + TOLINALG @ POSITION @ OWNPV, "OWNPV_POS", + "Position of :py:func:`~OWNPV`. Functor's call operator expects a particle-like object." +) def BPVX(Vertices: DataHandle = None): @@ -3083,9 +3077,8 @@ OWNPVLTIME = setComposedFunctor( def OWNPVCORRM(invisible_mass: float = 0.0): return setComposedFunctor( - _BPVCORRM(invisible_mass).bind( - OWNPV, FORWARDARGS, 'OWNPVCORRM', - "Corrected mass of the composite using the :py:func:`~OWNPV`")) + _BPVCORRM(invisible_mass).bind(OWNPV, FORWARDARGS), 'OWNPVCORRM', + "Corrected mass of the composite using the :py:func:`~OWNPV`") def OWNPVCORRMERR(invisible_mass: float = 0.0): @@ -3742,11 +3735,9 @@ IS_TIS._F = Functor( Functor's call operator expects a "LHCb::detail::TisTosResult_t" object (defined in "ITisTos.h" file).""" ) - -def PERR2(): - """Returns the uncertainty on the momentum of a particle""" - jacobian = THREEMOMENTUM / P - return similarity(jacobian, THREE_MOM_COV_MATRIX) +PERR2 = setComposedFunctor( + similarity(THREEMOMENTUM / P, THREE_MOM_COV_MATRIX), 'PERR2', + """Returns the square of the uncertainty on the momentum of a particle""") def NHITSINMUON(dh: DataHandle, station, region):