RoiDescriptor: convert RoiUtil to member functions
Move the RoiUtil::contains
(and all other helper functions) into
the RoiDescriptor
class. This allows the compiler to inline the
various (virtual) functions calls.
This leads to a speedup of ~3% in TrigFastTrackFinder_jet
(ATR-27858).
Other changes:
- Use
std::any_of
instead of hand-written loop for composite Roi. - Use recursion in
contains
andcontains_zrange
instead of lambda (not really needed functionality-wise but makes it consistent with all other methods). - Replace
RoiUtil::range_error
exception withstd::range_error
. - Add
final
keyword to all overrides. Inlining seems to work even without that but the bulk ofRoiDescriptor
is really "final" as the only descendant (TrigRoiDescriptor
) only overwrites L1-related methods.
cc @sutt