The next two Sections provide the material of a miniworkshop which extended over the two weeks of the Summer 2021 USPAS Spin Class, and was integral part of the teachings.

The work proposed to the attendees essentially consisted in the numerical simulation of polarized beam manipulations in the AGS injector—“AGS Booster”—starting from basic principles (computation of resonance strengths, resonance crossing, effect of synchrotron radiation, etc.), and extending to the application of polarization preservation techniques (harmonic orbit correction or excitation, ac dipole, snakes, spin matching, etc.). As a matter of fact, for simplicity the same lattice, the AGS Booster, with magnetic rigidity adapted in consequence, was used for simulations concerning indifferently hadron polarization, or electron polarization and the effect of synchrotron radiation.

The miniworkshop covers many of the theoretical aspects addressed during the lectures, and the main goal in performing these numerical simulations is to compare their outcomes and theoretical expectations.

Section 14.1 gives the assignments. A first part addresses hadron (precisely, helion, Table 14.1) beams (Sects. 14.1.1.114.1.1.17 and Tables 14.2, 14.3), a second part deals with electrons and synchrotron radiation (Sects. 14.1.2.114.1.2.5).

Table 14.1 Parameters of helion, 3He2+, the particle considered in the exercises. Proton data are given for comparison. Note: atomic mass unit: 931.4940954 MeV∕c2; μN = ∕2m
Table 14.2 Booster parameters. The table is to be completed in answer to Question 14.1.1.1-1, accounting for3He2+ parameters given in Table 14.1. The injector DTL (drift tube linac) determines the ion velocity at Booster entrance, namely, β = vc = 0.0655 value
Table 14.3 Beam parameters

Section 14.2 gives detailed solutions of these numerical simulation exercises.

Finally, everything starts from a single input data file, “superA.inc”, short enough to be given in its entirety in Table 14.4 and subsidiary Tables 14.5 and 14.6, the latter two being a series of 6 cells constitutive of the AGS Booster ring. Nothing else is needed but the code executable, “zgoubi”, downloadble from sourceforge [1]. The execution for instance of the said input data file is a mere

$$\displaystyle \begin{aligned} \text{zgoubi -in superA.inc}\end{aligned}$$

All gnuplot [2] and zpopFootnote 1 graphs in the present assignments and in their solutions (Sect. 14.2) derive from ancillary files produced (readable during and upon completion of simulation) by this simple execution instruction. The input data file taken from these Tables 14.4, 14.5 and 14.6 is developed further when needed, namely very little, as required in one or the other of these various problems.

Table 14.4 The superA cell sequence in this superA.inc data file features the markers MARKER[LABEL1=superA_S] and MARKER[LABEL1=superA_E] at its extremities. These labeled MARKERs allow that very section of superA.inc, and that section only, to be INCLUDEd in further job files—INCLUDE has a similar function to CALL in MAD job files. This input file superA.inc itself INCLUDEs the LA1, LA2, LA3, LA6 subsections (Tables 14.5 and 14.6). Comments are provided for guidance, consulting the Users’ Guide is unavoidable
Table 14.5 LA1.inc and LA2.inc optical sequences. These are two of the 4 different files (LA1.inc, LA2.inc, LA3.inc, LA6.inc) that make up the LA1.inc-LA2.inc-LA3.inc-LA2.inc-LA1.inc-LA6.inc-LA1.inc-LA2.inc superA.inc super cell sequence of Booster. These LA*.inc are subject to INCLUDE in superA.inc data file (Table 14.4)
Table 14.6 LA3.inc and LA6.inc optical sequences. These are two of the 4 different files (LA1.inc, LA2.inc, LA3.inc, LA6.inc) that make up the LA1.inc-LA2.inc-LA3.inc-LA2.inc-LA1.inc-LA6.inc-LA1.inc-LA2.inc superA.inc super cell sequence of Booster. These LA*.inc are subject to INCLUDE in superA.inc data file (Table 14.4)

However, simulation input and output data files of many of the exercises have been saved in Zgoubi development repository, where they can be downloaded from:

https://sourceforge.net/p/zgoubi/code/HEAD/tree/trunk/exemples/uspasSpinClass_2021/

Besides, users may want to consider the use of python interfaces to zgoubi, subject to continuing development and available on web, pyZgoubi [4] and zgoubidoo [5], or the ad hoc HPC environment interface in Sirepo [6] where as well AGS Booster input data files may be found.

14.1 Numerical Simulations: Problems

The numerical simulations proposed in this Section address many of the theoretical aspects of polarized hadron beam acceleration and of electron polarization, introduced in the lectures. They use stepwise ray-tracing techniques (i.e., a step-by-step integration of the equations of particle and spin motion), the reason for this is that the method allows detailed inspection of motion across optical elements, whether using analytical magnetic/electric field models or field maps, and it allows accurate Monte Carlo simulations such as stochastic emission of photons (synchrotron radiation) and its effects on particle and spin dynamics.

Three different classes of problems regarding the manipulation of polarized beams in circular accelerators are addressed:

  • excitation of depolarizing resonances, and their effect on bunch polarization,

  • preservation of polarization of hadron beams during acceleration,

  • maximization of polarization and polarization life-time, in an electron storage ring.

Both series of simulation problems will use the same lattice, namely the AGS Booster ring. This means in particular, the same optical sequence input data files, mutatis mutandis.

Hadron Polarization Simulations

Beam-beam collisions involving polarized helion (3He2+) are part of the physics programs at the EIC. Polarized helion beams are produced using an EBIS source. Prior to injection in the EIC HSR (Hadron Storage Ring, an evolution of RHIC collider rings), helion beams are accelerated in the AGS Booster and in the AGS (Fig. 14.1).

Fig. 14.1
An illustration presents the layout of an area with the R H I C injector line. It also includes the locations of the A G S ring, experimental area, E R L and accelerator R and D facility, booster, N S R L, Linac, E B I S, B L I P, and T T B line.

RHIC injector cascade, the future EIC hadron injector system, in 2021 (RHIC itself is not shown): H 200 MeV linac, EBIS ion sources, AGS booster (which also accelerates ions for the NSRL, NASA Space Research Lab), the AGS, and the AGS to RHIC (AtR) injection line

At low rigidity, the cold snakes in the AGS cause harmful optical distortions, including linear coupling. A path to overcome this issue is by injecting3He beams at a high enough energy that these distortions become negligible. On the other hand, under the effect of two partial snakes, the stable spin direction n0 in the AGS is at an angle to the guiding field, with a least magnitude every || = 3n + 1.5 (Fig. 14.2). As a result, it is foreseen to extract 3He beams from the Booster at || = 10.5. These will be the conditions considered in these exercises, regarding hadron polarization.

Fig. 14.2
A line graph plots S subscript y versus G subscript gamma. A waveform is plotted through (negative 14, 0.3), (negative 13.5, 0.98), (negative 13, 0.03), (negative 12.5, 0.88), (negative 12, 0), (negative 11.5, 0.88), (negative 11, 0.03), (negative 10.5, 0.98), (negative 10, 0.03), (negative 9.5, 0.88), (negative 9, 0), (negative 8.5, 0.88), (negative 8, 0.03), (negative 7.5, 0.98), and (negative 7, 0.3). Values are estimated.

Vertical component of AGS n0 spin eigenvector, in the presence of two partial snakes. The angle to the vertical guide field is minimal every three units,  = −7.5,  − 10.5,  − 13.5, etc

Electron Polarization Simulations

High polarization of the electron beam at the collision points is required by the EIC physics program. Relativistic electrons emit photons, and a small fraction of these radiated photons contribute to spin flip, which builds up beam polarization through the Sokolov-Ternov effect. In the vast majority of cases, photon emission is associated with noisy orbital motion causing extra spin diffusion, i.e. depolarization.

In the present simulations regarding high energy electrons in a storage ring, rather than using the EIC electron storage ring (ESR) lattice, the very ring considered for hadrons, the AGS Booster, is used. There are various reasons for that: the Booster is a short ring (200 m), whereas the ESR is 3.8 km, this results in quicker tracking; it allows, quite efficiently, for dealing with a single lattice for studies of both, hadron and electron spin dynamics; the AGS Booster lattice is much simpler than the ESR one, input data files are easier to handle; moving from hadron to electron simulations (or vice versa) reduces to essentially a matter of changing the reference rigidity and the nature of the particle.

The goals in the electron polarization simulations are to:

  • establish stable particle motion in the AGS Booster lattice for an electron beam energy of 10 GeV, checking the damping parameters;

  • calculate the invariant spin field n0;

  • understand depolarization through the deviation of n0 from the vertical in arc dipoles, and

  • practice a spin matching mechanism, which maximizes electron polarization.

Practical Aspects Regarding These Numerical Simulations

When developing simulation input data files, or when using existing ones, in order for what’s computed, and the physics behind it, to be clear to the user, it can not be avoided to refer to the Users’ Guide [1]. Having it at hand, ready to use, and consulting it whenever something happens which looks weird, or looks like going awry, is recommended.

A good thing to do when questions arise—and many will, is to navigate in the INDEX section of the Users’ Guide. Note the two main parts in the Users’ Guide: PART A which comments on the physics content and capabilities of the various optical elements and commands, and PART B which details the formatting of the data in an input data file. Two bold numbers generally appear in the guide INDEX, for any item; the first points to Part A, and the second to Part B. Additional considerations that may usefully be given some attention, are documented in the Appendix.

The computation of spin and orbital motion in this code uses stepwise ray-tracing techniques. This means that it solves the Lorentz and T-BMT differential equations proper, with no approximations on particle or spin dynamics, step-by-step. This allows accurate field modeling (and that does not preclude approximate field models if desired anyway) and detailed insight regarding their effect on spin motion.

In any event, one should not lose sight of the goal of the present simulation exercises, which is not especially to learn about a computer code. It is rather to play with, and learn about, spin dynamics in electric and magnetic fields, snakes, rotators, synchrotron radiation and spin diffusion, as a complement to the various theoretical chapters.

14.1.1 Polarized Helion in AGS Booster

14.1.1.1 AGS Booster Parameters

The ring lattice used for these exercises is a simplified version of the AGS Booster, composed of 6 superA super cells. Lattice parameters are given in Table 14.2, the table needs to be completed as part of the exercises.

The superA sequence (Table 14.4) is taken from the MAD8 [7] model used for Booster operation. The resulting optical functions of superA are displayed in Fig. 14.3.

Fig. 14.3
A multi-line graph plots beta and D in meters versus s in meters. The values are plotted for 3 functions. The first function, beta subscript x, is a triangular wave that begins at (0, 5.55) and ends at (34, 5.55) with an amplitude between 3.8 and 13.4. The second function, beta subscript y, is a triangular wave that begins at (0, 9.8) and ends at (34, 9.8), with an amplitude between 3.8 and 13.4. The function D subscript x begins at (0, 0.74), reaches minimum and maximum peaks, and ends at (34, 0.70). Values are estimated.

Booster superA cell optical functions, as per MAD8 [7] model used for Booster operation. A simplified Booster lattice, comprised of 6 such super cells (parameters given in Table 14.2), is used in the present simulations

Question 14.1.1.1-1: Complete Table 14.2 with the missing numerical values. These parameters will be used throughout the simulations, in particular in setting proper data values in the simulation input data files.

14.1.1.2 Cell and Lattice Optics

It is necessary to first check lattice parameters, viz simulation input data files, prior to engaging in fancy spin tracking simulations.

The Zgoubi input data file superA.inc (Table 14.4) has been translated from the MAD model (Sect. 14.1.1.1); this and other Zgoubi input data files used in subsequent exercises can be found in [8].

Question 14.1.1.2-1: Run that file, namely (with [pathTo]/ being the address of the folder that contains the Zgoubi executable on your computer):

$$\displaystyle \begin{aligned} \mathtt{ [pathTo]/zgoubi\ -in\ superA.inc}\ \end{aligned}$$

This produces the transport matrix of super cell A, and its periodic beam matrix and tunes (logged in zgoubi.res).

Explain the role of the FIT procedure.

Question 14.1.1.2-2: Check the lattice parameters against Table 14.2 data (they are logged at the end of the sequence, bottom of zgoubi.res result listing).

Question 14.1.1.2-3: Check the periodic optical functions (logged in zgoubi.res) against MAD8 results (logged in MAD8 “print” file).

Question 14.1.1.2-4: Run a TWISS command (replace MATRIX command in superA.inc) to produce the optical functions along the super cell (TWISS logs these in the file zgoubi.TWISS.out). Produce a graph of the latter, compare to Fig. 14.3 from MAD8.

14.1.1.3 Spin Optics

Injection energy (see Table 14.2) is considered in this question. Tracking is needed in some of the questions, it is performed using the input data file given in Table 14.7, in which, compared to Table 14.4, OBJET[BORO] and SCALING coefficients have been set to injection rigidity, leaving the optics unchanged (cell optical functions as in Fig. 14.3).

Table 14.7 Input data file to track 3 helion ions, on-momentum and at δpp = ±10−4, and their spins, along Booster. This data file also defines the [SCALING_S:SCALING_E] segment, for INCLUDE purpose—for shortness—in subsequent exercises

Question 14.1.1.3-1: The spin closed orbit in the ideal ring (six superA cells, planar, no defects) is vertical everywhere.

Tracking shows that this is also the case for off-momentum particles. Is it what’s expected? Please explain.

Question 14.1.1.3-2: provide the following simulation: track the spin closed orbit over a turn, for an on-momentum particle, and for off-momentum particles at dpp = −10−4 and dpp = +10−4. Provide a graph of the spin components for these 3 particles.

Add the computation of the spin matrix to get the 1-turn spin map and the spin tune.

Explain the value of the 1-turn spin precession angle (as found for instance under SPNPRT in zgoubi.res).

Question 14.1.1.3-3: What are the spin tune values, on-momentum and at dpp = ±10−4?

14.1.1.4 Depolarizing Resonances

Question 14.1.1.4-1: Begin filling in Tables 14.8 and 14.9, for the moment with the respective locations ( values) of

  • imperfection resonances,

    Table 14.8 Imperfection resonance locations () and strengths (𝜖n); table to be completed. Note: give resonance strengths normalized to rms closed orbit amplitude
    Table 14.9 Systematic intrinsic resonances; table to be completed. Note: give resonance strengths normalized to the square root of the invariant value
  • systematic intrinsic resonances,

over the energy range of concern (Table 14.2). These data will be used in subsequent questions.

Question 14.1.1.4-2: Illustrate the crossing of intrinsic resonances (the strengths of which are εy-dependent) with two graphs of Sy(Gγ), as follows:

  • take a few particles evenly distributed in phase on the same vertical invariant εy (OBJET[KOBJ=8] can be used; or initial coordinates may be generated off-line and then OBJET[KOBJ=2] used). The horizontal invariant εx can be taken null (explain why);

  • accelerate (use CAVITE, placed for simplicity at either end of the optical sequence) from injection to some \(G\gamma \lesssim -18+u _y\) in two different cases: εy = 2.5 πμm and 10 times less.

Comparing these two graphs, essentially two things are observed: please comment.

Question 14.1.1.4-3: Provide a graph showing the span of the magnetic field strengths experienced in the vertical quadrupoles by the orbiting particles, depending on their initial betatron phase.

14.1.1.5 Imperfection Resonance Strengths

Introduce a particular series of random vertical misalignments of the 48 quadrupoles around Booster. ERRORS could be used for that, to randomly modify MULTIPOL[KPOS=5] alignment data; however, it is suggested instead to use the misalignment series proposed in Table 14.10, for consistency with the detailed solution to this and subsequent questions given in Sect. 14.2 (Sects. 14.2.1.5 and 14.2.1.7).

Table 14.10 A possible random vertical misalignments series for the 48 quadrupoles around Booster (this is the data series used in the solutions, Sects. 14.2 and 14.2.1.5). It is now necessary to distinguish the 48 quadrupoles of the six, now distinct, super cells: essentially a matter of renaming each quadrupole, for instance with suffixes A1 to A8 (superA cell), B1 to B8 (superB cell), …, F1 to F8 (superF cell)

A python script amongst other means can be written to apply this series to the six, now distinct, superA, superB, superC, …, superF super cells. An example script is shown in Table 14.11 that saves a new include file that contains superA through superF as zgoubi_misaligned.INC. These modified super*.inc files will be used in place of the six superA.inc in the previous exercises.

Table 14.11 Example python code to modify given .inc files to allow quadrupole misalignments using KPOS=5 and allow these alignments to be based off an external file. The code: reads in existing include files and quadrupole alignment data, parses through them and finds quadrupoles, modifies the quadrupole KPOS line to use KPOS=5 with alignment data from external file, compiles all modified include files, saves a new include file for the entire Booster lattice, zgoubi_misaligned.INC. Commented lines allow modifying vertical corrector strengths in order to use the harmonic correction method

Question 14.1.1.5-1: Calculate the strengths of the imperfection resonances excited from || = 5 to || = 10, using the theoretical thin lens model (Eq. 2.29).

Hint: produce a zgoubi.TWISS.out file using TWISS command, accounting for the now non-zero vertical closed orbit excursion using FIT (preceding TWISS), to evaluate Eq. 2.29.

Complete the “theory” column of Table 14.8 accordingly.

14.1.1.6 Intrinsic Resonance Strengths

Assume an invariant value equal to the transverse beam emittance (Table 14.3). Use your input file without quadrupole misalignments.

Question 14.1.1.6-1: Calculate the strengths of the intrinsic resonances, using the theoretical thin lens model (Eq. 2.35).

Hint: use the optical file zgoubi.TWISS.out produced in Sect. 14.1.1.2 to evaluate Eq. 2.35.

Complete the “theory” column of Table 14.9 accordingly.

14.1.1.7 Spin Motion Through Imperfection Resonances

It is suggested here to use the input file with misaligned quadrupoles of Sect. 14.1.1.5 (this is the case for the solutions provided in Sects. 14.2 and 14.2.1.7).

Question 14.1.1.7-1: Stationary case (fixed energy).

Complete Table 14.8, “stationary” column, by tracking at various distances near resonance, using Eq. 2.49.

Question 14.1.1.7-2: Accelerating through the resonance.

CAVITE[IOPT=3] may be used for acceleration.

Complete Table 14.8, “crossing” column, by tracking through every integer resonance from  = −5 to  = −10.

14.1.1.8 Spin Motion Through Intrinsic Resonances

Question 14.1.1.8-1: Stationary case (fixed energy).

Consider one of the strong resonances found in 14.1.1.5.

For various distances to the resonance (say, Δn = N ×|𝜖n|, N is a small integer), produce a graph of the motion of the spin components Sx,s,y(turn), over a few hundred turns—assume vertical initial spin vector orientation for simplicity.

Produce a Fourier spectrum of the horizontal components (Fourier amplitude versus frac(νsp)); explain the frequency components observed in the spectrum.

Produce tables, or graphs, which compare theory with the following results:

  1. (i)

    average values of the vertical component Sy; of the horizontal components Sx, Ss.

  2. (ii)

    dependence of spin component precession frequencies upon distance to the resonance.

Question 14.1.1.8-2: Complete Table 14.9, “stationary” column, by tracking at various distances near the resonance, using Eq. 2.49.

Question 14.1.1.8-3: Accelerating through the resonance.

CAVITE[IOPT=3] may be used for acceleration.

Consider the strong resonance of Question 14.1.1.8-1.

Deduce the resonance strength from the Froissart-Stora formula; check against the theoretical value obtained in Question 14.1.1.6-1 and against the numerical value(s) in Question 14.1.1.8-2.

Question 14.1.1.8-4: Complete Table 14.9, “crossing” column, by tracking through every systematic intrinsic resonance.

14.1.1.9 Spin Motion Through a Weak Resonance

Consider a weak intrinsic resonance (take for instance a random one, or otherwise a systematic with a small enough invariant value), such that Pf ≈ 0.99 Pi.

Question 14.1.1.9-1: Compute the turn-by-turn spin motion Sy(turn) across that resonance, produce Sy(turn) graph.

Match that spin motion Sy(turn) with the Fresnel integral model. From this match, obtain the resonant value, vertical tune, and resonance strength.

14.1.1.10 Beam Depolarization Using a Solenoid

Depolarization of the beam while it is still in the accelerator may be a method for calibrations. A longitudinal field can be introduced locally in the lattice for that. Depolarization is obtained by crossing an integer resonance. This is the object of the present simulation.

Question 14.1.1.10-1: Introduce a L = 1 meter solenoid, field Bs (SOLENOID may be used for that, or a 1-D axial field map using BREVOL), in a straight section in the defect free Booster lattice.

Determine Bs from theory for proper value of the strength |𝜖n| of an appropriate integer resonance. Plot Pf(BsL).

Accelerate (using CAVITE[IOPT=3]) a particle with vertical initial spin through that resonance, check that spin motion ends up in the vicinity of the median plane, asymptotically.

Repeat the simulation using SPINR, a pure spin rotation, in lieu of SOLENOID.

Question 14.1.1.10-2: Check depolarization of a beam with Gaussian coordinate distributions in transverse coordinates and momentum spread, with the following parameters:

$$\displaystyle \begin{aligned} \varepsilon_x = \varepsilon_y = 1\, \pi \, \mu{m}, \qquad \sigma_{\frac{\delta p}{p}} = 10^{-3}\end{aligned}$$

14.1.1.11 Introduce a Partial Snake

A partial Siberian snake makes imperfection resonances strong, so causing complete adiabatic spin flip at every imperfection resonance crossing (Chap. 1). The forbidden spin tune band it induces near integer allows for placing the fractional part of the vertical betatron tune inside this gap, so forbidding crossing of intrinsic resonances νsp = n ± νy.

The goal in this exercise is to assess the efficiency of a partial snake in overcoming integer resonances, and the necessary partial snake strength for preservation of polarization during acceleration.

Question 14.1.1.11-1: Create a vertical closed orbit around Booster lattice. This can use ERRORS to generate random vertical misalignment of lattice quadrupoles (this is the case for the solutions provided in Sects. 14.2 and 14.2.1.11; another possibility would be to re-use the input file with misaligned quadrupoles of Sect. 14.1.1.5). Only one ring optics, meaning a single set of quadrupole misalignments is considered in the exercise, as it mostly aims at addressing principles (it is not intended to perform statistics on misalignment samples).

Calculate the strengths of the spin resonances so excited.

Accelerate a particle on the vertical closed orbit, over  : −6.5 →−10.5, provide a graph of Sy(turn).

Check the location and spacing of the resonances, confirm theoretical expectations.

Question 14.1.1.11-2: Install in a drift a longitudinal-axis partial snake (use SPINR for pure spin rotation, avoiding any orbit and optics perturbation).

Inhibit ERRORS (ERRORS[ONF=0]) and set the snake angle to ϕsnake = 2π|Jn|, with |Jn| being the strength of the strongest resonance.

Set the lattice rigidity on n = 7 resonance. Find the spin closed orbit for an on-momentum particle. Plot the spin orbit components around the ring, Sx,y,s(s). Explain what is observed.

Question 14.1.1.11-3: Still in the case of a perfect ring, planar closed orbit, compute the dependence of the spin closed orbit vector, observed at the snake. Produce a graph of the spin orbit components Sx,s,y().

Produce a graph of the spin tune dependence on , νsp().

Question 14.1.1.11-4: Add quadrupole misalignments now (ERRORS[ONF=1]). Thus, spin-wise, both effects now apply, a vertical closed orbit distortion and local spin rotation by a snake (SPINR[ϕsnake = 1.224]).

Accelerate a particle on the vertical closed orbit, over  : −6.5 →−10.5, provide a graph of Sy(turn). Explain what is observed.

Question 14.1.1.11-5: Increase the spin precession in the snake in steps, observe how it affects spin rotation, confirm theoretical expectations.

Justify a minimal spin precession by the snake for spin flip upon resonance crossing.

14.1.1.12 Introduce Full Snakes

Imperfection resonance strengths increase in proportion to γ, thus full Siberian snakes are used at high energy, in order to overcome integer resonances (Chap 1). A full Snake maintains the stable spin precession direction unperturbed as long as the spin rotation it causes (its strength) is much larger than the spin rotation due to the resonance driving fields (Chap. 1).

Based on the previous exercises, set lattice and beam input data in the following way:

  • Set the vertical beam emittance to large enough a value to cause polarization losses at one or more intrinsic resonances.

  • Introduce a random closed orbit distortion sufficiently large that some imperfection resonances create polarization loss during acceleration.

  • Set the snake to “full” mode, ϕsnake = 180, longitudinal-axis rotation.

  •  : −6.5 →−13.5 acceleration range will be considered, so to include three systematic intrinsic resonances (as comes out of the studies in Sect. 14.1.1.4).

Question 14.1.1.12-1: Compute spin closed orbit and spin tune. Compute spin orientation at opposite azimuth (Δθ = 180) to the snake.

Repeat for dpp = 10−4 beam momentum offset.

Which parameters depend on the energy and which do not? Check against expectation from theory.

Question 14.1.1.12-2: Accelerate over  : −6.5 →−13.5. Is there any polarization loss?

Question 14.1.1.12-3: Now use a horizontal emittance as large as the vertical one. Accelerate over  : −6.5 →−13.5. Is there any polarization loss?

Question 14.1.1.12-4: Add a second snake, at proper location and with proper axis orientation to obtain a spin tune of 0.5 independent of beam energy.

Compute the spin closed orbit around the ring. How is it different from the single snake case?

Compute the spin closed orbit and spin tune for dpp = 10−4 beam momentum offset. Compare with on-momentum parameters, check against expectation from theory.

Accelerate a beam over  : −6.5 →−13.5. Is there any polarization loss?

14.1.1.13 High Order Snake Resonances

Set the vertical beam emittance to a value which is large enough to create polarization losses at one or more intrinsic resonances. Introduce a random closed orbit distortion sufficiently large that some imperfection resonances create polarization loss during acceleration. Use the lattice with two snakes. Select the snake axes such that a condition for 2nd order snake resonance with the vertical betatron tune is satisfied.

Question 14.1.1.13-1: Accelerate over  : −6.5 →−13.5, produce a graph of \(\left < S_y({\mathrm {turn}})\right >\).

Remove the closed orbit distortion, repeat the acceleration cycle, produce a graph of \(\left < S_y({\mathrm {turn}})\right >\).

Compare the results, explain the difference in the polarization loss between the cases with and without the closed orbit distortion.

Question 14.1.1.13-1: Select the snake axes orientation such that a condition for 3rd order snake resonance with vertical betatron tune is satisfied.

Accelerate over  : −6.5 →−13.5, produce a graph of \(\left < S_y({\mathrm {turn}})\right >\). Is there polarization loss? Explain the difference in the polarization loss between 2nd and 3rd order resonances.

14.1.1.14 Harmonic Orbit Correction

Using the quadrupole alignment data, perform a harmonic scan for both a strong and a weak imperfection resonance found in Question 14.1.1.5-1. Each corrector magnet is 10 cm long, has an excitation of 9.75 G/A, and a maximum corrector current of 25 A. Power the corrector magnets according to:

$$\displaystyle \begin{aligned} B_{j,h}=a_{h}\sin{}(h\theta_j)+b_{h}\cos{}(h\theta_j) \end{aligned} $$
(14.1)

where j is the corrector number, θj is the location in the ring, ah and bh are the amplitudes for harmonic h. Provide the resulting Pf data and fit it with a Gaussian to find Ic,0 and Is,0, and the associated σs and σc values.

At each of the resonances, is it more reasonable to correct the harmonics or exacerbate them?

How accurate must the harmonic corrector currents of the two families be to have a < 1% polarization loss at each of the resonances?

Track particles through the two imperfection resonances with your desired corrector current. What is the polarization loss through the two resonances?

14.1.1.15 Preserve Polarization Using Tune-Jump

When particles encounter a resonance, if the crossing speed is fast enough, the spin will not be disturbed by the resonance and the polarization will be preserved. The acceleration speed is limited by the RF system and magnet ramping rate, so fast crossing speed needs to come from another method.

The tune jump technique uses dedicated quadrupoles to cause a swift tune change \({du _y} \over {d\theta }\), so increasing the resonance crossing speed according to

$$\displaystyle \begin{aligned} \begin{array}{rcl} \alpha= {{dG \gamma} \over {d\theta} } \pm {{du_y} \over {d\theta}}, {} \end{array} \end{aligned} $$
(14.2)

The || = 0 + νy resonance is considered in this exercise, to simulate the fast tune jump method as sketched in Fig. 14.4. Booster simulation input data files of Sect. 14.1.1.2 (Tables 14.4, 14.5, 14.6, and 14.7) will be used in the following questions, possibly modified as needed.

Fig. 14.4
A free body diagram presents the line nu subscript y, which moves to the right, goes down, again slopes upward to the right, and remains constant. Another line, nu subscript s, slopes upward to the right and crosses the nu subscript y line. The direction of time is indicated by the right arrow.

Cartoon showing the fast tune jump method where νy sweeps across νs quickly, increasing the crossing speed (Eq. 14.2) so minimizing polarization loss as follows from Eq. 2.44

Question 14.1.1.15-1: No tune-jump setting of the quadrupoles in this first question, perfect Booster ring optics is considered.

Take an RF cavity voltage of 100 kV (30 synchronous phase) so an appreciable depolarization can be observed. What is the expected value of \(\frac {dG\gamma }{d\theta }\) with this RF setting?

Take  = 2.12998742 at the start of the tracking, upstream of the resonance (i.e., || = 4.59646969, 276.7452 MeV kinetic energy). Calculate what turn \(N_{0+u _y}\) the resonance is located at.

Consider a particle on εy = 1.864 × 10−7 πm vertical invariant. Assume spin initially vertically aligned. What is the expected asymptotic polarization value, Pf, upon crossing of this resonance?

Run a numerical simulation of this resonance crossing. Note: SCALING in Table 14.11 can be used by simply changing the data under “MULTIPOL QV” so to recover constant tunes νx = 4.73, νy = 4.82 all the way (as in earlier exercises).

Table 14.11 Detailed setting of SCALING for tune jump simulation. Compared to earlier exercises, the change essentially concerns the vertical quadrupole scaling data, namely under “MULTIPOL QV*”, with SCALING[NT=5], which indicates that a series of 5 different scaling coefficient values follow (the data line following NT) at 5 different timings (shown on the next data line in units of the turn number)

Question 14.1.1.15-2: Change the SCALING input parameters so the setpoint of vertical quadrupoles (labeled QV*) begins to change at turn \(N_{0+u _y}\)-50 and continues to \(N_{0+u _y}\)+50 with a total change of -5%. Set the change to return the nominal vertical quadrupole field value at turn \(N_{0+u _y}\)+1050. These SCALING settings are detailed in Table 14.11.

What is the new crossing speed with this tune-jump setting of the vertical quadrupoles?

Calculate the expected Pf given the resonance strength and the new crossing speed. Does this agree with the value from the simulation?

14.1.1.16 Preserve Polarization Using an AC Dipole

An AC dipole can preserve polarization through intrinsic resonances by driving large amplitude vertical betatron oscillations of the entire bunch. This is done with a horizontal magnetic field that oscillates in phase with the vertical motion of the particles. The amplitude of the driven oscillations, Ycoh, follows (Eq. 5.11)

$$\displaystyle \begin{aligned} Y_{coh}=\frac{B_mL}{4\pi B\rho\delta_m}\beta_y \end{aligned}$$

where BmL is the integrated field of the AC dipole magnet, βy is the beta function at the AC dipole and is the bunch rigidity.

For simulation purposes, create a copy of superA.inc Booster superperiod (Table 14.4), which will be called superA2.inc in the following, in which a new half-cell is used, LA32.inc, a copy of LA3.inc (Table 14.6). In LA32.inc, the long drift section now includes a 1 kG, 0.5 m vertical dipole, simulated using MULTIPOL, labeled ’ACD’.

The SCALING command in superA.inc, in addition, uses the option NT=-88 for that ’MULTIPOL ACD’ element of the optical sequence, so to define it as an AC dipole. The format for option NT=-88 is:

MULTIPOL ACD -88 0    0.19   0.19   12.2 100  700    1300   700

The first line following NT=-88 specifies the AC dipole phase offset, the AC dipole tune Q1 at the start of the sweep, tune Q2 at the end of the sweep, and a scaling factor to be applied to the magnet field. The next line specifies the duration of these steps, namely, Nin = hold duration (field held at zero), Nup = ramp up, Nflat = plateau, Ndown = ramp down.

Set Q1=Q2=(1-frac(νy+0.01))

Use OBJET[KOBJ=2] to create a set of 32 particles with the following coordinates to represent a bunch with RMS size [9]:

$$\displaystyle \begin{aligned} y=A_nC\cos{}(j\pi/4)\end{aligned} $$
(14.3)

and

$$\displaystyle \begin{aligned} y'= A_nC\sin{}(j\pi/4)\end{aligned} $$
(14.4)

for j ∈{0, 1, 2, …, 7}, C ∈ {−0.2671, −0.94, −1.9617, −4.1589} and An an amplitude factor.

Question 14.1.1.16-1: Track particles across the || = 0 + νy with AC dipole field scaling factor set to 0.0. Does Pf with the 32 particles equal Pf value obtained with a single particle at the RMS amplitude?

Question 14.1.1.16-2: Set the scale factor to 10 G and track particles again. What is the value of Pf?

Determine what field is needed to get spin-flip from 100% to −99%.

14.1.1.17 Acceleration of a Polarized 6D Bunch

In this question, a simulation of the acceleration of a 100-particle bunch from  = −5.5 to  = −13.5 is set up and run.

The lattice is the same as before, lattice and acceleration parameters are taken from Table 14.2. Bunch parameters are taken from Table 14.3.

Synchrotron motion in the bunch is accounted for in this simulation: use CAVITE [IOPT=2].

Install selected polarization preservation measures based on the previous questions, in order to maximize polarization transmission through the resonances present in that energy range.

In performing the following, comment on the results obtained in regard to expectations, justify results based on theoretical expectations.

From tracking output data (logged turn-by-turn in zgoubi.fai), produce graphs of

  • horizontal and vertical beam excursions,

  • transverse and longitudinal phase spaces,

  • a few individual spins,

  • average bunch polarization,

over the acceleration range.

Produce histograms of the 6 beam coordinates at the top energy. Produce the spin component densities at the top energy. Hint: use HISTO; it is possible to plot from zgoubi.HISTO.out—this requires HISTO[PRINT]. Zpop can be used as well by reading the data from zgoubi.fai.

14.1.2 Electron Spin Dynamics, Synchrotron Radiation

The AGS Booster ring is utilized for the exploration of electron polarization. The optical functions of one super cell are displayed in Fig. 14.3, as described in Sect. 14.1.1.1. The electron beam energy is chosen at a relatively high energy of 10 GeV in order to have the beam reach the equilibrium in a short simulation time. The polarization is evaluated after a few damping times. There are three assignments for the electron polarization studies:

  • calculation of equilibrium emittances and energy spread,

  • study of spin diffusion, and

  • exploration of spin matching technique.

In this study, we will be mainly using somewhat modified versions of the input files [10] that were introduced in Sect. 14.1.1.2 and subsequent sections. Note that,

  • moving from helions to electrons simulation is essentially a matter of changing the reference rigidity (OBJET[BORO] or MCOBJET[BORO]) and the nature of the particle (PARTICUL[ELECTRON], from PARTICUL[HELION]). To avoid having to change the polarities of the magnetic fields in the AGS Booster that are designed for the positively charged particles and thus simplify the set-up of the simulation, we use PARTICUL[POSITRON];

  • synchrotron radiation from all the dipole magnets is introduced by SRLOSS. With the OPTIONS[WRITE ON] (default option), one can check the expected theoretical synchrotron radiation loss after each BEND in zgoubi.res file. Synchrotron radiation statistics can be logged in zgoubi.res using SRPRNT;

  • RF voltage and phase need to be set correctly to compensate the energy loss due to synchrotron radiation.

14.1.2.1 Electron Equilibrium Emittances and Energy Spread

When injected into storage ring, an electron bunch, if unmatched, will eventually reach equilibrium emittances, under the effect of synchrotron radiation (SR). This is the effect addressed in these simulation exercises.

The electron equilibrium emittances and damping rates can be calculated analytically, as discussed in Chap. 6, using the Twiss and dispersion parameters of the linear optics design. These damping parameters in a circular accelerator or in a storage ring can also be obtained from a particle tracking simulation.

Question 14.1.2.1-1: Run the Zgoubi code in Table 14.12 to generate a table of the optical functions of the entire AGS Booster ring, zgoubi.TWISS.out. Generate graphs of the optics and orbit using the Gnuplot script in Table 14.13. Apply the expressions given in Chap. 6 to calculate the damped equilibrium emittances, energy spread and damping times of 10 GeV electrons for the optics tabulated in zgoubi.TWISS.out. Fill out Table 14.14 with your results.

Table 14.12 Left: Zgoubi code producing a table of the optical functions zgoubi.TWISS.out. Right: the scaling_10GeVel.inc INCLUDE file, also used in subsequent exercises. The superA.inc INCLUDE file, which defines the Booster ring optical sequence is given in Table 14.4, it describes one of the six booster super-cells
Table 14.13 Gnuplot script for plotting the optics and orbit results from zgoubi.TWISS.out
Table 14.14 Electron beam parameters. Table to be completed as part of the exercises

Question 14.1.2.1-2: Run the code in Table 14.15. Obtain the energy loss from zgoubi.res for the electron beam energy at 10 GeV and compare it with the analytical calculation in Table 14.14. Use the energy loss to obtain the RF voltage for the RF in Table 14.14. Compare your result with the CAVITE element setting in Table 14.16.

Table 14.15 Zgoubi code for calculating the energy loss per turn. Recall: the scaling_10GeVel.inc file is given in Table 14.12
Table 14.16 Zgoubi code for simulating the beam dynamics with synchrotron radiation

Question 14.1.2.1-3: Examine the initial beam setup in Table 14.16. Check whether the initial beam distribution is matched transversely by comparing the beam setup parameters with the periodic Twiss functions in zgoubi.TWISS.out you obtained earlier. Run the code in Table 14.16 with 100 particles up to 1000 turns with synchrotron radiation enabled. Use the Gnuplot script in Table 14.17 (or a code of your own) to obtain the rms vertical beam size σy as a function of the turn number from the Zgoubi output zgoubi.fai file. Using the Gnuplot script in Table 14.18, calculate the vertical rms emittance from the vertical rms beam size and optics parameters, plot evolution of the vertical emittance, and extract the vertical damping time by fitting the data to an exponential. Compare the obtained vertical damping time to the theoretical value in Table 14.14.

Table 14.17 Gnuplot script for calculating the rms beam parameters
Table 14.18 Gnuplot script for plotting and fitting the vertical emittance data

14.1.2.2 Spin Diffusion Studies

Synchrotron radiation causes spin-flip through the Sokolov-Ternov effect, and spin diffusion. These effects determine the evolution of polarization, and polarization life time (Sects. 6.3 and 6.5). The evaluation of spin diffusion in general requires numerical simulations, which allow deriving the polarization life-time.

Spin diffusion, i.e. depolarization, of polarized electrons can be suppressed and mitigated through the design of an accelerator and proper correction schemes. Alternatively, spin diffusion can also be enhanced if the design or the correction schemes are not done properly. In this exercise, we explore how and how fast spin diffusion happens when n0 changes. We will also demonstrate how spin diffusion can be suppressed by adjustment of the magnet layout and beam optics.

14.1.2.3 Spin Diffusion

Question 14.1.2.2-1: Run the code in Table 14.19 to obtain n0 at the start point of the ideal lattice. This is done by tracking three electrons with spins aligned along three orthogonal directions with synchrotron radiation disabled. Find the spin transfer matrix and precession axis (i.e. n0) in zgoubi.res file.

Table 14.19 Zgoubi code for obtaining n0 at the start point of the ideal lattice

Question 14.1.2.2-2: Set the initial spins of 100 electrons to be aligned with the n0 axis of the ideal lattice. Enable synchrotron radiation. Track the particles by running the code in Table 14.20. Calculate the average spin, or polarization, of the electrons using the script in Table 14.21. Plot the polarization as a function of the turn number and extract the spin diffusion rate by fitting the data. Refer to Table 14.22.

Table 14.20 Zgoubi code for tracking electron polarization with synchrotron radiation enabled
Table 14.21 Gnuplot script for calculating the polarization
Table 14.22 Gnuplot script for plotting the polarization

Question 14.1.2.2-3: Offset the first “QVA1” quadrupole from the start of the lattice by 0.1 cm as shown in Table 14.23 and find the resulting closed orbit using the “FIT2” procedure given in Table 14.24. Make sure that SRLOSS is disabled. The output is saved in the zgoubi.FIT.out.dat. Obtain the n0 axis by specifying the closed orbit offset at the start of the lattice. Launch 100 electrons along the perturbed closed orbit following the initial beam setup provided in Table 14.25 and track them for 1000 turns with synchrotron radiation enabled. Find the average polarization as a function of the turn number, plot it, and extract the spin diffusion rate as in Question 14.1.2.2-2.

Table 14.23 Setup of the “QVA1” quadrupole with 1 mm vertical offset
Table 14.24 Setup of the “FIT2” procedure for finding the closed orbit
Table 14.25 Setup of the “OBJET” element for launching 100 electrons along the perturbed closed orbit

Question 14.1.2.2-4: Repeat the calculation in Question 14.1.2.2-3 and obtain the n0 vectors and the spin diffusion rates with the quadrupole “QVA1” offset by 0.2 and 0.5 cm. Explain your results.

14.1.2.4 Suppression of Spin Diffusion

We will next illustrate how the spin diffusion can be mitigated by changing the polarities of magnetic fields.

Question 14.1.2.2-5: Compare the magnet layouts in Tables 14.26 and 14.27 and describe spin rotations in the two layouts assuming vertical initial spin direction.

Table 14.26 Zgoubi file of a spin rotator lattice where the spin is not longitudinally matched
Table 14.27 Zgoubi file of a spin rotator lattice where the spin is longitudinally matched

Question 14.1.2.2-6: Run the codes in Tables 14.26 and 14.27 and plot the magnetic fields and three spin components along the trajectory using the zgoubi.plt output file (particle and field data logging to zgoubi.plt results from IL=2 in all optical elements; the data format of zgoubi.plt is detailed in [1, Sec. 8.3]). See the plotting examples in Tables 14.28 and 14.29 and use analogous files for the second rotator design. Compare the results with your description in the previous exercise.

Table 14.28 Gnuplot script for plotting the field components
Table 14.29 Gnuplot script for plotting the spin components

Question 14.1.2.2-7: Track the spins of particles with different relative momentum offsets (−0.04, −0.03, −0.02, −0.01, 0, 0.01, 0.02, 0.03, 0.04) in the two spin rotator schematics using the code in Table 14.30 for the first design version and an analogous code for the second one. Explore how the final spin depends on the momentum deviation by plotting the final spin versus the momentum offset in the two cases using the script in Table 14.31. Discuss which case you expect to have a lower spin diffusion rate and why. Note that this is the first order spin matching in the longitudinal direction.

Table 14.30 Zgoubi code for studying the momentum dependence of the spin rotation using the unmatched lattice
Table 14.31 Gnuplot script for plotting the final vertical spin component as a function of the particle’s momentum offset for the two rotator schemes

14.1.2.5 Spin Matching

This section studies the electron spin dynamics at 5 GeV in the AGS Booster in the presence of a solenoidal snake. We consider the cases of spin-matched and spin-mismatched snake configurations. The spin-matched snake lattice is given by the include file listed in Table 14.32. The snake consists of two solenoids with six quadrupoles between them. The quadrupoles are used to compensate betatron coupling from the solenoids and to satisfy the spin matching conditions.

Table 14.32 Contents of the “snake_matched.inc” include file providing the lattice of a spin-matched solenoidal snake

Question 14.1.2.5-1: Use the snake include file in Table 14.32 to insert the snake at the end of the AGS Booster lattice as shown in Table 14.33. Examine the resulting periodic optics using the Gnuplot script in Table 14.13.

Table 14.33 Left: Zgoubi file of the AGS Booster lattice with the spin-matched snake for Twiss calculation. Right: the scaling_5GeVel.inc INCLUDE file, also used in subsequent exercises

Question 14.1.2.5-2: Obtain the n0 axis at the start point of the lattice by running the code in Table 14.34 and examining its output “zgoubi.res” file.

Table 14.34 Zgoubi file of the AGS Booster lattice with the spin-matched snake for n0 calculation

Question 14.1.2.5-3: Determine the spin diffusion rate of this lattice. Track 100 electrons for 104 turns with synchrotron radiation enabled. Start the electrons on the design trajectory with their initial spins aligned with the n0 axis. Refer to Table 14.35 for the corresponding Zgoubi code. Calculate the polarization components using a Gnuplot script similar to that in Table 14.21 and plot the total transverse polarization as a function of the turn number following the example of Table 14.22.

Table 14.35 Zgoubi file for tracking 100 electrons for 104 turns through the AGS Booster lattice with the spin-matched snake

Question 14.1.2.5-4: Reverse the polarity of all quadrupoles (“HQ1” through “HQ6”) between the snake solenoids in Table 14.32. This change keeps betatron coupling compensated but results in violation of the spin matching conditions. Complete tracking through the AGS Booster with the modified snake lattice and analyze the results as in Question 14.1.2.5-3. Compare the spin diffusion rates obtained in the spin matched and unmatched cases.

14.2 Numerical Simulations: Solutions

This Section details the solutions of the simulation exercises proposed in Sect. 14.1.

Understanding these simulations requires having the code manual at hand, ready to consult, Zgoubi Users’ Guide [1] in the present case, or whatever other code the reader my be willing to use otherwise.

In order to reproduce these numerical simulations, the code executable is required. Zgoubi package can be downloaded from its repository in sourceforge:

https://sourceforge.net/p/zgoubi/code/HEAD/tree/trunk/

A README file therein explains how the source code is compiled to generate the executable, zgoubi. Running an optical sequence (say, Booster_Twiss.dat) is then just a matter of executing such command as

[pathTo]/zgoubi -in Booster_Twiss.dat

and the results are listed, a minima, in zgoubi.res file, by default.

All necessary optical sequences for the simulation exercises have been provided as part of the assignments in Sect. 14.1, however most of the simulation material further discussed and used here (input data files, gnuplot scripts, etc.) is also available in the sourceforge repository, at

https://sourceforge.net/p/zgoubi/code/HEAD/tree/trunk/exemples/uspasSpinClass_2021/ Brief additional introductory guidance to using the code can be found in the Appendix, page 91.

14.2.1 Polarized Helion in AGS Booster

14.2.1.1 AGS Booster Parameters

Table 14.2 has been completed, yielding Table 14.36. Some derivations are detailed hereafter.

Table 14.36 AGS Booster parameters, table completed

With M = 2808.39 MeV, |G| = 4.18415, and \(dE/dN=q \hat V \, \sin {}(\phi _s)=0.4\) MeV/turn (q=2, \(\hat V=0.4\) MV, ϕs = 30 deg), the crossing speed comes out to be

$$\displaystyle \begin{aligned} \dfrac{dG\gamma}{d\theta} = \dfrac{1}{2\pi}\dfrac{G}{M}\dfrac{dE}{dN} = -9.4848\times 10^{-5}.\end{aligned}$$

The following excerpt from the “print” file generated by a MAD8 computation of the Booster optical functions is aimed at allowing a comparison with Zgoubi outcomes in the next question:

----------------------------------------------------------------------------------------------------------------------------------  Linear lattice functions.    TWISS               line: ASUPL6                     range: #S/#E Delta(p)/p:     0.000000     symm: F             super:   1                                                             page    20 ----------------------------------------------------------------------------------------------------------------------------------      ELEMENT SEQUENCE       I                H O R I Z O N T A L               I                  V E R T I C A L pos.  element occ.     dist I   betax  alfax   mux    x(co)  px(co) Dx    Dpx  I   betay  alfay   muy    y(co)  py(co) Dy    Dpy no.   name    no.      [m]  I   [m]    [1]     [2pi]  [mm]   [.001] [m]   [1]  I   [m]    [1]     [2pi]  [mm]   [.001] [m]   [1] ---------------------------------------------------------------------------------------------------------------------------------- end   LA8        6   201.780    5.485  0.982   4.730  0.0000  0.000  0.739-0.104    9.704 -1.546   4.820  0.0000  0.000  0.000 0.000 end   ASUPL      6   201.780    5.485  0.982   4.730  0.0000  0.000  0.739-0.104    9.704 -1.546   4.820  0.0000  0.000  0.000 0.000 end   ASUPL6     1   201.780    5.485  0.982   4.730  0.0000  0.000  0.739-0.104    9.704 -1.546   4.820  0.0000  0.000  0.000 0.000 ---------------------------------------------------------------------------------------------------------------------------------- total length =        201.780000          Qx           =          4.730145          Qy           =          4.820140 delta(s)     =          0.000000 mm       Qx'          =         -7.313316          Qy'          =         -2.883899 alfa         =          0.439414E-01      betax(max)   =         13.545393          betay(max)   =         13.149980 gamma(tr)    =          4.770492          Dx(max)      =          2.909356          Dy(max)      =          0.000000                                           Dx(r.m.s.)   =          1.757448          Dy(r.m.s.)   =          0.000000                                           xco(max)     =          0.000000          yco(max)     =          0.000000                                           xco(r.m.s.)  =          0.000000          yco(r.m.s.)  =          0.000000 ----------------------------------------------------------------------------------------------------------------------------------

14.2.1.2 Cell and Lattice Optics

Questions 14.1.1.2.1–14.1.1.2.3—Running superA.inc, due to the MATRIX command at the downstream end of the optical sequence, produces the first order transport matrix of the super cell, say Tcell, and the corresponding beam matrix, i.e. the periodic optical functions at cell ends (using the relation \(T_{\mathrm {cell}}=I\cos \mu + J\sin \mu \)).

These two matrices are found at the bottom of the computation listing, zgoubi.res.

Checking against the data in MAD8 ’print’ output file (Sect. 14.2.1.1) shows a very good agreement.

Question 14.1.1.2.4—Running superA.inc with a TWISS command instead, produces, on the one hand, the following lattice parameter computation outcomes (similar to MATRIX outcomes), found down zgoubi.res listing (an excerpt):

∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗    112  Keyword, label(s) :  TWISS                                                                                    IPASS= 4                         ∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗                         ∗∗∗∗∗∗∗∗∗∗∗∗∗∗  End  of  TWISS  procedure  ∗∗∗∗∗∗∗∗∗∗∗∗∗∗       There  has  been          4  pass  through  the  optical  structure  Reference, before change of frame (particle #  1  - D-1,Y,T,Z,s,time)  :   0.00000000E+00  -7.65859598E-13   2.62290190E-12   0.00000000E+00   0.00000000E+00   3.36300081E+03   3.68572492E-01            Frame for MATRIX calculation moved by :            XC =    0.000 cm , YC =   -0.000 cm ,   A =  0.00000 deg  ( = 0.000000 rad )  Reference, after change of frame (particle #  1  - D-1,Y,T,Z,s,time)  :   0.00000000E+00   0.00000000E+00   0.00000000E+00   0.00000000E+00   0.00000000E+00   3.36300081E+03   3.68572492E-01   Reference particle (#     1), path length :   3363.0008     cm  relative momentum :    1.00000                  TRANSFER  MATRIX  ORDRE  1  (MKSA units)         -0.716001       -5.32491        0.00000         0.00000         0.00000        0.716859          0.348220        1.19307        0.00000         0.00000         0.00000       -0.238490          0.00000         0.00000        1.78816        -9.15235         0.00000        0.00000          0.00000         0.00000        0.330121       -1.13043         0.00000        0.00000         -7.886126E-02    0.414707       0.00000         0.00000         1.00000        1.58173          0.00000         0.00000        0.00000         0.00000         0.00000        1.00000           DetY-1 =      -0.0000004260,    DetZ-1 =     -0.0000004317           R12=0 at    4.463     m,        R34=0 at   -8.096     m       First order symplectic conditions (expected values = 0) :        -4.2604E-07   -4.3171E-07     0.000         0.000         0.000         0.000                TWISS  parameters,  periodicity  of   1  is  assumed                                   -  COUPLED  -        Beam  matrix  (beta/-alpha/-alpha/gamma) and  periodic  dispersion  (MKSA units)           5.483186    -0.982907     0.000000     0.000000     0.000000     0.742996          -0.982907     0.358570     0.000000     0.000000     0.000000    -0.104814           0.000000     0.000000     9.691428     1.545246     0.000000    -0.000000           0.000000     0.000000     1.545246     0.349565     0.000000     0.000000           0.000000     0.000000     0.000000     0.000000     0.000000     0.000000           0.000000     0.000000     0.000000     0.000000     0.000000     0.000000                               Betatron  tunes  (Q1 Q2 modes)                     NU_Y =  0.78833338         NU_Z =  0.80333330                                    Momentum compaction :                              dL/L / dp/p =  4.39982231E-02                                    Transition gamma  =  4.76740921E+00                                    Chromaticities :                    dNu_y / dp/p = -0.80312438                   dNu_z / dp/p = -0.86404335 ∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗

The TWISS command causes in addition the transport of the periodic optical functions throughout the sequence, logged in zgoubi.TWISS.out. These optical functions are displayed in Fig. 14.5.

Fig. 14.5
Two line graphs. a. The graph plots beta subscript x, beta subscript y versus S. The lines are plotted for beta subscript x, beta subscript y, eta subscript x, and eta subscript y. 3 lines, 2 follow a triangular waveform, and 1 follows an increasing and decreasing trend. b. The graph plots x, y versus S. The lines are plotted for x and y. The lines follow a fluctuating pattern.

Left: booster super cell optical functions, from a TWISS computation. Right: it is not a bad idea to check what the horizontal and vertical orbits are, zero as expected in the present case

Note: to produce this set of outputs, the TWISS command performs 4 consecutive passes through the optical sequence, see Users’ Guide for details.

14.2.1.3 Spin Optics

The rigidity specified in the provided input data files and used in the previous question (superA.inc, etc.) is 1 T m. However, proper spin motion requires proper value! Thus, the rigidity in this exercise has to be changed to the injection value, namely (Table 14.36),

$$\displaystyle \begin{aligned} B\rho = 0.30745 \,\mathrm{T}\,\mathrm{m}\end{aligned}$$

Question 14.1.1.3.1—The spin motion of a helion is tracked along Booster for the case of an ideal ring (six superA cells, planar, no defects) using the input data file given in Table 14.7. One particle is taken on-momentum, the other two at δpp = ±10−4 and launched on their respective chromatic closed orbits, given the dispersion and its derivative (Sect. 14.2.1.2)

$$\displaystyle \begin{aligned} \eta_x = 0.743\, \text{m}, \quad \eta^{\prime}_x=-0.1048\, \text{rad}\end{aligned}$$

Tracking shows that the spin precession direction is vertical around the ring, for both on- and off-momentum particles (Fig. 14.6). This is what’s expected as the chromatic closed orbits also lie in the median plane: the field is everywhere vertical along a chromatic closed orbit as well, particles do not experience any horizontal field component, no field may kick spins away from vertical.

Fig. 14.6
A multi-line graph plots S subscript X, S subscript Y, S subscript Z versus seconds in meters. 9 lines, 3 follow a horizontal line plotted between 0.5 and 1, and 6 follow a fluctuating sinusoidal waveform with different amplitudes between negative 1 and 1.

Spins of 3 ions, respectively on- and ± 10−4 off-momentum, along their respective closed orbits around Booster. The vertical component SZ is constant all along, thus the precession direction is vertical. SX and SY are circling around the Z axis, in the bend plane

Questions 14.1.1.3.2, 14.1.1.3.3—Tracking the spin closed orbit over a turn for particles at dpp = 0 and dpp = ±10−4 off-momentum, yields spin motions displayed in Fig. 14.6.

Adding SPNPRT[MATRIX] allows for producing the spin matrices, however that also requires changing OBJET and SPNTRK data in Table 14.7, so to create 3 groups (as many as there are different momenta) of 3 particles each, as follows:

'OBJET' 0.3074552E3           ! Reference rigidity/kG.cm, for 3He++, at injection beta value 0.0655. 2          ! An option to define initial particle coordinates, one by one; here, 3 different 9 3      ! momenta, 9 particles; this is ordered to allow spin matrix computation by SPNPRT. 7.43281000E-03 -1.04862116E-02 0. 0. 0. 1.0001 'p'        ! Group 1. Orbit coordinates for a 7.43281000E-03 -1.04862116E-02 0. 0. 0. 1.0001 'p'             ! momentum offset of D=+1e-4. 7.43281000E-03 -1.04862116E-02 0. 0. 0. 1.0001 'p' 0. .0 0. 0. 0. 1.  'o'                                ! Group 2. On-momentum 3-particle set. 0. .0 0. 0. 0. 1.  'o' 0. .0 0. 0. 0. 1.  'o' -7.42569731E-03 1.04862063E-02 0. 0. 0.  .9999 'm'                                ! Group 3. -7.42569731E-03 1.04862063E-02 0. 0. 0.  .9999 'm'             ! Momentum offset of D=-1e-4. -7.42569731E-03 1.04862063E-02 0. 0. 0.  .9999 'm' 1 1 1 1 1 1 1 1 1 'PARTICUL'   ! Defining the particle species is necessary, in order for the program to solve HELION                                                                 ! the T-BMT equation. 'SPNTRK'                         ! The 9 initial spins are organized so to allow spin matrix 4                    ! computation by SPNPRT, for each of the 3 different momenta concerned. 1. 0. 0.                                                                  ! S_X, particle 1, 0. 1. 0.                                                                  ! S_Y, particle 1, 0. 0. 1.                                                                  ! S_Z, particle 1, 1. 0. 0.                                                                  ! S_X/ particle 2, 0. 1. 0.                                                                              ! etc. 0. 0. 1. 1. 0. 0. 0. 1. 0. 0. 0. 1.

This yields the following, including the spin transport matrix, fractional spin tune and precession axis, for each of the 3 momenta (an excerpt):

∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗    641  Keyword, label(s) :  SPNPRT      MATRIX                                                                       IPASS= 1                          -- 3  GROUPS  OF  MOMENTA  FOLLOW   --                         --------------------------------------------------------------                         Momentum  group  #1 ; average  over 3 particles at this pass :                    INITIAL                                           FINAL       <SX>       <SY>       <SZ>       <|S|>            <SX>       <SY>       <SZ>      <|S|>    <G.gma>    <(SI,SF)>  sigma_(SI,SF)                                                                                                               (deg)       (deg)   0.333333   0.333333   0.333333   0.577350        -0.195770   0.428831   0.333333   0.577350  -4.193160  46.358429  32.780359                Spin  components  of  each  of  the      3  particles,  and  rotation  angle :                    INITIAL                                           FINAL            SX        SY        SZ        |S|         SX        SY        SZ        |S|       GAMMA   |Si,Sf|   (Z,Sf_yz) (Z,Sf)                                                                                                      (deg.)    (deg.)    (deg.)                                                                                           (Sf_yz : projection of Sf on YZ plane) p  1  1.000000  0.000000  0.000000  1.000000     0.349592  0.936902  0.000000  1.000000      1.0022   69.538   90.000   90.000    1 p  1  0.000000  1.000000  0.000000  1.000000    -0.936902  0.349592  0.000000  1.000000      1.0022   69.538   90.000   90.000    2 p  1  0.000000  0.000000  1.000000  1.000000     0.000000  0.000000  1.000000  1.000000      1.0022    0.000   45.000    0.000    3                 Min/Max  components  of  each  of  the      3  particles :   SX_mi       SX_ma       SY_mi       SY_ma       SZ_mi       SZ_ma       |S|_mi      |S|_ma      p/p_0        GAMMA          I  IEX  3.4959E-01  3.4959E-01  9.3690E-01  9.3690E-01  0.0000E+00  0.0000E+00  1.0000E+00  1.0000E+00  1.00010E+00  1.00215E+00     1   1 -9.3690E-01 -9.3690E-01  3.4959E-01  3.4959E-01  0.0000E+00  0.0000E+00  1.0000E+00  1.0000E+00  1.00010E+00  1.00215E+00     2   1  0.0000E+00  0.0000E+00  0.0000E+00  0.0000E+00  1.0000E+00  1.0000E+00  1.0000E+00  1.0000E+00  1.00010E+00  1.00215E+00     3   1                  Spin transfer matrix, momentum group # 1 :           0.349592       -0.936902         0.00000           0.936902        0.349592         0.00000           0.00000         0.00000          1.00000      Trace =       1.6991838357,    ;   spin precession acos((trace-1)/2) =      69.5376429739 deg     Precession axis :  ( 0.0000,  0.0000,  1.0000)  ->  angle to (X,Y) plane,  angle to X axis :    90.0000,    90.0000  degree     Spin  tune  Qs (fractional) :     1.9316E-01                         --------------------------------------------------------------                         Momentum  group  #2 ; average  over 3 particles at this pass :                    INITIAL                                           FINAL       <SX>       <SY>       <SZ>       <|S|>            <SX>       <SY>       <SZ>      <|S|>    <G.gma>    <(SI,SF)>  sigma_(SI,SF)                                                                                                               (deg)       (deg)   0.333333   0.333333   0.333333   0.577350        -0.195765   0.428834   0.333333   0.577350  -4.193158  46.357996  32.780053                Spin  components  of  each  of  the      3  particles,  and  rotation  angle :                    INITIAL                                           FINAL            SX        SY        SZ        |S|         SX        SY        SZ        |S|       GAMMA   |Si,Sf|   (Z,Sf_yz) (Z,Sf)                                                                                                      (deg.)    (deg.)    (deg.)                                                                                           (Sf_yz : projection of Sf on YZ plane) o  1  1.000000  0.000000  0.000000  1.000000     0.349603  0.936898  0.000000  1.000000      1.0022   69.537   90.000   90.000    4 o  1  0.000000  1.000000  0.000000  1.000000    -0.936898  0.349603  0.000000  1.000000      1.0022   69.537   90.000   90.000    5 o  1  0.000000  0.000000  1.000000  1.000000     0.000000  0.000000  1.000000  1.000000      1.0022    0.000   45.000    0.000    6                 Min/Max  components  of  each  of  the      3  particles :   SX_mi       SX_ma       SY_mi       SY_ma       SZ_mi       SZ_ma       |S|_mi      |S|_ma      p/p_0        GAMMA          I  IEX  3.4960E-01  3.4960E-01  9.3690E-01  9.3690E-01  0.0000E+00  0.0000E+00  1.0000E+00  1.0000E+00  1.00000E+00  1.00215E+00     4   1 -9.3690E-01 -9.3690E-01  3.4960E-01  3.4960E-01  0.0000E+00  0.0000E+00  1.0000E+00  1.0000E+00  1.00000E+00  1.00215E+00     5   1  0.0000E+00  0.0000E+00  0.0000E+00  0.0000E+00  1.0000E+00  1.0000E+00  1.0000E+00  1.0000E+00  1.00000E+00  1.00215E+00     6   1                  Spin transfer matrix, momentum group # 2 :          0.349603       -0.936898          0.00000          0.936898        0.349603          0.00000          0.00000         0.00000          1.00000      Trace =       1.6992050586,    ;   spin precession acos((trace-1)/2) =      69.5369940370 deg     Precession axis :  ( 0.0000,  0.0000,  1.0000)  ->  angle to (X,Y) plane,  angle to X axis :    90.0000,    90.0000  degree     Spin  tune  Qs (fractional) :     1.9316E-01                         --------------------------------------------------------------                         Momentum  group  #3 ; average  over 3 particles at this pass :                    INITIAL                                           FINAL       <SX>       <SY>       <SZ>       <|S|>            <SX>       <SY>       <SZ>      <|S|>    <G.gma>    <(SI,SF)>  sigma_(SI,SF)                                                                                                               (deg)       (deg)  0.333333   0.333333   0.333333   0.577350        -0.195760   0.428836   0.333333   0.577350  -4.193157  46.357564  32.779748                Spin  components  of  each  of  the      3  particles,  and  rotation  angle :                    INITIAL                                           FINAL            SX        SY        SZ        |S|         SX        SY        SZ        |S|       GAMMA   |Si,Sf|   (Z,Sf_yz) (Z,Sf)                                                                                                      (deg.)    (deg.)    (deg.)                                                                                           (Sf_yz : projection of Sf on YZ plane) m  1  1.000000  0.000000  0.000000  1.000000     0.349613  0.936894  0.000000  1.000000      1.0022   69.536   90.000   90.000    7 m  1  0.000000  1.000000  0.000000  1.000000    -0.936894  0.349613  0.000000  1.000000      1.0022   69.536   90.000   90.000    8 m  1  0.000000  0.000000  1.000000  1.000000     0.000000  0.000000  1.000000  1.000000      1.0022    0.000   45.000    0.000    9                 Min/Max  components  of  each  of  the      3  particles :   SX_mi       SX_ma       SY_mi       SY_ma       SZ_mi       SZ_ma       |S|_mi      |S|_ma      p/p_0        GAMMA          I  IEX  3.4961E-01  3.4961E-01  9.3689E-01  9.3689E-01  0.0000E+00  0.0000E+00  1.0000E+00  1.0000E+00  9.99900E-01  1.00215E+00     7   1 -9.3689E-01 -9.3689E-01  3.4961E-01  3.4961E-01  0.0000E+00  0.0000E+00  1.0000E+00  1.0000E+00  9.99900E-01  1.00215E+00     8   1  0.0000E+00  0.0000E+00  0.0000E+00  0.0000E+00  1.0000E+00  1.0000E+00  1.0000E+00  1.0000E+00  9.99900E-01  1.00215E+00     9   1                  Spin transfer matrix, momentum group # 3 :          0.349613       -0.936894         0.00000          0.936894        0.349613         0.00000          0.00000         0.00000          1.00000      Trace =       1.6992262279,    ;   spin precession acos((trace-1)/2) =      69.5363467325 deg     Precession axis :  ( 0.0000,  0.0000,  1.0000)  ->  angle to (X,Y) plane,  angle to X axis :    90.0000,    90.0000  degree     Spin  tune  Qs (fractional) :     1.9316E-01 ∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗

This simulation confirms the answer to Question 14.1.1.3.1.

The value of the spin precession angle is θsp = Gγα modulo 360. The on-momentum value of Gγα can be found under PARTICUL in zgoubi.res (an excerpt):

∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗      2  Keyword, label(s) :  PARTICUL                                                                                 IPASS= 1      Particle  properties :     HELION                     Mass          =    2808.39        MeV/c2                     Charge        =   3.204353E-19    C                     G  factor     =   -4.18415                     COM life-time =   1.000000E+99    s               Reference  data :                    mag. rigidity (kG.cm)   :   307.45520      =p/q, such that dev.=B∗L/rigidity                    mass (MeV/c2)           :   2808.3916                    momentum (MeV/c)        :   184.34550                    energy, total (MeV)     :   2814.4354                    energy, kinetic (MeV)   :   6.0438039                    beta = v/c              :  6.5499993689E-02                    gamma                   :   1.002152052                    beta∗gamma              :  6.5640953062E-02                    G∗gamma                 :  -4.193158315                    electric rigidity (MeV) :   24.14925821    =T[eV]∗(gamma+1)/gamma, such that dev.=E∗L/rigidity ∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗

which yields a theoretical spin rotation of

$$\displaystyle \begin{aligned} |G\gamma| \times 360^\circ = 4.193158315 \times 360^\circ= 69.5369934\ [360^\circ]\end{aligned}$$

(the on-momentum “group 2” above indicates 69.5369940370 deg) or equivalently a fractional spin tune value of

$$\displaystyle \begin{aligned} u_{sp}= 4.193158315/360 = 0.193158315\end{aligned}$$

also in accord with the on-momentum “group 2” above which indicates 1.9316E-01.

From theory (after Eq. 3.11, transposed to 3D space)

$$\displaystyle \begin{aligned} \mathrm{frac}(u_{\mathrm{sp}}) = \dfrac{1}{2\pi} \mathrm{acos}\dfrac{\mathrm{Trace}(\mathrm{spin}\ \mathrm{matrix})-1}{2}\end{aligned}$$

whereas the spin matrix from tracking says (momentum “group 2” above)

$$\displaystyle \begin{aligned} \mathrm{Trace}\left[\text{spin}\ \text{matrix}\right] = 1.6992050586 \end{aligned}$$

in accord with the above spin tune value νsp = 0.193158.

Off-momentum (groups 1 and 3):

γ needs to be corrected for the dpp = ±10−4 particles. The corresponding numerical results can be found under “group 1” and “group 3” above, respectively, and can be checked to agree with the theory.

14.2.1.4 Depolarizing Resonances

Question 14.1.1.4.1—Locations ( values) of the depolarizing resonances in the range

$$\displaystyle \begin{aligned} -10.5 \leq \mathrm{G}\gamma \leq -4.19316\end{aligned}$$

have been added to Table 14.8, yielding Table 14.37 (integer/imperfection resonances of the form  = integer), and to Table 14.9, yielding Table 14.38 (systematic intrinsic resonances of the form  = 6 ×integer ± Qy).

Table 14.37 Imperfection resonances, location and strengths. Strengths are normalized to the rms closed orbit value, yco,rms (the closed orbit is shown in Fig. 14.10). The “theory” column is filled-out using the thin lens model series
Table 14.38 Systematic intrinsic resonances (M=6 super-periods, νy = 4.82), location and strengths. The latter are normalized to \( \sqrt {\varepsilon _y/\pi }\), with εyπ being the particle invariant value. The “theory” column is filled-out using the thin lens model series. The “station.” (stationary) column is filled-out using |𝜖n|≡ ω(δn = 0), Question 14.1.1.6. Completion of the “crossing” column is addressed in Question 14.1.1.8 and Table 14.42

Question 14.1.1.4.2—Figure 14.7 illustrates intrinsic resonance crossings with two graphs of Sy(Gγ), as follows:

  • a few particles are taken evenly distributed in phase with the same vertical invariant εy; εx value does not matter, it is taken null here, as horizontal motion results in this perfect ring in only vertical perturbing field components—in quadrupoles—and these do not depolarize;

    Fig. 14.7
    Two spectrums plot the average S subscript y over particles versus the I G gammal and present the development of the vertical spin component. In the first graph, the vertical spin remains stable, while the second one depicts a downward trend.

    Evolution of the vertical spin component of a few particles launched on the same invariant, with different initial betatron phases. The dark red curve is the average over 23 particles. Left: εy = 2.5 πμm; right: εy = 0.25 πμm

  • they are tracked from injection  = −4.19316 (Table 14.36) to  = −16, so crossing in particular the four strong resonances  ± νy = 6n, |n| = 0 − 3. Two different cases of the vertical invariant values are tracked: εy = 2.5 πμm and 10 times less.

Figure 14.7 is obtained with the following combined awk (left hand side) [11] and gnuplot (right) scripts:

! Average over particles of SZ values read in zgoubi.fai function analyze(x, data){     n = 0;mean = 0;    val_min = 0;val_max = 0;     NBturns = 20000;     Gg1 =4.193158; Gg2 =16; dGg = (Gg2-Gg1)/(NBturns-1);     for(val in data){         n += 1;         delta = val - mean;         mean += delta/n;         val_min = (n == 1)?val:((val < val_min)?val:val_min);         val_max = (n == 1)?val:((val > val_max)?val:val_max);     }     if(n > 0){         print x, mean, val_min, val_max;     } } {     curr = $38∗dGg + Gg1;    yval = $(col_num);     if(NR==1 || prev != curr){         analyze(prev, data);         delete data;         prev = curr;     }     data[yval] = 1; } END{     analyze(curr, data); }

set title "SZ(turn) and  <SZ(turn)>_particles" nbtrj=100; evryNtrj = 5; evryNpass=9 NBturns = 20000 Gg1 =4.193158 ; Gg2 =16 ; dGg = (Gg2-Gg1)/(NBturns-1) set xlab "turns"; set ylab "Average S_y over particles" unset colorbox fName = 'zgoubi.fai' plotCmd(col_num)=sprintf('< gawk -f analyze.awk -v col_num=%d %s', col_num, fName) set format y '%0.2f' set xr [:20e3]; set xr [Gg1:Gg2]; set yr [-1.01:1.01] plot for [it=1:nbtrj:evryNtrj] "zgoubi.fai" \ u ($26==it && evryNpass∗int($38/evryNpass)==$38? $38∗dGg + Gg1 :1/0):($22):($26) \ w p pt 7 ps .1 lc palette notit ,\     plotCmd(22) u 1:2 w p pt 5 ps .4 lc rgb 'dark-red' t '<S_y>'

When comparing these two graphs, essentially two things are observed: the spin kick across a resonance and the spin kick spread are smaller, when the invariant is smaller:

  1. (i)

    a smaller invariant means smaller values of the perturbing \(B_x=\mathcal {G}y\) radial field components in quadrupoles, hence smaller spin kicks;

  2. (ii)

    spread in betatron motion around the ring results from the spread in the initial betatron phase of the particles for a given invariant. Smaller invariant value results in a smaller span of the field values experienced by the different particles in the vertical quadrupoles (Fig. 14.8).

    Fig. 14.8
    A graph plots the average S subscript y over particles versus the I G gammal depicting the development of the vertical spin component. The graph presents a decreasing step waveform between negative 1 and 1.

    A sensible question at this point is whether these results converge. The present figure is obtained using 200 particles. Comparison with the 23 trajectory case of Fig. 14.7 does not show much difference. The final polarizations is very similar, the problem converges

For the record: the resonance strength is \(\propto \sqrt {\varepsilon _y/\pi }\) (Eq. 2.35).

Question 14.1.1.4.3—A graph showing the span in magnetic field strengths experienced in the vertical quadrupoles by the 3 orbiting particles with the same invariant value, as an effect of their different initial betatron phases, is given in Fig. 14.9. The three vastly different torque series experienced by these particles’ spins result in largely different spin states upon crossing the resonances (Fig. 14.7).

Fig. 14.9
A scatterplot plots B subscript Y versus seconds in meters. The values are plotted for particles 1, 3, and 5. The plots are distributed in a zigzag pattern between (negative 0.005, 0) and (600, 0.004).

Fields experienced in vertical quadrupoles during vertical betatron motion: 3 different particles are displayed here, over 3 turns around the ring. They are taken on the same invariant but with different initial betatron phases

14.2.1.5 Imperfection Resonance Strengths

An excerpt of the input data file used is given in Table 14.39. It shows in particular

  • sample vertical quadrupole misalignments accounted for by means of KPOS=5, which implement Table 14.10 random vertical offset data;

    Table 14.39 Head, intermediate quadrupoles, and tail of the Booster sequence, including vertical quadrupole misalignments, as well as a FIT-TWISS sequence which computes vertical orbit and optical functions (logged in zgoubi.TWISS.out), accounting for non-zero closed orbit (FIT first finds the orbit, prior to passing on to TWISS). The reference rigidity for this zgoubi.TWISS.out computation is arbitrary as the vertical orbit (and optical functions obviously) are maintained unchanged regardless of in these exercises (the fields are ramped to follow the value of the reference rigidity OBJET[BORO]). The final SYSTEM command causes execution of an external file, which plots the closed orbits and optical functions, reading the latter data from zgoubi.TWISS.out
  • the use of FIT, preceding TWISS, which allows accounting for the non-zero vertical closed orbit excited by the quadrupole misalignments given in Table 14.10.

The vertical closed orbit so obtained is shown in Fig. 14.10.

Fig. 14.10
A line graph plots x and y in meters versus seconds in meters. The lines are plotted for x and y. The x line follows a fluctuating sine wave that begins at (0, 0.01) and ends at (200, 0.009) with an amplitude between negative 0.03 and 0.04. The y line remains constant at (0, 0). Values are estimated.

Vertical closed orbit excited by the quadrupole misalignments of Table 14.10

The resonance strengths to be computed here, as a function of energy, all assume that very closed orbit (and obviously, the same optical functions).

Resonance strength calculation uses (Eq. 2.29)

$$\displaystyle \begin{aligned} \left\{ \begin{array}{r} \mathcal{R}e( {{\epsilon_n^{\mathrm{imp}}}}) \\ \mathcal{I}\! m( {{\epsilon_n^{\mathrm{imp}}}}) \end{array} \right\} = \dfrac{1+G\gamma}{2\pi}\, \sum_{\mathrm{Qpoles}} \left\{ \begin{array}{l} \cos G\gamma \alpha_i \\ \sin G\gamma \alpha_i \end{array} \right\} (KL)_i \, \, y_{co}(\theta_i)\end{aligned}$$

which can be evaluated numerically. In this formula, the following data are read from zgoubi.TWISS.out at the locations of the quadrupoles (i index):

  • θi: orbital angle, from the origin of the sequence,

  • αi: cumulative orbit deviation, from the origin of the sequence,

  • (KL)i: integrated quadrupole strength,

  • yco,i: orbit excursion.

These quantities do not depend on (magnet fields are ramped to follow the value of the reference rigidity OBJET[BORO]).

Table 14.8 has been updated with the imperfection resonance strengths obtained this way yielding the “theory” column of Table 14.37.

14.2.1.6 Intrinsic Resonance Strengths

The optical functions and periodic vertical orbit are needed here, which means use of the output file zgoubi.TWISS.out. This file is produced using the input data file of the complete ring, equipped with a TWISS command, as in Sect. 14.2.1.2.

Resonance strength is obtained by summing the series (Eq. 2.35)

$$\displaystyle \begin{aligned} \left\{ \begin{array}{r} \mathcal{R}e( {{\epsilon_n^{\mathrm{intr}}}}^{\pm}) \\ \mathcal{I}\! m( {{\epsilon_n^{\mathrm{intr}}}}^{\pm}) \end{array} \right\} = \dfrac{1+G\gamma}{4\pi}\, \sum_{\mathrm{Qpoles}} \left\{ \begin{array}{l} \cos (G\gamma \alpha_i \pm \varphi_i)\\ \sin (G\gamma \alpha_i \pm \varphi_i)\end{array} \right\} (KL)_i \, \sqrt{\beta_{{ y},i} \dfrac{\varepsilon_{{ y}}}{\pi}}\end{aligned}$$

which can be calculated numerically. In this formula, the following data are read from zgoubi.TWISS.out at the locations of the quadrupoles (i index):

  • αi: cumulative orbit deviation, from the origin of the sequence,

  • (KL)i: integrated quadrupole strength,

  • φi: betatron phase advance,

  • βi: betatron function,

  • εyπ: invariant value.

These quantities do not depend on (magnet fields are ramped to follow the value of the reference rigidity OBJET[BORO]).

For a reference, the upper and lower parts of zgoubi.TWISS.out data file (as produced by the TWISS command), showing the optical function values along the sequence needed to compute the series above are as follows (excerpts):

@ LENGTH           %le     33.63000810 @ ALFA             %le    0.5271462897E-01 @ ORBIT5           %le                  -0 @ GAMMATR          %le     4.355463945 @ Q1               %le    0.7299999804      [fractional] @ Q2               %le    0.8199999584      [fractional] @ DQ1              %le   -0.7429052400 @ DQ2              %le   -0.8355856969 @ DXMAX            %le     3.01663095E+00    @ DXMIN            %le     9.49130311E-01 @ DYMAX            %le     0.00000000E+00    @ DYMIN            %le     0.00000000E+00 @ XCOMAX           %le     0.00000000E+00    @ XCOMIN           %le    -5.12842866E-14 @ YCOMAX           %le     0.00000000E+00    @ YCOMIN           %le     0.00000000E+00 @ BETXMAX          %le     1.41491375E+01    @ BETXMIN          %le     4.22123922E+00 @ BETYMAX          %le     1.27947203E+01    @ BETYMIN          %le     3.81920290E+00 @ XCORMS           %le     1.50372304E-14 @ YCORMS           %le    0.    not computed @ DXRMS            %le     5.94727589E-01 @ DYRMS            %le     0.00000000E+00 @ DELTAP           %le     0.00000000E+00 @ |C|              %le     0.000000000 @ Q1∗              %le     0.000000000 @ Q2∗              %le     0.000000000 @ TITLE            %12s   "Zgoubi model" @ ORIGIN           %12s   "twiss.f" @ DATE             %08s   "  " @ TIME             %08s   "  " # From TWISS keyword # alfx           btx             alfy            bty             alfl            btl             Dx              etc. # 1              2               3               4               5               6               7 1.0086402E+000  5.8955920E+000 -1.5005233E+000  9.4500882E+000  0.0000000E+000  0.0000000E+000  1.1034842E+000   etc. 1.0086402E+000  5.8955920E+000 -1.5005233E+000  9.4500882E+000  0.0000000E+000  0.0000000E+000  1.1034842E+000 1.0086402E+000  5.8955920E+000 -1.5005233E+000  9.4500882E+000  0.0000000E+000  0.0000000E+000  1.1034842E+000 8.1346059E-001  4.8562657E+000 -1.6967856E+000  1.1273833E+001  0.0000000E+000  0.0000000E+000  1.0186499E+000 8.1346025E-001  4.8562641E+000 -1.6967859E+000  1.1273837E+001  0.0000000E+000  0.0000000E+000  1.0186498E+000 7.8964451E-001  4.7446880E+000 -1.7207337E+000  1.1511696E+001  0.0000000E+000  0.0000000E+000  1.0082983E+000 ............................................. 1.6898235E+000  1.2487484E+001 -6.6866811E-001  4.1920085E+000  0.0000000E+000  0.0000000E+000  1.6554672E+000  etc. 1.3706530E+000  8.7748783E+000 -1.0863704E+000  6.3156052E+000  0.0000000E+000  0.0000000E+000  1.3317807E+000 1.0098358E+000  5.8871527E+000 -1.5040727E+000  9.4500414E+000  0.0000000E+000  0.0000000E+000  1.1034842E+000 1.0098358E+000  5.8871527E+000 -1.5040727E+000  9.4500414E+000  0.0000000E+000  0.0000000E+000  1.1034842E+000 1.0098358E+000  5.8871527E+000 -1.5040727E+000  9.4500414E+000  0.0000000E+000  0.0000000E+000  1.1034842E+000 1.0098358E+000  5.8871527E+000 -1.5040727E+000  9.4500414E+000  0.0000000E+000  0.0000000E+000  1.1034842E+000

A detailed description of zgoubi.TWISS.out data column format can be found in the Users’ Guide, Section 8.4.

Table 14.9 has been updated with the intrinsic resonance strengths obtained here, yielding the “theory” column of Table 14.38.

14.2.1.7 Spin Motion Through Imperfection Resonances

Input data files similar to those in the answer to Question 14.1.1.5 (Sect. 14.2.1.5 and Table 14.39) are used here. They only differ by

  • the reference rigidity (OBJET[BORO]) and, accordingly, field coefficients under SCALING so to maintain unchanged orbit and optics,

  • use of CAVITE for acceleration through the resonance, in the second question.

An interface has been developed in python (an evolution, by the present co-authors, of pyZgoubi [4]), which takes care of repeating the tracking at various distances ΔGγ =  − n from the resonance, in Question 14.1.1.8.1, or at various resonant frequencies n in Question 14.1.1.8.2 thus automating the procedure.

Question 14.1.1.8.1—The following shows the head and tail of the tracking input data file, in the stationary case, on the resonance n = −6. Note the INCLUDE of the SCALING segment [SCALING_S:SCALING_E] as defined in Table 14.7, with the field coefficient updated to present BORO/1000 value, namely, 4.8139470584

Booster 'OBJET' 4.8139470584e+03                                                   ! Rigidity at G.gamma=-6. 2 1 1 0. 0. 0.84273180 1.5602297 0. 1. ' '         ! Track a single 3He, launched on closed orbit. 1 'PARTICUL' HELION 'SPNTRK'                                                         ! Start with spin vertical. 3 'FAISTORE' zgoubi.fai 1            ! Scaling coefficients in scaling_Gg6.inc are updated to present BORO/1000 value. 'INCLUDE' 1 scaling_Gg6.inc[SCALING_S,∗:SCALING_E,∗] 'DRIFT'    DRIF      L057 57.0400 ............... 'BEND'     DHF8Z     SBEN 0  .Bend 1.2096161E+02   0.0000000E+00   7.2121043E-01 0.00  0.00   0.00000000 4 .2401  1.8639  -.5572  .3904 0. 0. 0. 0.00  0.00   0.00000000 4 .2401  1.8639  -.5572  .3904 0. 0. 0. 1.0000E+00 cm  Bend 3 0. 0. 0. 'MARKER'      LA2E                                              ! Booster lattice ends here. 'REBELOTE'  ! 2000 turns are sufficient to see a complete S_y oscillaiton when on resonance, 1999 0.1 99                     ! from what <S_y> is deduced - greater distance to resonance                                                              ! results in greater frequency. 'END'

Sample tracking results for Sy(θ) oscillation at various distances to the resonance, are given in Fig. 14.11. The average value \(\left < S_y \right >\) is computed from these tracking data.

Fig. 14.11
A line graph plots S Z versus the pass number. The values are plotted for 3 functions with different frequencies. 3 sine waves, 1 with an amplitude between 0.79 and 1, another with an amplitude between 0.3 and 1, and the third with an amplitude between negative 1.0 and 1.0.

Spin oscillation Sy(turn) for different distances to the resonance n = −6. A greater distance δn results in a higher oscillation frequency \(\omega =\sqrt {|\epsilon _n|{ }^2 + \delta _n^2}\) (Sect. 3.6). On the resonance, the precession axis lies in the median plane, Sy oscillation covers [−1, 1] and \(\left < S_y \right >=0\)

The exercise is repeated for the different − 10 ≤ n ≤−5 values, resulting in Fig. 14.12 which shows \(\left < S_y \right >\) dependence on the distance to the resonance so obtained, and fit to Eq. 2.49

$$\displaystyle \begin{aligned} \left< S_{{ y}} \right> = \dfrac{\delta_n}{\sqrt{\epsilon_n^2 +\delta_n^2}} \end{aligned} $$
(14.5)
Fig. 14.12
3 line graphs plot S subscript y versus G subscript gamma. The lines are plotted for fit and simulation data. All graphs present an initial downward trend that reaches zero resonances and increases steeply thereafter between 0.0 and 1.0. The data points are distributed over the line.

Average value of the vertical spin component Sy, depending on the distance to the resonance for the cases of three different resonances n = −6,  − 8 and − 10. The symbols are from tracking, the solid curves are from the theory (Eq. 2.49). \( \left < S_y \right >=0\) corresponds to Sy oscillating over [−1, 1], thus the precession axis lies in the median plane, is on resonance

The “stationary” column of Table 14.8 has been completed accordingly (Table 14.37).

Question 14.1.1.8.2—A 400 keV/turn acceleration rate is taken for the crossing (\(\hat V=400\) kV, synchronous phase 30). The following shows the head and tail of the tracking input data file in the case of n = −6 crossing:

Booster 'OBJET' 3.77645661e+03                           ! Initial rigidity is taken at Ggamma=-5.374744660, 2                                 ! upstream enough not to feel the resonance at G.gamma=-6. 1 1 0. 0. 0.84273180 1.5602297 0. 1. ' '         ! Track a single 3He, launched on closed orbit. 1 'PARTICUL' HELION 'SPNTRK'                                                         ! Start with spin vertical. 3 'FAISTORE' zgoubi.fai 1          ! Scaling coefficients in scaling_GgXXX.inc are updated to present BORO/1000 value. 'INCLUDE' 1 scaling_Gg5.374.inc[SCALING_S,∗:SCALING_E,∗] 'MARKER'      LA1S                                            ! Booster lattice starts here. 'DRIFT'    DRIF      L057 57.0400 ............... 'BEND'     DHF8Z     SBEN 0  .Bend 1.2096161E+02   0.0000000E+00   7.2121043E-01 0.00  0.00   0.00000000 4 .2401  1.8639  -.5572  .3904 0. 0. 0. 0.00  0.00   0.00000000 4 .2401  1.8639  -.5572  .3904 0. 0. 0. 1.0000E+00 cm  Bend 3 0. 0. 0. 'MARKER'      LA2E                                              ! Booster lattice ends here. 'CAVITE' 2 201.78 1. 4.e+05 0.5235987756                                      ! 400 kV acceleration peak voltage. 'REBELOTE'      ! 2000 turns are sufficient to cross the resonance, leaving from away enough 1999 0.1 99                                                ! ending on the asymtotic region. 'END'

The initial is taken at −5.374744660, upstream enough not to feel the resonance at n = −6.

Sample results for Sy(θ) during resonance crossing are given in Fig. 14.13, for various n = n values. The resonance strengths are deduced from the respective values of PfPi, using (after Eq. 2.44)

$$\displaystyle \begin{aligned} |\epsilon_n|= \left( \dfrac{2\alpha}{\pi} \text{ln} \dfrac{2}{1+P_f/P_i} \right)^{1/2} {} \end{aligned} $$
(14.6)
Fig. 14.13
3 line graphs plot S subscript y versus G subscript gamma, revealing the development of the vertical spin component. The values are plotted for 3 resonances crossing of G subscript gamma. All graphs follow a fluctuating pattern between 0.5 and 1.0.

Evolution of the vertical spin component Sy during integer resonance crossing, for the cases of  = −6,  − 8 and − 10

with \(\alpha =\dfrac {dG\gamma }{d\theta }=9.484\times 10^{-5}\) being the resonance crossing speed.

The “crossing” column of Table 14.8 has been completed accordingly (Table 14.37).

14.2.1.8 Spin Motion Through Intrinsic Resonances

Questions 14.1.1.8.1, 2—The systematic resonance at n = 0 − νy = −4.82 is first considered,  = 2.67875735816 T m.

In the stationary case, the spin precession data are obtained by tracking a single particle with a particular vertical invariant value (use OBJET[KOBJ=8]) for many turns (use REBELOTE[NPASS=2000]) at a fixed energy.

The input data file is given in Table 14.40. It is similar to the input data file of Table 14.7, apart from the few necessary changes: modification the setup under OBJET (KOBJ=8 for a single particle with a certain invariant, on-momentum), SPNTRK, and addition of REBELOTE for multi-turn tracking. Note that the SCALING command and its data list, a segment defined in and included as a part of the input data file in Table 14.7, have been saved in the scaling_GgXXX.inc file, which is subject to an INCLUDE here. This is for the mere purpose of shortness. The values of the scaling coefficients in scaling_GgXXX.inc have to be updated to the present BORO value, for instance, in this case, from BORO/1000=0.3074552 (Table 14.7) to BORO/1000=2.678757358169758 (Table 14.40).

Table 14.40 Input data file for a 2000-turn tracking of spin motion, at fixed energy in the vicinity of the intrinsic resonance n = 0 − νy = −4.82. Note that the SCALING command of Table 14.7 and its data list are subject to an INCLUDE (the scaling_GgXXX.inc file) for shortness

The turn-by-turn spin motion obtained this way is displayed in Fig. 14.14. The slow oscillation in that graph is that of the vertical component Sy (SZ in Zgoubi notation). The oscillation frequency is \(\omega =\sqrt {|\epsilon _n|{ }^2+\delta _n^2} = |\epsilon _n|\). The amplitude averages to zero (\(\left < S_y \right >=0\)) in this case of being on resonance, since n is in the horizontal plane, namely (Eq. 2.48)

$$\displaystyle \begin{aligned} \delta_n = 0 \qquad \text{thus} \qquad |{s_{\pi}}|{}^2 =\dfrac{1}{1 + \left( \dfrac{\delta_n}{|\epsilon_n|}\right)^2 } =1 \quad \Rightarrow \ \left< S_y \right>=\sqrt{1- |{s_{\pi}}|{}^2 } = 0\end{aligned}$$
Fig. 14.14
A line graph plots the values for different components of a spin. 3 sine waves plotted between the amplitudes of negative 1.0 and 1.0. The first is plotted between (0 ,1) and (2000, negative 5.5). The second is plotted between (0, 0.01) and (2000, negative 1). The third one is plotted between (0, negative 0.01) and (2000, 0.8). Values are estimated.

Turn-by-turn motion of the three components of a spin, initially vertical. On-resonance here,  = n = −νy, distance to the resonance δn = 0. The slow oscillation (the solid curve with a 754 turn period) is that of the vertical component. The high frequency horizontal components (the high frequency dots, featuring the ω = |𝜖n| modulation) both average to zero, since sπ precesses about n, which itself precesses about the vertical axis

The horizontal components Sx and Ss (SY and SX in Zgoubi notations) are also displayed (fast oscillatory motion appearing as scattered dots). They oscillate at a much greater frequency n ≫ ω. They average to zero, since the eigenvector n precesses about the vertical axis with a constant projected ny component independent of the turn number. Figure 14.15 shows the Fourier spectrum of the motion. On-resonance (δn = 0), the oscillation frequency (in units of revolution frequency) is (see Sect. 3.6)

Fig. 14.15
A line graph plots amplitude versus Q subscript s. The y axis ranges from 10 to 1 times 10 powered 6, and the x axis ranges from 0.815 to 0.825. A curve begins at (0.815, 300) and ends at (0.825, 300), with fluctuations. Values are estimated.

Fourier spectrum of the spin motion (horizontal components). The two peaks at 0.82 ± 0.00135 are the result of combining the n = 4.82 frequency of n precession about the vertical axis and the \(\sqrt {|\epsilon _n|{ }^2+\delta _n^2}= |\epsilon _n|= 0.00135\) frequency of the spin precession about n

Given that the period of the slow motion in Fig. 14.15 is about 754 turns, the value of 0.00133 is in a good accord with the distance of the peaks in Fig. 14.15 to frac(n) = 0.82. Two additional distances to the resonance, δn = |𝜖n| and δn = 2|𝜖n|, are displayed in Fig. 14.16.

Fig. 14.16
A line graph plots S underscore x, S underscore s, S underscore y versus turn. The values are plotted for 5 functions with different frequencies. 5 sine waves, 3 with an amplitude between negative 1 and 1, one with an amplitude between 0 and 1, and the other with an amplitude between negative 0.5 and 1.0.

Helion spin precession at  = −νy in the AGS Booster. Sy oscillates slowly (the solid sine waves), frequency ω ≪ 1. Three different distances to the resonance are plotted: δn = 0 (the slow wave with a ± 1 amplitude), δn = |𝜖n| and δn = 2|𝜖n| (the fast wave with the smallest amplitude). Sx and Ss exhibit fast oscillations (dots) at a frequency n = 4.82 ≫ ω modulated by the frequency ω

Stationary tracking can be repeated for the other three systematic intrinsic resonances. The “stationary” column of Table 14.9 has been completed accordingly (Table 14.38).

Questions 14.1.1.8.3, 4—A 100 keV/turn acceleration rate is taken for crossing (\(\hat V=100\) kV, synchronous phase 30 deg). However, this is an arbitrary choice. The resonance strength does not depend on the crossing speed, so \(\hat V\) is a free parameter.

The four systematic resonance cases, namely, n = integer × M ± νy (M=6 cells), are tracked to fill out Table 14.38. The resonance strengths are deduced from the respective values of PfPi, using (after Eq. 2.44)

$$\displaystyle \begin{aligned} |\epsilon_n|= \left( \dfrac{2\alpha}{\pi} \text{ln} \dfrac{2}{1+P_f/P_i} \right)^{1/2} \end{aligned} $$
(14.7)

with the resonance crossing speed of \(\alpha =\dfrac {dG\gamma }{d\theta }=2.371\times 10^{-5}\).

The particle invariant is chosen to ensure PfPi ≈ 0.5, for convenience. For each n value, three particles are tracked. They are launched with 2π∕3 (normalized) betatron phase spacing. It can be observed, however, (Fig. 14.18) that these four different spin motions Sy(turn) essentially superimpose (this would not be the case above a sufficiently large εy value causing substantially different betatron excursions along the ring), which implies, in particular, that the asymptotic Pf is independent of the initial ϕy for a given invariant εy.

Particle motion in the vertical phase space is displayed in Fig. 14.17. The motion is damped due to acceleration. The spin motion is displayed in Fig. 14.18. The starting value is taken 100 ×|𝜖n| upstream of the resonance, so that the n vector is essentially vertical (for a reference: 7 ×|𝜖n| corresponds to \(\cos \phi = \left < S_y \right >=0.99\)).

Fig. 14.17
A line graph plots the motion of the particle in vertical phase space. The y axis ranges from negative 0.0002 to 0.0002, and the x axis ranges from negative 0.001 to 0.001. An ellipse is plotted with its vertices at (negative 0.00065, negative 0.00012) and (0.00065, 0.00012). The motion of the particle rotates in a clockwise direction in elliptical form. Values are estimated.

Particle motion in the vertical phase space over the 2000-turn acceleration range (dots) in the case of |n| = νy. The particle invariant is damped, from an initial εy,iπ to a final εy,fπ value. The solid ellipse is the rms ellipse matched to the 2000-turn damped motion

Fig. 14.18
A line graph plots S Z versus the pass number. The y axis ranges from 0 to 1, and the x axis ranges from 0 to 4000. The lines are plotted for four different resonances and follow a fluctuating pattern between 0.35 and 1.0.

Crossing of each of the four systematic resonances is displayed here. In each case, three particles are tracked. They are launched with 2π∕3 (normalized) betatron phase spacing. These three different curves essentially superimpose (they cannot be distinguished on this graph), i.e., Pf is independent of the initial ϕy. The starting value is 100 ×|𝜖n| upstream of the resonance. The particle invariant is chosen to ensure PfPi ≈ 0.5

The input data file for the case n = 0 + νy is given in Table 14.41. The same file is used for the other three resonances. The only changes are the updated values of BORO under OBJET and of the scaling coefficients in the INCLUDEd file scaling_GgXXX.inc (namely, the latter are updated to BORO/1000).

Table 14.41 Input data file for a 4504-turn helion ion acceleration across n = 0 − νy = −4.82 at a rate of 100 keV/turn. Note that the value of the scaling coefficient in scaling_GgXXX.inc has to be updated to the present value of BORO/1000=2.12998742

Table 14.42 summarizes the asymptotic Pf values obtained this way for the four systematic intrinsic resonances, and the resulting resonance strengths |𝜖n| obtained using Eq. 14.6 with Pi = 1. The “crossing” column of Table 14.9 has been completed accordingly (Table 14.38).

Table 14.42 Asymptotic final polarization Pf, starting from Pi = 1. The particle invariant is damped over the 2000-turn acceleration range, from εy,iπ to εy,fπ. \( \left <\varepsilon _y/\pi \right >\) is twice the final rms εyπ value (i.e., the area enclosed by the rms ellipse matched to the damped motion in the phase space)

14.2.1.9 Spin Motion Through a Weak Resonance

The systematic intrinsic resonance

$$\displaystyle \begin{aligned} G\gamma_n=-u_y = -4.8201 \end{aligned}$$

is considered, under fast crossing,

$$\displaystyle \begin{aligned} \hat V = 400\, \mathrm{kV}\end{aligned}$$

The tune value νy = −4.8201 above results from the lattice settings (Sect. 14.2.1.2). Fourier analysis of the multiturn phase space motion displayed in Fig. 14.17 confirms that value.

Compared to the previous simulations, the four times greater acceleration rate here weakens the depolarizing effect. The resonance is made weaker in addition by using a smaller invariant, namely

$$\displaystyle \begin{aligned} \varepsilon_y / \pi \approx 1.03\times 10^{-8}\end{aligned}$$

at the resonance (the invariant damps during acceleration, the starting value is εyπ ≈ 1.3 × 10−8 m, Table 14.43). The input data file for this tracking is given in Table 14.43, a copy of Table 14.41, mutatis mutandis, namely: with the initial invariant changed to εyπ ≈ 1.3 × 10−8 under OBJET, the peak voltage changed to \(\hat V=400\) kV under CAVITE, and NPASS=2000 under REBELOTE. This results in

$$\displaystyle \begin{aligned} P_f\approx 0.9906\, P_i\end{aligned}$$
Table 14.43 Input data file for 2001-turn helion ion acceleration across n = −νy = −4.82 at a rate of 400 keV/turn. Note that the value of the scaling coefficient in scaling_GgXXX.inc has been updated to the present value of BORO/1000=2.12998742

as can been seen from Fig. 14.19 showing a graph of the turn-by-turn Sy(turn) motion across the resonance.

Fig. 14.19
A line graph plots S subscript y versus kinetic energy. The y axis ranges from 0.986 to 1, and the x axis ranges from 400 to 480. The line is plotted for the Fresnel integral model. The line follows an initial downward trend, and after crossing the resonance mark, the line stabilizes in a sinusoidal manner.

A graph of Sy(turn = θ∕2π). The symbols show the tracking results. The solid curve represents the Fresnel integral model

Fitting that spin motion Sy(turn) to the Fresnel integral model (Eq. 2.47)

yields the respective resonant and normalized resonance strength values (with εyπ = 1.03 × 10−8 m) of

$$\displaystyle \begin{aligned} |G\gamma_n|=4.8202, \quad |\epsilon_n|/\sqrt{\varepsilon_y/\pi} = 5.3\end{aligned}$$

The former quantity is in a good agreement with νy = 4.8201 from the Fourier analysis of the phase space motion. The latter is in a good accord with the result obtained from the strong resonance simulation crossing, namely (Table 14.38, rightmost column), \(|\epsilon _n|/\sqrt {\varepsilon _y/\pi } = 5.2\). The Fresnel integral model and the tracking results in the region of the resonance are superimposed in Fig. 14.19.

14.2.1.10 Beam Depolarization Using a Solenoid

A perfect Booster lattice is considered here. The integer resonance  = −6 is used to move initially vertical spins into the horizontal plane. Spin rotation is performed using either

  • SOLENOID, in which case the magnetic field has to be provided; in addition, the solenoid is ramped from the initial to final energy in order to maintain a constant strength, which also means a constant spin tilt angle;

  • SPINR, in which case the spin tilt angle, constant over the acceleration range, has to be specified; one advantage of SPINR is that it is a pure spin rotation, avoiding any possible orbit or betatron motion side effects.

Question 14.1.1.10-1—The input data file for this simulation is given in Table 14.44. Note that the location of the rotator does not make a difference as the modulus of the depolarizing strength, |𝜖n|, comes in the Froissart-Stora formula. So, for simplicity, the rotator is placed at the beginning of the optical sequence. The solenoidal field, spin tilt angle and energy range have been determined as follows.

Table 14.44 Input data file for beam depolarization through  = −6 using a longitudinal-axis spin rotation (SOLENOID or SPINR). Note that the value of the SCALING coefficients is updated to the present initial BORO/1000=3.7764566118. SCALING ensures that power supply ramping follows the rigidity boost by CAVITE. The latter accelerates from  = 3.7764566118 T m ( = −5.374744555), up to  = 5.92283102938 T m ( = −6.7454301) in the asymptotic spin rotation region. The INCLUDE file here, scaling_SOLENOIDadded_Gg5.374.inc is a copy of scaling_Gg5.374.inc used in earlier exercises, with SOLENOID added

Full depolarization after crossing  = −6 requires a resonance strength (Eq. 14.6 with Pf = 0) of

$$\displaystyle \begin{aligned} |\epsilon_n|= \left( \dfrac{2\alpha}{\pi} \ln 2 \right)^{1/2} = 0.0064694573\end{aligned}$$

with the crossing speed α = 9.484842 × 10−5 (\(\hat V=400\) kV, Table 14.44).

The theoretical solenoid field integral needed to achieve that is obtained from Eq. 2.38 with |𝜖n| = 0.0064694573 and  = n = 4.8139470584 T m ( = −6), namely

$$\displaystyle \begin{aligned} B_sL = \dfrac{2\pi\, B\rho_n\, |\epsilon_n|}{1+G} = 0.061454684\, \mathrm{T}\, \mathrm{m} \end{aligned}$$

The dependence of the final polarization on the field integral BsL can be expressed as (the Froissart-Stora formula)

$$\displaystyle \begin{aligned} P_f = 2\exp\left( -\dfrac{\pi}{2} \dfrac{|\frac{1+G}{2 \pi B\rho_n}\, B_sL|{}^2}{\alpha}\right) -1 {} \end{aligned} $$
(14.8)

This dependence is plotted in Fig. 14.20.

Fig. 14.20
A line graph plots P subscript f versus I B subscript s L I. The y axis ranges from negative 1 to 1, and the x axis ranges from 0 to 0.12. The line P subscript f of B subscript s L begins at (0, 1), decreases gradually, and ends at (0.12, negative 0.85). The point (0.61, 0) is marked on the curve. Values are estimated.

A graph of the dependence of the final polarization on \(B_sL = \int B_s(s) \, ds\) field integral (Eq. 14.8), upon crossing of the integer resonance  = −6

The spin rotation angle is maintained constant over the acceleration range, by ramping the SOLENOID field using SCALING (Table 14.44). Its value is

$$\displaystyle \begin{aligned} \phi_{\mathrm{sp}} (1+G)\dfrac{ B_sL}{ B\rho_n} = -0.040648\, \text{rad} \ = \ 2.239^\circ \end{aligned}$$

The starting  = −5.374744555 is at a distance of about 100 ×|𝜖n| from the resonance, which is well away so ensuring absence of depolarizing effects. The spins stay vertical as particles circle around the ring. The final  = −6.74543 is about 100 ×|𝜖n| downstream of the resonance, in the asymptotic region.

In order for the spins to end up precessing about nearly longitudinal axes with the turn-average \(\left < S_y \right >_{\mathrm {turn}} \approx 0\), the respective practical SOLENOID and SPINR settings have to be (these are the settings in the input data file given in Table 14.44),

$$\displaystyle \begin{aligned} B_sL =0.0621\, \text{T m, at } G\gamma=G\gamma_n, \qquad \phi_{\mathrm{sp}}=2.36^\circ \end{aligned}$$

which is reasonably close to the theoretical expectations. The longitudinal field experienced by the particles across the solenoid, when they reached the resonant energy region, is shown in Fig. 14.21.

Fig. 14.21
A line graph plots B X versus X. The y axis ranges from 0 to 0.06, and the x axis ranges from 0 to 1.2. A square wave is plotted through (0, 0), (0.15, 0.061), (1.05, 0.061), and (1.2, 0). Values are estimated.

A graph of the SOLENOID longitudinal field Bs(s) (BX(X) in Zgoubi notations) as experienced by particles in the  ≈ n = −6 energy region of the acceleration ramp. The plotted data are read from zgoubi.plt. The plateau is at \(\hat B_s= 0.0621\) T

At this point it is a good idea to ensure that coupling introduced by the solenoid is only a marginal optical perturbation (otherwise, it would have to be compensated). This can be checked with a MATRIX computation, based on the input data file of Table 14.44 (uncomment DRIFT and SOLENOID, comment SPINR, remove or comment CAVITE and REBELOTE, instead add MATRIX[IORD=1,IFOC=11], use OBJET[KOBJ=5], make sure SOLENOID is added to the SCALING list), yielding the following 1-turn 6 × 6 matrix:

          -1.09944        -5.44039       -6.570868E-03   -3.815489E-02     0.00000        0.985749           0.355748        0.850847        2.126139E-03    6.053993E-03     0.00000       -0.271888          -1.090396E-02    5.977518E-02     1.82449        -8.76526         0.00000         0.00000          -1.889785E-03    6.568228E-03    0.316205       -0.971045         0.00000         0.00000          -4.427688E-02    0.680976       -2.645957E-04    4.689973E-03     1.00000         8.97276            0.00000         0.00000         0.00000         0.00000         0.00000         1.00000

It can be seen that coupling is weak. No compensation is needed in the current simulations.

The spin tracking results for the cases of both SOLENOID and SPINR are displayed in Fig. 14.22. Note that if a more accurate BsL value giving precisely \(\left < S_y \right >_{\mathrm {turn}} = 0\) is desired, as indicated in Fig. 14.20, this can be readily achieved by a linear interpolation between a couple of tracking points near  ≈ 0.61 ∼ 0.62.

Fig. 14.22
A graph plots S Z versus G gamma. The y axis ranges from negative 0.2 to 1, and the x axis ranges from negative 6.6 to negative 5.4. The values plotted for integer resonance remain stable up to the value negative 6.2 and diverge to both the negative and positive vertical axes up to negative 6.

A graph of Sy() (SZ() in Zgoubi notations) through the integer resonance n = −6 excited using a 2.36 deg longitudinal-axis spin rotation. The plotted data are read from zgoubi.fai. The Outcomes of both the SOLENOID and SPINR simulation cases are superimposed here, showing a marginal difference

Question 14.1.1.10-2—The data file for this simulation is the same as for the previous question (Table 14.44) with one change: MCOBJET is used to create a 1000-particle bunch. This requires substitution of OBJET and its data list by the following:

'MCOBJET' 3.7764566118E3                                                   reference rigidity (kG.cm). 3                                     ! Option to create a 6D bunch with random coordinates. 1000                                                                ! A 1000-particle bunch. 2 2 2 2 2 2 0.0 0. 0. 0.0 0. 1.                                          ! Mean values of the densities.  0.982907  5.483186 1e-6  2                                 ! Horizontal density parameters. -1.545246  9.691428 1e-6  2                                   ! Vertical density parameters.  0.        1.       1.e-6 2                               ! Longitudinal density parameters.  123456 234567 345678

SPINR is used to be closer to the theoretical assumptions addressed in the previous question (by avoiding possible orbital effects associated with SOLENOID). Two different 1000-particle sets have been tracked for comparison, one with δpp = 0 which ends up with the expected \(\left < S_y \right > \approx 0\), and one with a rms Gaussian momentum spread of σδpp = 10−3 which ends up with \(\left < S_y \right >\) being slightly negative. The results are presented in Fig. 14.23.

Fig. 14.23
2 line graphs plot the left angle bracket S subscript y right angle bracket, S subscript y versus turn. The lines are plotted for the particle sets. Both graphs follow an initial downward trend between negative 0.50 and 1.00 and stabilize thereafter along the positive x axis.

Graphs of \( \left < S_y(\text{turn}) \right >\), an average over a 1000-particle set (dark curve), together with a few individual Sy(turn) taken from that random set with various εx, εy values, for the two cases (as indicated on the respective graph) of δpp = 0 (no momentum spread) and non-zero random δpp. Spread of the final spin vectors together with a negative offset of \( \left < S_y \right >\) is apparent in the latter case

Fig. 14.24
A line graph plots x and y in meters versus seconds in meters. The lines are plotted for x and y. The x line follows a fluctuating sine wave that begins at (0, 0.0032) and ends at (200, 0.003), with an amplitude between negative 0.006 and 0.005. The y line remains constant at (0, 0). Values are estimated.

Vertical closed orbit along Booster, with the ERRORS setting as per Table 14.45

14.2.1.11 Introduce a Partial Snake

Question 14.1.1.11-1—The input data file to simulate the Booster lattice including vertical misalignment of the lattice quadrupoles (using ERRORS) and a longitudinal axis snake is given in Table 14.45. The snake simulation uses SPINR (a pure spin precession, no orbital effect) with the spin axis set to longitudinal and the spin precession angle ϕsnake to be determined—see next question.

Table 14.45 Input data file for a simulation of an acceleration cycle in Booster in the presence of a partial snake. The latter uses SPINR. An orbit distortion is created using ERRORS, which causes a random vertical displacement of quadrupoles with an rms value of 0.25 mm and a 3-σ cut-off. Note that the values of the SCALING coefficients are updated to the present initial BORO/1000=5.56832079 ( = −6.5). SCALING ensures that power supply ramps follow the rigidity boost by CAVITE. The latter accelerates from  = −6.5 to  = −10.5 in 6500 turns

Integer resonances are excited by a non-zero vertical orbit. Their strengths are displayed in Fig. 14.25 over − 12 ≤  ≤−7, as obtained using the thin lens model series (Eq. 2.29). Strong resonances are at n = pM ± [νy] = 6 + 5 = 11, 2 × 6 ± 5 = 7, 17, etc. (with [νy] = 5 being the nearest integer to the actual νy = 4.82). Thus, n = 7 is the strongest in the acceleration interval of  : −6.5 →−10.5 considered in this exercise. Its theoretical strength (using Eq. 2.29) is \(|{{\epsilon _n^{\mathrm {imp}}}}|=0.0034\).

Fig. 14.25
A graph plots I N subscript n, I and P subscript f over P subscript I versus the modulus of G subscript gamma. The values are plotted for I N subscript n, I and P subscript f over P subscript I. The graph contains 7 vertical stripes with varying units, and the data points are distributed throughout the graph.

Strengths of integer resonances excited by the orbit distortion displayed in Fig. 14.24

Acceleration through  : −6.5 →−10.5 produces Sy(turn) displayed in Fig. 14.29 (the case of ϕsnake = 0). The resonances are located at integer values distant by GΔγ = 1. Thus, in units of energy (using the particle data from Table 14.1),

$$\displaystyle \begin{aligned} \varDelta E = \dfrac{M}{|G|}G \varDelta \gamma = \dfrac{M}{|G|} = \dfrac{2808.3916}{4.18415}= 671.2\mathrm{MeV} \end{aligned}$$

Question 14.1.1.11-2—The snake angle is set (under SPINR) to \(\phi _{\mathrm {snake}}= 2\pi |{{\epsilon _n^{\mathrm {imp}}}}| = 2\pi \times 0.0034 \, {\mathrm {rad}} = 1.224^\circ \), ERRORS is inhibited, the particle data are logged in zgoubi.fai at each optical element along the ring, the reference rigidity is set for  = 7 under OBJET and SCALING. The initial spin coordinates are set (to arbitrary values) under SPNTRK, and FIT is used to change them so to reach Sx,s,y(s = 0) = Sx,s,y(s = send). This yields the input data file of Table 14.46.

Table 14.46 Input data file to find the spin closed orbit at the n = 7 resonance (using FIT). It is similar to that of Table 14.45, with the following changes: the reference rigidity is BORO=6.2821070918945 ( = 7); ERRORS[ONF=0] inhibits the error generator; ALL is added under FAISTORE, this logs the particle data at the exits of all optical elements along the sequence in zgoubi.fai for further plotting of SX,Y,Z(s); scaling_Gg7.inc is INCLUDEd with its scaling coefficients set for || = 7; FIT finds the periodic orbit (expected null) and the periodic spin orbit, expected to lie in the median plane due to the snake

The presence of the snake produces the spin closed orbit displayed in Fig. 14.26. Plotted data are read from zgoubi.fai, generated using FAISTORE[LABEL=ALL], which logs the particle data at the exits of ALL optical elements around the ring (FAISTORE[LABEL=DRIF] would probably be sufficient). The spinor methods (Chap. 3) allow for deriving the eigenvectors

$$\displaystyle \begin{aligned} \mathbf n = \left( \begin{array}{c} n_x \\ n_s \\ n_y \end{array} \right) =\dfrac{(\pm)}{\sin\, \pi u_{\mathrm{sp}}} \left( \begin{array}{c} - \sin{}( G\gamma(\pi - \theta)) \, \sin\dfrac{\phi_{\mathrm{snake}}}{2} \\ \cos{}( G\gamma(\pi - \theta)) \, \sin\dfrac{\phi_{\mathrm{snake}}}{2} \\ \sin{}( G\gamma\pi ) \, \cos\dfrac{\phi_{\mathrm{snake}}}{2} \end{array} \right) {} \end{aligned} $$
(14.9)
Fig. 14.26
A line graph plots n subscript X, n subscript Y, n subscript Z versus theta. The lines are plotted for S subscript X, S subscript Y, and S subscript Z. 3 sine waves with some fluctuations plotted from 0 to 6.5 with an amplitude between negative 1 and 1.

Spin closed orbit along Booster in terms of its azimuthal angle at the  = 7 integer resonance. The snake is located at θ = 0. The n0 vector lies in the median plane, and undergoes rotation about the Z-axis at a frequency of νsp = : SX (the thick red curve) and SY (blue) oscillate while SZ=0. The theoretical n0 vector components (Eq. 14.9) are superimposed (the dashed curves). At the azimuthal angle of θ = π rad, which is the location opposite to the snake, the stable spin direction vector is parallel to the longitudinal axis (ns ≡SX = 1 and nx ≡SY = 0)

Fig. 14.27
2 line graphs plot n subscript X, n subscript Y, n subscript Z versus G subscript gamma. The lines are plotted for n subscript X, 10 n subscript Y, n subscript Z. Both graphs follow an initial increasing trend and stabilize thereafter between negative 1 and 1.

dependence of the spin closed orbit, over 6.5 < || < 7.5 (left), and a zoomed-in view of the central region (right). The symbols are from spin tracking, the solid lines are from the theory (Eq. 14.9 wherein ns,x,y corresponds to the present Zgoubi notation nX,Y,Z). Note the value of the nY component at half-integer of nx ≡ nY = 0.01068 enhanced by a factor 10 for accuracy (with the theoretical nx given by Eq. 14.9)

and the spin tune

$$\displaystyle \begin{aligned} \cos\pi u_{\mathrm{sp}} = \cos (\pi G\gamma)\, \cos (\pi \epsilon_n) = \cos (\pi G\gamma)\, \cos \dfrac{\phi_{\mathrm{snake}}}{2} {} \end{aligned} $$
(14.10)

On the  = 7 resonance, ny = 0, the spin closed orbit lies in the median plane. Figure 14.26 shows its theoretical ns(θ) and nx(θ) components (Eq. 14.9) superimposed on the numerical tracking results (this graph uses the gnuplot script given in Table 14.47). The oscillation frequency (Eq. 14.10 with ϕsnake = 1.224) is

$$\displaystyle \begin{aligned} \mathrm{frac}(u_{\mathrm{sp}} ) = \dfrac{\phi_{\mathrm{snake}}}{2} =0.0034\end{aligned}$$
Table 14.47 A gnuplot script to produce the graph of the numerical and theoretical spin closed orbit vectors around the ring in Fig. 14.26. This script specifies the positions (the column numbers) of the data read from zgoubi.plt

Question 14.1.1.11-3—An input data file to compute the spin closed orbit for  = 7, using FIT, is given in Table 14.48. A script (as in Table 14.49) changes the reference rigidity (OBJET[BORO]) and the corresponding SCALING factors in the ancillary file scaling.inc, and the repeats the computation for the sampled −  values over [−6.5, −7.5] (Figs. 14.27 and 14.28).

Fig. 14.28
2 line graphs plot spin turn versus G subscript gamma. The lines are plotted for nu subscript s p, tracking and theoretical values. a. The theoretical line is plotted through (0, 0.5), (7, 0), and (7.5, 0.5). b. The theoretical curve is plotted through (6.985, 0.0155), (7, 0.0035), and (7.015, 0.0155). The tracking plots are distributed along the line and curve. Values are estimated.

dependence of the spin tune, over 6.5 < || < 7.5, and a zoom-in of the central region. The symbols are from spin tracking, the solid lines are from the theory (Eq. 14.10). The width of the forbidden spin tune region, or “spin tune gap”, is the resonance strength, or resonance width, 𝜖n = ϕsnake∕2π = 0.0034

Fig. 14.29
A graph plots S Z versus G gamma. The values are plotted for four snake precession angles. The y axis ranges from negative 1 to 1, and the x axis ranges from negative 10 to negative 7. The graph contains 4 snake precessions with a fluctuating pattern.

Spin motion over  : −6.5 →−10.5, for the cases of 4 different snake precession angles: null, \(\phi _{\mathrm {snake}}=2\pi |{{\epsilon _n^{\mathrm {imp}}}}|=1.22^\circ \), \(2\times 2\pi |{{\epsilon _n^{\mathrm {imp}}}}|=2.45^\circ \), and \(10\times 2\pi |{{\epsilon _n^{\mathrm {imp}}}}|=12.2^\circ \), with \(|{{\epsilon _n^{\mathrm {imp}}}}|=0.0034\) being the strength of the imperfection resonance excited by vertical quadrupole misalignments. The initial spin is along the vertical stable spin direction at  = −6.5

Table 14.48 Input data file to find the spin closed orbit at a n resonance (n = 7, here) using FIT. FIT finds the spin closed orbit for particle 4, which is dependent (Eq. 14.9). A trick is used here: the first three particles are left out of the fit, they are used to compute the spin matrix (SPNPRT[MATRIX], logged in zgoubi.SPNPRT.Out by SPNPRT[PRINT]) for comparison with the spin closed orbit of particle 4 found by FIT. Additional particles 5 and 6 are dummies and unused. They are only needed for proper operation of SPNPRT[MATRIX], which requires 3-particle subsets
Table 14.49 A Fortran script to repeat the orbit finding of Table 14.48, for sampled values  : −6.5 →−7.5. When the scan is completed, gnuplot_SPNPRT_N0-Qs-fromFIT.gnu (Table 14.50) is executed
Table 14.50 Typical gnuplot commands to obtain graphs of spin tune and spin closed orbit components from particle 4 data logged in zgoubi.SPNPRT.Out during tracking

Question 14.1.1.11-4—Quadrupole misalignments are enabled (ERRORS[ONF=1]), the snake angle is set to ϕsnake = 1.224.

Acceleration through  : −6.5 →−10.5 produces Sy(turn) displayed in Fig. 14.29 (the case of ϕsnake = 1.224). The spin appears to be tilted after crossing the integer resonances. However, the snake rotation is too weak to overcome the effect of the vertical orbit distortion.

Question 14.1.1.11-5—In order to determine the minimum angle of the snake spin rotation, it is necessary to know the strengths of the resonances to be crossed.

A partial snake generates a spin resonance strength

$$\displaystyle \begin{aligned} |\epsilon^{\mathrm{snake}}| = \dfrac{\phi_{\mathrm{snake}}}{2\pi}\end{aligned}$$

Upon crossing of the resonance, the ratio of the final and initial polarizations satisfies (the Froissart and Stora formula, Eq. 2.44)

$$\displaystyle \begin{aligned} \dfrac{P_f}{P_i} = 2e^{\textstyle -\dfrac{\pi}{2\alpha} |\epsilon^{\mathrm{snake}} + {{\epsilon_n^{\mathrm{imp}}}}|{}^2 } -1\end{aligned}$$

Note: the overall strength \(\epsilon ^{\mathrm {snake}} + {{\epsilon _n^{\mathrm {imp}}}}\) results from a combination of the longitudinal and radial perturbative terms \(\lambda _{{ s}} \dfrac {B_{{ s}}}{B_{{ y} 0}}\) and \(\lambda _x \dfrac {B_x}{B_{{ y} 0}} \) in Eq. 2.26, with the Bs contribution coming from the snake and Bx arising from the vertical orbit in the quadrupoles.

Thus, for the snake to dominate the spin resonance dynamics, one needs

$$\displaystyle \begin{aligned} |\epsilon^{\mathrm{snake}}| \gg |{{\epsilon_n^{\mathrm{imp}}}}|\end{aligned}$$

This is qualitatively verified in Fig. 14.29, which displays motion of the spin of a particle traveling along the vertical closed orbit, while it is accelerated over  : −6.5 →−10.5: a snake precession of \(10\times 2\pi |{{\epsilon _n^{\mathrm {imp}}}}|=12.2^\circ \) allows overcoming the resonances by causing a full flip at each integer value. The lower values of \(\phi _{\mathrm {snake}}=2\pi |{{\epsilon _n^{\mathrm {imp}}}}|=1.22^{\circ }\) and \(\phi _{\mathrm {snake}}=2\times 2\pi |{{\epsilon _n^{\mathrm {imp}}}}|=2.45^{\circ }\) are too weak for spin flipping.

14.2.1.12 Introduce Full Snakes

A non-zero vertical invariant is accounted for. It causes betatron motion through the lattice fields exciting systematic intrinsic spin resonances, which, given νy = 4.82, are located at  = −12 + νy = −7.18, − 6 − νy = −10.82, − 18 + νy = −13.18.

The same vertical closed orbit distortion as in exercise 14.2.1.11 is introduced, using ERRORS with the same data.

Question 14.1.1.12-1—The methods here are very similar to what is done in 14.2.1.11. The spin closed orbit is found using the same input data file (Table 14.46). The FIT procedure in that file simultaneously finds the particle closed obit \((x_0,x^{\prime }_0,y_0,y^{\prime }_0)\) ((Y0, T0, Z0, p0) in Zgoubi notation), and the spin closed orbit (which by definition is that of the particle on closed orbit). Thus, that FIT procedure holds for chromatic closed orbits. All that needs be changed is the particle D value (relative momentum) under OBJET. The closed orbits of interest here are detailed below.

The one-turn spin matrix, and thus the spin tune, the local spin precession axis at the start of the sequence, etc., can be computed using SPNPRT[MATRIX]. Computation of the spin matrix at different momenta requires defining groups of momenta, using OBJET[KOBJ=2,IDMAX=3]. The input data file used is given in Table 14.51. It defines 3 respective groups of D − 1 = dpp0 = 0, 10−4, 10−3. SPNPRT[MATRIX] manages that information and produces the corresponding 3 one-turn spin matrices. Excerpts from zgoubi.res given in Table 14.52 detail the momentum dependence of the numerical parameter values. At  = −6.5, the spin closed orbit at the snake is along the transverse horizontal axis, and is longitudinal at the azimuthal angle opposite to the snake, as seen in the following excerpts from zgoubi.res:

  • at the snake (s=0.57 m, the end of the first drift, element number 12 in the optical sequence):

    Table 14.51 Input data file to compute the one-turn spin matrices for 3 different momenta, D = pp0 = 1, 1.0001, 1.001. In order to produce the respective matrices, SPNPRT[MATRIX] requires defining 3 groups of momenta in the proper order. This can be achieved using OBJET[KOBJ=2,IDMAX=3]. The same particle coordinates are repeated three times in each group. Then SPNTRK sets the three initial spin vectors to (1,0,0), (0,1,0), and (0,0,1), respectively
    Table 14.52 SPNPRT[MATRIX] listing in zgoubi.res (excerpts): one-turn spin matrices and other information, at relative momenta D − 1 = dpp0 = 0, 10−4, 10−3, 10−2

         12  Keyword, label(s) :  DRIFT       DRIF                  L057                               Drift,  length =    57.04000  cm TRAJ #1 IEX,D,Y,T,Z,P,S,time :  1  0.  0.  0.  3.050213E-01  4.052981E-01  5.7040005E+01  2.48626E-03 TRAJ #1 SX, SY, SZ, |S| :  1    1.962212E-05  -9.999958E-01   2.897616E-03   1.000000E+00  Cumulative length of optical axis =   0.5704 m   ;  Time (for reference rigidity & particle) =  2.486264E-09 s

  • at the azimuthal location opposite to the snake (s=100.9 m away, element number 330 in the optical sequence):

        330  Keyword, label(s) :  DRIFT       DRIF                  L057                               Drift,  length =    57.04000  cm TRAJ #1 IEX,D,Y,T,Z,P,S,time :  1  0.  2.708E-05 -5.847E-05 -3.839713E-01 -3.940313E-01  1.0146044E+04  4.42247E-01 TRAJ #1 SX, SY, SZ, |S| :  1    9.999388E-01  -1.416886E-05   1.106666E-02   1.000000E+00  Cumulative length of optical axis =    101.460424 m ;  Time (for reference rigidity & particle) =  4.422465E-07 s

Question 14.1.1.12-2—Acceleration over  : −6.5 →−13.5 uses the input data file given in Table 14.53. It is similar to that of Table 14.45 but with OBJET[KOBJ=8] to generate a few particles on a matched ellipse with a given invariant (to study the dependence of the spin motion on the betatron motion), and with the number of turns increased to 11750 under REBELOTE so to reach  = −13.5.

Table 14.53 Input data file for a simulation of an acceleration cycle in Booster in the presence of a single full snake. The latter implemented using SPINR. An orbit distortion is created using ERRORS, which causes random vertical displacements of the quadrupoles with an rms value 0.25 mm and a 3-σ cut-off. Note that the values of the SCALING coefficients are updated to the present initial BORO/1000=5.56832079 ( = −6.5). SCALING ensures that power supply ramps follow the rigidity boost by CAVITE. The latter accelerates from  = −6.5 to  = −13.5 in 11700 turns. The initial coordinates are taken on a matched ellipse with a normalized εy = 2.5 πμm

The results are displayed in Fig. 14.30. The initial spins are along the transverse horizontal axis (Y, in Zgoubi notation), which is the orientation of the local spin closed orbit. No polarization loss is observed the stable spin direction exhibits rotation about the vertical axis.

Fig. 14.30
2 graphs. a. A line graph plots S subscript X and S subscript Y versus G subscript gamma. 2 sine waves plotted with an amplitude between negative 1 and 1. The first wave is plotted between (negative 13.5, negative 1) and (negative 7.5, 1). The second wave is plotted between (0, 0) and (7.5, 0). b. A graph plots S Z versus G gamma. The curve follows a fluctuating pattern between negative 0.08 and 0.06. Values are estimated.

Evolution of the stable spin direction adiabatically followed by the spins, as observed at the snake (the mid-plane components SX and SY versus ) (left), and the (marginal) vertical component (SZ versus ) (right), during acceleration over  : −6.5 →−13.5, in the presence of a single full snake. Three particles are tracked, with different initial betatron phases on the same matched phase-space ellipse with a normalized invariant εY = 2.5 πμm. Their spin trajectories overlap. The initial spins are along the Y  axis corresponding to the local spin closed orbit at  = −6.5

Question 14.1.1.12-3—Horizontal motion is added: 9 particles are launched with normalized εx = εy = 2.5 πμm and 9 combinations of the initial betatron phases, by ad hoc modification of OBJET[KOBJ=8]:

 'OBJET' 5.5683207908096621E3                        Reference rigidity (kG.cm) (G.gamma=-6.5, here). 8 3 3 1 0. 0.   2.81903105E-03   4.05298102E-04   0.00  1. 'o'                       ! closed orbit.  0.982907  5.483186  3.e-6 -1.545246  9.691428  3.e-6            ! Vertical invariant value is 2.5 pi.mu_m, normalized.  0. 1. 0.

The results are essentially unchanged. Motion of the spins is similar to that in Fig. 14.30 found earlier.

14.2.1.13 Preserve Polarization Using Tune Jump

Question 14.1.1.15-1—For a 100 kV RF voltage the crossing speed is

$$\displaystyle \begin{aligned} \frac{dG\gamma}{d\theta}=2.37121051717 \times 10^{-5}\end{aligned}$$

Given the tune νZ = 0.82, the acceleration rate and the energy at the start of the tracking, the resonance || = 0 + νZ occurs at a turn number

$$\displaystyle \begin{aligned} N_{0+u_y}\approx 1530\end{aligned}$$

The resonance strength 𝜖n is in question. It can be determined from the particle invariant using Table 14.38. Given 𝜖n and the crossing speed \(\alpha = \frac {dG\gamma }{d\theta }\), the Froissart-Stora formula (Eq. 2.44) yields the expected asymptotic polarization after crossing of

$$\displaystyle \begin{aligned} P_f\approx 0.53\end{aligned}$$

A numerical simulation of this resonance crossing yields the result displayed in Fig. 14.31 and confirms the expected Pf ≈ 0.53.

Fig. 14.31
A line graph plots S subscript z versus G subscript gamma. The lines are plotted for with tune jump and without tune jump. The line for with tune jump remains stable, and the line for without tune jump follows a fluctuating pattern.

Evolution of the polarization component Sz() of helions when crossing the || = 0 + νZ resonance, with and without use of the tune jump quadrupoles. The plotted turn-by-turn data are read from zgoubi.fai

Question 14.1.1.15-2—The new crossing speed, including the effect of the tune jump, is (Eq. 14.2)

$$\displaystyle \begin{aligned} \alpha=2.60504500631\times 10^{-4} \end{aligned}$$

With this increased crossing speed, the Froissart-Stora formula yields an expected final polarization of

$$\displaystyle \begin{aligned} P_f=0.9234742\end{aligned}$$

This theoretical value agrees with the value obtained from a crossing simulation within 0.03%. The result of the latter is displayed in Fig. 14.31.

14.2.1.14 Preserve Polarization Using an AC Dipole

With the scale_factor set to 0.0, tracking a 32 particle set yields an average Pf = 41.5%, compared to the expectation of Pf = 40.0%.

With the scale factor set to 5 G, tracking the 32 particle set yields Pf = −50%.

An AC dipole field of Bm = 12.2 G allows a full spin-flip.

The tracking results are displayed in Fig. 14.32.

Fig. 14.32
A line graph plots S subscript z versus G subscript gamma. The lines are plotted for B subscript m equals 0.0 G, B subscript m equals 5.0 G, and B subscript m equals 12.2 G. All lines follow a downward trend with some fluctuations.

Helions crossing the || = 0 + νZ resonance, with an AC dipole operating at Bm = 5 and 12.2 G. Crossing without the AC dipole (the Bm = 0 case) is shown for comparison. The plotted turn-by-turn data are read from zgoubi.fai

14.2.2 Electron Spin Dynamics, Synchrotron Radiation

14.2.2.1 Electron Equilibrium Emittances and Energy Spread

Question 14.1.2.1-1—Figure 14.33 shows the optical functions and the orbit of a perfectly aligned AGS Booster ring. It was generated by a Gnuplot script (Table 14.13) using the Zgoubi Twiss output following the question’s instructions in Sect. 14.1.2.1. The Twiss output file contains a table of the Twiss functions specified at the end of each element in the lattice. An easy way to find the damped equilibrium emittances, energy spread and damping times of 10 GeV electrons in this lattice is to open the output text file in a spreadsheet and then evaluate the integrals in the expressions for the equilibrium parameters given in Chap. 6. We can calculate approximate integral values by summing the integrand expressions over all elements. This is an accurate approximation in our case, since the Twiss functions do not change significantly over a single element. The resulting equilibrium parameters are summarized in Table 14.54.

Fig. 14.33
2 line graphs. a. The graph plots beta subscript x, beta subscript y and eta subscript x, eta subscript y versus S. The lines are plotted for beta subscript x, beta subscript y, eta subscript x, and eta subscript y. 3 sinusoidal waves are plotted along with distortions. b. The graph plots x, y versus S. The lines are plotted for x and y. The x line follows a decreasing trend with a fluctuating pattern. The y line remains constant at (0, 0).

Left: twiss optical functions of the entire AGS Booster ring. Right: orbit in the AGS Booster ring with perfect element alignment

Table 14.54 Electron beam parameters

Question 14.1.2.1-2—The SRPRNT keyword at the end of the code in Table 14.15 activates printout of the SR loss statistics in zgoubi.res output file. An excerpt of zgoubi.res file showing the SR information is:

∗ Monte Carlo S.R. statistics, from beginning of structure,        10000 particles,  a total of        87840762 integration steps :    Average energy loss per particle per pass :        63968.01     keV.       Relative to initial energy :  6.3968014E-03    Critical energy of photons (average) :             158.9614     keV    Average energy of radiated photon :                49.30345     keV    rms energy of radiated photons :                   92.27650     keV    Smallest, BIGEST photon :                         0.0000E+00      9.9915E+03     keV    Number of photons radiated - Total :                        1.2974348E+07                               - per particle per pass :         1297.435                               - per particle, per step :       0.1477030

As one can see, the average particle energy loss per turn obtained in the Monte-Carlo simulation is in a good agreement with the theoretical prediction in Table 14.54. One must restore this energy loss at a synchronous phase necessary for longitudinal stability. Therefore, the cavity voltage amplitude is \(|\hat V|=\varDelta E/q/\sin \phi _s = 127.6\) MV. This number is consistent with the rf cavity setting under CAVITE in Table 14.16, namely \(\hat V=122.345\) MV. The cavity setting is slightly lower than the theoretical prediction because it accounts for the change in the particle energy as it moves around the ring.

Question 14.1.2.1-3—The initial beam distribution in Table 14.16 is generated on a matched vertical phase-space ellipse, using OBJET[KOBJ=8]. The ellipse parameters are specified by the appropriate option of the OBJET element using the Twiss functions at the start point and the beam emittances. The matched Twiss function values were taken from the Twiss table that was generated as a result of Question 14.1.2.1-1. For simplicity, the horizontal emittance was set to zero while the vertical emittance was set to a relatively large value of 10 μrad for synchrotron damping demonstration. After running the simulation and analyzing, plotting and fitting the resulting data as described in the question’s statement in Sect. 14.1.2.1, we obtain evolution of the vertical beam emittance as a function of the turn number shown in Fig. 14.34. The vertical emittance εy is obtained from the rms beam size σy as \(\varepsilon _y=\sigma _y^2/\beta _y\).

Fig. 14.34
A line graph plots epsilon subscript y versus turns. The y axis ranges from 0 to 5, and the x axis ranges from 0 to 1. The lines are plotted for epsilon subscript y and fit. 2 curves are plotted through (0, 4.75), (0.2, 1), and (0.96, 0), with some fluctuations. Values are estimated.

Damping of the vertical emittance of a 10 GeV electron beam in the AGS Booster lattice. Note a good agreement of the exponential fit with the Monte-Carlo data for only 100 electrons

An exponential fit to the simulation data in Fig. 14.34 gives a vertical emittance damping time of 155.3 turns. Note that the equations of Chap. 6 and the values listed in Table 14.54 are for the amplitude damping times rather than the emittance ones. Since the emittance is proportional to the second power of the betatron amplitude, the vertical betatron amplitude damping time is a factor of two longer than the vertical emittance one and equals 310.6 turns. Given the electron circulation frequency in the AGS Booster listed in Table 14.54, this number corresponds to 0.209 ms, which is in a good agreement with the theoretical prediction of 0.211 ms in Table 14.54.

14.2.2.2 Spin Diffusion Studies

14.2.2.3 Spin Diffusion

Question 14.1.2.2-1—Here is an excerpt of zgoubi.res file showing the spin transfer matrix, n0 and spin tune:

                  Spin transfer matrix, momentum group # 1 :          -0.345661       -0.938359         0.00000           0.938359       -0.345661         0.00000            0.00000         0.00000         1.00000 Trace =       0.3086770996,    ;   spin precession acos((trace-1)/2) =     110.2221783671 deg Precession axis :  ( 0.0000,  0.0000,  1.0000)  ->  angle to (X,Y) plane,  angle to X axis :  90.000,  90.000 degree Spin  tune  Qs (fractional) :     3.0617E-01

As one can see, in a perfectly aligned lattice, n0 is exactly vertical.

Question 14.1.2.2-2—The electron polarization is plotted against the turn number in Fig. 14.35. It was obtained by tracking 100 electrons through a perfectly aligned AGS Booster lattice with synchrotron radiation enabled. At the start, the electron spins were set along the n0 axis. Figure 14.35 illustrates that in a perfectly aligned ring, there is no detectable polarization degradation on this time scale even when synchrotron radiation is present, i.e. the spin diffusion rate is zero within our numerical precision. This case presents interest primarily as a sanity check of the spin tracking code. It confirms that at this level, the code does not introduce unphysical spin effects.

Fig. 14.35
A line graph plots P subscript z versus turns. The y axis ranges from 0.999 to 1.001, and the x axis ranges from 0 to 1. The line plotted for electron spins remains constant at (0, 1) along the x-axis.

Polarization of 100 electrons as a function of the turn number in a perfectly aligned AGS Booster ring with synchrotron radiation enabled. The electron spins are initially aligned with the n0 axis

Question 14.1.2.2-3—The 4D transverse closed orbit offset (YT Z P) caused by a 1 mm vertical misalignment of the “QVA1” quadrupole is

-5.78398841E-06  -5.02369232E-06  -2.40168827E-01  -5.80016582E-01

The n0 axis at the beginning of this perturbed lattice is

(0.0137, -0.0568,  0.9983)

Time evolution of the polarization in this case is compared to that of the perfectly aligned case of Question 14.1.2.2-2 in Fig. 14.36. An exponential fit to the data gives a spin diffusion time of 17.9 ⋅ 103 turns corresponding to 12 ms. Note the rapid spin diffusion caused by misalignment of even a single element.

Fig. 14.36
A line graph plots P subscript z versus turns. The y axis ranges from 0.2 to 1, and the x axis ranges from 0 to 1. The lines are plotted for 0 millimeters, 1 millimeter, 2 millimeters, and 5 millimeters. 4 lines, 3 follow a decreasing trend, while one remains constant.

Polarization of 100 electrons as a function of the turn number in the AGS Booster lattice for 0, 1, 2, and 5 mm vertical offsets of the first “QVA1” quadrupole. Synchrotron radiation is enabled. The electron spins in each case are initially aligned with the corresponding n0 axis

Question 14.1.2.2-4—Similarly to the solution of Question 14.1.2.2-3, we find that vertical misalignments of “QVA1” by 2 and 5 mm result in transverse closed orbit shifts of

-2.41767056E-05   3.83288439E-05  -4.80358495E-01  -1.16006824E+00

and

-1.49937996E-04   1.83685654E-04  -1.20099981E+00  -2.90035565E+00 ,

respectively. The corresponding n0 axes are

(0.0273, -0.1132,  0.9932)

and

(0.0660, -0.2769,  0.9586) .

Note that the closed orbit offset and the x and y components of n0 scale linearly with the size of the misalignment as expected. The polarization behavior in these two cases is plotted as a function of the turn number in Fig. 14.36. Exponential fits to these data give spin diffusion times of 6.4 ⋅ 103 and 800 turns, or 4.3 and 0.54 ms, for the 2 and 5 mm misalignment scenarios, respectively.

In a perfectly aligned lattice without transverse coupling, particles with different momentum offsets δ experience only vertical bending and focusing magnetic fields. Therefore, the precession axes of all particles n(δ) are aligned with the same vertical n0 axis. Change in momentum of a particle due to emission of a synchrotron radiation photon does not change the direction of its n(δ) and causes no polarization loss as illustrated by Question 14.1.2.2-2. In case when the closed orbit experiences vertical excursion, the radial fields of the focusing quadrupoles tilt n0 from the vertical. The amount of this tilt is momentum dependent thus resulting in a spread of the n(δ) directions for different δ. Emission of a synchrotron radiation photon changes the direction of n(δ) and only the component of the original spin direction along the new n(δ) is preserved. The greater the change in n(δ), the smaller the fraction of the spin that is preserved and thus the higher the spin diffusion rate. Greater misalignments lead to greater closed orbit distortion and subsequently greater deviation of n0 from the vertical, greater n(δ) spread and finally greater spin diffusion rate as demonstrated in Question 14.1.2.2-4.

14.2.2.4 Suppression of Spin Diffusion

Question 14.1.2.2-5—Both lattices considered in this exercise consist of a solenoid followed by two dipoles and then another solenoid. Both schemes are simplified versions of an electron spin rotator, a device rotating the electron polarization from vertical to longitudinal and then back. Such an insertion is needed to provide longitudinal polarization in the experimental section without causing fast spin diffusion in the arcs. The first solenoid rotates the polarization about the longitudinal axis from positive vertical to positive radial. The subsequent dipole rotates the polarization about the vertical axis from positive radial to positive longitudinal. The difference between the two schemes is in how the polarization is returned back to positive vertical. In the first scenario, the second dipole bends the beam in the same direction as the first one and continues polarization rotation in the same direction from positive longitudinal to negative radial. The second solenoid has the same field polarity as the first one. It rotates the polarization from negative radial to positive vertical. This dynamics can be graphically summarized as

$$\displaystyle \begin{aligned} \uparrow~{\mathrm{Solenoid}}~\odot~{\mathrm{Dipole}}~\rightarrow~{\mathrm{Dipole}}~\otimes~{\mathrm{Solenoid}}~\uparrow . \end{aligned} $$
(14.11)

In the second scenario, the polarities of the second dipole and solenoid are reversed resulting in the following rotation sequence

$$\displaystyle \begin{aligned} \uparrow~{\mathrm{Solenoid}}~\odot~{\mathrm{Dipole}}~\rightarrow~{\mathrm{Anti-Dipole}}~\odot~{\mathrm{Anti-Solenoid}}~\uparrow . \end{aligned} $$
(14.12)

In both cases, the polarization is positive vertical at the entrance and exit. From geometrical point of view, the first arrangement causes 138.4 mrad net orbital bend while the second configuration has zero net bend.

Question 14.1.2.2-6—The field and spin components along the reference trajectories of the two spin rotator configurations are shown in Figs. 14.37 and 14.38, respectively. These graphs demonstrate implementation of the design philosophy described in the solution to Question 14.1.2.2-5.

Fig. 14.37
2 line graphs plot B versus x in meters. a. The graph has 2 square functions for B subscript x. The first one is plotted through (0, 0), (0.5, 5.2), (10, 5.2), and (10, 0). The second one is plotted through (12.4, 0), (12.5, 5.2), (22.5, 5.2), and (22.5, 0). The line for B subscript z is drawn between the 2 squares. b. 2 square functions for B subscript x, and the B subscript z is plotted between the 2 functions. The B subscript y remains constant at (0, 0) in both graphs. Values are estimated.

Left: field components along the reference trajectory in the same-field-polarity design. Right: field components along the reference trajectory in the reversed-field-polarity design

Fig. 14.38
2 multi-line graphs plot S versus x in meters. The lines are plotted for S subscript x, S subscript y, and S subscript z. Both graphs depict a fluctuating pattern between negative 1 and 1.

Left: spin components along the reference trajectory in the same-field-polarity design. Right: spin components along the reference trajectory in the reversed-field-polarity design

Question 14.1.2.2-7—Figure 14.39 shows the electron vertical spin component at the end of the spin rotator as a function of the particle’s relative momentum offset. The momentum dependencies are compared for the two spin rotator configurations. In this study, different-momentum electrons with initially vertical spins were launched on the design orbit at the beginning of the spin rotator and tracked to its end. As we can see, the spin effects of the two rotator designs are equivalent for the on-momentum particles resulting in a perfect restoration of the vertical spin at the end. However, there are significant differences for the off-momentum particles. The reversed-field-polarity design demonstrates a much weaker momentum dependence of the final spin. The remaining dependence is due to dispersion that has not been accounted for in this simplified scheme.

Fig. 14.39
A line graph plots S subscript z versus delta p over p. The lines are plotted for scheme 1 forward slash unmatched and scheme 2 forward slash matched. The line for scheme 2 follows an upward curve, while the line for scheme 1 remains constant at (0, 1).

Final vertical spin component as a function of the particle’s relative momentum offset for the same-field- (Scheme 1) and reversed-field-polarity (Scheme 2) spin rotator configurations

The spin precession in each of the spin rotator elements is of course momentum dependent. The spin rotation of an off-momentum electron deviates from that of the reference particle. In the same-field-polarity configuration, this deviation accumulates from magnet to magnet resulting in a relatively large tilt of the spin at the end. In the opposite-field-polarity configuration, the spin deviation accumulated in the first half of the spin rotator is precisely compensated by the matching opposite-field magnets in the second half causing equal-size opposite-direction spin rotations. As we demonstrated in the solution to Question 14.1.2.2-4, greater deviation of the spin from vertical in the arcs results in a higher spin diffusion rate. Therefore, the same-field-polarity configuration is expected to generate a much higher spin diffusion rate than the opposite-field-polarity one. The opposite-field-polarity design is an illustration of the concept of first-order longitudinal spin matching.

14.2.2.5 Spin Matching

Question 14.1.2.5-1—The snake lattice in Table 14.32 is close to an identity transformation in the horizontal plane and a − I transformation in the vertical plane. Therefore, its insertion into the AGS Booster lattice results in a reasonable periodic solution not requiring any rematch. For simplicity, we ignore the fact that the ring is no longer geometrically closed, since this does not alter the below general conclusions about the spin dynamics. The optics of the entire ring and an expanded view of the snake section are shown in Fig. 14.40 (left) and (right), respectively.

Fig. 14.40
2 multi-line graphs plot beta subscript x, beta subscript y and eta subscript x, eta subscript y versus S. The lines are plotted for beta subscript x, beta subscript y, eta subscript x, and eta subscript y. Both graphs follow a fluctuating pattern.

Left: optics of the AGS Booster ring with the spin-matched snake insertion. Right: expanded view of the optics of the spin-matched snake insertion

Question 14.1.2.5-2: The n0 axis at the start of the AGS Booster lattice with the solenoidal snake (Table 14.34) can be found in the following excerpt of zgoubi.res:

                  Spin transfer matrix, momentum group # 1 :          -0.571992        0.820259        8.558277E-14           0.820258        0.571991       -1.676874E-03          -1.375471E-03   -9.591582E-04   -0.999999      Trace =      -0.9999993982,    ;   spin precession acos((trace-1)/2) =     179.9555530060 deg      Precession axis :  ( 0.4626,  0.8866, -0.0007)  ->  angle to (X,Y) plane,  angle to X axis :    -0.0426,    -0.0921  degree      Spin  tune  Qs (fractional) :     4.9988E-01

As expected for a ring with one snake, n0 lies in the horizontal plane and the spin tune is 0.5.

Question 14.1.2.5-3 and 4: Figure 14.41 compares the polarization behavior in the AGS Booster lattice with a solenoidal snake for the spin-matched and spin-mismatched snake configurations. From the beam dynamics point of view, the two configurations are similar. They only differ by rotation of the snake section by 90 about the longitudinal axis. However, in the spin-mismatched case, the spin diffusion rate is several times greater than in the spin-matched situation. This result illustrates the effect of proper optics design on the spin dynamics and the importance of spin matching. Note that spin diffusion is present in the matched case as well. It cannot be avoided in this ring configuration due to n0 being horizontal in the arcs at a sufficiently high synchrotron radiation rate. This scenario is used for demonstration purposes only. It shows that spin diffusion due to improper spin matching can dominate over other depolarizing effects.

Fig. 14.41
A line graph plots P subscript H versus turns. The lines are plotted for matched and mismatched. 2 lines follow a downward trend between 0.93 and 1. The line for matched has the highest value.

Polarization of 100 electrons as a function of the turn number in the AGS Booster lattice with a solenoidal snake for the spin-matched (red) and spin-mismatched (blue) snake configurations