Streamline FunctionalFlavourTagging algorithm implementations
- 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
byreturn value;
- move
cloneCategory
from TaggingHelperTool to TaggingHelper as it does not access any members of TaggingHelperTool - move
bestPVUnbiased
fromTaggingHelper
toFunctionalSSPionTagger
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 axiomssort
relies on, this is formally 'undefined behaviour' and could even result insort
ending up going out-of-bounds and crashing (very unlikely in practice though)
Edited by Gerhard Raven