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:
- Case where muon doesn't have a track - checked by nullptr before index retrieval now (skip if not retrieved)
- Case where an invalid element link is thrown (i.e Muon doesn't have a cluster). Now fixed with an
ElementLink.isValid()
check. - 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