Optimal Axes of Siberian Snakes for Polarized Proton Acceleration

Accelerating polarized proton beams and storing them for many turns can lead to a loss of polarization when accelerating through energies where a spin rotation frequency is in resonance with orbit oscillation frequencies. First-order resonance effects can be avoided by installing Siberian Snakes in the ring, devices which rotate the spin by 180 degrees around the snake axis while not changing the beam's orbit significantly. For large rings, several Siberian Snakes are required. Here a criterion will be derived that allows to find an optimal choice of the snake axes. Rings with super-period four are analyzed in detail, and the HERA proton ring is used as an example for approximate four-fold symmetry. The proposed arrangement of Siberian Snakes matches their effects so that all spin-orbit coupling integrals vanish at all energies and therefore there is no first-order spin-orbit coupling at all for this choice, which I call snakes matching. It will be shown that in general at least eight Siberian Snakes are needed and that there are exactly four possibilities to arrange their axes. When the betatron phase advance between snakes is chosen suitably, four Siberian Snakes can be sufficient. To show that favorable choice of snakes have been found, polarized protons are tracked for part of HERA-p's acceleration cycle which shows that polarization is preserved best for the here proposed arrangement of Siberian Snakes.


I. INTRODUCTION
The design orbit spin direction n 0 at some azimuth θ = 2πl/L along a storage ring of length L describes the spin direction for the design orbit which is periodic from turn to turn, where l is the pathlength along the design orbit. The design orbit spin tune ν 0 describes the number of times a spin has rotated around n 0 (θ) during one turn around the ring.
Spin-orbit resonances in high energy accelerators arise when the electro-magnetic fields on synchro-betatron trajectories cause disturbances of the spin's motion which build up coherently from turn to turn.
In a flat ring, for instance, an initially vertical spin of a particle traveling on the design orbit remains vertical during particle motion. On a vertical betatron trajectory the particle traverses horizontal fields in quadrupoles and the spin no longer remains vertical. This disturbance of spin motion due to the betatron motion is described by the spin-orbit coupling integrals [1] where k y = k β y with the quadrupole strength k and the vertical beta function β y , and Ψ is the phase advance of the spin rotation around the vertical and Φ y is the vertical betatron phase. For ease of notation a constant factor which is sometimes multiplied to this integral is not indicated here.
The I ± tend to be especially big when the spin disturbance in every FODO cell of a ring adds up coherently [2].
In an approximation that is of first order in transverse phase space coordinates, these integrals yield the following important information: If all spin-orbit coupling integrals vanish, all initially vertical spins are again vertical after one turn, although they have traveled along different betatron trajectories. The ring is then called spin matched or spin transparent.
In this paper it will be analyzed how Siberian Snakes can be used to make a storage ring spin transparent at all energies.
When a beam is polarized, it has a polarization direction f ( z, j) at each phase space position z at some azimuth θ of the ring, where j indicates how often the bunch has traveled around the ring. Since each initial phase space position leads to a different particle trajectory with different spin motion, spin fields in general change from turn to turn. A special spin field that does not change from turn to turn is called the invariant spin field n( z) [3].
When a beam is polarized according to this spin field, f ( z, j) = n( z), then the beam polarization is given by the phase space average P lim =< n( z) > z . In any case, even when a particle at z(j) after its jth turns has a classical spin vector S with a direction which is not parallel to n( z(j)), its projection onto the invariant spin field is constant, i.e. f ( z(j), j) · n( z(j)) does not change with j. This is possible since its spin S appears to rotate around n( z(j)). The time averaged polarization at the phase space point z is therefore parallel to n( z) for any spin field. The maximum time averaged polarization at that point is thus given when the beam is initially polarized parallel to n( z). The average P lim is therefore called the limiting polarization [4,5,6].
To illustrate one of the benefits of the proposed choice of Siberian Snakes it will be shown that they increase P lim .
When an invariant spin field is found, the rotation of S around it can be described by an amplitude dependent spin tune ν( J ) that depends on the orbital amplitudes J but not on the orbital phase variables. This is important since ν( J) does not change from turn to turn and can therefore be used to describe long term coherence with the frequencies of orbital motion. When this amplitude dependent spin tune is in resonance with the orbital tunes Q j ,i.e. ν( J) = k 0 + j k j Q j for integers k j , the spin motion can be strongly disturbed.
As another illustration of the benefits of the proposed choice of Siberian Snakes it will be shown that they increase the orbital amplitudes for which low order resonance conditions occur.
It can be shown that the projection of the polarization onto the invariant spin field J S = S · n( z) is not only invariant in a storage ring, but that it is an adiabatic invariant [7] when parameters of the accelerator, like the beam's energy, change. This means that a beam that is initially polarized parallel to the invariant spin field n( z, E i ) and thus has the average polarization P lim (E i ) at its initial energy E i will still be polarized parallel to the invariant spin field n( z, E f ) after the beam has been accelerated to a final energy E f , and its average polarization is P lim (E f ). This final polarization can be very large, even though it may have been very small at some intermediate energies. All this is only true if the change of energy is performed adiabatically slowly. Usually, the acceleration cannot be performed adiabatically slowly at all energies and polarization is lost, i.e. the final polarization is smaller than P lim (E f ).
The most convincing illustration of the benefits of the proposed choice of Siberian Snakes is finally that they increase the polarization that is retained after acceleration.
Although it has been straightforward to define n( z), it is not easy to calculate this spin field in general and much effort has been spent on this topic, mostly for electrons at energies up to 46 GeV. All algorithms developed before the polarized proton project at HERA-p rely on perturbation methods at some stage, and either do not go to high enough order [8,9] or have problems with convergence at high order and high proton energies [10,11,12]. The algorithms developed for the HERA-p project [4,5,13,14,15] made the here presented analysis possible.

II. OPTIMAL CHOICES OF SIBERIAN SNAKES
Siberian Snakes are indispensable if polarized proton beams are to be accelerated in a high-energy synchrotron such as HERA-p. This has the following reasons: 1. Siberian Snakes fix the design-orbit spin tune ν 0 to 1 2 during the acceleration cycle so that no first-order resonances have to be crossed. Crossing first-order resonances can lead to a severe reduction of polarization by an amount described by the Froissart-Stora formula [16].
2. Siberian Snakes strongly reduce the influence of energy variations on spin motion within a synchrotron period [17].
3. Siberian Snakes reduce the variation of n( z) for particles which oscillate vertically and therefore pass through horizontal fields which perturb the spin motion.
4. When n changes rapidly during acceleration, the adiabatic invariance of J S = n( z) · S might be violated and polarization would be reduced. It is therefore important that Siberian Snakes smoothen the changes of n during the acceleration cycle.
5. Siberian Snakes can also compensate perturbing effects of misaligned optical elements [17,18,19] but the effect of misalignments will not be covered here.
There is so far no reliable formula for determining the number of Siberian Snakes required for an accelerator [21,22]. To make things worse, for any given number of Siberian Snakes there are very many different possible combinations of the snake angles which lead to an energy independent closed-orbit spin tune of 1 2 and to a vertical design orbit spin direction n 0 in the accelerator's arcs. But so far there has been no reliable formula for determining which of these snake schemes leads to the highest polarization.
There used to be a popular opinion that, owing to their symmetry, 5 standard choices of the snake angles for 4 Siberian Snakes are advantageous for HERA-p. These choices are not optimal, as will be shown. For reasons why these standard schemes were considered useful see for example [23]. RHIC with its two snakes, is operated with a similar standard scheme [24].
The energy dependence of P lim in HERA-p produced by these 5 snake schemes is shown in Fig. 1. They seem to produce rather similar but very low maximum time average polarization P lim in a critical energy regions where very strong resonances are excited. The observation of such rather small differences in the n-axis for such different schemes suggests the following detailed investigation of the influence of snake schemes. Figure 2 (left) shows P lim as computed for linearized spin-orbit motion [4]  The right column shows an obvious notation to describe the snake angles in a snake scheme: found by the so called filtering method [4,25], a numerical search for suitable snake axes. It is apparent that large increases in P lim can result from the choice of a suitable snake scheme. HERA-p is the proton ring of an electron-proton collider and is located above the electron ring. It therefore has non-flat sections in which the protons are bend down to collide with the electrons. These sections bend spins out of the vertical so that n 0 would be non-vertical in the arcs. To avoid this, it has been proposed to insert a Siberian Snake in each of the 6 vertically bending regions. These so called flattening snakes have been assumed in all presented computations in addition to the Siberian Snakes for which an optimal axis is sought. As a 1σ emittance a realistic value of 4πmm mrad was assumed throughout this paper.

III. SPIN-ORBIT-COUPLING INTEGRALS
For the spin-orbit-coupling integrals in flat rings of Eq. (1), n 0 was assumed to point vertically upward. Now Siberian Snakes will be included, which rotate all spins and also n 0 by π around some axis in the horizontal plane, so that n 0 points downward in some sections. This changes the sign of Ψ Eq. (1).
It is assumed that there are n Siberian Snakes in the ring and that n is even, to make n 0 vertical in the arcs of the ring. The azimuth at the position of a snake is denoted by θ j and the spin phase advance around the vertically upward direction between snake j and j + 1 is denoted by Ψ j . The spin phase advance after the jth Siberian Snake is Ψ j (θ) with Ψ j (θ j ) = 0.
For simplicity θ 0 = 0 and θ n+1 = 2π is used and the spin phase advance from azimuth θ 0 to the first Siberian Snake is Ψ 0 .
In the following a Siberian Snake with a snake axis which is in the horizontal plane will be referred to as a horizontal Siberian Snake and for historical reasons a snake which rotates spins around the vertical by some rotation angle will be referred to as type III snake. A horizontal Siberian Snake with a snake angle ϕ is equivalent to a radial Siberian Snake followed by a type III snake that introduces an extra spin phase advance of α = 2ϕ [26].
With these notations the spin-orbit-coupling integrals for a ring with horizontal Siberian Snakes are In terms of the orbital phase advance Φ j between snake j and j + 1, one obtains A corresponding formula has been used in [1] to introduce so-called strong spin matching, where Siberian Snakes are used to produce a cancelation of spin perturbations in different FODO cells.
The spin phase advances between snakes must satisfy the condition n k=0 (−) k Ψ k = 0 to make the closed-orbit spin tune independent of energy and the snake angles must satisfy the condition n k=1 (−) k ϕ k = π 2 to make the closed-orbit spin tune ν 0 equal to 1 2 .

IV. SNAKE MATCHING IN RINGS WITH SUPER-PERIODICITY
The spin perturbations in different parts of the ring can compensate each other when these parts have similar spin-orbit-coupling integrals. This is achieved by using the Siberian Snakes to adjust the spin phase advances in such a way that spin-orbit-coupling integrals of similar parts of a ring cancel each other. In the following, the process of finding a snake scheme for which such a compensation occurs will be referred to as snake matching [27,28]. After demonstrating the idea for type III snakes, which simply rotate spins around the vertical by some fixed angle with little influence on the orbit motion, two quite general results will be demonstrated: 1. A ring with super-periodicity 4 can be completely snake matched using 8 Siberian Snakes, i.e. a snake scheme can be found for which the spin-orbitcoupling integrals are zero due to a complete cancelation of spin perturbations in different parts of the ring. There are exactly two such possibilities which lead to energy independent snake angles.
2. Such a ring can also be snake matched using 4 Siberian Snakes. Then, however, the snake axes depend on energy and have to be changed during the acceleration process.

Energy independent snake matching with 4
Siberian Snakes can be found when the betatron phase advance is appropriately chosen for each of the 4 quadrants.
A. Snake Matching with Type III Snakes for Super-Periodicity 4: The index y on the spin-orbit-coupling integral and on the vertical phase advance and tune will not be indicated. In any case, the methods for canceling spinorbit-coupling integrals by a special choice of snake angles which will now be derived can also be used for transverse and longitudinal motion. In this section the notation will be further simplified by using the symbols ν 0 and Q to denote 2π times the spin tune and 2π times the orbital tune. Then for a ring with super-periodicity 4, I ± can be computed from Spin transparency requires that I + as well as I − vanish. Thus the bracket in (4) must vanish. This is only possible when e i(−ν0±Q)/4 is either −1 or i. Choosing the first possibility to eliminate I + and the second to eliminate I − , one obtains This leads to the requirement e iQ/2 = i which cannot be satisfied in a realistic ring. Therefore, a four-fold repetitive symmetry cannot lead to spin transparency at any energy. While the spin disturbance of two quadrants can therefore not cancel in I + as well as in I − , one of these integrals can cancel whenever the spin phase advance between the quadrants is appropriate. The situation changes if type III snakes are installed. As first found in [25], type III snakes can improve the spin dynamics in HERA-p by increasing P lim =| n |. They can be used to manipulate the spin phase advance to make the spin-orbit-coupling integrals of different parts of the ring cancel. To demonstrate this, 4 type III snakes are installed regularly spaced around the ring.
There are three possibilities for canceling the spin disturbances between quadrants of the ring. The quadrants whose destructive effects cancel are connected by arrows in Fig. 3. The spin-orbit-coupling integrals are where ψ j is the spin rotation angle of the type III snake at θ = j π 2 . To snake match the ring, I + as well as I − must vanish. Therefore the bracket on the right hand side has to vanish in both cases. A sum of 4 complex numbers with unit modulus can only vanish when it consist of two pairs of numbers which cancel each other. This is shown in Fig. 4.
The three possibilities of cancelation demonstrated in Fig. 3 are given by the following three sets of equations: The symbol • = indicates equivalence modulo 2π. To snake match, one of these three conditions has to hold for (−ν 0 + Q), which lets I + vanish and another of the conditions has to hold for (−ν 0 − Q), which lets I − vanish. I + and I − cannot vanish due to the same condition if restrictions on the allowed orbital phase advance Q are to be avoided. There are therefore three possibilities: 1. I + = 0 due to condition 2 and I − = 0 due to condition 3 requires The first and the third of these equations require that ψ 1 • = (−ν 0 +3Q)/4 whereas the second and the fourth equations require that ψ 1 These two requirements are in general not compatible and the ring cannot be made spin transparent in this way.
2. I + = 0 due to condition 1 and I − = 0 due to condition 3 requires The first and the last of these equations together require ψ 3 • = π−(3Q−ν 0 )/4. This is in conflict with the second equation. Thus this way also cannot lead to a spin transparent ring.
3. I + = 0 due to condition 1 and I − = 0 due to condition 2 requires These 4 equations are compatible and lead to ψ 1 The type III snake at l = 0 has the rotation angle ψ 4 which is chosen in such a way that the closed-orbit spin tune of the ring does not change due to the snakes, i.e. ψ 1 + ψ 2 + ψ 3 + ψ 4 • = 0. The required rotation angles are then Obviously a change in sign of Q leads to I + = 0 due to condition 2 and to I − = 0 due to condition 1. There are therefore exactly two possibilities for making a ring with super-periodicity 4 spin transparent by means of 4 type III snakes. These possibilities are shown in Fig. 5. However, the scheme of 4 type III snakes presented here The only two ways to snake match a ring with superperiodicity 4 by 4 type III snakes. The number [x] denotes x mod 2π and lies in [0, 2π). The vertical tune times 2π is denoted by Q and ν0 = Gγ2π cannot be a practical snake scheme, since it does not make the closed-orbit spin tune independent of energy. But it illustrates how type III snakes can be used at fixed energy to make spin perturbations from different parts of the ring cancel each other. This feature can then be used in combination with the Siberian Snakes which are installed to make the closed-orbit spin tune independent of energy.

B. Snake Matching with Type III Snakes for
Super-Periodicity 4 and Mirror Symmetry: In particle optical systems, mirror symmetries are often used to cancel perturbative effects [29,30,31,32]. Therefore it is interesting to see whether mirror symmetry can lead to vanishing of spin-orbit-coupling integrals when 4 Siberian Snakes are installed at the symmetry points of the ring. If one super-period is mirror symmetric, then With Σ ± = (−ν 0 ± Q)/4 one obtains for the complete ring Type III snakes will not be considered further, since a horizontal Siberian Snake with snake angle ϕ can be decomposed into a radial Siberian Snake and a type III snake with rotation angle 2ϕ.

C. Snake Matching of Siberian Snakes with Fixed
Axes at All Energies for Super-Periodicity 4: Thus snake matching the ring with super-periodicity 4 is not influenced by the fact that the ring might have a mirror symmetry since the bracket in (14) is equivalent to the corresponding bracket in (4) for rings without mirror symmetry.
a. Schemes with 4 Snakes: For 4 horizontal Siberian Snakes the spin-orbit-coupling integral in (3) is For a ring with super-periodicity 4 and with 4 equally spaced horizontal Siberian Snakes one obtains with ν 0 = Ψ(2π), Ψ j = Ψ(2π)/4, and Φ j = Q/4 the relation (1 + e i(α1−α2±2Q/4) ) Spin transparency of the ring is therefore obtained when This cannot be achieved in general since the conditions In the case of mirror symmetry in the ring I +  are related by (13), With mirror symmetric quadrants the spin-orbitcoupling integral then simplifies to (1 + e i(α1−α2±2Q/4) ) (1 + e i(−α2+α3±2Q/4) )e i(α1±2Q/4) (21) and again this additional symmetry does not simplify the compensation of the spin-orbit integrals. b. Schemes with 8 Snakes: The same procedure can now be repeated with 8 snakes. For that purpose 4 more horizontal Siberian Snakes are placed at the locations jπ/2 + ∆θ, j ∈ {0, 1, 2, 3}. In terms of the integrals the spin orbit coupling integrals of (3) are If there is an additional mirror symmetry and the snakes are all placed in the symmetry points, (13) implies I ± 1 = (I ± 0 ) * e i(−ν0±Q)/4 , which again does not lead to simplifications. The complete spin phase advance of the ring is n j=0 (−) j (Ψ j + α j ) = π. Since this phase advance is required to be independent of energy, n j=0 (−) j Ψ j has to vanish. Because of the super-periodicity this requires Ψ 0 = Ψ 1 , and all the spin phases Ψ j in the equations (25) cancel. Then in terms of the difference angles ∆ jk = α j − α k , spin matching the ring requires 1 + e i(±Q/4+∆12) + e i(±2Q/4+∆12+∆34) + e i(±3Q/4+∆12+∆34+∆56) = 0 , Sets of 4 complex numbers with modulus 1 can only add up to zero by the three schemes shown in Fig. 3. The equations (25) and (26) have the same structure as the matching conditions of equations (6) and the relations (12) can therefore be used to obtain the following two ways to satisfy (25): Equation (28) resulted from reversing the sign of Q in (27). There are also exactly two possibilities for solving (26), There are now 4 possibilities to snake match the ring; these are obtained by combining the equations (27) Figure 6 shows how parts of the ring cancel the depolarizing effects of other parts in these snake matching schemes. Since only differences in the snake angles appear, one of the angles can be chosen arbitrarily. This then fixes all other snake angles. Here α 1 = 0 is chosen for simplicity. This leads to the following possibilities: Combination of the equations (27) and (29): Combination of the equations (27) and (30): The values for α 8 were obtained from the requirement The last snake scheme can be simplified by decreasing all snake angles by 2Q/4, leading to These snake schemes are shown in Fig. 7 where account has been taken of the fact that the actual angle between the snake's rotation axis and the radial direction is α/2. Furthermore advantage has been taken of the fact that the angle α/2 only needs to be known modulo π.
Here it is very important to note that the snake angles are independent of ν = Gγ and therefore that a snake  [0, π). The vertical tune times 2π is denoted by Q and ν = Gγ2π. The other two possible snake schemes are obtained by reversing the sign of Q. When all snake angles are increased by the same amount, then the ring remains spin transparent. Note that the snake angle is independent of ν and thus of energy match has been achieved for all energies. With 4 Siberian Snakes such an energy independent snake match is not possible in a four-fold symmetric ring.
One could repeat the same procedure for a layout with 6 horizontal Siberian Snakes or with combinations of, for example, 6 horizontal Siberian Snakes and two type III snakes. Due to their three-fold symmetry, this could be of special interest for the RHIC rings. When the spin-orbit-coupling integrals starting at an azimuth θ 0 are minimized, the opening angle of the invariant spin field at θ 0 for the approximation of linear spin-orbit motion is also minimized. In fact, P lim = 1 in linear approximation if I ± = 0 since then the spin motion is decoupled from the orbit to first order.
It has been seen from the example of a ring with superperiodicity 4 that 8 Siberian Snakes can be used to snake match the spin-orbit-coupling integrals to zero at one azimuth of the ring for all energies. This could be achieved since the snake angles were used to adjust the spin phase advances in such a way that perturbations in one part of the ring were compensated by identical perturbations in one of the identical super-periods of the ring.
HERA-p has 4 identical arcs separated by 4 not identical straight sections. Due to the lack of four-fold symmetry it is in general not possible to find snake angles which completely compensate all spin-orbit-coupling integrals. However, the 4 identical arc sections of HERA dominate the spin-orbit resonance strength of vertical motion. Thus it would make sense to arrange that the perturbing effect of these arcs cancel each other. A first step in this direction is a symmetrization of the quadrants by making the spin phase advance in all of the straight sections identical. This can be done by the insertion of two more flattening snakes.
The spin-orbit-coupling integrals from the first regular FODO cell to the last FODO cell of a regular arc in HERA-p will be denoted byÎ + y andÎ − y and the azimuths of the beginnings of the 4 regular arcs as θ 1 , θ 2 , θ 3 , and θ 4 . The central points of the South, West, North, and East straight sections are denoted by S, W , N , and E. The spin phase advances between the arcs are compensated using, the snake angles ϕ E , ϕ N , and ϕ W . The spin phase advance between θ i and θ j is denoted by Ψ ij . These notations are indicated in Fig. 8. With Siberian Snakes in each of the straight sections, the spin phase advance from θ 1 to θ 3 is given by The spin phase advance is identical in all quadrants of the ring. The total spin phase advance is then solely determined by the snake angles and is therefore independent of energy: Ψ 13 = 2(ϕ N − ϕ E ) and Ψ 24 = 2(ϕ W − ϕ N ). The orbital phase advance Φ(θ 3 ) − Φ(θ 1 ) also does not depend on energy. For simplicity, Φ(θ j ) − Φ(θ i ) will now be denoted by Φ ij .
The spin-orbit-coupling integrals at the South interaction point then contain the following contributions from the 4 regular arcs: This shows that it is always possible to cancel one of the spin-orbit coupling integrals by choosing the snake angles so that the spin perturbation produced in one of the arcs is canceled by the arc on the opposite side of the ring. Since |Î + | and |Î − | are different, neighboring arcs can in general not compensate each other when 4 Siberian Snakes are used.
It is however possible to use the eight-snake scheme found for symmetric lattices. The two special 8 Siberian Snake schemes which lead to an energy independent snake match in a ring with super-periodicity 4 will not spin-match HERA-p completely, but the spin perturbation from the arcs, which are the dominant perturbation, will be compensated exactly. This possibility of having a set of Siberian Snake angles which do not have to be changed with energy and which lead to a tightly bundled invariant spin field is on the one hand very attractive; on the other hand it requires 8 Siberian Snakes of which 4 would have to be installed at the centers of the HERA-p arcs, where technical requirements of moving cryogenic feed-throughs and super-conducting magnets would be very costly. If possible, a four-snake scheme should therefore be found.
Whereas it was shown below (18) that a four-snake scheme cannot cancel both spin-orbit-coupling integrals in a ring with super-periodicity, a corresponding cancelation of the spin perturbation due to the arcs in HERA-p can nevertheless be achieved since the orbital phase advances between the arcs can be manipulated individually, while these four phase advances are equal for a lattice with super-periodicity 4.
To cancel both spin-orbit integrals in (42), 4 phase factors have to be −1. This requires Subtraction of the first two equations leads to the requirement that the betatron phase advance from θ 1 half way around the ring to θ 3 is an odd or even multiple of π. The same is true for the phase advance from θ 2 to θ 4 . Correspondingly, the spin phase advance over these regions has to be an odd multiple of π when the orbit phase advance is an even multiple and vice versa. With a rather benign change of the vertical optics in HERA-p which does not change the vertical tune, the contribution of the regular arcs to both spin-orbit-coupling integrals can be canceled, even in a four-snake scheme. The snake scheme (0 π 2 π 2 π 2 )o has Ψ 13 = 0 and Ψ 24 = 0. For this snake scheme, the betatron phase advances from θ 1 to θ 3 and from θ 2 to θ 4 were adjusted to be odd multiples of π. This change of the optics is indicated by the index o in the notation of the snake scheme. The maximum time average polarization P lim is plotted (blue) in Fig. 9 for the complete range of HERA-p momenta (top) and for the critical momentum regions above 800 GeV/c (bottom). As a comparison, P lim for a standard snake scheme ( π 4 0 π 4 0) (red) is also shown. The complete snake match of the arcs in HERA-p in deed eliminates all strong reductions of P lim over the complete momentum range. Nonlinear effects will be analyzed later, but as far as the linear effects are concerned, this snake matched lattice of HERA-p would be a rather promising choice for the acceleration of polarized proton beams. 2 )o (blue). As a comparison P lim from linearized spin-orbit motion is shown for the same HERA-p optics with a ( π 4 0 π 4 0)o snake scheme (red )

B. Schemes with 8 snakes:
Although, for the reasons explained, eight snakes are not very practical for HERA-p, significant improvements would be possible if 8 snakes were used, as will now be shown. The snake matching schemes of Fig. 7 are suitable for rings with super-periodicity 4. They are therefore not directly applicable to HERA-p. However, the cancelation schemes of Fig. 6 can still provide a guide to snake matching HERA-p with 8 snakes.
The 8 Siberian Snakes are placed in the straight sections and into the centers of the arcs, so that the horizontal angle between adjacent Siberian Snakes is 45 • and therefore Ψ j = Gγπ/4 for all j ∈ {0 . . . 7}. This ensures that the snake match is independent of energy since then the nth octant's contribution I ± n−1 to the spin-orbit coupling integral I ± can be compensated by the 2nd neighbor's contributions I ± n+1 . In particular the Ψ j cancel in the phase factor in . Now a snake scheme for HERA-p is sought that is guided by the cancelation scheme of Fig. 6 (left). When the first octant's contribution I ± 0 to a spin-orbit coupling integral I ± is to be compensated by that of its 2nd neighbor I ± 2 , the phase factor in should be −1. The same should be true for the phase factor in These conditions are satisfied for the superscript + as well as − when all the snake angles α j are zero for j ∈ {1, 2, 5, 6} and the betatron phase advances are chosen appropriately. Similar conditions arise for the phase factors involved in matching I 1 against I 3 and in matching I 5 against I 7 . They are also −1 when the betatron phases are chosen appropriately and when α 3 and α 7 are zero. Since α 0 and α 4 do not appear in these matching conditions, they can be chosen freely. But for a design orbit spin tune of 0.5, one has to choose α 0 + α 4 = π.
Here α 4 = 0 has been chosen and this snake scheme is then characterized as ( π 2 0000000)o. In the case of HERA-p spin-orbit integrals of complete octants cannot cancel, but the contribution of the regular arc sections can cancel. Therefore the betatron phase advance is not chosen to be Φ 0 +Φ 1 • = π between Siberian Snakes, but rather the betatron phase advances between the beginning of the regular arcs of the first and the second quadrant are chosen in that way, i.e. Φ 12 • = π with the notation of Fig. 8. In this configuration the regular arc of the first octant cancels that of the third, i.e. the regular arc's contribution to I 2 cancels that to I 0 . But also the regular arc of the second octant cancels that of the fourth since the betatron phase advance between the centers of the first and the second arc is then also π mod 2π, i.e. the regular arc part of I 3 cancels that of I 1 . Similarly the octants of the third quadrant cancel those of the fourth quadrant. In the snake scheme ( π 2 0000000)o the phase advance over the East straight section was changed by 2π × 0.1028 to have Φ 12 = 2π × 8.5. The phase advance over the West was changed by 2π × 0.0208 to have Φ 34 = 2π ×7.5. In order to have the same betatron phase advance in the North and the South straight sections and to keep the total tune constant, the linear optics of the North and of the South straight sections were modified.
This cancelation scheme does not agree completely with that of Fig. 6 (left) since in ( π 2 0000000)o the superscripts + and − have been dealt with simultaneously so that I ∓ 0 no longer has to compensate I ∓ 4 . Since Φ 12 • = π and Φ 34 • = π, it is appropriate to take q = π/2 for the phase advance of one octant of the scheme in Fig. 7 (left), for which one then finds a close similarity to the snake scheme ( π 2 0000000)o. The resemblance would be even closer if the phase advance over the North straight section had been changed so that Φ 23 • = 0 and if α 4 = π, α 0 = 0 had been chosen. This would require an additional change of Φ 41 to adjust the orbital tune.
A snake scheme for HERA-p which resembles Fig. 6 (right) can also be found. In this cancelation scheme the phase factors in the following sums have to be −1: (50) (51) (52) (53) (54) (55) Again complete octants cannot cancel, but to cancel the contributions of regular arc sections, the beginning of a regular arc is chosen as the starting point for the compensation. Now the Φ n for all even n describe the betatron phase advance from the beginning to the center of the regular arc, and they are therefore equal. For the choice α 4 = 0 all phase factors are −1 if and only if Φ 5 = Φ 1 and This snake scheme is referred to as ( π 2 abc0-c-b-a)o. The condition Φ 5 = Φ 1 was satisfied by changing the betatron phase advance over the East and West straight section without changing the vertical tune.
Linearized spin orbit motion leads to a very favorable P lim for both eight-snake schemes as shown in Fig. 10, where it is compared to the P lim of the snake and phase advance matched four-snake scheme (0 π 2 π 2 π 2 )o.

VI. HIGHER-ORDER RESONANCES AND SNAKE SCHEMES
At the critical energies, where the maximum time average polarization is low during the acceleration process, linearized spin-orbit motion does not describe spin dynamics well. The spin motion is influenced by several overlapping resonances in these regions and the single resonance approximations [16,33] can also not be applied. Thus the simulation results obtained with these computationally quick techniques should always be checked with more time consuming non-perturbative methods if possible. This is also true for the snake-matched lattices of HERA-p with large P lim , even though they avoids large variations of the invariant spin field n( z) over the phase space of the beam in linearized spin-orbit motion. When first-order effects are canceled, the higher-order effects become dominant and the quality of the snake-matched lattice of HERA-p can only be evaluated with higherorder theories.
Until 1996, when stroboscopic averaging [13] was introduced, there was no non-perturbative method of computing the n-axis at high energy in proton storage rings, where perturbative methods are usually not sufficient [14]. In addition, the method of anti-damping was derived [34], which also computes n( z) non-perturbatively and which can be faster when the n-axis is required for a range of phase space amplitudes. Both methods of computing the invariant spin field are implemented in the spin-orbit dynamics code SPRINT, by which also the amplitude-dependent spin tune ν( J) can be computed once n( z) is known. Since stroboscopic averaging and anti-damping are based on multi-turn tracking data, they are applicable to all kinds of circular accelerators and they are especially efficient for small rings and for simple model accelerators. Nonlinear motion for orbit and spin coordinates can esily be included [35,36].
Subsequently another non-perturbative algorithm for computing n( z) and ν( J) has been derived [37]. It is called SODOM-2 since it was inspired by the earlier algorithm SODOM [11] which for convergence required the angle between n and n 0 to be small. With some routines provided by K. Yokoya, SODOM-2 was incorporated into the program SPRINT [13,38,39] and leads to results which agree very well with those of stroboscopic averaging. For motion in one degree of freedom, SODOM-2 is often faster than stroboscopic averaging, especially for large rings like HERA-p where particle tracking is relatively time consuming. But for orbit motion in more than one degree of freedom or in the vicinity of spin-orbit resonances, SODOM-2 becomes exceedingly slow and then stroboscopic averaging and anti-damping are needed.
To check whether the improvements of spin motion obtained in the framework of linearized spin-orbit motion survive when higher-order effects are considered, P lim and ν has been calculated. The result for one of the standard Siberian Snake schemes which used to be considered advantageous by popular opinion is shown for the South interaction point of HERA-p in Fig. 11. It has four Siberian Snakes in the ( π 4 0 π 4 0) scheme. Some of the features of P lim were already revealed by linearized spin-orbit motion in Fig. 1. Now many higherorder resonances are revealed, causing strong reduction of P lim and there are corresponding strong variations of the amplitude-dependent spin tune ν [40,41]. Strong resonances occur especially in the critical energy region where linearized spin orbit motion in Sect. II already indicated a very small P lim due to a coherent spin perturbation in all regular FODO cells. Many higher-order resonances overlap in these critical energy regions of Fig. 11 (top) where large spin tune jumps can be observed in Fig. 11 (bottom). The strongest spin tune jumps occur in the critical energy regions, mostly at the second order resonance ν = 2Q y which is indicated by the top line [42]. The maximum time average polarization P lim for the complete acceleration range (left) and for the critical energy range above 800 GeV/c which has to be crossed when accelerating to the proposed storage energy of 870 GeV/c. Bottom: the corresponding amplitude dependent spin tune ν(Jy). The second-order resonances ν = 2Qy and ν = 1 − 2Qy are indicated (red ) Figure 12 also shows P lim and ν for higher-order spin dynamics in the snake-matched and phase-advancematched HERA-p ring with 4 Siberian Snakes. While the overall behavior of P lim over the complete acceleration range of HERA-p looks similar to the result obtained with linearized spin-orbit motion, which was displayed in Fig. 9, higher-order effects become very strong at high energies, especially in the vicinity of the critical energies where perturbations of spin motion in each FODO cell accumulate. The spin tune spread at momenta below 400 GeV/c is small and higher-order effects seem to be benign even at these critical energies. A comparison of Figs. 11 and 12 hello shows that the special scheme obtained by matching orbital phases and snake angles would be a very good choice for HERA-p up to 300 or 400 GeV/c. For linearized spin-orbit motion, this snakematched scheme does not produce a strong reduction of P lim at any critical energy, but the higher-order effects become very pronounced at some top energies of HERAp. Nevertheless, the advantage over other snake schemes becomes clear in figure Fig. 12 (bottom) where the amplitude dependent spin tune ν is shown. It comes close to a second order resonance at fewer places and does not exhibit spin tune jumps which are as strong as those in previous figures of ν.
In this snake-matched scheme, the influence of higherorder effects can be seen very clearly, because the firstorder effects have been matched to be very small. The analysis of ν shows that completely snake matching the spin perturbations in the arcs of HERA-p with 4 Siberian Snakes is advantageous, even though dips of P lim due to higher-order resonances can be observed at high energies. Even around 300 GeV/c there are resonant dips of P lim in Fig. 12 (middle) but they are less pronounced than those in Fig. 11 so that the snake matched scheme should be very advantageous in the complete energy range of HERA-p.

VII. POLARIZATION REDUCTION DURING ACCELERATION
It should be noted that the destructive spin tune jumps at second order resonances disappear completely when HERA-p is simulated without its non-flat regions. This is due to the fact that a large class of resonances are not excited at all in mid-plane symmetric rings [5,43]. To reduce these perturbations, the East region of HERA-p will now be simulated as flat since the HERMES experiment located in this region does not require that the proton beam is on the level of the electron beam.
When a particle is accelerated across the critical momentum region from 800 to 806 GeV/c with a typical acceleration rate of 50 keV per turn, the adiabatic invariance of J S = n · S can be violated and the level of violation will depend on the orbital amplitude and the snake scheme. This violation is illustrated in the graphs in Fig. 13 which, for three different snake schemes, show the average spin actionJ S at 806 GeV/c which had initially J S = 1 at 800 GeV/c before acceleration.
The change of J S in the critical energy region depends on the initial phase space angle so that if J S had been computed only for one particle, it could by chance have had an angle variable for which J S does not change although it would have changed for other points with the same vertical phase space amplitude. To avoid such a chance effect which gives the impression that J S is invariant, three particles were accelerated and the averagē J S is displayed in Fig. 13.
At small phase space amplitudes, J S is nearly invariant and thereforeJ S = 1. For each of the three snake schemes, there is a phase space amplitude J ymax above whichJ S < 1 and the regions of the beam with an amplitude above J ymax lead to a reduction of the beam's polarization during the acceleration process.
For the standard snake scheme ( π 4 0 π 4 0), only the part of the beam with less than 1π mm mrad vertical amplitude can remain polarized. For the filtered scheme ( )o gives the most stable spin motion and Fig. 13 shows that vertical amplitudes of up to 8π mm mrad are allowed. This shows that the snake matched scheme is superior 2 )o scheme. Particles with an amplitude above 1 (left), 4 (middle), and 8 (right) lead to a reduction of polarization when the beam is accelerated through this critical energy region to the other four-snake schemes studied here. It stabilizes spin motion for 10 times larger phase space amplitudes than some other snake schemes. Nevertheless, 8π mm mrad is not enough to allow high polarization at top energies for today's emittances in HERA-p.
Matching 8 Siberian Snakes in HERA-p lead to two snake schemes with very high P lim and very small spin tune spread. But to demonstrate that it is possible to further stabilize spin motion in HERA-p by such schemes, Fig. 14 shows the vertical phase space amplitudes for which J S remains invariant. The more effective of the two snake scheme stabilizes spin motion up to a vertical amplitude of 14π mm mrad. These results for the various snake schemes are collected in Fig. 15, where it becomes clear that snake matching with 4 and especially with 8 snakes leads to a significant improvement. In HERA-p it does not suffice to avoid a reduction of J S for particles with less than 14π mm mrad amplitude. It would therefore be very helpful to use electron cooling in PETRA [45, 46? ] so as to reduce the emittance in HERA-p and to allow for an acceleration without loss of polarization for most particles in the beam. The standard scheme which stabilizes spin motion for particles within 1π mm mrad, Cyan: the filtered foursnake scheme stabilizes within 4π mm mrad, Red: the snakematched four-snake scheme stabilizes within 8π mm mrad, Green: the snake-matched eight-snake scheme which stabilizes within 13π mm mrad, Blue: and the snake-matched eight-snake scheme which stabilizes within 14π mm mrad of vertical phase space amplitude The excellent performance of the two schemes with 8 Siberian Snakes is due to much smaller oscillation of the amplitude dependent spin tune during the acceleration process, and the destructive second order spin-orbit resonances indicated in Fig. 16 (bottom and top-right) are hardly encountered when these snake schemes are chosen. Correspondingly P lim only drops to small values at very few energies in Figs. 16 (center and top-left).
Contemplating all these results, it can be concluded that it is not possible to give a simple formula for the number of snakes which are required for a given accelerator since different snake schemes with the same number of snakes lead to very different stability of spin motion. It has even been shown that 8 snakes are not necessarily better than 4 snakes for the non-flat HERA-p ring [47]. In the end detailed evaluation is needed.  16: Improvement of the higher-order P lim and ν(Jy) by matching 8 snake angles and the orbital phases. The snake arrangement is ( π 2 0000000)o (blue) and ( π 2 abc0-c-b-a)o (green). As a comparison P lim from SODOM II is shown for the snake and phase advance matched four-snake scheme 0 π 2 π 2 π 2 )o (red background curve). The resonances ν = 2Qy and ν = 1−2Qy are indicated (also red )