Electron beam shaping via laser heater temporal shaping

Active longitudinal beam optics can help FEL facilities achieve cutting edge performance by optimizing the beam to: produce multi-color pulses, suppress caustics, or support attosecond lasing. As the next generation of superconducting accelerators comes online, there is a need to find new elements which can both operate at high beam power and which offer multiplexing capabilities at Mhz repetition rate. Laser heater shaping promises to satisfy both criteria by imparting a programmable slice-energy spread on a shot-by-shot basis. We use a simple kinetic analysis to show how control of the slice energy spread translates into control of the bunch current profile, and then we present a collection of start-to-end simulations at LCLS-II in order to illustrate the technique.

Active longitudinal beam optics can help FEL facilities achieve cutting edge performance by optimizing the beam to: produce multi-color pulses, suppress caustics, or support attosecond lasing. As the next generation of superconducting accelerators comes online, there is a need to find new elements which can both operate at high beam power and which offer multiplexing capabilities at Mhz repetition rate. Laser heater shaping promises to satisfy both criteria by imparting a programmable slice-energy spread on a shot-by-shot basis. We use a simple kinetic analysis to show how control of the slice energy spread translates into control of the bunch current profile, and then we present a collection of start-to-end simulations at LCLS-II in order to illustrate the technique.

I. INTRODUCTION
Facility scale electron accelerators regularly produce high current, high-brightness electron bunches by accelerating and compressing the bunch from an RF photoinjector. During bunch compression, collective forces and nonlinear optics passively act on the bunch and unavoidably alter the current profile, such that many applications can benefit by actively re-shaping the intra-bunch current profile. For example, in the context of x-ray free-electron lasers (XFEL), modulation of the current profile can lead to: optimized beam brightness, suppressed horn formation [1,2], two-color operation [3], and attosecond x-ray pulses [4][5][6][7]; while in plasma-wakefield accelerators, shaping of the current profile can lead to maximization of the energy transfer to the witness bunch in high-transformer ratio experiments [8,9].
Existing beam-shaping techniques are often reliant on support from solid-target based collimators [1] and emittance spoilers [10,11]. But as the next generation of high average power accelerators [12,13] come on-line, these must be replaced by new techniques which are compatible with hundreds of kilowatts of electron beam power. Laser heater shaping is an attractive alternative because it provides a highly flexible platform for bunch shaping at MHz repetition rate.
The laser heater is a laser modulator located in the middle of a chicane [14], such that dispersion destroys the microbunching structure and leaves behind a symmetric energy spread. Conventionally, laser heaters are used to suppress the collective instabilities that develop during acceleration and bunch compression (namely the microbunching instability, [14,15]). To accomplish this, the laser duration is much longer than the beam duration such that the heating is applied uniformly along the electron beam. If instead the laser heater intensity profile is modulated as a function of time, then we will create a time-dependent energy spread which can be used to shape the bunch current profile. * dcesar@slac.stanford.edu † marinelli@slac.stanford.edu Such temporal laser shaping was initially proposed to control the temporal properties of XFELs [16] and multicolor generation in a seeded FEL [3]. More recently, a highly periodic laser heater modulation has been used to manipulate the microbunching instability [17]. Laser heater shaping has also been proposed to generate a train of current spikes in order to seed a high-power THz wiggler [18]. Here we generalize these methods to the generation of complex current profiles by an arbitrarily shaped laser heater.
High resolution adaptive temporal shaping of broadband femtosecond laser pulses can be achieved via spectral phase and amplitude shaping or programmable synthesis. For instance, Volume Bragg gratings [19] can be readily used to create single and multiple notches for emittance spoiling or beam slicing, thanks in part to their high diffraction efficiency, high damage threshold, and temperature and optical stability. In the case of more sophisticated or adaptable temporal shapes, spectral amplitude and phase modulators [20,21] can be used, opening the door to machine-learning-based control, albeit at damage-limited low-to-moderate peak and average power levels [22] or with a substantially reduced actuation range after amplification of spectrally shaped pulses . Recent demonstrations in the synthesis of 4D programmable light bullets with adaptable spatio-temporal shapes [23,24] promise to overcome some of these power limitations in the near future.
The article is organized as follows: first we introduce a general theoretical model that describes the evolution of the current profile for an arbitrary laser heater temporal profile going through a single bunch compressor. We then provide a series of numerical case studies in which a temporally shaped laser heater provides useful control of the current profile at an XFEL.

II. ANALYTICAL MODEL
Active manipulation of the beam's slice energy spread is an indirect method for shaping its current profile. It works by modulating the beam's longitudinal phase space, such that, immediately following the laser heater, the current is unperturbed, but after bunch compression Figure 1: Cartoon of laser heater shaping at an FEL facility. A high repetition rate laser can be used to program complicated patterns into the slice energy spread. After bunch compression (BC1) the energy spread is converted to a current modulation.
the energy spread is converted into a current modulation. Even small current modulations can seed further growth downstream via the micro-bunching instability mechanism. To understand the extent to which the laser heater can be used to draw structure into the beam's longitudinal phase space, we start with a simple kinetic analysis describing the compression of a beam with slicedependent energy spread. We then apply the results of this analysis to study a series of applications: the generation of isolated current spikes by a single Gaussian laser heater, a quasi-periodic current profile made by stacking Gaussian pulses, and a highly-periodic current profile made from a laser comb. In order to isolate the effect of the laser heater, we consider a simplified model in which the longitudinal phase space is infinite in s and uncoupled from η = (γ − γ 0 )/γ 0 . The initial current profile has a flat-top current of I 0 . The laser heater intensity is assumed to be uniform in the transverse plane such that the slice-wise energy modulation of the beam will follow an arcsin distribution in the η variable-for more complicated transverse profiles [25,26] one must make suitable adjustments. Then, the phase space distribution of the electron bunch after the laser heater is given by where A(s) describes the slice energy spread of the beam as a function of s. Neglecting slippage and dispersion in the laser heater, A(s) is directly proportional to the square root of the laser power profile: where I l (s) ≈ 2P (s)/πw 2 0 is the on-axis laser intensity, γmc 2 is the electron energy, K is the undulator parameter, L u is the undulator magnetic length, γ 0 is the reference beam energy and JJ is given by: where J n are the Bessel functions of the first kind.
A longitudinally dispersive device, such as a bunch compressor, can be described by applying the following change of coordinates s = s 0 +R 56 η 0 , where a subscript of zero denotes a coordinate before transport. Following Liouville's theorem, the phase-space distribution after the dispersive section is given by: Then the current will be given by computing the marginal distribution in s, It will be convenient to work with the Fourier transform of the current, given by The inner integral is the Fourier transform of an arcsin distribution, which can be formally evaluated as J 0 (kR 56 A(s)), however to proceed analytically it is helpful to expand the exponential in a power series about R 56 = 0. Then we will have a series involving moments of the modulation amplitude: A n (s) = η n f 0 (s, η)dη. For any symmetrical distribution, the odd moments vanish by parity, and for arcsin the remaining sum can be written as: Finally we can invert the Fourier transform term by term in the series.
Equation 2 gives our most intuitive picture of how laser heater shaping works. The n = 0 term gives the unmodified current, and the n = 1 term gives the leading order modulation. The amplitude of the n = 1 term immediately shows us that, to leading order, the bunching is proportional to the laser power (A 2 0 ), rather than the electric field (A 0 ). This reflects the indirect nature of bunch shaping via laser heater: linear contributions are washed out by the symmetry of the energy spread. The remaining first order current profile is shaped like the second derivative of the laser power, such that a local maxima of the energy spread is transformed into a current minima, flanked by two smaller current peaks. Higher order terms sharpen the peaks and saturate the valley (which, after all, cannot go below zero current). Total charge is preserved at each order.
We can generalize Eq.2 to the more realistic case in which the initial distribution has a Gaussian slice energy spread σ η convolved with the arcsin distribution. We also include a linear chirp h which will compress the entire beam by a factor of C = (1 + hR 56 ) −1 . The result is: The chirp gives an overall scaling, while the incoherent energy spread is only important if R 56 σ η is comparable to the length scale of the laser heater modulation. The energy spread becomes increasingly important when compared to higher order terms in the series, especially as we increase R 56 to approach full compression. For a modulation of magnitude A 0 occurring over a characteristic time scale σ t , we can expect that the dispersion required for full compression would be R 56 ≈ cσ t /CA 0 . For these parameters, Eq. 2 suggests the incoherent energy spread will be unimportant if σ η A 0 . However, it is precisely as we approach full compression that the series solution presented here begins to require a large number of terms to reach convergence. This happens because as the phase space folds back on itself and begins to filament, the current spikes stop growing and begin changing shape. Thus the limit σ η A 0 applies only for the first term in the series, and near full compression we must always take σ η into account to determine the shape of the current spike. In many cases, this is actually a useful way to operate the heater, since the overheated, over-compressed electrons can be used to prevent undesired current spikes from forming at the edges of the beam. Nonetheless, the series solution gives a clear picture of how coherent microbunching arises from a time-dependent energy spread, and it shows how the laser heater parameters may be used to control the longitudinal phase space of the bunch.

A. Gaussian
In this section we consider specialization to a single pulse with a Gaussian power profile: In this case, the convolution in Eq. 3 can be easily evaluated. Identifyingσ 2 n = c 2 σ 2 t /nC 2 +R 2 56 σ 2 η , we can write: where the second line has been written such that it evaluates to 1 at s = 0 for all n, and thus the sum of the top line alone gives the current at the t = 0 minimum. In Fig. 2 we evaluate Eq.4 for parameters similar to the LCLS-II CuS line: R 56 = 0.55 mm, C = 5.2, γ 0 = 215 MeV, σ η = 20 keV/γ 0 for a variety of laser heater amplitudes, all with field fwhm 1 ps (i.e. power fwhm 1/ √ 2 ps). We compare the analytical result to simulations in Elegant [27]. At low intensity both relations are linear, while at higher intensity the current modulation begins to saturate and more terms are needed to make Eq. 4 converge. In this example, the model is suitably converged using 20 terms (for I s < 1.4 GW/cm 2 ), and the remaining discrepancy between model and simulation can be attributed to the fact that the elegant lattice includes a realistic beamline with RF curvature and nonlinear optics.

B. Pulse stacking
A quasi-periodic pulse train can be built by stacking consecutive Gaussian laser heater pulses with some time delay ∆t. Lasing with such a current profile will create persistent temporal and spectral features that can be manipulated for use with correlation imaging techniques [28,29]. We build a simple description showing how control of a laser pulse stacker translates to control over the beam bunching factor.
When the separation between pulses is large compared to their extent (∆t cσ t ), we can simply superimpose copies of the current modulation in Eq. 4. This covers most practical arrangements of a pulse stacker, since closely spaced Gaussians will overheat and spoil the entire beam. For an infinite stack of identical Gaussian pulses separated in time by ∆t = 2π/k 0 cσ t we find the bunching factor at frequency mk 0 to be: To order O(A 2 0 ) and for σ η ≈ 0, b m is maximized when the spacing between Gaussian peaks is ∆t = 2πmcσ t / √ 3. For b 1 this roughly corresponds to placing the current maxima in Fig. 2(a) halfway between the successive minima, while the harmonics are maximized by spacing the pulses farther apart. At this maximum |b 1 | ≈ 0.12(R 56 A 0 /σ t ) 2 , and b 1 is the largest of the harmonics.
We can see this behavior in Fig. 3, where we have plotted the bunching factor for a train of Gaussian pulses as a function of spacing. All pulses have σ η = 0, C = 1, and we use R 56 A 0 /σ t << 1 such that Eq. 5 is well represented by n = 1. By comparing Eq. 5 to an exact solution, we can see that at small spacing Eq. 5 overestimates the bunching, because it does not consider the energy spread induced by neighboring pulses. Nonetheless, it is provides a useful way to estimate the bunching factor after the first stage of compression.

C. Pulse train
Higher frequency, more strongly periodic current modulations can be created by the chirped pulse beating technique [30,31]. Such a beam has drawn interest in modelocking schemes, as well as for control of sidebands and other quasi-coherent features [32].
A perfectly sinusoidal power profile is a particularly simple case to analyze. For a spatial wavelength 2π/k 0 : A(s) = A 0 sin(k 0 s) we find, analogous to [18], but for an unmatched laser spot (and arcsin energy distribution), we can derive the exact result: where the bunching factor is given by As expected from Eq. 3, the bunching depends on A 2 0 to lowest order. But we can also see that as kA 0 R 56 is increased, the initial bunching at b 2 will begin to saturate and be replaced by higher order bunching terms.

D. Staged Microbunching Evolution of Current Spikes from Heater Shaping
The proceeding analysis describes how a single bunch compressor translates an energy modulation into a current modulation. But in a realistic beamline, the appearance of a current modulation will begin to drive collective forces and feedback into microbunching gain. Unlike the traditional analysis of microbunching gain, here we have to consider a fully coherent modulation. That is, the filamentation of phase space following compression leads to a complicated time-energy structure which can damp (or enhance) microbunching.
Despite these complications, We can gain some appreciation for the effect of staging by considering the space charge impedance [15]: where K 1 is a modified Bessel function of the first time, Z 0 is the impedance of free space, and r b is the radius of the electron beam. In the limit kr b /γ << 1 we find Z ∝ k such that the energy deviation is proportional to the derivative of the current profile (normalized here to the Alfven current I A = 4π 0 mc 3 /q e ≈ 17kA): For high-frequency modulations, the resulting chirp will dominate the laser heater modulation. Consequently, areas near a local current minima become positively chirped such that they can be compressed by subsequent dispersion; while areas near a local maxima will become negatively chirped such that they can be compressed by anomalous dispersion (e.g. in a dogleg).
The microbunching gain becomes more complicated in cases where the space-charge induced energy spread is comparable to the laser heater induced energy spread. In this case, the fully coherent problem needs to be analyzed. In a real beamline, one also has to consider the role of other collective effects (namely the linac wakefield and coherent synchrotron radiation) in asymmetrically chirping the bunch. In these cases it quickly becomes expedient to pursue a fully numerical, particle-tracking based approach. and 'BSY' for beam switch-yard. The BSY is a sequence of doglegs which are nominally dispersionless, but may be adjusted to have anomalous dispersion. (II) Central energy along the superconducting (purple) and copper (light blue) beamlines, illustrating the vast differences in space charge impedance in the two cases.
Here we present a series of numerical studies at the LCLS-II beamlines, which are represented in a blockdiagram format in Fig. 4(I). LCLS-II has both a superconducting (sc) beamline and a normal conducting (copper, cu) beamline, each of which can be sent to either the soft x-ray undulators (S) or the hard x-ray undulators (H), leading to the four possibilites: scS,scH,cuH,cuS. We specialise to the two soft x-ray configurations, scS and cuS. Both beamlines consist of an injector followed by a laser heater and two bunch compression stages, before the beam switch yard routes the beam to its final destination.
The high-level similarities in beamline layout belie major differences in beam dynamics. These differences are hinted at in Fig. 4(II) where we show the beam energy vs z for the two beamlines. The superconducting linac accelerates at a lower gradient, has an extra 1.5 km of transport, and a 6x larger net compression compared to the copper case. This is partially compensated for by operating at a lower peak current, but the end result is that the superconducting beam experiences larger space charge impedance and larger microbunching gain than the copper beam. Consequently, despite the fact that both beamlines have very similar BC1s, we will use a weaker laser heater modulation on the superconducting line.
We will explore how the laser-heater shapes the beam dynamics in these two cases by studying the output of start-to-end simulations at the locations marked a,b,c,d in Fig. 4. Our simulations are performed in Elegant [27], based on the LCLS-II lattices [33] using beams from dedicated injector simulations. This method has been successfully bench-marked at LCLS [34,35], and includes models for linac wakefields, longitudinal space charge, and coherent synchrotron radiation in addition to stan-dard (nonlinear) optical maps for the static beamline elements.

A. Single spike
An isolated current spike can be used to generate attosecond x-ray pulses by the chirp-taper technique [4]. The current spikes we show here could be used to lase directly, or they could first be used to drive CSR in a wiggler in direct analogy to [4]. In either case, the goal is to create a high contrast, few-femtosecond current spike.
A single Gaussian laser heater, like that from section II A, will create two current spikes after BC1. To turn this into a single, isolated, spike we shift the laser heater such that one of the current spikes forms near the head of the bunch, where the current is lower. The microbunching gain will larger for the trailing spike, which lies next to a cold, fresh beam ready to be modulated by the spacecharge impedance. This allows us to form an isolated few kA spike after the second stage of bunch compression. The spike can be further enhanced by anomalous dispersion in the BSY.
In Fig. 5 we illustrate this process through simulation of the LCLS-II cuS beamline. By using the laser parameters recorded in Table I we introduce a large energy spread, visible in panel (a) as a Gaussian protrusion distinct from the uniform background heating. The modulation strength is made large enough to maximize the current spike which forms after BC1, as shown in panel (b). Between panels (b) and (c) the space charge impedance introduces a local-chirp along the bunch. This chirp is most pronounced, relative the slice energy spread, near the tail of the bunch, and so the second bunch compressor creates a single large spike in panel (c). Between (c) and (d) there is again a long transport with large space charge impedance, leading to a strongly chirped bunch which is further compressed by the anomalous dispersion of the BSY. At the entrance of the soft x-ray undulator we can get a high-current (>10 kA) and short (∼1.5 fs) spike in the beam.
Next we can consider a similar approach applied to the LCLS-II scS line ( Fig. 6 and Table II). Here we use a wider laser heater pulse, which creates a much smaller modulation after BC1 (panel b) than we saw in the cuS beamline. This is appropriate because the sc beamline has lower energy and larger space-charge impedance between BC1 and BC2. As a result, this small modulation is enough to create an isolated current spike near the tail of the bunch after the large compression factor in the BC2 chicane (c). This beam can still be successfully transported through the bypass line and the BSY to the SXR undulators.

B. Pulse stacking
Here we consider creating a quasi-periodic bunch train by stacking four Gaussian pulses on top of the regular LH  Table I.  pulse, as described in section II B. Such a pulse stacking arrangement can be created, for example, by sending a single Gaussian laser pulse of (power) FWHM 0.47 ps into a double interferometer that replicates the original Gaussian laser pulse into four copies. We can then tune the relative strength of each pulse with a polarizer and a waveplate, as well as the separation between the pulses by changing a time delay. This flexibility turns out to be necessary in order to compensate long-range wakefield effects and balance the compression of the resulting current spikes. In Figure 7 we show a simulation of this bunch stacker at the LCLS-II cuS beamline. Each of the 4 Gaussian pulses creates two current maxima, but in-between pulses these maxima are made to overlap such that the fundamental bunching is maximized. Thus we end up with 6 current spikes, where the first and last spike are roughly   half-strength. In order to get all spikes at full compression, we make the first two pulses 20% weaker than the last two (see table III). Additionally we note that the current spikes shown in panel (d) are located after a selfseeding chicane, such that the current spikes only become fully compressed half-way through the undulator line. This allows the spikes to be used in a self-seeding scheme and thus to create a set of discrete spectral sidebands for use in correlation spectroscopy [28].

C. Pulse train
Here we consider creating a high frequency, periodic current modulation using an intensity modulated pulse on top of the regular LH pulse, as described in section II C. The intensity modulation can be generated using the chirp pulse beating technique, [30,31]. Here a single temporally stretched Gaussian laser pulse with a linear  Table III.  chirp is duplicated in an interferometer. Introducing a variable time delay to one pulse and overlapping both temporally produces a constant frequency difference proportional to the time delay and chirp, resulting in the desired intensity modulation.
In Figure 8, we show a simulation of this current modulation at the LCLS-II scS beamline. The simulated 50 µm intensity modulation assumes a laser pulse with 10 nm fourier limited bandwidth, stretched to 20 ps with a 19.85 ps delay between split pulses, Figure 8(a). Additional simulation parameters are shown in table III. Here the peak energy spread introduced in the laser heater is equal to the nominal heating for suppressing the microbunching instability in nominal LCLS-II operations. This energy modulation is small compared to the previous cases and will not generate significant density modulation until after BC2, producing an approximately sinusoidal current modulation with a compressed period of 1.2 µm, Figure 8(b). As the beam traverses L3, this density modulation leads to a sinusoidal energy modulation   Table IV: Laser heater shaping parameters to generate a highly periodic bunch train at the LCLS-II scS beamline. See Fig. 8.
driven by longitudinal space charge (LSC). This energy modulation can be controlled by adjusting the BC2 compression factor and/or increasing the base line LH pulse. Furthermore, in order to produce an approximately uniform, periodic modulation across the beam, we consider the use of octupoles to reduce non-linear compression as was proposed in [36]. In order to reduce LSC energy modulation in the long bypass line, anomalous dispersion is introduced by the dogleg located immediately downstream of L3. Here the total R 56 can be tuned to minimize the current modulation by adjusting compensating chicanes at the dogleg entrance and exit, Figure 8(c). Finally, this energy modulation is converted to density modulation by the selfseeding chicane located in the middle of the SXR line, Figure 8(d). This allows the spikes to be used in selfseeding schemes as described in the previous section.

IV. HORN SUPPRESSION
During compression of a long electron bunch, nonlinear optics generate caustics, typically in the form of two current spikes at the head and tail of the bunch [37]. These current spikes, colloquially known as "horns", can induce CSR kicks to the beam and significantly increase its projected transverse emittance [38].
In the LCLS, these horns limit the efficiency of standard SASE FEL lasing. To mitigate this effect, the LCLS employs collimators in a dispersive region of the first bunch compressor to remove the parts of the electron beam affected by this third order chirp [1]. This approach is not suitable for high average power machines such as the LCLS-II superconducting linac or the European XFEL, where the high beam power would damage the collimators. Consequently, one must pursue new approaches, such as using compensatory nonlinear optics [36].
On the other hand, advanced short pulse FEL experimental setups utilize these current horns to modulate the electron beam [4,39]. Thus it is desirable to have a horn suppression mechanism which can operate with Mhz flexibility in order to interleave beams with and without horns for downstream distribution to separate users. This can be accomplished by programmaticlly switching a shaped laser heater pulse into the beamline.
A shaped laser heater can suppress the horns by heating the edges of the bunch and decreasing the phase space density that will be mapped to the caustic. At the same time, the core of the bunch should not be over-heated, which implies that the heater pulse should be shaped concave upwards, like a parabola. The new energy spread will, in-turn, create its own current spikes: from Eq. 2 we can predict that a parabolic laser heater will generate a parabolic current perturbation: ∂ 2 s (s 2 ) 2 = 12s 2 . Design of an effective horn suppression requires balancing these two effects.
We illustrate the trade-off in Fig. 9 for a simple case in which the caustic is created by a cubic chirp and suppressed by a parabolic laser heater: η f = η i + αt 3 /τ 3 + f 0 (A 0 (t/τ ) 2 ). We also include a small incoherent energy spread (0.1%) to speed numerical convergence. The cubic chirp increases from left to right, while the same three laser heater amplitudes are used in each plot. The amplitudes are chosen so that α = A 0 for one curve in each plot (green, light blue, dark blue for the left, middle, and right columns respectively). When the laser heater is turned off (green curves) the caustic leads to large, narrow current spikes with lots of high frequency content. The laser heater effectively suppresses these horns and replaces them with a new perturbation. As expected from Eq. 2, the laser heater induced modulation is parabolic on-axis, while off-axis the current gradually falls to zero (recall Eq. 2 applied to a current profile that was infinite in extent, while here we should include the current profile as ∂ 2 s I(s)A(s)) 2 ). Compared to the caustic, the laser heater modulation has lower peak-current and reduced high frequency con- tent. But the parabolic profile makes for a gradual transition between the cold and hot parts of the beam, and the suppression would make a better time-filter if we used a steeper laser heater profile (such as as step function). However, a steeper laser heater profile would also create a steeper current perturbation. Beyond this qualitative reasoning, it will be necessary to use full numerical simulations. In fact, in practical cases the current modulations from either the caustic or the laser heater are small after BC1, but can still influence the nonlinear chirp going into BC2.

A. Simulations
As we did for the current spike generation, we will use elegant [27] to model the beam dynamics associated with horn suppression at the LCLS-II cuS and scS beamlines. In place of a perfectly parabolic laser heater we use a more practical arrangement of two Gaussian heater pulses. We also include a direct comparison to the case with the Gaussian heater pulses, in order to emphasize the difference between the caustics and heater-induced current modulation. Figure 10 shows simulations of the LCLS Cu beamline for a 250 pC bunch charge compressed to 3 kA. Horns formed within the second bunch compressor increase the projected horizontal emittance from 0.50 µm to 1.38 µm, and a subsequent CSR kick from the LCLS second dog leg leads to a final emittance of 2.78 µm at the undulator line. Applying two Gaussian laser pulses each of duration 1 ps and delayed by 4 ps, heats the head by 190 keV and the tail by 220 keV, dispersing the charge which would have otherwise formed the horns in the bunch compressor. This mitigates some of the CSR kick-induced emittance growth while producing a similar peak current. The resulting projected emittance after the second bunch compressor and undulator entrance is a more modest 0.70 µm.  Table V  The LCLS-II superconducting linac is positioned 2 km upstream of the copper linac, but shares the same FEL beamlines with the copper linac, necessitating the long transport line shown in Fig. 4(II). Current horns formed in the bunch compressor of the superconducting linac can induce strong wakefields along this long transport line, increasing the energy spread of the electron beam and degrading FEL lasing performance.
Simulations of the LCLS-II scS beamline are shown in Fig. 11 using the baseline scenario of a 100 pC beam formed by a temporally flat-top cathode laser. Increasing the baseline compression from 800 A to 2 kA results in high current horns and significant energy variation along the beam. Heating the head and tail of the beam with 1.1 ps pulses spaced 7 ps apart results in a beam of similar duration (50 fs FWHM) and current but with 50% less energy variation. Furthermore, several additional horizontal and vertical bends are needed to transport the superconducting beam to the soft x-ray FEL line, each of which can spoil the emittance via CSR. The horizontal and vertical projected emittances at the undulator line are reduced from 2.68 µm and 0.66 µm without laser heater shaping to 1.87 µm and 0.50 µm with.  Table V.

V. CONCLUSIONS
In this article we have explored the versatility of laser heater shaping as a technique to manipulate the beam current. Our findings demonstrate that a time dependent laser heater profile is capable of shaping the bunch current to best suit a variety of operational modes. Thanks to the flexibility in tailoring the repetition rate and macropulse structure, we forsee the ability interleave multiple operational modes for multiple beamlines fed by the same linac at high repetition rate. For example, in a high repeition rate XFEL operating multiple undulators simultaneously, one could apply different shaping modes to the bunches going to each beamline.
We have used simple analysis followed by start-to-end simulations to give a broad understanding of the capabilities of this technology. The simple kinetic analysis we present is of interest for giving physical intuition to the process by which laser heater shaping acts on the beam. It shows that, for small modulations, the modulation amplitude scales linearly with the laser power and has a shape given by the second derivative of the power profile. For larger modulations, the current valleys begin to saturate and the peaks steepen. The simplified model we use is helpful for optimizing simulations and will be instructive when building online controls to help integrate laser heater shaping into an operational context.
Our start-to-end simulations illustrate how laserheater shaping could be used to optimize the beam at LCLS-II. Each case study we discuss optimizes the beam for a unique purpose: to create current spikes for attosecond lasing, to make a bunch train, and finally to suppress caustics and reduce CSR induced emittance growth. Furthermore, we have shown that these techniques can work across a variety of accelerator beamlines at the LCLS-II facility, indicating the robustness of the technique. Our results provide a basis for understanding the wide scope of laser-heater shaping, and thus pave the way for XFEL facilities to simultaneously optimize performance for distribution to multiple users.