Skip to content

Don't attempt to access the LHCbIDs of neutrals when TOS matching in HltEfficiencyChecker

Ross John Hunter requested to merge rjhunter-TOS-ignore-neutrals into master

FYI @mireboll

As titled. As described by #21 (moved), the TOS algorithm will attempt to access LHCbIDs of any particle, and these don't exist for a neutral -> seg fault. This MR improves that behaviour by removing the seg fault, returning 0 for TOS efficiencies with respect to neutrals (or composites containing a neutral), and otherwise being successful such that you can still access the DEC efficiencies.

How does it work

  1. Throws a warning instead of attempting to access the LHCbIDs e.g.:
MCDecayTreeTuple.MCTupleToolTOSHLT2 WARNING Particle with ID LHCb.ParticleID(22) is neutral, so has no track. Adding empty container of LHCbIDs to this candidate for this track.

and 2) appends an empty vector to the container of LHCbIDs/track.

The algorithm then proceeds, and when it attempts to match the neutral's track, it will hit the empty container, and the algorithm will return false, meaning unmatched. This will mean that TOS efficiencies with respect to neutrals (or composites containing a neutral) will be zero.

Follow ups

The algorithm should later be improved to be able to match neutral objects via e.g. calo clusters.

Merge request reports

Loading