Precise determination of the Bs0\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$B_{\mathrm{s}}^0$$\end{document}–B¯s0\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\overline B_{\mathrm{s}}^0$$\end{document} oscillation frequency

Mesons comprising a beauty quark and strange quark can oscillate between particle (Bs0\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${B}_{\mathrm{s}}^{0}$$\end{document}) and antiparticle (B¯s0\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\overline{B}}_{\mathrm{s}}^{0}$$\end{document}) flavour eigenstates, with a frequency given by the mass difference between heavy and light mass eigenstates, Δms. Here we present a measurement of Δms using Bs0→Ds−\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${B}_{\mathrm{s}}^{0}\to {D}_{\mathrm{s}}^{-}$$\end{document}π+ decays produced in proton–proton collisions collected with the LHCb detector at the Large Hadron Collider. The oscillation frequency is found to be Δms = 17.7683 ± 0.0051 ± 0.0032 ps−1, where the first uncertainty is statistical and the second is systematic. This measurement improves on the current Δms precision by a factor of two. We combine this result with previous LHCb measurements to determine Δms = 17.7656 ± 0.0057 ps−1, which is the legacy measurement of the original LHCb detector. The LHCb collaboration reports an improved measurement of the oscillation frequency of mesons consisting of a bottom quark and strange quark, which is then combined with previous results.


s
meson, are one such example. In the B 0 s -B 0 s system, the observed particle and antiparticle states are linear combinations of the heavy (H) and light (L) mass eigenstates. These mass eigenstates have corresponding masses m H and m L and decay widths Γ H and Γ L (ref. 1 ). As a consequence, the B 0 s -B 0 s system oscillates with a frequency given by the mass difference, Δm s = m H − m L . This oscillation frequency is an important parameter of the standard model of particle physics. In combination with the B 0 -B 0 oscillation frequency, Δm d , it provides a powerful constraint on the Cabibbo-Kobayashi-Maskawa quark-mixing matrix 2-6 . A precise measurement of Δm s is also required to reduce the systematic uncertainty associated with measurements of matter-antimatter differences in the B 0 s -B 0 s system 7 . In this Article, we present a measurement of Δm s using B 0 s mesons that decay to a charmed-strange D − s meson and a pion, B 0 s → D − s π + , and decays with the opposite charge, B 0 s → D − s π + . We refer to both charge combinations as B 0 s → D − s π + throughout the paper, and similarly for decays of the D − s meson. The measurement is performed using data collected between 2015 and 2018, denoted as Run 2 of the Large Hadron Collider (LHC), corresponding to an integrated luminosity of 6 fb −1 of proton-proton (pp) collisions at a centre-of-mass energy of 13 TeV.
The first measurement in which the significance of the observed B 0 s -B 0 s oscillation signal exceed five standard deviations was obtained by the CDF collaboration 8 . More recently, the LHCb collaboration has performed several measurements of Δm s using data collected at the LHC: a measurement using B 0 s → D − s π + decays 9 ; two measurements using B 0 s → J/ψK + K − decays 10,11 ; and a measurement using B 0 s → D ∓ s π ± π ± π ∓ decays 12 . Theoretical predictions for Δm s are available 6,13-17 , with the most precise prediction provided in ref. 18 . The prediction is consistent with-but considerably less precise than-existing experimental results.
The B 0 s → D − s π + decay time distribution, in the absence of detector effects, can be written as where Γ s = (Γ H + Γ L )/2 is the B 0 s meson decay width and ΔΓ s = Γ H − Γ L is the decay-width difference between the heavy and light mass eigenstates. The parameter C takes the value C = 1 for unmixed decays, that is, B 0 s → D − s π + , and C = − 1 for decays in which the initially produced meson mixed into its antiparticle before decaying, that is, B 0 s → B 0 s → D − s π + . The mixed decay is referred to as B 0 s → D − s π + throughout the paper. The mass difference Δm s corresponds to a frequency in natural units, and is measured in inverse picoseconds (ps -1 ).
The LHCb detector 19,20 is designed to study the decays of beauty and charm hadrons produced in pp collisions at the LHC. It instruments a region around the proton beam axis, covering the polar angles between 10 and 250 mrad, in which approximately a quarter of the b-hadron decay products are fully contained. The detector includes a high-precision tracking system with a dipole magnet, providing measurements of the momentum and decay-vertex position of particles. Different types of charged particle are distinguished using information from two ring-imaging Cherenkov detectors, a calorimeter and a muon system.
Simulated samples of B 0 s → D − s π + decays and data control samples are used to verify the analysis procedure and to study systematic effects. The simulation provides a detailed model of the experimental conditions, including the pp collision, decays of the produced particles, their final-state radiation and response of the detector. Simulated samples are corrected for residual differences in relevant kinematic distributions to improve the agreement with data. The software used is described in refs. [21][22][23][24][25][26][27] .
The B 0 s mesons travel a macroscopic distance at LHC energies (1 cm on average) before decaying and are considerably heavier than most other particles produced directly in pp collisions. Thus, their decay products have large displacement relative to the pp collision point and a larger momentum transverse to the beam axis compared with other particles. The candidate selection exploits these fundamental properties. Two fast real-time selections use partial detector information to reject LHC bunch crossings likely to be incompatible with the presence of the signal, before a third selection uses fully aligned and calibrated data in real time to reconstruct Precise determination of the B 0 s -B 0 s oscillation frequency LHCb collaboration* Mesons comprising a beauty quark and strange quark can oscillate between particle (B 0 s ) and antiparticle (B 0 s ) flavour eigenstates, with a frequency given by the mass difference between heavy and light mass eigenstates, Δm s . Here we present a measurement of Δm s using B 0 s → D − s π + decays produced in proton-proton collisions collected with the LHCb detector at the Large Hadron Collider. The oscillation frequency is found to be Δm s = 17.7683 ± 0.0051 ± 0.0032 ps −1 , where the first uncertainty is statistical and the second is systematic. This measurement improves on the current Δm s precision by a factor of two. We combine this result with previous LHCb measurements to determine Δm s = 17.7656 ± 0.0057 ps −1 , which is the legacy measurement of the original LHCb detector. and select topologies consistent with the signal 28 . Selected collisions are recorded to permanent storage. All selections, except the first real-time selection, are based on multivariate classifiers. Two subsequent selections fully reconstruct the decays with the D − s meson reconstructed in both K − K + π − and π − π + π − final states. After the real-time stages, the initial 'offline' selection is based on track kinematic quantities and displacement relative to the pp collision point that favours the signal, followed by a multivariate classifier trained on properties of the full signal decay. These selections sequentially improve the signal purity of the sample to the final value of 84%, which is optimized using a simulation to maximize the product of signal significance and signal efficiency. This criterion gives the optimal sensitivity to the oscillation frequency.
The remaining sources of background after selection consist of random track combinations (combinatorial background); B 0 s → D * − s π + decays, where the photon from the B 0 s → D − s γ decay is not reconstructed; and contributions from b-hadron decays with similar topologies to the signal, namely, Decays with similar topology are suppressed by applying kinematic vetoes and additional particle identification requirements.
To measure Δm s , a B 0 s → D − s π + decay time distribution is first constructed in the absence of a background. This is achieved by performing an unbinned two-dimensional likelihood fit to the observed D − s π + and K − K + π − or π − π + π − invariant mass distributions. This fit is used to determine the signal yield and a set of weights 29 used to statistically subtract the background in the subsequent fit to the decay time distribution. The invariant mass distributions of the selected decays are shown in Fig. 1. The non-peaking contribution in the combinatorial background distribution, as shown in Fig. 1 (right), is due to events in which a fake D − s candidate is produced from a combination of random tracks. The peaking contribution is due to genuine D − s candidates combined with a random track resulting in a fake B 0 s candidate. The probability density functions describing the invariant mass distributions of the signal and background are obtained using a mixture of control samples in the data and simulation. The D − s π + and K − K + π − or π − π + π − invariant-mass signal shapes are described by the sum of Hypatia 30 and Johnson S U (ref. 31 ) functions. The combinatorial background contribution for both invariant mass distributions is described by an exponential function in each of them with the parameters determined in the fit. The B 0 →D − π + , Λ 0 b → Λ − c π + or B 0 s → D ∓ s K ± background components constitute less than 2% of the signal yield and are accounted for in the fit to the invariant mass distributions using yields obtained from known branching fractions and relative efficiencies, as determined from the simulated samples, which are weighted to account for differences between the data and simulation. The B 0 → D − s π + and B 0 s → D * − s π + background components are also obtained from the simulated samples and included in the mass fit. The combined B 0 → D − s π + and B 0 s → D * − s π + yield is a free parameter of the fit. The signal yield obtained from the invariant mass fit is 378,700 ± 700.
Decay time parameterization (equation (1)) is modified to account for the following detector effects: decay-time-dependent reconstruction efficiency; time-dependent decay time resolution; imperfect knowledge of the initial flavour of the reconstructed B 0 s or B 0 s meson; asymmetry in B 0 s or B 0 s production in pp collisions; and asymmetry in the reconstruction of final-state particles due to interactions in the detector material 32 .
Due to the lifetime biasing effect of the selections, the reconstruction efficiency is low at small decay times and increases to a plateau after 2 ps. The decay-time-dependent reconstruction efficiency is modelled with cubic b-spline curves as described Combinatorial --

Fig. 1 | invariant mass distributions.
Distributions of the D − s π + (left) and K + K − π ± or π + π − π ± (right) invariant mass for the selected candidates, namely, m(D − s π + ) and m(K + K − π ± , π + π − π ± ), respectively. The mass fit described in the text is overlaid. The different contributions are shown as coloured areas (for the background) or by dashed lines (for the signal). The vertical bars, typically visible only in regions with low numbers of candidates, correspond to the statistical uncertainty in the number of observed candidates in each bin. The horizontal bin width is indicated on the vertical axis legend.

Cross-checks:
Kinematic correlations 0.0003 Total systematic uncertainty 0.0032 Sources of systematic uncertainties are discussed in the text. Additional details are provided in Methods. The total systematic uncertainty is obtained by adding the contributions in quadrature.
elsewhere 33 . The spline coefficients are allowed to vary in the fit to the observed decay time distribution. The decay time resolution is measured using a data sample of D − s mesons originating from pp interactions without being required to come from an intermediate B 0 s meson decay. These 'prompt' candidates pass the same real-time selection procedure as the signal sample. After real-time selection, additional requirements are applied to ensure the selection of a D − s signal peak with high background rejection but without any requirement on displacement from the pp collision point. The multivariate classifier trained using the full signal decay is not applied. The reconstructed decay time in this control sample is proportional to the distance between the D − s production vertex and an artificial B 0 s decay vertex, formed by combining the prompt D − s meson with a π + track from the same pp collision. It is, therefore, compatible with a zero decay time up to bias and resolution effects. A linear relationship is observed between the decay time resolution measured at zero decay time and the decay time uncertainty estimated in the vertex fit. This relationship is used to calibrate the B 0 s → D − s π + decay time uncertainty. Simulated prompt D − s and B 0 s → D − s π + decays, for which the generated decay time is known, are used to check the suitability of this method, which determines a 0.005 ps bias in the reconstructed decay time due to residual detector misalignments. This bias is corrected in the analysis. The uncertainty in Δm s due to these residual detector misalignments is evaluated using simulated samples that were intentionally misaligned. This uncertainty is reported in Table 1.
To determine if a neutral meson oscillated into its antiparticle, knowledge of the B 0 s or B 0 s flavour at production and decay is required. In B 0 s → D − s π + decays, the B 0 s flavour at decay is identified by the charge of the pion as the D + s π − decay cannot be directly produced. To determine whether the B 0 s oscillated before decay, the flavour at production is inferred from the hadronization of the B 0 s meson or the decay of other beauty hadrons produced in the collision using a combination of several flavour-tagging algorithms 34-37 . Each algorithm estimates the probability that a candidate has been assigned the wrong flavour tag. The algorithms that use information independent of signal fragmentation are calibrated using B + meson decays, and a combined wrong-tag estimate is used in the fit. The tagging efficiency is measured to be ε = (80.30 ± 0.07)% with a probability to tag a candidate as the wrong flavour of ω = (36.21 ± 0.17)%, where the uncertainties account for the calibration.
In the unbinned maximum likelihood fit to the decay time distribution used to extract Δm s , the calibration parameters for the combined wrong-tag estimate are allowed to vary. Additional free parameters are the values of the spline coefficients used to describe the decay-time-dependent reconstruction efficiency and the B 0 s -B 0 s production and detection asymmetries. The parameters Γ s and ΔΓ s are fixed in the fit to their known values 38 . The other fixed parameters are the estimate of the wrong-tag fraction and efficiency of the tagging algorithms, decay-time bias correction and decay-time resolution calibration parameters. The decay time distribution of the tagged-mixed (B and untagged (where the initial flavour is unknown) samples are shown in Fig. 2 (left). The corresponding fit projection is overlaid. To highlight the oscillation phenomenon, the asymmetry distribution between the tagged-unmixed and taggedmixed samples is defined as with t modulo 2π/Δm s , as shown in Fig. 2 indicate the taggedmixed and tagged-unmixed decays observed at time t, respectively. For this distribution, each event-in addition to the weight used to statistically subtract the background-is also weighted by the product of two factors. The first is a flavour-tagging dilution factor related to the probability that the flavour tag is indeed correct. The second is an effective decay-time uncertainty dilution factor depending on the reconstructed decay time per-event resolution and on Δm s , for which the central value of the decay time fit is being used. The overlaid continuous line corresponds to the fit result. The result of the fit for Δm s is 17.7683 ± 0.0051 ps −1 , where this uncertainty is related to the sample size.
Several sources of systematic uncertainty have been investigated and those with a non-negligible contribution are listed in Table 1. These include uncertainty in the momentum scale of the detector, obtained by comparing the reconstructed masses of known particles with the most accurate available values 38 ; residual detector misalignment and length-scale uncertainties; and uncertainties due to choice of mass and decay-time fit models, determined using alternate parameterizations and pseudo-experiments. To verify the robustness of the measurement to variations in Δm s as a function of decay kinematics, the data sample is split into mutually disjoint subsamples, each having about the same number of signal events, in relevant kinematic quantities, such as the B 0 s momentum, and the Δm s values obtained from each subsample are compared. The largest observed variation is included as a systematic uncertainty. The total systematic uncertainty is 0.0032 ps −1 , with the leading In the left plot, the horizontal bin width is indicated on the vertical axis legend. The three components-unmixed, mixed and untagged-are shown in blue, red and grey, respectively. The inset shows a zoomed-in view of the region delineated in grey. The fit described in the text is overlaid.
contribution due to residual detector misalignment and detector length-scale uncertainties.
The value of the B 0 s -B 0 s oscillation frequency determined in this article is as follows.
This is the most precise measurement to date. The precision is further enhanced by combining this result with the values determined in refs. 9,12 . One study 9 used B 0 s → D − s π + decays collected in 2011. The other study 12 used a sample of B 0 s → D − s π + π + π − decays selected from the combined 2011-2018 dataset, corresponding to 9 fb −1 . The measurements are statistically independent. The systematic uncertainties related to the momentum scale, length scale and residual detector misalignment are assumed to be fully correlated. Due to aging of the detector and different alignment procedures used in Run 1 and Run 2, the effect of residual detector misalignment is larger in measurements using the Run 2 data. Given the precision of the measurement described in this paper, a detailed study of the detector misalignment effects is performed, and the related uncertainty due to the decay time bias has been substantially reduced compared with previous measurements using the Run 2 data. The values of the fixed parameters ΔΓ s and Γ s used as inputs to the previous analyses have evolved over time as additional measurements have been made. However, as the correlation between Δm s and ΔΓ s and Γ s is negligible, these small differences have been ignored in the combination procedure. A covariance matrix is constructed by adding statistical and systematic uncertainties in quadrature for each input, including correlations between systematic uncertainties. The results are averaged by minimizing χ 2 from the full covariance matrix. The value of Δm s obtained is 17.7666 ± 0.0057 ps −1 . Additionally, these results are combined with those from refs. 10,11 where Δm s is determined using B 0 s → J/ψK + K − decays in the 2011-2012 (3 fb −1 ) and 2015-2016 (2 fb −1 ) datasets. The decay time resolution for the measurements used in the combination 9-12 , including the analysis presented here, varies from 35 to 45 fs, depending on the decay mode. The result for Δm s is 17.7656 ± 0.0057 ps −1 . The different measurements, as well as the resulting combination, are shown in Fig. 3.
In summary, this paper presents the most precise measurement of the Δm s oscillation frequency, namely, 17.7683 ± 0.0051 (stat) ± 0.0032 (syst) ps −1 , where the first uncertainty is statistical and the second is systematic. The result is obtained using a sample of B 0 s → D − s π + decays collected with the LHCb detector during Run 2 of the LHC. Combining the result of this paper with previous measurements by the LHCb collaboration yields Δm s = 17.7656 ± 0.0057 ps −1 . This value is compatible with, and considerably more precise than, the predicted value from lattice quantum chromodynamics (refs. 13-15 ) and sum-rule calculations 16,17 of 18.4 +0.7 −1.2 ps −1 (ref. 18 ). The combined result represents a considerable improvement over previous measurements, and is a legacy measurement of the original LHCb detector. The experiment is currently undergoing a major upgrade to operate at five times the instantaneous luminosity from 2022 onwards 39 . The largest sources of systematic uncertainty for this measurement, that is, those related to the detector length scale and misalignment, will be a focal point to further improve on this result for future data-taking periods.

Online content
Any methods, additional references, Nature Research reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at https://doi.org/10.1038/ s41567-021-01394-x.

Fig. 3 | summary of LHCb measurements.
Comparison of LHCb Δm s measurements obtained from refs. 9-12 , the result presented in this article, and their average. The measurement described in this paper is labelled as D − s π + 6 fb −1 . The horizontal bars correspond to the total uncertainty reported for each measurement. The band indicates the size of the uncertainty on average for comparison purposes. The combination procedure and inputs are described in the text.  Publisher's note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Open Access This article is licensed under a Creative Commons
Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons. org/licenses/by/4.0/. © The Author(s) 2022 where the first uncertainty is due to the finite size of the calibration sample and the second one is due to the calibration procedure. This results in a combined effective performance of (6.10 ± 0.02 ± 0.15)% with respect to a perfect tagging algorithm that would have 100% tagging efficiency and zero mistag rate.
Decay time fit. The observed decay time distribution is fitted using an unbinned maximum likelihood fit in which all the combinations of initial-state flavours (B 0 s , B 0 s or untagged) and final-state charges (D − s π + or D + s π − ) are simultaneously fit. The decay time distribution of each measured final state is described by the sum of all the processes contributing to that state. Experimental effects are taken into account with several adjustments to the theoretical prediction in equation (1), namely, (3) Production and detection asymmetries are parameterized by factors a prod and a det , respectively, which are allowed to deviate from unity. The decay time distribution of both flavours contain a fraction (1−ω) of the correctly tagged decay time parameterization plus a fraction ω of the incorrectly tagged decay time parameterization. The mistag rate ω is obtained from a per-event estimation, after linear calibration. Different calibration parameters are used for the B 0 s and B 0 s initial flavours. The experimental decay time distributions of both flavours are convolved with a Gaussian function to account for the finite detector resolution. The mean of this function is shifted by the decay-time bias correction factor, and the width is obtained from a per-event estimate of the decay time uncertainty after linear calibration.
A decay-time-dependent efficiency is finally modelled by a time-dependent cubic spline function, which multiplies the decay time distribution obtained from the previous step.
Systematic uncertainties. The following sources of systematic uncertainty have been found to give a non-negligible contribution to the Δm s measurement. These are summarized in Table 1.
The measured decay time is inversely proportional to B 0 s momentum and therefore depends on an accurate determination of the momentum-scale uncertainty of the tracking system. The uncertainty is determined by varying the momentum of the B 0 s meson by ±0.03% (obtained from a comparison of masses of different particles with their known values) in the simulated signal samples. The corresponding uncertainty in Δm s is 0.0007 ps −1 .
The measured decay time is also proportional to the distance travelled by the B 0 s meson between production and decay, which is affected by the precise knowledge of the position of the vertex detector elements along the proton beam axis. The measured uncertainty is 100 μm over a length of 1 m (ref. 40 ). The corresponding uncertainty in Δm s is 0.0018 ps −1 .
The relative alignment of the tracking detector elements is a source of bias in decay time and contributes to resolution effects. The uncertainty in Δm s due to imprecise knowledge of this alignment has been obtained from the analysis of the simulated signal samples in which the detector elements have been deliberately misaligned. Different misalignments, namely, translations, rotations and their combinations-have been investigated. The leading effect is due to translation along the x axis-the axis perpendicular to the beam direction pointing towards the centre of the LHC ring. As a consequence, the simulated signal samples have been misaligned with x-axis translations in the range between 0 and 9 μm, as determined from the survey results. Each misaligned simulated sample is then corrected for decay time bias in the same manner as the data, and the extracted Δm s value is compared with the value obtained in simulation without any misalignment. This comparison produces a corresponding uncertainty in the bias correction procedure of 0.0020 ps −1 .
Alternative parameterizations of the background contributions to the invariant mass fit have been obtained by using different weighting methods; the difference between these parameterizations corresponds to an uncertainty of 0.0002 ps −1 .
For the specific B 0 s → D * − s π + and B 0 → D − s π + background contributions, the relative fraction of these components cannot be reliably determined from the data. Their relative contributions are nominally set to an equal mixture and varied between 0 (pure B 0 → D − s π + ) and 1 (pure B 0 s → D * − s π + ) to determine the maximum deviation in Δm s corresponding to an uncertainty of 0.0005 ps −1 .
The decay time resolution is obtained from data using a sample of D − s mesons that are directly produced in a pp collision. These are combined with a π + meson coming from the same collision to produce a fake B 0 s candidate with a decay time equal to zero, ignoring the resolution effects. Different parameterizations of the measured decay time distribution are applied to a simulated signal sample. The largest deviation of the extracted Δm s value with respect to nominal parameterization is found to be 0.0011 ps −1 .
The procedure used to subtract background contributions in the fit to the decay time distribution assumes no large correlations between the decay time and the reconstructed B 0 s and D − s invariant masses. This is studied by analysing the

Methods
The LHCb detector. The LHCb detector 19,20 is a single-arm forward spectrometer covering the pseudo-rapidity range of 2 < η < 5, designed for the study of particles containing b or c quarks. The detector includes a high-precision tracking system consisting of a silicon-strip vertex detector surrounding the pp interaction region 40 , a large-area silicon-strip detector located upstream of a dipole magnet with a bending power of about 4 T m, and three stations of silicon-strip detectors and straw drift tubes 41 placed downstream of the magnet. The tracking system provides a measurement of momentum p of the charged particles with a relative uncertainty that varies from 0.5% at low momentum to 1.0% at 200 GeV c -1 . The minimum distance of a track to a primary vertex (PV), that is, the impact parameter, is measured with a resolution of (15 + 29/p T ) μm, where p T is the component of the momentum transverse to the beam (unit, GeV c -1 ). Different types of charged hadron are distinguished using information from two ring-imaging Cherenkov detectors 42 . Photons, electrons and hadrons are identified by a calorimeter system consisting of scintillating-pad and preshower detectors and an electromagnetic and hadronic calorimeter. Muons are identified by a system composed of alternating layers of iron and multiwire proportional chambers 43 . Simulation of the LHCb detector response is required to model the effects of detector acceptance and imposed selection requirements. In the simulation, pp collisions are generated using PYTHIA 21 with a specific LHCb configuration 22 . Decays of unstable particles are described by EvtGen 23 , in which the final-state radiation is generated using PHOTOS 27 . The interaction of the generated particles with the detector and its response are implemented using the GEANT4 toolkit 24,25 described in ref. 26 .

Selection.
A fast decision about which pp collisions are of interest is made by a trigger system 44 . It consists of a hardware stage, based on information from the calorimeter and muon systems, followed by a software stage that reconstructs the pp collision based on all the available detector information. The software trigger selects candidates consistent with a b-hadron decay topology, with tracks originating from a vertex detached from the primary pp collision point, known as the PV. The mean B 0 s lifetime is 1.5 ps (ref. 38 ), which corresponds to an average flight distance of 1 cm in the LHCb detector.
After being accepted by the trigger, a further selection is applied that forms D − s → K − K + π − and D − s → π − π + π − candidates from the reconstructed charged tracks and subsequently combines them with a fourth track to form B 0 s → D − s π + candidates. Particle identification information is used to assign mass hypotheses to each of the final-state tracks.
The B 0 s invariant mass resolution is improved by constraining the D − s invariant mass to its known value 38 . The K + K − π ± or π + π − π ± and D − s π + invariant mass ranges considered in this analysis are [1,930, 2,015] and [5,300, 5,800] MeV c -2 , respectively.
To suppress the B 0 s candidates formed from random track combinations, a gradient boosted decision tree (BDT) is used, implemented using the XGBoost library 45 . Training uses data from both signal and background samples to avoid mismatches between the data and simulation. This classifier uses information on the fit quality of the D − s and B 0 s decay vertices; D − s and B 0 s χ 2 IP defined as the difference in χ 2 of the vertex fit for a given PV reconstructed with and without the considered particle; angles between their momentum vector and vector connecting their production and decay vertices; and p T and impact parameter χ 2 IP of the final-state tracks. The BDT classifier threshold is chosen to maximize the product of the signal significance and signal efficiency. This choice optimizes sensitivity to the oscillation frequency.
Flavour tagging. The initial flavour of the B 0 s meson must be known to determine if it has oscillated before decay. Flavour-tagging algorithms are used to determine the initial flavour from properties of the b-hadron production in the pp collision.
Beauty quarks are predominantly produced in pairs. Opposite-side (OS) tagging algorithms 35 determine the initial flavour of the B 0 s meson based on information from the other beauty quark decay. These include the OS muon and OS electron taggers, which identify the flavour from the charge of leptons produced in the other b-hadron decay. The OS kaon tagger identifies b→c→s transitions, the OS charm quark tagger identifies b→c transitions, and the OS vertex charge tagger calculates the effective charge of an OS displaced vertex 36 . In addition, a same-side kaon tagger exploits the charge information of the kaon originating from the s or s quark leftover from the B 0 s or B 0 s meson fragmentation 37 . Each algorithm determines the initial flavour of the B 0 s meson from the charge of the reconstructed tagging particle or the reconstructed vertex in case of the OS vertex tagger.
The tagging information is incorporated in the decay time description. The amplitude of oscillation is reduced by a dilution factor D = (1 − 2ω), where ω is the average fraction of incorrect tags (known as mistag rate in the literature). Different machine-learning algorithms provide an estimate of the mistag rate that is calibrated with the data to match the true mistag distribution. A linear calibration of the average mistag as a function of the predicted mistag for the combined OS tag and same-side kaon tag information is then implemented in the decay time fit with freely varying calibration parameters. The combined tagging efficiency of the sample is ε = (80.30 ± 0.07)% with a mistag fraction of ω = (36.21 ± 0.02 ± 0.17)%,

acknowledgements
We thank our colleagues in the CERN accelerator departments for the excellent performance of the LHC. We thank the technical and administrative staff at the LHCb institutes. We acknowledge support from CERN and from the following national agencies:

author contributions
All authors have contributed to the publication, being variously involved in the design and the construction of detectors, in writing software, in operating the detectors and acquiring data, in calibrating the sub-systems and processing data, and finally in analysing the processed data.

Competing interests
The authors declare no competing interests.

additional information
Correspondence and requests for materials should be addressed to A. Bertolin.
Peer review information Nature Physics thanks Joseph Kroll, Alexander Lenz and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.
Reprints and permissions information is available at www.nature.com/reprints. simulated signal and background samples where any residual correlations between these observables are removed. The difference in measured value of Δm s between the decorrelated and nominal samples is found to be 0.0011 ps −1 .
The data sample was split into mutually disjoint subsamples to study the effect of potential correlations between the kinematic ranges, data-taking periods, flavour-tagging categories, BDT-based selection and measured value of Δm s . The measured values obtained from each subsample are compared and the largest observed variation is found to be 0.0003 ps −1 .
Several additional effects have been considered consisting of possible biases introduced by the fit procedure, changes to the signal and background parameterizations, and changes in the reweighting procedure used when obtaining the invariant mass shapes of partially reconstructed backgrounds constituting less than 2% of the signal yield. Their impact has been found to be negligible with respect to the sources listed in Table 1.
The largest sources of systematic uncertainty are found to be due to the imprecise knowledge of position and alignment of the tracking detector closest to the nominal pp collision region.

Data availability
All figures are available at https://lhcbproject.web.cern.ch/Publications/p/ LHCb-PAPER-2021-005.html. Additional material describing this analysis is available at http://cds.cern.ch/record/2764338/files/ in the 'Supplementary.pdf ' file in 'LHCb-PAPER-2021-005-supplementary.zip' . Inputs to the Δm s combination are available from the HEP data at https://www.hepdata.net/record/105881. LHCb has an open data policy described in http://cdsweb.cern.ch/record/1543410. Subject to the resources being identified, LHCb will endeavour to provide open access to some reconstructed level data on the disk at CERN.

Code availability
The code used for the fit to the B 0 s and D − s invariant mass distributions and to the B 0 s decay time distribution is publicly available at https://gitlab.cern.ch/lhcb/ Urania/-/tree/master/PhysFit/B2DXFitters.