Add ThOr functor adapter that delegates to a LoKi functor
For physics validation of new selection algorithms, cut variables etc. it would be useful to add a ThOr functor that delegates to a LoKi expression. For example, so you can configure an ntuple-making algorithm (like DumpContainer
) to fill both "old" and "new" branches:
from Functors import (LOKI, PT)
# ...
my_algorithm.Branches = {
'PT': PT,
'PT_LoKi': LOKI('PT'),
}
and then compare particle-by-particle differences. This example is the "maximal" version, handling a generic LoKi functor expression. A simpler version might just support using an old-style "distance calculator" to compare the calculations of quantities like IPCHI2 and FDCHI2.
ThOr and LoKi can still be compared without this tool, but in that case the comparisons would be of distributions, not particle-by-particle differences.