Muon identification for LHCb Run 3

Muon identification is of paramount importance for the physics programme of LHCb. In the upgrade phase, starting from Run 3 of the LHC, the trigger of the experiment will be solely based on software. The luminosity increase to $2\times10^{33}$ cm$^{-2}$s$^{-1}$ will require an improvement of the muon identification criteria, aiming at performances equal or better than those of Run 2, but in a much more challenging environment. In this paper, two new muon identification algorithms developed in view of the LHCb upgrade are presented, and their performance in terms of signal efficiency versus background reduction is presented.


Introduction
The LHCb experiment [1] at the LHC is a single-arm forward spectrometer specialised in studying particles containing b or c quarks. Thanks to a versatile reconstruction and trigger system, the LHCb physics programme has been extended to electroweak, soft QCD and even heavy-ion physics. Many of the physics channels are identified by their very clean muon signatures, therefore muon identification and trigger are crucial for the success of the experiment.
A brief description of the Run 2 muon detector and reconstruction techniques follows, which sets the basis for the improvements later discussed in view of Run 3. During Run 1 and Run 2, the tracking system of LHCb provided a measurement of the momentum (p) of charged particles with a relative uncertainty that varied from 0.5% at low momentum to 1.0% at 200 GeV/c. The minimum distance of a track to a primary pp collision vertex (PV), the impact parameter (IP), was measured with a resolution of (15 + 29/p T ) µm, where p T is the component of the momentum transverse to the beam, in GeV/c. Muons were identified and triggered by a system composed of five stations, M1-M5, of rectangular shape, placed along the beam axis as shown in Fig. 1. Stations M2 to M5 were placed downstream the calorimeters, and were interleaved with 80 cm-thick iron absorbers to select penetrating muons. The M1 station was placed in front of the calorimeters and used to improve the p T measurement in the trigger. Each muon station is subdivided into four regions, as shown in Fig. 2, with different read-out schemes defining the x, y resolutions. The dimensions of the logical pads were chosen such that their contribution to the p T resolution was approximately equal to the multiple scattering contribution [2]. These logical pads were obtained from the crossing of horizontal and vertical strips (either cathodic pads or group of wires), with the exception of the full M1 station and the innermost regions of stations M4 and M5, where the logical pads corresponded to physical channels on the detector and were readout directly.
A schematic diagram showing the trigger data flow in Run 2 is depicted in Fig. 3. The trigger and reconstruction scheme followed three basic steps: • A hardware trigger (L0), based on selected calorimeter and muon information, to reduce the interaction rate of 20 MHz 1 to 1 MHz, which corresponds to the readout bandwidth of the detector. The L0 muon trigger was based on the coincidence of one hit in each of the five stations, selected in a projective Field Of Interest (FOI) defined in the x − y plane, from which a muon standalone p T reconstruction was performed with ∼ 20% resolution [2]. Candidate tracks above a p T threshold of about 1.5 GeV/c were then used to build single and dimuon topologies.
• A first software stage (HLT1) based on partial reconstruction of tracks from the spectrometer, which allowed to put more strict constraints on the candidate p T  combinations in the event. Events selected by the HLT1 trigger are bu↵ered to disk storage in the online system. This is done for two purposes: events can be processed further during inter-fill periods, and the detector can be calibrated and aligned run-by-run before the HLT2 stage. Once the detector is aligned and calibrated, events are passed to HLT2, where a full event reconstruction is performed. This allows for a wide range of inclusive and exclusive final states to trigger the event and obviates the need for further o✏ine processing. This paper describes the design and performance of the Run 2 LHCb trigger system, including the real-time reconstruction which runs in the HLT. The software framework enabling real-time analysis ("TURBO") has been described in detail elsewhere. The initial proof-of-concept deployed in 2015 [2] allowed o↵line-quality signal candidates selected in the trigger to be written to permanent storage. It also allowed physics analysts to use the o↵line analysis tools when working with these candidates, which was crucial in enabling LHCb to rapidly produce a number of publications proving that real-time analysis was possible without losing precision or introducing additional systematics. Subsequent developments [3] generalized this approach to allow not only the signal candidate but also information about other, related, particles in the event to be saved. These developments also transformed the proof-of-concept implementation into a scalable solution which will now form the basis of LHCb's upgrade computing model [4]. and IP. Concerning muons, a loose and efficient selection was performed, called IsMuon, based on the coincidence of hits in M2 to M5 stations, and combined with the information of the spectrometer. The muon hits were selected in a FOI centered around the track extrapolation position on the muon stations: the number of hits required was two, three or four in the momentum ranges 3 − 6, 6 − 10 and above 10 GeV/c, respectively, as expected from the muon penetration power in the iron absorbers [3].
• A more refined software trigger (HLT2), exploiting the full reconstruction of the detector information to reconstruct more complex signal topologies. Concerning muons, a better discrimination than IsMuon was achieved by using a likelihood variable (MuonDLL), built upon the uncorrelated sum of the spatial residuals of the muon hits with respect to the track extrapolation position in each station [3], defined as: where the index i runs over the N stations containing hits inside the FOI, and the closest coordinates represent the position of the hit which is closest to the track extrapolation point. The hit residuals were normalised to the logical pad size in the x and y directions, pad x and pad y respectively. The D 2 distribution for muons exhibits a narrow peak at 0, while hadrons satisfying the IsMuon criterion have a broader distribution. Using the D 2 spectra of muons as a signal proxy and of protons as a background proxy (pions are instead contaminated by real muons from decays in flight), the MuonDLL likelihood was defined, which measured the difference in probability for a candidate track to match the signal or background hypotheses.
Using the above variable, on top of IsMuon, the misidentification probability for protons was kept at the 2-3 per mille level on the full momentum spectrum, while keeping the muon efficiency above 90%. For pions, similar performances were obtained only for momenta higher than 50 GeV/c, with decays in flight contributing for another few per mille at low momenta [4].
The LHCb detector will be upgraded for Run 3 to sustain a factor of five increase in the instantaneous luminosity, up to 2 × 10 33 cm −2 s −1 . The 1 MHz readout limitation of the current detector will be removed, allowing for the full event rate to be processed in software without the need for a hardware stage [5]. For this reason, a full software trigger has been implemented, which will allow to select signal events with higher efficiency, and with the goal of achieving an order of magnitude increase in the physics bandwidth with respect to Run 2.
In preparation of Run 3, the M1 station has been removed due to the much higher occupancy which will be reached in front of the calorimeter, where the station is located (Fig. 1). In addition, its main contribution, consisting in the improvement of the standalone muon p T determination in the hardware L0 trigger is no longer relevant. When working on the implementation of the future software muon trigger lines, two aspects have to be taken into account: • The need to keep a high efficiency at HLT1, with a smooth dependence on the running conditions and on the phase space, and with a fast execution time. Concerning the bandwidth, a high rejection power must be guaranteed against the combinatorial background, especially important at low momentum. This background mainly originates from pion tracks extrapolated to the muon detector and paired to accidental hits in the muon stations, and is expected to increase almost linearly with the luminosity.
• The possibility to tune highly selective cuts in order to achieve very low misidentification levels at HLT2, especially useful for example in rare decay searches. The full information from the LHCb PID detectors may conveniently be used in this case as the constraints on the execution time are less stringent.
These functionalities can be implemented following different approaches. In this paper we discuss a baseline strategy for the HLT1 which is an evolution of the present scheme. This assumes that tracks in the spectrometer are reconstructed upfront, and that the muon identification is applied in two steps: a first step based on IsMuon as it is now, plus a second step based on a correlated χ 2 variable (Section 2), which represents an improvement of the MuonDLL. At the HLT2 stage, the muon identification performances are further refined by means of a multivariate classifier (Section 3).

Correlated χ 2
The misidentification of charged pions and kaons to muons has an almost irreducible component due to decays in flight, together with a combinatorial component that is relevant especially at p < 10 GeV/c, where the hit coincidence is less stringent. The present muon identification algorithm was optimised for a low occupancy scenario, without prioritising the rejection of the combinatorial background. The higher luminosity of Run 3 will require instead to suppress this background more effectively, especially in the central detector regions where the occupancies are higher. An obvious limitation of the present approach based on D 2 variable is that it does not include the information from the multiple scattering experienced by charged particles while traversing the calorimeter and the iron absorbers, as well as the correlation between the hit positions across the muon system. The importance of taking into account these correlations is evident in Fig. 4, where two very different hit combinations are shown, yet giving a similar MuonDLL value. On the left, a random combination of hits scattered around the track extrapolation is shown, receiving contributions from uncrossed logical pads, indicated by the larger error bars. Such events are more affected by electronic noise and spillover hits. On the right-hand side, a clear pattern of hits is visible, which are displaced with respect to the extrapolated track due to multiple scattering.
These two topologies can be discriminated by using a χ 2 variable, expressed as where δ − → x and δ − → y are the distances, in the x and y directions, between the track extrapolation points and the closest hit positions, with indices running over the stations M2 to M5. The covariance matrices V x and V y both have a diagonal contribution from the detector resolution and an off-diagonal contribution from the multiple scattering (MS). The diagonal terms are of the form where the pad size along x and y corresponding to the muon hit in the given station are used. The off-diagonal terms, accounting for MS, are modelled as where z j,k represent the coordinates of stations M2 to M5 along the beam axis, z i represents the coordinates of the main absorbers, namely the calorimeters and the muon iron filters, as listed in Tab. 1, and σ MS,i represents the MS deviation. This term takes the usual expression [6] σ MS,i = 13.6MeV where p and βc are the momentum and the velocity of the incident particle, respectively, and ∆z i /X 0 is the thickness of the absorber at the given position z i in units of radiation length, also listed in Tab The probability for a muon to penetrate the iron absorbers and reach a given muon station depends on its momentum. In particular, below 6 GeV/c the probability to reach M4 and M5 stations can be substantially smaller than one, so that hits falling in the FOI of the track are in this case often due to accidental background. For this reason, in that momentum interval only the hits on M2 and M3 stations are included in the χ 2 CORR computation.
The performances of the χ 2 CORR variable are evaluated on muons and protons from data control samples collected in 2016. An abundant source of muons is provided by J/ψ → µ + µ − decays: by requiring the reconstructed J/ψ to have a large flight distance significance and good decay vertex quality, most of the combinatorial background from the tracks originating from the primary vertex is removed, and the sample gets enriched by B → J/ψX candidates. To further reduce the background, one of the decay tracks, the tag muon, is required to be positively identified in the muon detector; the other track, the probe muon, is unbiased with respect to particle identification and trigger requirements and it is therefore used to measure the algorithm performances. Protons are selected from Λ → pπ − decays, selected with vertex quality criteria and detachment of the decay vertex from the primary one. In addition, the invariant mass obtained by assigning the π mass to the two daughters is required to be outside the nominal K 0 S mass window. Examples of mass spectra for muon and proton calibration samples are shown in Fig. 5.
For both samples, the residual background contribution is subtracted by using the sPlot method [8]. To perform unbiased studies, the muon and proton samples have been weighted in order to equalize their momentum, transverse momentum, and track multiplicity spectra. In addition, since the main challenge for Run 3 is the fivefold luminosity increase with respect to Run 2, a weighting procedure that adds more emphasis on high multiplicity events is applied to each calibration sample. Since there is not enough data to accurately emulate the upgrade conditions, the samples have been weighted in such a way to reproduce an occupancy spectrum which is in-between the two actual running conditions.  As a result, in Fig. 6 the χ 2 CORR spectrum for muons and protons satisfying the IsMuon requirement is shown, demonstrating a good separation between signal and background. A quantitative comparison between the performance of the χ 2 CORR and MuonDLL variables is shown in Fig. 7, where the proton rejection as a function of the muon efficiency, ROC curve in the following, is displayed for tracks satisfying the IsMuon requirement. The ROCs are shown in different momentum and transverse momentum intervals, which allow to probe the response of the muon identification algorithms in different regions of the detector and in different momentum regimes. The performance of the χ 2 CORR variable is definitely better than the MuonDLL in all regions of the phase space, and especially at low momenta. In particular, at muon efficiency of ∼ 98%, which is a good working point for efficient trigger selections, the gain in background rejection is a factor ∼ 1.4 in the region p > 10 GeV/c, p T < 2 GeV/c, and exceeds a factor of 2 in the rest of the phase space. Momentum range Rejection factor 3 < p < 6 GeV/c 1.8 6 < p < 10 GeV/c 3.2 p > 10 GeV/c 2.2

Performance in HLT1
As discussed in Sec. 1, for the HLT1 in Run 3 it will be crucial to guarantee a high efficiency for muons and a fast execution time of the algorithms. Moreover, a tighter rejection against combinatorial background with respect to the present IsMuon selection will be certainly needed.
Given the good performances of the χ 2 CORR variable in rejecting protons, which constitute pure combinatorial background to the muon detector, we consider as interesting to provide the rejection estimates on trigger unbiased events, which are mostly populated by pions, selected from a Run 2 data sample without any trigger requirement. As a preliminary selection for this benchmark, the events are filtered by requiring at least one track to satisfy IsMuon and the cuts p T > 800 MeV/c and IPχ 2 > 35 2 , which represent the main requirements of the Run 2 HLT1 single muon line. The rejection is therefore computed relatively to the above selection, and thus represents the improvement with respect to the present HLT1, and by removing the L0 trigger. To select high multiplicity events, only those having at least 3 primary vertices (nPVs) are used, whereas average Run 2 events have one primary vertex.
This study is done in three momentum intervals, 3 − 6, 6 − 10 and p > 10 GeV/c, since the number of hits selected by IsMuon is different in each one, as described in Sec. 1. In each interval, a χ 2 CORR cut with ∼ 98% muon efficiency, as evaluated on muon calibration data, is chosen. The results are shown in Tab. 2 and demonstrate the effectiveness of this variable in rejecting about half of the trigger unbiased events, with a very small efficiency loss, on top of the Run 2 HLT1 muon selection. In particular, the highest rejection is achieved for 6 < p < 10 GeV/c, where the fraction of pion decays in flight is lower with respect to 3 < p < 6 GeV/c, and the MS correlations provide sensible discrimination as the momentum is not too high.
Finally, the χ 2 CORR execution time is tested within the HLT1 upgrade sequence. Throughput tests 3 are performed on simulated Run 3 data and show a χ 2 CORR resource usage of about 0.4% out of a total HLT1 throughput rate of ∼ 36 MHz, and in view of a data taking rate of 30 MHz. This result makes the χ 2 CORR well suited for a usage in the upgraded HLT1 trigger of the experiment.

Multivariate algorithm
At the second stage of the trigger, HLT2, and offline, the timing budget allows to use more complex algorithms. Besides the spatial information, each muon hit also carries two different time counters, one for each view, x and y. The number of views (i.e. the fact that the hit is crossed or uncrossed) also provides valuable information, as noise or spillover hits typically have one view only. This information, along with its correlations, can be exploited in a multivariate operator. To this purpose, a recent variant of gradient tree boosting available in the CatBoost library from Yandex [9] has been implemented [10]. It uses oblivious decision trees as weak learners, as explained in the following.
A regular decision tree selects each split independently, while an oblivious decision tree has the same split on each level. The difference is illustrated in Fig. 8. An oblivious decision tree is less expressive but is much faster to evaluate, as it makes possible to unwrap the tree into a table and look up the correct leaf in one operation, instead of the multiple conditional jumps of a regular tree. According to a benchmark study by the CatBoost authors, this provides 30-100 faster prediction compared to the competing state-of-the-art gradient boosting libraries [11]. For the muon identification, five variables for each muon station M2 to M5 are used as input to the CatBoost algorithm:

Decision Tree
• x res : the difference between the closest hit x position and the track extrapolation, normalised to the total uncertainty; • y res : the difference between the closest hit y position and the track extrapolation, normalised to the total uncertainty; • t x : the time of the x view; • dt = t x − t y : the temporal difference between the x and y views; • N views : the number of views.
The uncertainty in the residuals x res and y res contains the pad size and the contribution from the multiple scattering (Eq. 5), summed in quadrature. In addition to the hit information, for each event the track extrapolation x and y coordinates on M2 are used, to allow the algorithm to discriminate between different detector regions. Finally, the aforementioned χ 2 CORR variable of the track is added. This set of up to 23 variables per event has been found to be the smallest one containing the maximum associated information, without introducing excessive correlations. This feature is very important in order to decrease the complexity and hence the computation time of the operator in the trigger.
The classifier is trained using samples from 2016 data, to which the IsMuon requirement is applied. Since the IsMuon algorithm is very fast to execute and already provides rejections of O(1%), evaluating the classifier only for events that pass the IsMuon requirement allows to significantly reduce the computational cost and to focus on reducing the remaining background. The data samples used in the training are: • protons from Λ → pπ − decays.
While protons represent pure combinatorial events, the pion sample is included to boost the training statistics and accounts for another source of classification error due to particles that decay in flight to muons before reaching the muon stations. These samples have been treated as described in Sec. 2, including kinematic reweighting, background subtraction and multiplicity weights.
To deal with negative sWeights, the solution proposed in Ref. [10] is used, which consists of first using a machine learning regression to estimate the expected sWeight in each point of the training variable phase space and, second, using the expected sWeight as event weight during classification.
Finally, since the classifier is trained on the same 2016 calibration data which are used to evaluate its performance, a cross-validation method is used to obtain unbiased predictions. The dataset is split into 5 subsets of equal size, and the model is independently trained on all subsets but the i-th, for which predictions are made. The ROC curves of the CatBoost algorithm are shown in Fig. 9 for muon efficiencies above 90%. For comparison, the ROC curves for the χ 2 CORR variable are superimposed. As a result, for high muon efficiency the CatBoost algorithm has better discriminating power than χ 2 CORR in all the momentum bins. The difference in background rejection has a break point around 98% muon efficiency, where for p < 10 GeV/c it lies in 20 -40 % range and 4 -10 % for p ≥ 10 GeV/c.
With a similar setup as the one for HLT1 (Sec. 2.1), throughput tests are performed on simulated Run 3 data and show resource usage of about 0.4% out of a total HLT2 throughput rate of ∼ 129 Hz. Therefore, this CatBoost operator is fast enough to be employed in the upgraded HLT2 trigger of the experiment.  Figure 9: Proton rejection as a function of muon efficiency for tracks satisfying IsMuon obtained with the CatBoost algorithm (magenta) and χ 2 CORR (blue) on 2016 calibration data. Low momentum bins, which are not covered by the calibration samples, are not shown.

Conclusions
Two new muon identification algorithms have been developed in view of the LHCb Run 3 upgrade. The first one, χ 2 CORR , expands on the muon likelihood variable developed in Run 1 by including the correlation among the muon hits. The second one features a multivariate algorithm based on the CatBoost machine learning toolkit. The performances of both algorithms in terms of background rejection versus signal efficiency are characterised on 2016 proton calibration data, and in both cases are found to improve considerably those of the muon likelihood used during Run 1 and Run 2, with the CatBoost classifier offering a slightly better performance. As far as the computational times are concerned, the χ 2 CORR has been proven to be fast enough to be included in the upgrade muon trigger lines. The CatBoost algorithm, while improving the competing state-of-art gradient boosting libraries, can be computed in the HLT2, where the time constraints are less stringent.