\section{\label{sec:exp_method} Experimental Method}

\subsection{\label{sec:muon_campus} Polarized Muon Production}
\textcolor{orange}{Diktys}
\medskip

A combination of beamlines that are part of the so-called Muon Campus~\cite{fermimuondept} have been designed~\cite{Stratakis:2017uci} and commissioned~\cite{Stratakis:2019sun} to deliver an intense polarized muon beam for the Fermilab Muon \gmtwo~Experiment. A schematic layout of this facility is illustrated in Fig.~\ref{fig:muon-campus}. Protons accelerated in the upgraded Fermilab linac and booster synchrotron~\cite{Hubbard:1973ur} are adiabatically re-bunched~\cite{Brown:2013idd} in the recycler synchrotron for the Fermilab Muon Campus operations, and then the \SI{8}{\giga\eV} proton bunches are directed to an Inconel-600 (nickel-iron alloy) target~\cite{Morgan:2003zza} via the M1-line. A secondary beam from the target is collected using a lithium lens, where the positively charged particles with \SI[per-mode=symbol]{3.1}{\giga\eV\per\clight} (\SI{\pm10}{\percent}) are selected by using a bending magnet. The secondary beam leaves the target station and travels through the M2- and M3-line, which are designed to capture as many \SI[per-mode=symbol]{3.1}{\giga\eV\per\clight} muons as possible from the pion decays.

\begin{figure*}[]
	\centering
	\begin{tikzpicture}
		\draw (0, 0) node[inner sep=0]{\includegraphics[width=1.95\columnwidth]{fig01.png}};
		\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
	\end{tikzpicture}
	%\includegraphics[width=1.95\columnwidth]{fig01.png}
	\caption{\textcolor{orange}{Diktys} A diagram of the Muon Campus accelerator complex that is used by the Muon \gmtwo~Experiment. \textcolor{red}{\textit{Trying to get a less pixelated image from Brian Drendel or Lee.}}}\label{fig:muon-campus}
\end{figure*}

Positive pion decays produce positive muons and muon neutrinos: $\pi^{+}\rightarrow\mu^{+}+\nu_{\mu}$. In the pion rest-frame, the pion has zero spin and the neutrino is left-handed, and so the muon is also left-handed to conserve angular momentum. When the muon has a pion rest-frame momentum parallel to the lab-frame pion momentum (forward decay), then the Lorentz boost will produce a higher momentum left-handed muon in the lab-frame. When the muon has a pion rest-frame momentum antiparallel to the lab-frame pion momentum (backward decay), then the Lorentz boost will produce a lower momentum right-handed muon in the lab-frame. A beam with \SI{\sim95}{\percent} polarization is obtained for the Muon \gmtwo~Experiment by selecting the higher momentum muons in the lab-frame.

The beam is then injected into the Delivery Ring (DR), where the majority of the remaining pions decay into muons after several revolutions. The DR is also used to separate muons in time from the heavier protons, and a kicker is then used to remove the protons, where the muon beam is extracted into the M4-line. Injection from the M3-line and extraction to the M4-line takes place in the same straight section with the latter happening in the downstream half. The \SI{128.0}{\meter} long M4-M5-line transfers the beam from the DR towards the Muon \gmtwo~storage ring located in the MC-1 Hall. The M5-line includes a \SI{27.1}{\degree} horizontal bend string that provides the proper entry position and angle into the storage ring, and right before the end of the M5-line there is a strong-focusing and tunable final focus section, using four quadrupole magnets that provide optical matching to the muon storage ring.

\subsection{\label{sec:spin} Spin Precession}
\textcolor{orange}{Jason}
\medskip

\textcolor{red}{\textit{Elaborate on the spin precession.}}
\medskip

The magnetic ($\vec{\mu}$) dipole moment for a fermion is given by
\begin{equation}
	\vec{\mu}=g\frac{q}{2m}\vec{s}\nonumber,
	\label{eq:mdip_mom}
\end{equation}
where $g$ is the dimensionless g-factor, $q$ is charge, $m$ is mass, and $\vec{s}$ is spin. Dirac theory predicts $g=2$ for spin-1/2 point particles such as the muon, while Standard Model (SM) quantum field theory predicts $g\neq2$. The deviation of $g$ from 2 is given by the anomaly: $a\equiv\left(g-2\right)/2$. The longitudinal component of $\vec{s}$ relative to the particle momentum ($\vec{p}$) is given by~\cite{Jackson:1998nia},
\begin{align}
	\frac{d}{dt}\left(\vec{s}\cdot\hat{p}\right) &=-\frac{q}{m}\left[\vec{s}-\left(\vec{s}\cdot\hat{p}\right)\hat{p}\right]\cdot\nonumber\\
	                                                               &\quad\left\{a\hat{p}\times\vec{B}+\left[\left(1+a\right)\frac{p}{mc\gamma}-\frac{mc\gamma}{p}\right]\frac{\vec{E}}{c}\right\},
	\label{eq:spinpress} % get an error if last line has \nonumber. % manually put in parentheses for inline eq. references.
\end{align}
where $t$ is time, $\vec{B}$ is the magnetic field, $\gamma$ is the Lorentz factor, $c$ is the speed of light, and $\vec{E}$ is the electric field.

The experiment works by injecting a polarized muon beam from the Fermilab Muon Campus~\cite{Stratakis:2017uci} into the circular muon storage ring and measuring the arrival time and energy of the corresponding decay positrons with 24 calorimeters~\cite{Fienberg:2014kka,Kaspar:2016ofv} placed uniformly around the inside of the ring. Decay positron arrival time, energy, and trajectory are also measured at 2 locations in the storage ring with straw-tracker stations~\cite{Grange:2015fou} placed inside of the vacuum chamber system. A modulation on top of the muon exponential decay is observed in the decay positron time spectrum after applying a suitable energy threshold cut to the positron events:
\begin{equation}
	n\left(t\right)=N\left(t\right)e^{-\left.t\middle/\tau\right.}\left\{1-A\left(t\right)\cos\left[\omega_{a}t+\phi\left(t\right)\right]\right\},
	\label{eq:wiggle_func}
\end{equation}
where $N$ is the normalization, $\tau\sim\SI{64.44}{\micro\second}$ is the average lab-frame muon lifetime, $A$ is the asymmetry, $\omega_{a}\sim\SI[per-mode=symbol]{1.439}{\radian\per\micro\second}$ \textcolor{red}{\textit{[check values]}} is the anomalous spin precession frequency, and $\phi$ is the so called ``\gmtwo~phase''. The $N$, $A$, and $\phi$ terms in Eq.~\ref{eq:wiggle_func} depend on the decay positron energy ($E_{p}$) threshold cut value ($E_{\textnormal{th}}$): $E_{p}\geq E_{\textnormal{th}}$. The $E_{\textnormal{th}}$ is typically chosen to be \SI{\sim1.8}{\giga\eV}. The $N$, $A$, and $\phi$ terms also depend on time due to the coherent beam motion inside of the storage ring and detector acceptance effects, see Section~\ref{sec:fit_model}.

The BNL and Fermilab experiments are sensitive to $\vec{s}\cdot\hat{p}$, where $\omega_{a}$ is the angular frequency at which the muon $\vec{s}$ rotates with respect to $\vec{p}$ and $\omega_{a}$  can be obtained from solutions to Eq.~(\ref{eq:spinpress}).

The experimental method is to circulate a beam of polarized muons in a storage ring and to measure the precession frequency, or rather the difference between
the precession frequency and the revolution frequency, $\omega_a$,  the spin tune. The \SI[per-mode=symbol]{3.094}{\giga\eV\per\clight} momentum
muons decay with lifetime of about \SI{64}{\micro\second} in the lab frame to a positron and a pair of neutrinos. The energy of the positron in the lab frame is correlated with the polarization of the parent muon. The variation in the number of high energy positrons with time is the measure of $\omega_a$. 

The frequency with which the muons precess depends on the details of the magnetic and electric guide field of the storage ring. Magnetic focusing is evidently precluded as it would introduce an unacceptable variation in the magnetic field across the storage region. Instead vertical focusing is provided by electrostatic quadrupoles. The muon momentum is chosen to minimize the effect of the electric field on the precession frequency. Indeed, at the muon magic momentum, \SI[per-mode=symbol]{3.094}{\giga\eV\per\clight}, the contribution of the electric field to the difference frequency vanishes.

Muons decay to $\mu^+\rightarrow e^++\bar\nu_\mu +\nu_e$. The muon spin is correlated with the momentum of the electron in the lab frame. In the muon rest frame the spin is in the z direction. The total final state momentum is the sum of neutrinos and positron. The max momentum of the final state positron is when neutrinos have the same momentum (same direction) and the positron has equal but opposite. Since the spin of the neutrinos is equal but opposite, the positron carries off the angular momentum of the muon. The $e^+$, an anti-lepton is most likely to be right handed in a weak decay, and therefore with momentum in the same direction as that of the muon spin. The positron with minimum momentum in the muon rest frame will be when neutrinos are in opposite directions, with total spin 1 and the positron has near zero momentum and the spin opposite that of the muon. It is as before most likely to be right handed, and therefore to have momentum opposite to the muon spin. The result is that in the lab frame, positron momenta is correlated with muon spin. The measurement is by counting the time dependence of the number of high momentum decay positrons. The experiment is equipped with calorimeters that measure the number vs time of high momentum positrons. The muon has equal but opposite momentum to the neutrinos and necessarily the muon spin. The detector acceptance depends on the transverse position of the decay muon. Therefore acceptance varies with the betatron and dispersive variation of the distribution in phase space of the muon beam.

Momentum of the positron is correlated with the muon spin. Measurement of decay positron momentum as function of time is precession frequency. Focusing is the dipole field and electrostatic quads. So as not to introduce a field variation. But the E-field couples to the magnetic moment anyway. If the dimensionless g-factor of the muon were identically 2, then in any magnetic field the spin will stay synched with the trajectory independent of its momentum. In an electric field, if $g=2$, then at $\beta\ll 1$ there is no effect on the polarization and polarization is fixed independent of trajectory. At $\gamma \gg 1$ the magnetic field in the rest frame of the muon is $B\rightarrow cE$ and the spin is again pinned to the trajectory. Since $g>2$ the spin rotates more rapidly than the trajectory. There is a momentum, the so-called magic momentum, where the spin follows the trajectory. And for the muon that is at $\gamma=29.3$. The spin is frozen to the direction in an electric field. By operating at the magic momentum, the E-field the precession is decoupled from the E-field.

The expression for the anomalous precession frequency, in the limit of vanishing longitudinal magnetic field, is
\begin{align} % {} before the - sign turns it into a binary operator instead of a unary operator (spacing issues)
	\vec{\omega}_{a} &=-\frac{q}{m}\left[a_{\mu}\vec{B}-a_{\mu}\left(\frac{\gamma}{\gamma+1}\right)\left(\vec{\beta}\cdot\vec{B}\right)\right.\nonumber\\
	                             &\qquad\left.{}-\left(a_{\mu}-\frac{1}{\gamma^{2}-1}\right)\frac{\vec{\beta}\times\vec{E}}{c}\right].
	\label{eq:au} % get an error if last line has \nonumber. % manually put in parentheses for inline eq. references.
\end{align}
For muons at magic momentum,
\begin{equation}
	\pmagic=\frac{mc}{\sqrt{a_{\mu}}},\nonumber
%	\label{eq:p0_def}
\end{equation}
circulating on the design orbit,
\begin{equation}
	\vec{\omega}_{a}=-\frac{q}{m}a_{\mu}\vec{B}.\nonumber
%	\label{eq:au_simple}
\end{equation}

\subsection{\label{sec:bfield} Magnetic Field}
\textcolor{orange}{Jason}
\medskip

When a free spin-1/2 proton is placed in an external magnetic field, then it will have eigenstates separated by the following energy difference ($\Delta E$):
\begin{eqnarray}
\omega_{p}&=&\gamma_{p}B\nonumber\\
\Delta E&=&\hbar\omega_{p}
\label{eq:omega_p}.
\end{eqnarray}
Equation~(\ref{eq:omega_p}) depends on the free proton Larmor frequency ($\omega_{p}$), free proton gyromagnetic ratio ($\gamma_{p}=\SI[per-mode=symbol]{2\pi}{\radian\per cycle}\times\SI[per-mode=symbol]{42.577\,478\,92(29)}{\mega\hertz\per\tesla}$~\cite{Mohr:2015ccw}), magnitude of the external magnetic field ($B$), and reduced Planck constant ($\hbar$). Pulsed NMR is used to measure the storage ring magnetic field~\cite{Bennett:2006fi,Grange:2015fou,Prigl:1996fpk}, where it works by exciting protons in a magnetic field with a radio frequency (RF) pulse and then measuring the resulting RF signal that is generated by the protons relaxing back into the equilibrium state. The resulting RF signal can be analyzed to extract the corresponding shielded proton Larmor frequency. The pulsed NMR probes are based on water or petroleum jelly, where internal diamagnetic shielding of the molecular protons must be corrected for to obtain the corresponding $\omega_{p}$ in Eq.~(\ref{eq:omega_p}).

Achieving a \SI{70}{ppb} systematic precision for $\left<\omega_{p}\right>$ requires a very uniform magnetic field in the storage region of the ring, where Table~\ref{tab:ringparams} gives selected Muon \gmtwo~storage ring magnet parameters. The storage region is effectively defined by 5 circular collimators that are used to scape the muon beam before the measurement period, see Section~\ref{sec:lost_muons}. The storage region is a torus centered on the storage ring central orbit that has a circular cross section radius of \SI{45}{\milli\meter} and a central circumference of \SI{44\,690}{\milli\meter} that corresponds to a region of \SI{2.8e8}{\milli\meter\cubed}. The Fermilab experiment uses passive and active shimming to produce the very uniform storage region magnetic field, where the specifications are that the field vary by less than \SI{1}{ppm} over the \SI{45}{\milli\meter} cross section radius and individual multipole contributions vary by less than \SI{1}{ppm} when averaged over the azimuth (angular displacement along the storage ring central orbit)~\cite{Grange:2015fou}. The experiment also has the goal of trying to reduce these individual multipole variations to \SI{100}{ppb}~\cite{Grange:2015fou}. \textcolor{red}{\textit{Verify field specs/goals with one of the \gmtwo~field experts.}} The storage region magnetic field is averaged over the run time and muon beam $x$-$y$-profile (obtained from straw tracker system measurements) to obtain $\left<\omega_{p}\right>$.

\begin{table}[]
\caption{\label{tab:ringparams} \textcolor{orange}{Jason} Muon \gmtwo~storage ring magnet parameters~\cite{Bennett:2006fi} \textcolor{red}{\textit{[Do any of these values need updating???]}}.}
\begin{ruledtabular}
\begin{tabular}{lr}
\textnormal{Parameter}                                    & \textnormal{Value}\\
\colrule
\textnormal{Nominal Magnetic Field}               & \textnormal{\SI{1.4513}{\tesla}}\\
\textnormal{Nominal Current}                           & \textnormal{\SI{5200}{\ampere}}\\
\textnormal{Central Orbit (Magic) Radius} & \textnormal{\SI{7112}{\milli\meter}}\\
\textnormal{Muon Storage Region Radius}      & \textnormal{\SI{45}{\milli\meter}}\\
\textnormal{Magnet Gap Length}                     & \textnormal{\SI{180}{\milli\meter}}\\
\textnormal{Nominal Stored Energy}                & \textnormal{\SI{6}{\mega\joule}}\\
\end{tabular}
\end{ruledtabular}
\end{table}

If the beam of charged particles is ignored, then there should be no free currents inside of the storage region. Hence, a magnetic scalar potential ($\phi_{B}$), which satisfies Laplace's equation, can be used to approximate the magnetic field ($\vec{B}=-\vec{\nabla}\phi_{B}$) inside of the storage region. A multipole expansion can be used to parametrize the transverse magnetic field components when considering a cross section slice of the storage region,
\begin{align} % {} before the - sign turns it into a binary operator instead of a unary operator (spacing issues)
	B_{x}\left(r,\theta\right) &=\sum_{n=0}^{\infty}\left(\frac{r}{r_{0}}\right)^{n}\left[-b_{n}\cos\left(n\theta\right)+a_{n}\sin\left(n\theta\right)\right]\nonumber\\
	B_{y}\left(r,\theta\right) &=\sum_{n=0}^{\infty}\left(\frac{r}{r_{0}}\right)^{n}\left[a_{n}\cos\left(n\theta\right)+b_{n}\sin\left(n\theta\right)\right],
	\label{eq:b_field} % get an error if last line has \nonumber. % manually put in parentheses for inline eq. references.
\end{align}
where $a_{0}$ is the constant term and $r_{0}$ is the radius at which the normal ($a_{n}$) and skew ($b_{n}$) multipole coefficients are normalized \textcolor{red}{\textit{[verify skew-normal convention being used by \gmtwo~field experts]}}. Equation~(\ref{eq:b_field}) can also be used to parameterize the field measurements after the data has been averaged over the azimuth. The $r$ and $\theta$ in Eq.~(\ref{eq:b_field}) are the radial and angular polar coordinates respectively, where $r=0$ corresponds to the central orbit and $\theta=0$ corresponds to the radially outward direction of the storage ring. Furthermore, the storage ring horizontal (radial) and vertical transverse coordinates can be written as $x=r\cos\left(\theta\right)$ and $y=r\sin\left(\theta\right)$ respectively. Figure~\ref{fig:bfield} shows normal dipole, skew dipole, and normal quadrupole coefficients for preliminary magnetic field measurements of the storage region. \textcolor{red}{\textit{The results in Fig.~\ref{fig:bfield} do meet the field spec. Something should be said about this!}}

\begin{figure}[]
	\centering
	\begin{tikzpicture}
		\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig02.pdf}};
		\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
	\end{tikzpicture}
	%\includegraphics[width=0.95\columnwidth]{fig02.pdf}
	\caption{\textcolor{orange}{Mike} Preliminary storage ring magnetic field measurement data. Deviations from the main dipole field component in the vertical ($b_{0}$) and radial ($a_{0}$) directions in parts per million are indicated, as well as the normal quadrupole gradient ($b_{1}$) in parts per million at a displacement of 45 mm from the central orbit. \textcolor{red}{\textit{Harmonize notation; check with field \& tracker experts.}}}\label{fig:bfield}
\end{figure}
