Skip to content

Fixing muon coordinate transmission and conversion between MUCTPI and L1Topo

This MR addresses remaining mismatches seen between firmware and simulation results for topological muon triggers on L1Topo.

  • Some mismatches between firmware and simulation results were traced to subtle details in how the simulation converted floats (provided by MuCTPI decoders) to integers used for the (bitwise) L1Topo simulation. The fix entails two aspects:
    • Perform conversion of (-pi,pi) -> (0,2pi) on the floating point side (creating parity between simulation and firmware used at the end of 2022 at P1)
    • Introduce a "stretching factor" of 3.2/pi (besides the usual L1Topo phi granularity of approx. 1/20 = 0.05) to uniformly cover the integer range of 0-127 used in L1Topo (sim and hw). For a private validation of the changes in this MR this factor was omitted as it is also missing in the L1Topo firmware used so far (but will be included in an upcoming version).
  • Previously eta/phi coordinates filled by MuCTPI classes used unique coordinates for each ROI whereas for hardware some mild averaging of sets of (float) eta/phi values is used in order to have more regular patterns which allow for more efficient encoding (see, e.g., https://indico.cern.ch/event/864390/contributions/3642129/attachments/1945776/3234220/ctp_topo_encoding.pdf). However, when converting these float values to integer values L1Topo (fw and sim) even these slight differences can lead to different rounding results which eventually show up as mismatches in firmware vs simulated trigger decisions. The L1TopoLUT class from MUCTPI is rewritten to now provide values consistent with those used to build the firmwares involved and its user (MuonROIByteStreamTool) now retrieves coordinates from it in a more consistent fashion across muon subdetectors/regions.

A (private) validation of these changes was performed (temporarily omitting the "stretching factor" to allow accurate comparison to hardware/firmware results in recorded data). In about 70k events processed from RAW using L1TopoSimulationConfig ( python -m L1TopoSimulation.L1TopoSimulationConfig ....) not a single remaining firmware/sim mismatch for topological algorithms with only muon inputs could be found!

Tagging @czodrows for MUCTPI, @tamartin and @sshaw for info/trigger

Merge request reports