Skip to content

MuonReconstruction - Refactor the treatment of writing segments to disk

Johannes Junggeburth requested to merge jojungge/athena:MergeMuonSegColl into master

Hello everybody,

this MR cleans up the usage of the MuonSegments in the reconstruction:

  • Thus far, the Trk::Segments from the Moore chain were converted to xAOD::MuonSegment. The reconstruction algorithm downstream retrieving these segments link back to the Trk::Segment again which makes this conversion quite pointless, as we have to consider that this container won't be dumped to disk as the segments have to be merged later with the ones from the MuGirl chain. The algorithms relying on the xaodMuonSegments are switched to retrieve the Trk::Segment container (closes ATLASRECTS-6445) directly.
  • Until now, the final MuonSegmentContainer was created by the MuonCreatorAlg, which copied by default the Moore segment container and then added to it the MuGirl segments here and there. However, there is more than one MuonCreatorAlg chain active, such that we duplicate these segments written to disk, in principle, if they were scheduled for write-out. The MuonSegMergerAlg is introduced to take over the job. Segments from all muon authors and chains are copied to a common segment container, which will become later the MuonSegmentContainer. These are referred to as persistent segments. To avoid that we have to recreate all MuonCandidates & TagBase maps, the MuonTagToSegMap auxiliary class is added providing a link between the transient and persistent version of associated muon segments. It should be noted that the MuonSegmentContainer now only contains segments that are somehow used in the reconstruction chain. There might be duplicates originating from the MuGirl <-> MuTagIMO or MuGril <-> STACO ambiguities, which are not considered by the algorithm.
  • To not cut the possibilities of analyses exploiting segments that did not grow to a full muon candidate, all remaining segments are dumped into the UnAssocMuonSegments container. Ambiguities between different segment candidates are optionally resolved.
  • For one reason or another, the segment container from the Low-beta reconstruction chain has not been written to the AOD thus far. This container is now added

A quick comparison of the q442 outputs:

 165.396 kb       15.371 kb        0.031 kb       10.760      500  StauSegments (DataVector<xAOD::MuonSegment_v1>) [Muon]
 317.167 kb      103.154 kb        0.206 kb        3.075      500  MuonSegments (DataVector<xAOD::MuonSegment_v1>) [Muon]
2264.361 kb      927.048 kb        1.854 kb        2.443      500  UnAssocMuonSegments (DataVector<xAOD::MuonSegment_v1>) [*Unknown*]

vs. current master

2904.281 kb     1153.210 kb        2.306 kb        2.518      500  MuonSegments (DataVector<xAOD::MuonSegment_v1>) [Muon]

Note to the L1 shifter: The last commit is the unleash of the clang-formater, a.k.a the kraken.

Edited by Johannes Junggeburth

Merge request reports