Start-to-end simulation of x-ray radiation of a next generation light source using the real number of electrons

In this paper we report on start-to-end simulation of a next generation light source based on a high repetition rate free electron laser (FEL) driven by a CW superconducting linac. The simulation integrated the entire system in a seamless start-to-end model, including birth of photoelectrons, transport of electron beam through 600 m of the accelerator beam delivery system, and generation of coherent x-ray radiation in a two-stage self-seeding undulator beam line. The entire simulation used the real number of electrons (∼2 billion electrons/bunch) to capture the details of the physical shot noise without resorting to artificial filtering to suppress numerical noise. The simulation results shed light on several issues including the importance of space-charge effects near the laser heater and the reliability of x-ray radiation power predictions when using a smaller number of simulation particles. The results show that the microbunching instability in the linac can be controlled with 15 keV uncorrelated energy spread induced by a laser heater and demonstrate that high brightness and flux 1 nm x-ray radiation (∼10 photons=pulse) with fully spatial and temporal coherence is achievable.


I. INTRODUCTION
A high brightness/flux x-ray free electron laser with fully spatially and temporally coherent radiation would provide an invaluable tool for scientific discovery in condensed matter physics, material science, chemistry, and biology.Recently, a high repetition rate soft x-ray FEL (a next generation light source) was studied at Lawrence Berkeley National Laboratory [1] and is currently being actively pursued at SLAC National Accelerator Laboratory.This light source will not only provide spatially coherent x-ray radiation generated by self-amplified spontaneous emission (SASE) [2][3][4][5], but it will also provide both spatially and temporally coherent x-ray radiation through two-stage self seeding [6], where radiation from the first stage is used as a seed for amplification in the second stage.In both schemes, the quality of the electron beam entering the FEL undulator will play a critical role in determining the final x-ray radiation performance.During acceleration and transport through the accelerator beam delivery system, these electrons are subject to various collective effects (e.g., spacecharge effects) and the beam quality may be significantly degraded due to the microbunching instability that grows from the electron beam shot noise.An accurate modeling of the shot noise in the electron beam together with various collective effects, including the electron x-ray radiation interaction in the undulator, is essential in predicting the properties of the final x-ray radiation.
Start-to-end macroparticle simulation has been used in a number of previous studies as an important tool for evaluating the design of light sources [7][8][9][10][11][12][13]. In this paper, we report on high resolution start-to-end simulation of the x-ray radiation in a high repetition rate, soft x-ray FEL.A realistic number of electrons are used in this study to accurately model the initial shot noise inside the beam.For a given number of macroparticles, N mp , the shot noise in the simulation can be artificially magnified by a factor of ffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi N=N mp p , where N is the real number of electrons.A low pass filter was proposed to suppress the numerical noise associated with the use of a small number of macroparticles in comparison with the real number of electrons and to calculate the microbunching instability gain curve through the accelerator [14].Applying such a low pass filter does not completely suppress the artificial noise in the numerical simulation.This is because the shot noise covers a broad bandwidth in the frequency domain.In the particle-in-cell simulation, the numerical grid size sets the bandwidth in the frequency domain.A smaller number of macroparticles causes larger fluctuation not just in the high frequency region but within the entire bandwidth including the low frequency region as shown in Fig. 1.Here, we calculated the amplitude of the Fourier coefficients difference between an analytical Gaussian function and a randomly sampled Gaussian function using 10 thousand, 100 thousand, one million, and 10 million macroparticles as a function of the normalized wave number.A low pass filter helps to suppress the high frequency numerical noise associated with sampling using a smaller macroparticle number, but the low frequency numerical noise still exists and increases the final modulation level after being magnified by the microbunching instability through the linac.In our previous study, high resolution beam dynamics simulations were carried out in the study of an old design of the FEL linac [15].In this paper, we will report on the start-to-end simulation of a new design of the next generation light source, starting from the photocathode and ending with the final FEL x-ray radiation.
The computational tool used in this study is the IMPACT parallel beam dynamics code framework.This framework includes the time-dependent IMPACT-T code [16] and the position-dependent IMPACT-Z code [17], which are based on a particle-in-cell method.The FEL simulation code, GENESIS [18], is imbedded into the framework to simulate the x-ray radiation within an undulator.This integrated framework produces a single executable code which facilitates seamless start-to-end simulation in a single run.The macroparticle electrons pass from one module of the code to another module of the code directly through the internal memory of the computer.The IMPACT-T module is used to simulate the photoelectron production and acceleration inside the injector.The IMPACT-Z module is used to simulate the electron beam acceleration, compression and transport through the linac and the spreader.The GENESIS module is used to simulate the electron beam interaction with x-ray radiation inside the undulators.The self-consistent 3D space-charge effects, the accelerating cavity structure wakefields, the longitudinal coherent synchrotron radiation (CSR) wakefields, and the timedependent x-ray/electron interaction inside the undulator are included in the simulation.
The remainder of the paper is organized as follows: after the Introduction, the light source machine layout is presented in Sec.II; the beam dynamics study in injector is presented in Sec.III; the transverse space-charge effects are discussed in Sec.IV; the study of microbunching instability in the whole beam delivery system is discussed in Sec.V; the start-to-end simulations of the x-ray SASE FEL radiation and self-seeding FEL radiation are presented in Sec.VI; and the summary is given in Sec.VII.

II. THE LIGHT SOURCE MACHINE LAYOUT
A schematic diagram of the next generation light source layout is shown in Fig. 2. It consists of a high brightness high repetition rate injector, a high stability CW superconducting linac, a beam spreader, and an array of FEL undulator beam lines.The injector includes a low rf frequency (187 MHz) high repetition rate (1 MHz or higher) normal conducting gun to generate an electron beam with 750 keV kinetic energy [19,20], a 1.3 GHz buncher cavity to provide initial velocity bunching, and seven 1.3 GHz Tesla superconducting cavities to accelerate the 300 pC electron beam to an energy of 96 MeV.It is then followed by a laser heater to induce uncorrelated energy spread in the beam to control the effects of the microbunching instability.After the laser heater, two 1.3 GHz Tesla superconducting cavity cryomodules (each with seven cavities) are used to accelerate the electron beam to an energy of 215 MeV before entering the first bunch compressor.The first bunch compressor has a momentum compaction factor of R 56 ¼ −94.0 mm, and provides a factor of two longitudinal compression.After the first bunch compressor, the electron beam is further accelerated to 720 MeV in six cryomodules before entering the second bunch compressor.This bunch compressor has a momentum compaction factor of R 56 ¼ −76.0 mm and provides another factor of five compression so that the final beam peak current is about 500 A. After the second bunch compressor, the electron beam is further accelerated in 18 superconducting cryomodules to a final energy of 2.4 GeV before entering the spreader section, where the 1 MHz electron beam is distributed into different FEL undulator beam lines to generate coherent x-ray radiation.More discussions of the injector, linac, spreader, and FEL undulator of this light source can be found in Refs.[21][22][23][24].

III. BEAM DYNAMICS IN THE INJECTOR
The injector was designed from a multiobjective optimization with 13 control parameters [21].The projected rms emittance and the rms bunch length at the exit of the injector are defined as two objective functions in the optimization.A lower emittance can be obtained with a longer bunch length that corresponds to a lower peak current, while a shorter bunch length with higher peak current leads to a higher emittance.In this study, we adopted a solution around the middle of the optimal Pareto front that has a reasonable peak current (∼50 A) and rms emittance (< 1 mm mrad).Here, the optimal Pareto front is a set of solutions in the objective function space so that any solution in this front is no worse than the other solution in the feasible solution space.The initial laser pulse is assumed to have a longitudinal 44 ps flat temporal profile with 2 ps rising time on both ends.The transverse spatial distribution is assumed to be a round uniform cylinder with 0.6 mm radius.The initial thermal emittance of the beam is 0.3 mm mrad, following a conservative assumption of 1 mm mrad thermal emittance per 1 mm rms radius beam.A three-step model is used to generate the initial particle distribution in momentum space [25].The detailed description of the model of particle momentum distribution is given in Appendix A. In order to improve the computational efficiency, we have developed a second-order electron emission model to simulate the process of photoelectrons coming out of the cathode during the laser interaction with the photocathode.A detailed discussion of the second-order emission model is given in Appendix B. Using the real number of electron macroparticles for 300 pC charge, we simulated the photoelectron emission from the photocathode and the transport through the injector.The evolution of the transverse projected rms emittance is given in Fig. 3.The final projected emittance at the exit of the injector is about 0.6 mm mrad.Figure 4 shows the final current profile, slice emittances and longitudinal phase space at the exit of the injector.The peak current at the exit of the injector is about 50 A. The initial current out of the photocathode (∼6 A) is amplified by a factor of about 9 at the exit of the injector through the velocity and ballistic bunching by the buncher cavity and the boosting cavities.The slice emittances are between 0.5 and 0.6 mm mrad for most parts of the beam.The longitudinal phase space at the exit of the injector is not  completely flat, with a small relative rms energy spread of about 0.02%.

IV. EFFECTS OF TRANSVERSE SPACE-CHARGE NEAR LASER HEATER
A laser heater is used after the injector to increase the electron beam uncorrelated energy spread.The transverse rms size of the beam is designed to match the laser spot size (with the same horizontal and vertical sizes) at the center of the undulator in order to optimize the laser electron beam interaction.A diagnostic section right after the laser heater also requires the same sizes in both horizontal and vertical directions.Figure 5 shows the evolution of rms sizes and emittances without and with transverse space charge effects through the matching section, the laser heater, the diagnostic section, and two accelerating modules.The electron beam enters the matching section with a kinetic energy of 95 MeV and leaves the two accelerating modules with 215 MeV.Transverse space charge is seen to cause both a mismatch in the rms envelopes (particularly evident in the vertical plane) and more than 20% emittance growth in the vertical plane, with a smaller growth in the horizontal plane.The importance of the transverse space-charge effects can be estimated from an envelope equation model, where the contribution from the space-charge effects can be calculated in comparison with that from the emittance.Using the rms size and emittance of the beam at the exit of the injector, we found that the space-charge term and the emittance term are comparable.There are two mechanisms related to the space-charge induced emittance growth.The first mechanism involves a misalignment of the beam ellipses in the transverse phase space corresponding to different longitudinal beam slices.The second mechanism involves the nonlinear space-charge fields presented when the beam charge density is transversally nonuniform.The first mechanism might be compensated by appropriately tuning the machine lattice to match the distribution with space-charge forces.The second mechanism affects individual slices and is generally irreversible.Figure 6 shows the rms size and emittance evolution of the solution after rematching the beam line lattice with the space-charge effects.Here, we have reoptimized the six quadrupoles in the matching section and the two quadrupoles in the diagnostic section after including the transverse spacecharge effects.It is seen that the envelopes are rematched with correct sizes at the location of the laser heater and inside the diagnostic section.The rms vertical emittance growth is also significantly reduced after rematching the transverse space-charge effects.The remaining emittance growth seen in Fig. 6 is mostly due to the second mechanism of space-charge induced emittance growth.

V. MICROBUNCHING INSTABILITY IN THE BEAM DELIVERY SYSTEM
The microbunching instability in the beam delivery system causes degradation of electron beam quality and lowers the performance of the x-ray FEL.Here, we studied the microbunching instability seeded by shot noise as well as by small current perturbations at the cathode (caused, for example, by nonuniformities in the photo-gun laser pulse temporal profile).
We modeled the effect of irregularities in the photo-gun laser profile by a placing few-percent sinusoidal modulations of a given period on the nominal beam current generated at the cathode.The evolution of the modulation amplitude of the excited mode along the injector for a given perturbation period is shown in Fig. 7 from the simulation and from a linear analytical model discussed in this section.The simulation shows some magnification in the amplitude of the modulation, while the beam undergoes compression by velocity bunching.
We attempted to model the evolution of these modulations with a simple, linear 1D model aiming at capturing the qualitative behavior of the longitudinal beam dynamics through the first few meters of the injector, including the buncher, the downstream drift, and the first cavity of the booster.We describe the particle dynamics in terms of (Δz; Δ pz ), deviations from the reference orbit, where Δz is the longitudinal coordinate and Δ pz ¼ Δp z =mc is the scaled longitudinal momentum.Time is the independent variable.We denote M as the 2 × 2 matrix for the linear unperturbed motion (no space-charge).Through a drift space (including the gun gap, where all beam particles experience about the same accelerating field) the nontrivial entry of the matrix reads M 12 ðt 0 → tÞ ¼ c R t t 0 dt 0 =γ 3 ðt 0 Þ.We model the buncher as a thin cavity operated at zero-field crossing, with transfer matrix M 11 ¼ M 22 ¼ 1, M 12 ¼ 0 and M 21 ¼ −α B , and assume that the beam stays on crest through the first cavity of the buncher (implying that all the RF compression is induced by the buncher, which is close to a typical setup for the injector).The compression factor at time t is CðtÞ ¼ 1 for t < t B and CðtÞ ¼ j1 − α B M 12 ðt B → tÞj −1 for t > t B , where t B is the time the reference particle reaches the buncher.The parameter α B , is chosen empirically so as to yield a compression factor CðtÞ along the injector that is comparable to that resulting from the IMPACT simulations.
The bunching function relative to the nominal wave number k 0 for the sinusoidal perturbation is found as the solution of the integral equation [26] b where k ¼ CðtÞk 0 =βðtÞ and k 0 ¼ Cðt 0 Þk 0 =βðt 0 Þ, and the kernel reads Space charge is described by a 1D model using the impedance ZðkÞ ¼ Z 0 ½1 − 2K 1 ðxÞI 1 ðxÞ=kπr 2 b where x ¼ kr b =γ and r b is an effective transverse beam radius [15].The evolution of the relative amplitude of the sinusoidal charge density perturbation from the model is shown in Fig. 7 as the solid line.The model roughly overlaps with the simulation data (dots) provided that we choose r b ðtÞ ¼ 2.1σ ⊥ ðtÞ, where σ ⊥ ðtÞ is the rms transverse beam size as determined by the IMPACT simulations.The mode amplitude is in units of the amplitude observed in the beam core at the time the beam tail leaves the cathode.The behavior of the mode as observed in the figure has the signature of a plasma oscillation with increasing period as the beam undergoes acceleration.
The uncorrelated energy spread of the beam helps to damp the microbunching instability.Figure 8 shows the final electron beam current profile, slice energy, and uncorrelated energy spread at the entrance of the first undulator radiator when different levels of uncorrelated energy spread are induced by the laser heater.It is seen that the introduction of 15 keV uncorrelated energy spread is needed in order to suppress the microbunching instability.
In addition to the initial current modulation from the electron beam shot noise, the laser temporal profile rippling at the photocathode also leads to initial current modulation.This temporal rippling might come from the stacking of a number of short laser pulses.Figure 9 shows the final electron beam current profile, slice energy profile, and uncorrelated energy spread with an initial 5% temporal laser modulation and different modulation periods through the beam delivery system with an initial 15 keV energy

VI. START-END-SIMULATION OF THE X-RAY RADIATION
We carried out full start-to-end simulations of the generation of FEL x-ray radiation starting from the electron emission at the photocathode to the end of the undulator using about two billion (the real number) electrons for a 300 pC charged beam.Besides the effects from external focusing and acceleration, the simulation also includes selfconsistent three-dimensional space-charge effects, longitudinal and transverse structure wakefield effects in accelerating cavities, longitudinal CSR effects and incoherent synchrotron radiation (ISR) effects in bending magnets, and three-dimensional self-consistent interactions between the coherent x-ray radiation and the electron beam in undulators.The one-dimensional CSR model used in this study includes only the radiative force [27] and is implemented inside the simulation using an integrated Green function method [28].The space-charge effects are added to the CSR effects inside the chicane to account for the Coulomb force.The simulations were carried out on a Cray-XC30 parallel computer, Edison, at the National Energy Research Scientific Computing Center using 2048 processors (cores).In the simulation, we have used 64 × 64 × 1024 numerical grid points for the space-charge calculation, 1024 grid points for the wakefield calculation, and 6000 (each slice represents 20 wavelengths) slices for the three-dimensional time-dependent FEL calculation in most simulations.The choice of the numerical grid parameters is based on some numerical convergence tests and the consideration of minimizing computing time needed for the simulation.The grid also should resolve the minimum physical length scale of interest in the simulation, which can be obtained from the analytical microbunching gain calculation.Each computing processor has a theoretical peak performance of about 19 GFLOP/sec and about 2.7 GB of memory.The computing node is connected through Cray Aires high-speed interconnect with a Dragonfly topology to ensure high performance, lowlatency communication for message passing interface jobs [29].The computing time for the start-to-end simulation is about six hours.The total memory usage of the simulation is about 900 GB.The rms information of the beam is calculated internally during the process of simulation.The slice information such as slice emittance or energy spread and current profile are calculated internally at a given location using the macroparticle distribution.SNAPSHOT is used to output a fraction of randomly sampled macroparticles at a given location.The phase-space plots are made after projecting onto a two-dimensional grid and plotted using software such as MATLAB.
Figure 10 shows the projected rms emittance evolution through the whole accelerator beam delivery system.It is seen that the normalized rms emittances are reasonably well preserved and the final emittances are below 1 mm mrad.The major projected emittance growth is after the second bunch compressor and it is caused by the coherent synchrotron radiation effects.Figure 11 shows the final electron beam slice emittance and longitudinal phase-space distribution coming out of the accelerator beam delivery system at the entrance of the first undulator.There is a relatively flat region of the beam with a length of about 120 um.The slice emittance in this region is 0.5-0.6 mm mrad with a current between 400 and 600 A. The longitudinal phase space still shows small long-wavelength (∼10 μm) modulation from the microbunching instability.(The modulation wavelength is consistent with the analytical calculation of the microbunching instability gain curve, which has a maximum gain ∼100 μm before the first bunch compressor [30]).Such a long wavelength energy modulation does not have significant impact to the performance of the SASE x-ray FEL radiation but limits the smallest bandwidth that can be achieved in the seeded FEL radiation scheme.The final uncorrelated energy spread (i.e., slice energy spread) of the beam is about 150 keV at the entrance of the undulator beam line.The x-ray FEL beam line in this study consists of two sections of undulators.The first section of the undulator beam line is used for producing SASE FEL radiation, while the second section is used for producing narrow bandwidth FEL radiation through a self-seeding scheme [24].We first studied the 1 nm x-ray FEL radiation in the SASE undulator beam line section using start-to-end simulation with the real number of electrons.This section consists of about 12 superconducting undulator cryomodules, each 3.3 m long.The magnetic break between the undulator cryomodules is about 1.1 m.The average undulator parameter is about 1.1 with an undulator period of 2 cm.In the simulation, the electron beam coming out of the beam delivery system is directly sent into the FEL undulator beam line through the internal memory of the program to produce coherent x-ray radiation.Figure 12 shows the average radiation power evolution along the undulator beam line for the fundamental 1 nm x-ray radiation with different levels of uncorrelated energy spread coming out of the laser heater.The 5 keV uncorrelated energy spread induced by the laser heater is not sufficient to suppress the microbunching instability.This results in a lower x-ray FEL radiation power inside the undulator (with the fixed length) and a longer radiation gain length due to the degradation of the electron beam quality in the accelerator beam delivery system.Using 10 and 15 keV uncorrelated energy spread from the laser heater significantly suppresses the microbunching instability and the x-ray radiation saturates around 50 m with about 250 MW average radiation power.Further increasing the uncorrelated energy spread from the laser heater causes even larger electron beam uncorrelated energy spread and lowers the x-ray radiation power.
The above start-to-end simulation used the real number of electrons (1.9 billion) from the cathode to the end of the beam delivery system.A section of 120 μm long beam (1.2 billion electrons) around the core of the bunch with peak current beyond 500 Ampere was directly used in the FEL undulator simulation.As a comparison, we also ran the simulation using one million macroparticles and 64 × 64 × 64 grid points.The number of numerical grid points is reduced in order to reduce artificial numerical noise from the use of the small number of macroparticles.The macroparticle distribution (120 μm long around the core) coming out of the accelerator was resampled in the Genesis simulation using 16,384 macroparticles per slice and total 6000 slices.Figure 13 shows the average x-ray radiation power evolution along the undulator beam line for the fundamental 1 nm and the third harmonic 0.33 nm  radiation using the real number of electrons and the one million macroparticles.It is seen that both simulations agree reasonably well in their predictions of the average power for the fundamental 1 nm x-ray radiation.However, for the third harmonic radiation, the one million macroparticle simulation significantly overpredicts the radiation power in comparison with that from the simulation using the real number of electrons.This could be due to the larger third harmonic component in the shot noise of the initial resampled beam distribution from the one million macroparticle simulation.The x-ray radiation from the SASE FEL has a good spatial coherence but lacks longitudinal temporal coherence.Figure 14 shows an example of the final x-ray radiation temporal and spectral profiles at the end of the SASE undulator beam line with 15 keV uncorrelated energy spread from the laser heater in the electron beam.There are multiple spikes along the radiation pulse length and the full-width half maximum bandwidth is about 0.5 × 10 −3 .The bandwidth and the temporal coherence from the SASE FEL radiation can be improved by using the self-seeding scheme in the following start-to-end simulation.
In the start-to-end self-seeding x-ray radiation simulation, the first undulator section is shortened to 34 m so that the SASE x-ray radiation in this section is not saturated.The x-ray radiation from this stage is transported through a monochromator with 10 −5 bandwidth to provide a narrow bandwidth seeding signal for the second stage amplification.In this simulation, we assumed an initial seeding signal of 1 nm radiation with 8.6 kW power coming out of the monochromator.The electron beam coming out of the first stage of the undulator is transported through an idealized chicane with R 56 ¼ 600 μm to account for the delay between the electron beam and the x-ray pulse and to smear out the microbunching inside the electron beam induced in the first section of the undulator.The second undulator section has the same parameter settings as the first section of the undulator except with longer length (∼53 m). Figure 15 shows the evolution of the average 1 nm x-ray radiation power inside the second stage of the undulator.As a comparison, we also show the simulation results from using one million macroparticles following a resampling procedure for the FEL simulation described above.The radiation powers from both simulations are in reasonable agreement before saturation and show significant differences after saturation.The slower decrease of the radiation power from the one million macroparticle simulation is due to the artificial shot-noise amplification present in the simulation with the use of smaller number of macroparticles.Figure 16 shows the temporal and spectral profiles of the 1 nm x-ray radiation at 41 m location from the beginning of the second undulator section.Here, we see that in the temporal domain, the one-million macroparticle simulation case shows larger fluctuation of the radiation power along the pulse length.In the spectral domain, both simulations show a narrow bandwidth with a relative FWHM of 1-2 × 10 −5 .The slightly larger bandwidth than the transform limit is due to  slice energy variation along the beam at the undulator entrance and the energy modulation caused by the resistive wall wakefield inside the undulator with a 6 mm aperture size.The simulation using one million macroparticles shows slightly larger bandwidth with larger background power fluctuation among different wavelengths due to the shot noise amplification.The growth of those shot noise modes (observed in the spectral profile of the radiation at the end of the simulation) accounts for the slower decrease of the average radiation power after saturation in Fig. 15.

VII. CONCLUSIONS
In this paper, we have carried out self-consistent multiparticle start-to-end simulations of the SASE and the selfseeded x-ray radiation in a next generation FEL-based light source design with a multiphysics model to account for various collective effects, using a real number of electrons (300 pC).The simulation integrated the electron beam dynamics modeling (inside the accelerator beam delivery system) and the x-ray FEL radiation modeling (inside the two stage undulator) into a seamless start-to-end modeling of the entire system.The simulation started from the photoelectron emission process at the photocathode in a low frequency rf gun, and electrons were transported through a 600 m accelerator beam delivery system to attain a final 2.4 GeV energy before entering a two stage undulator for generating 1 nm SASE and self-seeded FEL x-ray radiation.The simulation showed that the emittances of the electron beam are well preserved through the accelerator with final total projected rms emittances of about 0.8 mm mrad in the horizontal plane and 0.7 mm mrad in the vertical plane and 0.5-0.6 mm mrad slice emittances in the core of the beam.Final current inside the core of the beam is between 400 and 600 A. The microbunching instability driven by space-charge and wakefield effects can be controlled by the use of a laser heater to induce 15 keV uncorrelated energy spread in the beam, and by controlling the initial laser pulse intensity fluctuations below 5% and with less than 1 ps period.The final uncorrelated energy spread of the beam is about 150 keV.Such an electron beam produces about 100 μJ 1 nm spatially coherent x-ray radiation through about 50 m SASE undulator beam line, and about 100 μJ fully spatially and temporally coherent radiation through the self-seeding undulator beam line.
In this study, we also observed strong transverse spacecharge effects at about 100 MeV electron energy near the laser heater that cause significant beam envelope mismatch and emittance growth.This mismatch can be mitigated by retuning the matching lattice beam line elements after including space-charge effects.
In this study, we also compared the final x-ray radiation from the simulation using the real number of electrons and the simulation using one million macroparticles.Both simulations show reasonable agreement in the prediction of 1 nm SASE FEL radiation power while the one million macroparticle simulation significantly overpredicts the radiation power for the third harmonic 0.33 nm x-ray radiation.In the self-seeding x-ray radiation, the one million macroparticle simulation case also shows larger temporal radiation power fluctuation in comparison to the use of the real number of electrons.Those discrepancies could be due to the lack of resolution in the use of fewer macroparticles in the one million microparticle simulation.

FIG. 1 .
FIG. 1. Amplitude of the Fourier coefficient difference from the FFT of an analytical Gaussian function and a sampled Gaussian function with 10 k, 100 k, 1 M, and 10 M macroparticles.

FIG. 6 .
FIG.5.Evolution of transverse rms sizes (top) and transverse rms emittances (bottom) without (red) and with (green) spacecharge effects in the simulation.

FIG. 7 .
FIG. 7. Initial sinusoidal perturbation gain evolution inside the injector from the IMPACT simulations (dots) and the linear model (line).

FIG. 12 .
FIG.12.Evolution of the 1 nm x-ray average radiation power inside the first section of the SASE undulator beam line using electron beams with 5, 10, 15 and 20 keV uncorrelated energy spread from the laser heater.

FIG. 13 .
FIG.13.Evolution of the average x-ray radiation power at 1 nm (top) and 0.33 nm (bottom) wavelength inside the first undulator section of the SASE FEL scheme with the real number of electrons (red) and the one million macroparticles (green).

FIG. 14 .
FIG.14.Temporal (top) and spectral (bottom) profiles of the 1 nm x-ray radiation at the end of the first undulator section in the SASE FEL scheme.

FIG. 15 .
FIG.15.Evolution of the average 1 nm x-ray radiation power inside the second undulator section of the self-seeded FEL beam line with the real number of electrons (red) and the one million macroparticle simulations (green).

FIG. 16 .FIG. 18
FIG.16.Temporal (top) and spectral (bottom) profiles of the 1 nm x-ray radiation at 41 m undulator location in the self-seeded FEL scheme with the real number of electrons (red) and the one million macroparticle simulations (green).