FunctorCache: increase hit rate by not making cut values part of the Functor
Right now cut values or location strings are part of the Functor which drastically reduces the hit rate of a functor cache.
Simple example, let's look at the cpp code of PT>5
:
operator>( ::Functors::Track::TransverseMomentum{}, std::integral_constant<int, 5>{}
the cut value is directly compiled into the functor, so if this functor is in the cache, and we change the python config to use e.g. PT>4
then we end up with a cache miss which will have to compile a new functor:
operator>( ::Functors::Track::TransverseMomentum{}, std::integral_constant<int, 4>{}
Same thing holds for the string locations to TES data.
If we could hoist the constants outside the actual functor and simply have one layer of indirection, it would be much easier to create a cache that would almost always work. This isn't a huge priority for the trigger, but could improve the general ease of use of interactive work and when analysts develop new lines.