Skip to content

Cleanup truth particle association

Dan Guest requested to merge dguest/training-dataset-dumper:cleanup-truth into r22

In a recent merge request that added truth lepton decorations (!318 (merged)), we had some discussion on what aspects to make configurable. I'd like to avoid having too many different configuration options for truth particle association, so I'm going to try to build on the existing truth structures we have now.

This will (hopefully) make the truth association a bit more flexible:

  • Add the truth particle selection from the lepton decorator added above to the list of options that JetTruthDecorator supports
  • Rename JetTruthDecorator to JetTruthAssociator, since it's really just associating truth particles.
    • Also make the associator store a vector of IParticle links, for consistency with the rest of the EDM
  • Make an optional sub-field in the truth configuration that specifies selection: if this is empty we expect to read the truth particle links from the EDM
    • Make sure unused arguments in the truth structure throw an exception
  • Merge the LeptonTruthDecorator, and the JetLeptonDecayLabelDecorator to use these associations, and (optionally) run on each linked truth particle collection, with a decorate option in each truth configuration
  • Tell TruthWriter not to run if n_to_save is 0
    • Implemented as an optional structure for all output options
    • Make TruthWriter build from the config structure
  • (maybe) make the lepton overlap removal depend on one of these collections, e.g. by removing jets where the number of elements in one associated collections is > 0
Edited by Dan Guest

Merge request reports