Add delta mass functor
To be tested with LHCb!4012 (merged) and DaVinci!867 (merged)
This is for solving Moore#289
Decomposition of IS_ID
and IS_ABS_ID
using the more basic one PARTICLE_PROPERTY
. This latter is used in composition to make PDG_MASS
., SIGNED_DELTA_MASS
and ABS_DELTA_MASS
functors.
Performance test (2022/10/12)
Tested by inserting some additional selections at detached Jpsi line: https://gitlab.cern.ch/lhcb/Moore/-/blob/master/Hlt/Hlt2Conf/python/Hlt2Conf/lines/charmonium_to_dimuon.py#L107
option 1:
F.MASS < 3106.9 * MeV, F.MASS > 3086.9 * MeV
option 2:
F.DELTA_MASS("J/psi(1S)") < 10 * MeV
Then 1000 Lb2JpsiLambda events are used to test the efficiency. Both options result in 220 selected events.
Impact on existing functions (2022/10/12)
This MR may also influence the existing functions IS_ID
, IS_ABS_ID
. To ensure they still work properly, a test is performed using the detached Jpsi line: https://gitlab.cern.ch/lhcb/Moore/-/blob/master/Hlt/Hlt2Conf/python/Hlt2Conf/lines/charmonium_to_dimuon.py#L224
If requiring F.IS_ID("J/psi(1S)"), F.IS_ABS_ID("J/psi(1S)")
, the efficiency keeps unchanged; if requiring F.IS_ID("pi+"), F.IS_ABS_ID("pi+")
, the efficiency goes to zero.
Exclude the new function from TestFunctors.cpp
It seems that TestFunctors.cpp does not support functions using
ServiceHandle<LHCb::IParticlePropertySvc> pp_svc{top_level.algorithm(), top_level.generate_property_name(),
"LHCb::ParticlePropertySvc"};
They would trigger an error message of
unknown location(0): fatal error: in "test_particle_functors": GaudiException: generate_property_name called with a nullptr algorithm
../Phys/FunctorCore/tests/src/TestFunctors.cpp(1534): last checkpoint: "test_particle_functors" test entry
This seems to be a known issue, and can also be triggered by IS_ID("pi+)
, as documented here: https://gitlab.cern.ch/lhcb/Rec/-/blob/master/Phys/FunctorCore/tests/src/TestFunctors.cpp#L1541
So the new function are excluded from the checklist of TestFunctors.cpp
A local run of ./run build.x86_64_v2-centos7-gcc11-opt/Phys/FunctorCore/TestFunctors
end up with no error message about existing functions.