Skip to content

Mdt data processing - address treatment of chamber with 2 CSMs properly

Johannes Junggeburth requested to merge jojungge/athena:ATLASSIM-5102_VolII into 22.0

Hi everybody,

this MR fixes the identifier assignment of the MdPrepData in the BIS78 chambers. It's motivated by the strange looking tube number distribution in those chambers: grafik

The plot has several peaks and also voids indicating that there is a kind of mismatching of the fired tubes in the offline software. For comparison, a completely working chamber has entries in all bins


As a preamble, the data from the MDTs are sent by the CSM cards to the DAQ. In the case of the legacy chambers, each chamber has exactly one CSM card. However, the number of tubes in the BIS78 chambers, and in the BME chamber, exceeds the maximum channels available in a single card. Thus, these chambers are read out by 2 CSM cards.

In the offline software, the hashes of the RDOs have to range over the detector element hashes - there are two detector elements per layer - while the ones of the PRDs need to range over the detector modules. A hack to treat the BME chambers was implemented during the run 2 data-taking but it turned out to fail for the BIS78 cases.

To avoid the implementation of another hack for BIS78 harming the maintainability of the software even more, the treatment of 2 CSM chambers in the PRD processing is now implemented properly

  • MuonMDT_CablingMap keeps track of a chamber equipped with 2 CSMs - Information is retrieved from the database. The class now provides methods to create the Identifier & the IdentifierHash of each CSM collection. Hashes can be created either on a detector element basis or on a module basis. To maintain consistency with the trigger ROIs the IdentifierHash -> ROB conversion is based on the

  • MdtRdoToMdtDigit remove BME hack assigning the hash of the second multilayer to the CSM container. Buffer the CSM collection in an intermediate map during the conversion. Non-empty CSMs are dumped into the final container at the very end. Differences in the Run2-MCOverlay-output-changed and Run2-DataOverlay-output-changed partially arise from this modified behavior. Differences in the hash branches arise from a consistent assignment of the hashes. Before it was a mixture of module and detector element hashes cf. here. In the phase II layout, the cabling maps are incomplete for the BIS chambers. Add switch to skip these digits without warnings.

  • MdtRdoToPrepDataTools: Simplify the filling of the prepdata container by introducing the ModfiablePrdColl struct. It takes track of the PrdCollections that were added by this particular decode call and which were already created in perivious AthViews. The correct collection is retrieved shortly before the prepdata object is created which allows a vast simplification of the RDO -> PrepData merging when the module is split into 2 CSMs.

The preservation of the Tier0 policy for the Run 2 was ensured by reprocessing 24k data18 events and 100k single muons. The ESDs were further processed exploiting the MuonTester which dumps the kinematics of all muon tracks plus the full MdtPrepData containers. Binary compatibility in both cases was found. The full access to the tests is given here or


The directory also contains the updated overlay reference files.

Fired tube number in BIS7A06 using 40k particle gun muons in the BIS78 region (red - current 22.0 / black - patch) grafik

Edited by Johannes Junggeburth

Merge request reports