Skip to content

Changes supporting the new ThOr::Combiner<T>

Niklas Stefan Nolte requested to merge olupton_nn_combiners into master

This MR works together with

Important things that should not be ignored:

  • LHCb::Pr::Fitted::Forward::Tracks only stores the x-x, x-tx, tx-tx, y-y, y-ty and ty-ty elements of a covariance matrix -- the q/p-q/p diagonal element and many off-diagonal elements are not stored.
    • When looping over this container, the proxy class has to return a full matrix. For the off-diagonal elements that were not stored, it returns zero. But the q/p error was a fudged value (this is not really specific to the proxies, the same thing was done in converters) -- a fixed relative error.
    • The change in this MR is just to change the fudge factor to better reflect the real distribution.
    • This is important because in "HLT2" the selections are based on a zip that includes LHCb::Pr::Fitted::Forward::Tracks, and the q/p error that is assumed makes a significant difference some selection variables derived from composite particles. For example, the IPCHI2 (and therefore PV association) of composites was significantly affected.
    • Making the fudged value "more realistic" makes the effect smaller, but fundamentally does not address the issue.
    • The real fix is to add a fitted track container that can store relevant information, as discussed here last week.
    • See #97 (closed) (where the above points are duplicated)

Summary of additions:

  • Expose zipIdentifier() via generated proxy types and make some other minor fixes in Pr::Zip.
  • Add auto const* container_ptr() member function for zip proxies, giving access to the underlying container pointer
  • Add auto clone<Ts...>() member function for zip proxies, which allows converting a "wider" zip proxy (e.g. zip of A/B/C) into a "narrower" one (e.g. zip of A/C)
  • Add PID field and extend tests of v2::Composites
  • Define LHCb::v2::Particles as a variant of v2::Composites and v2::ChargedBasics.
  • Add static_asserts to MatVec's plate_at.
  • Add explicit mask_v( bool ) constructors to SIMDWrapper mask types.

Moves:

  • Move the Sel::Utils::*variant* helpers to be LHCb::*variant*
    • These are thin wrappers around std::variant and/or boost::variant2::variant that select something cling can digest
  • Move Sel::Utils::as_arithmetic to LHCb::Utils::as_arithmetic as it is useful outside of selection code.

Bugfixes:

  • Drop implicit conversions of SIMDWrapper::mask_v to and instead add a native() accessor for that. Avoids some mask_v types being implicitly convertible to bool and closes #96 (closed)
  • Make MatVec operator== return the same type as the element type operator==
  • Pr::Zip now resolves the proxy SIMD InstructionSet earlier, so Best does not occur in any return types.
    • This fixes crashes in some application configurations with vectorised functor and a mix of cache/cling compilation

Removed/deprecated features:

  • Drop the unwrap feature of LHCb::Pr::Zip (quite a large diff, but mostly quite mundane). In compiled algorithms, this can be replaced with use of LHCb::Utils::as_arithmetic(). For functor/dumping use-cases, this can be replaced with the POD functor.
Edited by Rosen Matev

Merge request reports