Extend projection reuse model
|Reported by:||Andy Buckley||Owned by:||Andy Buckley|
We currently only use the results of a cached projection if its properties exactly (within f.p.) match those of the newly applied version. We can improve on that by reusing any projection whose results contain those of the new projection. For example, all FinalState projections are subsets of the FS with no pT or eta cuts, and those with cuts more restrictive than another can be calculated more efficiently by using its cached results.
Implementing this will probably involve extending the
Projection::compare(...) function to return EQUAL, LESS_THAN, GREATER_THAN, and possibly INCOMPARABLE (although the type-matching should make that unnecessary). Whether it's worth attempting to order analysis application to make those with less restrictive cuts come first is debateable: I suspect it isn't as this would require some fiddly logic and a new preprocessing stage where we compare all the chained projections of different analyses and attempt to score them. Not one for the first implementation, anyway, and if using a large number of analyses on a given event I suspect that the effect kicks in pretty quickly for the various FS projections.