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_ofinstead of hand-written loop for composite Roi. - Use recursion in
containsandcontains_zrangeinstead of lambda (not really needed functionality-wise but makes it consistent with all other methods). - Replace
RoiUtil::range_errorexception withstd::range_error. - Add
finalkeyword to all overrides. Inlining seems to work even without that but the bulk ofRoiDescriptoris really "final" as the only descendant (TrigRoiDescriptor) only overwrites L1-related methods.
cc @sutt