\preprint{GM2-doc-28270}
\title{Spin Angle - Transverse Coordinate Correlation}
\author{D. Rubin and R. Fatemi}
%\input{tex/00_title_and_authors}

\date{\today}% It is always \today, today,
             %  but any date may be explicitly specified

%\input{abstract}

\maketitle % call abstract environment before \maketitle

%\tableofcontents

%% tex these

%\input{xp_vs_E}
\def\xinf{{x_{inf}}}
\def\xpinf{{x^\prime_{inf}}}
\def\rbeta{{\sqrt{\beta}}}
\def\bxpinf{{\overline{x^\prime}_{inf}}}
\def\bthetak{{\overline{\theta_k}}}

%\begin{center}
%{\bf Spin and transverse coordinate correlation in the pion decay channel.}
%\end{center}
\def\xinf{{x_{inf}}}
\def\xpinf{{x^\prime_{inf}}}
\section{Introduction}
The correlation of muon polarization with its transverse momentum is a consequence of the left-right asymmetry in the decay of the pion. The $\pi^+$ decays to a
neutrino and a muon. Neutrinos are exclusively left-handed. Convervation of angular momentum requires that in the pion rest frame,  $\mu^+$
is likewise left-handed such that ${\bf\hat p_\mu\cdot \hat s_\mu}=-1$. The angle $\phi_a$ between muon momentum and polarization is precisely $\pi$.  
The pion decays isotropically in its rest frame. The momentum and polarization of the muon in the lab frame depends on the angle of the muon momentum in the
pion rest frame  ($\theta^*$ in Figure~\ref{fig:diagram}) with respect to the direction of travel of the pion\cite{Picasso}. 
\begin{equation}
\sin(\phi_a) \sim \frac{2m_\mu}{m_\pi^2-m_\mu^2} p_\pi \sin\theta\label{eq:phivstheta}
\end{equation} 
where $\phi_a=\cos^{-1}({\bf\hat s_\mu\cdot\hat p_\mu})$, $p_\pi$ is the pion momentum and $\theta = \tan^{-1}(p_\perp /p_\parallel)$,
and $p_\perp$, and $p_\parallel$ are the transverse and longitudinal momenta of the muon with respect to the pion direction.
\begin{figure}[h]
\centering
  \includegraphics[width=0.8\linewidth]{spincoordinatefigures/diagram.pdf}
\caption{$\theta^*$ is the angle the muon momentum makes with the axis defined by the pion momentum in the pion rest frame, where
muon polarization ${\bf s}^r$ and momentum ${\bf p}^r$ are antiparallel. $\theta$ is the angle between muon momentum and the pion direction in the lab frame
and $\phi_a$ the angle between muon  polarization and momentum.}
\label{fig:diagram}
\end{figure}
In our experiment, with $p_\pi\sim 3.1$ GeV, Equation ~\ref{eq:phivstheta} becomes
\begin{equation}
\sin(\phi_a) \sim 78.8 \sin\theta\label{eq:phivstheta}
\end{equation} 
The muons are emitted in the lab frame in a forward cone of semi-angle\cite{Picasso} 
\begin{equation}
\tan\theta_{max}=\frac{1}{\gamma}\frac{m_\pi^2-m_\mu^2}{2m_\mu m_\pi}  \label{eq:openangle}
\end{equation}
With $p_\pi\sim 3.1$GeV, $\theta_{max}\sim 12.7\ {\rm mrad}$.
Since $\theta < 12.7$ mrad, Equation~\ref{eq:phivstheta} can be further simplified to
\begin{equation}
\sin\phi_a \sim 78.8 \xp_0. \label{eq:phips}
\end{equation}
where $\xp_0$ is the phase space coordinate of the muon's trajectory at birth. The correlation of spin angle $\phi_a$ with phase space $\xp_0$ is evident.
The muon subsequently executes betatron oscillations as it propagates along the M2/M3 beam line, around the delivery ring and to the g-2 storage ring.
The precession of the spin in the bending magnets, which is given by the spin tune $\nu_s=\gamma a_\mu$ is independent of the transverse phase space coordinates.
The effect of the bending magnets will be to introduce an offset in Equation~\ref{eq:phips}. The net bend in the straights is of course, zero. It is thus
anticipated that there will be a characteristic  spin angle - transverse coordinate correlation in the distribution when it is injected into the g-2 ring. 

If it happens, that the momentum acceptance of the storage ring is correlated with the phase space amplitude ($x,x^\prime, y, y^\prime)$,
the resulting correlation of spin angle with momentum in the stored beam will contribute to the differential decay systematic.
Since injection is in the radial plane, and there is finite radial, but negligible vertical dispersion in the storage ring,
it is reasonable to suppose that the momentum acceptance is independent of vertical phase space coordinates.
It turns out that 
the momentum acceptance of a zero dispersion beam injected into a ring modeled with continuous quadrupoles and no vertical motion is bounded as per the inequality\cite{rubin2747,rubin0000}
\begin{equation}
-\frac{1}{2\eta}\left(A-(x_{inj}-\theta_k\beta_r)-\frac{(\xp_{inj}\beta_r)^2}{A+(x_{inj}-\theta_k\beta_r)}\right)< \delta < \frac{1}{2\eta}\left(A-(x_{inj}-\theta_k\beta_r)-\frac{(\xp_{inj}\beta_r)^2}{A-(x_{inj}-\theta_k\beta_r)}\right)
\label{eq:momaccept}
\end{equation}
where $x_{inj}$ and $\xp_{inj}$ are the displacement and angle at the injection point, $\theta_k$ is the kick angle, $\eta$ and $\beta_r$ the ring dispersion and $\beta$-function, and $A$ the collimator aperture.
In this simple model, momentum acceptance is indeed correlated with $x_{inj}$ and $\xp_{inj}$. 
If, for example, $\xp_{inj}$ is small, and $\theta_k\beta_r<x_{inj}$, the minimum $\delta_{\min}$ and maximum $\delta_{max}$ accepted momenta increase with increasing
$x_{inj}$. 

The result is a spin-momentum correlation in the stored beam and an early to late effect in the time spectra of the muon decay positrons. 
The average shift in $\omega_a$ is given by\cite{crnkovic3477}
\begin{eqnarray}
\vev{\Delta \omega_a}&=&\der{\vev{\phi_a}}{\gamma}\der{\vev{\gamma}}{t}=\der{\vev{\phi_a}}{\delta}\frac{1}{\gamma}\der{\vev{\gamma}}{t}\nonumber\\
&=&\left(\der{\vev{\phi_a}}{x}\der{\vev{x}}{\delta} +\der{\vev{\phi_a}}{x^\prime}\der{\vev{x^\prime}}{\delta}+ \partder{\vev{\phi_a}}{\delta}\right)\frac{1}{\gamma}\der{\vev{\gamma}}{t}\label{eq:derivchain}
\end{eqnarray}
where $\der{\vev{\phi_a}}{x}$ and $\der{\vev{\phi_a}}{x^\prime}$ describe the spin-transverse momentum correlation, $\der{\vev{x}}{\gamma}$ and $\der{\vev{x^\prime}}{\gamma}$
the transverse momentum - momentum acceptance correlation and $\der{\vev{\gamma}}{t}$ the time dependence of the  average momentum in the storage ring. 
Note $\delta = \frac{\gamma-\gamma_0}{\gamma_0}$ and $\der{}{\delta} = \frac{1}{\gamma}\der{\gamma}{t}$.
The first two terms in Equation~\ref{eq:derivchain} comprise the ``spin angle - transverse coordinate correlation'' that are the subject of this paper. The explicit
dependence of spin angle on momentum, the third term in ~\ref{eq:derivchain} is referred to as the ``beam-line correlation''. 

Note that the derivatives $\der{\vev{x}}{\delta}$ and $\der{\vev{\xp}}{\delta}$ are not the dispersions $\eta$ and $\eta^\prime$ of the beam at the inflector exit, both nominally zero.
These derivatives are extracted from the distribution that only includes particles that are eventually stored in the ring.

\section{Propagation of the spin-transverse coordinate correlation}
The correlation of spin phase and transverse coordinates in the beam that arrives at the inflector exit depends on the emittance of the parent pion beam, 
and the decay distribution, as well as the
fraction of the muon population originating in the M2/M3 straight as compared to the delivery ring.
Near perfect correlation would result if all pions decayed simultaneously at a single point in the M2/M3 straight, according to Equation~\ref{eq:phips}. 
If on the other hand, half of the pions decayed at betatron phase $\theta_\beta$ and the same number decayed at $\theta_\beta + \pi$, there would be zero correlation
of spin phase and transverse coordinates further downstream, (assuming  periodic $\beta$-function). It follows that if the emittance of the pion beam is 
much smaller than that of the muon beam, and if the number of pions that decay per unit length of the beam line is constant, and if the beam line is an integer
number of betatron wavelengths, then the correlation vanishes. Whatever residual correlation remains will depend on the betatron phase advance from origin to
observation point.
We depend on Monte Carlo simulation of pion production, muon decay and transport to the g-2 ring to
determine the spin phase - transverse coordinate correlation at the entrance to the storage ring at the inflector exit.

For the record, it is worth noting a couple of other correlations that result from the pion decay kinematics. 
While the dependence of spin phase on $x$ and $\xp$ ($y$ and $y^\prime$) of muons born at one location will be canceled by
muons born half a betatron wavelength downstream, the dependence of spin phase on invariant amplitude can not.
If we suppose that the phase space coordinates of the pion are $x=x^\prime=y=y^\prime_0$ at the moment of decay, and that all pions
have the same momentum,
then the coordinates of the daughter muon are $(x=0,x^\prime= x^\prime_0, y=0, y^\prime=y^\prime_0)$, and the invariant amplitude of the
propagating muon in the x and y planes,  is
\begin{eqnarray}
a_x &=& (\gamma_x x^2 + 2\alpha_x x x^\prime + \beta_x {x^\prime}^2)^{1/2} \nonumber\\
a_y&=& (\gamma_y y^2 + 2\alpha_y y y^\prime + \beta_y {y^\prime}^2)^{1/2}\nonumber \\
&\rightarrow &{x_0^\prime}^2 = a_x^2/\beta_x, \ {y_0^\prime}^2=a^2_y/\beta_y \label{eq:invariant}
\end{eqnarray}
where $\gamma,\alpha$, and $\beta$ are the x and y twiss parameters and $\beta_x^0,\beta_y^0$ the $\beta$-function at the birth place of the muon.
Combining ~\ref{eq:phips} and ~\ref{eq:invariant}, where generalizing to 2-dimensions $x_0^\prime \rightarrow \sqrt{{x_0^\prime}^2+{y_0^\prime}^2}$,
 the absolute value of the spin angle can be written in terms of the invariant amplitudes.
\begin{equation}
| \sin(\phi_a)| \sim \left(\frac{2 m_\mu}{m_\pi^2-m_\mu^2}p_\pi \right)\left(\frac{a_x^2}{\beta_x} +\frac{a_y^2}{\beta_y}\right)^{1/2}= k\left(\frac{a_x^2}{\beta_x} +\frac{a_y^2}{\beta_y}\right)^{1/2}\label{eq:abssin}
\end{equation}
(Here $k=\frac{2m_\mu}{m_\pi^2-m_\mu^2}p_\pi$ is a constant.)
The invariant amplitude is of course just that and can be evaluated anywhere independently of betatron phase advance.
But ~\ref{eq:abssin} is positive definite and, information about the asymmetry is lost.


There is finally a correlation of the muon momentum with the decay angle and thus with the spin phase. 
$$p_\mu = \gamma_r m_\mu\left(\gamma^2(\beta+\beta_r\cos\theta^*)^2+\beta_r^2\sin\theta^*)^2\right)^{1/2}$$
where $\beta_r$ is the velocity of the muon in the pion rest frame, $\gamma_r=(1-\beta_r^2)^{-1/2}$,  $p_\pi = m_\pi\gamma\beta$ and $\theta^*$ the angle of the muon in the pion rest frame
(see Figure~\ref{fig:diagram})

In summary we expect that the spin phase of muons with smallest invariant amplitude and highest momentum to be neariest to $\pi$. 

\section{Extracting Spin - Coordinate Correlation from Simulation}
In practice the dependence of $\phi_a$ on $x$ and $x^\prime$ and that of $x$ and $x^\prime$ on $\gamma$ are determined from simulation.
We rely on end to end simulations that begin with protons incident on the conversion target, pion production, and decay to muons that are propagated to the end of M5, 
performed by Stratakis\cite{stratakis16724,stratakis15274} and Valetov\cite{valetov17800,Valetov19979}.

\begin{comment}
The number of particles versus spin phase and displacement for the Stratakis distrubion is shown in Figure ~\ref{fig:particlesM4M5} and for the Valetov distribution at the end of M5 is shown in Figure ~\ref{fig:endoftracking}.
The average spin angle in terms of displacement is 
\begin{equation}
\vev{\phi(x)}= \int \phi(x)\rho(\phi,x) d\phi
\end{equation}
The best fit curve is determined by minimizing
\begin{eqnarray}
\chi^2&=&\int \int (\vev{\phi(x)}-(m_x\cdot x+b))^2\rho(\phi,x) dx\\
&\rightarrow&\sum_{ij}(\phi_i-(m_x\cdot x + b))^2 N_{ij}
\end{eqnarray} 
\begin{figure}[h]
\centering
  \includegraphics[width=0.45\linewidth]{spincoordinatefigures/particlesM4M52D.pdf}
  \includegraphics[width=0.45\linewidth]{spincoordinatefigures/spinvsx_particlesM4M5.pdf}
\caption{Number of particles in spin angle-displacement bins for the Stratakis distribution at the end of M5(left).
Average spin angle versus displacement, and the best fit straight line with slope $m_x=-0.017\pm 0.009\ {\rm rad/m}$(right). 
Note that the best fit straight line is a weighted average of the slope.} 
\label{fig:particlesM4M5}
\end{figure}
\begin{figure}[h]
\centering
  \includegraphics[width=0.45\linewidth]{spincoordinatefigures/endoftracking2D.pdf}
  \includegraphics[width=0.45\linewidth]{spincoordinatefigures/spinvsx_endoftracking.pdf}
\caption{Number of particles in spin angle-displacement bins for the Valetov distribution at the end of M5(left).
Average spin angle versus displacement and the best fit straight line with slope $m_x=-0.117\pm0.005\ {\rm rad/m}$ (right).} 
\label{fig:endoftracking}
\end{figure}
\end{comment}

The BMAD\cite{Sagan:2006sy} and gm2ringsim\cite{fatemi14559} codes are used to propagate the distribution from the end of the M5 line through the  injection channel to the inflector exit.
The beam is 'steered' into the hole in the backleg iron so that it intercepts IBMS1 and IBMS2 as measured.\cite{brynn26665v1} 
The measured position on IBMS3 fixes the inflector field.
The particle distributions at the inflector exit are compiled as density functions $\rho_x(\phi,x)$ and $\rho_\xp(\phi,\xp)$.
Those density functions are projected onto the $x$ and $\xp$ axis respectively to give us $\vev{\phi(x)}$ and $\vev{\phi(\xp)}$, as shown in Figure~\ref{fig:phivsxxp34}.  
The average spin angle $\phi$, at each position $x$ is 
\begin{equation}
\vev{\phi(x)}= \int \phi(x)\rho(\phi,x) d\phi
\end{equation}
In order to extract derivatives for substitution into Equation~\ref{eq:derivchain}, for example $\der{\vev{\phi}}{x}$, fit a polynomial to the distribution by minimizing 
\begin{eqnarray}
\chi^2&=&\int \int (\vev{\phi(x)}-(b+m_x\cdot x +\ldots))^2\rho(\phi,x) dx\\
&\rightarrow&\sum_{ij}(\phi_i-(b+m_x\cdot x+\ldots ))^2 N_{ij}
\end{eqnarray} 

\begin{figure}[h]
\centering
  \includegraphics[width=0.45\linewidth]{spincoordinatefigures/phivsxmarkinflectords34.pdf}
  \includegraphics[width=0.45\linewidth]{spincoordinatefigures/phivsxpmarkinflectords34.pdf}
\caption{Average spin angle as a function of displacement, $\vev{\phi(x)}$. $\der{\vev{\phi}}{x}=0.927\pm 0.1 \ {\rm rad/m}$(left).
Average spin angle as a function of angle, $\vev{\phi(\xp)}$. $\der{\vev{\phi}}{\xp}=1.159\pm0.149$ (right). } 
\label{fig:phivsxxp34}
\end{figure}

The dependence of $\phi_a$ on transverse coordinate is very nearly linear and a first order polynomial fit is adequate to the task of computing derivatives

\section{Transverse coordinate - momentum correlation}                                                 
The derivatives $\der{\vev{x}}{\delta}$ and $\der{\vev{\xp}}{\delta}$ characterize the dependence of 
angle and offset of a trajectory at the inflector exit on the storage ring's momentum acceptance. As noted above, inspection of the 
the simple injection model embodied in the
inequality~\ref{eq:momaccept}
suggests a linear relationship between momentum acceptance and offset $x_{inf}$ and a quadratic dependence on $\xp_{inf}$. 
We rely on tracking simulations that include all of the details omitted in the simple model, to determine $\vev{x(\delta)}$ and $\vev{\xp(\delta)}$. 
Particles that circulate for at least 4 $\mu$s are 'captured'. For each particle that is captured we
note its momentum as well as its displacement and angle at the inflector exit to generate density functions $N_x(x,\delta)$ and 
$N_{\xp}(x^\prime,\delta)$, examples of which are shown in Figures~\ref{fig:densityfunctions}. 
\begin{figure}[h]
\centering
\includegraphics[width=0.45\linewidth]{spincoordinatefigures/densityxdelta34.pdf}
\includegraphics[width=0.45\linewidth]{spincoordinatefigures/densityxpdelta34.pdf}
\caption{$N_x(x,\delta)$ is the number of particles in the stored beam with momentum $\delta$ that exited the inflector at offset $x$. 
$N_\xp(\xp,\delta)$ is the number of particles in the stored beam with momentum $\delta$ that exited the inflector at angle $\xp$. }
\label{fig:densityfunctions}
\end{figure}
The projection of the density functions onto the $x$ and $\xp$ axis respectively are shown in Figures~\ref{fig:xxpvsdelta34}.  
We find that the dependence of $x,x^\prime$ on momentum is distinctly nonlinear. This is at least in part because the momentum acceptance depends on the kicker field as well as the
transverse coordinates, and the kicker field has a complicated time dependence. We find that a third order polynomial gives a reasonable fit to the simulated data.

\begin{figure}[h]
\centering
  \includegraphics[width=0.45\linewidth]{spincoordinatefigures/xvsdelta34.pdf}
  \includegraphics[width=0.45\linewidth]{spincoordinatefigures/xpvsdelta34.pdf}
\caption{Average offset $\vev{x(\delta)}$ (left) and angle $\vev{\xp(\delta)}$ (right) as a function of momentum for particles that are stored,
and accompanying best fit third order polynomial.} 
\label{fig:xxpvsdelta34}
\end{figure}
The derivatives 
\begin{eqnarray}
\der{\vev{x}}{\delta}&=& p_1 + 2p_2 \delta + 3p_3 \delta^2 = \left(0.368 +2(69.2) \delta +3(62871.1)\delta^2\right){\rm m}\label{eq:xdelta} \\
\der{\vev{\xp}}{\delta}&=&  \left(0.1606 +2(184.28) \delta +3(-6241.2)\delta^2\right){\rm rad} \label{eq:xpdelta}
\end{eqnarray}
Using\cite{crnkovic3477} 
\begin{equation}
\der{\vev{\gamma(t)}}{t}=\frac{\sigma^2}{\mu^2\tau},
\end{equation}
the time dependence of the average momentum of the stored beam is given by

%So in general we can write

%\vev{\phi_a}&=& a_1 + a_2 x\\
%\vev{\phi_a}&=& b_1 + b_2 x^\prime\\
%\vev{x} &=& c_1+c_2 \delta + c_3\delta^2 + c_4\delta^3\\
%\vev{x^\prime} &=& d_1+d_2 \delta + d_3\delta^2 + d_4\delta^3\\

\begin{eqnarray}
\vev{\gamma(t)}&=& \vev{\gamma(t=0)} + \frac{\sigma^2}{\mu^2\tau} t\\
\rightarrow\vev{\delta(t)}  %& =& \frac{1}{\gamma_0}(\vev{\gamma(t)}-\gamma_0) =\frac{1}{\gamma_0}(\vev{\gamma(t=0)}+\frac{\sigma^2}{\mu^2\tau}t-\gamma_0) \nonumber\\
&=& \frac{1}{\gamma_0}(\vev{\gamma(0)}-\gamma_0 +\frac{\sigma^2}{\mu^2\tau} = \vev{\delta(0)}+\frac{1}{\gamma_0}\frac{\sigma^2}{\mu^2\tau}t\label{eq:deltatime}
\end{eqnarray}
(where $\sigma$ and $\mu$ are the width and average beam energy and $\tau$ is the lifetime in the rest frame),
allowing replacement of $\delta$ on the right hand size of Equations~\ref{eq:xdelta} and~\ref{eq:xpdelta}.
$\vev{\delta(t)}$ is plotted in Figure~\ref{fig:deltaomegaomegatime}(left)).
The derivatives are then combined according to Equation~\ref{eq:derivchain} to give the time dependent shift of $\omega_a$  that is shown in Figure~\ref{fig:deltaomegaomegatime}(right).
\begin{equation}
\vev{\Delta\omega_a(t)}=\left(\der{\vev{\phi_a}}{x}\der{\vev{x}}{\delta}(t)+\der{\vev{\phi_a}}{\xp}\der{\vev{\xp}}{\delta}(t)\right) \frac{1}{\gamma_0}\frac{\sigma^2}{\mu^2\tau}\label{eq:deltaomegatime}
\end{equation}
\begin{figure}[h]
\centering
  \includegraphics[width=0.45\linewidth]{spincoordinatefigures/averagedeltavstime.pdf}
  \includegraphics[width=0.45\linewidth]{spincoordinatefigures/deltaomega_omega_time.pdf}
\caption{Average momentum of the stored beam versus time (Equation~\ref{eq:deltatime}(left).
The purple curve in the plot on the right is the fractional shift of $\omega_a$ versus time (Equation~\ref{eq:deltaomegatime}) and
the green curve is the time average $\frac{1}{T}\int_0^T\frac{\Delta\omega_a}{\omega_a}(t) dt$}
\label{fig:deltaomegaomegatime}
\end{figure}
It is clear from Figure~\ref{fig:deltaomegaomegatime}(right) that the variation in the frequency shift with time is negligibly small. The reason for that
is that the variation of the average energy with time (Figure~\ref{fig:deltaomegaomegatime}(left)) is so small. At $t=0$,
\begin{equation}
\frac{\Delta\omega_a}{\omega_a} = 9.2\pm 1.2 \ {\rm ppb}
\end{equation}

\section{Dependencies}
We have performed simulations with a variety of configurations(tunings)\cite{gm2ringsim} of the injection parameters in order to explore the sensitivity of the distributions $\rho_x(\phi,x)$, $\rho_\xp(\phi,\xp)$ 
and their projections in Figures~\ref{fig:phivsxxp34}, and of the distributions $N_x(x,\delta)$ and $N_\xp(\xp,\delta)$ in Figures~\ref{fig:densityfunctions} and their projections ~\ref{fig:xxpvsdelta34}.
In particular, inflector field is varied $\pm 1\%$, thus changing the angle at which the beam exits the inflector, the kicker field and kicker timing is varied and thereby effecting the momentum acceptance.
The tunings of the various configurations are summarized,
along with the corresponding frequency shits,
 in Table~\ref{tab:configurations}. The fractional shifts in $\omega_a$ for each of the configurations are plotted in Figure~\ref{fig:spinsummary}.
Note that Figures~\ref{fig:phivsxxp34},~\ref{fig:densityfunctions},~\ref{fig:fig:xxpvsdelta34} and~\ref{fig:deltaomegaomegatime} correspond to configuration \#6.
\begin{table}[h]
\caption{For all but configuration 7, the distribution of the Valetov\cite{valetov17800,Valetov19979}. end to end simulation is our starting point. The twiss parameters of that distribution are transformed to match
the measurement $\beta$ and $\alpha$-functions\cite{brynn26665v1}. The offset and angle of the distribution at the entrance to the backleg iron are adjusted so that it reproduces measurement of hits on IBMS1 and IBMS2.
The inflector field is nominally chosen based on the measured IBMS3 signal. The nominal kicker timing is the peak of the capture vs timing scan.
In configuration 1, the raw Valetov distribution is used in order to test the fidelity of our transformation of twiss parameters.}
\begin{center}
\begin{tabular}{|c|c|l|l|l|l|}
\hline
Configuration& $\frac{\Delta\omega_a}{\omega_a}$ [ppb]& Description & Starting Distribution & code\\
\hline
1&$18.4\pm 5.3$ & Raw distribution& Valetov& bmad \\
2& $12.3\pm 1.7$ & tuned -$\frac{\Delta B_{inf}}{B_{inf}}= -1\%$& Valetov &bmad\\
3& $1.9\pm0.63$ & tuned  -$\frac{\Delta B_{inf}}{B_{inf}}= +1\%$  & Valetov&bmad\\
4&$9.6\pm 1.6$ & tuned, $B_{kick}=224$G & Valetov &bmad\\
5&$6.3\pm 1$ & tuned, $B_{kick}=264$G $t_{kick} = -30ns$& Valetov &bmad\\
6&$9.2\pm 1.2$ &tuned - run 3b $B_{kick}=264$G & Valetov &bmad\\
7&$10.0\pm 1.1$ &tuned - run 3b  $B_{kick}=264$G &Stratakis  &bmad\\
8 & $0.07\pm 0.4$ & run2 & Valetov& gm2ringsim\\ 
9 & $0.02\pm 0.19$ & run3 A-G& Valetov & gm2ringsim\\ 
10 & $-0.36\pm 0.16$ & run3 I-L& Valetov & gm2ringsim\\ 
11 & $-0.06\pm 0.13$ & run3 M & Valetov& gm2ringsim\\ 
12 & $0.12\pm 0.11$ & run3 N-O & Valetov& gm2ringsim\\ 
\hline
\end{tabular}
\end{center}
\label{tab:configurations}
\end{table}


\begin{figure}[h]
\centering
  \includegraphics[width=0.55\linewidth]{spincoordinatefigures/spin_summary.pdf}
\caption{$\Delta\omega_a/\omega_a$ for a dozen different configurations of simulation injection parameters. 
The systematic difference in the results of nearly 10 ppb between ``gm2ringsim''  and ``bmad'' calculations is not entirely understood,
but is likely a result of subtle differences in tuning of the trajectory through the injection channel.
Note that configuration 1 is performed strictly for diagnostic purposes.}
\label{fig:spinsummary}
\end{figure}

\section{Conclusion}
In the decay of pions to muon and neutrino, the relative orientation of the muon's spin and velocity vectors are perfectly correlated. That correlation appears
at the entrance to the g-2 ring as a correlation between spin angle and transverse phase space coordinates.
Because of the high dispersion in the storage ring, momentum acceptance is correlated with those same phase space coordinates,  angle $\xp$ and offset $x$. 
The resulting correlation of spin angle and momentum in the stored beam contributes an early to late systematic due to differential decay.
The fractional shift in $\omega_a$ is estimated using simulations to generate and propagate particle distributions. 
In view of our imperfect knowledge of injection parameters we estimate the effect to be
$$\frac{\Delta\omega_a}{\omega_a}\sim 5\pm 6\ {\rm ppb}.$$ 
