Skip to content

21.2 Truth navigation improvements

This MR makes two changes. First, adding warnings that are quite useful to Truth helpers. It turns out some people were doing unexpected things with helper functions, and because we didn't have enough warnings there was no way for them to know that they weren't getting the expected output. This is a first pass at adding some useful warnings. Second is to add a possible prefix for collections or functions that might get used more than once. There are only two such functions at the moment (I can't really imagine the others being used multiple times intentionally, but let's see).

This allows code like:

# Import some basic helpers
from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents,addTruthCollectionNavigationDecorations,addTopQuarkAndDownstreamParticles
# Add the standard truth -- including basic navigation
addStandardTruthContents()
# Add top quarks with decays collection
addTopQuarkAndDownstreamParticles()
# Add navigation to the top quarks collection; previously would have silently failed
addTruthCollectionNavigationDecorations(TruthCollections=["TruthTopQuarkWithDecayParticles","TruthBosonsWithDecayParticles"],prefix='Top')

Should solve a problem that @cdelitzs was having with the JETM6 derivation.

Merge request reports