betaFeedback

WorksPhysics and Astronomy

Beam Transport Through a Quadrupole with Offsets in Both Transverse Planes

Abstract

In accelerator switchyards with shared magnets, a beam may traverse a quadrupole with offsets in both transverse planes, a configuration that cannot be represented by a single conventional horizontal or vertical combined-function bend. Such an off-axis quadrupole bends the reference trajectory and generates dispersion simultaneously in both planes. We derive a compact analytical 6×66\times6 transfer matrix about the curved reference trajectory. The model is formulated in Bishop coordinates using a weak-curvature approximation that retains the longitudinal variation of both reference-curvature components and the resulting dispersion in both transverse planes. The analytical linear model is compared with a sliced representation based on conventional second-order combined-function bend maps and with direct numerical integration of the Lorentz equations in the ideal Cartesian quadrupole field.

Introduction

The European XFEL superconducting accelerator was designed to produce electron bunches with energies up to 17.5 GeV in burst-mode operation at a repetition rate of 10 Hz. Each burst can contain up to 2700 electron bunches, yielding a total of 27,000 bunches per second [1]. Within each pulse train, a fast kicker system in the switchyard distributes bunches towards three undulator lines or directs them to the main accelerator dump if they are not intended for lasing. The switchyard therefore constitutes a complex beam-distribution system, see Figure 1.

Layout of the European XFEL switchyard and undulator branches

Figure 1. Layout of the European XFEL switchyard and undulator branches. Several magnets are shared between different beamlines.

Because of the high electron energy and the geometric constraints, it is technically challenging to fully separate all beamlines. Consequently, several quadrupole magnets in the switchyard effectively belong to multiple lines: for one beamline a given magnet operates as a conventional quadrupole, whereas for another beamline, passing through the same magnet with a transverse offset, it experiences both dipole bending and quadrupole focusing. Even for an offset in only one transverse plane, an off-axis quadrupole is not, in general, equivalent to a conventional combined-function bend. As the reference particle moves through the quadrupole, its transverse offset changes and hence the corresponding reference curvature varies along the magnet. A conventional combined-function bend with prescribed constant curvature can nevertheless provide a useful approximation in this case.

The situation becomes more complicated when the beam has offsets in both transverse planes, Figure 2(a). The reference trajectory then bends simultaneously in both directions, with two generally varying curvature components, and generates dispersion in both xx and yy. Such a trajectory cannot be represented by a single conventional horizontal or vertical combined-function bend.

A reference entering a shared quadrupole with horizontal and vertical offsets, and the original alternating horizontal and vertical combined-function construction

Figure 2. (a) A reference entering a shared quadrupole with horizontal and vertical offsets. (b) The original alternating horizontal and vertical combined-function construction. The drawing is schematic.

To address this limitation within existing accelerator codes, a sliced-bend representation has previously been implemented at the European XFEL, as illustrated in Figure 2(b). In this approach, the quadrupole is decomposed into a sequence of alternating horizontal and vertical combined-function segments. For parallel entry, the nominal curvatures are set by the entrance offsets:

hx(0)=k1a,hy(0)=−k1b,h_x(0) = k_1 a,\qquad h_y(0) = -k_1 b,

where a=X0(0)a = X_0(0) and b=Y0(0)b = Y_0(0) are measured from the magnet axis, and k1=qG/p0k_1 = qG/p_0 is the normalized quadrupole strength, with signed charge qq, reference momentum p0p_0 and laboratory gradient G=∂By/∂XG = \partial B_y/\partial X.

Numerical tracking showed that, for sufficiently short slices, this construction can provide a satisfactory approximation to the particle motion. Its applicability is expected when the curvature-related corrections remain small compared with the dominant quadrupole focusing. It is, however, cumbersome for lattice modelling: a single physical magnet must be replaced by tens or hundreds of individual elements, making the lattice more complicated and the representation less convenient for codes such as MAD8 [2] or Ocelot [3].

Instead of replacing the offset quadrupole by many short slices, we describe it with a single linear matrix. This provides a convenient representation within the Ocelot lattice structure, avoiding manual slicing of long elements into hundreds of segments.

In this work, we derive an analytical linear model and the corresponding 6×66 \times6 transfer matrix for a quadrupole traversed off axis in both transverse planes. We first introduce the coordinate system and Hamiltonian for the off-axis reference trajectory. We then derive the local vector potential and, under the relevant small-curvature and small-angle approximations, obtain the quadratic Hamiltonian and the corresponding linear transfer matrix. The model is subsequently compared with numerical tracking in the ideal quadrupole body field. The corresponding local vector potential is derived in Appendix A. The magnetic model is a straight, ideal constant-gradient body; fringe fields, radiation, and collective effects are not included.

Hamiltonian for a quadrupole with offsets in both planes

Coordinate system and Hamiltonian

For completeness, we briefly review the curvilinear coordinate system and the magnetic Hamiltonian used below. The formulation follows standard canonical beam-dynamics treatments [4, 5, 6]. We employ a Bishop frame [7, 8] (see Figure 3(a)), in which the transverse basis is transported without rotation about the reference tangent. The corresponding transport equations are equivalent to those used by Ripken and Schmidt [4], but we relax their restriction to piecewise-planar reference trajectories, allowing simultaneous curvature in both transverse directions. We use capital letters (XX, YY, ZZ) for the fixed coordinates of the magnet, with ZZ along its axis. For an ideal quadrupole with constant gradient G=∂BY/∂XG = \partial B_Y/\partial X, the field and normalized strength are

Reference geometry for an off-axis trajectory through an ideal quadrupole

Figure 3. Reference geometry for an off-axis trajectory through an ideal quadrupole. (a) The reference trajectory and associated Bishop frame. (b) The corresponding curvature components along the reference trajectory.

B=G(YX0),b=qBp0=k1(YX0),k1=qGp0.(1)\mathbf{B}=G\begin{pmatrix}Y\\X\\0\end{pmatrix},\qquad\mathbf{b}=\frac{q\mathbf{B}}{p_0}=k_1\begin{pmatrix}Y\\X\\0\end{pmatrix},\qquad k_1=\frac{qG}{p_0}. \tag*{(1)}

Here qq is the signed particle charge and p0p_0 is the reference momentum. With this convention, positive k1k_1 corresponds to horizontal focusing.

The reference trajectory r0=(X0,Y0,Z0)\mathbf{r}_0=(X_0,Y_0,Z_0) satisfies

r0′=t,t′=t×b(r0),∣t∣=1,(2)\mathbf{r}_0'=\mathbf{t},\qquad\mathbf{t}'=\mathbf{t}\times\mathbf{b}(\mathbf{r}_0),\qquad\lvert\mathbf{t}\rvert=1, \tag*{(2)}

where primes denote derivatives with respect to the reference arc length ss. Particle deviations from this trajectory are described by the local transverse coordinates x,yx,y.

Following the beam-optics notation of Ref. [4], we write

r(x,y,s)=r0(s)+xex(s)+yey(s).(3)\mathbf{r}(x,y,s)=\mathbf{r}_0(s)+x\mathbf{e}_x(s)+y\mathbf{e}_y(s). \tag*{(3)}

The right-handed orthonormal Bishop frame obeys

ex′=hxt,ey′=hyt,t′=−hxex−hyey.(4)\mathbf{e}_x'=h_x\mathbf{t},\qquad\mathbf{e}_y'=h_y\mathbf{t},\qquad\mathbf{t}'=-h_x\mathbf{e}_x-h_y\mathbf{e}_y. \tag*{(4)}

Both curvature components hxh_x and hyh_y may be nonzero simultaneously. The position differential is

dr=ex dx+ey dy+gt ds,g=1+hxx+hyy.(5)d\mathbf{r}=\mathbf{e}_x\,dx+\mathbf{e}_y\,dy+g\mathbf{t}\,ds,\qquad g=1+h_xx+h_yy. \tag*{(5)}

Thus, the coordinates are orthogonal, with scale factors (1,1,g)(1,1,g). We assume that particle deviations remain sufficiently small for the local coordinates to be well defined, with g>0g>0.

We use the canonical variables

z=(x,px,y,py,σ,δ)T,σ=sβ0−ct,δ=E−E0p0c.(6)\mathbf{z}=(x,p_x,y,p_y,\sigma,\delta)^T,\qquad\sigma=\frac{s}{\beta_0}-ct,\qquad\delta=\frac{E-E_0}{p_0c}. \tag*{(6)}

The reference particle has velocity β0c\beta_0c, energy E0=γ0mc2E_0=\gamma_0mc^2, and momentum p0=β0γ0mcp_0=\beta_0\gamma_0mc. Here δ\delta is the normalized energy deviation used in the canonical formulation [5], while a late particle has negative σ\sigma.

Let A\mathbf{A} denote the magnetic vector potential, B=∇×A\mathbf{B}=\nabla\times\mathbf{A}, and define its normalized form a=qA/p0\mathbf{a}=q\mathbf{A}/p_0. The transverse canonical momenta px,pyp_x,p_y, normalized to p0p_0, are related to the mechanical momenta by

px=γmvx+qAxp0,πxp0=px−ax,p_x=\frac{\gamma mv_x+qA_x}{p_0},\qquad\frac{\pi_x}{p_0}=p_x-a_x,
py=γmvy+qAyp0,πyp0=py−ay.(7)p_y=\frac{\gamma mv_y+qA_y}{p_0},\qquad\frac{\pi_y}{p_0}=p_y-a_y. \tag*{(7)}

where πi=γmvi\pi_i=\gamma mv_i and vi=v⋅eiv_i=\mathbf{v}\cdot\mathbf{e}_i for i∈{x,y}i\in\{x,y\}. Although the canonical momenta depend on the gauge, the mechanical combinations px−axp_x-a_x and py−ayp_y-a_y are gauge invariant.

In the curvilinear coordinates, the normalized vector potential satisfies

a⋅dr=ax dx+ay dy+As ds,As=g as,as=a⋅t.(8)\mathbf{a} \cdot d\mathbf{r} = a_x\,dx + a_y\,dy + \mathcal{A}_s\,ds,\qquad\mathcal{A}_s = g\,a_s,\qquad a_s = \mathbf{a} \cdot\mathbf{t}. \tag*{(8)}

The corresponding standard Hamiltonian for forward motion, with ss as the independent variable, is [4, 5, 6]

H=δβ0−g1+2δβ0+δ2−(px−ax)2−(py−ay)2−As.(9)H = \frac{\delta}{\beta_0} - g\sqrt{1+\frac{2\delta}{\beta_0}+\delta^2-(p_x-a_x)^2-(p_y-a_y)^2-\mathcal{A}_s}. \tag*{(9)}

Equation (9) is our starting point. Since our objective is to obtain the analytical linear transport matrix, we require the Hamiltonian only through second order in the particle variables. The construction of the local vector potential for the ideal quadrupole body field and its reduction to the form needed for the analytical linear model are presented in Appendix A.

Reference trajectory and geometrical ordering

The curvatures hx(s)h_x(s) and hy(s)h_y(s) entering the curvilinear Hamiltonian are determined by the reference trajectory through the quadrupole. We therefore first obtain the reference orbit and its tangent to the accuracy required for the analytical linear model, and then identify the geometrical terms that can be neglected.

We restrict the analysis to paraxial reference trajectories that remain weakly tilted with respect to the magnet axis throughout the quadrupole,

θx2(s)+θy2(s)≪1,0≤s≤L,(10)\theta_x^2(s)+\theta_y^2(s)\ll1,\qquad0\le s\le L, \tag*{(10)}

where

θx(s)≡tX(s),θy(s)≡tY(s)\theta_x(s)\equiv t_X(s),\qquad\theta_y(s)\equiv t_Y(s)

are the transverse components of the reference tangent.

We choose as reference trajectory the orbit of a particle entering the ideal quadrupole with transverse offsets aa and bb and entrance angles

θx0≡θx(0),θy0≡θy(0).\theta_{x0}\equiv\theta_x(0),\qquad\theta_{y0}\equiv\theta_y(0).

The entrance conditions are therefore

X0(0)=a,Y0(0)=b,Z0(0)=0,t(0)=(θx0θy01−θx02−θy02)≃(θx0θy01).(11)X_0(0)=a,\qquad Y_0(0)=b,\qquad Z_0(0)=0,\qquad\mathbf{t}(0)=\begin{pmatrix}\theta_{x0}\\ \theta_{y0}\\ \sqrt{1-\theta_{x0}^{2}-\theta_{y0}^{2}}\end{pmatrix}\simeq\begin{pmatrix}\theta_{x0}\\ \theta_{y0}\\ 1\end{pmatrix}. \tag*{(11)}

The last approximation follows directly from Eq. (10).

In the paraxial approximation, the reference trajectory obeys the usual quadrupole equations,

X0′′+k1X0=0,Y0′′−k1Y0=0,(12)X_0''+k_1X_0=0,\qquad Y_0''-k_1Y_0=0, \tag*{(12)}

where a prime denotes differentiation with respect to the reference arc length ss. Since tZ=1+O(θx2+θy2)t_Z=1+O(\theta_x^2+\theta_y^2), the reference arc length ss and the laboratory longitudinal coordinate ZZ differ only beyond the order retained here.

The solution of Eq. (12) with the entrance conditions of Eq. (11) is

X0(s)≃aCx(s)+θx0Sx(s),Y0(s)≃bCy(s)+θy0Sy(s),(13)X_0(s)\simeq aC_x(s)+\theta_{x0}S_x(s),\qquad Y_0(s)\simeq bC_y(s)+\theta_{y0}S_y(s), \tag*{(13)}

where CiC_i and SiS_i are the usual quadrupole transport functions. For k1>0k_1>0,

Cx(s)=cos⁡(k1s),Sx(s)=sin⁡(k1s)k1,C_x(s)=\cos\left(\sqrt{k_1}s\right),\qquad S_x(s)=\frac{\sin\left(\sqrt{k_1}s\right)}{\sqrt{k_1}},
Cy(s)=cosh⁡(k1s),Sy(s)=sinh⁡(k1s)k1.(14)C_y(s)=\cosh\left(\sqrt{k_1}s\right),\qquad S_y(s)=\frac{\sinh\left(\sqrt{k_1}s\right)}{\sqrt{k_1}}. \tag*{(14)}

They satisfy

Cx′=−k1Sx,Sx′=Cx,Cy′=k1Sy,Sy′=Cy.(15)C_x'=-k_1S_x,\qquad S_x'=C_x,\qquad C_y'=k_1S_y,\qquad S_y'=C_y. \tag*{(15)}

For k1<0k_1<0, the focusing and defocusing functions are interchanged.

The transverse components of the reference tangent are consequently

θx(s)≡tX(s)≃−k1aSx(s)+θx0Cx(s),\theta_x(s)\equiv t_X(s)\simeq-k_1aS_x(s)+\theta_{x0}C_x(s),
θy(s)≡tY(s)≃k1bSy(s)+θy0Cy(s).(16)\theta_y(s)\equiv t_Y(s)\simeq k_1bS_y(s)+\theta_{y0}C_y(s). \tag*{(16)}

The curvature of the reference trajectory follows directly from the Lorentz equation. Comparing

t′=t×b(r0)\mathbf{t}'=\mathbf{t}\times\mathbf{b}(\mathbf{r}_0)

with the Bishop-frame relation

t′=−hxex−hyey\mathbf{t}'=-h_x\mathbf{e}_x-h_y\mathbf{e}_y

gives

hx=b(r0)⋅ey,hy=−b(r0)⋅ex.(17)h_x=\mathbf{b}(\mathbf{r}_0)\cdot\mathbf{e}_y,\qquad h_y=-\mathbf{b}(\mathbf{r}_0)\cdot\mathbf{e}_x. \tag*{(17)}

Under the small-angle condition of Eq. (10), the local transverse basis remains aligned with the corresponding laboratory transverse directions to the accuracy required here. Substituting the ideal quadrupole field of Eq. (1) into Eq. (17) therefore gives

hx(s)≃k1X0(s)≃k1[aCx(s)+θx0Sx(s)],h_x(s)\simeq k_1X_0(s)\simeq k_1\left[aC_x(s)+\theta_{x0}S_x(s)\right],
hy(s)≃−k1Y0(s)≃−k1[bCy(s)+θy0Sy(s)].(18)h_y(s)\simeq-k_1Y_0(s)\simeq-k_1\left[bC_y(s)+\theta_{y0}S_y(s)\right]. \tag*{(18)}

Thus, unlike in a conventional combined-function bend with prescribed constant curvature, the curvature generated by an off-axis quadrupole generally varies along the reference trajectory, as illustrated schematically in Figure 3(b).

In addition to the paraxial condition of Eq. (10), the analytical model neglects curvature-induced focusing terms that are quadratic in the reference curvatures. We therefore require

hx2(s), hy2(s), ∣hx(s)hy(s)∣≪∣k1∣.(19)h_x^2(s),\ h_y^2(s),\ \lvert h_x(s)h_y(s)\rvert\ll\lvert k_1\rvert. \tag*{(19)}

Using hx≃k1X0h_x \simeq k_1X_0 and hy≃−k1Y0h_y \simeq-k_1Y_0, this condition can be expressed as

∣k1∣X02(s)≪1,∣k1∣Y02(s)≪1,0≤s≤L.(20)\lvert k_1\rvert X_0^2(s) \ll1,\qquad\lvert k_1\rvert Y_0^2(s) \ll1,\qquad0 \leq s \leq L. \tag*{(20)}

Thus, in addition to the small reference angles required by Eq. (10), the reference offsets must remain small compared with the characteristic quadrupole scale 1/∣k1∣1/\sqrt{\lvert k_1\rvert}.

Vector potential for the analytical linear model

The vector potential used in the analytical linear model has the same bending-plus-quadrupole structure as that employed in Ref. [4]. Here, we briefly outline its construction from the ideal Cartesian quadrupole field in Bishop coordinates and identify the approximations under which this form is recovered for a reference trajectory with simultaneous, longitudinally varying curvature in both transverse planes.

We now construct the local vector potential required for the quadratic Hamiltonian. On the reference trajectory, Eq. (17) gives

bx=−hy,by=hx.b_x=-h_y,\qquad b_y=h_x.

To first order in the transverse displacement from the reference trajectory, the quadrupole field therefore becomes

bx=−hy+k1y,by=hx+k1x.(21)b_x=-h_y+k_1y,\qquad b_y=h_x+k_1x. \tag*{(21)}

The longitudinal field component is of higher reference order. On the reference trajectory,

bs=b(r0)⋅t=k1(Y0θx+X0θy),(22)b_s=\mathbf{b}(\mathbf{r}_0)\cdot\mathbf{t}=k_1\left(Y_0\theta_x+X_0\theta_y\right), \tag*{(22)}

and is therefore second order in the reference offsets and angles. Its variation across the transverse plane first contributes beyond the quadratic Hamiltonian retained here. We therefore use

bx=−hy+k1y,by=hx+k1x,bs=0.(23)b_x=-h_y+k_1y,\qquad b_y=h_x+k_1x,\qquad b_s=0. \tag*{(23)}

At this order a gauge may be chosen with

ax=ay=0.a_x=a_y=0.

The Bishop-coordinate curl equations then reduce to

bx=1g∂yAs,by=−1g∂xAs,(24)b_x=\frac{1}{g}\partial_y\mathcal{A}_s,\qquad b_y=-\frac{1}{g}\partial_x\mathcal{A}_s, \tag*{(24)}

where

g=1+hxx+hyy.g=1+h_xx+h_yy.

Terms generated by the factor gg that are quadratic in the reference curvatures are neglected according to Eq. (19), while terms quadratic in the transverse coordinates contribute only beyond the quadratic Hamiltonian. To the required accuracy,

∂yAs=−hy+k1y,∂xAs=−hx−k1x,\partial_y\mathcal{A}_s=-h_y+k_1y,\qquad\partial_x\mathcal{A}_s=-h_x-k_1x,

and hence

ax=ay=0,As=a0(s)−hx(s)x−hy(s)y−k12(x2−y2).(25)a_x=a_y=0,\qquad\mathcal{A}_s=a_0(s)-h_x(s)x-h_y(s)y-\frac{k_1}{2}\left(x^2-y^2\right). \tag*{(25)}

Here a0(s)=As(0,0,s)a_0(s)=\mathcal{A}_s(0,0,s) is gauge dependent and does not affect the equations of motion.

The resulting expression agrees, to the order retained, with the conventional bending-plus-quadrupole vector potential of Ref. [4]. The full construction and the higher-order terms neglected in this approximation are discussed in Appendix A.

Quadratic Hamiltonian

We now expand the Hamiltonian in the particle variables, counting xx, pxp_x, yy, pyp_y, δ\delta as first degree. The reference quantities hx(s)h_x(s) and hy(s)h_y(s) are treated as prescribed coefficient functions. With

u=hxx+hyy,u=h_xx+h_yy,

substitution of Eq. (25) into Eq. (9) gives, through second particle degree,

1+2δ/β0+δ2−px2−py2=1+δβ0+px2+py22−δ22β02γ02+O(3),\sqrt{1+2\delta/\beta_0+\delta^2-p_x^2-p_y^2}=1+\frac{\delta}{\beta_0}+\frac{p_x^2+p_y^2}{2}-\frac{\delta^2}{2\beta_0^2\gamma_0^2}+O(3),
g⋯=1+u+δβ0+uδβ0−px2+py22−δ22β02γ02+O(3).(26)g\sqrt{\cdots}=1+u+\frac{\delta}{\beta_0}+\frac{u\delta}{\beta_0}-\frac{p_x^2+p_y^2}{2}-\frac{\delta^2}{2\beta_0^2\gamma_0^2}+O(3). \tag*{(26)}

The term linear in δ\delta cancels between the first term of Eq. (9) and the square-root contribution. Likewise, the term −u-u from the square-root part cancels the +u+u contribution from −As-\mathcal{A}_s. Thus the terms linear in the particle variables vanish, as expected for an expansion about the reference trajectory. The remaining term −1−a0(s)-1-a_0(s), which is independent of the phase-space variables, may be dropped without affecting the equations of motion.

The quadratic Hamiltonian of the analytical linear model is therefore

H2,lin=px2+py22+k12(x2−y2)−δβ0[hx(s)x+hy(s)y]+δ22β02γ02.(27)H_{2,\mathrm{lin}}=\frac{p_x^2+p_y^2}{2}+\frac{k_1}{2}(x^2-y^2)-\frac{\delta}{\beta_0}\left[h_x(s)x+h_y(s)y\right]+\frac{\delta^2}{2\beta_0^2\gamma_0^2}. \tag*{(27)}

The term

−δβ0[hx(s)x+hy(s)y]-\frac{\delta}{\beta_0}\left[h_x(s)x+h_y(s)y\right]

couples the energy deviation to the transverse motion and drives dispersion in both planes.

Analytical linear transfer matrix

Hamilton equations

We now solve the linear equations generated by the quadratic Hamiltonian of Eq. (27). For the canonical pairs (x,px)(x,p_x), (y,py)(y,p_y), and (σ,δ)(\sigma,\delta), Hamilton’s equations give

x′=∂H2,lin∂px=px,px′=−∂H2,lin∂x=−k1x+hx(s)β0δ,y′=∂H2,lin∂py=py,py′=−∂H2,lin∂y=k1y+hy(s)β0δ,σ′=∂H2,lin∂δ=δβ02γ02−hx(s)x+hy(s)yβ0,δ′=−∂H2,lin∂σ=0.(28)\begin{aligned} x'&=\frac{\partial H_{2,\mathrm{lin}}}{\partial p_x}=p_x, &\qquad p_x'&=-\frac{\partial H_{2,\mathrm{lin}}}{\partial x}=-k_1x+\frac{h_x(s)}{\beta_0}\delta,\\ y'&=\frac{\partial H_{2,\mathrm{lin}}}{\partial p_y}=p_y, &\qquad p_y'&=-\frac{\partial H_{2,\mathrm{lin}}}{\partial y}=k_1y+\frac{h_y(s)}{\beta_0}\delta,\\ \sigma'&=\frac{\partial H_{2,\mathrm{lin}}}{\partial\delta}=\frac{\delta}{\beta_0^2\gamma_0^2}-\frac{h_x(s)x+h_y(s)y}{\beta_0}, &\qquad\delta'&=-\frac{\partial H_{2,\mathrm{lin}}}{\partial\sigma}=0. \tag*{(28)} \end{aligned}

In particular, δ\delta is constant through the element. Combining the canonical equations in each transverse plane gives

x′′+k1x=hx(s)β0δ,y′′−k1y=hy(s)β0δ.(29)x''+k_1x=\frac{h_x(s)}{\beta_0}\delta,\qquad y''-k_1y=\frac{h_y(s)}{\beta_0}\delta. \tag*{(29)}

Homogeneous quadrupole motion

Without the energy-dependent forcing, Eq. (29) reduces to the ordinary quadrupole equations already encountered for the reference trajectory. Using the same transport functions CiC_i and SiS_i, the homogeneous solution is therefore

xh(s)=Cx(s)x(0)+Sx(s)px(0),yh(s)=Cy(s)y(0)+Sy(s)py(0).(30)x_{\mathrm{h}}(s)=C_x(s)x(0)+S_x(s)p_x(0), \qquad y_{\mathrm{h}}(s)=C_y(s)y(0)+S_y(s)p_y(0). \tag*{(30)}

Here x′=pxx'=p_x and y′=pyy'=p_y follow directly from Eq. (28).

Dispersive contribution

Since δ\delta is constant, the full transverse solution can be written as the homogeneous quadrupole motion plus the response to the energy deviation,

x(s)=Cx(s)x(0)+Sx(s)px(0)+Dx(s)δ(0),y(s)=Cy(s)y(0)+Sy(s)py(0)+Dy(s)δ(0).(31)\begin{aligned} x(s)&=C_x(s)x(0)+S_x(s)p_x(0)+D_x(s)\delta(0),\\ y(s)&=C_y(s)y(0)+S_y(s)p_y(0)+D_y(s)\delta(0). \tag*{(31)} \end{aligned}

Substituting Eq. (31) into Eq. (29) gives

Dx′′+k1Dx=hx(s)β0,Dy′′−k1Dy=hy(s)β0.(32)D_x''+k_1D_x=\frac{h_x(s)}{\beta_0}, \qquad D_y''-k_1D_y=\frac{h_y(s)}{\beta_0}. \tag*{(32)}

with

Dx(0)=Dx′(0)=Dy(0)=Dy′(0)=0.D_x(0)=D_x'(0)=D_y(0)=D_y'(0)=0.

Using the varying reference curvatures of Eq. (18),

hx(s)≃k1[aCx(s)+θx0Sx(s)],hy(s)≃−k1[bCy(s)+θy0Sy(s)],h_x(s)\simeq k_1\left[aC_x(s)+\theta_{x0}S_x(s)\right], \qquad h_y(s)\simeq-k_1\left[bC_y(s)+\theta_{y0}S_y(s)\right],

the dispersion equations become

Dx′′+k1Dx=k1β0[aCx(s)+θx0Sx(s)],Dy′′−k1Dy=−k1β0[bCy(s)+θy0Sy(s)].(33)\begin{aligned} D_x''+k_1D_x&=\frac{k_1}{\beta_0}\left[aC_x(s)+\theta_{x0}S_x(s)\right],\\ D_y''-k_1D_y&=-\frac{k_1}{\beta_0}\left[bC_y(s)+\theta_{y0}S_y(s)\right]. \tag*{(33)} \end{aligned}

The particular ss dependence of the reference curvatures again allows the dispersion equations to be solved analytically. In addition to

(sSx2)′′+k1sSx2=Cx,(sSy2)′′−k1sSy2=Cy,(34)\left(\frac{sS_x}{2}\right)''+k_1\frac{sS_x}{2}=C_x, \qquad\left(\frac{sS_y}{2}\right)''-k_1\frac{sS_y}{2}=C_y, \tag*{(34)}

the sine-like terms satisfy

(Sx−sCx2k1)′′+k1Sx−sCx2k1=Sx,(sCy−Sy2k1)′′−k1sCy−Sy2k1=Sy.(35)\left(\frac{S_x-sC_x}{2k_1}\right)''+k_1\frac{S_x-sC_x}{2k_1}=S_x, \qquad\left(\frac{sC_y-S_y}{2k_1}\right)''-k_1\frac{sC_y-S_y}{2k_1}=S_y. \tag*{(35)}

These identities provide the particular solutions associated with the Ci(s)C_i(s)- and Si(s)S_i(s)-dependent forcing terms in Eq. (33). We therefore obtain

Dx(s)=k1a2β0sSx(s)+θx02β0[Sx(s)−sCx(s)],Dy(s)=−k1b2β0sSy(s)+θy02β0[Sy(s)−sCy(s)].(36)\begin{aligned} D_x(s)&=\frac{k_1a}{2\beta_0}sS_x(s)+\frac{\theta_{x0}}{2\beta_0}\left[S_x(s)-sC_x(s)\right],\\ D_y(s)&=-\frac{k_1b}{2\beta_0}sS_y(s)+\frac{\theta_{y0}}{2\beta_0}\left[S_y(s)-sC_y(s)\right]. \tag*{(36)} \end{aligned}

At the exit reference arc length s=Ls=L,

Dx=12β0[k1aLSx+θx0(Sx−LCx)],D_x=\frac{1}{2\beta_0}\left[k_1aLS_x+\theta_{x0}(S_x-LC_x)\right],
Dx′=k12β0[a(Sx+LCx)+θx0LSx],D'_x=\frac{k_1}{2\beta_0}\left[a(S_x+LC_x)+\theta_{x0}LS_x\right],
Dy=12β0[−k1bLSy+θy0(Sy−LCy)],D_y=\frac{1}{2\beta_0}\left[-k_1bLS_y+\theta_{y0}(S_y-LC_y)\right],
Dy′=−k12β0[b(Sy+LCy)+θy0LSy](37)D'_y=-\frac{k_1}{2\beta_0}\left[b(S_y+LC_y)+\theta_{y0}LS_y\right] \tag*{(37)}

Here and below, unlabelled functions CiC_i and SiS_i are evaluated at s=Ls=L.

Longitudinal motion and transfer matrix

The longitudinal equation in Eq. (28) is

σ′=δβ02γ02−hx(s)x+hy(s)yβ0(38)\sigma'=\frac{\delta}{\beta_0^2\gamma_0^2}-\frac{h_x(s)x+h_y(s)y}{\beta_0} \tag*{(38)}

Since δ\delta is constant, the transverse solutions obtained above determine the complete longitudinal response. Because the map is generated by the quadratic Hamiltonian Eq. (27), it is symplectic. Once the dispersive coefficients DxD_x, Dx′D'_x, DyD_y, Dy′D'_y are known, symplecticity fixes the corresponding transverse-to-longitudinal coefficients:

Ux=−k1SxDx−CxDx′,Vx=CxDx−SxDx′,U_x=-k_1S_xD_x-C_xD'_x,\qquad V_x=C_xD_x-S_xD'_x,
Uy=k1SyDy−CyDy′,Vy=CyDy−SyDy′(39)U_y=k_1S_yD_y-C_yD'_y,\qquad V_y=C_yD_y-S_yD'_y \tag*{(39)}

The remaining longitudinal coefficient follows directly from integrating Eq. (38),

R56=Lβ02γ02−1β0∫0L[hx(s)Dx(s)+hy(s)Dy(s)] ds(40)R_{56}=\frac{L}{\beta_0^2\gamma_0^2}-\frac{1}{\beta_0}\int_0^L\left[h_x(s)D_x(s)+h_y(s)D_y(s)\right]\,ds \tag*{(40)}

Collecting the transverse and longitudinal solutions, the transfer matrix in the coordinate order of Eq. (6) is therefore

Rlin(L)=(CxSx000Dx−k1SxCx000Dx′00CySy0Dy00k1SyCy0Dy′UxVxUyVy1R56000001)(41)R_{\mathrm{lin}}(L)= \begin{pmatrix} C_x&S_x&0&0&0&D_x\\ -k_1S_x&C_x&0&0&0&D'_x\\ 0&0&C_y&S_y&0&D_y\\ 0&0&k_1S_y&C_y&0&D'_y\\ U_x&V_x&U_y&V_y&1&R_{56}\\ 0&0&0&0&0&1 \end{pmatrix} \tag*{(41)}

All transverse and dispersive coefficients are given explicitly above. Equation (41) is symplectic in the canonical variables of Eq. (6).

For completeness, the integral in Eq. (40) can also be evaluated analytically. The result is

R56=Lβ02γ02−Fx+Fy8β02(42)R_{56}=\frac{L}{\beta_0^2\gamma_0^2}-\frac{\mathcal{F}_x+\mathcal{F}_y}{8\beta_0^2} \tag*{(42)}

where the explicit expressions for Fx\mathcal{F}_x and Fy\mathcal{F}_y are given in Appendix A3.

One-plane limit and constant-curvature approximation

Consider the special case of a horizontal entrance offset with no vertical offset or angle and, for simplicity, zero horizontal entrance angle,

b=θy0=θx0=0.b = \theta_{y0} = \theta_{x0} = 0.

The reference curvature then has only a horizontal component,

hx(s)≃k1aCx(s),hy(s)=0.(43)h_x(s) \simeq k_1 a C_x(s), \qquad h_y(s) = 0. \tag*{(43)}

Thus an off-axis quadrupole in one transverse plane resembles a combined-function magnet, but its effective curvature is generally not constant along the reference trajectory.

A conventional combined-function element with the same entrance curvature would instead use

h0=k1a=const.h_0 = k_1 a = \mathrm{const}.

Within the weak-curvature approximation, the curvature-induced focusing term h02h_0^2 is negligible compared with k1k_1, since

h02∣k1∣=∣k1∣a2≪1.\frac{h_0^2}{\lvert k_1\rvert} = \lvert k_1\rvert a^2 \ll1.

The principal difference between the two descriptions therefore comes from the longitudinal variation of the reference curvature. For example, the horizontal position-dispersion coefficients are

Dx=k1aLSx2β0,Dx(h0)=aβ0(1−Cx),(44)D_x = \frac{k_1 a L S_x}{2\beta_0}, \qquad D_x^{(h_0)} = \frac{a}{\beta_0}(1-C_x), \tag*{(44)}

for the offset quadrupole and the constant-curvature approximation, respectively. The two coincide in the weak-lens limit ∣k1∣L2≪1\lvert k_1\rvert L^2 \ll1, but need not agree for a sufficiently strong or long quadrupole.

Comparison with numerical tracking and the bend-slice model

We compare the analytical linear model of Eq. (41) with two independent calculations. The first is direct numerical integration of the Lorentz equations in the ideal Cartesian quadrupole field and is used as the reference solution. The second is a conventional bend-slice representation, in which the off-axis quadrupole is approximated by a sequence of horizontal and vertical combined-function bends, see Figure 2.

For the illustrative example considered below we use

L=1 m,k1=1 m−2,(a,b)=(0.02,0.03) m,(θy0=θx0=0) rad,(45)L = 1\ \mathrm{m}, \qquad k_1 = 1\ \mathrm{m}^{-2}, \qquad(a,b) = (0.02,0.03)\ \mathrm{m}, \qquad(\theta_{y0} = \theta_{x0} = 0)\ \mathrm{rad}, \tag*{(45)}

with parallel entrance conditions and β0=1\beta_0 = 1. LL denotes the reference arc length

Bend-slice model

For an entrance offset (a,b)(a,b), the nominal horizontal and vertical bending components are fixed by

hx=k1a,hy=−k1b.(46)h_x = k_1 a, \qquad h_y = -k_1 b. \tag*{(46)}

The quadrupole is divided into nn longitudinal intervals. Each interval is represented by a horizontal and a vertical combined-function bend of length L/(2n)L/(2n). Since each bending component acts over only half of the interval, the corresponding bending angles are

θx=hxLn,θy=hyLn.(47)\theta_x = \frac{h_x L}{n}, \qquad\theta_y = \frac{h_y L}{n}. \tag*{(47)}

Such a representation can be constructed using standard combined-function bend elements available in accelerator codes such as MAD8/MAD-X and Ocelot [3, 9] [2]. The calculations shown here use the second-order maps implemented in Ocelot. We use n=8192n = 8192, for which further refinement produces negligible changes in the quantities shown below.

Direct numerical reference

As an independent reference, particle trajectories are obtained by direct integration of the Lorentz equations in the ideal quadrupole field of Eq. (1). Using the laboratory coordinate ZZ as the independent variable and normalized mechanical momenta Pi=pi/p0P_i = p_i/p_0, the transverse equations are

dXdZ=PXPZ,dPXdZ=−k1X,dYdZ=PYPZ,dPYdZ=k1Y.(48)\frac{dX}{dZ} = \frac{P_X}{P_Z}, \qquad\frac{dP_X}{dZ} = -k_1X, \\ \frac{dY}{dZ} = \frac{P_Y}{P_Z}, \qquad\frac{dP_Y}{dZ} = k_1Y. \tag*{(48)}

with

PZ=1+2δβ0+δ2−PX2−PY2.(49)P_Z = \sqrt{1+\frac{2\delta}{\beta_0}+\delta^2-P_X^2-P_Y^2}. \tag*{(49)}

The trajectories are integrated with the DOP853 algorithm. The numerical solution therefore uses only the Cartesian quadrupole field and does not rely on either the curvilinear Hamiltonian or the bend-slice approximation.

To compare the numerical trajectories with the analytical transfer matrix, the particle coordinates and momenta must be expressed in the same curvilinear coordinate system. Both the reference particle and the test particles are tracked in the fixed Cartesian coordinates of the magnet. At a given reference arc length ss, we identify the point r\mathbf{r} on the test-particle trajectory that lies in the plane perpendicular to the reference tangent t(s)\mathbf{t}(s). This point is determined by the condition

[r−r0(s)]⋅t(s)=0.(50)[\mathbf{r}-\mathbf{r}_0(s)]\cdot\mathbf{t}(s)=0. \tag*{(50)}

The displacement from the reference trajectory, Δr=r−r0(s)\Delta\mathbf{r}=\mathbf{r}-\mathbf{r}_0(s), is then projected onto the local Bishop basis to obtain the transverse coordinates,

x=Δr⋅ex(s),y=Δr⋅ey(s).(51)x=\Delta\mathbf{r}\cdot\mathbf{e}_x(s), \qquad y=\Delta\mathbf{r}\cdot\mathbf{e}_y(s). \tag*{(51)}

The corresponding transverse mechanical momenta are obtained by projecting the Cartesian particle momentum P\mathbf{P} onto the same basis,

πxp0=P⋅ex(s),πyp0=P⋅ey(s).(52)\frac{\pi_x}{p_0}=\mathbf{P}\cdot\mathbf{e}_x(s), \qquad\frac{\pi_y}{p_0}=\mathbf{P}\cdot\mathbf{e}_y(s). \tag*{(52)}

The projected mechanical momenta are converted to canonical momenta according to

px=πxp0+ax,py=πyp0+ay,p_x=\frac{\pi_x}{p_0}+a_x, \qquad p_y=\frac{\pi_y}{p_0}+a_y,

where the transverse vector-potential components are evaluated in the Poincaré gauge of Appendix A, using Eq. (69). The inverse transformation is applied when initializing particles from canonical phase-space coordinates. Although these components are neglected in the analytical weak-curvature model, they are retained in the numerical coordinate transformation.

The longitudinal coordinate is evaluated using the same convention as in Eq. (6),

σ=sβ0−ct,(53)\sigma=\frac{s}{\beta_0}-ct, \tag*{(53)}

with the particle arrival time obtained together with the numerical trajectory. The resulting numerical state is therefore expressed in the same coordinates

ξ=(x,px,y,py,σ,δ)T(54)\xi=(x,p_x,y,p_y,\sigma,\delta)^{T} \tag*{(54)}

as the analytical map. The numerical derivatives below are evaluated about the reference state ξ=0\xi=0.

For each initial coordinate ξj\xi_j, we introduce a small perturbation ϵj\epsilon_j, while keeping all other initial coordinates unchanged. Two particles are therefore tracked, with

ξj=+ϵjandξj=−ϵj.\xi_j=+\epsilon_j \qquad\text{and}\qquad\xi_j=-\epsilon_j.

Let ξif(s;+ϵj)\xi_i^f(s;+\epsilon_j) and ξif(s;−ϵj)\xi_i^f(s;-\epsilon_j) denote the corresponding values of the ii-th phase-space coordinate after tracking to position ss. The centered finite-difference derivative is then

Dij(s;ϵj)=ξif(s;+ϵj)−ξif(s;−ϵj)2ϵj,i,j=1,…,6.(55)D_{ij}(s;\epsilon_j)=\frac{\xi_i^f(s;+\epsilon_j)-\xi_i^f(s;-\epsilon_j)}{2\epsilon_j}, \qquad i,j=1,\ldots,6. \tag*{(55)}

For example, the element R11R_{11}, which describes the dependence of the final horizontal position on the initial horizontal position, is evaluated as

D11(s;ϵx)=xf(s;xi=+ϵx)−xf(s;xi=−ϵx)2ϵx,(56)D_{11}(s;\epsilon_x)=\frac{x_f(s;x_i=+\epsilon_x)-x_f(s;x_i=-\epsilon_x)}{2\epsilon_x}, \tag*{(56)}

with all other initial phase-space coordinates kept fixed. The remaining matrix elements are obtained in the same way by perturbing each initial coordinate in turn.

For sufficiently small ϵj\epsilon_j, the centered finite difference has the expansion

Dij(s;ϵj)=Rij(s)+cij(s)ϵj2+O(ϵj4),(57)D_{ij}(s;\epsilon_j)=R_{ij}(s)+c_{ij}(s)\epsilon_j^2+O(\epsilon_j^4), \tag*{(57)}

where Rij(s)R_{ij}(s) is the corresponding element of the first-order transfer matrix.

To reduce the dependence on the chosen perturbation size, the calculation is repeated with the step ϵj/2\epsilon_j/2. The leading O(ϵj2)O(\epsilon_j^2) finite-difference error is then removed using Richardson extrapolation [10],

Rijnum(s)=4Dij(s;ϵj/2)−Dij(s;ϵj)3+O(ϵj4).(58)R_{ij}^{\mathrm{num}}(s)=\frac{4D_{ij}(s;\epsilon_j/2)-D_{ij}(s;\epsilon_j)}{3}+O(\epsilon_j^4). \tag*{(58)}

Repeating this procedure for all six initial phase-space coordinates gives the complete numerical 6×66\times6 first-order transfer matrix Rnum(s)R^{\mathrm{num}}(s).

Comparison

Figure 4 compares the first-order transfer matrices of the analytical linear model (ALM) and the bend-slice model with direct numerical tracking. For the matrix elements included in the comparison, we show the relative difference

Comparison of the first-order transfer matrices in canonical coordinates with direct numerical tracking

Figure 4. Comparison of the first-order transfer matrices in canonical coordinates with direct numerical tracking. (a) Analytical linear model. (b) Bend-slice model. Gray dashes indicate elements below numerical resolution, while gray dots indicate excluded cross-plane coupling terms. Both panels use the same relative-error scale.

Δij(m)=Rij(m)−RijnumRijnum,m∈{ALM,slice}.(59)\Delta_{ij}^{(m)}=\frac{R_{ij}^{(m)}-R_{ij}^{\mathrm{num}}}{R_{ij}^{\mathrm{num}}}, \qquad m\in\{\mathrm{ALM},\mathrm{slice}\}. \tag*{(59)}

Elements below the numerical resolution and transverse cross-plane coupling terms, which are neglected in both approximate models, are excluded from the comparison. For the sliced model, the matrix coefficients are taken in its native bend-map coordinates; the reference geometry is examined separately below.

Both models show comparable accuracy for the transverse betatron motion, with the bend-slice model being slightly more accurate for some elements due to the retained curvature-squared focusing terms. A more significant difference is found in the dispersive and longitudinal coefficients, where the analytical model agrees substantially better with numerical tracking. This improvement results from retaining the longitudinal variation of the reference curvature.

We next compare the transverse particle deviations. The analytical model uses the linear matrix of Eq. (41), whereas the bend-slice model uses the full second-order maps of the individual slices. The error relative to direct numerical tracking is defined as

Δr⊥=(x−xnum)2+(y−ynum)2,(60)\Delta r_{\perp} = \sqrt{(x-x_{\mathrm{num}})^2+(y-y_{\mathrm{num}})^2}, \tag*{(60)}

where the transverse coordinates are measured relative to the reference trajectory of each model at s=Ls=L. Thus, the comparison concerns local particle transport and does not include errors in the reference survey. Figure 5(a) shows the exit error as a function of the entrance energy deviation δ\delta for the nominal offsets. In panel (b), the offsets are scaled according to

Comparison of transverse particle deviations relative to the reference trajectory

Figure 5. Comparison of transverse particle deviations relative to the reference trajectory. (a) Exit error as a function of the entrance energy deviation. (b) Exit error as a function of the offset scale at δ=1%\delta= 1\%. Dashed and solid curves represent the analytical and bend-slice models, respectively.

(a,b)=λ(a0,b0),(61)(a,b)=\lambda(a_0,b_0), \tag*{(61)}

at a fixed energy deviation of δ=1%\delta=1\%.

Despite using only a first-order transfer matrix, the analytical model gives smaller errors than the second-order bend-slice representation over the parameter ranges considered.

An accurate reference trajectory is also important for the global survey of the beamline. The survey determines the position and orientation of the reference frame for subsequent elements. For the analytical model, it is obtained by integrating the reference motion and Bishop-frame equations using the varying curvatures of Eq. (18), as described in Appendix B. For the bend-slice model, we use the standard Ocelot bend survey, following the conventional MAD8 bend geometry. Both are compared with the reference trajectory obtained from direct integration of the Lorentz equations.

Figure 6 shows the reference position differences evaluated at the same laboratory longitudinal coordinates. The analytical-model survey agrees closely with numerical tracking, while the bend-slice survey exhibits much larger deviations, reaching the millimetre scale.

Reference-survey position differences relative to direct Lorentz tracking

Figure 6. Reference-survey position differences relative to direct Lorentz tracking. (a,b) Horizontal and vertical residuals of the analytical-model survey. (c,d) Corresponding residuals of the bend-slice survey with 8192 bend pairs. All positions are compared at the same laboratory longitudinal coordinates ZZ.

This difference does not vanish with increasing slice number. Since the bend curvatures are fixed by the entrance offsets, the sliced representation converges to a constant-curvature geometry rather than to the actual quadrupole reference trajectory. The analytical survey, in contrast, accounts for the longitudinal variation of both curvature components.

Conclusion

We have developed a compact analytical linear model for beam transport through a quadrupole with offsets in both transverse planes. Within the weak-curvature approximation, the model provides a symplectic 6×66 \times6 transfer matrix that accounts for the longitudinal variation of the reference curvature and the resulting dispersion in both planes.

Comparison with direct numerical tracking shows that the analytical model reproduces the dispersive transport more accurately than the original bend-slice representation, despite using only a first-order map. The improvement is also evident in the reference survey, where the fixed-curvature bend-slice model exhibits systematic errors that cannot be eliminated by increasing the number of slices.

The model has been implemented in Ocelot as a new lattice element, XYQuadrupole, providing both the linear transfer matrix and reference geometry without replacing a single quadrupole by a large number of bend elements.

Acknowledgments

This work was supported by operation funds of the European XFEL. The author thanks Nina Golubeva and Winni Decking for developing the original sliced-bend representation used at the European XFEL. The author also thanks Nina Golubeva and Evgeniy Schneidmiller for valuable discussions.

Special thanks are due to Igor Zagorodnov for his encouragement to bring this work, initiated more than a year ago, to completion and for many fruitful discussions.

The author used ChatGPT (OpenAI) during the preparation of this manuscript to assist with language editing and to improve clarity and structure.

Construction of the local vector potential

The analytical linear model of the main text uses only those terms of the local vector potential that contribute to the quadratic Hamiltonian. Here we first construct the local vector potential directly from the ideal quadrupole body field and then show explicitly how the simplified potential used in the main text follows under the approximations of the analytical model.

Vector potential in the moving Bishop frame

In the fixed magnet coordinates (X,Y,Z)(X, Y, Z), the normalized magnetic field is

b=k1(YX0)(62)\mathbf{b} = k_1 \begin{pmatrix} Y\\ X\\ 0 \end{pmatrix} \tag*{(62)}

A convenient laboratory vector potential satisfying b=∇×a\mathbf{b} = \nabla\times\mathbf{a} is

alab=aZEZ,aZ=k12(Y2−X2).(63)\mathbf{a}^{\mathrm{lab}} = a_Z \mathbf{E}_Z,\qquad a_Z = \frac{k_1}{2}\left(Y^2-X^2\right). \tag*{(63)}

The local coordinates are related to the laboratory coordinates by

r(x,y,s)=r0(s)+xex(s)+yey(s),(64)\mathbf{r}(x,y,s) = \mathbf{r}_0(s) + x\mathbf{e}_x(s) + y\mathbf{e}_y(s), \tag*{(64)}

where (ex,ey,t)(\mathbf{e}_x,\mathbf{e}_y,\mathbf{t}) is the Bishop frame introduced in Sec. II. The corresponding metric factor is

g=1+hxx+hyy.g = 1 + h_x x + h_y y.

Projecting Eq. (63) onto the moving frame gives

axraw=aZexZ,ayraw=aZeyZ,Asraw=gaZtZ,(65)a_x^{\mathrm{raw}} = a_Z e_{xZ},\qquad a_y^{\mathrm{raw}} = a_Z e_{yZ},\qquad\mathcal{A}_s^{\mathrm{raw}} = g a_Z t_Z, \tag*{(65)}

where the coefficient along dsds is defined by

a⋅dr=ax dx+ay dy+As ds.\mathbf{a}\cdot d\mathbf{r} = a_x\,dx + a_y\,dy + \mathcal{A}_s\,ds.

Equation (A4) describes the same ideal quadrupole body field as Eq. (62); only the coordinate description has changed.

For the Hamiltonian it is convenient to use the transverse radial (Poincaré) gauge [11],

xax+yay=0.(66)x a_x + y a_y = 0. \tag*{(66)}

Starting from the projected potential of Eq. (65), we perform the gauge transformation

ax=axraw+∂xχ,ay=ayraw+∂yχ,As=Asraw+∂sχ.(67)a_x = a_x^{\mathrm{raw}} + \partial_x\chi,\qquad a_y = a_y^{\mathrm{raw}} + \partial_y\chi,\qquad\mathcal{A}_s = \mathcal{A}_s^{\mathrm{raw}} + \partial_s\chi. \tag*{(67)}

A gauge function satisfying Eq. (66) is

χ(x,y,s)=−∫01[x axraw(λx,λy,s)+y ayraw(λx,λy,s)] dλ.(68)\chi(x,y,s)=-\int_0^1\left[x\,a_x^{\mathrm{raw}}(\lambda x,\lambda y,s)+y\,a_y^{\mathrm{raw}}(\lambda x,\lambda y,s)\right]\,d\lambda. \tag*{(68)}

where 0≤λ≤10 \leq\lambda\leq1 parametrizes the straight radial segment in the local transverse plane. Indeed, substituting Eq. (68) into Eq. (67) gives

xax+yay=0.x a_x + y a_y = 0.

Equivalently, the transverse components in this gauge may be written as

ax=−y∫01λ bs(λx,λy,s) dλ,ay=x∫01λ bs(λx,λy,s) dλ.(69)a_x=-y\int_0^1\lambda\,b_s(\lambda x,\lambda y,s)\,d\lambda,\qquad a_y=x\int_0^1\lambda\,b_s(\lambda x,\lambda y,s)\,d\lambda. \tag*{(69)}

Thus the transverse vector-potential components are determined entirely by the longitudinal magnetic-field component bsb_s.

Reduction to the analytical model

The construction above gives the local vector potential for the ideal quadrupole body field in the moving Bishop frame. We now expand this result about the reference trajectory and retain only those terms that contribute to the quadratic Hamiltonian under the paraxial and weak-curvature approximations used in the analytical model.

In the radial gauge, the transverse components of the vector potential are determined by the longitudinal magnetic-field component through Eq. (69). On the reference trajectory,

bs=b(r0)⋅t=k1(Y0θx+X0θy),(70)b_s=\mathbf{b}(\mathbf{r}_0)\cdot\mathbf{t}=k_1\left(Y_0\theta_x+X_0\theta_y\right), \tag*{(70)}

which is second order in the reference offsets and angles. Its transverse variation generates transverse vector-potential terms that contribute only beyond the quadratic Hamiltonian retained here. Consequently,

ax=ay=0(71)a_x=a_y=0 \tag*{(71)}

to the order required for the analytical linear model.

It remains to determine the longitudinal component As\mathcal{A}_s. On the reference trajectory, Eq. (17) gives

bx=−hy,by=hx.b_x=-h_y,\qquad b_y=h_x.

To first order in the transverse particle coordinates, the local transverse field is

bx=−hy+k1y,by=hx+k1x.(72)b_x=-h_y+k_1y,\qquad b_y=h_x+k_1x. \tag*{(72)}

Corrections associated with the rotation of the projected quadrupole gradient are of higher reference order and are not retained in the analytical model.

With ax=ay=0a_x=a_y=0, the Bishop-coordinate curl equations reduce to

bx=1g∂yAs,by=−1g∂xAs,(73)b_x=\frac{1}{g}\partial_y\mathcal{A}_s,\qquad b_y=-\frac{1}{g}\partial_x\mathcal{A}_s, \tag*{(73)}

where

g=1+hxx+hyy.g=1+h_xx+h_yy.

Writing

u=hxx+hyy,u = h_x x + h_y y,

Eq. (A12) together with Eq. (A11) gives

∂yAs=(1+u)(−hy+k1y),\partial_y \mathcal{A}_s = (1+u)(-h_y+k_1y),

and

∂xAs=−(1+u)(hx+k1x).\partial_x \mathcal{A}_s = -(1+u)(h_x+k_1x).

The terms generated by uu that are linear in the particle coordinates and proportional to products of the reference curvatures are neglected according to the weak-curvature condition Eq. (19). Terms quadratic in the transverse particle coordinates would generate cubic terms in As\mathcal{A}_s and therefore do not contribute to the quadratic Hamiltonian. Thus, at the retained order,

∂yAs=−hy+k1y,∂xAs=−hx−k1x.(74)\partial_y \mathcal{A}_s=-h_y+k_1y,\qquad\partial_x \mathcal{A}_s=-h_x-k_1x. \tag*{(74)}

Integrating Eq. (A13) gives

ax=ay=0,As=a0(s)−hx(s)x−hy(s)y−k12(x2−y2),(75)a_x=a_y=0,\qquad\mathcal{A}_s=a_0(s)-h_x(s)x-h_y(s)y-\frac{k_1}{2}\left(x^2-y^2\right), \tag*{(75)}

which is Eq. (25) of the main text. Here

a0(s)=As(0,0,s)a_0(s)=\mathcal{A}_s(0,0,s)

is gauge dependent and does not affect the equations of motion.

It is useful to verify explicitly which field terms are reproduced by the truncated potential of Eq. (A14). Substitution into the Bishop-coordinate curl equations gives

bx=−hy+k1y1+hxx+hyy,by=hx+k1x1+hxx+hyy.(76)b_x=\frac{-h_y+k_1y}{1+h_xx+h_yy},\qquad b_y=\frac{h_x+k_1x}{1+h_xx+h_yy}. \tag*{(76)}

Expanding in the transverse coordinates,

bx=−hy+k1y+hyu−k1yu−hyu2+O⊥(3),by=hx+k1x−hxu−k1xu+hxu2+O⊥(3),(77)\begin{aligned} b_x&=-h_y+k_1y+h_yu-k_1yu-h_yu^2+O_\perp(3),\\ b_y&=h_x+k_1x-h_xu-k_1xu+h_xu^2+O_\perp(3), \tag*{(77)} \end{aligned}

where O⊥O_\perp denotes transverse-coordinate degree. The terms hyuh_yu and −hxu-h_xu contain products of the reference curvatures and are neglected according to Eq. (19). The terms −k1yu-k_1yu and −k1xu-k_1xu are quadratic in the transverse particle coordinates and first affect the cubic Hamiltonian.

Equation (A14) therefore retains the terms of the local vector potential required for the quadratic Hamiltonian of the analytical model. The terms omitted here can be obtained systematically from the construction of Eqs. (A4)–(A7). They include the longitudinal-field contribution to the transverse vector potential, corrections associated with the rotation of the projected quadrupole gradient, curvature-squared terms, and higher-order transverse dynamics.

Explicit expression for R56R_{56}

The longitudinal coefficient introduced in Eq. (40) can be evaluated analytically using the reference curvatures of Eq. (18) and the dispersion functions of Eq. (36). The result may be written as

R56=Lβ02γ02−Fx+Fy8β02.(78)R_{56}=\frac{L}{\beta_0^2\gamma_0^2}-\frac{\mathcal{F}_x+\mathcal{F}_y}{8\beta_0^2}. \tag*{(78)}

with

Fx=a2[2k12LSx2−k1(L−CxSx)]+4aθx0k1[Sx2−LCxSx]+θx02[3(L−CxSx)−2k1LSx2],Fy=b2[2k12LSy2+k1(L−CySy)]+4bθy0k1[LCySy−Sy2]+θy02[3(L−CySy)+2k1LSy2].(79)\begin{aligned} \mathcal{F}_x &= a^2\left[2k_1^2LS_x^2-k_1\left(L-C_xS_x\right)\right] \\ &\quad+4a\theta_{x0}k_1\left[S_x^2-LC_xS_x\right] \\ &\quad+\theta_{x0}^2\left[3\left(L-C_xS_x\right)-2k_1LS_x^2\right],\\ \mathcal{F}_y &= b^2\left[2k_1^2LS_y^2+k_1\left(L-C_yS_y\right)\right] \\ &\quad+4b\theta_{y0}k_1\left[LC_yS_y-S_y^2\right] \\ &\quad+\theta_{y0}^2\left[3\left(L-C_yS_y\right)+2k_1LS_y^2\right]. \tag*{(79)} \end{aligned}

Here CiC_i and SiS_i are evaluated at s=Ls=L. The first term in R56R_{56} is the usual relativistic longitudinal response, while Fx\mathcal{F}_x and Fy\mathcal{F}_y describe the additional path-length response generated by the dispersive motion in the two transverse planes.

Survey and global geometry

The transfer matrix of Eq. (41) describes particle motion relative to the curved reference trajectory. For lattice modelling, we also need the position and orientation of the reference frame at the magnet exit, which determine the geometry of subsequent elements.

Following the survey convention of MAD-8 [2], the geometry of an element is described by a displacement d\mathbf{d} and a rotation matrix Q\mathbf{Q} relative to its entrance frame:

rout=rin+Wind,Wout=WinQ,(80)\mathbf{r}_{\mathrm{out}}=\mathbf{r}_{\mathrm{in}}+\mathbf{W}_{\mathrm{in}}\mathbf{d},\qquad\mathbf{W}_{\mathrm{out}}=\mathbf{W}_{\mathrm{in}}\mathbf{Q}, \tag*{(80)}

where

W(s)=(ex(s) ey(s) t(s))(81)\mathbf{W}(s)=\left(\mathbf{e}_x(s)\ \mathbf{e}_y(s)\ \mathbf{t}(s)\right) \tag*{(81)}

contains the Bishop-frame basis vectors.

Analytical approximation

For illustration, consider a reference particle entering parallel to the magnet axis with offsets (a,b)(a,b). In the paraxial approximation, its trajectory and direction are given by Eqs. (13) and (16).

For a magnet with physical longitudinal length LZL_Z, the leading transverse displacement relative to the entrance frame is

dx≃a(Cx−1),dy≃b(Cy−1),dz=LZ,(82)\begin{aligned} d_x &\simeq a(C_x-1),\\ d_y &\simeq b(C_y-1),\\ d_z &= L_Z, \tag*{(82)} \end{aligned}

where CiC_i and SiS_i are evaluated at LZL_Z.

The exit direction is determined by

α=−k1aSx,β=k1bSy.(83)\alpha=-k_1aS_x,\qquad\beta=k_1bS_y. \tag*{(83)}

To first order in the reference angles, the corresponding rotation matrix is

Q≃(10α01β−α−β1).(84)\mathbf{Q}\simeq \begin{pmatrix} 1 & 0 & \alpha\\ 0 & 1 & \beta\\ -\alpha& -\beta& 1 \end{pmatrix}. \tag*{(84)}

The reference path length differs from the mechanical length because of the transverse motion:

L≃LZ+12∫0LZ(θx2+θy2) ds.(85)L\simeq L_Z+\frac{1}{2}\int_0^{L_Z}\left(\theta_x^2+\theta_y^2\right)\,\mathrm{d}s. \tag*{(85)}

Using Eq. (16), we obtain

L≃LZ+k14[a2(LZ−CxSx)+b2(CySy−LZ)].(86)L \simeq L_Z + \frac{k_1}{4}\left[a^2(L_Z-C_xS_x)+b^2(C_yS_y-L_Z)\right]. \tag*{(86)}

These expressions provide a simple approximation for the reference displacement, orientation, and path length. In particular, they show explicitly how the survey depends on the quadrupole strength and the entrance offsets.

  • b. Numerical survey in Ocelot. * In the XYQuadrupole implementation, the survey is calculated by numerical integration of the reference trajectory together with the Bishop-frame equations, rather than using the truncated expressions above:

r0′=t,ex′=hx(s)t,ey′=hy(s)t,t′=−hx(s)ex−hy(s)ey.(87)\begin{aligned} \mathbf{r}'_0 &= \mathbf{t},\\ \mathbf{e}'_x &= h_x(s)\mathbf{t},\\ \mathbf{e}'_y &= h_y(s)\mathbf{t},\\ \mathbf{t}' &= -h_x(s)\mathbf{e}_x-h_y(s)\mathbf{e}_y. \tag*{(87)} \end{aligned}

The curvature functions hx(s)h_x(s) and hy(s)h_y(s) are taken from the analytical approximation of Eq. (18). The integration retains the full three-dimensional Bishop-frame evolution for the prescribed curvature functions, which remain within the paraxial approximation.

The entrance conditions are

r0(0)=(ab0),t(0)=(θx0θy01−θx02−θy02).(88)\mathbf{r}_0(0)= \begin{pmatrix} a\\ b\\ 0 \end{pmatrix}, \qquad \mathbf{t}(0)= \begin{pmatrix} \theta_{x0}\\ \theta_{y0}\\ \sqrt{1-\theta_{x0}^{2}-\theta_{y0}^{2}} \end{pmatrix}. \tag*{(88)}

For parallel entrance, W(0)=IW(0)=I. For nonzero entrance angles, the initial frame is obtained by the smallest rotation aligning the magnet axis EZ\mathbf{E}_Z with t(0)\mathbf{t}(0). Using Rodrigues’ formula,

W(0)=I+[v]×+[v]×21+c,(89)W(0)=I+[\mathbf{v}]_{\times}+\frac{[\mathbf{v}]_{\times}^{2}}{1+c}, \tag*{(89)}

where v=EZ×t(0)\mathbf{v}=\mathbf{E}_Z\times\mathbf{t}(0), c=EZ⋅t(0)c=\mathbf{E}_Z\cdot\mathbf{t}(0), and [v]×[\mathbf{v}]_{\times} denotes the cross-product matrix.

Integration to the prescribed reference arc length LL gives the exit position rout=r0(L)\mathbf{r}_{\mathrm{out}}=\mathbf{r}_0(L) and orientation Wout=W(L)W_{\mathrm{out}}=W(L). The corresponding survey quantities are

d=WinT(rout−rin),Q=WinTWout.(90)\boxed{\mathbf{d}=W_{\mathrm{in}}^{T}(\mathbf{r}_{\mathrm{out}}-\mathbf{r}_{\mathrm{in}}),\qquad Q=W_{\mathrm{in}}^{T}W_{\mathrm{out}}}. \tag*{(90)}

The laboratory longitudinal advance Z(L)Z(L) is obtained from the integrated trajectory. If the magnet is specified instead by its mechanical length LZL_Z, the integration is stopped at Z=LZZ=L_Z, which also determines the corresponding reference path length.

Finally, the survey allows the local particle coordinates obtained from the transfer matrix to be converted into laboratory coordinates. At the reference-normal exit plane,

rparticle,out=rout+xoutex(L)+youtey(L).(91)\mathbf{r}_{\mathrm{particle,out}}=\mathbf{r}_{\mathrm{out}}+x_{\mathrm{out}}\mathbf{e}_x(L)+y_{\mathrm{out}}\mathbf{e}_y(L). \tag*{(91)}

This plane generally differs from the mechanical exit face of the magnet; conversion to the latter requires an additional geometrical transformation.

References

  1. [3]I. Agapov, G. Geloni, S. Tomin and I. Zagorodnov, OCELOT: A software framework for synchrotron light source and FEL studies, Nucl. Instrum. Methods Phys. Res. A 768, 151–156 (2014).DOI
  2. [4]G. Ripken and F. Schmidt, A Symplectic Six-Dimensional Thin-Lens Formalism for Tracking, DESY 95-063; CERN/SL/95-12 (AP) (1995), Secs. 2.2–2.3.
  3. [5]A. Wolski, Beam Dynamics in High Energy Particle Accelerators, Imperial College Press, London (2014), Chap. 2, Secs. 2.2–2.3, Eqs. (2.52)–(2.56) and (2.73).
  4. [6]F. C. Iselin, Fast Methods for Generating Lie Algebraic Maps of Arbitrary Degree for Combined Thick Multipoles, CERN SL-Note-2000-001 (AP) (2000).
  5. [7]R. L. Bishop, There is more than one way to frame a curve, Am. Math. Monthly 82, 246–251 (1975).DOI
  6. [8]D. Carroll, E. Köse, and I. Sterling, Improving Frenet’s Frame Using Bishop’s Frame, J. Math. Res. 5(4), 97–106 (2013), doi:10.5539/jmr.v5n4p97, Sec. 4.DOI
  7. [9]H. Grote and F. Schmidt, “MAD-X: An Upgrade from MAD8,” in Proc. 20th IEEE Particle Accelerator Conf. (PAC 2003), Portland, OR, USA, 2003, p. 3497, CERN-AB-2003-024-ABP.DOI
  8. [10]R. L. Burden, J. D. Faires, and A. M. Burden, Numerical Analysis, 10th ed. (Cengage Learning, 2016).
  9. [11]W. E. Brittin, W. R. Smythe, and W. Wyss, Poincaré gauge in electrodynamics, Am. J. Phys. 50, 693 (1982), doi:10.1119/1.12731.DOI

Paper details

vlnc:W_qus6n3ht
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

ChatGPT (OpenAI)

View statement
Looking for related papers…
Contents