Preservation of low slice emittance in bunch compressors

Minimizing the dilution of the electron beam emittance is crucial for the performance of accelerators, in particular for free electron laser facilities, where the length of the machine and the efficiency of the lasing process depend on it. Measurements performed at the SwissFEL Injector Test Facility revealed an increase in slice emittance after compressing the bunch even for moderate compression factors. The phenomenon was experimentally studied by characterizing the dependence of the effect on beam and machine parameters relevant for the bunch compression. The reproduction of these measurements in simulation required the use of a 3D beam dynamics model along the bunch compressor that includes coherent synchrotron radiation. Our investigations identified transverse effects, such as coherent synchrotron radiation and transverse space charge as the sources of the observed emittance dilution, excluding other effects, such as chromatic effects on single slices or spurious dispersion. We also present studies, both experimental and simulation based, on the effect of the optics mismatch of the slices on the variation of the slice emittance along the bunch. After a corresponding reoptimization of the beam optics in the test facility we reached slice emittances below 200 nm for the central slices along the longitudinal dimension with a moderate increase up to 300 nm in the head and tail for a compression factor of 7.5 and a bunch charge of 200 pC, equivalent to a final current of 150 A, at about 230 MeV energy.


I. INTRODUCTION
The beam emittance is one of the key parameters for the performance of accelerators such as colliders, light sources and free electron laser (FEL) facilities.In particular in FELs the efficiency of the lasing process strongly depends on the peak current, the energy spread, and the transverse emittance of the electron beam [1].In typical x-ray FEL designs, 1 to 10 ps long bunches are compressed several hundred times down to tens of fs or even fs pulse lengths before entering a series of undulator modules.Such a bunch compression is essential since the peak current required for lasing (on the order of 10 3 A) cannot be provided directly at the source because the beam will be spoiled by collective effects at low energy if the peak current is too high.The compression is typically achieved by introducing a longitudinal energy correlation through off-crest-phase acceleration in one or more accelerating cavities and letting the bunch pass through a dispersive section, i.e., a magnetic chicane (see, e.g., [2]).Since the path length of a particle in a dispersive section is energy dependent this approach allows manipulating the pulse length.Given a particle in a bunch at a longitudinal position s i and with a relative energy spread δ with respect to the reference particle, the final position s f at the exit of the chicane is given by (neglecting radiation effects) where R 56 , T 566 and U 5666 are related to the linear, second and third order longitudinal dispersion, respectively.They depend on the bending angle of the magnetic dipole chicane and the distances between the dipoles.A linear approximation of the compression factor C, defined as the initial bunch length divided by the compressed bunch length, is found to be where A is the slope of the introduced longitudinal correlation (in m −1 if R 56 is in m).Due to the rf curvature and the nonlinear terms of the longitudinal dispersion, a phase-space linearization may be needed.This is typically performed by a cavity installed upstream of the magnetic chicane, running at a higher harmonic frequency of the structures used to induce the energy chirp.The correlation in the longitudinal distribution introduced by these structures is adjusted such that the final phase space distribution is linearized.Alternatively, bunch compression at low energy (relativistic γ smaller than 10) may be achieved via velocity bunching, where the accelerating cavities are run close to the zero-crossing phase and the longitudinal phase space distribution rotates along a drift [3].We do not consider this approach further and focus on magnetic bunch compression exclusively.
In addition to the peak current requirement, the beam has to fulfill the following condition for lasing, to ensure the transverse overlap of photons and electrons [4]: where ϵ n is the normalized emittance, γ is the Lorentz factor, and λ is the wavelength of the coherent radiation generated along the undulator line.This condition indicates that for a fixed target radiation wavelength smaller emittances allow operating the FEL at lower electron energy and, consequently, with a shorter linac.
In linac designs for FELs a distinction is made between projected and slice emittance.The former corresponds to the general beam emittance, i.e., the horizontal (x, x 0 ) or vertical (y, y 0 ) phase-space surface occupied by the entire beam.The latter is similarly defined but the beam particles are sampled from a fraction of the longitudinal bunch length (slice) along the longitudinal position within the beam.This terminology has its origin in the lasing process, where the interaction between the electrons and photons is limited to within the cooperation length [1], which is much shorter than the electron bunch length.
The slice emittance depends on the intrinsic emittance (determined by the material and the surface properties of the photocathode, the gradient of the rf gun, and the wavelength of the laser used to extract the photoelectrons from the cathode), the space-charge forces, the rf field of the gun and the field shape and strength of the first solenoid downstream of the cathode.The projected emittance, i.e., the emittance of the bunch as a whole, also depends on the alignment of the slices with respect to the core and the beam size variation along the bunch.For the following discussion it is useful to define the core emittance as the emittance of the central slice along the longitudinal dimension.
The projected emittance may be degraded by wakefields generated either by the beam interacting with the conducting walls of the accelerating cavities or by changes in the vacuum chamber aperture.The wakefield induced effect on the bunch depends on the geometry of the system and the properties of the beam (bunch size, pulse length, charge and trajectory).Analytical formulas can be found in the literature to calculate these effects [5,6].Other known sources of projected emittance degradation are coherent synchrotron radiation (CSR), and space charge forces.When an electron bunch travels in a curved path it is possible that the coherent radiation generated at the tail reaches and interacts with the head of the bunch, thereby increasing the emittance.In contrast to the wakefield case, the CSR effects are more difficult to treat, because their impact on the dynamics of the beam depends on the interaction between the charges inside the bunch and the coherently emitted radiation.The projected emittance is expected to increase during the compression due to CSR, and several solutions have been adopted in the past to mitigate this effect [7,8].The impact of CSR depends on the optics along the bunch compressor and the bending angle of the dipole magnets in the chicane.The optics along the bunch compressor is designed to have the minimum horizontal beam size at the last dipole to minimize the effect of CSR on the beam [9].Since the CSR effect depends on the bending angle, compression schemes are usually based on a small angle in the chicane, compensated by a large relative energy chirp.The effect of space charge is mitigated by shifting the bunch compressor as far as possible towards high beam energies, given the total length of the machine and the growth of other instabilities such as microbunching [10].
Several measurements of the slice parameters of compressed bunches have been performed at various facilities.The first measurements indicating a slice emittance increase after compression were reported by the FLASH facility in Hamburg [11].All the measurements refer to a nonlinear compression scheme and no detailed investigation has been carried out.At the Linac Coherent Light Source about 25% slice emittance increase was observed after the first bunch compressor [12].This was considered to be an artifact of the slice emittance measurement technique used to slice the beam.A similar method was applied at FERMI@Elettra, the FEL facility in operation in Trieste.At this facility the slice emittance showed a negligible emittance increase with respect to the measurement done using a more standard method to slice the beam (transverse deflecting cavity) [13].One of the main differences among these facilities is the value of the slice emittance before the compression.At FERMI the emittance of the bunch at the photoinjector exit is relatively large (between 1 and 1.5 μm) compared to other FELs [14], because of the large charge emitted at the photocathode, essential for the fresh bunch technique in its cascade High Gain Harmonic Generation operation.
The measurements presented here were performed at the SwissFEL Injector Test Facility (SITF) [15], which operated between 2010 and 2014 as a test bed and demonstration plant for SwissFEL [16], the XFEL facility under construction at the Paul Scherrer Institute (PSI).At the SITF, very low normalized slice emittance values of around 200 nm were obtained routinely for uncompressed beams.When compressing the bunch, however, a significant increase in slice emittance was observed already for moderate compression factors between 5 and 10.The aim of our study presented here is to better understand the observed slice emittance growth.
After a brief description of the machine layout in Sec.II, we will present the SITF measurements and corresponding simulations in Secs.III and IV, respectively.In Sec.V we point out the importance of the mismatch along the bunch before discussing our results and concluding in Sec.VI.

II. SwissFEL AND SwissFEL INJECTOR TEST FACILITY
SwissFEL [16] is an XFEL facility under construction at PSI.Its hard and soft x-ray beam lines will produce short photon pulses with wavelengths ranging from 1 to 7 Å, and from 7 to 70 Å, respectively.The commissioning of the accelerator is foreseen to start in spring 2016 and the first pilot user experiments are expected by the end of 2017.
At SwissFEL electrons emitted from a cesium-telluride photocathode, illuminated by a UV laser, are accelerated up to 150 MeV by two S-band cavities, preceding a laser heater system used to mitigate the microbunching instability [17].The beam is then further accelerated to 330 MeV by S-band cavities, before it is compressed a first time, and further to 2.1 GeV by C-band cavities, before being compressed a second time to reach the short bunch lengths necessary for the lasing process.The most relevant parameters for the two compression stages at SwissFEL, called BC1 and BC2, are listed in Table I for the minimum and maximum bunch charges foreseen.
The SITF layout, schematically shown in Fig. 1, is similar to the first sections of SwissFEL down to the first bunch compressor.The low-energy part upstream of the first accelerating cavity (up to an energy of 7.1 MeV) includes an energy spectrometer, used to set the gradient and the phase of the rf gun, a solenoid to transport the beam and optimize the bunch emittance, and normal and skew corrector quadrupoles to control the transverse beam coupling.An S-band (3 GHz) rf linac accelerates the beam up to an energy of 250 MeV.The first two cavities are run on-crest to accelerate the bunch to 150 MeV (the second cavity is operated slightly off-crest to compensate for the longitudinal phase space deformation due to longitudinal space charge), whereas the last two structures accelerate off-crest to impose the momentum-time correlation on the bunch necessary for the magnetic bunch compression.An X-band (12 GHz) harmonic cavity upstream of the magnetic chicane is used to linearize the longitudinal phasespace distribution to compensate for the rf curvature and nonlinear terms in the compression scheme.A matching section upstream of the bunch compressor chicane is used to match the optics at the entrance of the bunch compressor.The design compression factor is 10, but compression factors up to 15 have been achieved (for higher compression factors the measurements become difficult to interpret due to beam distortions generated by collective effects, such as space charge).The central dipoles of the magnetic chicane are mounted on a movable platform to allow for different bending angles.The diagnostics section includes a transverse deflecting cavity (TDC) [18] and a spectrometer allowing the full characterization of the transverse and longitudinal phase space for both compressed and uncompressed bunches.
Extensive optimizations of the beam emittance for uncompressed bunches performed at the SITF resulted in normalized slice emittances of about 200 nm for 200 pC bunches with 20 A peak current.Further details about these optimizations and the measurement procedures can be found in [19].

III. EXPERIMENTAL STUDIES AT THE SITF
In this section we present our measurements performed at the SITF.Table II summarizes the most important beam and machine parameters relevant for the measurements and the supporting simulations.
All measurements described in this paper were done using the nominal parameters corresponding to the design of the 200 pC bunch charge case optimized for SwissFEL [20].We used a different longitudinal shaping of the laser.We experimentally verified for some cases that this did not have any impact on the measurement of the core emittance, as expected.

A. Measurements procedure
The SITF diagnostics section allows for a wide range of measurements to fully characterize the bunch.In the following we focus on the slice emittance measurement done via the quadrupole scan technique in conjunction with the TDC.We impose a time-dependent vertical kick along the bunch with the TDC and image the streaked bunch on a downstream screen.We use five quadrupoles to scan the phase advance between the TDC and the profile monitor by about 180°in the measurement direction for an optimum emittance reconstruction.At the same time, the phase advance between the TDC and the screen in the streaking direction is kept fixed to about 90°for the best longitudinal resolution.The strengths of the quadrupoles are precalculated, assuming some initial conditions for the Twiss parameters at the reconstruction point, located downstream of the bunch compressor.
For each measurement we compute the mismatch parameter with respect to the design optics, defined as [21] where the 0-subscript identifies the values of the Twiss parameters α, β and γ for the design optics of the projected bunch.M equal to 1 corresponds to a perfect matching of the machine optics to the design Twiss parameters.In general we consider only measurements with M < 1.1 to limit the error in the reconstruction of the emittance to 5% assuming 5% uncertainty on the beam size measurement [22].If this condition is not fulfilled the quadrupoles in the section upstream of the bunch compressor are used to rematch the beam optics to the design.The procedure is iterated until the condition on the mismatch is fulfilled.
The mismatch parameter may also be defined for individual groups of slices.In particular we will make use of the core mismatch, defined by the same relation shown in Eq. ( 4), but where the 0-subscript refers to the optics of the slice at the center of the longitudinal coordinate along the bunch, and α, β and γ are functions of the longitudinal position along the bunch.This mismatch parameter gives an indication on the matching of the different slices along the bunch with respect to the core.In the measurements presented here we divide the beam into ten slices per rms bunch length.The reported errors are statistical only, derived from repetitions of the beam-size measurements.The systematic errors are estimated to be about 5% [19].

B. Characterization of the core emittance increase
Our initial observations of core emittance increase are shown in Fig. 2, along with the current profile of the uncompressed beam.In these measurements, the optics along the bunch compressor, the bending angle of the dipole magnets (4.07°) and the beam energy (200 MeV) are all kept constant, and the compression factor is changed by  a modification of the relative beam energy chirp.A clear increase of the horizontal slice emittance all along the bunch can be observed, already for a relatively modest compression factor of 5.In Fig. 3 we show the core emittance growth as a function of the compression factor.
To further investigate the nature of the emittance growth, we measured the effect as a function of beam energy and dipole bending angle, thereby keeping the compression factor (set to 5) and all beam parameters other than the scan variable constant.The results are shown in Figs. 4 (beam energy) and 5 (dipole angle).The beam energy was varied by changing the gradient of the last two S-band structures, while keeping the gradients of the first two structures constant.When changing the bending angle in the dipoles of the chicane, the energy chirp was adjusted to obtain the same compression factor.While the observed core emittance increases with the compression factor and, for a given compression factor, with the dipole deflection angle, it appears to be independent of the beam energy.
We measured the slice emittance after the compression using beams with different emittances before the compression, intentionally degrading the slice emittance.The outcome of the measurements, shown in Fig. 6, is that for smaller emittances of the uncompressed beam the relative increase of the core emittance is larger.
During the measurements we noticed a very strong dependence of the core emittance growth on the optics along the bunch compressor.For instance, a small modification of the projected Twiss parameters of the incoming beam at the entrance of the bunch compressor, achieved by changing the strength of the second-to-last quadrupole magnet in the matching section by less than 5% around its initial value, resulted in an increase of up to 50% of the core emittance at a compression factor of 8, as shown in Fig. 7.A fine-tuning of the beam optics before and along the bunch compressor allowed us to obtain a slice emittance below 300 nm for a peak current of 150 A along most of the bunch length.In this case the mismatch parameter defined with respect to the core along the bunch length was below 2 along the entire length and below 1.5 for the fraction of the bunch useful with respect to the lasing process (the head and the tail of the bunch typically do not participate in the lasing process).

C. Systematic checks
We performed several systematic control measurements to check the validity of our emittance studies.
To verify that the slice emittance measurements are not limited by the streaking resolution of the TDC, we repeated the same measurement at a compression factor of 5 for different deflecting voltages.The results, reported in Fig. 8, show that above a deflecting voltage of 3 MV, the measured emittances do not depend on the applied voltage, thus demonstrating sufficient resolving power.
The introduction of an energy-time correlation (energy chirping), as needed in the case of magnetic bunch compression, inevitably leads to a slice energy spread that is typically much larger (of the order of 0.1%) than the intrinsic one.This slice energy spread could translate into a slice emittance growth via both dispersive and chromatic effects.By comparing the measured slice emittances obtained after compression with a negative energy chirp and after decompression with a positive energy chirp (i.e., accelerating on opposite sides of the rf crest in the last two structures), we can separate the effects related to the energy chirping from those arising in the actual compression process.Since we do not see a slice emittance increase in the decompressed case (see Fig. 9) we can exclude the slice energy spread introduced by the energy chirping as the origin of the observed core emittance increase.
A horizontal misalignment of the bunch slices with respect to the beam axis may lead to an apparent increase in the observed slice beam sizes and hence the observed slice emittance.Both CSR and transverse wakefields can with respect to the core (bottom) along the bunch for different beam optics settings along the bunch compressor.The compression factor is 8.The inset in the lower plot lists the horizontal α at the entrance of the bunch compressor.These optics are expected to be similar to the ones shown in Fig. 15, but not the same because of some other small adjustments during the optimization.give rise to such a beam tilt.While the SITF bunch compressor has been equipped with both regular and skew quadrupoles to correct for beam tilts [8], the correction was not applied in all measurements to avoid rematching of the beam optics and readjustment of the compression factor.Comparing slice emittance measurements of compressed bunches under the same conditions with and without application of the beam tilt correction we found differences in slice emittance not exceeding 10%-15%, thereby excluding beam tilt as the main source of the observed emittance growth.

IV. SIMULATIONS
In this section we describe our simulations, which aim at reproducing our measurements and identifying the physical mechanism responsible for the observed core emittance increase and its strong dependence on the beam optics along the bunch compressor.After describing the possible codes and the simulation setups we used (Sec.IVA), we report the results of the simulations performed varying different machine and beam parameters (Sec.IV B), analogously to the measurements done at the SITF and reported in Sec.III.

A. Simulation procedures
Several numerical tools are available to simulate linacbased machines with different approaches to model the phenomena taking place at various ranges of bunch energy and charge density.In the low energy section the longitudinal and transverse space charge forces normally dominate the dynamics of the bunch.A frequently used numerical code for this regime is ASTRA [23].It computes the interaction of each macroparticle with the self-induced field generated by the rest of the bunch.When the beam energy is high enough that transverse space-charge forces become negligible, it is appropriate to switch to a faster numerical code, such as ELEGANT [24].This code applies matrix transformations to the initial 6D phase-space input distribution to determine the bunch distribution along the beam line.This code accommodates also deflecting cavities and wakefields, the latter being used to compute the effect of CSR and space charge, albeit only in a 1D longitudinal model.
To simulate the SITF and SwissFEL we typically use ASTRA from the cathode to the exit of the second accelerating structure.At this point we switch to ELEGANT, which we use to track the bunch to the end of the machine (SITF) or up to the beginning of the undulator section (SwissFEL).For the studies presented here, we substituted ELEGANT with CSRTRACK [25] for the simulation of the bunch behavior along the bunch compressor, since this code currently features the most complete description of the compression of the beam.
There are several models which can be used in CSRTRACK: a 1D model, where self-forces are taken into account by approximating the full distribution by a smooth line charge density, and 3D models, where the particles of the bunch are tracked taking into account the interactions between them in all directions.More details about the code can be found in [26].
The first approach is based on the same theory as ELEGANT, so similar results are expected and have indeed been found.In this 1D model a singular space charge term of the form 1=γ 2 ðΔsÞ is subtracted to obtain a finite result [27].
Two 3D models are available: a point-to-point model (csr_p_to_p) and a model in which a pseudo-Green's function (csrG2P) is calculated to determine the field generated by the sub-bunches and the interaction of each macroparticle with this field is computed [28].For the simulations in 3D discussed in the following we used the csr_g_to_p model, which allows obtaining accurate results in a reasonable amount of time tracking the distributions along the 10 m of the SITF bunch compressor.In our simulations we set the grid size to 1 μm in the transverse dimensions x and y, in accordance with the minimum beam size of the order of 100 μm (rms).
In the longitudinal direction we use an adaptive grid size, self-adjusting during the simulation to take into account the change of the bunch length.This parameter is set to 10% of the rms bunch length, unless indicated otherwise.The time grid size and the number of particles were determined from convergence studies.
As input distribution we use the SwissFEL bunch as optimized for the 200 pC operation mode [20], unless otherwise indicated (see Table II for the most relevant parameters).The choice of the optimized SwissFEL bunch as input distribution results in a somewhat smaller initial slice emittance compared to the measured bunches.We also note that the beam energy can vary between different simulation input distributions, since we do not compensate the energy loss due to the different rf off-crest settings when changing the compression factor.We verified a posteriori that energy variations even larger than due to this effect generate a negligible slice emittance growth.

B. Characterization of the core emittance increase
We present the results of numerical simulations using ASTRA, ELEGANT and CSRTRACK in cascade using first the 1D model in CSRTRACK.In Fig. 10 we show the resulting vertical and horizontal slice emittance for the compressed and the uncompressed bunch.The 1D model of the bunch compressor in CSRTRACK does not predict any core emittance growth even for a relatively large compression factor of 15.Since the bunch compression takes place in the horizontal plane and has no impact on the vertical dimension, we may consider the core vertical slice emittance to be equivalent to the horizontal slice emittance of the uncompressed beam in the following discussion.
Repeating the simulation using the CSRTRACK 3D csr_g_to_p model we obtain a core emittance increase already at moderate compression factors, as shown Fig. 11.The core emittance increase is almost uniform along the length of the bunch and grows with increasing compression factor, in a similar way to what was observed experimentally at the SITF (compare with Fig. 3).
The remainder of this section is dedicated to the numerical simulations aimed at characterizing the core emittance growth as a function of beam and machine parameters relevant to compression, analogous to the experimental work shown in Sec.III B. All the following simulation results were obtained using the 3D csr_g_to_p model of CSRTRACK and choosing, in contrast to the measurements, a somewhat higher compression factor of 15 to ensure an emittance growth well above the noise level of the simulations.
To evaluate the effect of varying the beam energy, we change the momentum of the input distribution at the entrance of the bunch compressor.The simulated emittance growth for different beam energies is shown in Fig. 12.Clearly, there is no significant dependence of the emittance growth on the beam energy, in agreement with our measurements (compare to Fig. 4).
The dependence of the emittance growth on the bunch compressor bending angle as simulated by CSRTRACK is shown in Fig. 13, to be compared with the experimental result of Fig. 5.As in the experiment, also in the simulation the compression factor is kept constant by adjusting the energy chirp.The simulation study confirms the experimental finding that the slice emittance becomes larger with increasing bending angle.
In simulation it is easily possible to study the dependence of the emittance growth on the slice emittance of the uncompressed beam.Such a study addresses the question whether the core emittance increase is an additive or a   multiplicative effect.To generate input distributions at the entrance of the bunch compressor with different slice emittances we modify the 2D phase space of the initial distribution by linearly scaling the x and x 0 coordinates of each particle by the same constant.Figure 14 shows the resulting core emittance increase as a function of the initial core emittance, again for a compression factor of 15.
The simulations indicate that the larger the initial slice emittance, the smaller the relative core emittance increase.
For initial emittances above 600 nm the core emittance is preserved under compression in our conditions.The results, in qualitative agreement with the experimental findings shown in Fig. 6, suggest that the compression gives rise to an emittance term that is added in quadrature to the initial emittance.
Our simulation setup can also be used to investigate the strong dependence of the core emittance increase on the beam optics along the bunch compressor, as observed at the SITF (see the last part of Sec.III B).To this end we change the Twiss parameter α x of the input distribution at the entrance of the bunch compressor.In Fig. 15 we show the resulting β x -functions of the projected beam for the different optics cases, along with a schematic layout of the magnetic chicane.The corresponding slice emittances along the bunch are presented in Fig. 16 and are in good agreement with the measurements shown in Fig. 7. Similar to the experimental the core emittance growth in simulation is minimal if α x is increased by 0.4 with respect to the design case.This corresponds to a beam optics for which β x is small in the last dipole magnets, where the bunch is shortened (Fig. 15).
In summary, our simulations using the 3D csr_g_to_p model in CSRTRACK qualitatively reproduce the behavior of the core emittance growth under compression seen in measurements with respect to changes in beam energy, bunch compressor bending angle, and beam optics along the bunch compressor.The simulations also indicate that the relative core emittance growth becomes smaller for larger initial slice emittance.

V. PROJECTED EFFECTS
The measurements presented in Sec.III, which demonstrate the preservation of the slice emittance at a level of 300 nm under compression (see Fig. 7), feature a rather  uniform mismatch along the bunch, accompanied by a uniform growth in slice emittance.Unfortunately, it was not always possible to arrive at such a uniform mismatch: under certain machine conditions, the beam could only be matched to the design optics by resorting to rather large k-values for the quadrupoles in the matching section preceding the bunch compressor (k > 10 m −2 for a quadrupole length of 0.15 m).This is linked to the fact that the SITF matching section, which includes the linearizing rf structure in between, suffered from space limitations, resulting in rather small distances between the quadrupoles.Matching the beam with large k-values in the quadrupoles of the matching section typically resulted in a strong variation of the mismatch parameter between the slices, accompanied by a strong variation of the slice emittance along the longitudinal dimension.An example of such a measurement is given in Fig. 17, where it was possible to preserve the slice emittance to a value below 200 nm for 200 pC bunch charge and 160 A peak current, but only at one end of the bunch.At the other end, the slice emittance increases considerably as a result of the varying mismatch.
In this section we study the impact of the slice mismatch on the slice emittance along the bunch in more detail, by reproducing the effect in simulation (Sec.VA) and discussing the implications for the design of the matching section (Sec.V B).

A. Simulation of the mismatched beam
Tracking the bunch through the matching section with high k-values in the quadrupoles, using the 3D version of CSRTRACK the bunch compressor, we reproduce the observed emittance distribution along the bunch.In Fig. 18 we compare the slice emittance after tracking the bunch with high and low k-values in the matching section.
Similar to the intrinsic energy spread, which is increased during compression, a mismatch along the bunch, either intrinsic to the beam generation or caused by the chromaticity of the matching quadrupoles before the bunch compressor acting on an electron beam with a strong energy chirp, can cause an increase of the slice emittance during compression.This is a geometric effect originating from the overlap of particle distributions from adjacent slices with different orientations in phase space.This effect depends only on a relative slice mismatch with respect to each other, while the mitigation of the CSR kick by a small β-function (and thus the growth in the slice emittance) relates all slices to the optimum lattice Twiss functions through the bunch compressor.To study whether the largest emittance increase comes from a relative mismatch along the bunch or from the deviation from the ideal optics, we artificially apply a mismatch along the bunch.If the former effect has the strongest contribution we would expect a homogeneous emittance growth in all slices, whereas in the other case the growth should be correlated with the mismatch between the slice Twiss function and the optimum lattice function.
To increase the mismatch along the beam of the bunch we transform the initial 2D phase space (x i , x 0 i ) of the input distribution into a final input distribution (x f , x 0 f ) by applying a rotation about an angle that is proportional to the longitudinal coordinate s along the bunch, according to  Here, f is a constant equal to 1 m, and θ is the maximum angle of rotation imposed along the full bunch length L (defined as the distance between the first and the last particle along the longitudinal dimension).The maximum angle is set to θ ¼ 15°to match the observed variation in the mismatch along the bunch.
In the following we refer to the mismatch distribution before applying the phase-space rotation to the "small mismatch" bunch (corresponding to the measurement shown in Fig. 7) and to the distribution after applying the rotation to the "large mismatch" bunch (corresponding to the measurement reported in Fig. 17).The two mismatch distributions are shown in Fig. 19.
If we now track the large-mismatch distribution through the bunch compressor, applying a compression factor of 15, we obtain the slice emittance distribution shown in Fig. 20, thus qualitatively reproducing both the observed behavior (Fig. 17) and the simulated one after tracking through the matching section with high k-values (Fig. 18).
Using the large-mismatch distribution we may also study the effect of the beam optics along the bunch compressor on the slice emittance, in analogy to Fig. 16, where this dependence was investigated for the small mismatch.The resulting slice emittance distributions, presented in Fig. 21, show how a change in the beam optics results in a longitudinal shift of the position of the small region for which the slice emittance is approximately preserved, but cannot recover the slice emittance over a significant fraction of the bunch.

B. Significance of matching optics
Our measurements and simulations indicate that high quadrupole strengths in the matching section preceding the bunch compressor chicane lead to a large slice mismatch along the bunch, which in turn results in a large variation of the slice emittance along the bunch after compression, with only a short part of the bunch for which the slice emittance may be preserved.This can be explained by chromatic effects acting on the bunch, which carries an energy chirp in the matching section.
As a general conclusion for accelerators aiming at low emittance and large compression factors, as is the case for FEL drivers, we make the point that it is essential to keep the design optics of those sections where the beam has an FIG.19.Generated mismatches along the bunch with respect to the central slice of the beam assumed as input distributions in the simulations.The large-mismatch beam (similar to the measurement shown in Fig. 17) is obtained by the rotation of the horizontal transverse phase space of the small-mismatch beam (corresponding to the measurement shown in Fig. 7).energy chirp as smooth as possible to avoid the degradation of the slice emittance along the bunch.

VI. DISCUSSION AND CONCLUSION
The fact that the 3D version of CSRTRACK qualitatively reproduces our measurements is a strong indication that 3D effects, arising in particular from CSR, are responsible for the observed emittance growth in the compression process.Indeed the dependencies of the emittance increase on the chicane bending angle and on the transverse beam size, i.e., the β-function, in the last two dipoles are both consistent with CSR expectations.The strength of the coherent radiation emitted by electrons in a dipole field is smaller for a smaller dipole bending angle [29], consistent with the behavior seen in Fig. 5. Our empirical study on the dependence of the emittance growth on the beam optics in the bunch compressor shown in Fig. 7 is also in agreement with the well-known fact that a beam waist in the last chicane dipole reduces the impact of CSR [9].The agreement of the simulations with the measurements is only qualitative, since we assumed different compression factors in the simulations compared to the ones in the measurements.Since the agreement with the theoretical expectation from CSR effects is of qualitative nature only, we cannot exclude that other transverse effects may also contribute to the observed emittance growth.We can, however, preclude effects purely from longitudinal space charge to play a significant role, based on the absence of any dependence of the effect on the beam momentum.
The risk of emittance degradation from CSR or other transverse effects leads to tight constraints on the horizontal beam size all along the bunch at the location of the last bend of the compression chicane, which in turn puts high demands on the optics matching of the energy-chirped beam before the chicane.Our experience shows that large quadrupole strengths in the matching section before the chicane, where the beam carries an energy chirp, lead to a large mismatch along the bunch such that the optimal conditions to avoid strong transverse effects in the chicane are only fulfilled along a short fraction of the bunch length, whereas all other parts of the bunch suffer a substantial increase in slice emittance.
We conclude that to avoid an emittance growth from transverse effects in the compression process for a significant part of the bunch length, a smooth optics is required that ensures both a small mismatch along the bunch and a horizontal β-function at the location of the chicane's last bending magnet as small as possible within the limits imposed by the lattice.
At the SITF, after careful adjustments to the matching optics before the bunch compressor, we finally measured, for a bunch charge of 200 pC, a compressed beam with a peak current of 150 A (starting from 20 A) featuring a slice emittance well below 300 nm for most of the bunch length useful for the lasing process, see Fig. 7.

FIG. 2 .
FIG. 2. Measured horizontal slice emittance along the bunch for different bunch compression factors C (top plot).The core slice is the one corresponding to the 0 slice number.The streaked beam is imaged on a screen and corresponding current profile (bottom plot).The beam energy is 200 MeV, the dipole bending angle 4.07°.The length of the single slice is scaled by the compression factor to ease the visual comparison of the different measurements.

FIG. 3 .
FIG.3.Measured relative core emittance increase versus the bunch compression factor extracted from the data shown in Fig.2.

28 FIG. 7 .
FIG.7.Measured horizontal slice emittance (top) and mismatch with respect to the core (bottom) along the bunch for different beam optics settings along the bunch compressor.The compression factor is 8.The inset in the lower plot lists the horizontal α at the entrance of the bunch compressor.These optics are expected to be similar to the ones shown in Fig.15, but not the same because of some other small adjustments during the optimization.

FIG. 8 .
FIG.8.Observed horizontal slice emittance along the bunch for different deflecting voltages (V) of the transverse deflecting cavity.The compression factor is fixed to 5 (dipole bending angle 4.07°).Two measurements performed on the uncompressed beam under equal conditions are shown for reference.

FIG. 9 .
FIG.9.Measured horizontal slice emittance for the uncompressed, compressed and decompressed beam.(For this measurement the bunch charge was limited to 70 pC because of a temporary depletion of the photocathode quantum efficiency.)

FIG. 10 .
FIG.10.Simulated horizontal slice emittance along the bunch for a compression factor of 15 obtained by tracking the beam in the bunch compressor using the 1D model of CSRTRACK.The horizontal slice emittance along the bunch before compression and the vertical after compression are also shown for comparison.

15 FIG. 11 .FIG. 12 .
FIG. 11.Simulated horizontal slice emittance along the bunch for two different compression factors using the 3D csr_g_to_p model of CSRTRACK.The horizontal slice emittance along the bunch before compression is also shown for comparison.

FIG. 13 .
FIG.13.Simulated horizontal slice emittance along the bunch for different bending angles of the dipoles in the magnetic chicane (BC angle).The compression factor is fixed to 15.

FIG. 14 . 5 FIG. 15 .
FIG.14.Simulated horizontal core emittance after compression (left axis) versus initial emittance and corresponding relative increase (right axis).The extrapolation of the core emittance after compression for the limit of zero initial emittance is also shown.The compression factor is fixed to 15.

25 α
FIG.16.Simulated horizontal slice emittance along the bunch for different beam optics along the bunch compressor.The compression factor is 15.The inset lists the horizontal α at the entrance of the bunch compressor.

3 FIG. 17 .
FIG.17.Measured horizontal slice emittance (top) and mismatch with respect to the core (bottom) along the bunch.The compression factor is fixed to 8. The measurements with compressed beam are repetitions under the same conditions, performed to assess the reproducibility of the result.

FIG. 18 .
FIG.18.Simulated horizontal slice emittance along the bunch for a compression factor of 15 after matching the bunch with low and high k-values in the matching quadrupoles.The vertical slice emittance of the compressed beam is shown for comparison.

FIG. 20 . 25 FIG. 21 .
FIG.20.Simulated horizontal slice emittance along the bunch for a compression factor of 15 using the large-mismatch bunch as input distribution at the entrance of the magnetic chicane.The vertical slice emittance is also shown for comparison.

TABLE I .
Peak currents at the exit of the first (BC1) and the second (BC2) bunch compressor and compression factors corresponding to the maximum and the minimum bunch charge foreseen at SwissFEL.The peak currents at the entrance of BC1 are 20 and 3 A for the 200 and 10 pC bunch charge cases, respectively.

TABLE II .
Beam parameters at the bunch compressor entrance and compressor settings at the SITF for the measurements and the supporting simulations.The subscripts x and y refer to horizontal and vertical, respectively.