Skip to content

Shallow copy both btagging and jets

Dan Guest requested to merge dguest/training-dataset-dumper:shallowest-copy into r22

From a practical point of view this MR means that you can overwrite a b-tagger or other decoration on the b-tagging object. This means that e.g. running the muon augmentation won't cause a crash if the information was already added upstream.

Previously we'd only shallow copy jets before applying some augmentation to both jets and b-tagging. This was fine to apply calibrations, but would crash if we tried to reapply a decoration to b-tagging. This adds a shallow copy of the b-tagging container as well.

Janky code warning

Note that in the current implementation the full shallow copy only works in AthAnalysis or Athena. In AnalysisBase I can't figure out how to create transient ElementLinks so I'm reverting to the "old" strategy where we only shallow copy the jet container. So I'm settling for a half-feature addition, which is better than none at all, I guess.

Edited by Dan Guest

Merge request reports