The MUonE DAQ: online track-finding and event selection in hardware at 40 MHz

High-intensity particle beams provide a significant challenge to DAQ systems, especially in complex architectures reading out many sensors. The MUonE experiment has been conducting beam tests using the M2 muon beam at CERN, with in-spill intensity of 5 × 107 muons/s, using tracking modules equipped with silicon strip sensors and a module readout bandwidth of 5 Gb/s. A pilot run has been performed in late summer 2023, incorporating several such modules arranged in three tracking stations and a prototype of an electromagnetic calorimeter connected to a triggerless readout system. Limits on processing and data storage will necessitate online event selection to be implemented in hardware, on state-of-the-art AMD-Xilinx UltraScale+ FPGAs. The status and plans of the MUonE DAQ operation will be presented, outlining a general purpose platform for online event selection, from simple occupancy cuts, to track reconstruction, vertexing, and particle identification.


MUonE experiment
The muon magnetic anomaly, defined as   = (  − 2)/2, where   is the muon gyromagnetic ratio, represents one of the most interesting observables of the Standard Model: a persistent discrepancy between experimental results and theoretical predictions has been observed for over two decades.The latest result from Muon g-2 collaboration [1] gathered new attention on the topic, showing results in agreement with previous experiments and with 5 discrepancy to theoretical predictions.Comparison with predictions, though, is limited by the knowledge of the hadronic leading order contribution ( HLO   ) to the muon g-2, which cannot be computed perturbatively given the inclusion of low energy QCD contributions.The traditional approach has been to compute  HLO  by means of a dispersion integral on the annihilation cross section of  +  − → ℎ, but a recent evaluation based on QCD lattice techniques [2] reached for the first time a comparable accuracy with respect to the dispersive approach, showing a 2.1 tension with the dispersive method.MUonE collaboration proposes to determine  HLO  with a novel approach [3,4] based on direct measurement of the hadronic contributions to the electromagnetic constant (Δ had ) in the space-like region. HLO  will be calculated as: with  representing the fine structure constant and   the muon mass.Δ had will be extracted from a very precise measurement of the differential cross section of  +  − →  +  − elastic scattering, obtained via a high energy muon beam off the atomic electrons of a thin beryllium or carbon target.The plan is to run the experiment at the CERN M2 beamline, which can provide 160 GeV muons with an average rate on spill up to 50 MHz.The accessible beam would be enough to provide the total value of  HLO  , by a suitable parametrization, reaching a statistical uncertainty of ∼ 0.3% in three years of data taking [5], which makes MUonE competitive with the latest evaluation.An alternative method to compute the total value of  HLO  , less dependent on the adopted parametrization, has been recently proposed [6], but it will not be addressed in this paper.
-1 - The proposed experiment consists of 40 identical tracking stations, one of which is depicted in figure 1.Each station features a 1.5 cm thick Beryllium target, followed by the tracking system of lever arm ≈ 1 m, composed of 6 CMS Phase-2 2S modules [7], each one of which consists of two layers of silicon strip detector roughly 5 × 5 cm 2 wide read out by the same electronics, arranged in 3 planes, the central modules in a station being rotated of 45 degrees thus allowing for track disambiguation, and define the so-called "UV" plane.The modules, made of two parallel strip sensors read out by the same electronics, enable a 40 MHz readout of the so-called stub stream, intended for L1 track reconstruction foreseen for the CMS Phase-2 tracker upgrade.The fast readout of the modules is needed to reach an integrated luminosity of 1.5 × 10 7 nb −1 in 3 years of data taking at M2 beamline.

Data acquisition hardware and firmware
Data ingestion is handled by the Serenity card [8], a prototype ATCA-class processing card developed for CMS Phase-2 upgrade.It's a generic FPGA board, composed of up to 2 AMD-Xilinx Ultrascale+ FPGAs and 144 optical transceivers for I/O.It also includes a System on Module (SoM) for management (Intel i5-based CoM-Express) capable of running a standard GNU/Linux operating system, enabling the development of efficient online software directly on the cards, circumventing the complexities associated with custom embedded system development.Once collected from the Serenity, data are transferred onward via 10 Gbps ethernet links to commercial PCs, as shown in figure 2, which consolidate the data before transfer to EOS for long-term storage and analysis.No local buffering is foreseen, and data are sent through a direct link to EOS from the experimental hall at 2 x 100 Gbps.

Processing firmware
The firmware makes use of the EMP framework, which is a toolset of abstract infrastructures away from the algorithm, connecting input/output ports to the clocking infrastructure, control bus, and input/output buffers.A complete picture of the firmware block can be observed in figure 3.Each optical link streams data directly from a module to the link interface, the only firmware block in common with the CMS Phase-2 tracker upgrade, which takes care of extracting stub information and handling fast commands.
-2 -  The subsequent block, the link aggregator, a schematic of which is visible in figure 4, custom for the MUonE experiment, aggregates stubs across all links based on clock cycle using two-layer FIFOs to buffer data.The stubs, now aggregated into single clock cycles, must be recombined into a single stream for transmission on an ethernet link: this function is provided by the link combiner block, shown in figure 5.Each clock cycle is sent sequentially and the output is buffered to account for fluctuations in the ethernet link rate.Also, a header with metadata is added into the stream before the stubs.

Strategy for hardware track finding
An online track selection will be necessary to reduce the rate, given the previewed 40 MHz triggerless readout.Even though it has still not been possible to implement it or test it up to now, an overview of -3 - a possible three-stage process foreseen for the final experiment will be described here.The description refers to a right-handed coordinate system, with the Z-axis parallel to the beam and aligned in the direction of incoming particles, and the Y-axis oriented upwards.
1. Candidate selection: X and Y axes can be considered independently for the initial selection.A track can be formed of three hits: one at the start of the station, one at the end, and one in the middle, all obtained by the combination of the two planes.A candidate set of hits can be created by propagating the straight line from outer planes to the middle sensors and then searching for compatible hits: the acceptance window can be tuned to maximize efficiency at a given occupancy.This process, shown in figure 6, should provide a 10% reduction rate and deals with the impossibility of fitting all the hits combinations, which increase exponentially.

2.
Track fitting: a possibility to implement the track fitting is via a least square fit implemented with HLS [9], a tool for translation of C++ code into VHDL.This would enable extrapolation of track parameters and associated errors on 2D tracks: 2D tracks sharing middle plane hits will be merged in a 3D track.
3. Selection: once the tracking has been performed, different possibilities are available for online event selection.The most straightforward option would be the use of a vertex constraint, combining different tracks: this should offer ≈ 6× reduction in data rate.

2023 Test Run
Following the Letter of Intent submitted from the MUonE collaboration to the CERN SPS Committee in 2019 [5], a three week test run has been performed at the M2 beamline from August 21 st to September 10 th 2023.The detector in this configuration was composed of two fully equipped MUonE stations: the first one, without a target, was used to detect the incoming muons, while the second, with a target installed, meant to fully reconstruct tracks and vertexes.The mechanical structure, where -5 -  the 2S modules are mounted, is equipped with cooling pipes connected to a chiller, fluxing water at 18 ± 0.5 • C, which is meant to keep the structure at a constant temperature to avoid sensor displacement due to thermal effects.Also, dry air was fluxed in the stations in order to keep the relative humidity below 3%.Both stations were enclosed in a ventilated tent to maximize environmental stability.In figure 7 a picture of the two instrumented stations is shown while on figure 8 there is a schematics of the arrangement of the 12 2S modules used.Two targets were available for this test run, both made of carbon graphite but with different thicknesses, 2 cm and 3 cm.The setup was completed by an electromagnetic calorimeter, placed downstream of the two stations.The stations were instrumented with temperature and humidity sensors, to monitor the environmental conditions at which the modules operated.Data have been acquired with different muon beam intensities up to 40 MHz muon rate inside the tracking station, with and without the target installed.Experimental operations initially started with a low beam intensity, without the target, to commission the configuration of the 2S modules.Then the beam intensity was increased to the maximum available still without the target to check the stability of the DAQ system and for alignment studies.Finally, the 3 cm target was inserted and data was acquired with the maximum beam intensity to demonstrate the reconstruction of elastic scattering events.A preliminary analysis has been performed to validate the DAQ chain and obtain some first feedback on data quality, while deeper and more accurate studies are still ongoing.A simple alignment was performed starting from the cleanest possible preselection (one hit per module per clock cycle on both -6 -stations) when the transversal shifts and rotations with respect to the nominal position around the z-axis have been determined by using an iterative approach where tracks are defined through a  2 fit.Given the alignment parameters, a search for scattering events in the second station has been performed as follows: 1. Events have been selected to have one hit in each module in the first station and 2 hits in each module in the second station; 2. Tracks in the second station have been disambiguated via hits in the UV plane, and tagged as good if the  2 / < 5; 3. A loose vertex selection has been defined from the point of closest approach between two reconstructed good tracks in the second station, required to be in a 20 cm window centered with the target's nominal position.This cut is quite loose in order to retain most of the events and considering the preliminary nature of this analysis; 4. A matching between the two scattering tracks in the second station and the incoming track in the first one is performed, defining the two scattering angles as the ones between the directions of the incoming and the two outgoing tracks.
The two outgoing tracks are addressed as  1, the one with the largest angle, usually the electron, and  2, the one with the lowest one, usually the muon.The preliminary reconstructed angles, visible in figure 9, clearly show the shape of elastic scattering events, while the small fraction of events with uncorrelated angles are due to radiative events and background from production of e+e-pairs, where one of the two leptons is not reconstructed.No particle identification has been done yet.While for angles larger than 5 mrad one can associate tracks to scattered electrons, for angles lower than 5 mrad a simple association to the muon and electron becomes ambiguous.In this region the use of the calorimeter will be studied.These preliminary results demonstrate the full functionality of the experimental chain.The data analysis is ongoing, with the aim of measuring the leptonic contribution to the vacuum polarisation, as a validation of the method.-7 -

Conclusions
The MUonE experiment, aimed at determining the leading hadronic contribution to the muon magnetic anomaly, conducted a successful test run in 2023 at CERN's M2 beamline.This test run included two instrumented tracking stations with 2S modules and an electromagnetic calorimeter, providing valuable data for the final experiment's design.The data acquisition hardware and firmware, utilizing Serenity cards with AMD-Xilinx UltraScale+ FPGAs, successfully handled the high-intensity muon beam and transmitted data to storage efficiently.The processing firmware implemented various stages, and preliminary ideas about track finding and event selection have been discussed.The preliminary analysis of the 2023 test run demonstrated the functionality of the DAQ system.Elastic scattering event reconstruction has been performed, providing insights into the data quality and the full analysis of the recorded data is ongoing.In conclusion, the MUonE experiment is making significant progress towards its goal of measuring the hadronic contributions to the muon magnetic anomaly, and the 2023 test run was a crucial step in validating the data acquisition and analysis procedures.In 2025, the preliminary measurement of  HLO  will commence through the integration of extra tracking stations.The full assembly of the detector is slated for the Long Shutdown 3 period, spanning from 2026 to 2028.Following this, extensive statistical data gathering is planned in the subsequent years.

Figure 2 .
Figure 2. Schematic of the data flow from the modules to the sink pc.

Figure 3 .
Figure 3. Schematic of the processing firmware implemented on the Serenity board.

Figure 4 .
Figure 4. Schematic of the link aggregator firmware block implemented on the Serenity board.

Figure 5 .
Figure 5. Schematic of the link combiner firmware block implemented on the Serenity board.

Figure 6 .
Figure 6.Scheme of the candidate selection for track fitting.

Figure 7 .
Figure 7. Picture of the 2023 test beam setup.

Figure 8 .
Figure 8. Schematic drawing of the 2023 test beam 2S module setup.

Figure 9 .
Figure 9. Preliminary analysis for the angle reconstructed between the scattered muon and electron on partial statistics for 2023 Test Run.