Skip to content

MuonInterSectGeometry - Cache the chambers in conditions data

Johannes Junggeburth requested to merge jojungge/athena:ATLASRECTS-6898 into master

Hi everybody,

I noticed that the MuonInterSectSvc, which is used during the hole search of the Mdt segments, creates a TrkDriftCircleMath::MdtChamberGeometry object at every call. The construction of such an object is not really cheap, as it resolves the detector elements down to the tube elements, i.e. it creates around 100 tube objects internally. The problem is that the hole search is performed at multiple places of the code, in particular, at the hole calculation during the segment finding & at the hole recovery of MS, MSOE, ME & combined track. In other words, the same chamber is created again & again in a short time period. That's is quite a waste of CPU resources, if we consider that the geometry only changes if the alignment is updated.

This MR turns the MuonInterSectSvc into a conditions algorithm that caches all the TrkDriftCircleMath::MdtChamberGeometry objects underneath the MuonIntersectGeoData. This object is updated every time the Mdt conditions or the alignment change. The former change defines the dead elements during the data taking. The MuonIntersectGeoData is retrieved by the clients downstream that no longer need to rely directly on the MuonReadoutGeometry or the Mdt conditions data.

I've profiled the CPU and found a reduction in the footprint of MuonSegmentTagging by 8%. This will improve further in a follow-up MR as the segment maker creates a second set of MdtChamberGeometry objects used for segment finding itself. However, these have a slightly different reference point and such a change requires more physics output checks.

Addresses ATLASRECTS-6898

Edited by Johannes Junggeburth

Merge request reports

Loading