Soft x-ray self-seeding simulation methods and their application for the Linac Coherent Light Source

Self-seeding is a promising approach to significantly narrow the self-amplified spontaneous emission bandwidth of X-ray free-electron lasers (FELs) and hence to produce nearly transform-limited pulses. We study the radiation propagation through a grating monochromator installed at the Linac Coherent Light Source (LCLS). The monochromator design is based on a toroidal VLS grating working at a fixed incidence angle mounting without an entrance slit. It covers the spectral range from 500 eV to 1000 eV. The optical system was studied using a wave optics method to evaluate the performance of the self-seeding scheme. Our wave optics analysis takes into account the finite size of the coherent source, third-order aberrations and height error of the optical elements. Two propagation approaches are studied with time-dependent FEL simulations. In addition, the pulse-front tilt phenomenon effect is illustrated.

In general, a self-seeding setup consists of two undulators separated by a photon monochromator and an electron bypass, normally a four-dipole chicane (see Fig. 1). Both undulators are resonant at the same radiation wavelength. The SASE radiation generated by the first undulator (SASE undulator) passes through the narrow-band monochromator. A monochromatic pulse is created, which is used as a coherent seed in the second undulator (seeded undulator). Chromatic dispersion effects in the bypass chicane smear out the microbunching in the electron bunch produced by SASE lasing in the SASE undulator. The electrons and the monochromatized photon beam are recombined at the entrance of the seeded undulator, and the radiation is amplified by the electron bunch until saturation is reached. The required seed power at the beginning of the seeded undulator must dominate over the shot noise power within the gain bandpass, which is at the order of hundreds of Watts to one kilowatt in the soft X-ray range.

II. THE LCLS SOFT X-RAY SELF-SEEDING SETUP LAYOUT
The overall self-seeding setup consists of three parts: the SASE undulator, the self-seeding grating monochromator and the output seeded undulator in which the monochromatic seed signal is being amplified (Fig. 2).
FIG. 1. The compact soft x-ray self-seeding system, located in U9. The grating is a toroidal VLS grating, M1 is a rotating plane mirror, M2 a tangential cylindrical mirror, and M3 a plane mirror used to steer the beam [14].
The LCLS SXRSS monochromator was introduced in [14], and consists of a toroidal variable-line-spacing (VLS) grating, a steering plane mirror, a slit, a spherical mirror and another plane mirror (Fig. 1).
The toroidal VLS grating is illuminated by a SASE free elecron laser (FEL) radiation produced in the SASE undulator with the source position inside undulator sections U7 or U8 (depending on the photon energy). The transverse coherence of a SASE FEL allows one to avoid installation of an entrance slit. The plane mirror M1 is used to steer a certain wavelength of an angularly dispersed radiation to the slit. The spherical mirror M2 reimages the radiation from the slit position to the reimaging point at the entrance of the seeded undulator. The plane mirror M3 reflects the radiation to the seeded undulator, allowing two additional degrees of freedom for an overlap of the electron beam and the monochromatic radiation.

III. OPTICS MODELING
Propagation of the LCLS photon beam is carried out through every optical component sequentially, including drift spaces in between. The simulation is based on a single frequency beam propagation method, where a Fresnel propagator is used to simulate drift spaces (e.g., [19]) and a phase shifter method is used for optical elements [20]. The phase-shifter model is used to simulate a focusing effect of the toroidal grating, M2 mirror and contribution of height errors of an every optical component's surface. This model introduces a phase shift to the radiation ΔΦðx; yÞ. This shift is dependent on a transverse position at the radiation distribution and changes only the phase of the reflected beam but not its amplitude. It allows one to change the wavefront profile, and therefore, the field behavior after propagation. In practice, ΔΦ represents the deformation of the wavefront in the propagation direction.

A. Free space propagation
Let us consider the electric field in a space-time domaiñ Eðt; x; yÞ expressed in Cartesian coordinate system which is exported from the FEL simulation code GENESIS [21]. Applying temporal and frequency Fourier transforms one obtains the electric field in inverse space-frequency domain -Ẽðω; k x ; k y Þ.Ẽ Similarly, the 2D spatial Fourier transform ofẼðω; x; yÞ, with respect to the two transverse coordinates x and y can be written aŝ so that One can calculate the radiation distribution after free space propagation over a distance z using a spatialfrequency response function in the paraxial approximation: Eðω; k x ; k y ; zÞ ¼Ẽðω; k x ; k y ; 0Þ · Hðω; k x ; k y ; zÞ: ð4Þ

B. Grating modeling
We model the toroidal VLS grating as a sum of independent contributions of a sagittal focusing element, a tangential focusing element, aberrations, a surface height error and a wavelength-dependent tilt, responsible for angular dispersion. Also, asymmetry of incidence and diffraction angles has to be accounted for. Since angles of incidence and diffraction from a grating are not equal, the radiation pulse is resized transversely in the dispersive dimension by the grating asymmetry parameter b ¼ sin θ i = sin θ d (see Fig. 3).
As we mentioned before, the radiation distribution that is modified by an optical component is modeled by a phaseshifter in the following way: Eðω; x; yÞ ¼Ẽ 0 ðω; x; yÞ exp ½iΔΦðx; y; …Þ: ð5Þ Simulation of a radiation transport through the monochromator is an essential part of start-to-end simulations of the SXRSS setup performance. 030708-2 Here the phase shift ΔΦ is determined by various parameters, depending on the effect we want to model. For example, a lens introduces a quadratic phase shift: Here the shift in both transverse dimensions x and y is introduced, representing focusing with different focal distances f x and f y .
Tangential and sagittal curvatures of a toroidal grating act as independent cylindrical lenses with the following curvature-determined focal lengths: Here R tang and R sag are tangential and sagittal radii of curvature, θ i and θ d are incidence and diffraction angles, respectively. Equation (7) shows that focal lengths are wavelength-dependent, since θ d ¼ arccosðcos θ i − λD 0 Þ, according to the grating equation.
Beside toroidal curvature, the grating has a variable line spacing with the following line density: where l is a length along the grating. While the D 0 coefficient defines the dispersive properties of the grating, coefficients D 1 and D 2 are responsible of VLS focusing (see Fig. 4) and aberration compensation correspondingly. They are optimized to eliminate wavelength dependence of an image position at a slit and the coma aberration effect. It is worth mentioning that an effective source position of radiation at the end of SASE undulator is wavelength-dependent.
The VLS focusing contribution may be modeled via introduction of another focusing element in a tangential plane [22] with the following focal length [23]: The resulting focal lengths of the grating and corresponding phase shift can be expressed as The toroidal reflecting surfaces introduce aberrations. The two most important contributions are determined by twofold astigmatism and coma aberrations with C 12 and C 30 coefficients correspondingly [23,24].
Here z 1 and z 2 are the distances from an optical element [grating] to an object and an image correspondingly. The quadratic VLS coefficient D 2 introduces the phase shift, which is proportional to x 3 , and therefore, is used to compensate the effect of C 30 aberration term. The latter may be rewritten in order to contain another summand: Here n is a diffraction order which is equal to unity in our case. Aberrations are eliminated when C 0 30 ¼ 0 and C 12 ¼ 0 criteria are fulfilled.
The resulting phase shift caused by aberrations is given by In order to simulate time-dependent phenomena of the grating's resolving power one needs to take into account grating dispersion. We propose to introduce a wavefront tilt, according to an angular dispersion of the grating. Each wavelength is reflected from the grating at a different angle.
Having an ensemble of wavelengths we can choose a principle ray wavelength λ that will propagate downstream with no wavefront tilt. Each other wavelength will propagate from the grating at a certain angle from the principle ray, determined by grating angular dispersion, e.g., λ 0 þ Δλ will be tilted by: where In this case a linear phase tilt should be applied with respect to the principal ray frequency ω 0 : Finally, the cumulative effect of the grating modeling may be written as Eðω; x; yÞ ¼Ẽ 0 ðω; x; yÞ exp ½iΔΦ; C. Focusing with M2 mirror In this case the simulation is similar to the grating, but D 0 , D 1 , and D 2 VLS coefficients are equal to zero, θ i ¼ θ d , and no field resizing should be applied.
The total phase shift by M2 mirror is given by the following: Eðω; x; yÞ ¼Ẽ 0 ðω; x; yÞ exp ½iΔΦ; Here θ i is M 2 incidence angle, z 1 and z 2 are distances from M2 to an object at the slit and to an image at the reimaging point inside the seeded undulator section, respectively.

D. Mirror surface height errors simulation
We also use the phase-shifter model to simulate the effect of imperfections of optical surfaces [25] (see Fig. 5). The height error δh on an optical surface will perturb the radiation wavefront with a phase shift ΔΦ in the following way: where θ is the radiation's angle of incidence with respect to the surface. In the case of a grating, the phase shift can be expressed in terms of incidence and diffraction angles:

IV. SIMULATION DETAILS AND APPROACHES
We use the GENESIS code to obtain an electric field distribution in space and time at the end of the SASE undulator. Then we apply a temporal Fourier transform [Eq. (1)] and propagate the transverse distributions for every calculated discrete frequency. Finally, the inverse temporal Fourier transform is performed to go back into space-time domain.
Let us consider a transverse radiation distribution at the end of the SASE undulator at a frequency ω i . To simulate the transverse distribution of this beam at the grating position, we apply the Fresnel propagator from Eq. (4) with z equal to a distance between the end of the undulator and the beam's footprint at the grating. The phase shifter, described in Eq. (15) and the height error phase shifter [Eq. (18)] are used to simulate focusing of the beam by the toroidal VLS grating with a certain height error profile. The phase-shifter includes both aberrations, height error effect and the beam tilt. The tilt is introduced according to a difference Δω between the frequency being currently propagated and the frequency that is chosen to be a principle ray of the dispersed radiation [Eq. (14)].
In our case, the principle ray direction is assumed to pass through an optical center of all monochromator FIG. 5. Thin-shifter-like effect of surface height errors for a small mean square of surface displacement, concept adapted from [25].
components. Physically it is done via M1 pitch angle optimization. The transformations of the radiation discussed above compute the transverse radiation distribution (perpendicular to the principle ray after reflection from the optical element), based on optical element properties and the initial transverse radiation distribution (perpendicular to the principle ray before reflection from the optical element). We model height error effects associated with each optical element by applying phase shifters at the position of every optical component, taking into account the incident angles of the radiation.
After the grating, the beam is propagated to the M1 mirror and, as discussed above, the height error-related phase shifter is applied. Then after propagation to the slit one may choose either to model its presence with given width by applying a transparency mask to the field distribution, or to ignore the slit within the algorithm, effectively modeling slitless monochromator performance. After modeling M2 (refocusing) and M3 (flat) mirrors and including intermediate drift spaces one obtains the radiation distribution at the frequency ω i at the entrance of the seeded undulator. This distribution may be used as an input radiation field for the following GENESIS application.
Below we present two approaches for a FEL pulse propagation through the monochromator. Both of them are based on the single frequency beam propagation method, described above and propagate the same pulse, generated in the SASE undulator. Start-to-end simulated electron beam was used. Its parameters at the entrance of the SASE undulator are presented at the Fig. 6.

A. Direct propagation approach
In this straightforward approach the SASE pulse at the end of SASE undulator is decomposed into monochromatic beams using temporal Fourier transform [Eq. (1)]. As it has already been mentioned at the beginning of Sec. 4, every beam is propagated independently through the monochromator so that every beam obtains a certain tilt with respect to the principal ray at the grating. At the entrance to the seeded undulator those propagated beams are transformed back to the time domain. This dispersed 3D SASE radiation distribution is used as a seed for a time dependent FEL simulations, i.e., directly as in real setup without extra approximations.
An example of a propagation algorithm for a pulse at 1000 eV central photon energy is given below. Monochromator model with no exit slit inserted is used for simulation. First, the pulse is obtained at the end of SASE undulator in time domain (see Fig. 7). Afterwards, it is transformed to frequency domain (Fig. 8). Then the monochromatic beams are propagated downstream to the grating ( Fig. 9). At the grating frequency-dependent phase shifters are applied for simulating focusing and height error [Eqs. (15), (18)]. Then the field is propagated to the mirror M1, where the height error phase shifter is applied [Eq. (17)], to the mirror M2 [Eqs. (16), (17)], M3 [Eq. (17)], and then to seeded undulator entrance. In Fig. 10 we can see the spatial dispersion of our radiation: beams at different wavelengths have different transverse offsets. Note that due to the spatial dispersion the spectrum is imprinted into the transverse profile of the radiation (second row, first and second figures from the left). Due to the limited resolving power of the monochromator individual spikes are not resolved. After the inverse transformation of the radiation into the time domain we can see all 3 spatial projections of the spatially dispersed pulse, that, at this point is being overlapped with the electron beam (Fig. 11). In our case the transverse size of the electron beam is typically around 25 μm rms and is much smaller than the transverse size of the spatially dispersed radiation in the horizontal dimension. Since the radiation will continue to diverge when propagated downstream the seeded undulator, due to angular dispersion, only a relatively small fraction of the dispersed beam will interact with the electron beam. Therefore, although an entire spectrum was used in Figs. 9-11 to illustrate the process, during practical simulations we can use fractional spectrum to save computing time.
In this approach, we first simulate the FEL with GENESIS code to obtain a radiation distribution at the end of the SASE undulator, then apply a temporal Fourier transform which switches from time to frequency domain (see Figs. 12,13). Afterwards, the obtained radiation spectrum is multiplied by a monochromator instrumental function that characterizes the monochromator performance based on both monochromator geometry and FEL amplification in the seeded undulator downstream the monochromator. In this way the FEL spectrum is filtered (only a certain spectral bandwidth defined by the transmittance function passes through the monochromator,  while other frequencies are effectively blocked). After applying an inverse temporal Fourier transform, one obtains the FEL radiation in the time domain that can be used as a seed for the next undulator section in GENESIS simulations.
In the simulations of the current monochromator design, an effect of two slits needs to be taken into account (see Fig. 14). The first slit is physical, which makes it possible to calculate its effect on the monochromator instrumental function analytically. Another slit is a virtual one: the electron beam being placed in the spatially dispersed radiation acts as a slit. The latter case can be barely analyzed analytically since the FEL process is involved in the amplification. This instrumental function calculation has to be done numerically.
In the HXRSS case, the monochromator instrumental function is a transmittance function of the diamond crystal itself at a given geometry. This function can be either calculated or measured. In the SXRSS case in order to obtain an effective transmission function one can make use of a beam propagation method. In the phenomenological approach we use a response of FEL power amplification of the seed pulse within the seeded undulator section [(in other words input coupling factor (ICF)] from the spatial dispersion effect. Since different frequencies are spatially separated at the entrance of the seeded undulator, some of them will be overlapped with the electron beam and some will not. In this way one can measure the mismatching of the radiation and the electron beam as a function of the wavelength. It allows one to obtain an effective monochromator transmission function.
We calculated the instrumental function of the monochromator in the following way. First, a single wavelength λ 0 (or frequency ω 0 ) of a radiation distribution at the end of the SASE undulator was simulated with the GENESIS code in the steady-state mode. This radiation can be propagated through all of the optical components of the monochromator to the entrance of the seeded undulator, used as an input for the GENESIS code that simulates the seeded undulator. This field is amplified within the seeded undulator in a linear mode of operation for a fixed distance. At the end the obtained amplified power is recorded. This procedure was repeated for other frequencies with different wavefront tilts introduced at the grating [Eq. (14)]. Spectrum was filtered (d) after being multiplied by the monochromator instrumental function (Fig. 15). Afterwards it was transformed back to time domain (c), representing effective power distribution at the entrance of the seeded undulator. Spectrum was filtered (d) after being multiplied by the monochromator instrumental function (Fig. 15). Afterwards it was transformed back to time domain (c), representing effective power distribution at the entrance of the seeded undulator.
FIG. 14. Physical slit (left figure) blocks undesired wavelengths, passing through only certain bandwidth. It is easily controlled and may be moved out. Since radiation amplification in an undulator takes place via interaction with accelerated electrons, only a radiation overlapped over the electron beam will be amplified. It can be expressed as a virtual slit (right figure). This process is barely controlled and cannot be "turned off." This allows one to simulate an angular dispersion during the radiation propagation with different wavelengths through the monochromator. At the entrance of the seeded undulator the radiation distributions with different Δλ with respect to the principal ray will obtain different offsets in the dispersive direction: the result of the spatial dispersion of the monochromator. These radiation distributions can be used as an input radiation field for the GENESIS simulation within the seeded undulator. Due to the transverse mismatching between the electron beam and the radiation at different wavelengths, the amplification process will depend on the particular wavelength offset Δλ from the principal ray wavelength λ 0 . If the undulator length is properly chosen to satisfy the FEL amplification in the linear mode of operation, one may measure the amplified power as a function of Δλ. It effectively represents how different frequencies are amplified within the seeded undulator after the propagation through the monochromator. In order to obtain the effective instrumental function of the monochromator, the power distribution must be properly normalized. Since the radiation propagated through the monochromator is not only spatially dispersed but also undergoes focusing as well as an aberration and mirror surface error effects, the amplified power must be normalized by the power obtained with one to one imaging of the radiation at the end of the SASE undulator to the entrance of the seeded undulator. Also the normalized power dependence should be multiplied by the monochromator transmittance for a given wavelength, calculated by [16]. In this way instrumental functions for different wavelengths and geometries of the LCLS self-seeding monochromator were obtained (see Fig. 15). If multiplied by the radiation distribution in the frequency domain before the monochromator, it gives an effective radiation distribution after the monochromator at the entrance of the seeded undulator. Nevertheless, in order to maintain causality of the transported radiation in the time domain, a phase information was introduced into the monochromator instrumental function. The phases were obtained with Kramers-Kronig relations. (this approach was also used for the HXRSS setup simulation in, e.g., [8,9]). It is worth mentioning that unlike the HXRSS monochromator simulations, the causality effect is not critical for the SXRSS and is used rather for purity of the simulation.
What is important is the fact that those instrumental functions are effective ones and are based on: the source position from which the radiation propagates to the monochromator, the optical elements properties, the distance to seeded undulator, the FEL amplifier properties, etc. The instrumental function curve shows only the spectral bandwidth that will be amplified downstream of the undulator, but not the bandwidth that is actually transmitted through the monochromator: while the slit is fully opened, the electron beam filters out a certain spectral bandwidth to be amplified further (Fig. 14). In fact, without the exit slit the entire radiation spectrum passes through the monochromator. Consequently, this approach allows one to calculate the transmittance function of the monochromator for given parameters of its operation. Once it was done, every propagated pulse is just transformed to the frequency domain, multiplied by the transmittance function of the monochromator, transformed back to the time domain and amplified further in the seeded undulator.

V. COMPARISON OF APPROACHES
Both the direct and the phenomenological approaches used to simulate the slitless monochromator performance show similar results when comparing the radiation after amplification in the seeded undulator. In Figs. 16 and 17 one may see that despite an initial difference in the power and the structure of spectra, the results show a very good correspondence to each other after amplification in the seeded undulator. The spectrum is shifted due to the electron energy chirp evolution, induced by wakefields. Initial spectra are different: phenomenological approach should give less spectral density and narrower spectrum since it includes additional filtering associated with the gain process of the downstream FEL.
The phenomenological approach gives an effective radiation distribution that will be amplified in the seeded undulator. It is much faster than the direct one in terms of the computational time and is more applicable for batch processing of numerous FEL shots with once calculated single monochromator transmittance function. This method uses extra assumptions, since steady-state FEL simulation is used to obtain the transmittance function. Also this method is not applicable if one wants to perform simulations with a different monochromator or amplification parameters, since the monochromator transmittance function depends not only on the monochromator setup but also on gain lengths in the SASE and in the seeded undulator. Therefore, one must keep in mind that a simulated FEL gain length during the transmittance function calculation should be similar to the one at which this transmittance function would be used for the pulse monochromatization via the phenomenological approach. Therefore, one needs to resimulate the transmission function for different setups of FEL.
Unlike the phenomenological method, the direct approach needs significantly more computational power  and time to simulate the single SASE radiation pulse propagation through the monochromator. It does not need a preliminary measurement of the transmittance function, since dispersion of the radiation is simulated for every run. Also this method is more universal. It gives a possibility of reusing simulated, monochromatized radiation for simulating the effect of different configurations of the seeded undulator. Since the radiation after monochromator is divergent and transversely large, it becomes important to control the interactions between the propagated radiation and the transverse mesh borders of an FEL simulation software. If nonabsorbing boundary conditions are used (like in the GENESIS code), then after propagation downstream the seeded undulator, the radiation will be eventually "reflected" from the borders before the central part starts being amplified. The direct method allows one to obtain the "real" propagation approach pulse properties after the monochromatization, that makes it very useful for in-depth research of a monochromator performance. It may be used to cross-check the phenomenological approach simulations.

VI. DISCUSSION AND CONCLUSIONS
This article describes methods to simulate propagation of the radiation through the optical system of the soft X-ray self-seeding monochromator. The propagated field is used as a seed for GENESIS simulations downstream the monochromator allowing one to investigate the FEL beam line performance after the monochromator installation. The monochromator's optical elements are represented as transverse phase shifters, allowing us to take into account curvatures, positions and height errors of mirrors, and aberrations introduced by them. The propagation of the radiation between optical elements is done with a Fresnel propagator. The monochromator radiation transport simulation allows one to study the monochromator performance in the beam line, such as effective resolving power of the monochromator without the exit slit, the input coupling factor, or effectiveness of the tapering.
Based on simulations, we found that resolving power of the monochromator operating without the exit slit varies from 5400 to 8500, that is close to resolving power with the 3 μm exit slit inserted [14]. Resolving power along with input coupling factor are affected by the choice of the source position in the SASE undulator. We have found that the source position in the undulator U8 (when the undulator U8 is active) is optimal for seeding in 700 eV photon energy region. Simulations with the source position in the undulator U8 showed a better resolving power than that the undulator U8 is not active. We found that surface height errors of installed optics have no significant effect on the monochromator performance. A Pulse Front Tilt (PFT) effect was simulated separately from others (see the Appendix). It showed that a PFTafter the monochromatization is minimized when the radiation source is inside undulator U8.

APPENDIX: PULSE FRONT TILT
The grating in the SXRSS monochromator introduces an angular dispersion of the radiation. It yields to a pulse-front tilt (PFT) effect, which becomes important when dealing with ultrashort pulses. The geometrical interpretation of the PFT is that due to different incidence and reflection angles, pulse front immediately after the grating should be tilted in order to keep an optical path difference along the reflection area the same (AD ¼ BC on Fig. 18). Since SASE FEL pulse consists of numerous longitudinal modes, they may be geometrically interpreted as sequential pulses, and each of them will be tilted after the grating. When operated without the exit slit, the pulse-front tilt may affect an input coupling factor of the FEL at the entrance of the seeded undulator. The pulse propagation approach allows us to simulate the SASE pulse front tilt effect in the SXRSS monochromator. The propagation algorithm simulates an effect of the PFT on the input coupling factor automatically.
In Fig. 19 the 1000 eV SASE pulse [subfigure (a)] is propagated after the grating (b) and through the slit position (c-e). We can see, that the PFT is present in the time domain when multiple angularly dispersed frequencies overlap in the frequency domain. At the slit position the PFT is absent. In the frequency domain wavelengths are focused and well resolved. Out of the slit position numerous wavelengths overlap again, resulting in the PFT in the time domain. Situation will be similar at the entrance to the In order to illustrate further evolution of the pulse, it was additionally propagated 6 m downstream seeded undulator (b,d). The radiation energy is 500 eV. At higher energies this effect is smaller. radiation at the entrance of the seeded undulator. It is shown in Fig. 20 that the optimal source position is located in the section 8 of the SASE undulator. It allows one to decrease the effect of the PFT.