Skip to content

add some nullptr/invalid element link safety checks

Hi all

Flow Element association to Muons currently involves some exceptional cases (relatively rare, thankfully) that need to be patched:

  1. Case where muon doesn't have a track - checked by nullptr before index retrieval now (skip if not retrieved)
  2. Case where an invalid element link is thrown (i.e Muon doesn't have a cluster). Now fixed with an ElementLink.isValid() check.
  3. Other checks on pointer retrieves that may be defined as null just for an over-abundance of caution

Only affects PFMuonFlowElementAssoc.cxx

Thanks

Matt

cc @mhodgkin

Merge request reports