Design and first-round commissioning result of the SASE beamline at the Shanghai Soft X-ray FEL facility

The design and first-round commissioning results of the SASE beamline at the Shanghai Soft X-ray FEL facility are presented.

As the first X-ray FEL facility in China, the Shanghai Soft X-ray Free-Electron Laser (SXFEL) (Zhao et al., 2017;Liu et al., 2022) consists of one linac, two undulator lines, two beamlines and five experimental endstations focusing on dynamic and radiation-damage-free imaging, ultrafast physical phenomena, surface and ultrafast chemical processes, and atomic and molecular physics.The linac can provide a highquality electron beam with energy of 1.5 GeV, charge of 0.5 nC, peak current of about 700 A and normalized project emittance of about 1.5 mm mrad.The two undulator lines share the electron bunch from the linac and are operated under different operating modes -self-amplified spontaneous emission (SASE) mode and external seed mode -to produce FEL radiation with 100 fs (FWHM) pulse length at 50 Hz repetition rate.The SASE beamline, which covers the wavelength from 1.2 nm to 12 nm, mainly consists of three parts: front-end area, photon transport system and photon beam diagnostic system.The front-end area is designed for equipment and personal safety protection.The photon transport system will deliver FEL pulses produced by the upstream undulators to different experimental endstations including monochromatizing the pink beam, distributing FEL pulses to different branches and focusing the photon beam to the sample.The photon beam diagnostic system is applied to measuring the basic properties of the beam like spectral structure and pulse energy besides the pulse profile monitoring.
In this paper, the design of the SASE beamline at SXFEL is presented and the initial commissioning results of the SASE beamline are also reported.

Beamline layout
The optical layout of the SASE beamline is shown in Fig. 1.The first optics are offset mirrors which consist of two plane mirrors located at 59 m and 65 m downstream of the source.An offset of 314 mm is generated by the offset mirrors in the horizontal to block the upstream high-energy radiation.For the offset mirrors, the grazing incident angle is the same for both mirrors, i.e. 1.5 , to keep the outgoing beam parallel to the incoming beam.In the central area of the second plane mirror a small grating is ruled to disperse the incoming beam, and the dispersed beam is recorded by a CCD camera.In this way the spectrum of the FEL pulse can be measured shot by shot, which is quite important for both accelerator and endstation in order to know the spectral structure of a SASE pulse.The area of the grating is 80 mm Â 5 mm, which only covers a small portion of the reflected beam ($ 3%), while the other part is deflected into the zero order and straight forward towards the beamline, and the wavefront can be maintained as far as possible.The grating is chosen to be a variable-linespacing (VLS) type to focus the dispersive beam onto the CCD camera and minimize the aberration as a result of the optimization of the VLS parameters.A four-jaw slit is located at 70 m from the source point to define the acceptance angle of the downstream optics in the beamline.A variable-includedangle VLS plane-grating monochromator (PGM) is located at 73 m from the source point to select photons in a very narrow bandwidth.A 400 lines mm À1 grating is designed in the PGM to balance energy resolution and pulse length since the pulse will be stretched after passing through the grating.A FEL pulse with high energy resolution or high peak intensity is required according to different experimental methods and scientific objectives.In order to meet different needs, the plane mirror in the PGM can be moved out of the beam path to allow the pink beam to go through the vacuum chamber without passing through the grating.The beamline is separated into two branches after the monochromator.The FEL pulses can be distributed in the horizontal to a different branch by moving ECM 5 (elliptical cylindrical mirror 5), located 76 m from the source point, in or out of the beam path.When ECM 5 is moved out of the beam path, the photon beam directly reaches the Kirkpatrick-Baez (KB) focusing mirrors after passing through the offset mirrors.The KB system includes three mirrors: besides the two elliptical cylindrical mirrors which focus the photon beam in the horizontal and vertical, a plane mirror is added as the first mirror to guarantee that the photon beam is incident to the experimental endstation horizontally.The spacing between mirrors is 0.5 m in the focusing system and the last focusing mirror is located at 118.5 m from the source point.The first sample point is located at 1.5 m downstream of the last focusing mirror.Since only five mirrors are passed through, the wavefront can be well preserved.Therefore, this focus is suitable for experiments requiring high peak intensity or ultrashort pulse length such as coherent diffraction imaging, etc.When ECM 5 is moved into the beam path, the photon beam is deflected to another branch.In most cases this branch is designed to transport monochromatic beam.The imaging distance of the grating is 15 m, whereupon an exit slit is used to selected photons of the required wavelength.The position of the exit slit is also the focus of ECM 5. Consequently, the exit slit also acts as the secondary source point for the downstream optics.If ultrashort pulse length but not high energy-resolving power is required in this branch, the grating in the PGM will be replaced by an elliptical focusing mirror whose imaging distance is the same as that of the grating.An ellipsoidal mirror EM 6 located at 118.5 m is applied to focus the beam in both the horizontal and vertical simultaneously to 120 m.Based on the PGM with high energy-resolving power, this focus is suitable for carrying out spectroscopy related experiments.All of the optics in the SASE beamline are coated with B 4 C owing to its high single pulse damage threshold and high reflectivity in the optimized energy range.The basic parameters of the optics in the SASE beamline are summarized in Table 1.
A gas attenuator located in front of PM 1 is applied to adjust the pulse energy to protect the optics or other equipment in the beamline from being damaged by a high-energy pulse in the commissioning stage or experiment preparation.The effective absorption length of the gas attenuator is 6 m with argon and nitrogen as working gas.The maximum operating pressure is 0.8 Torr to provide up to four orders of magnitude of attenuation.Two gas monitors are installed in front of and behind the gas attenuator to monitor the pulse energy shot by shot.Both gas monitors are installed in the differential section of the gas attenuator to save space.The monitors are almost completely transparent due to the low pressure used for the rare gas in the vacuum chambers.An Si-based photodiode is also used to derive the pulse energy.Unlike gas-based detectors, the photodiode combined with a YAG screen is used to monitor both pulse energy and profile by interception technique.

Focus
In order to obtain an ideal focus spot in the experimental endstation, the wavefront should be well preserved in propagation.Therefore, the height errors of the mirrors in the beamline should be controlled at a reasonable level.According to the Mare ´chal criterion, the required height errors of the optics used in the beamline could be estimated with equation (1), where h is the height error, is the wavelength, is the grazing angle and N is the number of optics.For the pink-beam branch, the beam passes through five mirrors.So, the height error for each mirror should be smaller than 0.76 nm RMS at 1000 eV and 1.22 nm RMS at 620 eV.The mirrors are obtained commercially from J-Tech Corporation.Table 2 shows the required and achieved parameters of the five mirrors used in the SASE beamline.Simulation of the beam propagation is carried out using MOI code developed by SSRF (Meng et al., 2015(Meng et al., , 2017;;Ren et al., 2019Ren et al., , 2020)).The model is based on statistical optics for numerical analysis of partially coherent X-rays.The simulated spot-size curve at the sample point of the pink branch is shown in Fig. 2(a), where the measured surface shape of the mirrors is adopted in the simulation.The focusing spot size at both ends of the energy range covered by the beamline is larger than that in the middle of the energy range, which is consistent with the trend of the source size [dashed line in Fig. 2(a)].Figure 2(b) shows the simulated spot size at 600 eV.The ultra-smooth mirrors used in the beamline will contribute to a theoretical relatively ideal focusing spot.The measured surface shapes of the mirrors are shown in Fig. 2(c).Owing to the low repetition frequency, the focus would not be enlarged due the angular vibration of the mirrors especially for the single-pulse experiments, but the lateral position of the focus will be slightly affected.

Online spectrometer
In order to realize online measurements of FEL spectra, a VLS plane grating was ruled at the center of PM 2. The incident FEL beam is dispersed by a grating of first order and recorded by an X-ray CCD, with the zeroth order being transported downstream, as shown in Fig. 3.
For a VLS grating, the line spacing d is a function of position w in the dispersive direction.The function can be expanded as a power series of w, namely, where d 0 is the line spacing at the center of the grating, and b 2 , b 3 and b 4 are the space-variation parameters.The defocus term (F 20 ) and the coma term (F 30 ) in an optical path function can be eliminated by choosing an appropriate linear coefficient term b 2 and quadratic term b 3 , respectively, according to where m is the diffraction order, is the incidence angle, is the diffraction angle, r 1 is the objective distance, r 2 is the imaging distance and R is the curvature radius of the grating (for a plane grating, R ! 1).As an online spectrometer, the grating has to work at a fixed grazing incident angle to guarantee the normal transmission of the FEL beam.Therefore, the image distance of the grating has to vary with the change of photon energy to meet the focusing condition.Also, because of this, the defocus aberration could be eliminated over the whole energy range and contribute almost nothing to the energy-resolving power of the online spectrometer.The energy-resolving power is mainly determined by the following factors: source size, meridian slope error of the grating, aberration from the coma, detector and grating diffraction limit.High-order aberrations (smaller than F 30 ) are small and negligible.Their contributions to the relative spectrum width, Á/ total , where  The online spectrometer of the SASE beamline.
are as follows: Source size: Meridian slopes errors of grating: Detector: Aberration from coma: Diffraction limit: Here, AE y is the RMS value of the source size, gr is the meridian RMS slope errors of the grating and the focusing mirror, Á D is the pixel size of the detector, is the grazing incidence angle on the CCD, W is the half-width of the ruled area of the grating and N is the number of coherently illuminated grating grooves.The theoretical energy-resolving power of the online spectrometer is shown in Fig. 4(a).The highest energy-resolving power is over 17 000 at 620 eV, which is just the optimized energy for eliminating aberrations.This is mainly because the largest contribution to the energy-resolving power is from the coma aberration as shown in Fig. 4(b).
The ray-tracing results also verify that the energy-resolving power could reach 8000 @ 400 eV and 17000 @ 620 eV, as shown in Figs.4(c) and 4(d).

Online spectrometer
The online spectrometer is designed to allow the accurate measurement of the photon energy spectrum distribution over the whole energy range covered by the beamline while delivering radiation to the experimental endstation.The most important information directly obtained by using the online spectrometer is the energy distribution besides the central wavelength of the FEL pulses.Therefore, the online spectrometer is an important and essential diagnostic tool for both experimental scientists and machine scientists.The single-shot spectra could provide the spectral structures of the SASE FEL pulse by pulse.In the initial stage of beamline commissioning, a combination of visible-light CCD and YAG screen was used to record the spectra.Unfortunately, high-resolution spectra could not be obtained in this way.Afterwards, the detector of the spectrometer was replaced with an in-vacuum X-ray CCD camera.A randomly chosen SASE spike-like single-shot spectrum recorded by the X-ray CCD camera is presented in Fig. 5. Thanks to the high energy-resolving power of the online spectrometer, several Gaussian-shaped peaks can be observed in the spectra.The width of each peak can be obtained by Gaussian fitting, as listed in Table 3.A 60.5 meV energy resolution reveals that the energy-resolving power of the online spectrometer is over 6000 @ 400 eV.
For the machine scientists, accurate spectral information assists in precise machine commissioning.A typical case is the calibration of the central wavelength of the FEL radiation and measurement of bandwidth.An experimental result is shown in Fig. 6.In this experiment the gap of the undulator is continuously adjusted twice with a step of 5.5 eV theoretically.One-hundred single-shot spectra were accumulated at each undulator gap to obtain the profile of the FEL radiation.Through Gaussian fitting of the measured source spectra profile, both the central wavelength and the bandwidth could be obtained.It can be seen from Fig. 6(a) that the actual change in the center wavelength is 4.9 eV and 5.2 eV and the bandwidth of the source at each undulator gap is 2.35 eV, 2.91 eV and 3.02 eV.Although there is a 0.6 eV and 0.3 eV difference between the actual change in the central wavelength and the theoretical expected value, these differences are smaller than the bandwidth of the source and still within an acceptable range.The measured multi-shot average source bandwidth is 0.6-0.7%, which is about three times the theoretical value of a single pulse of 0.2%.This is mainly caused by the energy jitter between pulses of the SASE radiation.A 130 meV difference of the central wavelength was also measured when the undulator gap returned to its original value as shown in Fig. 6(b).

Focal spot
In the first round of commissioning, the FEL pulses have been successfully transported and focused to the Coherent Scattering and Imaging (CSI) endstation.A bright X-ray focal spot of size 2.2 mm Â 2.5 mm was achieved by using an edgescan and silicon ablation imprint measurements at a photon Single-shot spectra recorded by the online spectrometer.Numbering of the peaks refers to the peaks given in Table 3. energy of 520 eV (Tong et al., 2022).The horizontal spot size is consistent with the theoretical simulation results, which reveals the high-quality transmission and focusing capabilities of the beamline, whereas the vertical spot size is even smaller than the results of theoretical predictions.A possible and reasonable reason for this is that the source size in the horizontal is not equal to that in the vertical while the source size adopted in the simulation is equal in both directions.Subsequently, the single-shot focal spot size was characterized using the coherent diffraction imaging reconstruction method (Gao et al., 2023), which was consistent with that of the damage method and edge-scan method.

Conclusion
The Shanghai Soft X-ray Free-Electron Laser (SXFEL) is the first X-ray free-electron laser facility in China.The design of the SASE beamline, one of two beamlines in the Phase-1 construction, is presented in this paper.After the first round of commissioning the focal spot size in the pink branch is less than 3 mm in both the vertical and horizontal.The energyresolving power of the online spectrometer is over 6000 @ 400 eV.The beamline and experimental station are now open to users.In the near future the commissioning of the more challenging mono-branch will start.

Figure 1
Figure 1Layout of the SASE beamline at SXFEL.

beamlines180
Figure 2 (a) Simulated focus size curves of the pink branch in the SASE beamline.(b) Simulated focus size of the pink branch in the SASE beamline at 600 eV.(c) The measured surface shape of the mirrors.

Figure 3
Figure 3 Figure 4 (a) Energy-resolving power of the online spectrometer.(b) The various contributions to the total energy resolution of the online spectrometer.(c) Raytracing result of the online spectrometer at 400 eV.(d) Ray-tracing result of the online spectrometer at 620 eV.

beamlines182
Chaofan Xue et al.SASE beamline at the Shanghai Soft X-ray FEL

Figure 6 (
Figure 6 (a) Spectral distribution of the FEL source with different undulator gaps obtained by accumulating 100 single-shot spectra.(b) Spectral distribution of the FEL source measured when the undulator gap returned to its original value.

Table 1
Basic parameters of the optics in the SASE beamline.Required and achieved parameters of the optics used in the SASE beamline.

Table 3
Width of Gaussian-shaped peaks in a randomly chosen single-shot spectrum recorded by the online spectrometer.