Update lepton truth decoration
requested to merge svanstro/training-dataset-dumper:svanstro/update-lepton-truth-decoration into r22
Adding some improvements on top !300 (merged), which also closes #70 (closed).
- Rename
MuonTruthDecorator
->LeptonTruthDecorator
since we are also decorating information about electrons. - Remove
softMuon_
from variable names which are not using soft muon information. - Move reco and truth lepton decoration calculations outside of the
if (softMuon_link.isValid()) {
block so they are given sensible values even in the absence of a soft muon. - Decorate variables to the jet, rather than the btagging object for consistency, and to make these vars writeable.
- Ensure that dR selection is a applied to the calculation of
n_prompt_leptons
andn_non_prompt_leptons
(before these were counted event-wide). I also now apply the selection todr_prompt_truth_leptons
anddr_non_prompt_truth_leptons
, but we can remove that if necessary. - Remove
_in_max_dr
in variable names for consistency and since the dR selection is heavily implicit. - Some some
if
statements that weren't doing anything and move variable declarations closer to where they are used. - [Controversial?] Replace the hardcoded
dR<0.4
selection with the configuredminimum_lepton_dr
cut which is also used for the ttbar OR, which is usually set to0.3
in the current configs. - Add
nPromptLeptons
toEMPFlow.json
giving us a nice way to distinguish electrons as shown in #70 (closed).
Tagging @frenner and @dguest who can let me know if I have been overzealous with the changes.
Edited by Samuel Van Stroud