Skip to content

Remove thread unsafe, incident-dependent variable in MCReconstructible

Ross John Hunter requested to merge rjhunter-make-MCReconstructible-Work into master

FYI @rmatev @sstahl @mvesteri

For the HltEfficiencyChecker tool (prints out/plots some efficiencies for the new HLT, see https://gitlab.cern.ch/lhcb/mooreanalysis/merge_requests/1) I use some tuple tools to write trigger decisions and basic kinematic information to a tuple. Out of the box, MCTupleToolReconstructed seg faults due to some old-school treatment of the m_TkInfo object of MCReconstructible. Before this MR, mc track info (in the m_tkInfo member variable) was populated once per event when you call the mcTkInfo() method here, then at the end of an event, in the olden days, this handle would be called that would reset the track info for the next event. But this incident handling has now gone, and so m_TkInfo just uses info from the first event, which probably contains reference to the first event which doesn't remain valid for subsequent events -> seg fault.

Also this is very thread unsafe.

I also fix a typo I spotted in Event/MCEvent/Event/MCTrackGeomCriteria.h.

TODO:

  • Remove the handle altogether?
  • Switch to non-deprecated MCTrackInfo constructor to remove the deprecation warnings in the builds.

Dependency of https://gitlab.cern.ch/lhcb/mooreanalysis/merge_requests/1, Analysis!576 (merged). Should also be merged with Moore!389 (merged), !2373 (merged), Phys!662 (merged) but could be merged before them all.

Edited by Ross John Hunter

Merge request reports

Loading