Wrapping barcode usage in PileUpTools
In standard production, all pile-up truth links point to GenParticle
instances with a specific barcode value (std::numeric_limits<int32_t>::max()
).
As part of the migration away from barcode usage we initially wrap checks against this value in a helper function: HepMC::is_truth_suppressed_pileup(...)
.
Sim hits with truth links which have barcode=0
indicate that the hit was caused by a particle which was considered too low energy to be saved to the GenEvent
truth. Currently the helper function for this is HepMC::no_truth_link(...)
, but another name may be clearer.
The combined check is wrapped by HepMC::ignoreTruthLink(...)
.
In PileUpToolBase
the variable m_vetoThisBarcode
variable which would have previously held the exact value of barcodes to be vetoed, is replaced by a boolean variable m_vetoPileUpTruthLinks
which indicates whether links to truth-suppressed pile-up should be vetoed (default true
).