Measuring the full transverse beam matrix using a single octupole

We propose a method to fully determine the transverse beam matrix using a simple setup consisting of two steering magnets, an octupole field and a screen. This works in principle for any multipole field, i.e., sextupole, octupole magnet or a radio frequency structure with a multipole field. We have experimentally verified the method at the Compact Linear Collider Test Facility 3 at CERN using a Compact Linear Collider accelerating structure, which has an octupole component of the radio frequency fields. By observing the position shifts of the beam centroid together with changes in transverse beam size on a screen, we determined the full transverse beam matrix, with all correlations.


I. INTRODUCTION
In charged particle accelerators the knowledge of the transverse beam size is of paramount importance to guarantee the performance and operational reliability of the machine.In single pass accelerators, such as linear accelerators or transfer lines, often screens or wire scanners in conjunction with a quadrupole are used to determine the beam matrix and Twiss parameters [1] by correlating the observed beam size on the screen with the quadrupole gradient while scanning its excitation [2][3][4][5][6].Typically, by varying the excitation of a single upright quadrupole, either the horizontal or vertical beam parameters are determined, but in special cases even the coupling degrees of freedom in the sigma matrix are found [7,8] if skew quadrupoles are available and the screen or wire scanner permit measuring of the correlation between horizontal and vertical beam size σ xy ¼ σ 13 in standard TRANSPORT [9] or MADX [10] notation.
In this paper we suggest to use a single octupole in conjunction with two horizontal or vertical steering magnets instead of the quadrupole.We scan the beam position in the octupole and as long as the beam size in the octupole is small compared to its aperture, the beam experiences predominantly the local gradient of the octupolar field.In this way we effectively change the strength of a linear, quadrupole-like field by steering the beam to different positions in the octupole.At the different scan locations we record the horizontal and vertical beam size and the correlation σ xy on the screen.We show that in this way the full coupled beam matrix of the incoming beam can be determined.
Incidently, we accidentally discovered this method when scanning the beam in the probe beam in the two-beam test stand, in the Compact Linear Collider (CLIC) Test Facility 3, across the aperture of an X-band accelerating structure (ACS) for the CLIC [11,12] and observed that the beam size on a downstream screen changed.It was actually expected, from observation and simulation [13,14], that the radio frequency (rf) fields in the CLIC structure have an octupolar component 90°out of phase of the main accelerating field.Recording and analyzing these data led to the realization that octupoles can be used to determine sigma matrices.
In the remainder of this paper we first discuss the method in general and derive the necessary equations for the analysis, then show that the method works reliably for simulated data and finally apply it to the recorded data from the two-beam test stand followed by conclusions.

II. METHOD
Here we derive the necessary equations and explain the method we have used.A particle can be characterized by the six-dimensional vector x ¼ ðx; x 0 ; y; y 0 ; z; δÞ T where z is the longitudinal position with respect to the centroid of the beam and δ the relative momentum deviation.The horizontal position is given by x and x 0 is the transverse momentum normalized with respect to the longitudinal momentum according to x 0 ¼ p x p z .If we only consider transverse beam dynamics we have x ¼ ðx; x 0 ; y; y 0 Þ T as a sufficient description of the particle.In linear systems propagating a particle from one position to another can be described by a multiplication with a transfer matrix x ¼ Rx.
A distribution of particles, i.e., a beam, can be characterized by the beam matrix, also referred to as the sigma matrix, σ 4D , where the elements are defined as σ ij ¼ hðx i − X i Þðx j − X j Þi where x i ¼ fx; x 0 ; y; y 0 g for i ¼ 1; 2; 3; 4. Capital letters indicate the first moments X i ¼ hx i i.Since the beam matrix is symmetric, i.e., σ ij ¼ σ ji , we have ten independent elements.Propagating the beam matrix from one longitudinal position to another can be done with the transfer matrix according to σ4D ¼ Rσ 4D R T .

A. Octupole kicks
We express the multipole expansion of a magnetic field by B y þ iB x ¼ C n−1 ðx þ iyÞ n−1 and by inserting n ¼ 4 we obtain the octupole field where C 3 indicates the octupole field strength in units of T=m 3 .A kick from a general transverse magnetic field can be calculated through the Lorentz force.In the thin lens approximation an electron traveling in the negative z-direction experiences the following kicks: where ðBρÞ is the beam rigidity and l the length of the octupole.Assuming the octupole is followed by a drift of length L we can calculate the horizontal position shift for a single particle, The shift of the centroid of the beam distribution can be calculated by taking the expectation of (3) and we obtain If we assume a Gaussian beam the expectation values can be calculated analytically, see Appendix A, and we get where we have defined K ¼ 3C 3 l=ðBρÞ.Similarly, we obtain vertical position shift In Eqs. ( 5) and (6) we have the position shifts on a screen of the centroid of the beam as a function of the incoming beam transverse position and beam size inside the octupole field.This will later be used for determining the integrated octupole strength C 3 l.

B. Octupole focusing in thin lens approximation
Locally a small beam in a multipole field experiences a linear gradient similar to a quadrupole.Since the gradient is dependent on position we will get the same information from a position scan inside an octupole field as in the case of a quadrupole scan.In linear optics the gradient is often expressed as inverse focal length where l is the length of the magnetic element.Here we use two indices, the first index indicates that we have focusing in the horizontal plane and the second index indicates that the effect comes from a deviation in x.Since we have in general B y ¼ B y ðx; yÞ we also have horizontal focusing due to a deviation in y as 1 ∂y .Similarly, we have focusing in the vertical plane and as a consequence from Maxwell's equations we note that the inverse focal lengths for vertical focusing are related to the horizontal inverse focal lengths as 1 f yy ¼ − 1 f xx and 1 f xy ¼ 1 f yx .Now we can express the single particle transfer matrix from octupole to screen as x ¼ Rx, where x is the incoming particle and x the particle on the screen.The transfer matrix R consists of an octupole focusing element followed by a drift of length L and can be written as : Now we can calculate the corresponding position dependent inverse focal lengths for an octupole: where we have the same constant as before K ¼ 3C 3 l ðBρÞ and the derivatives are evaluated at ðx ¼ X; y ¼ YÞ where again capital letters indicate first moments X ¼ hxi, in other words, in this linear approximation, the focusing effect on the beam depends on the transverse position of the centroid of the beam.
Inserting ( 9) into (8) and mapping the beam matrix according to σ ¼ RσR T together with the fact that the horizontal beam size on the screen is σ2 x ¼ σð1; 1Þ and the vertical beam size σ2 y ¼ σð3; 3Þ we can express the transverse beam size on the screen as a function of the transverse position of the centroid of the beam as and We also consider the correlation term σxy ¼ σð1; 3Þ, this gives Thus we have the beam size on the screen σ2 x , σ2 y and σxy as functions of the transverse position inside the octupole field and the beam matrix of the incoming beam.When we derived the equations of octupole focusing we assumed that locally the beam only experiences a linear gradient.This approximation is reasonable provided that the beam transverse size is small compared to the curvature of the octupole field.Nonetheless, for a Gaussian distribution we do not need to make such an approximation but can calculate analytically how the beam size will change for a given incoming beam distribution.In Appendix A we derive these full analytical equations by taking the expectation values of a single particle position after an octupole and drift space.These equations are nonlinear in terms of beam matrix elements σ ij .

C. Procedure
With two steering magnets we scan the beam transversely (horizontally or vertically) but parallel to the beam axis.A schematic of the setup is shown in Fig. 1.In Fig. 2 we show a schematic of a cross section of the ACS and the beam positions at different scan steps.The beam does not need to be centered in order to perform the scan.In fact, for a vertical scan it is better to have the beam slightly of center horizontally since this will yield a quadratic position dependent horizontal kicks, cf.X ¼ 0 in (5).
The procedure is then as follows.For each scan step (transverse position) acquire images of the beam on the screen with and without the octupole field active.Then perform 2D Gaussian fits of the images on the screen in order to extract the beam centroid transverse position and beam size.
By comparing beam centroid position with and without octupole field active we can determine the integrated octupole field strength by performing simultaneous least square fits to ( 5) and (6).Then from the beam size on the FIG. 1. Schematic of the setup where the beam travels from right to left.Quadrupoles are used for focusing the beam onto the screen and keep a small beam inside the octupole field.The two steering magnets are used to transversely scan the beam inside the octupole field.By observing how the beam changes on the screen at different positions we can deduce information about the beam matrix right before the octupole.
screen together with the integrated octupole strength we can fit for the ten elements of the beam matrix of the incoming beam, i.e., simultaneous least squares fit of Eqs. ( 10), ( 11) and (12).

D. Simulation
We set up a multiparticle simulation model in MATLAB [15] in order to numerically verify the equations and test the procedure.The simulation model consisted of a simple particle tracking code that transported particles from a defined 4D distribution through a thin octupole followed by a drift.We simulated for similar parameters to those in the CLIC Test Facility 3 setup: integrated octupole strength of 15 kTm=m 3 , beam energy of 190 MeV, distance from octupole to screen 5.5 m.We simulated for a distribution of 10 5 number of particles generated from given beam matrices.
In Appendix B we present a parametrization, inspired by [7] and [16], of the beam matrix that we will use throughout the paper.This parametrization uses the regular Twiss parameters for the horizontal and vertical 2 × 2 blocks and parameters r; κ; ψ; ϕ to describe the correlation terms.The parameter ϕ can be thought of as the coupling angle and for ϕ ¼ 0 we would have no x-y correlation.This parametrization is positive definite by construction which will be very useful later when we will perform a fit to the beam matrix elements of the matrix at the position just before the octupole.
We simulated for two different beam distributions: first a well-behaved beam, i.e., a small beam without x-y correlations and aspect ratio 1; then we simulated a beam with x-y correlations and aspect ratio different from unity.In both cases we chose beam distributions in such a way that a propagation through a drift space yielded a transverse beam size at the location of the screen comparable to the measured beam without rf.The parameters used are listed in Table I.In both cases, the vertical position was scanned from −1.4 to 1.4 mm and the horizontal offset was kept at 0.1 mm.In Fig. 3 we show the position shifts together with plots of the analytical expressions ( 5) and ( 6).As expected we see a third order behavior of vertical shifts ∝ Y 3 and second order in horizontal shifts ∝ Y 2 .In Fig. 4 we have plotted σ 2 x , σ 2 y and σ xy at different vertical positions together with the full analytical expressions for a 4D Gaussian beam from Appendix A and the linear expressions from ( 10)- (12).
The maximum difference between the predictions of the full analytical equations and the linear equations, for the simulation of a beam with x-y correlations, was roughly 30%.The effect of the octupole was considerably smaller for the well-behaved beam and thus was also the difference between the linear equations or the full analytical equations.
We fitted the simulated data to the equations for position shifts and octupole focusing and we could reconstruct both the octupole strength and the beam matrix just upstream of the octupole.The fitting of the beam matrix was carried out in two steps, first fitting for the linear expressions and FIG. 2. A cross section of the aperture of the ACS and the beam is scanned vertically with a horizontal offset with blue x's showing the scan positions.The plots show the horizontal and vertical position shifts of the beam centroid due to octupole kicks and the fit of the analytical equations ( 5) and (6).then using these results as start values fitting for the full analytical expressions.
We conclude that if the beam has x-y correlations the linear approximation will introduce errors and, if possible, we should use the full analytical equations.

III. MEASUREMENT USING A CLIC ACCELERATING STRUCTURE
At the two-beam test stand [12] we used the method described in the previous section by using a CLIC ACS which has an octupole component of the rf fields.The octupole component was found earlier in simulations [13] and observation [14].The octupole component lags the main accelerating field by 90°so in order to have a maximum octupole kick of the beam we put the single bunch beam on the zero crossing of the main accelerating field.We used quadrupoles to maintain a small beam inside the ACS and two steering magnets upstream of the ACS to scan the beam vertically.The beam was scanned parallel to the beam axis by exciting the two identical-style steering magnets with currents of the same magnitude but with opposite signs.The experimental parameters are listed in Table II.
The electron beam was operated at twice the repetition rate of the rf source so every other image collected was for a beam passing through the octupole field and every other was for a beam experiencing no octupole fields.This had the additional benefit of reducing the impact of drifting parameters.At each scan step we collected a total of 16 images (eight with and eight without rf kicks) and then we calculated the averages at each scan step.The center-of-mass position on the screen for different vertical positions are shown in Fig. 5.In Fig. 6 we have plotted σ 2 x , σ 2 y and σ xy respectively, for different vertical positions.We can clearly see kicks and the focusing effect at different transverse positions due to the octupole field.The error bars shows the standard deviation of the values at each scan step because the shot-to-shot difference varied more than the uncertainties from the 2D Gaussian fits.See the Supplemental Material [17] for a video sample of the raw screen images for the scan showing images of the beam with and without the octupole field.x (top), σ 2 y (middle) and correlation term σ xy (bottom) on the screen for different vertical positions inside the octupole field.Also plotted are the corresponding linear expressions (10)-( 12) and the full analytical expressions (A11)-(A13).By performing fits we can determine the beam matrix just upstream of the octupole.However, using the linear equations will introduce errors.

A. Position shifts
Now we look at the position shifts, i.e., the difference between the centroid position on the screen with and without rf in the ACS.We define a χ 2 as a sum over all scan steps n for the position shifts as where ð X − XÞ meas is the measured horizontal position shift on the screen, i.e., the difference between the horizontal position of the beam with rf and without rf, cf.Fig. 5, and similarly for ð Ŷ − YÞ meas .Δð Xi − X i Þ note the standard deviation of the position shift at each scan step.The theoretical expressions ð Xi − X i Þ theo and ð Ŷi − Y i Þ theo come from ( 5) and ( 6) and are functions of the integrated octupole strength, transverse position and beam size inside the octupole, which are all unknown.However, we know the transverse position of the beam on the screen when no rf fields are present in the ACS.We can assume that the position on the screen is related to the position in the ACS by some systematic offsets b and c.Thus, from (5) we make the following ansatz: where a ¼ KL and d represents a horizontal bias, i.e., a constant offset.Initially we do not know the beam size inside the ACS so we use the beam size on the screen for the beam without rf in ACS as an educated guess.We expect this approximation to be reasonable since the distance from quadrupoles is more than 10 m and since we put a focus on the screen we should have a slowly converging beam.From ( 6) we get a similar ansatz for the vertical shifts including the same parameters a; b; c and a parameter e for the vertical bias.We include these small bias terms since we are mainly interested in the second and third order dependence, i.e., the effect of the octupole field.
The small horizontal and vertical biases could be due to small dipole kicks due to a slight misalignment.The resulting fits are shown in Fig. 7 where we have plotted position shifts at different vertical positions.The numerical values of the fit parameters are listed in Table III.As an estimation of the error bars of the fit parameters we give a change of a parameter that doubles χ 2 shifts , one parameter is changed at the time while all other parameters are kept constant.The value of integrated octupole component C 3 l ¼ 14 AE 2 kTm=m 3 is comparable to 16.4 kTm=m 3 , which for an accelerating field V z ¼ 5.1 MV is consistent with simulations [13,18].If the errors in the measurement are correctly assessed then χ 2 per degrees of freedom should equal 1.In our case χ 2 per degrees of freedom is smaller than 1 which implies an overestimation of the errors of the measured position shifts, likely due to random jitter in beam position that averaged out.

B. Beam matrix
For the horizontal beam size we define where σ meas xx ¼ σ2 x , i.e., the beam width on the screen when rf fields are present in the ACS.From (10) we get an expression for σ meas xx as a function of the beam matrix just upstream of the octupole parametrized according to Appendix B. Similarly, using (11) and (12) we define χ 2 σ yy and χ 2 σ xy respectively.Finally, we perform a fitting procedure to minimize to determine the beam matrix elements.A direct fit for the beam matrix elements without the parametrization yielded nonpositive definite beam matrices and thus complex emittances, i.e., nonphysical solutions.The parametrization of the beam matrix has the great advantage of yielding only physical solutions but it also makes convergence more difficult.Some of the parameters are strongly correlated and this makes the numerical FIG. 7. Horizontal (top) and vertical (bottom) position shifts at different vertical positions.The position shifts are calculated from the difference between beam centroid position with and without rf in Fig. 5.We can see the second order behavior in horizontal shifts [cf.Eq. ( 5)] and third order behavior in vertical shifts [cf.Eq. ( 6)] as expected from a vertical scan.In order to find convergence we used a random seed to generate start values ε x ; β x ; α x ; ε y , β y ; α y ; r; κ; ψ; ϕ and then applied the minimization routine for χ 2 focus .We iterated this 100 times and among the convergent solutions found the solution yielding the minimal χ 2 focus .We obtained the same minimum χ 2 focus when repeating this procedure several times.However, as we found similar values for the eigenemittances in each optimum solution the other parameters (α x , β x , etc.) varied significantly, however, always yielding the same beam matrix.
Furthermore, from the simulations in Sec.II D we found that the linear approximation gives a systematic error so we attempted fitting the full analytical equations from Appendix A to the data in search of an even better fit.However, these equations become highly nonlinear in terms of the beam matrix parameters ε x ; α x ; β x etc. and we could not find convergent solutions without good start values.Therefore, we used the beam matrix found from the linear approximation plus a small random seed as start values and then fitted the full analytical equations without parametrization of the beam matrix, i.e., fitting for beam matrix elements σ ij directly.This procedure gave a slight improvement.The results from the fits of both the linear and the full analytical equations for beam size on the screen are shown in Fig. 8.
By taking the determinant of the 2 × 2 blocks on the diagonal we could also calculate the projected horizontal and vertical emittances, respectively.The results are summarized in Table IV.Since position was measured in mm and angles expressed in mrad we have that the elements of FIG. 8.The horizontal beam size (top), vertical beam size (middle) and correlation term (bottom) at different vertical positions and the fit of the linear expressions in ( 10)-( 12) and the full analytical expressions (A11)-(A13).From the fits we retrieve the full transverse beam matrix just upstream the octupole, including all correlations.Furthermore, we can see a slight improvement using the full analytical expressions.x 0 ¼ mrad 2 etc.Since χ 2 per degrees of freedom is larger than 1 this implies that either we have underestimated the errors in the measured beam widths on the screen or there is some systematic error.We removed the systematic error due to the linearization by fitting for the full analytical equations.However, this had small impact on the fit results.The beam matrix elements in Table IV are from the fit of the full analytical equations.The error bars are estimated by changing one parameter at the time keeping all others constant and finding changes yielding an increase of χ 2 by a factor of 4. We used a factor of 4 instead of 2 in this case since we have twice as many fit parameters compared to the position shifts in Sec.III A.
As a cross-check we compared the average measured rms beam size on the screen for the beam without rf in the ACS with the (1,1), (3,3) and (1,3) elements of the propagated beam matrix σ ¼ R D σ fit R T D where R D is the 4 × 4 transfer matrix for a drift.The result was (measured/ propagated): σ x ¼ 0.11=0.13mm, σ y ¼ 0.23=0.20 mm and σ xy ¼ 0.009=0.021mm 2 .

IV. CONCLUSIONS
Performing transverse position scans, parallel to the beam axis, inside an electric or magnetic octupole field results in both position shifts and position-dependent focusing providing information similar to that of a quadrupole scan, i.e., the transverse beam matrix.We were able to test this method utilizing the octupole component of the rf fields in a CLIC accelerating structure and we could determine the integrated octupole strength and reconstruct the beam matrix including all correlations.The benefit of this method is that all the information comes from one scan.Although the data processing and fitting procedure is not trivial, the necessary data can be retrieved quickly.The data for our scan was acquired in about 8 minutes and the image processing could be done online and then about 5 minutes for the rest of the analysis.
From the fits of the position shifts we also obtained, as a bonus, the electromagnetic center of the structure.This information could potentially be used to align the beam in the center of the many accelerating structures in the CLIC main linac with no additional equipment required.
We believe that our method will be useful in situations beyond the scenario discussed in this paper.It provides a beam diagnostics tool complementary to the conventional quadrupole scan technique, in particular if octupoles are already present for other reasons, such as for aberration control in final focus systems.Furthermore, if information about the complete beam matrix, including all coupling degrees of freedom, needs to be determined skew quadrupoles are normally needed.In our method a single octupole replaces both quadrupoles and skew quadrupoles.

ACKNOWLEDGMENTS
The authors thank Alexej Grudiev, Andrea Latina and Daniel Schulte for insightful discussions, the whole CLIC Test Facility 3-operations team for support in the control room.We also thank the Knut och Alice Wallenberg Foundation and the Swedish Research Council under No. 2011-6305 and No. 2014-6360 for funding.

APPENDIX A: ANALYTICAL EXPRESSIONS OF OCTUPOLE FOCUSING
The transverse position on a screen ðx; ŷÞ for a single particle traveling through a thin octupole followed by a drift of length L can be expressed as ðBρÞ .The beam size can be calculated as Inserting (A1) into the first line in (A2) we obtain an analytical expression for the horizontal width on the screen as MEASURING THE FULL TRANSVERSE BEAM MATRIX … Phys.Rev. ST Accel.Beams 18, 072801 (2015) 072801-9 A general expectation value of an N dimensional Gaussian distribution is defined as where Einstein's summation convention is implied, σ ij is the covariance matrix and X i ¼ hx i i.We let and rewrite the right-hand expression in the following manner: where in the last step we performed the variable substitution y i ¼ x i − X i .The integral in the last line can be expressed as a product of one-dimensional integrals.Since σ is a symmetric, positively definite matrix an orthogonal linear transformation O exists such that Oσ −1 O T ¼ diagðλ i Þ is a diagonal matrix.Since det O ¼ 1 the determinant of the Jacobian of the transformation equals to unity.The new variable is z ¼ Oy or O −1 z ¼ O T z ¼ y and we also note z T ¼ y T O T , which gives z T ðO T Þ −1 ¼ z T O ¼ y T .We get where we have used b ¼ Ob for brevity.The last line in the above expression is simply a product of one-dimensional integrals on the form which can easily be shown by completing the square followed by a variable substitution.Finally, the product of all square root factors will cancel with the normalization factor K N and thus the integral in (A6) is simply where we have used that We insert this into (A5) and conclude that a general expectation value of a Gaussian distribution can be calculated by taking successive derivatives of a generating function according to Using (A9) we can easily evaluate the expectation values needed in (A3).If we assume X 2 ¼ X 0 ¼ 0 and and so on.The final analytical expression for the horizontal beam size on the screen is In the same manner we derive the analytical expressions for the vertical beam size on the screen, σ 2 ŷ, and correlation term, σ x ŷ, as and

APPENDIX B: PARAMETRIZATION OF TRANSFER AND BEAM MATRICES
In Ref. [16] Edwards and Teng present a rather intuitive parametrization of coupled transfer matrices R in the following form: where T ; A; O are symplectic 4 × 4 matrices.In particular they are defined in the following way: and a corresponding equation for A 2 .Here the parameters α and β correspond to the conventional Twiss parameters in the case the transfer matrix R is uncoupled.O is a matrix that contains 2 × 2 rotation matrices with the eigentunes on the diagonal and T is defined as follows: and det D ¼ ad − bc ¼ 1.The parameter ϕ is often termed coupling angle and may serve as a measure of the magnitude of the coupling.The interpretation of (B1) is straightforward.We consider a state vector ðx; x 0 ; y; y 0 Þ onto which the matrix R MEASURING THE FULL TRANSVERSE BEAM MATRIX … Phys.Rev. ST Accel.Beams 18, 072801 (2015) 072801-11 operates.First the matrix T removes the coupling degrees of freedom and A maps the remaining uncoupled state vector into normalized phase space where the rotation matrix propagates the mapped vector with the phase advance corresponding to the eigentunes.After that operation the matrices A −1 maps back from normalized phase space to uncoupled real space and T −1 maps back to ðx; x 0 ; y; y 0 Þ.
We will now use this parametrization for the transfer matrix to find a corresponding representation of the beam or sigma matrix.If the beam matrix is uncoupled we can write the horizontal beam matrix σ x as where ε x is the horizontal emittance of the beam and we note that the matrix B is just the inverse of A that appeared above in (B2).This allows us to write the horizontal beam matrix as We now generalize this representation to the coupled case by replacing the matrix A x in the case with uncoupled beams by AT and ensure that the matrices with the emittances in (B5) contain the eigenemittances on the diagonal.Using this guideline we write the 4 × 4 beam matrix as with A and T defined in (B2) and (B3), respectively.We note that and if we set ϕ ¼ 0 we retrieve the standard Twiss parametrization of the beam matrix.Furthermore, we can simplify the representation of the matrix D in (B3) and remove the additional constraint to make the det D ¼ 1 by explicitly choosing a representation that always fulfills that constraint.We notice that the requirement that the determinant is unity makes D a symplectic 2 × 2 matrix and we can use the conventional parametrization of 2 × 2 transfer matrices in terms of phase advance and Twiss parameters.We thus write By using this parametrization for D we have expressed T through the coupling angle ϕ and the three parameters r; κ; ψ for D. The matrix A depends on the four Twiss parameters α i ; β i for the eigenmodes i ¼ 1; 2. The eigenemittances ε 1 ; ε 2 are already obvious in (B6) and we therefore have parametrized the beam matrix σ through ten independent parameters that already ensure that σ is always positive definite, which is useful in numerical fitting problems to avoid handling of additional constraints.
Finally we note that the above parametrizations for the transfer matrix R sigma matrix σ are consistent in the sense that we can show that where we introduced the matrix E to be that containing the eigenemittances on the diagonal in (B6).Note that the matrices O and E are block diagonal and that the 2 × 2 blocks of E are proportional to the 2 × 2 unit matrix whence O and E commute.Overall (B9) shows that the

FIG. 3 .
FIG. 3. Simulation of a vertical scan across the octupole field.The plots show the horizontal and vertical position shifts of the beam centroid due to octupole kicks and the fit of the analytical equations (5) and(6).

FIG. 4 .
FIG. 4. Simulation of a beam with correlations.Plots show the beam widths σ 2x (top), σ 2 y (middle) and correlation term σ xy (bottom) on the screen for different vertical positions inside the octupole field.Also plotted are the corresponding linear expressions (10)-(12) and the full analytical expressions (A11)-(A13).By performing fits we can determine the beam matrix just upstream of the octupole.However, using the linear equations will introduce errors.

FIG. 5 .FIG. 6 .
FIG. 5. Horizontal (top) and vertical (bottom) position of beam centroid on the screen for different vertical positions.Plots show both beam with and without rf inside the ACS.We can clearly see the position shifts due to the octupole field.

A − 1 T − 1 ¼
I cos ϕ D −1 sin ϕ −D sin ϕ I cos ϕ r; κ and ψ.Note that the parameter r resembles the beta function, κ resembles the α function and ψ the phase advance.

TABLE I .
Transverse beam distributions used in simulation.The beam matrix can be generated according to the parametrization presented in Appendix B.

TABLE II .
Experimental parameters.

TABLE III .
Fit results for position shifts.

TABLE IV .
Fit results beam matrix.beam matrix have units of ½σ 2 x ¼ mm 2 , ½σ xx 0 ¼ mm-mrad and ½σ 2 the