\documentclass[letterpaper,  %a4paper
               %boxit,
               %titlepage,   % separate title page
               %refpage      % separate references
              ]{../jacow}
%
% CHANGE SEQUENCE OF GRAPHICS EXTENSION TO BE EMBEDDED
% ----------------------------------------------------
% test for XeTeX where the sequence is by default eps-> pdf, jpg, png, pdf, ...
%    and the JACoW template provides JACpic2v3.eps and JACpic2v3.jpg which
%    might generates errors, therefore PNG and JPG first
%
\makeatletter%
	\ifboolexpr{bool{xetex}}
	 {\renewcommand{\Gin@extensions}{.pdf,%
	                    .png,.jpg,.bmp,.pict,.tif,.psd,.mac,.sga,.tga,.gif,%
	                    .eps,.ps,%
	                    }}{}
\makeatother

% CHECK FOR XeTeX/LuaTeX BEFORE DEFINING AN INPUT ENCODING
% --------------------------------------------------------
%   utf8  is default for XeTeX/LuaTeX 
%   utf8  in LaTeX only realizes a small portion of codes
%
\ifboolexpr{bool{xetex} or bool{luatex}} % test for XeTeX/LuaTeX
 {}                                      % input encoding is utf8 by default
 {\usepackage[utf8]{inputenc}}           % switch to utf8

\usepackage[USenglish]{babel}			 

\usepackage[final]{pdfpages}
\usepackage{multirow}
\usepackage{ragged2e}

%
% if BibLaTeX is used
%
\ifboolexpr{bool{jacowbiblatex}}%
 {%
  \addbibresource{jacow-test.bib}
  \addbibresource{biblatex-examples.bib}
 }{}
\listfiles

%
% command for typesetting a \section like word
%
\newcommand\SEC[1]{\textbf{\uppercase{#1}}}

%%
%%   Lengths for the spaces in the title
%%   \setlength\titleblockstartskip{..}  %before title, default 3pt
%%   \setlength\titleblockmiddleskip{..} %between title + author, default 1em
%%   \setlength\titleblockendskip{..}    %afterauthor, default 1em

%\copyrightspace %default 1cm. arbitrary size with e.g. \copyrightspace[2cm]

% testing to fill the copyright space
%\usepackage{eso-pic}
%\AddToShipoutPictureFG*{\AtTextLowerLeft{\textcolor{red}{COPYRIGHTSPACE}}}

\begin{document}

\title{Muon Beam Dynamics and Spin Dynamics in the g-2 Storage Ring \thanks{Work supported by DOE DE-SC0008037 }}

\author{D. L. Rubin\thanks{david.rubin@cornell.edu}, A. Chapelain, Cornell University, Ithaca,  USA\\
                  F. Gray, Regis University, Denver, USA \\
		J. Price, S. Charity, University of Liverpool, Liverpool, UK \\ J. Mott, Boston University, Boston, USA \\
		J. D. Crnkovic, W. Morse, V. Tishchenko, Brookhaven National Laboratory, Upton, USA\\ 
                W. Wu, University of Mississippi, Oxford, USA }
	
\maketitle

%
\begin{abstract}
The goal of the new g-2 experiment at Fermilab is a measurement of the anomalous magnetic moment of the muon, 
with uncertainty of less than 140 ppb. The experimental method is to store a beam of polarized muons in a storage 
ring with pure vertical dipole field and electrostatic focusing, and to measure the precession frequency. 
Control of the systematics depends on unprecedented knowledge of the details of the phase space of the muon distribution. 
That knowledge is derived from direct measurements with scintillating fiber detectors that are inserted into the muon beam 
for diagnostic measurements, traceback straw tube tracking chambers, as well as the calorimeters that measure energy, time and position of the decay positrons. 
The interpretation of the measurements depends on a detailed model of the storage ring guide field. 
This invited talk presents results 
of studies of the distribution from the commissioning run of the experiment. 
\end{abstract}


 \vspace*{-.5\baselineskip}
\section{Introduction}
The muon magnetic moment is a property that can be calculated in the context of the standard model of particle physics. 
%It depends on the mass, spin and electric charge of the muon, and the  space
%of elementary particles than can appear on loops, that couple in the intermediate loops by weak and strong interactions as well as the primary electromagnetic forces.
%Given the family of elementary particles and their properties, the anomalous magnetic moment can be computed with great precision. It can  be measured with
%comparable precision.  
A comparison of the measured and predicted anomaly is a grand test of the model. 
%A discrepancy could indicate new physics. 
The goal of the experiment is to measure
the anomalous magnetic moment with 140 part per billion precision.

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 3.094 GeV/c momentum
muons decay with lifetime of about 64 us 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 highest energy positrons come from muons with polarization parallel to their momentum. 
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. 
%The magnetic field is a very nearly pure dipole to ppm precision, to ensure that all muons
%travel through the same field, and is measured routinely. 
Magnetic focusing is evidently precluded as it would introduce an unacceptable variation in the magnetic field across the storage volume. 
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, 3.094 GeV/c, the contribution of the electric field to the difference
frequency vanishes.
    
%Muon lifetime in the lab frame is 64 microseconds. And the precession frequency
%at the magic momentum is about ($\alpha/2\pi)\gamma f_{rev}\sim$ 226 kHz or about 120 periods in 10 lifetimes. Need to count periods and measure the phase with precision to
%achieve ppm accuracy.

We describe the electric and magnetic guide field of the 44.69 m circumference storage ring, the lattice functions and the process for injecting and storing polarized muons. The detector systems 
that inform the beam distributions are introduced. The contributions to $\omega_a$ that arise from 
finite beam width and length,  momentum spread,  and coherent oscillation of the centroid are described, as are the measurements of the distributions that are essential to accounting for the effects. 
%\section{Experimental Method}
%Start with polarized muons. Muons decay to positron and neutrinos. 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 gyromagnetic ration
%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 Efield the precession is decoupled from the Efield. The systematic uncertainty is associated with the momentum spread and the finite 
%contribution of the off-momentum muons.We need to know the energy and phase space to correct.  Another important systematic is the pitch also seen in the same equation. Early to late, also depends on the
%momentum distribution.         
   \vspace*{-.3\baselineskip}
\section{Storage Ring}
%Guide field, quads, beta,eta, tunes, quad multipoles, magnetic multipoles, 
The g-2 storage ring is
a weak focusing machine with a single adjustable parameter, namely the quadrupole voltage, that determines horizontal and vertical tunes, $\beta$-functions, and dispersion.  
Fig.~\ref{fig:schematic} shows the layout of the ring. The quads\cite{crnkovic} are vertically focusing and horizontally defocusing.
In the limit where $V_{quad}\rightarrow 0$, the horizontal tune is unity and vertical is zero. With increasing voltage the vertical tune increases and horizontal decreases. Fig.~\ref{fig:tuneplane} shows horiozntal and vertical tunes along
the voltage contour. 
The $\beta$ and dispersion functions for quad voltage of 20.4 kV are shown in Fig.~\ref{fig:twissplot}.

The quadrupole field is superimposed on the main dipole field. The reference trajectory through the quadrupoles has significant curvature and the quadrupoles share that curvature.
As a result, the quadrupole field is necessarily nonlinear, with a significant sextupole term. An effect of this and other nonlinearities associated with the geometry of the quad electrodes is an 
amplitude dependence of the tunes. 
%The focusing depends on particle displacement. 
The tuneshifts associated with the various quad multipoles\cite{yannis} are shown in Fig.~\ref{fig:tuneshift}. 
The
nonlinearities of the electrostatic quadrupoles, as well as residual magnetic multipoles\cite{field} can drive resonances (see Fig.~\ref{fig:tuneplane}). 
Operation near resonances is avoided to mitigate losses. 
A tune scan that extends over the operating region is shown in Fig.~\ref{fig:quadscan}. The storage fraction is measured as quadrupole voltage is increased
from 18kV to 23kV. The degraded storage fractions evident at 18.8 kV and 21.2 kV correspond to the $3\nu_x=1$ and $\nu_x+3\nu_y=2$ resonances.


Three distinct detector systems inform the muon distribution.
Twenty-four calorimeters\cite{calo}, distributed uniformly around the inner circumference of the ring, measure energy, position and time of decay positrons.  There are two tracking stations\cite{tracker}, 
located 180 and 270 degrees from the
injection point, comprised of straw wire chambers, that measure the trajectory of
the decay positron. The reconstructed track is then traced back to reveal the position of the parent muon. 
%Each station consists of 8 modules with 128 straws in a module. 
The fiber harp system provides the most direct measure of the circulating muons. 
Each of the four harps consists of seven 0.5mm diameter parallel scintillating fibers with 13mm spacing. 
There are two horizontal and two vertically oriented harps at 180 and 270 degrees respectively.  
The fiber harps\cite{harp} are rotated into the beam to measure time dependence of beam centroid and profile, and are retracted during production running.

The guide field is characterized by measurements of closed orbit, tunes, and modulation of the beam width and centroid. 
Measurements of the tunes with the fiber harps are shown in Fig.~\ref{fig:tuneplane}. The fiber harps and the tracking
detectors provide complimentary measurements of motion of the centroid (Figs.~\ref{fig:fibercentroid} and~\ref{fig:trackercentroid}) and modulation of the width, Fig.~\ref{fig:fiberwidth}.

\begin{figure}[!htb]
%   \vspace*{-.5\baselineskip}
   \centering
%   \includegraphics*[width=2in]{figures/SchematicInflectorRingKicker.pdf}
   \includegraphics*[width=2in]{FRXGBE2f1.pdf}
   \caption{Injected beam enters the g-2 ring through a hole in the backleg iron. It emerges from the backleg and enters the inflector which cancels the field of the storage ring magnet. Beam exits the inflector, 
and enters the ring
 through the kicker gap. 
The circumference of the ring is 44.69 m (revolution period 149 ns). The 1.45 T bending field is continuous around the ring.}
   \label{fig:schematic}
%   \vspace*{-\baselineskip}
\end{figure}


\begin{figure}[!htb]
%   \vspace*{-.5\baselineskip}
   \centering
%   \includegraphics*[width=\columnwidth]{figures/tune_plane.pdf}
   \includegraphics*[width=\columnwidth]{FRXGBE2f2.pdf}
   \caption{Dependence of tune on quadrupole voltage computed with a BMAD\cite{sagan} based model of the guide field. Resonance lines are shown. Tentative operating
point is 20.4 kV (red dot).}
   \label{fig:tuneplane}
%   \vspace*{-\baselineskip}
\end{figure}
\begin{figure}[!htb]
%   \vspace*{-.5\baselineskip}
   \centering
%   \includegraphics*[width=174pt]{JACpic_mc}
%   \includegraphics*[width=\columnwidth,trim = 0mm 0mm 0mm 0mm, clip=true]{figures/twiss_plot.pdf}
   \includegraphics*[width=\columnwidth,trim = 0mm 0mm 0mm 0mm, clip=true]{FRXGBE2f3.pdf}
   \caption{Twiss parameters in the closed storage ring}
   \label{fig:twissplot}
%   \vspace*{-\baselineskip}
\end{figure}

\begin{figure}[!htb]
%   \vspace*{-.5\baselineskip}
   \centering
%   \includegraphics*[width=\columnwidth,trim = 0mm 0mm 0mm 0mm, clip=true]{/Users/dlr10/lepp/g-2/beamdynamics/damping_cbo/tuneshift.pdf}
   \includegraphics*[width=\columnwidth,trim = 0mm 0mm 0mm 0mm, clip=true]{FRXGBE2f4.pdf}
   \caption{Simulated contribution to amplitude dependent tune shift from each of the quad multipoles, their sum, and the decoherence rate $\Gamma$ as determined by tracking.}
   \label{fig:tuneshift}
%   \vspace*{-\baselineskip}
\end{figure}

\begin{figure}[!htb]
%   \vspace*{-.5\baselineskip}
   \centering
%   \includegraphics*[width=\columnwidth]{figures/2DTune.pdf}
%   \includegraphics*[width=\columnwidth, trim=0mm 0mm 0mm 20mm, clip=true]{figures/quadscan-2018-02-10.pdf}
   \includegraphics*[width=\columnwidth, trim=0mm 0mm 0mm 20mm, clip=true]{FRXGBE2f5.pdf}
   \caption{Relative number of decay positrons in a fill as a function of quadrupole voltage. The number of positrons is a proxy for the number of stored muons.
Storage efficiency is degraded by betatron resonances at 18.8 kV and 21.2 kV.}
   \label{fig:quadscan}
%   \vspace*{-\baselineskip}
\end{figure}

\begin{figure}[!htb]
  \centering
%  \includegraphics*[width=\columnwidth]{figures/fiberHarpRunQuad144202_RadialCentroids.pdf}
  \includegraphics*[width=\columnwidth]{FRXGBE2f6.pdf}
  \caption{Horizontal position of centroid measured with the 180 deg fiber harp (blue) and 270 deg harp (red) for the first
        30 $\mu$s of the fill. An FFT yields the horizontal tune.}
  \label{fig:fibercentroid}
\end{figure}
\begin{figure}[!htb]
  \centering
%  \includegraphics*[width=\columnwidth,trim = 0mm 0mm 0mm 10mm, clip=true]{figures/AverageRaidalPosition_CBOFit_s18.pdf}  %{figures/ScrapeVertPositionShift50msPrice20180301.pdf}
  \includegraphics*[width=\columnwidth,trim = 0mm 0mm 0mm 10mm, clip=true]{FRXGBE2f7.pdf}
  \caption{Radial centroid as measured with the 180 deg tracker over the first 220$\mu$s of the fill. Red curve is a fitted damped sinusoid. Measurement is increasingly
noisy at longer times as statistics are limited.}
  \label{fig:trackercentroid}
\end{figure}


\begin{figure}[!htb]
  \centering
%  \includegraphics*[width=\columnwidth,trim = 0mm 0mm 0mm 10mm, clip=true]{figures/fiberHarpRunQuad144202_RadialWidths.pdf}
  \includegraphics*[width=\columnwidth,trim = 0mm 0mm 0mm 10mm, clip=true]{FRXGBE2f8.pdf}
  \caption{Horizontal width at 180 degree harp (blue) and 270 deg harp(red) over the first 30$\mu$s of the fill.
The deep modulation is a combination of dispersive and $\beta$ mismatch.}
  \label{fig:fiberwidth}
\end{figure}

%\begin{figure}[!htb]
%  \centering
%  \includegraphics*[width=\columnwidth]{figures/TrackerCBOPrice20180405.pdf}
%  \caption{}
%  \label{fig:trackercentroid}
%\end{figure}


%\begin{figure}[!htb]
%  \centering
%  \includegraphics*[width=\columnwidth]{figures/WIdthTrackerPrice20180405.pdf}
%  \caption{}
%  \label{fig:trackerwidth}
%\end{figure}

%
%\subsection{Detectors}
%\subsection {Fiber Harp and measurements}
%\subsection{Tracker and measurements}
%
   \vspace*{-.3\baselineskip}
\section{Injection}
 The beam is injected into the ring through a hole in the backleg iron. 
%There are no drift straights in the g-2 ring. But continuous uniform B-field. 
%The beam enters through the backleg
%iron and proceeds through the fringe field and into the magnet gap. 
The 1.7m long superconducting inflector bucks the main dipole 
field so that the beam traverses the inflector without signficant deflection
and exits the inflector on a trajectory tangent to a displaced circular orbit.  
The beam crosses the design orbit in the gap of the pulsed kicker that steers the beam radially outward and onto the central orbit as shown in 
Fig.~\ref{fig:schematic}. 

The inflector aperture (18 mm horizontally by 56 mm vertically) is very much smaller than the aperture of the ring (90mm round). In order to maximize transmission,
the beam is focused to a narrow waist through the inflector and with zero dispersion. 
%\begin{figure}[!htb]
%   \vspace*{-.5\baselineskip}
%   \centering
%   \includegraphics*[width=\columnwidth]{figures/twiss_mismatch_plot_185.pdf}
%   \caption{Propagating mismatched twiss parameters through narrow aperture inflector and into the storage ring with quads at 32kV}
%   \label{twiss-open-}
%   \vspace*{-\baselineskip}
%\end{figure}

%\begin{figure}[!htb]
%    \centering
%    \includegraphics*[width=2in]{figures/RingFromAbove.pdf}
%   \caption{Muons are injected into the inflector through a hole in the backleg iron of the g-2 magnet.}
%   \label{fig:overhead}
%   \vspace*{-\baselineskip}
% \end{figure}


%\begin{figure}[!htb]
%   \vspace*{-.5\baselineskip}
%   \centering
%   \includegraphics*[width=\columnwidth]{figures/twiss_mismatch_plot_117.pdf}
%   \caption{Propagating mismatched twiss parameters through the narrow aperture inflector and into the storage ring with quads at 20.4kV}
%   \label{fig:mismatch}
%   \vspace*{-\baselineskip}
%\end{figure}
Manipulation of the beam width to maximize transmission through the inflector and into the ring is illustrated in Fig.~\ref{fig:mismatchap}.
\begin{figure}[!htb]
%   \vspace*{-.5\baselineskip}
   \centering
%   \includegraphics*[width=\columnwidth]{figures/twiss_mismatch_ap.pdf}
   \includegraphics*[width=\columnwidth]{FRXGBE2f9.pdf}
   \caption{Propagating beam betatron and energy width through narrow aperture inflector and into the storage ring. The dashed line is the horizontal aperture}
   \label{fig:mismatchap}
%   \vspace*{-\baselineskip}
\end{figure}
%The resulting mismatch of both $\beta$-functions and the dispersion is indicated in Fig.~\ref{fig:mismatch}. 
The mismatch of dispersion and $\beta$-functions
leads to a modulation of
beam width with components at the betatron frequency and twice the betatron frequency respectively. The relative contribution of betatron motion and momentum offset to the width can be
extracted from the width measurement (Fig.~\ref{fig:fiberwidth}) by suitable decomposition.

The kicker is located $\phi_\beta =\pi/2$ downstream from the injection point at the inflector exit. 
The beam crosses the design orbit with an angle determined by the radial displacement of the inflector axis (nominally 77 mm from the 
design orbit and indicated as 'd' in Fig.~\ref{fig:schematic}), and the exit angle. The crossing angle, and therefore the kick required to steer the beam onto the closed orbit, is minimum if the exit angle is zero. 
The dependencies can be made quantitative with a few simplifying assumptions, namely that the $\beta$ and $\eta$ functions are uniform around the ring,
and as long as we treat the kickers as a $\delta$-function in azimuthal angle. (The kickers\cite{adam} in fact extend over about 36 deg of arc). With these assumptions, 
the horizontal displacement of the trajectory is
\begin{eqnarray*}
x(s) &=& (x_{inf} -\delta\eta)\cos(\phi(s))+\eta\delta \\
& & -k\beta_0\cos\phi(s)+x^\prime_{inf}\sin\phi(s)\\ 
&=& A\cos(\phi(s)+\phi_0)+\eta\delta
\end{eqnarray*}
where $x_{inf},x^\prime_{inf}$ are the displacement and angle of the trajectory at the inflector exit, $\eta$ the dispersion, $\delta$ is the fractional momentum offset, $k$ is the kick angle, $\phi(s)$ the betatron
phase advance with $s=0$ at the injection point, $A=\pm\sqrt{(x_{inf}+\delta\eta-k\beta)^2+(x^\prime_{inf}\beta)^2}$ and $\tan\phi_0 = \frac{x^\prime_{inf}\beta}{x_{inf}-\delta\eta-k\beta}$. The
extremes of the displacement of the motion, that is the envelope of the motion is given by
$x_{ext}=\pm|A|+\eta\delta$.
The envelope is plotted in Fig. \ref{fig:EnergyAcceptance1} as a function of momentum for three different injection angles, and for a kick angle $k=8$mrad, which is about 80\% of the nominal kick,
and Fig.~\ref{fig:EnergyAcceptance3} for the nominal kick of $k=10.8$mrad. The
minimum momentum that can be stored decreases as the kicker angle approaches nominal. Underkicking skews the momentum distribution high.
Kick and and injection angle both contribute to the amplitude of the oscillations about the closed orbit. 
Non zero injection angle reduces momentum acceptance symmetrically about zero.
\begin{figure}[!htb]
  \centering
%  \includegraphics*[width=\columnwidth]{figures/EnergyAcceptance01.pdf}
  \includegraphics*[width=\columnwidth]{FRXGBE2f10.pdf}
  \caption{Kick angle $\sim$ 80\% of nominal. The green lines mark the envelope of the motion of a muon that exits the inflector with zero angle. The on momentum muon 
oscillates between $\pm 2$ cm. If momentum offset is
0.2\% the peak to peak oscillation is $\sim 5$ mm. A muon with momentum offset of -0.18\% is outside the 4.5 cm aperture.}
  \label{fig:EnergyAcceptance1}
\end{figure}  



\begin{figure}[!htb]
  \centering
%  \includegraphics*[width=\columnwidth]{figures/EnergyAcceptance03.pdf}
  \includegraphics*[width=\columnwidth]{FRXGBE2f11.pdf}
  \caption{For the nominal kick angle (10.8 mrad), the trajectory of the on momentum muon coincides with the closed orbit. The on momentum
muon injected with angle of $\pm3$ mrad will oscillate within a $\pm 2$cm envelope.  }
  \label{fig:EnergyAcceptance3}
\end{figure}  


%\subsection{Polarized muons}
%$\pi^+$ decay to $\mu^+ + \bar\nu_\mu$ The pion has zero spin and the neutrino is always right handed. In the pion rest frame the $\mu^+$ is also right handed.
%To conserved angular momentum. Boost to lab frame. The muons with momentum in the same direction as the pi in the lab frame will be
%all right handed. Muons with momentum antiparallel to the pi will end up left handed. And lower momentum. By selecting the highest momentum muons
%we get a polarized beam, order 95%.
%\subsection{Measuring muon polarization}
%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 momemntum positrons.   
%and 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.

%To properly account for systematics we need to know the momentum distribution, moments of phase space distribution, including centroid, vertical distribution.
%To that end we model and measure. 
   \vspace*{-.5\baselineskip}
\section{Systematics}
The expression for the anomalous precession frequency, in the limit of vanishing longitudinal magnetic field, is 
%given by
\begin{eqnarray}
\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 \\
& & \left.-\left(a_\mu-\frac{1}{\gamma^2-1}\right)\frac{\vec\beta\times \vec E}{c}\right]\label{eq:au}
\end{eqnarray}
For muons at magic momentum $(p_{mag} = m/\sqrt{a_\mu})$ circulating on the design orbit,   $\vec\omega_a =-\frac{q}{m}a_\mu\vec B$.

\subsection{Pitch correction}
Vertical oscillations will contribute to our measurement of the anomalous precession through the second term in Eq.~\ref{eq:au}, the so-called pitch correction. 
The measured distribution of vertical phase space is used to compute the size of the effect. A fiber harp measurement of the vertical width over the first 30$\mu$s of the fill is shown in Fig.~\ref{fig:fibervertical}.
\begin{figure}[!htb]
  \centering
%  \includegraphics*[width=\columnwidth,trim=0mm 0mm 0mm 10mm, clip=true]{figures/fiberHarpRunQuad144202_VerticalWidths}
  \includegraphics*[width=\columnwidth,trim=0mm 0mm 0mm 10mm, clip=true]{FRXGBE2f12.pdf}
  \caption{Evolution of the vertical width.}
  \label{fig:fibervertical}
\end{figure}
   \vspace*{-.3\baselineskip}
\subsection{E-field correction}
The E-field systematic is associated with the third term on the right hand size of Eq.~\ref{eq:au} and scales with momentum offset and radial electric field. The electric field 
depends in turn on transverse displacement. Estimating the size of the E-field systematic depends on measurement of the momentum and the radial distribution.
The radial distribution is measured directly with fiber harps and trackers, albeit with somewhat different acceptances. The momentum distribution is determined by a ``fast rotation analysis'', that exploits the
connection between the revolution frequency and the momentum. A technique\cite{orlov} based on Fourier transform yields a frequency spectrum that can be correlated with
radius (circumference) and momentum.  An alternative method extracts the momentum distribution from the measured debunching of the muon beam.
The fast rotation data is provided by the calorimeters which measure the time dependence of the intensity of the distribution.
Examples of frequency distribution extracted by the Fourier method and radial distribution via the debunching analysis are shown in Fig.~\ref{fig:fourier} and~\ref{fig:debunching} respectively.  
A radial distribution measured with the traceback detector is shown in Fig.~\ref{fig:radialdist}. Comparison of the radial distribution extracted from the fast rotation 
data and the traceback trackers requires some care as acceptances are very different. All data are preliminary.
   \vspace*{-.3\baselineskip}
\begin{figure}[!htb]
  \centering
%  \includegraphics*[width=\columnwidth, trim = 0mm 0mm 0mm 10mm, clip=true]{figures/FastRotationFFTAntoine.pdf}
  \includegraphics*[width=\columnwidth, trim = 0mm 0mm 0mm 10mm, clip=true]{FRXGBE2f13.pdf}
  \caption{Fourier analysis of the fast rotation signal gives the muon revolution frequency spectrum. Higher frequency corresponds to lower momentum and smaller radius.
The revolution frequency of the magic momentum muon is 6.7 MHz.}
  \label{fig:fourier}
\end{figure}
   \vspace*{-.7\baselineskip}
\begin{figure}[!htb]
  \centering
%  \includegraphics*[width=\columnwidth, trim = 0mm 0mm 0mm 2mm, clip=true]{figures/FRWanwei_20180421.pdf}
  \includegraphics*[width=\columnwidth, trim = 0mm 0mm 0mm 2mm, clip=true]{FRXGBE2f14.pdf}
  \caption{The radial distribution is determined by analysis of the debunching in the fast rotation signal (preliminary). The radius of the magic momentum muon is 711.2 cm. }
  \label{fig:debunching}
\end{figure}
\begin{figure}[!htb]
  \centering
%  \includegraphics*[width=\columnwidth, trim = 0mm 0mm 0mm 0mm, clip=true]{figures/RadialDistMott_8_20180418.pdf}
  \includegraphics*[width=\columnwidth, trim = 0mm 0mm 0mm 0mm, clip=true]{FRXGBE2f15.pdf}
  \caption{Radial position of decay muon measured with traceback tracking station. (Preliminary data.)}
  \label{fig:radialdist}
\end{figure}

%Acceptance
 \vspace*{-.8\baselineskip}
\subsection{Acceptance and coherent motion}
The acceptance of the calorimeters for the decay positron depends on the radial position of the parent muon. The acceptance therefore varies as the centroid of the distribution 
oscillates and the width is modulated
over the course of the fill. The coherent motion of the centroid, that results from errors in injection angle and kicker field, and the coherent modulation of the beam width, arising from the
phase space mismatch at injection, are characterized by decoherence times. (The coherent motion and modulation early in the fill is evident for example 
in Fig.~\ref{fig:fibercentroid} and~\ref{fig:fiberwidth}, and the decoherence at later times in Fig.~\ref{fig:trackercentroid}). The beam decoheres because of the ampliude and momomentum dependence of tunes associated with 
quadrupole nonlinearity (discussed above) and the chromaticity. But the leading source of decoherence is the large momentum spread and the 
strong dependence of path length on momentum. The change in circumference due to fractional momentum offset is $\frac{\Delta C}{C}\sim \frac{\eta}{R}\frac{\Delta p}{p}\Rightarrow
\Delta p/p$ in the weak focusing limit.  
The momentum acceptance of the ring is $\Delta p/p\sim \pm 0.125\%$. The distribution will lap itself in as few as four hundred turns or 60 $\mu$s, effectively mixing the distribution. Indeed a measure of the 
decoherence time is an indication of the width of the momentum distribution. 



%Lost muons
%During the first couple of hundred turns after injection, muons outside the aperture defined by the collimators are scraped out, and ideally particles that survive scraping will be lost only to
%decay. There may however be some particles with long time scale unstable motion, perhaps associated with a resonance, that eventually exit. Particles may also be lost to scattering from residual gas. 
%If there is any correlation of these lost muons with the parameters of the muon phase space, the distribution will change with time and confuse our corrections.
%If the lost muons populate a portion of the phase space that is correlated with momentum or position, the phase space of muons contributing to the measurement of polarization
%will be distorted. the difference frequency will change as the lost particles are lost.


%\begin{comment}

%The phase space volume of the injected muon distribution overwhelms the ring acceptance. 
%As a result, the distribution that is stored fills the aperture.
%Muons at the edge of the momentum or transverse aperture may be lost over the course of a fill. If those losses correlate with any particular region of the muon phase space
%or polarization, there will be a systematic distortion on the measurement of momentum and/or phase space distribution and/or $\omega_a$ phase\cite{lostmuons}. 
%%If for example, high momentum muons are lost early in the fill by hitting an aperture, there will
%%be a systematic shift of the $\omega_a$ phase over the course of the fill as the lower momentum muons in the distribution decay away. 
%%Or if particles with large vertical oscillation are lost, the pitch correction can be skewed. 

%In order to insure that all circulating muons are well within the aperture defined by the collimators, muons at the edge of the aperture
%are scraped at the start of the fill. The scraping is accomplished by adjusting the voltages on the quadrupole plates asymmetrically, thereby introducing an electrostatic dipole moment,
%that displaces the closed orbit by about 2mm both vertically and radially from the center of the aperture. The asymmetric voltages  are sustained for 7 $\mu$s (many betatron periods) and then 
%the closed orbit is restored adiabatically. The vertical displacement of the distribution is measured by the traceback detectors (see Fig. \ref{fig:injvert})  at a point in the
%ring 180 deg beyond the injection point and over the course of the scraping cycle. The remaining distribution on the restored closed orbit will nominally have at least 1mm clearance with respect to the collimators.
%Muons that are lost are identified as a double (or triple) coincidence in adjacent calorimeters so that the effectiveness of the scraping procedure can be confirmed.
%\begin{figure}[!htb]
%  \centering
%  \includegraphics*[width=\columnwidth,trim = 0mm 0mm 0mm 0mm, clip=true]{figures/AverageVerticalPosition_rebinScrape_station18.pdf}
%  \caption{Vertical displacement of the centroid at the 180 deg tracker during the scraping cycle.}
%  \label{fig:injvert}
%\end{figure}
%\end{comment}
  \vspace*{-.3\baselineskip}
\section{Conclusion}
A quantitative understanding of the evolution of the muon distribution over the course of the fill is essential to limiting the systematic uncertainty in the
measurement of the anomalous magnetic moment to the 70 ppb (systematic) target. The experiment is equipped with detectors that can measure phase space and momentum distribution in
some detail, as we have demonstrated with a few examples. Beam dynamics simulations informed by the measurements complete the description.
The preliminary data presented above was collected during the commissioning phase of the experiment.
Nevertheless it is clear that the fiber harp and tracker systems are an extraordinary window on the
behavior of the circulating distribution. 
\section{Acknowedgement}
We thank E989 Collaborators, the Fermi National Accelerator Laboratory, 
a U.S. Department of Energy, Office of Science, HEP User Facility for the resources provided. 
Fermilab is managed by the Fermi Research Alliance, LLC(FRA), acting under Contract No. DE-AC02-07CH11359.
The authors are supported by the US NSF, and the UK STFC.
I also wish to thank all of our colleagues
who made this experiment and these measurements possible and with whom I have benefited from countless discussions.
%\item Early to late effects. If the polarization of the injected muons is correlated with their momentum, 
%\end{itemize}

%\subsection{early-late}
%The clock starts at t0. The muons enter the ring with some distribution of times with respect to t0. We measure the polarization as a function of time. If we measure polarizaiton 
%at time $t$, polarization of muons that entered the ring at the head of the
%muon pulse (that enter the ring at times $t_{ini}<t_0$ will have precessed a bit more than those at the tail of the bunch. The difference in their precession will correspond to a phase shift. 
%What is fitted is the oscillation of the distribution. If different parts of the distribution have different phase it will not effect the fitted frequency. But suppose the particles at the head and tail
%of the pulse have different energies. High momentum muons survive longer than low momentum muons. Now the average precession phase of the distribution will vary with time, introducing a systematic error
%in the measurement of the frequency. There are a couple of mechanisms for introducing an early to late momentum dependence. Energy acceptance depends on kicker field. And the kicker field is not
%uniform over the length of the bunch. That gives us a correlation with energy along the bunch. Also, there may be a momentum spin correlation introduced upstream as part of the pi-mu production mechanism. see docdb 3693 
%$\Delta t_{ini}$ 


%\begin{figure}[!htb]
%  \centering
%  \includegraphics*[width=\columnwidth]{figures/DecohereneTrackersPrice20180301.pdf}
%  \caption{}
%  \label{}
%\end{figure}

%\begin{figure}[!htb]
%  \centering
%  \includegraphics*[width=\columnwidth]{figures/EarlyMidLateTrackerCBO20180405.pdf}
%  \caption{}
%  \label{}
%\end{figure}
%%%%%%%%%%%%%%%
%\begin{figure}[!htb]
%  \centering
%  \includegraphics*[width=\columnwidth]{figures/EnergyGeneratingCBO_dampingCBO.pdf}
%  \caption{}
%  \label{}
%\end{figure}



%\begin{figure}[!htb]
%  \centering
%  \includegraphics*[width=\columnwidth]{figures/FreqVsTimeTrackerAntoine_20180323.pdf}
%  \caption{}
%  \label{}
%\end{figure}
%%%%%%%%%%%%%%%%%

%\begin{figure}[!htb]
%  \centering
%  \includegraphics*[width=\columnwidth]{figures/PositronWanwei20180323FR_decohering.pdf}
%  \caption{}
%  \label{}
%\end{figure}





\begin{thebibliography}{99}   % Use for  10-99  references
%\begin{thebibliography}{9} % Use for 1-9 references
\bibitem{crnkovic}
J.D.Crnkovic, ``Commissioning the Muon g-2 Experiment Electrostatic Quadrupole System'',, presented at the 2018 Int. Particle Accelerator Conf. (IPAC'18), Vancouver, Ca, Ma 2017, paper WEPAF015 ,this conference
\bibitem{yannis}
    Y. Semertzidis, et al.,
 “The Brookhaven muon (g-2) storage ring high voltage quadrupoles” \textit{Nucl. Instr. Meth. A},  vol. 503, pp. 458-484, 2003.

\bibitem{field}
J. Grange et al.,'' Muon g-2 Technical Design Report'', FERMILAB-DESIGN- 2014-02, arXiv:1501.06858, p. 281
\bibitem{calo}
J. Grange et al.,'' Muon g-2 Technical Design Report'', FERMILAB-DESIGN- 2014-02, arXiv:1501.06858, p. 525
\bibitem{tracker}
J. Grange et al.,'' Muon g-2 Technical Design Report'', FERMILAB-DESIGN- 2014-02, arXiv:1501.06858, p. 575

\bibitem{harp}
J. Grange et al.,'' Muon g-2 Technical Design Report'', FERMILAB-DESIGN- 2014-02, arXiv:1501.06858, p. 611
\bibitem{sagan}
    D. Sagan, “Bmad: A relativistic charged particle simulation library,” \textit{Nucl. Instr. Meth. A},  vol. 558, pp. 356–359, 2006.
\bibitem{adam}
A. P. Schreckenberger et al.,''New Fast Kicker Results from the Muon g-2 E-989 Experiment at FERMILAB'', presented at the 2018 Int. Particle Accelerator Conf. (IPAC'18), Vancouver, Ca, Ma 2017, paper THPML093, this conference
J. Grange et al.,'' Muon g-2 Technical Design Report'', FERMILAB-DESIGN- 2014-02, arXiv:1501.06858, p. 575

\bibitem{orlov}
Yuri Orlov, Cenap S. Ozben, and Yannis K. Semertzidis, ``Muon revolution frequency distribution from a partial-time fourier transform of the g-2 signal in the muon g-2 experiment''\textit{Nucl. Instrum. Methods Phys. Res. A}, 482:9, 2002.

     
        
\end{thebibliography}


\end{document}



\end{document}
	
