François Méot, Brookhaven National Laboratory C-AD, Upton, NY USA.
The linac-ring electron-ion collider designed at BNL is based on a 20 GeV ERL comprised of a 1.3 GeV linac and two 3.8 km FFA lattice return loops placed along the RHIC heavy ion collider. This document introduces the simulation of the FFA ERL in Zgoubi, including a start-to-end 6-D simulation of the acceleration-deceleration cycle of a polarized electron bunch.
The design of eRHIC linac-ring EIC ERL  is based on a 1.322 GeV linac, and on two FFA loops located alongside RHIC, Fig. 1. The low energy loop recirculates the electron bunches four times on the way up and four times on the way down (, step 1.322 GeV). The second loop is of concern in this document; it recirculates the electron bunches 12 times up and 11 times down,
In the following, §3.11.1 discusses the general properties of the 3.8 km FFA loop. The ERL lattice is described in §3.11.2, A 23-pass acceleration-deceleration cycle of a 6D bunch is then simulated. The present document is an excerpt of two BNL internal reports, in which many details of the methods and the results can be found, as well as detailed references [2, 3].
The structure of the FFA loop is as follows:
- There are 6 arcs and 6 long straight sections, following RHIC 6-periodicity (Fig. 1).
- An arc is comprised of 102 identical QF-drift-BD-drift cells (Fig. 2) wih QF a pure quadrupole and BD a combined function dipole.
- Five of the six long straight sections (LSS) are identical and each comprises a string of 52 FODO cells with all energies sharing a common optical axis, coinciding with the quadrupole axes.
- Ten dispersion suppression sections (DS) between the arcs and the five LSS are each made up of 18 FFA cells which gradually shift each beam from the LSS axis to its FFA orbit in the arc.
- The remaining LSS (RHIC’s IR2 region) is occupied by the 120 m, 42 cavity linac and by the spreader and merger lines at its ends.
- Both start and end points of an arc are at the center of a BD magnet in these simulations, for convenience.
- The 12 spreader lines at their downstream end, as well as the 12 merger lines at their upstream end, are matched to the 12 sets of FFA orbit optical functions at the center of the arc cell BD magnet.
- The spreader at its upstream end and the merger at its downstream end are matched to the optical functions at linac ends.
- Path length adjustments (since path length is energy dependent in the FFA arcs) are taken care of in the spreader and merger sections.
- In addition, some artefacts are introduced regarding 6D positioning of the bunch at the entrance to the various FFA loop sections. These will be discussed at the appropriate points in the article.
The optical properties of the cell are summarized in four of the figures.
- Figures 2 and 3 show respectively the transverse excursion of, and magnetic field along, periodic orbits across the arc cell for the 12 recirculated energies. It can be seen that the field varies in a substantial fashion along the orbit inside a quadrupole at large excursion.
- Figure 4 shows the energy dependence of tunes and chromaticities (in this figure is the spin precession rate, with the electron anomalous gyromagnetic factor).
- Figure 5 shows the optical functions across the cell at the lower and higher energies.
Turn-by-turn tracking is performed here, with neither linac nor any spreader and merger sections. The FFA recirculating loop in this first approach is 6-periodic, and perfect fields and perfect optical alignment are assumed.
Figure 6 shows the twelve orbits along the FFA return loop (actually, a plot of the centroid position of a 5000-particle bunch), for GeV to GeV in steps of 1.322 GeV. The 12 orbits are all aligned on along the six long straight sections, whereas in the six arcs they feature an energy dependent excursion (as seen above in Fig. 2).
An orbit oscillation of mm is visible in the arcs and is also present in the complete ERL simulation (see Fig. 16). This is due to a slight orbit mis-match between LSS and arc across the DS sections. It can be reduced but the main point is what level can be sustained to avoid chromaticity-induced emittance increase .
Figure 7 shows the energy dependence of the synchrotron radiation (SR) induced energy loss and spreading over the 6-period, 3.8 km, FFA loop. These quantities are obtained by a one-turn tracking of a 5000-particle bunch with initial null 6D emittance. The theoretical (“theor.”) average energy loss and energy spread in the figure are obtained using 
with 120 the number of cells (as discussed in §3.11.1) necessary to close a circle given the 8.73 mrad single cell deviation (in the FFA loop, the orbit closure is ensured with 102 cells per arc and 18 cells per DS section), and with , the magnet lengths and , their average curvature radii as obtained from the stepwise ray-tracing.
The spin vector is injected horizontally in the ERL, and precesses around the vertical magnetic field at a rate of (where is the azimuthal angle) in the course of a recirculation round the FFA loop. The 1.322 GeV energy increment ensures a polarization vector parallel to the longitudinal axis at IP6 and IP8. Due to energy spread, spin precession undergoes spreading (“spin diffusion”).
In the following we first assess the effect of SR induced energy spread on spin diffusion, then we assess spin diffusion for a bunch with nominal transverse emittances and momentum spread.
A theoretical approach can be used to check tracking results as follows. The solution of the diffusion equations in constant magnetic field can be written 
where is the distance in the field, , (with the electron Compton wavelength, , the electron rest mass).
Assuming a starting state
which is the case for each energy for instance, in the turn-by-turn tracking, yields
(which we note is consistent with the familiar ), so that
Spin is tracked turn-by-turn in the 6-period ring as above, namely,
with neither linac nor spreader and merger sections.
Tracking results are displayed in Figure 8. The “” curve is that of Fig. 7, for comparison with the spin diffusion angle rms value, . Their ratio takes a quasi-constant value rad/GeV close to the expected 8.23 rad/GeV indicated by Equations (2) and (3)). Note that in this plot appears to differ from an integer multiple of 360 degs (its expected value) by 1-2 degs. This stems from the lack of accuracy of SR energy loss compensation at the linac boost, and is of marginal effect here.
In order to get a sense of orders of magnitude, we conclude this introduction to the FFA loop with an up-down tracking in a model 6-arc ring, comprising 6120 cells, with, at a single location, a simplified linac simulation using a thin-lens 1.322 GeV boost.
A particle bunch is, in a row, accelerated in 11 linac passes (12 recirculation loops) from 6.622 to 21.164 GeV and decelerated in 11 linac passes (10 recirculation loops) back down to 6.622 GeV. The following features are included in the simulation:
After each turn, prior to tackling the next one,
i) SR loss is compensated at the linac by giving a turn-dependent energy kick with computed from Eq. (1);
ii) the bunch is re-centered in position and angle on the theoretical FFA orbit once per turn, next to the boost (according to the orbit dependence on energy).
Two simulations are performed:
i) The first simulation starts with zero 6D emittance (a point object) and produces evolution of the horizontal and longitudinal emittances as displayed in Fig. 9. The vertical emittance remains zero because the photon recoil is not accounted for in the Monte Carlo SR simulation.
Details of phase space portraits at the various energies are postponed to the complete ERL tracking in §3.11.3, as the present phase space portraits differ only slightly from the full ERL simulation results.
ii) The second simulation is carried out with a nominal starting bunch emittance of m normalized in both transverse planes, a random, uniform momentum spread over , and zero bunch length. The evolution of the horizontal and longitudinal emittances are displayed in Figs. 10 and 11 respectively. In this simulation, different numbers of particles have been tried to test the convergence (1k, 5k and 10k), as well as two different integration step sizes in the two quadrupoles (1 cm and 3 cm). The relative effect is small, the difference is essentially a slight translation of the curves.
We conclude with spin tracking in the previous 6-arc FFA ring, made up of 6120 cells, with, at a single location, a linac simulation by a thin-lens 1.322 GeV boost. A 5000-particle bunch is taken from 6.622 to 21.164 GeV in 11 linac passes. The results are displayed in Figure 12. The cumulated effect amounts to degs at the end of the final 21.1 GeV loop (top-left plot). The top-right and bottom plots show that the factor with the dominant influence on the final polarization is the injected bunch energy spread.
This section briefly introduces the handling of the three additional structures needed, namely, the linac, spreader, and merger sections. It concludes with the complete ERL optics, 23 passes.
Transport through the linac cavities uses “Chambers matrices”; the corresponding source code has been copied from the Saclay code BETA  for reliability.
These matrices take the following form:
For both planes (for either or ):
with , , , respectively the incoming and outgoing kinetic energies, the cavity length and the particle phase at the cavity.
If the matrix is used in the simplified form
The code works with determinant 1 matrices, obtained by renormalizing the transport coefficients by the square root of the matrix determinant.
The 12 spreader lines (linac to FFA arc) and 12 merger lines (FFA arc to linac) in the ERL ensure a series of optical functions: orbit positioning, optical matching between linac and FFA loop i.e. beta functions and horizontal dispersion, which is non-zero on the FFA side), path length (as it is energy dependent in the FFA loop) and adjustments.
In the simulations, for simplicity we use the same design for all spreader and merger lines, scaled to the different rigidities. One consequence is that, except for the 21.164 GeV spreader and merger lines, SR effects as well as spin dynamics cannot be evaluated (the bending radii, possible presence of a vertical chicane, and some other aspects, have to be optimized separately (e.g. SR has to be minimized) for each spreader/merger line).
The lattice in the up-down ERL tracking simulations has the following form
Note in particular, compared to the “simplified 6-arc” simulations in §3.11.1 and §3.11.1, the absence of DS sections in IR2 region in this complete ERL layout (actually not fully complete, see below, but close enough that it delivers a qualitative overview of the ERL model to be eventually achieved and the outcomes to be expected).
Some more details regarding the optical structure in this simulation of the complete ERL are as follows:
- An arc is comprised of 102 identical doublet cells (Eq. (8)) with quadrupole optical axes radially shifted by 13.48 mm with respect to one another to ensure 8.73 mrad bending per cell (in keeping with the optical properties described in §3.11.1).
- The five long straight sections (LSS) are made up of a string of 52 such cells with quadrupole axes superimposed instead. These LSS are dispersion free and all energies share a common optical axis (as in Fig. 6), aligned on the quadrupole axes.
- The dispersion suppressors (DS) between the arcs and each of the five LSS are comprised of 18 of these cells and have quadrupole axes shifting gradually from zero at their LSS end to 13.48 mm at their arc end. Six of these DS take the 23 beams (12 recirculations up, 11 down) from their respective FFA optical axes in the arcs onto their common axis in the downstream LSS. The other six DS have the reverse functionality.
- The remaining straight section is occupied by the 120 m, 42 cavity linac and the spreader and merger lines (along RHIC’s IR2 region, see Fig. 1). There are no energy loss or energy spread compensation cavities in the present simulations.
- Both start and end points of an arc are at the center of a BD magnet (Eq. (8)), for convenience.
- The spreader at its downstream end and the merger at its upstream end:
– steer the beam respectively onto and from the (non-zero) FFA orbits,
– are matched to the optical functions at the center of the arc cell BD magnet.
- The spreader at its upstream end and the merger at its downstream end are matched to the optical functions and dispersion at linac ends.
- The beam transport to the IPs at IR6 and IR8 at top energy (21.164 GeV) is not accounted for; instead the 21.164 GeV recirculation is treated like a regular one, simply taking the bunches back to the deceleration phase for energy recovery.
- Path length adjustments (path length is energy dependent in the FFA arcs) are taken care of in the spreader and merger sections.
Perfect optical alignment and perfect fields are assumed everywhere. Moreover, artificial 6D positioning of the bunch is introduced at various locations: this will be addressed in detail in due course. Note also, in the following simulations the entrance point to the linac is the starting point of the optical sequence in Zgoubi, the “Observation point” in Eq. (6).
In this concluding section, the full ERL layout is considered, with optical settings as discussed in §3.11.2:
with FFA as in Eq. (7). As pointed out earlier, some artefacts and limitations are imposed on the modeling of the ERL at this stage of its development, as follows.
Artificial bunch centroid centring is applied along the ERL (using Zgoubi’s “AUTOREF” keyword ), as follows:
- on exit of any of the 12 merger lines (i.e., at the entrance to the linac):
(i) horizontal and vertical bunch centring on zero (a substitute to beam steering onto the linac optical axis);
(ii) bunch centring on the design momentum (this stands for artificial compensation of the SR loss that occurs in the upstream FFA arc and merger line);
(iii) time centring so that at any stage in the acceleration-deceleration cycle bunches will enter the linac centered on the RF crest.
- on exit of any of the 12 spreader lines there is bunch centring on the current FFA orbit (a substitute for beam steering), centring on the design momentum (this stands for artificial compensation of SR loss in the spreader);
- at the entrance to each of the five LSS (i.e., going from arc to straight) there is horizontal and vertical bunch centring on zero (this cancels SR induced orbit in the arcs and induced orbit by the DS section).
Limitations in the model in relation with these artefacts and with other approximations which they entail, include:
- SR is switched off in all spreader and merger lines (and only there) except in the top energy spreader and merger lines at 21.164 GeV. As a consequence, except for the latter, their contributions to SR induced energy losses and related beam and spin dynamics effects are not accounted for;
- The same conditions for spin tracking: switched off in all 6.622 to 19.842 GeV spreader and merger lines (and only there).
Correct behaviour of the tracking is first assessed at the linac ends: one hundred particles evenly distributed on the paraxial invariant with m, (both horizontal and vertical) are launched at the linac entrance with =5.3 GeV, for a 12 linac-pass tracking up to 21.164 GeV. Betatron damping has been inhibited in this case (Chambers matrices as in Eq. (4) are normalized to have unit determinant).
Tracking shows that beam ellipse parameters remain at m, at a few % level at both linac ends, in both planes, all the way from 5.3 to 21.164 GeV, see Fig. 17.
A 5000-particle bunch is tracked here. We show that transverse and longitudinal bunch emittances, as observed at the linac ends, behave in a reasonable manner. The details still require further investigation.
Initial bunch emittances at 5.3 GeV are 23 m transverse, zero longitudinal (both length and zero). Linac damping is ataken into account as is synchrotron radiation. The results are displayed in Figures 18 and 19.
In order to ensure that input data files for the 23 linac passes end-to-end tracking are set up correctly, a preliminary up-down cycle is performed with linac damping off and synchrotron radiation off. A 2000 particle bunch is tracked with initial bunch emittances and longitudinal parameters
Transverse emittances are expected to be preserved, and longitudinal beam size growth is expected to be commensurate with SR-induced growth observed in the case of the 6-arc model, §3.11.1.
Tracking results are displayed in Figs. 20 and 21. In Fig. 20, a particle is represented by an empty box marker. It can be seen that at each energy the 2000 boxes superimpose perfectly - at that scale. Fig. 21 shows phase space details at the end of the acceleration-deceleration cycle, when the energy has returned to 5.3 GeV. This tracking demonstrates the preservation of the orbits and of the transverse emittances, and small longitudinal emittance growth, over a complete GeV cycle.
Note that no symplecticity issue is expected: the tracking distance here is very short compared to routinely hundreds of thousands of turns tracked for proton polarization studies in RHIC, using a similar integration step size and non-linear optics.
An important aspect at this stage is that there has been no optimization regarding bunch transmission. This is beyond the scope of the present work which concerns the setting up of the data and data files for end-to-end simulation studies.
That said, tracking is performed here with synchrotron radiation and with unnormalized Chambers matrices, i.e., betatron damping is accounted for. The results are displayed and commented on in Figs. 22 and 23.
Fig. 22 shows that the bunch undergoes noticeable energy spreading (on the scale of the figure) beyond pass (when the markers no longer superimpose).
Transverse emittance growth observed in Fig. 23 and requires further investigation. A large sine-like distortion of the bunch in longitudinal phase space at the final energy after deceleration (5.3 GeV) can be seen in the bottom plot in Fig. 23. This can be compared with the SR-free case, the bottom plot in Fig. 21.
Fig. 24 shows the evolution of SR energy loss over 23 recirculations from 5.3 to 21.1 GeV and back to 5.3 GeV.
Note that, as mentioned in §3.11.3, bunches always present themselves at the RF crest at the linac entrance.
The polarization state out of these simulation, for a 5000 particle bunch at top energy after acceleration from 5.3 to 21.164 GeV, is displayed in Fig. 25, in both SR off and SR on cases.
 E.C. Aschenauer et al., “eRHIC Design Study, Electron-Ion Collider at BNL”, arXiv:1409.1633, Sept. 2014.
 F. Méot et al., Tracking studies in eRHIC energy-recovery recirculator, eRHIC Note 45, BNL C-AD (July 2015); https://www.bnl.gov/isd/documents/89185.pdf.
 F. Méot et al., eRHIC ERL modeling in Zgoubi, eRHIC Note 49, BNL C-AD
 V. Ptitsyn, Electron Polarization Dynamics in eRHIC, EIC 14 workshop, JLab, 17-21/03/2014, http://appora.fnal.gov/pls/eic14/agenda.full.
 F. Méot, The ray-tracing code Zgoubi - Status, NIM A 767 (2014) 112–125.
 F. Méot, Zgoubi users’ guide, http://www.osti.gov/scitech/biblio/1062013