Abstract
Numerical simulations are inescapable steps in spin dynamics studies and in the design of polarized beam accelerators and optical components. An integral part of the Summer 2021 USPAS Spin Class teachings, under the form of a 2-week miniworkshop, this chapter is also an initiation to the field, “hands on”: in a first Section, numerical simulation exercises are proposed which cover many of the theoretical aspects of hadron and electron spin dynamics addressed during the lectures, including resonant depolarization; preservation methods such as harmonic orbit correction, tune jump, the use of an ac dipole, or snakes; the effect of synchrotron radiation; spin diffusion and its suppression; spin matching. A second Section is dedicated to detailed solutions of these simulation exercises and includes tight comparisons of numerical outcomes and theoretical expectations from the lectures.
This manuscript has been authored by employees of Brookhaven Science Associates, LLC, under Contract No. DE-SC0012704 with the US Department of Energy. The publisher by accepting the manuscript for publication acknowledges that the US Government retains a non-exclusive, paid-up, irrevocable, worldwide license to publish or reproduce the published form of this manuscript, or allow others to do so, for US Government purposes. This manuscript has been authored in part by employees of UT-Battelle, LLC, under contract DE-AC05-00OR22725 with the US Department of Energy (DOE). The publisher acknowledges the US government license to provide public access under the DOE Public Access Plan (http://energy.gov/downloads/doe-public-access-plan).
You have full access to this open access chapter, Download chapter PDF
Similar content being viewed by others
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.1–14.1.1.17 and Tables 14.2, 14.3), a second part deals with electrons and synchrotron radiation (Sects. 14.1.2.1–14.1.2.5).
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
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.
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:
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).
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 |Gγ| = 3n + 1.5 (Fig. 14.2). As a result, it is foreseen to extract 3He beams from the Booster at |Gγ| = 10.5. These will be the conditions considered in these exercises, regarding hadron polarization.
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.
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):
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).
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 dp∕p = −10−4 and dp∕p = +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 dp∕p = ±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 (Gγ values) of
-
imperfection resonances,
-
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 Gγ 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).
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.
Question 14.1.1.5-1: Calculate the strengths of the imperfection resonances excited from |Gγ| = 5 to |Gγ| = 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 Gγ = −5 to Gγ = −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:
-
(i)
average values of the vertical component Sy; of the horizontal components Sx, Ss.
-
(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 Gγ 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:
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 Gγ 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 Gγ : −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 Gγ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 Gγ dependence of the spin closed orbit vector, observed at the snake. Produce a graph of the spin orbit components Sx,s,y(Gγ).
Produce a graph of the spin tune dependence on Gγ, νsp(Gγ).
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 Gγ : −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.
-
Gγ : −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 dp∕p = 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 Gγ : −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 Gγ : −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 dp∕p = 10−4 beam momentum offset. Compare with on-momentum parameters, check against expectation from theory.
Accelerate a beam over Gγ : −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 Gγ : −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 Gγ : −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:
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
The |Gγ| = 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.
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 Bρ = 2.12998742 at the start of the tracking, upstream of the resonance (i.e., |Gγ| = 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).
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)
where BmL is the integrated field of the AC dipole magnet, βy is the beta function at the AC dipole and Bρ 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]:
and
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 |Gγ| = 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 Gγ = −5.5 to Gγ = −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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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 Gγ value! Thus, the rigidity in this exercise has to be changed to the injection value, namely (Table 14.36),
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 δp∕p = ±10−4 and launched on their respective chromatic closed orbits, given the dispersion and its derivative (Sect. 14.2.1.2)
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.
Questions 14.1.1.3.2, 14.1.1.3.3—Tracking the spin closed orbit over a turn for particles at dp∕p = 0 and dp∕p = ±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
(the on-momentum “group 2” above indicates 69.5369940370 deg) or equivalently a fractional spin tune value of
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)
whereas the spin matrix from tracking says (momentum “group 2” above)
in accord with the above spin tune value νsp = 0.193158.
Off-momentum (groups 1 and 3):
γ needs to be corrected for the dp∕p = ±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 (Gγ values) of the depolarizing resonances in the range
have been added to Table 14.8, yielding Table 14.37 (integer/imperfection resonances of the form Gγ = integer), and to Table 14.9, yielding Table 14.38 (systematic intrinsic resonances of the form Gγ = 6 ×integer ± Qy).
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;
-
they are tracked from injection Gγ = −4.19316 (Table 14.36) to Gγ = −16, so crossing in particular the four strong resonances Gγ ± ν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:
-
(i)
a smaller invariant means smaller values of the perturbing \(B_x=\mathcal {G}y\) radial field components in quadrupoles, hence smaller spin kicks;
-
(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).
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).
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;
-
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.
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)
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 Gγ (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)
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 Gγ (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γ = Gγ − Gγn from the resonance, in Question 14.1.1.8.1, or at various resonant frequencies Gγ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 Gγ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.
The exercise is repeated for the different − 10 ≤ Gγ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
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 Gγ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 Gγ is taken at −5.374744660, upstream enough not to feel the resonance at Gγn = −6.
Sample results for Sy(θ) during resonance crossing are given in Fig. 14.13, for various Gγn = n values. The resonance strengths are deduced from the respective values of Pf∕Pi, using (after Eq. 2.44)
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 Gγn = 0 − νy = −4.82 is first considered, Bρ = 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).
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)
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 Gγ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)
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(Gγn) = 0.82. Two additional distances to the resonance, δn = |𝜖n| and δn = 2|𝜖n|, are displayed in Fig. 14.16.
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, Gγ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 Pf∕Pi, using (after Eq. 2.44)
with the resonance crossing speed of \(\alpha =\dfrac {dG\gamma }{d\theta }=2.371\times 10^{-5}\).
The particle invariant is chosen to ensure Pf∕Pi ≈ 0.5, for convenience. For each Gγ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 Gγ 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\)).
The input data file for the case Gγ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.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).
14.2.1.9 Spin Motion Through a Weak Resonance
The systematic intrinsic resonance
is considered, under fast crossing,
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
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
as can been seen from Fig. 14.19 showing a graph of the turn-by-turn Sy(turn) motion across the resonance.
Fitting that spin motion Sy(turn) to the Fresnel integral model (Eq. 2.47)
yields the respective resonant Gγ and normalized resonance strength values (with εy∕π = 1.03 × 10−8 m) of
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 Gγ = −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.
Full depolarization after crossing Gγ = −6 requires a resonance strength (Eq. 14.6 with Pf = 0) of
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 Bρ = Bρn = 4.8139470584 T m (Gγ = −6), namely
The dependence of the final polarization on the field integral BsL can be expressed as (the Froissart-Stora formula)
This dependence is plotted in Fig. 14.20.
The spin rotation angle is maintained constant over the acceleration range, by ramping the SOLENOID field using SCALING (Table 14.44). Its value is
The starting Gγ = −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 Gγ = −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),
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.
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 Bρ ≈ 0.61 ∼ 0.62.
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 δp∕p = 0 which ends up with the expected \(\left < S_y \right > \approx 0\), and one with a rms Gaussian momentum spread of σδp∕p = 10−3 which ends up with \(\left < S_y \right >\) being slightly negative. The results are presented in Fig. 14.23.
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.
Integer resonances are excited by a non-zero vertical orbit. Their strengths are displayed in Fig. 14.25 over − 12 ≤ Gγ ≤−7, as obtained using the thin lens model series (Eq. 2.29). Strong resonances are at Gγ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, Gγn = 7 is the strongest in the acceleration interval of Gγ : −6.5 →−10.5 considered in this exercise. Its theoretical strength (using Eq. 2.29) is \(|{{\epsilon _n^{\mathrm {imp}}}}|=0.0034\).
Acceleration through Gγ : −6.5 →−10.5 produces Sy(turn) displayed in Fig. 14.29 (the case of ϕsnake = 0). The resonances are located at integer Gγ values distant by GΔγ = 1. Thus, in units of energy (using the particle data from Table 14.1),
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 Gγ = 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.
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
and the spin tune
On the Gγ = 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
Question 14.1.1.11-3—An input data file to compute the spin closed orbit for Gγ = 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 − Gγ values over [−6.5, −7.5] (Figs. 14.27 and 14.28).
Question 14.1.1.11-4—Quadrupole misalignments are enabled (ERRORS[ONF=1]), the snake angle is set to ϕsnake = 1.224∘.
Acceleration through Gγ : −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
Upon crossing of the resonance, the ratio of the final and initial polarizations satisfies (the Froissart and Stora formula, Eq. 2.44)
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
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 Gγ : −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 Gγ 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 Gγ = −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 = dp∕p0 = 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 Gγ = −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):
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 Gγ : −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 Gγ = −13.5.
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.
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
Given the tune νZ = 0.82, the acceleration rate and the energy at the start of the tracking, the resonance |Gγ| = 0 + νZ occurs at a turn number
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
A numerical simulation of this resonance crossing yields the result displayed in Fig. 14.31 and confirms the expected Pf ≈ 0.53.
Question 14.1.1.15-2—The new crossing speed, including the effect of the tune jump, is (Eq. 14.2)
With this increased crossing speed, the Froissart-Stora formula yields an expected final polarization of
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.
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.
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\).
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.
Question 14.1.2.2-3—The 4D transverse closed orbit offset (Y T 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.
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
In the second scenario, the polarities of the second dipole and solenoid are reversed resulting in the following rotation sequence
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.
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.
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.
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.
Notes
- 1.
Zgoubi’s plotting and data treatment companion [3].
References
F. Méot, The ray-tracing code Zgoubi. NIM A 767, 112–125 (2014). Zgoubi Users’ Guide: https://sourceforge.net/p/zgoubi/code/HEAD/tree/trunk/guide/Zgoubi.pdf. Zgoubi download package at sourceforge: https://sourceforge.net/p/zgoubi/code/HEAD/tree/trunk/
gnuplot portable command-line driven graphing utility: http://www.gnuplot.info/
Zpop graphic/data treatment interface to zgoubi output files. See Zgoubi Users’ Guide [1], PART D, Sec. 1. Zpoo code package is part of Zgoubi download package at sourceforge https://sourceforge.net/p/zgoubi/code/HEAD/tree/trunk/
S. Tygier, D. Kelliher, PyZgoubi. https://zenodo.org/record/3597426
zgoubidoo python interface to zgoubi. https://ulb-metronu.github.io/zgoubidoo/
Zgoubi on Sirepo by Radiasoft. https://www.sirepo.com/en/apps/particle-accelerators/
H. Grote, F.C. Iselin, The MAD Program, User’s Reference Manual. CERN/SL/90-13 (AP) Rev. 5 (1996)
USPAS Summer 2021 Spin Class, mini-workshop, helion files repository. https://sourceforge.net/p/zgoubi/code/HEAD/tree/trunk/exemples/uspasSpinClass_2021/mini-workshop/AGSBooster_helion/
M. Bai, Overcoming the Intrinsic Spin Resonance in AGS by Using an RF Dipole. PhD thesis, Indiana University (1999). https://www.rhichome.bnl.gov/RHIC/Spin/papers/baithesis.pdf
USPAS Summer 2021 Spin Class, mini-workshop, electron files repository. https://sourceforge.net/p/zgoubi/code/HEAD/tree/trunk/exemples/uspasSpinClass_2021/mini-workshop/AGSBooster_electronPolarization/
B.P. Welford, Note on a method for calculating corrected sums of squares and products. Technometrics 4(3), 419–420 (1962). https://doi.org/10.2307/1266577.JSTOR_1266577. https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online_algorithm; https://stackoverflow.com/questions/42677017/plot-average-of-nth-rows-in-gnuplot
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Appendix
Appendix
A run of Zgoubi code, in addition to zgoubi.res execution listing, and depending on user’s requests, may produce various output files. An example is zgoubi.plt which stores particle coordinates, spin coordinates, electric and magnetic field vectors, etc., step-by-step across optical elements. Another instance is zgoubi.fai which can be used for turn-by-turn particle data storage during multiturn tracking in a circular accelerator. In the present problems, data treatment and graphs can be obtained by reading these files, using gnuplot for instance, or Zgoubi graphic/data treatment interface program Zpop [3]. A brief introduction to these aspects of code and output data handling is given below, and all details can be found in Zgoubi Users’ Guide regarding the many storage files at disposal; besides, guidance is provided in due place in the problem assignments (Sect. 14.1) and their solutions (Sect. 14.2).
-
Data analysis and plotting:
-
in the matter of graphics it is foreseeable to achieve about any type of graphic, from Zgoubi output files, using gnuplot; if data analysis and other averaging are needed it can be managed via gnuplot scripts (using for instance awk commands, external programs, etc.);
-
an additional possibility is to use Zpop, which is part of Zgoubi package. Zpop provides most of the data treatment and graphics means needed to analyze and display the contents of Zgoubi output files.
Besides the run listing zgoubi.res, the main two Zgoubi output files, generally used for data analysis or graphics, are zgoubi.fai (created when introducing the keyword FAISTORE (or FAISCNL, similar), it stores local particle data next to an optical element), and zgoubi.plt recorded if the flag IL=2 is present in optical elements: it logs step-by-step particle and field data, during numerical integration through the element.
Many additional files can be produced (usually by means of a PRINT argument in a keyword, see the Users’ Guide), for instance to log data produced by various optical elements and commands, during ray-tracing, in view of data treatment, plotting, debugging, etc. Instances are SPNPRT[PRINT] (spin data logged in zgoubi.SPNPRT.Out), SRLOSS[PRINT] (synchrotron radiation Monte Carlo data logged in zgoubi.SRLOSS.Out).
-
-
Keywords in Zgoubi: by “keyword” it is meant, the name of the optical elements (such as BEND, MULTIPOL, WIENFILT), or input/output procedures (such as FAISCEAU, FAISTORE, SPNPRT, SRPRNT), or commands (such as REBELOTE, TWISS, FIT, GOTO, SYSTEM), as they appear in a simulation input data file. Keywords are most of the time referred to without any additional explanation in the exercises: details and explanations regarding the use and functioning of keywords are to be found in the Users’ Guide [1].
-
It is recommended, when setting up the input data files to work out the simulations, to have Zgoubi Users’ Guide at hand. PART B of the guide in particular, details the formatting of the input data which follow most keywords, and their units (a few keywords only, for instance FAISCEAU, MARKER, do not require additional data). PART A is the “physics content” and details what keywords are doing and how. The Users’ Guide INDEX is a convenient tool to navigate keywords. A complete list may also be found in the “Glossary of Keywords” Sections, at the beginning of both PART A and PART B, and an overview of what they can be used at is given in “Optical elements versus keywords” Sections.
-
A concise notation KEYWORDS[ARGUMENT1, ARGUMENT2, …] may be used in the assignments: it follows the nomenclature of the Users’ Guide, Part B. A couple of examples:
-
OBJET[KOBJ=1] stands for keyword OBJET, and the value of KOBJ=1 retained here;
-
OPTIONS[CONSTY=ON] stands for keyword OPTIONS, and the option retained here, CONSTY, switched ON.
-
-
The keyword INCLUDE is used at times. The goal is mostly to modularize input data sequences, with usually the benefit of reduced file lengths and improved clarity. In a very similar way to the Latex or Fortran “include” command, a segment of an optical sequence subject to an INCLUDE by a parent input data file, may always be replaced by that very sequence segment, in the parent file.
-
-
(O;X,Y,Z) coordinates in an optical element: this is the coordinate system in which the field E(X, Y, Z) and/or B(X, Y, Z) is defined (the origin for X depends on the optical element). Depending on the optical element concerned, this (O;X,Y,Z) reference frame may be
-
either Cartesian, in which case X, Y, and Z denote the particle position in that frame, T and P the horizontal and vertical trajectory angles (Figs. 1, 2 in the Users’ Guide, and Fig. 14.42 here),
-
or cylindrical, in which case, given m the projection of particle position M in the Z=0 plane (Fig. 14.42), Y denotes the radial coordinate: Y = |Om|, whereas X denotes the polar angle OX-Om (as a matter of fact, the nature of the variables named X and Y in the source code does change, and in zgoubi.plt as well) T is the horizontal trajectory angle with respect to the normal to Om, P is the vertical trajectory angle.
-
Rights and permissions
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
Copyright information
© 2023 This is a U.S. government work and not under copyright protection in the U.S.; foreign copyright protection may apply
About this chapter
Cite this chapter
Hock, K., Méot, F., Morozov, V. (2023). Spin Dynamics Tutorial: Numerical Simulations. In: Méot, F., Huang, H., Ptitsyn, V., Lin, F. (eds) Polarized Beam Dynamics and Instrumentation in Particle Accelerators. Particle Acceleration and Detection. Springer, Cham. https://doi.org/10.1007/978-3-031-16715-7_14
Download citation
DOI: https://doi.org/10.1007/978-3-031-16715-7_14
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-16714-0
Online ISBN: 978-3-031-16715-7
eBook Packages: Physics and AstronomyPhysics and Astronomy (R0)