17
Accelerator beam dynamics at the European X-ray Free Electron Laser Igor Zagorodnov and Martin Dohlus Deutsches Elektronen-Synchrotron, Notkestrasse 85, 22603 Hamburg, Germany Sergey Tomin The European X-Ray Free-Electron Laser Facility GmbH, 22869 Schenefeld, Germany (Received 10 October 2018; published 13 February 2019) We consider the collective beam dynamics in the accelerator of the European X-ray Free Electron Laser for electron bunches with charges of 250 and 500 pC. The dynamics has been studied numerically with different computer programs, and we struggle to include properly the whole beam physics with collective effects. Several scenarios of the longitudinal dynamics are considered for the peak currents of 5 and 10 kA. A procedure for the choice of the machine parameters is described, and the tolerances of radio frequency parameters of accelerating modules along the accelerator are calculated. The bunch properties at the end of the accelerator before the undulator line are analyzed. A comparison between measurements and simulations for the beam energy loss due to wakefields is presented. DOI: 10.1103/PhysRevAccelBeams.22.024401 I. INTRODUCTION A free electron laser (FEL) in the x-ray wavelength requires well-conditioned electron bunches with a small emittance, small energy spread, and high peak current. In order to prepare such bunches, the modern FEL facilities include very complicated accelerators based on radio frequency (rf) technology with several stages of beam compression. The choice of the magnetic lattice layout and the rf module specifications are done during the design time. The beam dynamics studies at the design period of the European X-ray Free Electron Laser (XFEL) [1] are published, for example, in Refs. [24]. Now the European XFEL is constructed, and the space of beam dynamics parameters is fixed by technical constraints of installed hardware elements. In this paper, we suggest a procedure for choosing working pointsin the space of parameters of the longitudinal beam dynamics under existing technical con- straints. We show how to map these parameters into rf voltages and phases of the accelerating modules. In our studies, we combine analytical estimations with complex and time-consuming numerical iterative solutions in order to take into account self-consistent beam dynamics with collective effects. Our studies are carried out for the current state of the European XFEL facility. We show with beam dynamics simulations that there are working points which produce the electron bunches with the design parameters at the entrance of the undulator lines and which will provide a high level of self-amplified spontaneous emission (SASE) radiation at hard x-ray wavelengths. In comparison with our earlier publications [24], we use now three-dimensional treating of space charge forces along the whole accelerator. Additionally, we have included all sources of the impedances available as Green functions in the European XFEL database [5]. The working points suggested in this paper provide 30%50% better rf toler- ances as compared to ones suggested earlier in Refs. [3,4]. We start in Sec. II from the layout of the European XFEL and the technical constraints. Then, in Sec. III, the simulations in a rf gun are presented and analyzed. Section IV describes a simple model of longitudinal beam dynamics which is used in Sec. V to calculate rf tolerances of the accelerator modules. A procedure for the choice of working points of the longitudinal beam dynamics is developed in Sec. V as well. This procedure is applied in order to choose the working points for electron bunches with charges of 250 and 500 pC. An iterative algorithm [6] to convert the working point parameters in the rf parameters of the accelerating modules is described in Sec. VI and Appendix A. The code Ocelot [7] used in our studies is described shortly in Appendix B. Section VII describes the results of numerical modeling with an analysis of bunch properties at the end of the accelerator part of the European XFEL. Finally, Sec. VIII compares the obtained results with other simulations and measurements. Published by the American Physical Society under the terms of the Creative Commons Attribution 4.0 International license. Further distribution of this work must maintain attribution to the author(s) and the published articles title, journal citation, and DOI. PHYSICAL REVIEW ACCELERATORS AND BEAMS 22, 024401 (2019) 2469-9888=19=22(2)=024401(17) 024401-1 Published by the American Physical Society

Accelerator beam dynamics at the European X-ray Free ...€¦ · Accelerator beam dynamics at the European X-ray Free Electron Laser Igor Zagorodnov and Martin Dohlus Deutsches Elektronen-Synchrotron,

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

  • Accelerator beam dynamics at the European X-ray Free Electron Laser

    Igor Zagorodnov and Martin DohlusDeutsches Elektronen-Synchrotron, Notkestrasse 85, 22603 Hamburg, Germany

    Sergey TominThe European X-Ray Free-Electron Laser Facility GmbH, 22869 Schenefeld, Germany

    (Received 10 October 2018; published 13 February 2019)

    We consider the collective beam dynamics in the accelerator of the European X-ray Free Electron Laserfor electron bunches with charges of 250 and 500 pC. The dynamics has been studied numerically withdifferent computer programs, and we struggle to include properly the whole beam physics with collectiveeffects. Several scenarios of the longitudinal dynamics are considered for the peak currents of 5 and 10 kA.A procedure for the choice of the machine parameters is described, and the tolerances of radio frequencyparameters of accelerating modules along the accelerator are calculated. The bunch properties at the end ofthe accelerator before the undulator line are analyzed. A comparison between measurements andsimulations for the beam energy loss due to wakefields is presented.

    DOI: 10.1103/PhysRevAccelBeams.22.024401

    I. INTRODUCTION

    A free electron laser (FEL) in the x-ray wavelengthrequires well-conditioned electron bunches with a smallemittance, small energy spread, and high peak current. Inorder to prepare such bunches, the modern FEL facilitiesinclude very complicated accelerators based on radiofrequency (rf) technology with several stages of beamcompression.The choice of the magnetic lattice layout and the rf

    module specifications are done during the design time. Thebeam dynamics studies at the design period of the EuropeanX-ray Free Electron Laser (XFEL) [1] are published, forexample, in Refs. [2–4]. Now the European XFEL isconstructed, and the space of beam dynamics parametersis fixed by technical constraints of installed hardwareelements.In this paper, we suggest a procedure for choosing

    “working points” in the space of parameters of thelongitudinal beam dynamics under existing technical con-straints. We show how to map these parameters into rfvoltages and phases of the accelerating modules. In ourstudies, we combine analytical estimations with complexand time-consuming numerical iterative solutions in orderto take into account self-consistent beam dynamics withcollective effects.

    Our studies are carried out for the current state of theEuropean XFEL facility. We show with beam dynamicssimulations that there are working points which produce theelectron bunches with the design parameters at the entranceof the undulator lines and which will provide a high level ofself-amplified spontaneous emission (SASE) radiation athard x-ray wavelengths.In comparison with our earlier publications [2–4], we use

    now three-dimensional treating of space charge forcesalong the whole accelerator. Additionally, we have includedall sources of the impedances available as Green functionsin the European XFEL database [5]. The working pointssuggested in this paper provide 30%–50% better rf toler-ances as compared to ones suggested earlier in Refs. [3,4].We start in Sec. II from the layout of the European XFEL

    and the technical constraints. Then, in Sec. III, thesimulations in a rf gun are presented and analyzed.Section IV describes a simple model of longitudinal beamdynamics which is used in Sec. V to calculate rf tolerancesof the accelerator modules. A procedure for the choice ofworking points of the longitudinal beam dynamics isdeveloped in Sec. V as well. This procedure is appliedin order to choose the working points for electron buncheswith charges of 250 and 500 pC. An iterative algorithm [6]to convert the working point parameters in the rf parametersof the accelerating modules is described in Sec. VI andAppendix A. The code Ocelot [7] used in our studies isdescribed shortly in Appendix B. Section VII describes theresults of numerical modeling with an analysis of bunchproperties at the end of the accelerator part of the EuropeanXFEL. Finally, Sec. VIII compares the obtained resultswith other simulations and measurements.

    Published by the American Physical Society under the terms ofthe Creative Commons Attribution 4.0 International license.Further distribution of this work must maintain attribution tothe author(s) and the published article’s title, journal citation,and DOI.

    PHYSICAL REVIEW ACCELERATORS AND BEAMS 22, 024401 (2019)

    2469-9888=19=22(2)=024401(17) 024401-1 Published by the American Physical Society

    https://crossmark.crossref.org/dialog/?doi=10.1103/PhysRevAccelBeams.22.024401&domain=pdf&date_stamp=2019-02-13https://doi.org/10.1103/PhysRevAccelBeams.22.024401https://doi.org/10.1103/PhysRevAccelBeams.22.024401https://doi.org/10.1103/PhysRevAccelBeams.22.024401https://doi.org/10.1103/PhysRevAccelBeams.22.024401https://creativecommons.org/licenses/by/4.0/https://creativecommons.org/licenses/by/4.0/

  • II. LAYOUT AND TECHNICAL CONSTRAINTSOF THE MACHINE

    The European XFEL produces hard x rays up to theangstrom wavelength. It consists of a 17.5 GeV linearaccelerator (linac) and several undulator lines for SASEradiation: SASE1, SASE2, and SASE3. The layout of thefacility with the SASE1 branch is shown in Fig. 1. In orderto compress the beam to a high peak current, the EuropeanXFEL electron beam line incorporates three vertical bunchcompressors of C type.In this paper, we are discussing the choice of the machine

    parameters in the linac for 250 and 500 pC bunch charges.The parameters are chosen based on the stability of thecompression and the properties of the electron bunch afterthe compression.The maximal accelerating voltages at different sections

    of the accelerator are listed in Table I. These values aretaken from the current state of rf stations. The ranges forthe compression compaction factors are listed inTable II [8].In our numerical studies, we use the magnetic lattice

    parameters of the European XFEL facility from September2018. The linear optics is shown in Fig. 2. It starts after therf gun at position z ¼ 3.2 m from the gun cathode. Theposition z ¼ 3.2 m corresponds to the beginning ofthe booster rf module with eight Tesla superconductingcavities (see Fig. 1). The optics has a special phase advancebetween the last two bunch compressors in order to reduceeffects due to coherent synchrotron radiation (CSR) kicksat them. It can be seen that the lattice has several additional

    dispersive elements which have to be taken into accountwhen looking for working points with a desired globalcompression. In the current design, the total momentumcompaction factor rinj56 of the laser heater and the injectordogleg is equal to −35 mm. The second-order optics givesthe second-order momentum compaction factor tinj566 ofthese two elements equal to 94 mm. We will use thesevalues in order to correct the momentum compactionfactors of the first compression stage in the simpleanalytical model in Sec. IV.

    III. SIMULATION OF RADIO FREQUENCY GUN

    The electron bunch is produced by a shaped laser pulsein the rf gun. In our previous studies [2–4] of beamdynamics, we had assumed a flattop longitudinal shapeof the laser pulse. In this work, we are using the Gaussianshape which corresponds to the current setup of the laser inthe machine. The parameters used in the gun simulationsfor two charges are listed in Table III.The simulations are done with code Krack3 [9] and

    cross-checked with code ASTRA [10]. Both codes use thesame mathematical model. In our simulations, we use2 × 106 macroparticles, and the results have been cross-checked with simulations which use 2 × 105 macropar-ticles (see Sec. VIII). The slice parameters and thephase space projections at the distance 3.2 m fromthe cathode are shown in Fig. 3 for a bunch charge of500 pC and in Fig. 4 for a bunch charge of 250 pC. Inorder to calculate the slice parameters, we have used 5 ×103 particles per slice. The “emittance” means in thispaper the rms normalized emittance. For example, inthe horizontal plane the projected normalized rms emit-tance is calculated from the total particle distribution bythe formula ϵprojx ¼

    ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffihx2ihp2xi − hxpxi2

    p, where px is the

    particle momentum and hi defines the second centralmoment of the particle distribution.We will use these particle distributions in the particle

    tracking and analysis described in the next sections. Let usnote here that the projected emittance at this distance fromthe cathode is relatively large. The emittance will reduce inthe booster considerably according with the emittancecompensation process [11].

    FIG. 1. Layout of the European XFEL with the SASE1 undulator line.

    TABLE I. Maximal accelerating voltage in rf sections.

    Section name Booster 3rd harmonic L2 L3

    Maximal voltage (MV) 180 40 680 2470

    TABLE II. Range of momentum compaction factors in thebunch compressors.

    Section name BC1 BC2 BC3

    jr56j, mm 30–90 20–80 10–60

    ZAGORODNOV, DOHLUS, and TOMIN PHYS. REV. ACCEL. BEAMS 22, 024401 (2019)

    024401-2

  • IV. ANALYTICAL MODEL OF MULTISTAGEBUNCH COMPRESSION

    In this section, we introduce a one-dimensional model ofmultistage bunch compression in order to formulate inSec. V a simple problem of longitudinal beam dynamicswhich allows an analytical solution: the conversion ofparameters of longitudinal beam dynamics into rf param-eters of accelerating modules. This solution will be usedlater on to build a “preconditioner” [12] in iterative trackingwith full three-dimensional beam dynamics.In order to describe the longitudinal beam dynamics

    inside the bunch during the compression and acceleration,let us introduce several coordinate systems. As a startingpoint, we consider a bunch of electrons after the rf gun atposition z ¼ 3.2 m. The relative coordinate along thebunch will be noted as s. It has an origin at the positionof the reference particle and increases in the direction of thebunch motion: The head of the bunch has a positive value ofs, the tail has a negative one, and the reference particle issomewhere in the middle of the bunch (a mean positionof all electrons). After the rf gun, the reference particlehas energy equal to the slice energy at this position:E00 ¼ E0ð0Þ. Here and in the following, the low index ipresents a reference point along the multistage bunchcompression system (after the rf gun i ¼ 0), and the upper

    index 0 shows that the quantity is taken at the position ofthe reference particle.Let us introduce the relative energy deviation coordinate

    δ0 ¼ ðE − E00Þ=E00. In the longitudinal phase space ðs; δ0Þ,the energy distribution from the gun can be approximatedby a third-order polynomial:

    δ0ðsÞ ¼ δ00ð0Þsþδ000ð0Þ2

    s2 þ δ0000 ð0Þ6

    s3; ð1Þ

    where we use a suggestion that the reference particle afterthe rf gun has a design energy of δ0ð0Þ ¼ 0. Here and in thefollowing, the prime denotes a partial derivative withrespect to the particle position s (inside the bunch afterthe rf gun). The values of the derivatives in Eq. (1) for twobunches in Sec. III are listed in Table IV. They are obtainedfrom the numerical fit to the particle distributions at thebooster entrance, z ¼ 3.2 m from the gun cathode. Thecorresponding curves are shown by dots in Figs. 3 and 4.The reference particle has coordinate “0” at these plots.It can be seen from Figs. 3 and 4 that the reference

    particle position is not only the mean position of allmacroparticles, but it corresponds approximately to theposition of the peak current as well. If these two positionsdiffer considerably, a better choice for the reference particleposition could be the exact position of the peak current.Let us consider the transformation of the longitudinal

    phase space distribution in a multistage bunch compressionand accelerating system shown in Fig. 1. The system hasthree bunch compressors fBC1;BC2;BC3g and severalaccelerating sections fL1; L2; L3g. The injector sectionL1 includes the booster and the third harmonic module.In order to describe the longitudinal beam dynamics, we

    introduce several additional reference points to the alreadydescribed one (after the rf gun). The longitudinal coor-dinate after bunch compressor number i will be denoted as

    FIG. 2. The design optics of the European XFEL from the booster entrance (z ¼ 3.2 m) up to the end of compressor BC3. The bottomplot presents an outline of different elements along the accelerator: rf modules (in green), quadrupoles (in red), etc.

    TABLE III. Injector parameters.

    Subsection Parameter 500 pC 250 pC

    Laser rms length, ps 6.65 6.65rms width, mm 0.31 0.27

    rf cavity Frequency, GHz 1.3 1.3Maximal field on cathode, MV/m 58 58

    Phase, degree 222.4 224.4Solenoid Magnetic field, T 0.223 0.222

    ACCELERATOR BEAM DYNAMICS AT THE … PHYS. REV. ACCEL. BEAMS 22, 024401 (2019)

    024401-3

  • FIG. 4. The properties of the bunch with a charge of 250 pC at distance z ¼ 3.2 m from the cathode of the rf gun. The dotted linecorresponds to Eq. (1) with coefficients from Table IV.

    FIG. 3. The properties of the bunch with a charge of 500 pC at distance z ¼ 3.2 m from the cathode of the rf gun. The dotted linecorresponds to Eq. (1) with coefficients from Table IV.

    ZAGORODNOV, DOHLUS, and TOMIN PHYS. REV. ACCEL. BEAMS 22, 024401 (2019)

    024401-4

  • si, and the energy coordinate at the position immediatelyafter the bunch compressor will be denoted as δi. Thereference particle is always at the origin of the coordinatesystem. Note that throughout the paper the coordinate s(position in the bunch after the rf gun) will be used as anindependent coordinate. All other functions depend on it.For example, the function siðsÞmeans that the particle withthe initial position s (in the bunch after the rf gun) has theposition si after bunch compressor BCi. In the following,we omit the dependence on coordinate s in the notation.A phase space dilution due to rf phase effects occurs,

    because different electrons experience different rf phases asthey pass through the rf modules. Thus, they gain differentamounts of energy. For relativistic electrons interactingwith a sinusoidally time-varying field, the energy gain ofthe electron is proportional to the cosine of the phase anglebetween its position and the position of maximum energygain. Hence, the energy changes in the acceleratingmodules can be approximated as

    ΔE11 ¼ eV11 cosðksþ φ11Þ;ΔE13 ¼ eV13 cosð3ksþ φ13Þ;ΔEi ¼ eVi cosðksþ φiÞ; i ¼ 2; 3; ð2Þ

    where e is the electron charge, φ11 and V11 are a phase andan on-crest voltage of the booster, respectively, φ13 and V13are a phase and an on-crest voltage of the third harmonicmodule, respectively, φi and Vi are a phase and an on-crestvoltage of accelerating section Li, respectively, and k is awave number.The relative energy deviations in the reference points

    after the bunch compressors read

    δ1 ¼ð1þ δ0ÞE00 þ ΔE11 þ ΔE13

    E01− 1;

    δi ¼ð1þ δi−1ÞE0i−1 þ ΔEi

    E0i− 1; i ¼ 2; 3: ð3Þ

    The transformation of the longitudinal coordinate in com-pressor number i can be approximated by the expression

    si ¼ si−1 − ðr56iδi þ t56iδ2i þ u56iδ3i Þ; i ¼ 1; 2; 3: ð4Þ

    Equations (1)–(4) present a simple nonlinear model of amultistage bunch compression system.For the fixed values of rf parameters and momentum

    compaction factors, we define the compression functions ineach bunch compressor:

    Ci ¼1

    Zi; Zi ¼

    ∂si∂s ; i ¼ 1; 2; 3:

    The global compression function C3ðsÞ presents the com-pression after compressor BC3, which is obtained for theparticles in the neighborhood of position s (the position inthe bunch after the rf gun). For example, if we would like toincrease the peak current by a factor of 50 at the position ofthe reference particle, then C3ð0Þ ¼ 50. In other words,function C3ðsÞ describes the increase of the current in theslice with initial position s. Above, we have introducedcomplementary functions fZig which we will call theinverse compression functions and which will be used inthe analysis of rf tolerances in the next section.Finally, we would like to stress that the simple one-

    dimensional model of the longitudinal beam dynamicsdescribed in this section does not include any collectiveeffects. Additionally, it neglects the velocity bunching instraight sections due to the energy chirp in the bunch. Thepeak current of the bunch affects only the choice of thebunch compressor ratios fCig as described in the nextsection.

    V. RF TOLERANCES, SPACE CHARGEDEFOCUSING, AND CHOICE

    OF WORKING POINTS

    The final bunch length and the peak current are sensitiveto the energy chirp and, thus, to the precise values of the rfparameters. Let us calculate a change of the compressiondue to a change of the rf parameters. Unlike otherpublications on rf tolerances, we do not consider thevoltage and the phase tolerances separately. Such one-dimensional treatment is replaced in Ref. [6] by two-dimensional consideration, where the phase and the voltagecan change simultaneously and we estimate the tolerancefrom the worst possible direction of the change.In the following, we are going to consider rf tolerances

    only in the booster. This tolerance is the tightest one (seeTable VI). To simplify the notation, we define new variablesfor rf parameters through the complex number notation:

    X11 þ iY11 ¼ V11eiφ11 ; X13 þ iY13 ¼ V13eiφ13 ;Xi þ iYi ¼ Vieiφi ; i ¼ 2; 3:

    In order to obtain a stable compression, we require thatthe relative change of the global compression C3 at s ¼ 0 issmaller than Θ:

    TABLE IV. The longitudinal phase space bunch parametersafter the rf gun at distance z ¼ 3.2 m from the cathode.Parameter 500 pC 250 pC

    E00, MeV 6.65 6.65δ00, 1=m 1.9 2.1δ000 , 1=m=m −229 −204δ0000 , 1=m=m=m 4170 −4197

    ACCELERATOR BEAM DYNAMICS AT THE … PHYS. REV. ACCEL. BEAMS 22, 024401 (2019)

    024401-5

  • ����C3ðv11Þ − C3ðv011Þ

    C3ðv011Þ���� ≤ Θ;

    where v11 ¼ ðX11; Y11ÞT is a vector of rf parameters and 0stays for the design values. Following Ref. [6], we definethe rf tolerance of the booster as θ11:

    jv11 − v011jV011

    ≤ θ11 ≡ ΘV011C3j∇v11Z3j;

    where the gradient of the global inverse compressionfunction ∇v1;1Z3 ¼ ð∂X11Z3; ∂Y11Z3ÞT can be found throughiterative relations:

    ∂Zi ¼ ∂Zi−1 − r56i∂δ0i − 2t56iδ0i∂δi; i¼ 1;2;3;∂δi ¼ E

    0i−1∂δi−1 þ ∂Xi − kYi∂si−1

    E0i; δ0i ¼

    Zi−1 −Zir56i

    ;

    ∂δ0i ¼ E0i−1∂δ0i−1 − kZi−1∂Yi − k2XiZi−1∂si−1 − kYi∂Zi−1

    E0i;

    ∂si ¼ ∂si−1 − r56i∂δi:Here ∂ means a derivative in X11 or Y11, and Z0 ≡ 1. In thesame manner, we can define voltage and phase tolerancesby the relations

    θV11 ¼Θ

    V011C3j∂VZ3j ; θφ11 ¼

    ΘV011C3j∂φZ3j :

    Such introduced tolerances are related by the simplerelation

    1

    ðθ11Þ2¼ 1ðθV11Þ2

    þ 1ðθφ11Þ2:

    The European XFEL has three bunch compressors, andwe have to define eight rf parameters ðX11; Y11; X13;Y13; X2; Y2; X3; Y3Þ in the machine. In order to definethem, we have to fix 15 independent parameters of thelongitudinal beam dynamics: (i) E00; δ

    00; δ

    000; δ

    0000 —initial con-

    ditions; (ii) r1, r2, r3, E01; E02; E

    03—deflecting radii and

    nominal energies in the bunch compressors; (iii) C1, C2,C3, C03; C

    003—compression factors after each bunch com-

    pressor and the first and the second derivatives of the globalcompression.Instead of deflection radii in bunch compressors, we will

    use in some cases the compaction factors r56i, i ¼ 1, 2, 3.And instead of derivatives of the global compressionfunction, we will use derivatives of the inverse globalcompression function: Z03; Z

    003 . The conversion of these 15

    parameters in the eight rf parameters is described inAppendix A. In the following, we will discuss an optimalchoice of the parameters.

    The initial conditions come from the gun simulations andare listed in Table IV. The energies at the beam compressorsare fixed by design studies and are listed in Table V. Theglobal compression C3 usually comes from requirementson the peak current from FEL simulations. At the designreport of the European XFEL [1], the peak current is fixedto 5 kA.The first and the second derivatives of the global

    compression are special parameters which allow one totune the flatness and the symmetry of the current profile.Initially, we will put them to zero. It means that we wouldlike to have a flat current profile at the vicinity of thereference position s ¼ 0. Hence, at the end we need to findoptimal values only for five parameters: deflecting radii inthe bunch compressors r1, r2, and r3 and compressionratios in the bunch compressors C1 and C2.Let us consider the choice of these parameters for the

    case of a bunch with a charge of 500 pC compressed to thepeak current of 5 kA. In order to choose these parameters,we will do a scan of the parameter space. Let us describethe procedure. In our considerations, we will first define themaximal phases in sections L1 and L2:

    φmax2 ¼ cos−1�E02−E01SVmax2

    �; φmax3 ¼ cos−1

    �E03−E02SVmax3

    �; ð5Þ

    where we use a safety margin S < 1 and Vmax2 and Vmax3 are

    maximal accelerating voltages from Table I in sections L2and L3 correspondingly. In the following, we set parameterS to 0.9 in order to be able to compensate the self-fieldeffects with additional shifts in voltages and phaseslater on.The scan will be done numerically in three dimensions

    ðr561; C1; C2Þ, where under r561 we understand the totalmomentum compaction factor from the gun (z ¼ 3.2 m) tothe end of the compressor BC1: r561 ¼ rinj56 þ rBC156 . HererBC156 is the momentum compaction factor of compressorBC1 alone. We fix arbitrary the momentum compactionfactor r0561. After this, we do a two-dimensional scan of

    TABLE V. The longitudinal dynamics parameters.

    Parameter 500 pC (5 kA) 500 pC (10 kA) 250 pC (5 kA)

    E01, MeV 130r1, m 4.12C1 3E02, MeV 700r2, m 8.39C2 21E03, MeV 2400r3, m 14.80 14.36 14.41C3 192 384 345Z03, 1=m 0Z003 , 1=m=m 1000 1500 700

    ZAGORODNOV, DOHLUS, and TOMIN PHYS. REV. ACCEL. BEAMS 22, 024401 (2019)

    024401-6

  • parameters C1 and C2. For each pair C01; C02, we calculate

    the maximal energy chirp before compressor BC2:

    δ̂02 ¼δ01E

    01 − kZ01Y2E02

    ; δ01 ¼1 − Z01r0561

    ;

    Y2 ¼ SVmax2 sinðφmax2 Þ; Z01 ¼1

    C01:

    The momentum compaction factor in compressor BC2 ischosen as

    r0562 ¼ max�Z01 − Z02

    δ̂02;minðr562Þ

    �; Z02 ¼

    1

    C02; ð6Þ

    where we took into account the technical constraint inTable II. The maximal energy chirp before compressor BC3and the momentum compaction factor in BC3 are found as

    δ̂03 ¼δ02E

    02 − kZ02Y3E03

    ; δ02 ¼Z01 − Z02r0562

    ;

    Y3 ¼ SVmax3 sinðφmax3 Þ;

    r0563 ¼ max�Z02 − Z3

    δ̂03;minðr563Þ

    �; Z3 ¼

    1

    C3: ð7Þ

    For the set of parameters ðC01; C02; r0561; r0562; r0563Þ, wecalculate analytically (as described in Appendix A) eightrf parameters ðX01;1; Y01;1; X01;3; Y01;3; X02; Y02; X03; Y03Þ and usethese rf parameters to calculate the rf tolerance θ1;1 in thebooster. In the following, we always show the tolerances forΘ ¼ 0.1, which means that the total compression deviationis restricted by 10%.

    The two-dimensional plots of the rf tolerance in thebooster are shown in Fig. 5 for two different compactionfactors of compressor BC1: r

    BC156 ¼ −40 mm and rBC156 ¼

    −60 mm. The dotted lines on the plots present the limits ofthe available rf voltage (see Table I). It can be seen that thesmaller absolute value of the compaction factor r561 resultsin larger tolerances, but the area between the dotted linesdue to the technical constraints on the rf voltage is reduced.We will set r561 to −40 mm, as yet smaller absolute valueswill be difficult to optimize in an even smaller area betweenthe dotted lines. The working point is set to C1 ¼ 3 andC2 ¼ 21 as shown by the red dot in the plots. This choice isbased on two arguments. From one side, we would like tohave a relatively high compressed beam already beforecompressor BC3 in order to use a larger deflecting radius inBC3 and to reduce in such a way the CSR effects in it.Simultaneously, we would like to have a low compressionin compressor BC1 to avoid the strong space charge forcesat the relatively low beam energy between compressorsBC1 and BC2.In order to quantify the transverse space charge forces,

    we introduce the normalized space charge parameters:

    kscx ¼I0βxIAγ2ϵx

    ; kscy ¼I0βyIAγ2ϵy

    ; ð8Þ

    where ϵx and ϵy are normalized beam emittances, I0 is thepeak current, IA is the Alfvén current, γ is the Lorentz factorof the reference particle, and βx and βy are the betafunctions of the linear optics (without space charge) shownin Fig. 2. These space charge parameters relate the spacecharge forces to the averaged focusing in the magneticlattice (see [13]). Figure 6 presents the space charge

    FIG. 5. The rf tolerance of the booster θ1;1105 for two different compaction factors in BC1 for the bunch charge of 500 pC compressedto the peak current of 5 kA. The red point shows the working point. The dashed black lines show the limits of the available rf voltage.

    ACCELERATOR BEAM DYNAMICS AT THE … PHYS. REV. ACCEL. BEAMS 22, 024401 (2019)

    024401-7

  • parameters along the first (low-energy) part of the accel-erator. We see that, for the chosen working pointðC1 ¼ 3; C2 ¼ 21Þ, the defocusing due to the space chargeforces is approximately equal to or less than the focusing ofthe quadrupoles.In order to compress the bunch with a charge of 500 pC

    to the higher peak current of 10 kA, we change only thedeflecting radius in the last bunch compressor BC3. Asexpected, the rf tolerance in the booster will be 2 timessmaller, and the defocusing due to the space charge after thelast bunch compressor will be 2 times stronger. The rftolerance for this case is shown in Fig. 7, left. The space

    parameters [Eq. (8)] remain near or below 1 along thewhole accelerator.The working point for a bunch with a charge of 250 pC

    compressed to 5 kA peak current is shown in Fig. 7, right.This booster tolerance plot is quite similar to one on the left.Indeed, it is expected, as the total compression in both casesis approximately the same. The space charge defocusing issimilar to the previous case, too, as the ratio of the peakcurrents to the emittances is approximately the same inboth cases.We summarize the parameters of the longitudinal beam

    dynamics for the three cases in Table V. The last rowcontains the parameters of the second derivative of theinverse global compression function as used in the simu-lations in the following sections.The tolerances of the rf parameters of different accel-

    erator modules for the three working points consideredabove are presented in Table VI. In order to estimate thesetolerances, we have used the analytical solution of the one-dimensional problem (see Appendix A). In comparisonwith our earlier publications [2–4], the suggested in thispaper working points provide 30%–50% better rf toler-ances. It is shown in Ref. [14] that the stability of the rf

    TABLE VI. The rf tolerances for 10% change of the globalcompression.

    V11θV11 θφ11 V13θ

    V13 θ

    φ13 V2θ

    V2 θ

    φ2 V3θ

    V3 θ

    φ3

    MV deg MV deg MV deg MV deg

    500 pC (5 kA) 0.11 0.041 0.17 0.065 1.40 0.060 16 0.31500 pC (10 kA) 0.059 0.020 0.79 0.032 0.76 0.031 7.3 0.15250 pC (5 kA) 0.061 0.023 0.14 0.037 0.84 0.034 8.2 0.17

    FIG. 6. The bunch length and the space charge parameter alongthe accelerator (after the laser heater, z ¼ 30 m, up to a positionin the main linac, z ¼ 500 m) for the bunch charge of 500 pCcompressed to the peak current of 5 kA.

    FIG. 7. The left plot shows the rf tolerance of the booster θ1;1105 for the bunch charge of 500 pC compressed to the peak current of10 kA. The right plot shows the same tolerance for the bunch charge of 250 pC compressed to the peak current of 5 kA. The red pointsshow the working points. The dashed lines show the limits of the available rf voltage.

    ZAGORODNOV, DOHLUS, and TOMIN PHYS. REV. ACCEL. BEAMS 22, 024401 (2019)

    024401-8

  • parameters at the European XFEL is better than thoserequired in Table VI.Before proceeding to the simulations, let us summarize

    the methodology to choose the working point at the three-stage bunch compression system of the European XFEL atthe existing technical constraints. As a first step, theenergies in the bunch compressors E01, E

    02, and E

    03 are

    fixed to the values in Table V. This choice is due to themaximal accelerating voltages available in the facility (seeTable I). The total compression factorC3 is chosen from therequirement to reach the peak current of 5 or 10 kA after thefinal stage of compression in BC3. The first derivative ofthe inverse compression function Z03 is set to zero in orderto have a “symmetric” current profile near to the peakcurrent. We set the phases in sections L2 and L3 near totheir maximal values [see Eq. (5)]. It allows us to producethe maximal energy chirps before bunch compressors BC2and BC3 and, therefore, to use the maximal possibledeflecting radii in them to reduce the strength of theCSR fields generated by the bunches. The deflecting radiusr1 in the first bunch compressor BC1 is fixed to themaximal value allowed by the available voltage in thebooster and the high harmonic module. It is shown in Fig. 5that this choice results in better rf tolerances in the booster.After this, we scan the rf tolerance in the booster fordifferent compression ratios C1 and C2 in the bunchcompressors BC1 and BC2. In the scan, we simultaneouslyset the deflecting radii in BC2 and BC3 to the maximalpossible values [see Eqs. (6) and (7)]. Again, it is done toreduce CSR fields in the bunch compressors. The finalvalues of compression ratiosC1 andC2 are taken near to themaximum rf tolerance of the booster (this tolerance is mostcritical as can be seen from Table VI). The shifts of theworking points (from the area of the maximal rf tolerance)are done in order to avoid strong transverse space chargeforces after BC1 (see Fig. 6) and to have an already highcompression ratio after BC2. Finally, we choose someminimal positive value of the third derivative of the inverseglobal compression function Z003 in order to avoid a strongspike in the current at the bunch head.

    VI. TRACKING WITH COLLECTIVEEFFECTS IN THE ACCELERATOR

    For the fixed initial beam parameters E00, δ00, δ

    000 , and δ

    0000 ,

    the fixed magnetic lattice (including the deflecting radii r1,r2, and r3 in the bunch compressors) and some choice of rfparameters, we can introduce a map of rf parameters intothe remaining eight parameters of the longitudinal beamdynamics:

    AðxÞ ¼ f ;f ¼ ðE01; E02; E03; Z1; Z2; Z3; Z03; Z003Þ;x ¼ ðX11; Y11; X13; Y13; X2; Y2; X3; Y3Þ: ð9Þ

    This map exists in the real machine, but in the following wewill consider only a case when this map is realized by sometracking program. In order to describe the real machine asclosely as possible, the tracking algorithm is quite com-plicated and includes the self-fields self-consistently.For a special case of the simple model in Sec. IV, the

    operator A can be inverted analytically as described inAppendix A. Let us denote this operator as A0 and write thesolution formally:

    x0 ¼ A−10 ðf Þ:

    The rf parameters x0 will not produce the requiredcompression: Aðx0Þ ≠ f . In order to find the solution ofEq. (9), we suggested in Ref. [6] an iterative algorithm,which we write here as

    xn ¼ A−10 ðgnÞ; gn ¼ gn−1 þ λ½ f − Aðxn−1Þ�; n > 0;g0 ¼ f ; x0 ¼ A−10 ð f Þ: ð10Þ

    We introduce in Eq. (10) an additional parameterλ; 0 < λ < 1, as suggested in Ref. [15]. In our simulations,we use mainly λ ¼ 1, as it provides the fastest convergence.Smaller values of λ should be used if a divergence appearsor a smoother convergence is desired.In order to implement the particle tracking Aðxn−1Þ, we

    use the code Ocelot. Because of the usage of the analyticalsolution A−10 , the algorithm converges very fast. Usually,5–10 iterations are sufficient in order to find the rfparameters x which produce the desired compressionscenario f .The physical models and the numerical algorithms of

    Ocelot are described shortly in Appendix B. The numericalmodeling of the accelerator beam dynamics presentedbelow includes all sources of the impedances availableas Green functions in the form of Eq. (B1) in the EuropeanXFEL database [5].

    VII. NUMERICAL MODELING OF COLLECTIVEBEAM DYNAMICS AT THE EUROPEAN

    XFEL ACCELERATOR

    In this section, we present the results of the beamdynamics simulations of the working points introducedin Sec. V.In the first scenario, we compress the bunch charge of

    500 pC to the peak current of 5 kA. The parameters of thelongitudinal beam dynamics are listed in Table V. As wasdiscussed in Ref. [6], the positive values of the secondderivative of the inverse compression function Z003 allow usto reduce the compression in the head and the tail of theelectron bunch in order to avoid strong current spikes. Inorder to avoid a microbunching (which we are not able tomodel properly with the small number of macroparticlesused), the energy spread in the bunch was increased in the

    ACCELERATOR BEAM DYNAMICS AT THE … PHYS. REV. ACCEL. BEAMS 22, 024401 (2019)

    024401-9

  • laser heater, which is installed in the machine before theinjector dogleg (see Fig. 1). The power of the laser ischosen to produce the energy modulation amplitude on axisof 8 keV and to have after the compression the rms sliceenergy spread near to 1 MeV. The rf parameters obtainedwith the iterative algorithm in Sec. Vare listed in Table VII.This table contains three rows. In the first row, the rfparameters obtained analytically are given. These analyticalparameters do not produce the required compression evenwithout self-fields, as the model in Sec. IV does not takeinto account the velocity bunching at low energies. Hence,initially we track the particle distributions in Ocelot withoutany self-fields and use 3–5 iterations to correct the rfparameters. The corrected rf parameters which take intoaccount the velocity bunching are listed in the second rowin Table VII. Finally, we include all self-fields modelsavailable in the code (space charge, CSR, and wakes) and

    use again 3–5 iterations to correct the rf parameters. Thefinal set of rf parameters which should be used in the realmachine is listed in the last row in the table.The results of the simulations with the rf parameters

    found above are presented in Fig. 8. The bunch isaccelerated to the energy of 17.5 GeV in the main linac.We show the bunch shape and the slice parameters at theentrance of the SASE1 undulator line. The bunch has thepeak current of 5 kA with a low slice energy spread(below 1 MeV) and small slice emittances (0.6 μm in thebunch core). The projected transverse emittances arelisted in Fig. 8 as well. The larger projected emittancein the y plane can be explained by the vertical orientationof the bunch compressors: The CSR fields change theenergies and the trajectories of the particles in thedeflection plane.In the second scenario, we compress the same bunch to

    the peak current of 10 kA. The power of the laser is chosento produce the energy modulation amplitude on axis of4 keV. The longitudinal dynamics is very close to theprevious case. Only in the last bunch compressor, we use asmaller deflecting radius r3 and a higher compression rateC3. The rf parameters obtained with the iterative algorithmin Sec. V are listed in Table VIII. The results of thesimulation for the bunch accelerated to the energy of17.5 GeV in the main linac are shown in Fig. 9. Thebunch has the peak current of 10 kAwith approximately the

    TABLE VII. The rf parameters for a charge of 500 pC com-pressed to 5 kA peak current.

    V11 φ11 V13 φ13 V2 φ2 V3 φ3MV deg MV deg MV deg MV deg

    Analytical 155.0 15.49 26.1 179.03 612 21.33 2226 40.2Without self-fields 157.2 17.45 26.6 183.29 611 21.19 2240 40.6With self-fields 148.2−8.23 31.8 136.87 614 21.84 2438 45.8

    FIG. 8. The properties of the bunch with a charge of 500 pC compressed to 5 kA peak current at the SASE1 line undulator entrance.

    ZAGORODNOV, DOHLUS, and TOMIN PHYS. REV. ACCEL. BEAMS 22, 024401 (2019)

    024401-10

  • same horizontal projected and slice emittances as in theprevious case. However, coherent synchrotron radiation inthe last bunch compressor spoils the vertical emittancesconsiderably.Finally, we consider compression of the bunch with a

    charge of 250 pC to the peak current of 5 kA. The power ofthe laser is chosen to produce the energy modulationamplitude on axis of 4 keV and to have after the com-pression the slice energy spread again near to 1 MeV. Thelongitudinal dynamics is very close to the case of a bunchwith a charge of 500 pC compressed to 10 kA peak current.The rf parameters obtained with the iterative algorithm inSec. V are listed in Table IX. The results of the simulationfor the bunch accelerated to the energy of 17.5 GeV in themain linac are shown in Fig. 10. The bunch has the peakcurrent of 5 kAwith a better slice emittance (0.4 μm in thebunch core) compared to both cases with a chargeof 500 pC.

    Figure 11 presents the snapshots of the longitudinalphase space along the accelerator. A considerable energychirp is used in the last compressor BC2. The chirp iscompensated partially by the longitudinal wakefields in thelinac. At the same time, the space charge creates in the mainlinac a chirp of alternative sign at the position of the peakcurrent [see the snapshot in Fig. 11(e)]. The wake in thecollimator section is strong and of a resistive nature(the form of the wake is proportional to the bunch shape).It can be seen in the last snapshot that the profile of thecurrent is imprinted in the longitudinal phase space after thecollimator.

    VIII. COMPARISON WITH OTHERSIMULATIONS AND MEASUREMENTS

    The simulations presented above solve the complicatednonlinear problem of self-consistent dynamics of charged

    FIG. 9. The properties of the bunch with a charge of 500 pC compressed to 10 kA peak current at the SASE1 line undulator entrance.

    TABLE IX. The rf parameters for a charge of 250 pC com-pressed to 5 kA peak current.

    V1;1 φ1;1 V1;3 φ1;3 V2 φ2 V3 φ3MV deg MV deg MV deg MV deg

    Analytical 153.7 13.72 26.1 175.37 612 21.33 2226 40.2With self-fields 149.9 −10.90 33.8 134.69 612 21.44 2364 44.0

    TABLE VIII. The rf parameters for charge 500 pC compressedto 10 kA peak current.

    V11 φ11 V13 φ13 V2 φ2 V3 φ3MV deg MV deg MV deg MV deg

    Analytical 151.5 9.43 26.8 167.12 612 21.33 2226 40.2With self-fields 152.9 −16.95 37.3 127.66 614 21.75 2446 45.9

    ACCELERATOR BEAM DYNAMICS AT THE … PHYS. REV. ACCEL. BEAMS 22, 024401 (2019)

    024401-11

  • particles in self-induced and external electromagneticfields. In our studies, we have used the code Ocelot [7].The physical models of this code are described inAppendix B.We have spent a considerable amount of time in order to

    cross-check Ocelot with other codes. As a first step, we havetested that the beam dynamics without collective effects is

    correct. The first- and second-order optical functions fromOcelot have been compared with those obtained by codesMAD [16] and Elegant [17]. Then we have used thedirect particle tracking in the code CSRtrack [18] to checkthat the chromatic effects are modeled correctly in Ocelot.For example, we have reproduced the results for theEuropean XFEL injector dogleg optics with sextupolesdescribed in Ref. [19].The space charge forces are modeled in Ocelot with the

    help of a three-dimensional Poisson equation in the bunchframe. In order to use the iterative algorithm in Sec. VI, weshould start from a particle distribution at the low energy of6.5 MeV after the rf gun at position z ¼ 3.2 m from thecathode. We have used particle-in-cell code ASTRA [10] tocheck that the space charge forces and the rf focusing [20]in the accelerating modules are correctly modeled inOcelot. The code ASTRA uses the same space charge model(Poisson equation in the bunch frame), but it solves theequations of motion by the Runge-Kutta method. It uses adiscrete representation of the rf field in a cavity. The codeOcelot uses transport matrices to track the particles, and therf field is described analytically. In Fig. 12, we show theprojected horizontal emittance and the horizontal β func-tion βx ¼ hx2iγ=ϵprojx along the booster for a bunch with acharge of 500 pC. Here γ is the normalized energy of thebunch. The blue curves present the results from ASTRA, andthe red curves correspond to Ocelot results. The projected

    FIG. 10. The properties of the bunch with a charge of 250 pC compressed to 5 kA peak current at the SASE1 line undulator entrance.

    FIG. 11. Snapshots of the longitudinal phase space of the bunchwith a charge of 250 pC compressed to 10 kA peak current:(a) after the injector dogleg, (b) after BC1, (c) after BC2, (d) afterBC3, (e) after the main linac, and (f) after the collimator section.

    ZAGORODNOV, DOHLUS, and TOMIN PHYS. REV. ACCEL. BEAMS 22, 024401 (2019)

    024401-12

  • emittance at position z ¼ 14.3 m is equal to 0.85 μm inboth transverse planes. The comparison of slice parametersis shown in Fig. 13. The minor differences between ASTRAand Ocelot results are mainly due to different models of therf fields used in these codes: ASTRA uses a rf field obtainedfrom a numerical simulation of a Tesla cavity by a specialelectromagnetic code; Ocelot uses an analytical descriptionof the rf curvature. These results confirm that we can useOcelot already at the low-energetic part of the injector.The projected and the slice emittances for a charge of

    500 pC have been measured in the European XFEL injector[21,22] and agree with those obtained in the simulationspresented in Figs. 12 and 13.The modeling of dispersive sections with strong

    coherent synchrotron radiation effects has been tested by

    a comparison with the code CSRtrack. We have obtained aperfect agreement with the one-dimensional projectedmodel in both codes [7]. Additionally, we have imple-mented in Ocelot a possibility to model curved trajectorieswith deflections in both transverse planes simultaneously.We need this possibility to model the extraction arc toSASE2, for example (see Fig. 15 and Ref. [23]).The results presented in this paper are checked by

    varying of sampling parameters and by changing thenumber of macroparticles. Figure 14 presents the sliceparameters after the collimation section obtained by twosimulations with different numbers of particles. The resultsfor 2 million macroparticles are shown in red. The resultsfor 200 000 macroparticles are shown in blue. A minordifference seen in the slice energy spread can be explained

    FIG. 12. Comparison of the β function and projected emittance in the booster calculated by ASTRA (in blue) and Ocelot (in red).

    FIG. 13. Comparison of the slice parameters at position z ¼ 14.3 m from the cathode calculated by ASTRA (in blue) and Ocelot (in red).

    ACCELERATOR BEAM DYNAMICS AT THE … PHYS. REV. ACCEL. BEAMS 22, 024401 (2019)

    024401-13

  • by the deviation of a small number of particles available inthe overcompressed branch in the head of the bunch(see Fig. 8).Recently, it was verified [24] that the wakefield model

    used in Ocelot agrees with the experimental data. Theexperiment was done at the European XFEL for a bunchwith a charge of 250 pC accelerated to an energy of 14 GeV.The bunch length was adjusted with help of the phase andthe voltage in section L2. It was measured with a transversedeflecting structure after bunch compressor BC3. Theenergy of the bunch was measured at two positions shownin Fig. 15: after the undulator line SASE1 (the blue arrow)and after the undulator line SASE3 (the red arrow). The

    right plot in Fig. 15 shows the energy loss of the beam ΔEfor different bunch lengths σz. The simulation results areshown by solid lines. The measured data are presented bypoints. The results after SASE1 are shown in blue, and theresults after SASE3 are shown in red. We see reasonableagreement between the measured and the simulated data.Finally, our estimations of the slice emittances agree well

    with the results published earlier in Ref. [4]. The projectedemittances in the simulations of this paper are smaller thanthose obtained in Ref. [4]. It is due to the usage of the newoptics with special phase advances between the bunchcompressors to compensate partially the kicks from CSRfields.

    FIG. 14. Comparison of the slice parameters calculated with 2 × 105 (in blue) and 2 × 106 (in red) macroparticles.

    FIG. 15. Comparison of measurements and simulations. The energy loss was measured at two positions shown by arrows in theleft plot. The right plot shows the energy loss of the beam for different bunch lengths after BC3. The simulation results are shown bysolid lines. The measured data are presented by points. The results after SASE1 are shown in blue, and the results afterSASE3 are shown in red.

    ZAGORODNOV, DOHLUS, and TOMIN PHYS. REV. ACCEL. BEAMS 22, 024401 (2019)

    024401-14

  • IX. SUMMARY

    We have discussed a procedure to choose a workingpoint of the longitudinal beam dynamics at the EuropeanXFEL. Following this procedure, we have considered threeworking points for bunch charges of 250 and 500 pCcompressed to several kiloamperes. Beam dynamics sim-ulations which include collective effects are used to find therf parameters and estimate the bunch parameters beforeSASE undulators. In comparison with our earlier publica-tions [2–4], the working points suggested in this paperprovide 30%–50% better rf tolerances. Additionally, for thefirst time, our simulations include three-dimensional spacecharge forces and wakefields along the whole accelerator.In this paper, we have presented only a few measure-

    ments and comparisons. In our future work, we will try tocarry out a more detailed comparison of the theoreticalsimulations with measurements in the real facility.

    ACKNOWLEDGMENTS

    The authors thank W. Decking and E. Schneidmiller forhelpful discussions.

    APPENDIX A: ANALYTICAL SOLUTION FORTHE THREE-STAGE BUNCH COMPRESSION

    SYSTEM OF THE EUROPEAN XFEL

    The rf parameters in the accelerator of the EuropeanXFEL can be found analytically if we neglect the self-forces and the velocity bunching. The rf parameters in theaccelerating sections L2 and L3 read

    X3 ¼ E03 − E02; Y3 ¼δ02E

    02 − δ03E03kZ2

    ;

    δ02 ¼Z1 − Z2r562

    ; δ03 ¼Z2 − Z3r563

    ;

    X2 ¼ E02 − E01; Y2 ¼α1E01 − δ02E02

    kZ1; α1 ¼

    1 − Z1r561

    :

    The rf parameters in the booster and in the third harmonicmodule can be found as

    X1 ¼F3 þ 9F1k2

    8k2; Y1 ¼ −

    F4 þ 9F2k28k3

    ;

    X13 ¼ −F3 þ F1k2

    8k2; Y13 ¼

    F4 þ F2k224k3

    ;

    F1 ¼ E01 − E00; F2 ¼ E01α1 − δ00E00;F3 ¼ E01α2 − δ000E00; F4 ¼ E01α3 − δ0000 E00;

    where α2 ≡ δ001ð0Þ and α3 ≡ δ0001 ð0Þ are unknown yet deriv-atives of the energy curve after the first bunch compressorBC1. For an arbitrary derivative of the global inverse

    compression function Z03, the parameter α2 ≡ δ001ð0Þ canbe found by the relations

    α2¼y1E01

    ; y1¼Z03− x̃3x̄3

    ; x̃i¼ x̃i−1−r56iỹiE0i

    −2t56iðδ0iÞ2;

    ỹi¼ ỹi−1−k2Z2i−1Xi−kYix̃i−1;x̄i¼ x̄i−1−

    r56iȳiE03

    ; ȳi¼ ȳi−kYix̄i−1; i¼ 2;3;

    x̃1¼−2t561α21E01

    ; ỹ1 ¼ 0; x̄1¼−r561E01

    ; ȳ1¼ 1:

    Finally, for an arbitrary second-order derivative of theglobal inverse compression function Z003 , the last parameterα3 ≡ δ0001 ð0Þ can be found as

    α3 ¼ŷ1E01

    ; ŷ1 ¼Z003 − ˆ̃x3

    x̄3;

    ˆ̃xi ¼ ˆ̃xi−1 −r56i ˆ̃yiE0i

    − 6u56iðδ0iÞ3 − 6t56iδ0iδ00i ;ˆ̃yi ¼ ˆ̃yi−1 þ k3Z3i−1Yi − 3k2Zi−1Z0i−1Xi − kYi ˆ̃xi−1;

    δ00i ¼α2E01ȳi þ ỹi

    E0i; i ¼ 2; 3;

    Z02 ¼ Z01 − r562δ002 − 2t562δ02; Z01 ¼ −r561α2 − 2t561α1;ˆ̃x1 ¼ −6u561ðα1Þ3 − 6t56iα1α2; ˆ̃y1 ¼ 0:

    APPENDIX B: PHYSICAL MODELS ANDNUMERICAL METHODS USED IN OCELOT

    The tracking of particles in Ocelot is done in the samewayas, for example, in Elegant [17]. Quadrupoles, dipoles,sextupoles, rf cavities, and other lattice elements aremodeled by linear and second-order maps. The focusingeffect of rf cavities is taken into account according to theRosenzweig-Serafini model [20].The space charge forces are calculated by solving the

    Poisson equation in the bunch frame. Then the Lorentz-transformed electromagnetic field is applied as a kick in thelaboratory frame. For the solution of the Poisson equation,we use an integral representation of the electrostaticpotential by convolution of the free-space Green’s functionwith the charge distribution. The convolution equation issolved with the help of the fast Fourier transform. The samealgorithm for the solution of the three-dimensional Poissonequation is used, for example, in ASTRA.The CSR module uses a fast projected one-dimensional

    method and follows the approach presented inRefs. [18,25]. The particle tracking uses matrices up tothe second order. The CSR wake is calculated continuouslythrough the beam line of arbitrary flat geometry. Thetransverse self-forces are neglected completely. The

    ACCELERATOR BEAM DYNAMICS AT THE … PHYS. REV. ACCEL. BEAMS 22, 024401 (2019)

    024401-15

  • method calculates the longitudinal self-field of a one-dimensional beam that is obtained by a projection of thereal three-dimensional beam onto a reference trajectory.A smooth one-dimensional charge density is calculated bybinning and filtering, which is crucial for the stability andaccuracy of the simulation, since the instability is sensitiveto high-frequency components in the charge density.The European XFEL contains hundreds of sources of the

    coupled impedances. In order to obtain the wake functionsof different elements, we have used analytical and numeri-cal methods. The wake functions of relativistic chargehave usually singularities and can be described only interms of distributions (generalized functions). An approachto tabulate such functions and use them later to obtain wakepotentials for different bunch shapes was introduced inRefs. [5,26,27].The longitudinal wake function near the reference

    trajectory ra is presented through the second-orderTaylor expansion

    wzðr; sÞ ¼ wzðra; sÞ þ h∇wzðra; sÞ;Δriþ 12h∇2wzðra; sÞΔr;Δri þOðΔr3Þ;

    where we have incorporated in one vector the transversecoordinates of the source and the witness particles,r ¼ ðx0; y0; x; yÞT , Δr ¼ r − ra, and s is a distance betweenthese particles. For arbitrary geometry without any sym-metry, the Hessian matrix ∇2wzðra; sÞ contains eight differ-ent elements:

    ∇2wzðra; sÞ ¼

    0BBB@

    h11 h12 h13 h14h12 −h11 h23 h24h13 h23 h33 h34h14 h24 h34 −h33

    1CCCA;

    where we have taken into account the harmonicity of thewake function in coordinates of the source and the witnessparticles [28]. Hence, in the general case we use 13 one-dimensional functions to represent the longitudinal com-ponent of the wake function for arbitrary offsets of thesource and the witness particles near to the reference axis.For each of these coefficients, we use the representation [5]

    hðsÞ¼w0ðsÞþ1

    CþRcδðsÞþc ∂∂s ½LcδðsÞþw1ðsÞ�; ðB1Þ

    where w0, w1 are nonsingular functions, which can betabulated easily, and constants R, L, and C have themeaning of resistivity, inductance, and capacitance, corre-spondingly. The wake potential for arbitrary bunch shapeλðsÞ can be found by the formula

    WhðsÞ ¼ w0 � λðsÞ þ1

    C

    Zs

    −∞λðs0Þds0 þ RcλðsÞ

    þ c2Lλ0ðsÞ þ cw1ðsÞ � λ0ðsÞ;

    where c is the light velocity in a vacuum, λ0 is a derivativeof charge density λ, and the asterisk means the convolution.

    [1] M. Altarelli et al., The European X-Ray Free-ElectronLaser: Technical design report, DESY Report No. DESY2006-097, 2006.

    [2] I. Zagorodnov, Ultra-short low charge operation at FLASHand the European XFEL, in Proceedings of the 32ndFree Electron Laser Conference, Malmö, Sweden (Max-lab, Sweden, 2010), WEOBI2.

    [3] I. Zagorodnov, Beam dynamics and SASE simulationsfor XFEL, Beam Dynamics Group Meeting, DESY,Hamburg, 2011, http://www.desy.de/fel-beam/data/talks/files/NewResults_SASE.pdf.

    [4] G. Feng et al., Beam dynamics simulations for EuropeanXFEL, DESY Report No. TESLA-FEL 2013-04, 2013.

    [5] O. Zagorodnova and T. Limberg, Impedance budget data-base for European XFEL, in Proceedings of the 23rdParticle Accelerator Conference, Vancouver, Canada,2009 (IEEE, Piscataway, NJ, 2009), TU5RFP060.

    [6] I. Zagorodnov and M. Dohlus, Semianalytical modeling ofmultistage bunch compression with collective effects,Phys. Rev. ST Accel. Beams 14, 014403 (2011).

    [7] S. Tomin et al., OCELOTas a framework for beam dynamicssimulations of X-ray sources, in Proceedings of the 8thInternational Particle Accelerator Conference, IPAC17,Copenhagen, Denmark (JACoW, Geneva, Switzerland,2017), p. 2642, DOI: 10.18429/JACoW-IPAC2017-WE-PAB031.

    [8] W. Decking et al., Bunch compressor chicane specifica-tion, technical note, DESY, 2011 (unpublished).

    [9] M. Dohlus, Krack 3, DESY, 2018, https://www.desy.de/~dohlus/Krack3/.

    [10] K. Floettmann, ASTRA: A space charge tracking algo-rithm, DESY, 2017, http://www.desy.de/~mpyflo/.

    [11] B. E. Carlsten, New photoelectric injector design for theLos Alamos National Laboratory XUV FEL accelerator,Nucl. Instrum. Methods Phys. Res., Sect. A 285, 313(1989).

    [12] https://en.wikipedia.org/wiki/Preconditioner.[13] M. Reiser, Theory and Design of Charged Particle Beams,

    2nd ed. (Wiley-VCH, Berlin, 2008).[14] M. Omet et al., LLRF operation and performance at the

    European XFEL, in Proceedings of the 9th InternationalParticle Accelerator Conference, IPAC18, Vancouver,Canada (JACoW, Geneva, Switzerland, 2018), p. 1934,DOI: 10.18429/JACoW-IPAC2018-WEPAF051.

    [15] B. Beutner, Bunch compression layout and longitudinaloperation modes for the SwissFEL Aramis line, in Pro-ceedings of the 34th International Free Electron LaserConference, FEL12, Nara, Japan (JACoW, Geneva, Swit-zerland, 2012), p. 297.

    ZAGORODNOV, DOHLUS, and TOMIN PHYS. REV. ACCEL. BEAMS 22, 024401 (2019)

    024401-16

    http://www.desy.de/fel-beam/data/talks/files/NewResults_SASE.pdfhttp://www.desy.de/fel-beam/data/talks/files/NewResults_SASE.pdfhttp://www.desy.de/fel-beam/data/talks/files/NewResults_SASE.pdfhttp://www.desy.de/fel-beam/data/talks/files/NewResults_SASE.pdfhttp://www.desy.de/fel-beam/data/talks/files/NewResults_SASE.pdfhttps://doi.org/10.1103/PhysRevSTAB.14.014403https://doi.org/10.18429/JACoW-IPAC2017-WEPAB031https://doi.org/10.18429/JACoW-IPAC2017-WEPAB031https://doi.org/10.18429/JACoW-IPAC2017-WEPAB031https://doi.org/10.18429/JACoW-IPAC2017-WEPAB031https://doi.org/10.18429/JACoW-IPAC2017-WEPAB031https://www.desy.de/%7Edohlus/Krack3/https://www.desy.de/%7Edohlus/Krack3/https://www.desy.de/%7Edohlus/Krack3/https://www.desy.de/%7Edohlus/Krack3/http://www.desy.de/%7Empyflo/http://www.desy.de/%7Empyflo/http://www.desy.de/%7Empyflo/https://doi.org/10.1016/0168-9002(89)90472-5https://doi.org/10.1016/0168-9002(89)90472-5https://en.wikipedia.org/wiki/Preconditionerhttps://en.wikipedia.org/wiki/Preconditionerhttps://en.wikipedia.org/wiki/Preconditionerhttps://doi.org/10.18429/JACoW-IPAC2018-WEPAF051https://doi.org/10.18429/JACoW-IPAC2018-WEPAF051https://doi.org/10.18429/JACoW-IPAC2018-WEPAF051https://doi.org/10.18429/JACoW-IPAC2018-WEPAF051

  • [16] H. Grote and F. C. Iselin, The MAD program (methodicalaccelerator design), CERN Report No. CERN-SL-90-13-AP-rev-3, 1993.

    [17] M. Borland, Users manual for Elegant, APS-ANL,Chicago, IL, 2017.

    [18] M. Dohlus, Two methods for the calculation of CSR fields,Report No. TESLA-FEL-2003-05, DESY, 2003.

    [19] V. Balandin, W. Decking, and N. Golubeva, Large energyacceptance dogleg for the XFEL injector, in Proceedings ofthe 2nd International Particle Accelerator Conference,San Sebastián, Spain (EPS-AG, Spain, 2011), WEPC007.

    [20] J. Rosenzweig and L. Serafini, Transverse particle motionin radio-frequency linear accelerators, Phys. Rev. E 49,1599 (1994).

    [21] M. Scholz and B. Beutner, Electron beam phase spacetomography at the European XFEL injector, in Proceed-ings of 8th International Particle Accelerator Conference,IPAC18, Copenhagen, Denmark (JACoW, Geneva,Switzerland, 2017), p. 126.

    [22] M. Scholz and B. Beutner, Studies of the transverse beamcoupling in the European XFEL injector, in Proceedings of38th International Free Electron Laser Conference,FEL17, Santa Fe, NM, 2017 (JACoW, Geneva, Switzer-land, 2017), p. 263, DOI: 10.18429/JACoW-FEL2017-TUP005.

    [23] M. Dohlus, S. Tomin, and I. Zagorodnov, Beam dynamicsat the European XFEL up to SASE4=5, in Proceedings ofthe Workshop “Shaping the Future of the European XFEL:Options for the SASE4/5 Tunnels,” Schenefeld, Germany,2018, https://indico.desy.de/indico/event/21806/material/slides/2.pdf.

    [24] M. Dohlus, XFEL impedance effects and mitigation, inProceedings of the 9th International Particle AcceleratorConference, Vancouver, Canada, IPAC18 (JACoW,Geneva, Switzerland, 2018), TUXGBF1, http://accelconf.web.cern.ch/AccelConf/ipac2018/talks/tuxgbf1_talk.pdf.

    [25] E. Saldin, E. Schneidmiller, and M. Yurkov, Radiativeinteraction of electrons in a bunch moving in an undulator,Nucl. Instrum. Methods Phys. Res., Sect. A 417, 158(1998).

    [26] M. Dohlus, K. Flottmann, and C. Henning, Fast particletracking with wake fields, arXiv:1201.5270.

    [27] I. Zagorodnov, G. Feng, and T. Limberg, Corrugatedstructure insertion for extending the SASE bandwidth upto 3% at the European XFEL, Nucl. Instrum. MethodsPhys. Res., Sect. A 837, 69 (2016).

    [28] I. Zagorodnov, K. L. F. Bane, and G. Stupakov, Calculationof wakefields in 2D rectangular structures, Phys. Rev. STAccel. Beams 18, 104401 (2015).

    ACCELERATOR BEAM DYNAMICS AT THE … PHYS. REV. ACCEL. BEAMS 22, 024401 (2019)

    024401-17

    https://doi.org/10.1103/PhysRevE.49.1599https://doi.org/10.1103/PhysRevE.49.1599https://doi.org/10.18429/JACoW-FEL2017-TUP005https://doi.org/10.18429/JACoW-FEL2017-TUP005https://doi.org/10.18429/JACoW-FEL2017-TUP005https://doi.org/10.18429/JACoW-FEL2017-TUP005https://doi.org/10.18429/JACoW-FEL2017-TUP005https://indico.desy.de/indico/event/21806/material/slides/2.pdfhttps://indico.desy.de/indico/event/21806/material/slides/2.pdfhttps://indico.desy.de/indico/event/21806/material/slides/2.pdfhttps://indico.desy.de/indico/event/21806/material/slides/2.pdfhttps://indico.desy.de/indico/event/21806/material/slides/2.pdfhttp://accelconf.web.cern.ch/AccelConf/ipac2018/talks/tuxgbf1_talk.pdfhttp://accelconf.web.cern.ch/AccelConf/ipac2018/talks/tuxgbf1_talk.pdfhttp://accelconf.web.cern.ch/AccelConf/ipac2018/talks/tuxgbf1_talk.pdfhttp://accelconf.web.cern.ch/AccelConf/ipac2018/talks/tuxgbf1_talk.pdfhttp://accelconf.web.cern.ch/AccelConf/ipac2018/talks/tuxgbf1_talk.pdfhttps://doi.org/10.1016/S0168-9002(98)00623-8https://doi.org/10.1016/S0168-9002(98)00623-8http://arXiv.org/abs/1201.5270https://doi.org/10.1016/j.nima.2016.09.001https://doi.org/10.1016/j.nima.2016.09.001https://doi.org/10.1103/PhysRevSTAB.18.104401https://doi.org/10.1103/PhysRevSTAB.18.104401