Skip to content

Streamline FunctionalFlavourTagging algorithm implementations

Gerhard Raven requested to merge streamline-FunctionalFlavourTagging into master
  • amalgamate component header files into their source files
  • drop unnecessary header includes
  • drop commented out and duplicated code
  • pick up algorithm interface from LHCb::Algorithm instead of Gaudi::Functional
  • prefer Particle::Range over Particles
  • make constants static constexpr
  • declare CloneStatus as a 'strong' enum
  • prefer multiplication over division
  • replace if (value) return true ; else return false by return value;
  • move cloneCategory from TaggingHelperTool to TaggingHelper as it does not access any members of TaggingHelperTool
  • move bestPVUnbiased from TaggingHelper to FunctionalSSPionTagger as it is the only place where it is used
  • prefer std::accumulate over raw for loops
  • optimize computation of dPhi (avoid multiple trigonometric functions and some divisions)
  • avoid use of essentiallyEqual in comparison used for sorting as it can give unexpected (and wrong) results (see https://godbolt.org/z/sv8oWEvYe for a demonstration) -- given that it violates one of the axioms sort relies on, this is formally 'undefined behaviour' and could even result in sort ending up going out-of-bounds and crashing (very unlikely in practice though)
Edited by Gerhard Raven

Merge request reports