Skip to content

MuonGeoModel: Don't clear MDT cache on StoreCleared.

MuonDetectorTool was setting up an incident handler to clear the MDT caches on a StoreCleared incident.

The intention seems to have been to clear the caches at the end of an event. However, no selection was made on which store was being cleared --- so, for pileup jobs in particular, we were getting excessive calls to the cache clear, which showed up as a performance issue.

But it's not obvious why we need to clear the caches after every event in any case. My guess is that this was to limit use of memory, assuming that the MDT occupancy is low.

But this is not MT-safe, and opens the possibility for reference-after-free errors. Further, the caches are already being cleared separately when alignments change. So for now, just remove the incident code from MuonDetectorTool.

The memory usage should be checked after this change (may appear like a leak, since the caches are populated lazily). If this is in fact an issue, we'll need to come up with some other way of handling this --- but the present code can't be safely used for MT.

See ATLASSIM-4493.

Merge request reports

Loading