\begin{flushright}
D. Rubin\\
June 26, 2018
\end{flushright}
\begin{center}
{\bf \Large E-field Systematic in a Distribution}
\end{center}

Because of the finite curvature of the quadrupoles, the E-field correction to $\omega_a$ can depend on the betatron amplitude as well as the momentum.
The muon that circulates at the magic radius with zero betatron oscillation amplitude will see zero electric field and no correction is required. 
But the muon with that same momentum and finite betatron amplitude will oscillate about the
magic radius and its precession will indeed be effected by the E-field. 
If the quad field were strictly antisymmetric about the magic radius and the betatron trajectory strictly symmetric, the net contribution would be zero.
But neither condition is true. The contribution from the betatron amplitude was estimated analytically in doc-db 12575-v2. Here we explore amplitude
dependence in simulation.  
\section*{Integrated Electric Field}

The dependence of $\omega_a$ on electric field is given by 
\begin{equation}
\vec\omega_a =-\frac{q}{m}\left[a_\mu \vec B-\left(a_\mu -\frac{1}{\gamma^2 -1}\right)\frac{\vec\beta\times\vec E}{c}\right]
\end{equation}
A electric field along the trajectory of a muon will vary as it executes  betatron oscillations and the contribution of the field to $\vec\omega_a$ can be characterized
in terms of an average.   
\begin{equation}
\vec\omega_a =-\frac{q}{m}\left[a_\mu \vec B-\left(a_\mu -\frac{1}{\gamma^2 -1}\right)\int\frac{\vec\beta\times\vec E}{c}\frac{dt}{T}\right]
\end{equation}
The fractional correction to $\vec\omega_a$ is 
$$\vec C_e \sim 2\frac{\Delta p}{p}\int\frac{\vec\beta\times\vec E}{Bc}\frac{dt}{T}$$
Of course the component of $\vec C_e$ in the vertical is the largest.

In simulation we integrated $\vec \beta \times \vec E$ along the trajectory of each muon to estimate $C_e$. Results for individual trajectories
are shown in Figure ~\ref{fg:single} where the average integrated $\vec \beta\times \vec E$ is plotted as a function of time for
a muon with $\Delta p/p=0.2\%$ and betatron amplitude $a_x = 0.74,39.7,64.3,$ and $97.7$ mm-mrad respectively. (The amplitude
$a_x = (\gamma x^2 +2\alpha x x^\prime + \beta (x^\prime)^2)^{1/2}$
The effect of the electric field is mitigated (a bit) with increasing betatron amplitude. 
The oscillation of the correction at early times reflects the alternating sign of the contribution with radial displacement
with a maximum discrepancy at the level of $\sim 5\%$.
\begin{figure}[tb]
 \begin{center}
 \includegraphics*[width=0.8\textwidth,angle=0, trim= 0 0 0 0, clip=.true.]{EfieldCor4Amps.pdf}
\caption{Efield correction to $a_\mu$ at $\Delta p/p=0.2$\% and 4 different betatron amplitudes}
\label{fg:single}
 \end{center}
 \end{figure}

\section*{Distribution}
In the same way we evaluate the electric field correction for a distribution of particles. 
The initial distribution is generated in the start to ring simulation\cite{Diktys}. The temporal distribution
is as measured\cite{stoughton}.  The particles are
propagated through the injection line, inflector and into the ring. The kicker pulse shape is assumed as measured but
with design field of 292 G. The captured muons (about 2\% of the initial distribution) are propagated around the ring
through 4000 turns. There is no decay. The radial phase space distribution at turn 4000 is shown in Figure ~\ref{fg:phasespace}
and the momentum distribution in Figure ~\ref{fg:dp}.

\begin{figure}[tb]
 \begin{center}
 \includegraphics*[width=0.8\textwidth,angle=0, trim= 0 0 0 0, clip=.true.]{BetaCrossE-phasespace.pdf}
\caption{Radial phase space at turn 4000}
\label{fg:phasespace}
 \end{center}
 \end{figure}

\begin{figure}[tb]
 \begin{center}
 \includegraphics*[width=0.8\textwidth,angle=0, trim= 0 0 0 0, clip=.true.]{BetaCrossE-dp.pdf}
\caption{Momentum distribution}
\label{fg:dp}
 \end{center}
 \end{figure}

\begin{figure}[tb]
 \begin{center}
 \includegraphics*[width=0.8\textwidth,angle=0, trim= 0 0 0 0, clip=.true.]{BetaCrossE-c-vs-e.pdf}
\caption{Efield correction as a function of momentum offset}
\label{fg:EfieldVsDp}
 \end{center}
 \end{figure}
The efield correction is shown in Figure ~\ref{fg:EfieldVsDp} as a function of momentum offset. The quadratic dependence is evident.
The correction is plotted as a function of betatron amplitude in Figure ~\ref{fg:efieldVsA}. There is no obvious correlation..
\begin{figure}[tb]
 \begin{center}
 \includegraphics*[width=0.8\textwidth,angle=0, trim= 0 0 0 0, clip=.true.]{BetaCrossE-amp.pdf}
\caption{Efield correction vs betatron amplitude}
\label{fg:efieldVsA}
 \end{center}
 \end{figure}

%        BetaCrossE-c-vs-e.pdf     BetaCrossE-dp.pdf         BetaCrossE-phasespace.pdf

\begin{thebibliography}{9}

\bibitem{Diktys}
    D. Stratakis, `` 400,000 particles at the end of M5'', DocDb 4461-v1
\bibitem{stoughton}
C. Stoughton,``Simulated pulses for Kicker upgrades” C. Stoughton in docdb 11721
\end{thebibliography}
