Magnetic Field Measurement and Analysis for the Muon g-2 Experiment at Fermilab

The Fermi National Accelerator Laboratory has measured the anomalous precession frequency $a^{}_\mu = (g^{}_\mu-2)/2$ of the muon to a combined precision of 0.46 parts per million with data collected during its first physics run in 2018. This paper documents the measurement of the magnetic field in the muon storage ring. The magnetic field is monitored by nuclear magnetic resonance systems and calibrated in terms of the equivalent proton spin precession frequency in a spherical water sample at 34.7$^\circ$C. The measured field is weighted by the muon distribution resulting in $\tilde{\omega}'^{}_p$, the denominator in the ratio $\omega^{}_a$/$\tilde{\omega}'^{}_p$ that together with known fundamental constants yields $a^{}_\mu$. The reported uncertainty on $\tilde{\omega}'^{}_p$ for the Run-1 data set is 114 ppb consisting of uncertainty contributions from frequency extraction, calibration, mapping, tracking, and averaging of 56 ppb, and contributions from fast transient fields of 99 ppb.


I. INTRODUCTION
The Muon g − 2 collaboration reports a new measurement of the positive muon magnetic anomaly a µ = (g µ −2)/2 [1]. The result is based on the Run-1 data set analysis, collected from March through July of 2018. The data are divided into four subsets grouped by different operating parameters of the experiment. These data subsets are analyzed separately and give consistent results for a µ . The combined Run-1 result is a µ (FNAL) = 116 592 040 (54) × 10 −11 (0.46 ppm). (1) Three companion papers to Ref. [1] provide the details for the key inputs to this result. Reference [2] details the analysis of the precision determination of the anomalous spin-precession frequency, ω a . Reference [3] provides corrections to the a µ measurement that arise from effects of the muon beam dynamics. This paper provides data reconstruction, analysis, and systematic uncertainties of the measurement of the magnetic field in the muon storage ring.
The goal of the Fermi National Accelerator Laboratory (FNAL) Muon g−2 Experiment is the determination of the muon magnetic anomaly with high precision [4]. There is great interest in this quantity because the standard model of particle physics is incomplete; this quantity is sensitive to potential new physics contributions not present in the current calculations. The previous experiment at Brookhaven National Laboratory (BNL) [5] shows a tension between the theoretical expectation and the experimental result of about 3.7 σ [6]. Since a µ is sensitive to a wide array of potential new physics contributions, both experimentalists [1] and theorists  have worked to reduce their uncertainties. Contributions to a µ from quantum electrodynamics (QED), electroweak theory, and quantum chromodynamics (QCD) loops have also been calculated to higher precision [6]. This new result, from the Run-1 data set, differs by 3.3 σ from the standard model prediction and agrees with the BNL E821 measurement. The combined experimental average results in a 4.2 σ discrepancy with the theoretical calculation.

A. The Muon g − 2 Experiment
In this experiment, pulses of polarized muons are injected with momentum p = 3.094 GeV/c into the magnetic storage ring shown in Fig. 1. In the highly uniform vertical magnetic field of magnitude |B| ≈ 1.45 T, the muons circulate with a mean radius of 7.112 m at the cyclotron frequency ω c /(2π) = 6.7 MHz. Their spinprecession frequency ω s /(2π) is the combination of their Larmor and Thomas precession, and differs slightly from the cyclotron frequency. The difference between these two frequencies is the rate at which the muons' helicity precesses, and is called the anomalous spin-precession frequency. For a muon in a uniform vertical magnetic field and an ideal horizontal orbit, the experimentally observed anomalous spin-precession frequency is The measurement of both the magnitude of the anomalous spin-precession frequency ω a = |ω a | and the storage ring magnetic field B can be used to calculate a µ . Additional terms modifying Eq. (2) originate in the experiment due to the electric focusing fields that are needed for vertical muon confinement and from muon motion that is not entirely perpendicular to |B|. While the choice of the momentum strongly suppresses these additional terms, small corrections are applied when calculating a µ [3]. Furthermore, the presence of an electric dipole moment of the muon would give rise to additional terms in Eq. (2) [27]. The experiment was designed to balance the statistical and systematic uncertainties to reach its precision goal. The measurement of ω a [2] is based on the time dependence of the decay positrons above an energy threshold measured in 24 electromagnetic calorimeters [28][29][30] with gain stabilized by a laser system [31]. Two in-vacuum straw trackers [32] provide the detailed information about the distribution of the muons in the storage ring that determines how the magnetic field is weighted and inform the beam-dynamics corrections to a µ [3].
A central component of the experiment is the precision superconducting magnetic storage ring that generates the magnetic field. Its main elements were designed for the BNL E821 experiment and detailed in [33]. The temporal stability and spatial homogeneity of the magnetic field are essential to the experiment. Because the muon precession frequency is proportional to the strength of the magnetic field, we require that the average magnetic field experienced by the muons remain stable on the scale of parts per million (ppm) throughout the experiment. A very homogeneous field is required to minimize the uncertainty of the magnetic field maps caused by any nonuniformities in the muon distribution.
The magnet, operated in non-persistent mode, had a current of ∼5170 A. Over long timescales, the magnetic field's stability is driven by thermal expansion and contraction of the magnet steel in response to temperature changes in the experimental hall. The magnetic field is stabilized by feedback to the magnet current supply from a set of nuclear magnetic resonance (NMR) magnetometers, described in Sec. I C, distributed around the ring.
The homogeneity of the magnetic field required shimming with a suite of movable elements labeled in Fig. 2 that can fine tune the magnetic field in localized regions during data collection periods. Precision positioning of the 72 pole pieces (36 each upper and lower) drives the overall field strength, while their pitch with respect to horizontal drives the linear gradients. Additional pieces of iron were positioned along the surfaces of the pole pieces (edge shims and iron foil laminations), in the air gap between the pole pieces and yoke (wedges), and the top and bottom of the 24 yoke pieces (top hats). These were used to fine tune the average field as a function of azimuth and control gradients in the direction transverse to the beam propagation. A set of coils, called surface correction coils (SCC), are installed on the surface of the pole pieces. The SCC consists of 100 individually powered, concentric coils on each of the upper and lower pole surfaces. Specific current distributions were used to minimize the field variations across the beam aperture to better than 1 ppm when averaged over the storage ring azimuth, and updated periodically in response to magnetic field drifts. Shimming resulted in a field homogeneity over the storage volume of roughly 14 ppm RMS, a threefold improvement [34] in the azimuthal variation of the average field compared to the BNL E821 experiment The coordinate systems used in this paper. The muon beam nominal orbital radius is at r = 7.112 m in the ryφ basis, equivalent to x = 0 cm in the xyz basis. [5]. Figure 3 shows the coordinate systems we use in this paper. There are two primary reference frames: a topdown view of the entire storage ring used mostly for considering azimuthally dependent effects, and a cross section through the ring used for considering the radially and vertically dependent effects. The coordinate y always refers to the direction of the axis of the storage ring in both systems. The coordinate r in the top-down system is replaced by the coordinate x in the cross-section system. They are related by x = r − 7.112 m. The azimuthal angle in the top-down system is represented by φ. In the cross-section system, it is replaced by z.

B. Measuring the Magnetic Field
Equation (2) shows that determining a µ from ω a requires precise knowledge of the magnetic field magnitude experienced by the muons, which we measured with pulsed proton NMR. This technique, pioneered by Bloch [35] and Purcell [36], has been employed since the 1950s [37] across a wide range of chemical and physical applications, routinely demonstrating accuracy and precision at the ppm and even parts per billion (ppb) scales. The NMR devices (or magnetometers) are called probes. A careful sequence of calibrations and synchronizations is performed to relate the magnetic field to the Larmor precession frequency of protons shielded in a spherical water sample at a reference temperature T . The average field over the muon distribution weighted by the detected decays over time isB. The frequency measurements de-termineB when combined with the shielded proton magnetic moment µ p (T ) viã Here, µ e (H)/µ p (T ) is the ratio of the magnetic moments of an electron bound in hydrogen to that of a proton shielded in a spherical water sample, measured to 10.5 ppb at a water temperature T r = 34.7°C [38]. The bound-state QED corrections that determine the magnetic moment ratio of the electron bound in hydrogen versus a free electron µ e (H)/µ e are considered essentially exact [39], and the electron magnetic moment µ e is known to 0.3 ppb [39]. Combining Eqs. (2), (3), and µ e = (4) The ratio of the mass of the muon and the mass of the electron m µ /m e is known to 22 ppb from the measurement of the hyperfine splitting of muonium [40] and bound-state QED [39]. Finally, the g factor of the electron g e is known to 0.28 ppt [41]. To determineω p (T r ), we perform a sequence of measurements with proton-rich magnetometers: 1. The 17 NMR probes of the in-vacuum trolley are calibrated in terms of the equivalent ω p (T r ) with a precision calibration probe containing a pure water sample. The calibration probe's precise measurements are corrected for material effects, temperature, and field variations during the calibration to achieve high accuracy and precision.
2. The magnetic field in the muon storage volume is mapped using the trolley approximately every three days. The result is called a trolley map or field map.
3. The 378 fixed NMR probes, located in 72 azimuthal stations, are synchronized to the trolley measurements. These fixed probes are located above and below the storage volume and regularly spaced around the ring to track the field's evolution between trolley maps. 4. The magnetic-field maps are weighted by the temporal and spatial distributions of those muons included in the ω a measurement. 5. Corrections are applied for the presence of fast transient fields generated by pulsed muon injection systems that are not resolved by the asynchronous magnetic-field tracking and not present during the trolley measurements.

C. Hardware Systems
The precision calibration probe employed in the first step of the measurement sequence is shown in Fig. 4. This probe is highly symmetric and uses an ultrapure, cylindrical water sample. It is constructed from a combination of paramagnetic and diamagnetic materials so that the total correction due to its intrinsic magnetic influence is less than 10 ppb [42]. The calibration probe's total uncertainty on the corrections is less than 20 ppb, corroborated through cross calibrations with both a spherical water sample [43] and 3 He [44]. The calibration probe is used to generate calibration constants for each of the trolley probes. It is operated inside the vacuum chambers and mounted on a three-dimensional (3D) translation stage that allows it to match each trolley probe's position using applied magnetic-field gradients. Details of the calibration procedure are given in Sec. IV.
FIG. 4: Schematic drawing of the calibration probe used to calibrate the trolley probe measurements. Figure 5 shows the design of the trolley and fixed probes, which are based on a similar design from the BNL E821 experiment [45]. The cylindrical sample volume in each probe is filled with petroleum jelly, chosen for its low volatility. The trolley shell and its mechanical hardware for the motion (rails and drums) were from the BNL E821 experiment and the trolley electronics, position encoders, and controllers were upgraded for this experiment as detailed in [46].  The calibrated trolley is used to produce detailed field maps over the entire azimuth of the storage ring. The muon storage region extends in the x and y directions to ±4.5 cm, defined by a set of five circular collimators placed at various azimuthal positions around the storage ring. In order to determine the magnetic field in the muon storage region, the trolley's 17 NMR probes are arranged in the configuration shown in Fig. 6. The trolley is pulled by two cables along rails in the storage ring vacuum chamber, and the field is sampled in ∼9000 azimuthal locations. The analysis of the trolley maps is detailed in Sec. V.
The trolley system includes electronics to control the NMR sequence and to read out the digitized free induction decay (FID) signals. The initial ∼61.79 MHz signal, corresponding to |B| ≈ 1.45 T, is mixed down to approximately 50 kHz prior to digitization and transferred through an electronic interface to a data acquisition (DAQ) computer. A bar code scanner on the trolley reads marks etched into the bottom of the storage ring vacuum chambers that are analyzed to determine the trolley's azimuthal position. In order to measure the field experienced by the muons, ideally the trolley maps would be taken under the identical conditions that exist during muon injections. In reality, three main configuration changes are needed for field mapping: i) the pulsed beam injection systems [kicker and electrostatic quadrupole (ESQ)] are switched off, ii) the beam collimators are moved from their regular positions because they would physically interfere with the trolley, and iii) the garage rail is moved into the storage region to insert the trolley. Dedicated measurements and calculations were made to correct for these modified conditions and are described in Secs. V B 5 and VIII.
The 378 fixed probes mounted above and below the storage region to continuously track the field drift are synchronized with the trolley measurements during each mapping run. Because trolley runs interrupt muon data taking, the detailed field mapping is only performed approximately every three days, driven by the fixed probes' field tracking capability. The fixed probes provide information about the field drift during the muon data taking periods between trolley maps. Four or six probes (see Fig. 6) are installed at 72 azimuthal locations, called stations, regularly spaced around the storage ring, allowing continuous monitoring of the magnetic field at each azimuthal station. The fixed probe FIDs are read out through 20 multiplexers and mixed down to about 50 kHz and digitized. A computer controls the read sequence, including the probe selection and the recording of the digitized waveforms. The synchronization of the trolley measurements to the fixed probes and the subsequent field tracking are discussed in Sec. VI.
The magnetic field DAQ serves as an access point for controlling individual field measurement systems. These include fixed probes, trolley control, trolley readout, calibration probe control, power supply feedback, surface coil settings, and environmental fluxgate sensors. These systems are each managed by custom front ends that run asynchronously and communicates with a common DAQ core. The field DAQ uses standalone hardware that runs independently from the detector DAQ, which controls the rest of the Muon g−2 Experiment. The field DAQ collects data whenever the magnet is powered and runs decoupled from the main DAQ for the calorimeters, trackers, pulsed injection systems, and other hardware. The field and main DAQs used a common 10 MHz time reference disciplined by a Rb-clock and a global positioning system, allowing measurement time stamps to be correlated with data from the detector DAQ with high precision.

D. Magnetic Field Analysis
The data are analyzed to extractω p (T r ) as one input for the calculation of a µ . The evaluation of the trolley and fixed probe data is based on multipole and Cartesian moments described in Sec. I D 1. They form the basis for various steps in the overall analysis, which is outlined in Sec. I D 2. Throughout the rest of this paper, we provide the details of these analysis steps and their implementation. For many steps, there were two or three parallel analysis implementations by independent teams that cross checked each other and refined systematic uncertainties. We highlight important analysis differences between the independent teams in Sec. I D 3.

Multipole and Cartesian Moments
The NMR probes measure the magnitude of the magnetic field, |B| = B 2 x + B 2 y + B 2 z , and are often referred to as "scalar magnetometers." Due to the design of the magnet and the shimming, the magnetic field is predominantly in the y direction, i.e., B x , B z B y . The difference between the NMR measurement of |B| and the field component in the y direction can be approximated to first order as During the shimming procedure, measurements of the radial and longitudinal components, B x and B z , were performed at ≈ 100 azimuthal locations. The azimuthally averaged radial field was determined to be B x / |B| < 40 ppm during Run-1 with the applied SCC settings, and the measurement of the average longitudinal field was consistent with zero. Local variations in the longitudinal component were typically B z / |B| < 100 ppm with respect to |B|, leading to (|B| − B y )/ |B| = O(10 ppb). Therefore, it is well-justified (at our desired accuracy) to replace |B| with B y and focus on its extraction from the data. From here forward, we will use the convention B = |B| and make the approximation B ≈ B y . The measurements from the trolley and fixed probes represent the field magnitudes B(x, y, φ = φ k ) at an azimuthal slice φ k . We can extract the field's spatial dependence in these two-dimensional (2D) slices in terms of moments m i of the magnetic field. For the trolley probe geometry, the parametrization of B in a slice comes from the general solution to the source-free Laplace equation for the scalar potential in polar coordinates (r, θ), where, here and in Table I only, r = x 2 + y 2 is the in-slice radius from the center of the muon orbit and r 0 = 4.5 cm is a normalization to the outer edge of the muon storage region. The A n and B n parameters are the multipole strengths, also known as the normal and skew multipoles, respectively. These names are often written as "normal/skew (2n+2)-pole," such as the "normal 2pole (normal dipole)," "skew 4-pole (skew quadrupole)," or "normal 6-pole (normal sextupole)." The 17 trolley measurements from a given azimuthal slice are transformed into the multipole basis defined by Eq. (6).
The fixed probe geometry for both the four-and sixprobe stations (see Fig. 6) are symmetric in a Cartesian coordinate system and are therefore parameterized as Cartesian field moments, which are analogous to the multipole moments. These Cartesian moments are the x and y derivatives of B y evaluated at x = y = 0. These moments are also normalized to r 0 in analogy with the multipole moments. The fixed probe measurements are used to make discrete estimates of the moments by calculating sums and differences of the measurements. Table I summarizes the moments m i in terms of the trolley multipole moments and the fixed probe Cartesian moments. Only six (four) moments can be calculated at a six-probe (four-probe) station as indicated in the Cartesian moment columns. Given the discrete positions of the fixed probes, it is possible to estimate the values of these moments at the center of the storage region in terms of the multipole strengths defined in Eq. (6), implying that the fixed probes can be used to track the lower-order moments up to m 6 in the time between the trolley maps. In practice, we only use the fixed probes to track the first five moments due to the high uncertainty associated with the sixth moment and its relative unimportance in the final result.

Analysis Flow
The first step in the magnetic-field analysis represented in Fig. 7 is the extraction of FID parameters such as the frequency, amplitude, and length from all NMR measurements, described in Sec. II A. Data quality cuts are applied on these extracted parameters to discard FID waveforms that correspond to instrument failures or severe field instabilities. A brief overview of these cuts is given in Sec. II B.
Throughout this section and the rest of this paper, we use the symbol δ to refer to systematic and statistical effects. The uses of these symbols represent both corrections and uncertainties from the effect in question.
In Eq. (4),ω p (T r ) is the average frequency that would be measured by a spherical water sample at the calibration reference temperature T r = 34.7°C in the same position as the detected muons. This shielded proton frequency is related to the calibration probe frequency ω cp through a set of corrections, denoted by δ cp (T r ) that account for the probe materials, effects due to sample shape and susceptibility, temperature, and other probe related effects: The determination of δ cp (T r ) is the absolute calibration step in Fig. 7 and was mainly performed in a dedicated calibration setup including a solenoid magnet as discussed in Sec. III. The calibration probe is then used to calibrate the trolley probes, detailed in Sec. IV. This step determines the relationship between each trolley probe n and the shielded proton frequency via a calibration constant Since the moments m i are linear combinations of trolley probe measurements ω tr n , we can generalize to Details of the trolley map analysis step are given in Sec. V. The fixed probe field moments m fp i are synchronized to the trolley field moments when the trolley passes each fixed probe station at a specific time t = 0. A first-order Taylor expansion of the trolley moments in terms of the fixed probe moment yields where the subscripts i and j indicate specific field moments. The Jacobian J ij (φ) = ∂m tr i (φ) ∂m fp j relates small changes in fixed probe moments to small changes in the trolley moments for each station (indicated by the φ dependence) and ho i (φ, t) represents the effects of higherorder moments that the fixed probes cannot track. Note that ho i (φ, 0) ≡ 0. Because ho i (φ, t) cannot be tracked due to the limited number of fixed probes in a station, we model it as a random walk and include its effect only as an uncertainty. The full procedure for synchronizing and tracking the field with the fixed probes is discussed in Sec. VI. We can rewrite Eq. (10) as Assuming that the trolley calibrations (δ tr n ) do not change over time, we can combine the fixed probe tracking, trolley maps, trolley calibration, and calibration probe corrections to: with the field moment index i. Note that in this equation, δ cp (T ) is absorbed into δ tr i through Eq. (9). These moments are then weighted by the muon distribution in space and time and averaged over time t and azimuth φ to determineω p (T r ), as described in Sec. VII.

Multiple Analysis Approaches
For several of the key analysis steps described above, the analysis was performed by at least two independent teams in order to provide important cross checks and test different algorithms against each other. Comparison of the parallel analyses often found a high degree of consistency. In cases where noticeable differences were identified, a detailed comparison of the approaches allowed us to develop and implement improved algorithms. Sections II-VII present the final analysis that led to the reported result for the measurement ofω p (T r ). Here, we highlight a few of the notable differences between the different trolley calibration and field tracking algorithms. The details associated with these differences will be explained in the analysis sections of the paper.

Muon-Weighted Field Map
Muon Distribution: Transients: δ kicker , δ ESQ FIG. 7: A flow chart of the field analysis showing the calibration chain through the data processing. The muon distribution is an input that is external to the field analysis, and is required to calculate the muon-weighted field average. Bold items show input measurements to the analysis. Not shown is the NMR frequency extraction step required for each of the field measurements.
Three individual analyzers performed the trolley calibration analysis (see Sec. IV) for our Run-1 data set with the following main differences: • One analysis used a zero-crossing counting method for the frequency extraction of the calibration probe, while the other two used the Hilbert transform method (see Sec. II A).
• The calibration analysis in Run-1 had to correct both the normal long-term drift of the magnetic field due to slow changes in the magnet and a field oscillation with an amplitude of about 20 ppb and a period of 2 min. The three analyzers chose different approaches for selecting and treating the fixed probe data used to correct the calibration and trolley probe measurements.
• The analysis needed to account for uncertainties associated with gradients in the magnetic field that coupled to the error in the relative positioning of the probes. The determination of local field gradients was based on polynomial fits to local maps, and each analyzer chose fits with different orders and ranges.
All cross-checks showed consistency between the three analyses at the 10-ppb level for the probe calibration offsets.
For synchronizing the trolley and fixed probes and the subsequent tracking (see Sec. VI), two independent analyses [47,48] were implemented with the following major differences: • Three fixed probe stations located in regions with large field gradients exhibited significantly more noise than typical. One analysis replaced the measurements from these stations with the average of the stations' nearest neighbors. The other analysis relied on long averaging times to improve resolutions.
• The trolley and fixed probes were read out at 2 and 0.7 Hz respectively and were not simultaneous. One analysis worked with these original asynchronous times while the second interpolated both to produce a time series at 1-s intervals.
• During synchronization between the trolley and a given fixed probe station, the fixed probe station was tied to a local azimuthal average of trolley measurements when the trolley was closest to that station. One analysis used about ± 2.5°of trolley measurements for each station, while the other analysis only used ± 1°with a secondary synchronization to take into account the unused parts of the trolley maps.
• While the trolley is near a fixed probe station, its magnetization distorts the local field measured by that station. This "trolley footprint" window is vetoed in the fixed probe data when the trolley is nearby. The analyses differed in the implementation of the veto window, the interpolation across the missing data, and the usage of other fixed probe stations to account for short-term field fluctuations.
A blind analysis comparison campaign focused on these differences to understand each choice's impact on the final results. The treatment of the poor-resolution stations was the dominant contribution to the difference. The two analyses differed by maximally 30 ppb over a field tracking time interval of about three days and only by 1.5 ppb after averaging over the entire tracking period.

A. NMR Frequency Extraction
The NMR technique generates FIDs, which are the signals measured in the probe coil due to the precessing magnetization across the sample. The finite size of the sample combined with a nonuniform magnetic field affects the evolution of the frequency and signal amplitude during the FID. Therefore, it is critical to develop algorithms that determine the relationship between the frequency evolution and B and to understand features associated with the observed signal that stem from the nonuniformities in the magnetic field. The following is a summary of frequency extraction and its related uncertainties. Further details can be found in [49].
In the first step of the data analysis, the frequency and other characteristics including the FID length and amplitude are extracted from the digitized waveforms of the calibration, fixed, and trolley probes. A typical FID signal is shown in Fig. 8. Two algorithms were used to analyze these signals: • For trolley and fixed probes, the main frequency extraction algorithm extracts the phase function To mitigate effects of a time-varying baseline, finite FID length, and sampling period, we apply timeand frequency-domain filters to the extraction of Φ(t).
• For the calibration probe, an alternative extraction of the phase function Φ(t) uses an iterative baseline subtraction and identification of zero-crossing times in the oscillatory FID signal, which correspond to a phase advance of π.
The initial frequency of the NMR signal, ω(t = 0), is related to the phase function by ω(0) = dΦ dt (0) [50]. A polynomial fit is used to extract ω(0), shown in Fig. 9. The truncation order (up to fifth order) and range of the fit (roughly 40% of the FID length 1 ) were chosen to optimize the combined statistical and systematic uncertainties. While a lower truncation order and longer fit range generally reduce the statistical uncertainty, the non-linear terms of Φ(t) increase the systematic uncertainty.
We developed the phase-template method for fixed and trolley probes, which reduces the effect from static, nonlinear terms by subtracting an initial phase template, Φ 0 (t) from each Φ(t). In the case of the trolley, only  Fig. 8. The blue points in the lower panel are the difference between Φ(t) and a linear fit Φ(t) lin to Φ(t). The black line is a polynominal fit to these residuals, the dotted part shows the extrapolation outside the fit range to t = 0. static effects extracted in an optimized field are subtracted by Φ 0 (t). The fixed probes generally observe small frequency changes due to temporal field changes; the non-linear terms in Φ(t) change less than the linear term dΦ(t) dt , measurement-to-measurement. The systematic and statistical effects related to the frequency extraction were extensively studied using simulated and real FIDs, real noise waveforms recorded in the magnetic field without initiating the NMR sequence, and waveforms recorded with the regular NMR sequence without the main magnetic field present. The following main uncertainties were identified: • The systematic fit uncertainty f is dependent on the frequency extraction algorithm and quantifies the difference between the fitted value and the true ω(0). It originates from approximating the phase function with a truncated polynomial or from artifacts of the applied filter.
• The intrinsic systematic uncertainty from the simulation i is the difference between the extracted ω(0) and the frequency ω 0 corresponding to the magnetic field at the center of the probe. This uncertainty is driven by the probe geometry and the magnetic-field inhomogeneity during the measurement and was independent of our choice of algorithm.
• The statistical uncertainty δω(0) is caused by the noise in the FID waveform. It is determined from the standard deviation of the fit values for several FIDs measured in the same magnetic field.
The determination of these uncertainties was performed for the calibration and trolley probes and will be reported in Secs. IV C 1 and V B 1, respectively. For the fixed probes, the systematic uncertainties are absorbed in the synchronization step with the trolley, and statistical uncertainties are negligible due to long averaging times.

B. Data Quality Control
In preparation for the determination ofω p (T r ) described in the following sections, data quality selection was performed to only include field measurements where the magnetic field changed slowly with respect to the measurement period. All analyses apply common data quality selections that fall into the following two categories: • Event Level Effects: Data quality flags were introduced at the individual FID level (see Appendix A 1) to identify intermittent measurement failures. These flags are based on the FID parameters; cut thresholds were determined based on identifying outliers from the distributions of these parameters over a short period.
• Global Effects: Several types of magnetic-field instabilities were identified over the course of Run-1.
The two main causes of these instabilities were sudden magnet coil movements that generated abrupt changes in the magnetic field and failures in the fixed probe electronics crates that drove erroneous changes in the feedback system (see Appendix A 2). Data analysis is vetoed for ±2 min around these easily identifiable abrupt changes. Dedicated studies showed that the field tracking outside the veto window is uncompromised.
The FID quality cuts are applied to only theω p (T r ) analysis and not the ω a analysis because omitting individual FIDs has negligible effects on the field tracking and the final determination of a µ . However, during periods with magnetic-field instabilities the field is not reliably tracked. Therefore, these periods must be excluded from the ω a analysis. Additional veto windows were applied to all analyses roughly every two hours during the 12-s-long transitions in the DAQ, during which no field data are recorded.

C. Run-1 Datasets
During the Run-1 data taking period, experimental conditions were varied in each of the pulsed high voltage systems, the ESQ and the fast kicker. The Run-1 data are grouped into four distinct subsets according to the ESQ and kicker high voltages as shown in Table II. For the analysis of ω a , periods with different set points are analyzed individually, and separate beam-dynamics corrections are applied [3]. The magnetic-field analysis produces a separate result for each of these data subsets in Sec. IX forω p (T r ).  II: Summary of the Run-1 data subsets. The different voltages on the beam-injection systems impact the ω a analysis, and the magnetic-field analysis is grouped accordingly.

III. THE CALIBRATION PROBE
To determine a µ as written in Eq. (4), a wellcharacterized NMR standard is required. For that purpose, the calibration probe with a cylindrical high-purity water sample was constructed. Its material perturbations were characterized so that its measured Larmor frequencies can be corrected to those expected of a shielded proton in a spherical water sample ω p (T r = 34.7°C) with high accuracy and precision. The local magnetic field is then obtained using Eq. (3). The calibration of this probe is transferred to each of the 17 trolley probes, compensating for the trolley probes' material effects and differences in diamagnetic shielding.

A. Systematic Effects
A set of corrections, described below, are required to relate the NMR frequencies measured by the calibration probe ω cp where δ T corrects for the temperature dependence of the diamagnetic shielding of H 2 O between the temperature T of the measurement and the chosen reference temperature T r = 34.7°C [38,51,52]; δ b is a correction dependent on water magnetic susceptibility and sample shape; and δ t is the sum of corrections for the probe materials and other effects related to the probe. The probe temperature T , typically close to 26°C, was measured to 0.5°C with a PT-1000 sensor installed in the probe near the sample. The correction δ t consists of several contributions: Here, δ s denotes the correction for effects due to the probe materials, the probe's angular orientation about its long axis, the pitch angle relative to the field axis, and the magnetic images it induces in the surrounding magnet's iron. We split this term into two parts δ s = δ s, intr + δ s, config . Here, δ s, intr corrects for the effects that are intrinsic to the probe and δ s, config corrects for the specific probe configuration when used in the experiment at Fermilab. The correction δ p is due to the water sample and the water sample holder and δ RD is the contribution from radiation damping [53], an effect where the NMR-induced signal in the radio frequency (RF) coil affects the proton spin precession. Finally, δ d is the proton dipolar field perturbation [54].

Intrinsic Effects
Intrinsic systematic effects in the calibration probe are terms that affect the probe's measured frequency independent of its environment. These corrections and uncertainties were measured at Argonne National Laboratory (ANL) in a dedicated magnetic resonance imaging (MRI) solenoid and include the bulk magnetization and several of the material perturbations.
A correction due to the bulk magnetic susceptibility δ b is required because the calibration probe uses a cylindrical water sample perpendicular to the field, not a spherical sample. The magnetization of the water molecules in one location of the sample perturbs the field at other locations, and the magnitude depends on the shape and volume susceptibility of the NMR sample. In SI units: where ε is the shape factor of the sample. For a sphere ε = 1/3 so the field perturbation from this effect would vanish, whereas ε = 1/2 for an infinite cylinder perpendicular to the field [55][56][57]. The recommended value for the volume magnetic susceptibility of water χ (H 2 O, T = 20°C) = −9.032 × 10 −6 was measured at temperature of T = 20°C [58]. A comparison with an additional measurement taken at an unknown temperature, χ (H 2 O) = −9.060(3) × 10 −6 [59] is used to estimate an uncertainty of 3 × 10 −8 . The measured, small, temperature dependence of the magnetic susceptibility [60] is used to determine the magnetic susceptibility of water at an experimental measurement temperature T .
The intrinsic probe correction δ s, intr was measured in the MRI magnet by removing the 5-mm-diameter cylindrical water sample and measuring the field shift caused by the remaining calibration probe materials, when a test probe was inserted inside the calibration probe. The dependence on the probe's roll and pitch 3 was measured.
For the estimation of δ p , ASTM type-1 water from different vendors was utilized, and degassed and nondegassed water samples were examined. A variety of additional tests were performed in which the glass water sample tube was rotated, and different sample tubes were used. No systematic shifts were observed within an uncertainty of 2 ppb. The δ RD term was estimated by varying the magnetization tip angle and detuning the probe's resonant circuit. No relevant effects larger than 3 ppb were observed, consistent with expectations [53]. The value for δ d is based on estimates for the specific probe geometry described in Sec. I B, and the effect is estimated to be less than 2.5 ppb [54].
The results for all of the terms described in this section are shown in Table III and δ s is evaluated for the configuration used at FNAL as described in the next section.

Configuration Effects: δ s, config
The configuration specific δ s, config accounts for four additional corrections, which arise when the calibration probe is used in the storage ring magnet at FNAL. First, new materials were added to support the probe whose field perturbation must be determined: an aluminum holder clamped around the probe, a long aluminum rod used to move the probe into the measurement region, and a new SMA connector and cable. The perturbations of the aluminum holder, SMA connector, and cable were measured in the MRI solenoid, and were consistent with expectations based on the volumes, distances from the NMR sample, and magnetic susceptibilities of the materials.
Second, when inserted between the iron magnet poles, magnetic images of the magnetized components of the probe perturb the field at the water sample. The image effects were measured in the MRI solenoid by observing the field perturbation from the calibration probe on a test probe located one image distance (18 cm) away, and were consistent with calculations. The total correction δ s including the probe, holder, and rod and their images was also measured directly in the storage volume, and was consistent with the measurements performed with the ANL solenoid. The effect of the rod could not be verified in the solenoid, but the measurement result in the storage ring magnet was consistent with expectations.
Third, when installed on the long rod, the long axis of the probe is not exactly perpendicular to the field so its pitch angle is nonzero. The probe angle with respect to the vertical field was measured using a camera and To extract the shielded-proton precession frequency from calibration probe measurements, we solve Eq. (14), applying all corrections.
With δ T (T r − T ) = −10.36 (30) ppb/°C × (T r − T ) and calibration probe temperatures of around 26°C, the typical value for this correction was δ T ≈ 90 ppb. These shielded-proton frequencies are then transferred to the trolley via a detailed calibration program, which we discuss in Sec. IV.

B. Cross Checks with Spherical Water Sample and 3 He
The difference between cylindrical and spherical samples was verified by comparing cylindrical calibration probe frequencies with those of the spherical sample probe used in the BNL E821 experiment [43]. The measurements were taken in the stable homogeneous field of an MRI magnet at 1.45 T at ANL. The measured difference 1514(15) ppb agrees with expectations from Eq. (16), with the uncertainty dominated by the asphericity of the BNL water sample. To account for the finite length of our water sample, a small correction of 0.02% was applied to the shape factor ε = 1/2 of an infinte cylinder [57].
As a cross check with considerably different systematics, a 3 He probe described in [44,61] was also compared with the BNL spherical water probe. After correcting the BNL probe to 25°C and for material effects, the ratio of 3 He to spherical probe frequencies was measured to be 0.761 786 139(29)(38 ppb). This result agrees with a previous measurement [62] of the ratio of frequencies from 3 He and water in a spherical sample, The cylindrical calibration probe was therefore calibrated to 3 He indirectly through the BNL spherical probe, effectively validating the calibration probe to 10(38) ppb.

IV. TROLLEY CALIBRATION
The field measured by each of the 17 trolley probes is a combination of the storage ring magnetic field and additional perturbations introduced by the NMR probes, their sample shape, and surrounding magnetized materials in the trolley. The trolley probe calibration procedure described in this section provides a set of offsets δ tr j (T r ) (see Eq. (8)), used to correct the measured frequency of probe j to the shielded proton frequency at T r = 34.7°C. The offsets are due primarily to differences in diamagnetic shielding of protons in water versus petroleum jelly, sample shape, and magnetic perturbations from magnetization of the materials used in the NMR probes and trolley body. This procedure allows the trolley frequency maps to be converted into maps of the magnetic field in the storage volume. The trolley calibration constants are extracted from the difference of trolley probe frequencies ω tr j and calibration probe measurements corrected to the shielded proton frequency ω p,j (T r ), with the two probes swapped into the same position. Remaining misalignments and magnetic footprints of the calibration probe on the trolley and vice versa during the actual calibration measurement lead to procedure specific corrections δ align j and δ fp j . The ω tr j in Eq. (8) have to be expressed in terms of the actual measured trolley frequencies ω tr, meas j via ω tr j = ω tr, meas The difference in trolley probe temperature between calibration and trolley field mapping is taken into account in the trolley map analysis (see Sec. V B). The trolley calibration constants are extracted as The calibration procedure described in Sec. IV A was performed for all 17 trolley probes. The full campaign took about two weeks to complete, meaning it was not feasible to repeat the procedure often. For the Run-1 analysis, the calibration campaign was performed during the FNAL accelerator summer shutdown following the production period. The calibration of the central probe was performed multiple times as a cross check. We have performed four calibration campaigns, associated with each annual running period, and preliminary analyses of the Run-2 and Run-3 calibration data show good consistency with the Run-1 results discussed here.

A. Calibration Procedure
Each trolley probe was calibrated with the following procedure: 1. The calibration probe (Sec. III) was mounted on a translation stage in the vacuum chamber. The translation stage allowed the calibration probe to be moved to each trolley probe position at a specific azimuthal location.
2. The SCC and a set of local azimuthal coils were used to impose known, large field gradients in the calibration region, allowing precision determination of the two probes' positions.
3. The field was shimmed locally with the SCC based on a local field map by the calibration probe.
4. The trolley and calibration probe were rapidly swapped back and forth into the same position. Several measurements were taken with each probe in this calibration position.
5. Nearby fixed probes tracked the magnetic-field drift during the calibration procedure.
To determine the probe's position, we imposed large gradients in all three directions using the SCC and azimuthal coils to colocate the calibration probe and the target trolley probe j. The difference of the field with and without these large gradients uniquely determined the probe position. This procedure allowed the position to be determined with a precision of typically 0.5 mm.
With the large external gradients turned off, remaining spatial field gradients in the storage region will couple to small position offsets between the probes. To minimize this systematic uncertainty, the field in the vicinity of a target trolley probe was mapped using the calibration probe and shimmed locally with the SCC and a set of azimuthal coils to reduce local field gradients to less than 30 nT/mm (21 ppb/mm). The calibration probe mapped the residual field gradients so we could correct any errors from the remaining misalignment between the probes.
The magnetic field in the muon storage region drifts over time. We used the power supply feedback to suppress this drift and monitored the remaining magneticfield drift using the fixed probes. Repeated "rapid swaps" between the trolley and the calibration probe help mitigate the effects of long-term drifts in "ABA"-style measurements [63]. Measurements were taken with the trolley at the calibration location for 30 s, then the trolley was retracted upstream azimuthally by ≈ 4° 50 cm. The calibration probe was then moved into the calibration location and we took measurements for 30 s. We repeated this sequence at least 4 times per probe and up to 10 times for some probes.

B. Analysis
To extract δ tr j for a trolley probe j via Eq. (8), the data taken during the rapid swapping are analyzed as discussed in Sec. IV B 1. Since both probes cannot be placed exactly at the same position when they are moved into the measurement position, the analysis must also account for the small, relative position misalignments of the trolley probe j and the calibration probe. This analysis is described in Sec. IV B 2.

Rapid Swapping Analysis
From the ABA. . . series of measurements, the A and B measurements are interpolated to common times, which allows us to correct for linear drifts that occured while the two probes were being swapped. In these measurements, the drift rate was up to 100 ppb/h. During Run-1, we observed an oscillation in the magnetic field with an amplitude of 10 ppb to 20 ppb and a period of 2 min, which is shorter than the measurement and swapping periods of ∼10 min. Therefore, the ABA method does not remove this oscillation. However, the oscillation is not a localized effect in the calibration region but coherent around the entire ring and it can be removed using data from the fixed probes. The shape of the oscillation is shown in Fig. 10, where the slow field drift has already been corrected. Table IV shows the statistical uncertainty from this procedure for all trolley probes. method. The drift-corrected differences are called ∆ω tr j,q , where q ranges over x, y, and φ and j indicates the probe number. The transverse gradients were fitted across the 17 trolley probes. For the azimuthal gradient, the trolley was moved azimuthally through the calibration region in ≈ 0.5 cm steps.

FIG. 11: ∆ω tr
j,x (left) and ∆ω tr j,y (right) measured by the trolley. The graphs were fitted to a two-dimensional polynomial to extract the large imposed field gradient. These gradients are used to uniquely identify a probe's location in the xy plane. Figure 11 shows the field gradients used to locate each trolley probe in the x and y directions. The combination of the two uniquely determines each probe's xy position. This uniqueness can be extended to xyz by including the azimuthal gradient measurement. From these measurements, we obtain the strength of the imposed gradients ∂ω grad q ∂q . The calibration probe was moved in the field with the same imposed gradient to find the location where its ∆ω cp,q values matched the trolley's ∆ω tr j,q . In practice, the calibration probe's position was iterated until |∆ω cp,q − ∆ω tr j,q |/2π ≤ 20 Hz (324 ppb) for x and y directions and ≤ 5 Hz (81 ppb) for the φ direction, cor-responding to a position alignment better than 0.5 mm. The remaining difference determines the two probes' misalignment s q . Using the measured gradients, the misalignment in each direction can be extracted via: Prior to the rapid swapping, the local field inhomogeneities around each trolley probe's position were mapped with the calibration probe. Additional imposed fields generated with the SCC and the azimuthal coils reduced the local gradients to less than 21 ppb/mm (30 nT/mm). The calibration probe was used to map the residual local shimmed field ω local . The misalignment between the target trolley probe and the calibration probe together with the local gradients created an error that is corrected since we measure both the misalignment and gradient. The misalignment correction is then To minimize the time between the rapid swaps, the measurements of ∆ω cp,q and ∆ω tr j,q were only performed prior to the first swap. While the calibration probe can be placed into the same position repeatedly with a precision of < 0.1 mm, the trolley positioning during the rapid swapping was based on the less precise encoder readings. This results in position variations of O(1 mm). To correct for this position variation, the more precise bar code position was used offline to determine an additional azimuthal position offset δ tr j,s , for each placement of the trolley during the swap s in the sequence. This leads to a modification of Eq. (18) for q = φ:

C. Systematic Effects
Multiple systematic uncertainties arise from the trolley calibration procedure. They comprise a statistical component from the rapid swapping in ω p,j (T r ) − ω tr j and systematic uncertainties arising from the analysis of the FIDs, from the misalignment, and the remaining magnetic footprints of the probes.

Frequency Extraction Uncertainty
The calibration constants are based on a zero-crossing algorithm for the frequency extraction of the calibration probe and the Hilbert transform algorithm for the trolley. The systematic fit uncertainty ( f ) and the intrinsic systematic uncertainty ( i ) (see Sec. II A) are estimated based on simulated FIDs. The large gradients required to colocate the probes produce large field nonuniformities over the probe samples. Thus systematic effects from frequency extraction are larger for these measurements than in the well-shimmed field during the rapid swapping. The full calibration procedure was compared with an independent analysis utilizing the Hilbert transform for the calibration probe frequency extraction. The results agreed within the stated uncertainties. with the SCC and the azimuthal coils. These large gradients degrade the field uniformity and result in larger systematic effects from FID frequency extraction. However, the same gradients in the denominator of Eqs. (18) and (19) suppress the effect of the frequency uncertainty on the actual misalignment, leading to a misalignment uncertainty of less than 0.4 mm. A set of local measurements of the shimmed field ω local in the vicinity of the probe's location is used to evaluate the local gradient ∇ω local at the actual position of the probe. A lack of knowledge of higher-order and crossterm derivatives in this local field map causes systematic effects in this evaluation. The residual field was only measured at two positions along some directions for some probes, hence not constraining second-and higher-order gradients along this axis. For those probes and directions, the largest observed gradient is used to estimate an upper limit for the uncertainty of 3 ppb/mm, which then couples to the misalignments s x j and s y j . The azimuthal direction was not mapped for all probes. The observed variations in gradient of up to 22 ppb/mm are used as an uncertainty, which couples to the azimuthal misalignment s φ j . The resulting uncertainties range of 0 ppb to 13 ppb.
No second-order cross-terms (e.g., ∂ 2 ω ∂x∂y ) were explicitly measured. They are estimated from quadratic terms measured along the x and y directions. The cross terms are assumed to be smaller than two times the largest quadratic derivative along the x and y axes ( ∂ 2 ∂x 2 , ∂ 2 ∂y 2 ). The largest uncertainty generated by the cross term is cross = 12 ppb/mm 2 , leading to an uncertainty of cross ∆q i ∆q j for i = j in a range of 0 to 8 ppb.

Trolley and Calibration Probe Magnetic Footprints
During the calibration probe measurements in the rapid swapping procedure the trolley was azimuthally retracted by ∼ 4°. The calibration probe was used to measure the remaining magnetic footprint of the trolley in situ as a function of relative trolley position in a range from 3°to 100°. No perturbations are observed for relative distances larger than ∼ 25°. The probe-independent correction due to the perturbation from the magnetic footprint of the trolley retracted by ∼ 4°is δ f p,tr = 40 (8) ppb.
During the trolley measurements the calibration probe is retracted radially inwards. The material of the probe itself and its aluminum fixture perturb the field at the location of the trolley probes slightly. The size of the resulting corrections δ fp, cp j ranges from 2 to 7 ppb depending on the trolley probe location and the uncertainties were in the range of 1 to 6 ppb. Table IV lists the associated uncertainties of the total footprint correction δ fp j = δ fp, tr j − δ fp, cp j for all trolley probes.

D. Results
The final calibration coefficients δ tr j (T r ) were determined via Eq. (17) and are shown Table IV along with the statistical and systematic uncertainties described above. The total uncertainty also includes the uncertainty of 15 ppb from the corrections to ω p,j (34.7°C) from Table III.
While most probes have total uncertainties of about 20 to 30 ppb, a few of the probes on the outer circle have total uncertainties as large as 48 ppb, which is driven by large field nonuniformities for probes located nearest to the trolley rails and the iron pole pieces. Many measurements of the field gradient at the outer probes were performed after the main calibration campaign to determine the misalignment, and the drift of the azimuthal gradient contributes significantly to the systematic uncertainty.

V. TROLLEY FIELD MAPPING
The determination ofω p (T r ) requires precision measurement of the field in the region in which the muons are stored. However, continuous field measurements with NMR in the storage region would physically interfere with the muons. The trolley provides detailed frequency maps over the entire storage region. We determined the azimuthally averaged field with a precision of 30 ppb. Critically, the trolley is also retracted from the storage region during muon injection periods. While mapping, the set of probes in the fixed probe station are synchronized to the trolley probes. Trolley runs take about four hours in total to execute and are performed approximately every three days to minimize interruptions to muon data taking. The fixed probes continuously track field drifts between the trolley runs. Therefore, we have occasional precise measurements of the field in the storage volume that are interpolated with continuous, less precise measurements. This section covers the analysis of the trolley frequency maps and the corresponding systematic corrections and uncertainties. The relationship between the trolley map and the fixed probe measurements is discussed in Sec. VI. The trolley moment maps m tr i (φ, t = 0) in Eq. (13) are extracted from the frequency maps ω tr j (φ, 0) that are directly measured in the continuous trolley runs by the 17 probes (index j). Note that the part of a trolley run, that generates the baseline trolley maps, takes about an hour. Therefore, calling a trolley run time t = 0 is a notational convenience. The finite duration of the trolley run is taken into account in Sec. VI. Figure 12 shows the results from a typical trolley run. The top panel shows the raw, relative frequency (ω tr j (φ, 0) − ω tr j )/ ω tr j for the central probe (j = 1), where ω tr j is the azimuthal average frequency of that probe. The bottom three plots show the extracted multipole moments m tr i (φ, 0) for the dipole (i = 1), normal quadrupole (i = 2), and skew quadrupole (i = 3), normalized to the dipole moment.
The frequency maps are an integral part of the magnetic field tracking described in Sec. VI. Specifically, they provide precise baseline measurements of the field, which are interpolated using the fixed probes. The trolley maps are averaged over 5°of azimuth into 72 bins  • δ multipole i : field variations that are not described by the moments in Table V, • δ config i : differences in the experiment configuration during a trolley run from nominal muon storage conditions.
The uncertainties associated with the field maps in Run-1 are treated conservatively and combined as correlated uncertainties. The following sections discuss these systematics in more depth. An overview of their numerical values for both the correction and associated uncertainty is given in Table VI. . The systematic contribution is evaluated based on FID simulation, taking into account the local field shape around the azimuth φ as described in Sec. II A. Systematic stop-and-go trolley runs collect frequency data while the trolley is stationary before being moved to the next position. These measurements are free of motion effects described below and are used to extract the probes' statistical resolution. The resulting uncertainties are statistically independent for each field map but sampled from the same underlying distribution. The probe resolution is extracted from the variance of measurements taken over 5 s while the trolley is stationary; the field drift is negligible on this timescale.      The trolley rails have shape distortions with respect to their design curvature and limitations on the precision of their placement inside the vacuum chambers. Extensive rail surveillance data were collected prior to installation using laser tracking, and additional trolley motion verification was performed during installation. The vertical and radial offsets of the rails and their corresponding roll of the trolley are shown in Fig. 15. These data are analyzed to determine the trolley probes' vertical and radial displacements and any roll movement during trolley motion.
The multipole moment extraction is performed without accounting for the positional distortions. By repeating the multipole fits with slightly different probe positions determined by including linearly interpolated displacement information at each azimuthal location, systematic uncertainties are determined for the azimuthallyaveraged dipole (12 ppb), normal quadrupole (27 ppb etched into the vacuum chambers. The bar code reader is equipped with two sensor groups that are 12 cm apart and record the same bar code patterns with a small time delay. In the Run-1 analysis, only one group is used to determine the azimuthal position, resolving about 80% of the full azimuth. For the remaining 20%, the position information is determined using less precise rotary encoders installed in the cable winding mechanism. The differences between reconstructed bar code positions for the two sensor groups determines the precision of the bar code reader to be 0.2 mm. Because there are small gaps between adjacent vacuum chambers and some regions that rely on the encoders, a conservative overall position resolution of 2 mm is used. A random variation of the azimuthal trolley positions with a 2-mm-wide Gaussian distribution is used to estimate a systematic uncertainty of 4 ppb on the average dipole field. 4. Temperature Correction: δ temp i The temperature of the trolley probes increases during operation due to the trolley's electronics' power dissipation. The precession frequency produced by these NMR probes has a temperature dependency of 0(5) ppb/°C which was measured with a dedicated setup in the stable and homogeneous solenoid at ANL. Because the trolley temperature during the field mapping runs differed from the temperature during the trolley calibration, a run-specific uncertainty δ temp i (T run ) is applied. The mean temperatures of all trolley runs, linearly interpolated and weighted by the corresponding number of decay muons, are grouped into data subsets shown in Table VII. The temperature also varies during the one-hour duration of a trolley run and adds an additional uncertainty. Temperature changes on the order of 1.59°C to 1.70°C are observed during the trolley runs. This corresponds to assigned systematic uncertainty δ temp i (∆T ) of 4 ppb. The data-subset-specific systematic uncertainty from the temperature is the sum of these two parts: Other systematic effects include those that arise from the experiment's different configuration during field mapping compared to muon data taking. The configuration differences during the trolley measurement generate three systematic contributions from (1) the change in the configuration of the garage, (2) the change in the orientation of the beam collimators, and (3) an electrical ground loop. All of these effects are constant for all trolley runs. An additional systematic is caused because the truncated moment expansion does not completely describe the magnetic field. The trolley is unable to measure higher-order moments accurately, leading to an uncertainty δ multipoles i . A 3D fit framework has been developed in [64] to describe the field maps in toroidal harmonics that obey the Laplace equation. Their framework was also used in Muon g-2 to study the influence of field components not captured by the used multipoles.
The trolley was moved radially in and out of the storage region by a sliding rail section and only measured the magnetic field when this segment of the rails was inserted. However, the segment of the rails was retracted during muon injection. The magnetization of this rail section changed the magnetic field during the trolley measurement in a way that the muons do not experience. A similar systematic effect is caused by three copper collima-tors 4 . The collimators are retracted during field mapping measurements to prevent interference with the trolley's motion, but inserted during muon injection.
Corrections and uncertainties are determined for both the garage and collimator effects by modeling their magnetization and estimating the two configurations' differences. Additionally, the effect from the garage was measured by the fixed probe system. The systematic effects are −5(22) ppb for the garage and less than 1(1) ppb for the collimators.
Over a small azimuthal extent of ≈ 5°, the trolley shell makes contact with the grounded kicker plates. This provides an additional ground path for the return current of the trolley power, which normally flows through the coaxial cable connected to the trolley. The imbalance in current paths generates a small magnetic field and affects the trolley probes and all fixed probe stations between the trolley and the end of the coaxial cable at the trolley drive. Dedicated measurements that broke the ground loop showed systematic shifts for the azimuthallyaveraged dipole (−2 ppb), normal quadrupole (−2 ppb), and skew quadrupole (3 ppb). The electrical contact causing the ground loop effect has since been corrected for future datasets.

VI. MAGNETIC FIELD TRACKING
Changes ofω p between trolley map measurements are predominantly due to changes of the magnetization and geometry of the magnet's ferromagnetic components and may include hysteresis. We trackω p with the 72 fixed probe stations, each containing four or six probes mounted outside the vacuum chambers (see Fig. 6). The procedure of synchronizing the fixed probes during the trolley run and tracking certain moments accounts for the changes ofω p during muon storage, up to uncertainties that are discussed in Sec. VI B 3.
The tracking procedure incorporates the following main steps, which will be described in more detail in Secs. VI A and VI B: 1. After the application of all data quality cuts (see Sec. II B) and the trolley probe calibration offsets, all NMR measurements obtained from the trolley mapping and fixed probes are converted into 2D moments according to the prescription in Sec. I D 1.
2. Because the magnetization of the trolley's materials and eddy currents in its shell distort a fixed probe station's local field, algorithms are applied to remove this magnetic footprint from the fixed probe measurements.  3. The four or five moments tracked at each four-or six-probe station shown in Table I are synchronized to the moments measured by the trolley during a trolley run using a Jacobian described below (and in Appendix B).
4. The field's evolution is interpolated by tracking the changes in the fixed probe measurements from the baseline measured during a trolley run m tr s (0).

5.
Corrections are added to the interpolated field map for systematic sources such as temperature variations, magnetic configuration changes, trolley systematic effects, and fast field transients.
The tracking procedure combined with the calibration probe corrections from Sec. III provide the field moments , where φ k refers to the azimuthal locations of the kth fixed probe station. As a reminder, m tr i (φ, t) and m fp j (φ, t) denote the ith multipole (trolley) and jth Cartesian (fixed probe) moment, respectively. Additionally, m tr (φ, t) and m fp (φ, t) denote vectors in the vector space of moments in a slice of azimuth φ and time t. These vectors are, in principle, elements of R 17 (trolley), R 6 (six-probe stations), or R 4 (four-probe stations). However, in practice, we truncate the trolley and six-probe stations to only R 9 and R 5 due to the large uncertainties in the tracking of the higher-order moments. The effect of this truncation is negligible because the influence of the higher-order moments on the average magnetic field is suppressed when the field is weighted by the muon distribution, discussed in Sec. VII.
For a specific station s at φ = φ s , the field moments are m tr s (t) = m tr (φ s , t) and m fp s (t) = m fp (φ s , t). In practice, m tr s (0) is averaged over ∼ 5°of azimuth and m fp s (0) is averaged over the amount of time it takes the trolley to traverse that azimuth, about 40 s. With this notation and neglecting the untrackable higher order moments ho s (t) for now, Eq. (10) from Sec. I D 2 becomes m tr where t = 0 is the synchronization time during the trolley run for that particular station. J s is the Jacobian with elements J s, ij = ∂m tr i (φ s ) ∂m fp j (φ s ) . The Jacobian matrix is 9 × 5 for the six-probe stations and 9 × 4 for the four-probe stations. Because the fixed probes can only track lowerorder moments, J s, ij = 0 for i ≥ 6 (i ≥ 5 for the fourprobe stations). For moments that are measurable by the trolley but not the six-probe stations, we linearly interpolate between the two trolley runs. The moment m 5 , which can be tracked by a six-probe station but not a four-probe station, is estimated in four-probe stations to be the average of m 5 from the nearest neighbors (which are always six-probe stations). This approximation is mathematically equivalent to increasing the weight of sixprobe stations that neighbor four-probe stations.
When considering the azimuthal average over the full storage ring, we sum over the stations weighted by their azimuthal spacing W s = ∆φ s /2π, Equation (21) has four quantities of interest: m tr s (0), m fp s (0), m fp s (t), and the Jacobian matrix J s . The baseline measurements m tr s (0) and m fp s (0) for each fixed probe station are measured simultaneously during a trolley run. Trolley measurements are grouped according to the closest fixed probe station (∼ ±2.5°around a fixed probe station), establishing t = 0 for each station and synchronizing the two sets of probes. From the fixed probe stations' measurements, m fp s (t) is calculated for times between the two trolley runs. The Jacobian matrix is determined analytically from each fixed probe station's geometry. Details of the explicit Jacobians for the general six-and four-probe stations and some stations with special geometry are given in Appendix B.

A. Tracking Analysis
The tracking analysis has five primary steps outlined above. This section addresses the first four, which are needed as inputs to Eq. (20). The final step is to determine systematic corrections and uncertainties and is covered in detail in Sec. VI B.

Data Preparation
Before beginning the tracking analysis, the data quality selection described in Sec. II B is performed. Then, the trolley calibration offsets described in Sec. IV are added to the frequency measurements from the trolley as shown in Eq. (7). The trolley and fixed probe NMR measurements are converted into the multipole moment and the Cartesian moment bases, respectively. During trolley runs, there are ≈9000 sets of moments for the trolley and each of the 72 fixed probe stations; during the muon production runs, there are 72 sets of moments every 1.4 s between each pair of trolley runs.

Trolley Footprint Replacement
As the trolley is pulled past fixed probe station s, the trolley's magnetization and eddy currents in its shell perturb the field at the location of the station's probes. This perturbation, the "trolley footprint", needs to be removed from the fixed probe data before performing the time averaging of the station moments to calculate m fp s (0). All measurements from the fixed probes are vetoed during the time when the trolley was close enough to influence the station measurably (±12.5°of azimuth about the fixed probe location, approximately 200 s). The vetoed data are replaced by an estimate of the fixed probe moments' unperturbed values. We use data from outside the veto window when the trolley is sufficiently far away not to perturb the measurements and interpolate over the vetoed data points. The interpolating function is a model of the local drift of the station during the veto window. The local model is a fifth order polynomial fit to the unperturbed data from the station. It is corrected with data measured over the rest of the ring to account for global field transients that would otherwise be missed in the veto region. An example of a footprint replacement for one of the fixed probe stations is shown in Fig. 16. A subset of the interpolated points are used to calculate the fixed probe baseline moments m fp s (0).

Synchronization and Tracking
In the synchronization step, we find the trolley and fixed probe baseline (t = 0) moments m tr s (0) and m fp s (0) in Eq. (20) for each of the 72 fixed probe stations. The trolley measurements closest to each station, ∼ 5°per station, are averaged with a weight determined by the azimuthal step-size of each trolley measurement. These azimuthal averages are the baseline trolley moments m tr s (0) for that station. During the time interval when the trolley is closest to the station, the footprint-corrected fixed probe measurements are averaged over time to calculate the baseline fixed probe moments m fp s (0). Equation (20) can be rearranged to group baseline terms together m tr In this form, c s (0) is a synchronization constant for station s, measured entirely during the trolley run. During Run-1, there was one production trolley pair that only had a trolley one before the period due to magnet issues preventing us from bookending the period. However, trolley runs bookend most production data sets, so two synchronization constants can be calculated for those data sets, one from each adjacent trolley run. In general the two values are not equal, implying that the synchronization drifted over the course of the production period. This effect is the "tracking error." Because the goal is to track the field between one trolley run at time t = 0 and the next at t = T , we replace c s in Eq. (22) with a time-dependent form c s (t). With no additional information about this term between times t = 0 and t = T , we express c s (t) as a linear interpolation from c s (0) to c s (T ). The time-dependent synchronization is where ∆ s (t) is the non-linear component of the drift of moments that the fixed probes cannot track, which leads to the tracking error. This term is the leading source of uncertainty in the field tracking analysis. The process described in Eq. (23) is called "backward interpolation" because it involves correcting for drift from the first ("forward") synchronization by interpolating backward in time from the second (see Fig. 17 for an example of the effect). Long stationary trolley runs to measure the tracking error rate suggest that it follows the statistics of a random walk with known initial and final constraints; we approximate ∆ s (t) as a Brownian bridge [65]. The  Figure 18 shows the results of the tracking analysis over all four major data subsets in Run-1. The dipole and the normal quadrupole are each averaged over azimuth and shown as a function of time. The dipole trend generally behaves smoothly and the drift is understood to be caused by the selection of probes used in the stabilizing power supply feedback algorithm. The normal quadrupole term is sensitive to temperature variations and exhibits a diurnal structure in addition to slow drifts. The moments are used as inputs in the muon weighting in Sec.VII.

B. Systematic Effects
The systematic uncertainties are presented by the term they enter in Eq. (20). The shown values of the corrections and uncertainties are for the azimuthally and timeaveraged field (the averaging procedure is discussed in Sec. VII). The trolley baseline systematics are discussed in Sec. V B and shown in Table VI (20). The trolley baseline systematics can be found in Table VI. and fixed probe run systematic uncertainties refer to uncertainties on the relevant terms in Eq. (20). An overview of their numerical values for both the correction and associated uncertainty is given in The fixed probe baseline systematic is driven by the trolley footprint replacement and short (∼1 h) averaging times of the fixed probe noise during the trolley run. We estimate these effects by implementing the same footprint-replacement algorithm used during the trolley run on fixed probe data in which the trolley is not present. The fixed probe baseline calculated from the replacement data can then be directly compared to a baseline calculated from the measured value. This process can be repeated for all the fixed probe stations and all moments over many sample data sets. The resulting uncertainty is 8 ppb.

Fixed Probe Run Systematic Effects: m fp s (t)
The primary source of uncertainty on the fixed probe measurement is caused by the measurement noise on the fixed probes. Here, noise is defined as the standard deviation of a measurement over times short enough for field drift to be negligible. Despite some fixed probes being quite noisy from measurement to measurement, over very long averaging times (3 days) the contribution to the uncertainty on the azimuthal average is reduced to under 1 ppb.

Tracking Error Systematic Effects: ∆s(t)
The dominant source of uncertainty in the field tracking comes from the tracking error between the trolley and fixed probes, discussed in Sec. VI A 3. This drift is parameterized by the difference in the synchronization constants c s from Eq. (22) between trolley runs, c s (T )−c s (0) and is modeled as a Brownian bridge. Its uncertainty is derived analytically, using the equations for the variance and covariance of points in a Brownian bridge process [65]. One time period during Run-1d did not have a trolley run after the muon data period due to the magnet's safety monitoring systems triggering a ramp down, so the tracking error for that period is instead modeled as a random walk. Because each trolley baseline is corrected for temperature (see Sec. V B 4), this model also accounts for temperature drift in the fixed probes that influence their frequency measurements.
To average N measurements x with normalized weights a, we need to know the N ×N covariance matrix Σ. Then the average of the measurements is a·x, and the variance of the average is a · Σ · a. In our case, the weights a are related to the number of muons in the storage ring at a given time (described in detail in Sec. VII). The expectation value of a random walk or Brownian bridge is zero, so there is no correction associated with the tracking error. However, the variance of either process is not zero. For a Brownian bridge between times 0 and T , the covariance between any two times during the process t 1 ≤ t 2 is where M parametrizes the rate of the process. The value peaks at t 1 = t 2 = T /2, showing that the variance of the Brownian bridge is largest in the middle of the process and decreases to zero at either bound. We use this functional form to construct the covariance matrix for all the measurements between adjacent trolley runs, and then use that matrix to calculate the variance on the average  of the measurements described above; the tracking error uncertainty is the square root of the variance on the average. The same process is repeated for the unbookended data period, except the drift is modeled as a random walk instead of a Brownian bridge. The covariance of a random walk is for t 1 ≤ t 2 and the same M as above. The variance during a random walk increases linearly in time.
To use either Eq. (24) or (25), we must have an estimate of the parameter M . As alluded to above, M is estimated by considering the differences c s (T ) − c s (0) for each trolley run pair. These differences for each of the 72 × 9 station-(trolley) moment combinations can be interpreted as sampling the random walk space and can be normalized by the square root of the time between the measurement for each trolley pair, which varies from 54 to 88 h. For each station-moment combination, the RMS of the normalized samples is taken as an estimate of the random walk rate. The azimuthal average of the random walk rate is calculated for each moment, taking into account correlations between adjacent stations using an autocorrelation function of the differences c s (t = T ) − c s (t = 0) over s. It is then used in the equations above to calculate the covariance matrix Σ.
Any two separate random walks (or Brownian bridges) are uncorrelated with each other. When we average multiple trolley pairs within each data subset, the tracking error uncertainties become smaller. The more trolley pairs averaged in a single data subset, the lower the uncertainty will be for that subset. Therefore, despite the uncertainty being ∼40 ppb for a single trolley pair (or 73 ppb for the period with no closing trolley run), the uncertainties for the four data subsets are significantly lower, 22 to 43 ppb. The values of the synchronization uncertainty for each subset are shown in Table IX.

VII. THE MUON-WEIGHTED MAGNETIC FIELD
The average magnetic field experienced by the muons as they precess in the storage ring is expressed in terms ofω p (see Eq. (3)). It is determined by weighting the frequency maps with the muon distribution and averaging over space and time. The quantities needed for this FIG. 19: A typical example of the muon distribution measured by the trackers after integrating for several hours. This distribution is used to weight the field map.
determination are the muon distribution as a function of space and time, ρ µ (r, y, φ, t) and calibrated, interpolated frequency maps ω p (r, y, φ, t) that represent the field in the ryφ basis (see Fig. 3). Over a time interval [0, T ], with a muon distribution bounded radially and vertically, the resulting muon-weighted magnetic field, expressed in terms of the shielded proton precession frequency is,

A. Time Averaging
Before evaluating the integral over t in Eq. (26), we consider the relevant timescales involved. The storage time of a muon injection (the intrafill time) is on the order of hundreds of microseconds and is considered in-depth in Appendix C. On the submillisecond timescale, the magnetic field can be considered constant (see Sec. VIII for small corrections to this assumption). On the timescale of tens of seconds, the magnetic field drifts, but the muons' spatial distribution remains constant, except for fluctuations in the total number of muon decays detected. The calorimeter data acquisition produces data binned on this timescale, allowing us to track the number of muon decays detected. On the timescale of hours, the trackers sum the muons' spatial distribution information, generating distributions such as the one shown in Fig. 19. On the timescale of days, driven by the time between trolley runs, we produce a value forω p for each trolley pair, and then combine the results from multiple trolley pairs into four data subsets, Run-1a-d. These timescales are summarized in Table X Each trolley run pair is broken down into the same time bins as the tracker data. These bins, indicated by index q, span the time intervals bounded by s q ≤ t ≤ u q , where u q −s q ≈ 3 h. Equation (26) is evaluated assuming that the muons' spatial distribution is constant, but the overall number varies. Essentially, ρ µ is factored into a time-dependent and a time-independent part, ρ µ (r, y, φ, t) = N (t)σ µ (r, y, φ).
The time-averaged field for each time bin q is the average of the field weighted by the number of muon decays detected in that bin, where the subscript q indicates the average of the quantity in bin q.
The decay positrons detected in the calorimeter are used as a proxy measurement for the number of muons in the storage region N (t). These data are available in the intermediate time bins (approximately 10 s) and are integrated for each tracker bin q. Figure 20 shows a typical detected muon decay time series and the dipole field over a 60-h time interval.
Using Eqs. (27) and (   The six relevant timescales used in the muon-weighted averaging and magnetic-field analysis. Each time scale is averaged over and then binned into the next highest scale. This procedure is repeated up to the data set level. Note that σ µ q is the density determined by the trackers and beam dynamics, and the finest binning we have for the muon distribution. The muon distribution is reconstructed from tracker profiles and propagated to other azimuthal locations using beam dynamics simulations. After the three spatial integrals in Eq. (29) are evaluated for each of the tracker bins q (see next Sec. VII B), the resulting set ofω p,q are averaged together, weighted by the total number of detected positrons in each bin, to determineω p over the trolley run pair interval [0, T ],

B. Spatial Averaging
The spatial averaging procedure described here is performed for each time bin q described above. The result of the spatial averaging isω p,q for each time bin, used as input for Eq. (30). The azimuthal part of the integral is broken down into azimuthal bins, indexed by j, set by the spacing between the fixed probe stations. Bin j is defined by bounds η j ≤ φ ≤ ψ j with ψ j − η j ≈ 2π/72 rad. We average the muon distribution within each azimuthal bin and use that average value σ µ q,j (r, y) for all positions in the bin, so the azimuthal portion of the spatial integral is with ω p,q,j (r, y) = 1 is the frequency map azimuthally averaged over a given fixed probe station. As before, the subscript j indicates that the quantity has been averaged over azimuthal bin j (and the subscript q continues to mean the quantity is averaged over time bin q). The azimuthal average in these bins is the natural product of the field tracking described in Sec. VI. The full azimuthal integral is then just the sum over j for all 72 stations, weighted by each station's azimuthal extent 2π . The two-dimensional integral of r and y is also performed per azimuthal bin. Assuming that the muon distribution is independent of azimuth within a bin j, the integral can be writteñ ω p,q,j = r2 r1 dr y0 −y0 dy rσ µ q,j (r, y)ω p,q,j (r, y) r2 r1 dr y0 −y0 dy rσ µ q,j (r, y) .
The magnetic field is parametrized with moments, discussed in Sec. I D 1, so the field ω p,q,j (r, y) can be written where the functions f i (r, y) encode the spatial dependence of the moments, i, in Eq. (6) (shown explicitly in Table I) with These k parameters are calculated for each azimuthal bin j in each time bin q. The values in the time and azimuthal bins are combined as described above, yielding the value ofω p for the full trolley run pair. The average field experienced by the muons in a given dataset is where the index i is summed over all moments and the brackets indicate the quantity is averaged over the time bins q and azimuthal bins j. The averaging is performed as prescribed in Eq. (30). Sample values of the k i parameters (averaged over all bins) are shown in Fig. 21. Note that k 1 = 1 analytically.
FIG . 21: The amplitudes of the muon beam moments k i decrease as i increases. The moments with positive (negative) amplitudes are shown in dark (light). This decrease implies that the effect of higher-order moments on the average field is suppressed by the muon distribution. The muon distribution can be thought of as a low-pass filter on the moments of the field. The vertical line show the truncation order. All moments (and beam parameters) to the right of the vertical line are truncated. Table XI shows the corrections and uncertainties related to the muon beam distribution. Because the field is highly uniform,ω p is dominated by the dipole field contribution. The corresponding uncertainties, δω p can be grouped into terms that include uncertainties in the field moment (k i δm i ) and terms that include uncertainties in the muon beam moments (m i δk i ). The beam and field moments are uncorrelated and thus no cross terms contribute to the overall uncertainty forω p .

Contribution Correction [ppb] Uncertainty [ppb]
Uncorrelated Uncertainties The systematic effects from the field moment uncer-tainties have been described in detail in the previous sections on the frequency extraction (Sec. II A), probe calibration (Secs. III and IV B), trolley measurements (Sec. V), and the magnetic field tracking (Sec. VI). When weighted by the muon distribution, terms correlated across measurements contribute 50-55 ppb per data subset. Additional terms are uncorrelated for each trolley pair and generate contributions between 22-43 ppb for the four Run-1 data subsets. These results are collected in the final uncertainty table in Sec. IX. The remaining systematic effects from the muon distribution uncertainties δk i are due to the uncertainty in the muon decay position reconstruction from the trackers and the uncertainty from beam dynamics simulations used to propagate the tracker profiles to other azimuthal locations. The general process for estimating these systematic uncertainties is to introduce reasonable perturbations to the distributions before calculating the k i . The resulting variation of the beam parameters is used to estimate the uncertainty on the muon weighting.

Muon Tracker Systematics: δ tracker
The trackers used to measure the muon distribution are affected by several sources of uncertainty estimated by simulation, including misalignment of the physical devices, their resolution, and their spatial acceptance based on the decay position of the parent muon. For each variation, the measured muon distribution is modified based on the uncertainty of the parameter being studied. New k i parameters are determined for the resulting muon distribution. The resulting variation of the beam parameters is used to estimate the uncertainty on the muon weighting.
Uncertainty in the tracker alignment leads to a ±0.6 mm horizontal and vertical position uncertainty in the measured muon distribution. The vertical position uncertainty couples to the skew quadrupole resulting in an uncertainty δ tracker y . For the different conditions of the four data subsets, this uncertainty was typically 7 to 19 ppb. A similar procedure was followed to estimate the uncertainty from the trackers' horizontal alignment, resulting in δ tracker x =1 to 9 ppb. The trackers' spatial acceptance uncertainty results in δ tracker accept = 1 to 2 ppb.

Closed Orbit Distortion: δ cod
Several effects can distort the muon beam's closed orbit away from its ideal orbit, leading to an azimuthdependent mean position of the muon distribution. This azimuthal dependence on the beam can couple to azimuthally dependent variations in the field gradients, leading to a shift inω p . The dominant closed orbit distortion (COD) contribution is the lowest-order Fourier component of the dipole moment vs azimuth, and is in-cluded in the standard muon distributions used for muon weighting. Additional distortions lead to corrections and uncertainties. The presence of a radial mean field with azimuthal variation would cause a vertical COD; a misalignment of the ESQ plates causes both a radial and vertical COD by steering the beam. The discrete structure of the ESQs, as well as higher-order Fourier terms, also cause small distortions. Corrections and uncertainties due to COD effects are evaluated by generating a distribution of possible CODs based on each error source, shifting the muon distribution in each azimuthal bin, and calculating the resulting distribution of k i parameters which is used to propagate the uncertainty. The radial and vertical CODs due to ESQ plate misalignment contribute corrections of 2 ppb with uncertainties of δ i,cod ESQ = 2 to 4 ppb. An additional uncertainty is attributed to the beam distortions generated by the radial component of the magnetic field and its uncertainties, δ y cod B-rad = 2 to 3 ppb.

Calorimeter Acceptance: δ calo accept
The muon distributions used for muon weighting represent the true muon distribution in the ring. A subset of these muons enter the ω a analysis according to the spatially varying calorimeter acceptance. Each muon in this subset has a different probability for its decay positron to be detected by a calorimeter and also experiences a different magnetic field along its trajectory. A set of muon distributions representing this subset is generated using spatial weighting based on calorimeter acceptance as a function of muon beam trajectories. The k i parameters are calculated for this set of muon distributions and used to evaluate the resulting uncertainty. A maximum uncertainty δ calo accept = 3 ppb is identified.

In-fill Time Dependence: δ in−fill
The spatial muon distribution is approximated as constant over time in the fill. However, during Run-1, it was changing during the fill due to instabilities in the ESQ system [3]; this problem was fixed before Run-2. This leads to a time dependence of the muon-weighted field over each muon beam pulse.
Time-binned azimuthally averaged muon distributions are used to calculate the k i and the corresponding muonweighted field as a function of time in the fill. The resulting time dependence, approximated by a linear fit, leads to a correction to the muon-weighted field δ in-fill < 4 ppb.

D. Results
The muon distribution is highly symmetric but slightly outside the magic radius around the storage ring, leading to low values for the k i parameters for i > 1. Because the beam is not centered, the leading order, nondipole terms couple to the normal quadrupole and normal sextupole moments of the field, and are k 2 ∼ 0.15 and k 5 ∼ 0.09. All of the other parameters are at least a factor of 10 lower (see Fig. 21). The low-k values combined with the low values of the higher-order field moments mean that the effect on the average field experienced by the muons from their distribution over the nonuniform part of the field is small. The largest effect comes from the normal sextupole (∼ 8 Hz, ∼ 128 ppb), which is larger than the effect of the normal quadrupole due to dedicated shimming efforts to reduce the normal quadrupole around the ring. The net difference between the average field and the dipole field is of the same order.

VIII. FAST TRANSIENT FIELDS
Two time-dependent, µs-timescale magnetic fields are induced by the pulsed magnetic and electric fields from the kicker and ESQs that are synchronized with each muon fill. These transient magnetic fields are not present during the trolley runs and must be included as corrections toω p . The fixed probe system measures the field at intervals of 1.2 to 1.4 s, typically asynchronously with respect to muon injection. The fast transient fields change on much shorter timescales. Additionally, the skin depth effect in the aluminum vacuum chamber walls shields the fixed probes from both of these transients, which originate in the muon storage region. For these reasons, both transients required unique measurement solutions.
The kicker transient was studied with two dedicated fast magnetometers for the current experiment. The transient associated with the ESQs was discovered in studies of correlations of the fixed probe measurements with the muon injection. A set of NMR probes was developed to measure the ESQ transient.
An additional systematic uncertainty is assigned to transient fields associated with the booster ring near the muon campus at FNAL. By synchronizing the field measurement systems to the injection cycles with the pulsed systems turned off, we were able to apply an upper limit of 7 ppb to any stray transient fields from the booster.

A. Kicker Transient Fields
A set of three kicker magnets reside in the storage ring vacuum chambers [3]. The kickers reduce the 1.45 T field locally by roughly 22 mT for 150 ns to deflect the injected muons onto the stored orbit. This kick consists of a current pulse through three pairs of thin curved aluminum plates, each 1.27 m long, that subtend an angle of 62.5°a t a radius of 4.5 cm in the xy plane. The pulsed field induces eddy currents in the surrounding metal, leading to field perturbations in the storage volume during the times muons are stored. The fixed NMR probes are shielded from this rapid transient field by the skin depth effect of the aluminum vacuum chambers and do not have the required measurement bandwidth.

Measurement
We built two Faraday magnetometers to measure this transient, one similar to the one used in E821 [66] and the other substantially improved against vibrations caused by the pulsing systems, which we are going to describe next. Such magnetometers exploit the rotation of the polarization angle θ of linear polarized light that occurs in almost any isotropic dielectric in a magnetic field B parallel to the light propagation direction ∆θ(t) = V B(t)L.
Here L is the length, and V is the Verdet constant of the dielectric.
The magnetometer (see Fig. 22a) fits between the kicker plates and was made without any metal. Light from a 405 nm diode laser passed through a Faraday isolator into a multi-mode fiber. The fiber went through a vacuum flange to the magnetometer. The unpolarized light was collimated, polarized by a polarizing beam splitter cube (PBSC), and then its plane of polarization was rotated by a half-wave plate. The light reflected off a 45°mirror, and then passed through two terbium gallium garnet (TGG) crystals, each 5 mm in diameter with their 14.5 mm long axis parallel to B y . The Verdet constant was measured to be V (405 nm) ≈ 450 rad/T · m. The beam was reflected and passed through another PBSC which directed s-and p-polarized light to different return fibers. Time dependence in the magnetic field B(t) changes the plane of polarization and the fraction of light entering each of the two return fibers. Typically, ≈ 1 mW was detected in photodiodes attached to each fiber. The photocurrents were subtracted, amplified, and digitized, yielding a voltage signal of the form V (B) = V 0 cos (2V BL + φ) where φ depends on the waveplate angle.
The magnetometer was calibrated in two steps. The magnet was ramped from full field, 1.45 T at 5173 A, to 0 A at a rate of −0.5 A/s while the magnetometer voltage was recorded as a function of magnet current V (I). A Hall sensor was inserted near the magnet gap and recorded B(I). From the two measurements, the sensitivity dV /dB = (dV /dI) × (dI/dB) was determined. Prior to calibration, the magnetometer was inserted between the kicker plates in the storage volume and the λ/2 waveplate adjusted to maximize the sensitivity dV /dB at the full field. Constraints on the design made precise waveplate adjustment difficult and the actual maximum dV /dB occurred at 5124 A, which was used for subsequent measurements. The calibration value extracted at this current was dV dB = (12.5 mV/A) × (1 A/183 µT) = 68.3(7) mV/mT.
Because the magnetometer baseline voltage depends on the laser current and the coupling efficiency into the incident fiber, the data were scaled to the voltage observed during calibration. This correction was less than 7 %. In addition to showing the expected kicker pulse, the signals showed a repeatable pattern of oscillations in the few kHz range that grew after each kicker pulse and spanned ±1 µT. This pattern is thought to be due to vibrations in the cages holding the kicker plates that jostled the magnetometer, causing variations in the detected light. The system was run at magnet currents of 4841 and 4326 A to reduce this background. Here, dV /dB ≈ 0, corresponding to all of the light going into the lower and middle return fibers, respectively. At these settings, fluctuations in detected light are ascribed to vibration, with sensitivity to real magnetic fields reduced by at least a factor of 20. The final result was assembled by recording data at minimum sensitivity dV /dB ≈ 0 at 4841 and 4326 A, weighting it by 0.5 and subtracting it from the maximum sensitivity dV /dB ≈ 68 mV/T data acquired at 5124 A. The result is shown in Fig. 22b.

Analysis
The data are fit to a decaying exponential from 30 µs to 700 µs after the kick (t = 0 µs), corresponding to the nominal fit range of the ω a analysis. The total uncertainty includes those from calibration, fit uncertainty, and background subtraction. We estimate an uncertainty on the background subtraction of 0.6 µT.
The kickers subtend about 8.5 % of the storage ring azimuth, so the results were scaled by 0.085 to get the average kicker transient seen by the muons, assuming that the transients do not extend beyond the kicker plates. The magnetometer measured the field in the center of the storage volume. Simple models of the transient's spatial dependence suggest it drops off in the horizontal direction from the center but increases in the vertical when closer to the fields' sources. A weighted average of the muon distribution with this transient spatial dependence suggests the average muon sees a slightly smaller transient, reduced by a factor of 0.94.
For a field perturbation of the form ∆B(t) = ∆B(t 0 ) exp(−(t − t 0 )/τ k ), the fractional effect on the muon anomalous precession frequency for a fit starting at t = t 0 = 30 µs and ending at measurement time  (37) ppb (38) The uncertainty on the correction is estimated from 15 % on amplitude, 25% on τ k (17 µs), 25 % on azimuthal weighting factor, 25 % on the transverse weighting fac- tor, and ± 0.6 µT due to uncertainties on the vibrating background subtraction.
A second Faraday magnetometer gave consistent results. This magnetometer directed the light through open-air paths rather than optical fibers. It used TGG crystals and a free-space laser propagation directed by mirrors inside the storage volume, while all other optical elements were on a breadboard outside the storage volume, allowing excellent control of systematic effects except for a weak sensitivity to vibration.

B. Electrostatic Quadrupole Transient Fields
During studies of the correlation between the fixed probe measurements and the muon injection time, a timedependent, µs-scale transient magnetic field was discovered. Further studies revealed that the transient field is caused by mechanical vibrations of the charged plates induced by pulsing the ESQs. The perturbation caused by this transient field is large enough to require precise measurements; however, the fixed probe system cannot directly measure the field to the required precision, primarily due to the skin depth effect of the aluminum vacuum chambers.
The ESQs are arranged into four stations, each consisting of a short section, which subtends 13°in azimuth, and a long section approximately twice the length of a short section. The amplitude of the transient field generated by a short section is maximized near the section's azimuthal center. Observations showed that the long sections can be approximated as two short sections in series. In total, the ESQs cover 156°(43.3 % of the ring). Averaging the perturbation to the magnetic field over the whole ring reduces the total effect accordingly.
The dedicated transient measurements were performed at a lower high voltage (HV) (18.2 kV) than production runs (18.3 kV and 20.4 kV). From first principles, the amplitude of the magnetic-field transient scales quadratically with the ESQ voltage, which was confirmed with in situ measurements in a range from 0 kV to 18.2 kV. Therefore, we can correct the measurements to the HV setting used during any given production period.

Measurement
The dedicated measurements were made by a set of trolley NMR probes sealed inside polyether ether ketone (PEEK) plastic tubes for vacuum compatibility and read out through the fixed probe NMR system. The NMR system is synchronized with the ESQ pulsing system; the ESQ trigger usually precedes muon injection by 23 µs. The ESQs remain powered for the duration of the muon precession fit range, which ends 650 µs after beam injection, corresponding to 673 µs after the trigger. The ESQs discharge 700 µs after the trigger. The beam is delivered in a series of eight such pulses spaced by 10 ms. The second series of eight pulses occurs 266.7 ms after the first series. The entire structure of 16 beam pulses repeats every ≈1.4 s. Reading NMR measurements from every fixed probe in the ring takes 1.2 s. The frequencies of the FIDs are extracted in 0.4-ms-long fit windows. No additional frequency structures with fixed relations to the ESQ pulsing time are observed within these windows.
The transient's time dependence was measured by varying the delay time between the ESQ trigger and the NMR measurement. Figure 23a shows the time structure of the transient field, including a closeup in Fig. 23b of the transient over a single pulse. The measurements of the transient's dependence on the azimuthal position within an ESQ were made in one half of a single long section, chosen for the accessibility in the vacuum chamber. The long sections are approximated by two identical short sections in series by pins [67]. The transient was measured at seven positions along one ESQ section as shown in Fig. 24. Additional measurements were made with one probe in each of the eight sections.

Analysis
Because of the skin depth effect at 100 Hz (the ESQs' pulse rate), the fixed probes' sensitivities are reduced by 70 %. Harmonics are attenuated even further, making the fixed probes mostly insensitive to the transient field's substructure. By comparison, the trolley probes used in the dedicated PEEK measurement system have a 0.5mm-thick aluminum shell and are attenuated by less than 5 %. The fixed and PEEK probes also experience a phase delay due to the aluminum skin depth accounted for in the analysis.
Because each ESQ pulse in the series causes a mechanical vibration in the plates, the transient's precise structure is affected by previous pulses. Figure 23b shows the time structure for the fourth pulse in the series as an example. The transient field, which was extensively mapped in a single section, is then averaged over its azimuthal extent. The transient at the center of all sections was measured, but the azimuthal and transverse variations were only measured in half of one long ESQ; the volume average of the effect over this section was scaled by the measurement at the center of each of other seven sections.
The transient is not constant over the time of a muon injection. Different weighting methods were developed to model how the muons sample the transient field over their lifetime. Each method is propagated through the analysis as a systematic check. The final determination produces an accurate correction toω p and assigns a very conservative estimate of the uncertainty due to this effect.

Systematic Effects
The uncertainty sources for the Run-1a data subset are summarized in Table XII. The substructure in time and azimuth of the ESQ transient is the dominant uncertainty. It arises because the azimuthal dependence of only one of the 12 ESQ sections was measured, and the substructure of the ESQ transient was not measured until Run-3. Because of the length of time between these measurements and Run-1, we applied a very conservative estimate of the uncertainty to the Run-1 data. Figure 25 shows the distribution of the observed ESQ transients for the four ESQ stations.
The ESQ transient studies were performed using the first train of eight beam pulses. It is expected that the second group of eight pulses behaves like the first group because the vibrations and the field transient completely die out before the next set of pulses begin. A simple study  was conducted that confirmed this expectation. The average transient from the first train and a second train agreed to within 14 ppb, which is used to estimate the uncertainty.
Other systematic checks include measuring the transient beyond the azimuthal extent of the ESQ sections and the radial dependence of the transient. Both of these observed variations are added as uncertainties. The measurements were checked for repeatability, which was found to be at the 13 ppb level. This number was conservatively assigned as an uncertainty. Linear drift in the dipole field during the measurement is removed by tracking the local fixed probe drift. Higher-order drift is small on the time scales of these measurements (3 hours). Estimates of this drift are made using PEEK probe measurements outside of the ESQ stations.
The final correction to each data subset and the uncertainty due to the ESQ transient are shown in Table XIII. Note that the uncertainty values differ from Table XII because they are scaled to the HV settings from each data subset individually.

IX. FINAL RESULTS
This paper has covered the full analysis chain for the determination of the magnetic field,ω p (T r ), for the Muon g−2 Experiment. Run-1 was broken down into four data subsets, Run-1a through Run-1d, defined by the settings for the kicker and ESQs. The values ofω p (T r ) are combined with the corresponding values of ω a into the ratio ω ã ω p (T r ) for each data subset. The ratios are then combined into the single Run-1 value that is input into Eq. (4) to calculate a µ [1].
The instrumentation and measurements in this paper represent a significant improvement over the BNL experiment. They are part of a well-studied chain of calibrations and synchronizations where all of our measurements are referenced to the absolute calibration of the water calibration probe that was cross-checked with a novel 3 He probe.
Several key field analyses (the trolley calibration, field tracking, and muon weighting) were performed by at   least two mutually blinded independent teams that, in all cases, found agreement below our total uncertainty. The ESQ transient discovery and measurement represents a significant effort to characterize each system, as well as interactions between systems. A dedicated measurement campaign quickly quantified the systematic correction to the measured field and the corresponding uncertainties. Additional measurements taken after Run-1 will further constrain the systematic effect of the transient.
The final results of the field analysis are summarized in Table XIV. Tables XV and XVI summarize the systematic corrections and uncertainties covered in this paper. The uncertainty is dominated by the ESQ transient. These uncertainties are not strictly independent, leading to correlations between the four data subsets. Most uncertainties are treated as fully correlated between the data subsets; only the tracking error discussed in Sec. VI B is treated as uncorrelated.
The total systematic error onω p (T r ) for Run-1 is 114 ppb. The contributions from calibration, field tracking, and muon weighting total 56 ppb. The contribution from the ESQ and kicker transients are, respectively, 92 and 37 ppb. Most of the uncertainties in Tables XV and XVI already meet the design goals. Improvements to the determination of the ESQ transient are expected in future analyses and combined with the improved temperature stability of the magnet after Run-1, we expect to reduce the total uncertainty below the 70 ppb target forω p (T r ) in the future.

X. ACKNOWLEDGMENTS
We thank the Fermilab management and staff for their strong support of this experiment, as well as the tremendous support from our university and national laboratory

Appendices
Appendix A: Data Quality Control

Instrument Failures
If an instrumentation failure occurs in a single measurement, the corresponding value is dropped. In the fixed probe system, such failures are caused by the absence of a proper RF π/2 pulse needed for the NMR sequence to rotate the sample magnetization, by an outof-time triggered pulse or an out-of-time waveform digitization.
The absence of the RF pulse leads to a noise-only waveform that is detected by the signal amplitude and power of the FID. The switches in the multiplexer that swap between RF pulse and signal path trigger on the amplitude of the RF pulse. If the amplitude of the RF pulse falls below a threshold, it is not propagated through the system. The electronics components used show a small temperature dependence that can cause slight variations in the π/2-pulse amplitudes. If the RF-pulse amplitude is close to the threshold, this can lead to isolated measurements with missing π/2 pulses.
A signal from the control board triggers the fixed probe RF pulse. If interference from other pulsed systems in the experiment is picked up in these signal cables, an out-of-time π/2 pulse can be fired. Depending on the relative timing, this can lead to the superposition of two RF pulses in the digitization window, or to reduced FIDamplitude if the spins of the samples are not yet recovered fully. Figure 26 shows a comparison between a waveform with a nominal FID and a waveform with FIG. 26: FID with two RF pulses overlayed to a nominal FID (gray) with a single RF pulse for reference. two π/2 pulses. A second RF pulse, during the FID of a previous pulse, has not yet decayed, and can lead to spin-echo-like behaviors of the system. Such measurements are mainly detected by a spike in the power of the FID of the corresponding waveform. The power of a waveform is defined as the sum of the squared analogto-digital converter (ADC)values. In Run-1, damaged resistors in the pulsed electrostatic quadrupole systems induced increased numbers of such false triggers. The replacement of the resistors and improved shielding of the corresponding cables eliminated this issue.
Similar to false triggers of the π/2 pulses, the digitizer can also be affected by picked up interference signals. This results in digitization outside of the time window of the FID and with it in noise-only waveforms.

Severe Field Instabilities
Periods around severe field instabilities are not used for the a µ determination. Such instabilities are driven by magnetic field jumps, induced by the feedback systems, or failing hardware.
In addition to the FID-wise quality flags, sudden steps in the magnetic fields are noted in the "production" indicating field instabilities. Such steps are identified by frequency changes larger than 7 times the resolution of a given probe, over a time of up to 8.5 s, in at least 40 probes.

a. Field Steps
Sudden field steps are either caused by external changes of the environment, for example, a magnetic connector moving into the proximity of the storage volume, or by internal changes of the magnet. The latter are denoted field jumps. It is believed that such jumps are caused by the physical motion of the magnet coils in the cryostat. The coils are held in place by radial stops [33]. Field jumps are believed to be caused by the coils releasing tension by suddenly slipping radially. Figure 27 shows the effect of such field jumps as a function of azimuth. The positions of the jumps correlate with the radial stops. The azimuthal extent of the jumps is roughly 130°, and their integral over the whole ring typically cancels.
It has been shown that the fixed probes track the field equally well before and after a field jump. The period of 120 s before and after a jump is dropped from the a µ determination.

b. Instabilities Caused by the Feedback System
Instrumentation failures as described in Appendix A 1 can lead to non-physical frequency determinations in the online FID analysis. If this happens in a fixed probe that is part of the feedback system, the un-physical frequencies can impact the proportional-integral-derivative (PID) loop. In such a case, the feedback reacts to the non-real change of the magnetic field, driving the mean magnetic field away from its set point. The control loop takes some time to stabilize the field after such an excursion.
If the mean over 10 consecutive measurement cycles of the mean magnetic field as determined by the online FIDanalysis of selected probes is more than 10 Hz (162 ppb) away from the set point, the control loop switches to a more aggressive correction mode. These time periods and 24 s before and 240 s afterward are dropped from the determination of a µ to guarantee stable conditions.
In addition to instrumentation failures, field changes on a timescale faster than the reaction time of the feedback control loop can also cause the mean frequency to diverge from the set point. During some periods, the magnetic field was affected by a roughly 2 min oscillation of unknown origin. In rare cases, the amplitude of these field changes crossed the above-mentioned threshold. The DQC also vetoes these periods. Adjustments to the time constants of the feedback loop mitigated these issues.
FIG. 28: This shows a pure normal sextupole (m 5 ) field. The fixed probes (light circles) are all located in a low region (dark). If we simply relate the dipole component in the muon storage region (depicted by the large circle) to the average of all six fixed probes, then the presence of a nonzero normal sextupole would bias the calculation. pole input field. There are off-diagonal terms in the Jacobian matrix caused by asymmetries in the fixed probe positions.
There are two reasons that the two different bases are not identical. First, the NMR probes' discrete nature can cause higher-order moments to alias into the extraction of lower-order moments. The fewer probes used to calculate a moment, the more this aliasing affects the measurement. For example, the normal sextupole m 5 causes a false dipole reading in the fixed probes. Because of their position above and below the muon storage region as shown in Fig. 28 the fixed probes are all located in regions where a shift due to a normal sextupole moment has the same sign. When the average of all six probes is taken, the contribution to the average field from a true normal sextupole moment will be nonzero, causing a biased magnetic dipole determination. In a six-probe station, the fixed probes can estimate the drift in the normal sextupole. The Jacobian is calculated to determine how much the sextupole aliases into the dipole measured by the fixed probes. Then the station's measurements of the normal sextupole moment are used to correct the dipole measurement. However, this correction procedure is impossible to repeat for higher-order moments that cannot be distinguished due to the fixed probes configurations.
The second reason that the two bases are not identical is that the fixed probes' position in a given station is not always symmetric. For example, in standard four-probe stations the position average is not at (0, 0) but at (1.5 cm, 0). This radial shift means, for example, that a simple average of measurements from the four probes would be an approximation of the field at (1.5 cm, 0), not at (0, 0). A correction would then need to be made that mixes the measured moments, using the horizontal gradient (m 2 ) to correct the field on center (m 1 ). There are other fixed probe stations with geometric configurations that are not already accounted for in the initial change of basis. For example, all the fixed probes in the beam injection vacuum chamber are translated radially inward by 1 cm with respect to the nominal configuration. This is shown in Fig. 29 together with the respective Jacobian that contains off-diagonal elements. Another example is the probe position in the four-probe stations of the vacuum chamber containing the trolley garage. These are not symmetric across the x axis. Figure 30 summarizes all relevant Jacobians for the various fixed probe station configurations present in the experiment. This appendix details the derivation of the muon distribution used in Sec. VII from first principles. As covered in Sec. I A, the instantaneous anomalous spin-precession frequency of a muon in a magnetic field at position (r, y, φ) is ω a = −a µ q m B(r, y, φ).
The muon accumulates a phase as it travels around the ring until it decays at time T . As the decay times are short (64 µs), the field drift is negligible over the time of the fill. The total phase accumulated by the muon from the beginning of the integration time until its decay is where r µ k (t) is the muon's position as a function of time.
The subscript k here indicates that this is a time average for the kth muon. The average frequency of the kth muon is To convert this to an integral over azimuth instead of over time, the muon's path of a function of time is converted into the muon's r − y position as a function of azimuth. The following substitutions are made, assuming that the path the muon follows is predominantly circular: In this equation, Φ is the accumulated azimuth; on average, it will approach values of thousands of radians. The term r µ k (φ) is the radius of muon's path at a given azimuth, and R = r µ is the average radius. Making these substitutions, This integral can be extended to three dimensions by incorporating the muon path (in both the r and y directions) as delta functions and integrating r and y over the muon storage region: dy rB(r, y, φ) × δ(r − r µ k (φ))δ(y − y µ k (φ)) .
All the information about the muon's path is encoded in the delta functions so the field map and volume element r can be integrated over 3D space. It is useful to split the integral over φ into a sum of integrals over single revolutions around the storage ring. These integrals are over φ ∈ [0, 2π) and are parameterized by n, the number of cycles the muon makes. The muon makes N + ∆N total cycles. Going forward, the ∆N fractional cycle is neglected (it is, on average, less than 1% of the total accumulated azimuth). Assuming that there are an integer number of cycles, the sum ranges from n = 0 to N − 1.
Note that Φ ≈ 2πN . The only terms in the integral that depend on the parameter n are the delta functions, so the sum can be included in the integrand, yielding ω a k = a µ q m dy rB(r, y, φ) The sum over delta functions is the distribution of the kth muon's position in the ring, This is the normalized distribution with units of inverse volume, such that dV ρ k = 1. As a reminder, the subscript k indicates that this is the average distribution for the kth muon. However, it is easy to see how this generalizes to the case of an average over many muons. The field map is constant for all muons in a fill, so the only averaging going from the case of a single muon to many will be averaging the distributions ρ k for each muon in the fill. Only muons that are included in the ω a analysis are considered. Then, for a single fill, ρ k → ρ µ . As the total number of muon revolutions becomes very large, the distribution can be approximated as continuous because the muons average the field in the storage region. The final result is an average over all of the muons in a fill, ω a , where ωa = aµ q m 2π 0 dφ r 2 r 1 dr y 0 −y 0 dy rρ µ (r, y, φ)B(r, y, φ). (C9)