Skip to content

Clean up LeptonTruthDecorator

The LeptonTruthDecorator seemed to be having a hard time deciding what it was doing: it took 4 arguments and did something small and slightly different with each of them. A few of these arguments (track particles, truth particles) were otherwise unused in processSingleBTagEvent, so by removing them we could limit the scope of these variables.

The track particles were only used to count the closest reconstructed muons, and record the minimum deltaR. This should be done by the BTagMuonAugmenter, but also these decorations were not written out, so I removed track particles as an input and removed the decorations.

It also had a few hard-coded options for e.g. particle association. I tried to reduce its scope a bit and align it better with the rest of the truth handling by telling it to read the particle association we already store on the jet.

This could still be improved slightly:

  • We should make the decoration prefixes configurable and decrease the number of hard coded counting criteria. That way we could do all the particle filtering at the truth particle association step.
  • The part of the code that copies truth info from the muon should be split from the part that adds decorations counting leptons.

But maybe we should do that later.

Edited by Dan Guest

Merge request reports