Improve systematics handling in AsgxAODNTupleMakerAlg
This is a manual sweep of !47380 (merged) to master.
This is an alternative implementation to !47105 (closed). I opened a new MR as this is basically another approach to the same solution. As systematics are now handled by the SystematicsSvc
we need to properly handle that also in the output algorithms. Besides just updating the AsgxAODNTupleMakerAlg
to use SystematicsSvc
directly I also implemented some improvements to the flexibility of the algorithm.
The algorithm itself is quite smart and can parse container and variable names automatically. The problem are systematics. Now a branch will only be written for a given systematic if it is affected by it (either at the container or decoration level).
In my tests this yields all the branches as before without relying on how the decoration names are built.
The only caveat with this change is is that the same container/variable name needs to be used as defined in the algorithm or sequence, e.g. if one outputs AnalysisMuons_%SYS%
with the decoration effSF_%SYS%
, then AnalysisMuons_%SYS%.effSF_%SYS% -> mu_effSF_%SYS%
works but AnalysisMuons_NOSYS.effSF_%SYS% -> mu_effSF_%SYS%
does not as SystematicsSvc
is only aware of AnalysisMuons_%SYS%
.