Brightness analysis of an electron beam with a complex profile

We propose a novel analysis method to obtain the core bright part of an electron beam with a complex phase-space profile. This method is beneficial to evaluate the performance of simulation data of a linear accelerator (linac), such as an x-ray free electron laser (XFEL) machine, since the phase-space distribution of a linac electron beam is not simple, compared to a Gaussian beam in a synchrotron. In this analysis, the brightness of undulator radiation is calculated and the core of an electron beam is determined by maximizing the brightness. We successfully extracted core electrons from a complex beam profile of XFEL simulation data, which was not expressed by a set of slice parameters. FEL simulations showed that the FEL intensity was well remained even after extracting the core part. Consequently, the FEL performance can be estimated by this analysis without time-consuming FEL simulations.


I. INTRODUCTION
Brilliant electron beams from linear accelerators (linac) are widely utilized for synchrotron radiation facilities etc., such as x-ray free electron lasers (XFEL) [1] and energy recovery linacs (ERL) [2]. The performance of synchrotron radiation mainly depends on the brightness of the electron beam core, because a tail part of an electron beam does not contribute to the FEL interaction. Since an electron beam of a storage-ring-based machine has a simple Gaussian profile, the performance can be easily evaluated by conventional root-mean-square (rms) emittance. However, an electron beam from a linac usually does not have a simple Gaussian profile due to the nonuniformity of a beam emitter and collective effects of electrons, such as a space repulsive force, CSR (coherent synchrotron radiation), and wake-fields via physical boundaries of accelerator components, etc. Therefore, conventional beam parameters, such as rms emittance, do not always reflect the brightness of the beam core sufficiently.
For a self-amplified spontaneous emission (SASE) FEL, the FEL gain can be evaluated from the peak current, the slice emittance and the slice energy spread of an electron beam by using a simple model [3]. However, this simple model sometimes is not applicable to a real SASE-XFEL machine, when an electron beam profile is far from a simple Gaussian beam frequently seen in case of hard bunch compression. One of the reasons for this incompatibility is thought to be that beam parameters, such as a slice emittance, are calculated from all the electrons in a specified time slice. An electron beam with a complex profile usually has a considerable tail and halo electrons that do not contribute to the FEL interaction. Therefore, the FEL performance of such a complex electron beam must be evaluated by a time-consuming three-dimensional FEL simulation. In order to efficiently design a high-performance SASE-FEL or another linac-based synchrotron radiation machine, it is critically important to evaluate effective slice parameters, such as a slice emittance, a slice energy spread and a peak current, which represent the bunch part contributing to SASE-FEL.
In this paper, we propose a method to extract the core bright part (lasing part) of an electron beam with a complex phase-space distribution. The brightness of the electron beam can be evaluated by the emittance and the beam current of the core bright part, which are more reliable than those from the conventional rms calculation for the whole electron beam. Core electrons in the beam are selected with a help of the brightness of undulator radiation from the beam. This method is finally applied to a simulation data of the XFEL facility, SACLA [4] in order to verify the effectiveness of this method.

II. BRIGHTNESS CALCULATION
The brightness of an electron beam is usually calculated from the emittance and the beam current for a Gaussian beam. However, it is difficult to determine the effective emittance and the effective beam current of the core part of a complicated electron beam. Therefore, we try to find the core bright part from an electron beam having an arbitrary phase-space distribution by using the brightness of undulator radiation from the beam. Since the core bright part should generate the brightest undulator radiation, the electrons that maximize the radiation brightness will be looked up in this analysis.
We start the analysis from the brightness calculation of a Gaussian electron beam in Sec. II A, since the brightness can be analytically obtained in the Gaussian case. The contribution of a single electron to the radiation brightness is derived in case of a Gaussian beam in Sec. II B and it is also applied to an electron beam with a complicated phasespace distribution. In this way, the radiation brightness from any electron beams can be calculated by integrating the contribution of each electron as described in Sec. II C. The core bright part of an electron beam can also be extracted by applying a threshold to the contribution of each electron to the brightness.

A. Brightness of undulator radiation from a Gaussian electron beam
Before the description of undulator radiation, the Gaussian electron beam is defined at first. The transverse phase-space distribution of a Gaussian beam can be written by where q is the total charge of the beam, x ≡ ðx; x 0 ; y; y 0 Þ T is a phase-space coordinate, ðx; yÞ and ðx 0 ; y 0 Þ are the position and the slope of an electron, respectively, and Σ ⊝ is the covariance matrix of the phase-space distribution: Here, α ξ , β ξ and γ ξ (ξ ¼ x, y) are Twiss parameters [5], and x − y coupling is neglected. Since Σ ⊝ is positive-definite, β ξ and γ ξ are positive, and the matrix elements satisfy the formula: The parameter, ϵ ξ , is the rms emittance, which is calculated from where hξ 2 i indicates the mean value of ξ 2 . In order to evaluate the brightness of undulator radiation for a Gaussian electron beam, let us remind properties of undulator radiation from a single electron. The lowest order radiation from an electron in an undulator can be approximated by a Gaussian mode [6]. The phase-space distribution of undulator radiation from an electron, f Ã 1 ðxÞ, can be written by where e 0 is the elementary charge, I 0 is the photon flux from a unit charge, and Σ Ã is defined as by using photon Twiss parameters, α Ã , β Ã and γ Ã . The photon emittance, ϵ Ã , is given by where λ is the wavelength of the photon. At the source point, the photon Twiss parameters satisfy where L is the undulator length [7]. Since the photon emittance takes the minimum value of the uncertainty principle, this radiation has spatially perfect coherence. The brightness of this coherent radiation, B Ã 1 , can be defined as We consider the brightness of undulator radiation from a Gaussian electron beam. The phase-space distribution of this radiation, f Ã G , can be written by the convolution of Eqs. (1) and (4): This integration can be calculated by using the formula of covariance matrices: covðx 1 þ x 2 ; yÞ ¼ covðx 1 ; yÞ þ covðx 2 ; yÞ; and by assuming that dynamics of electrons and photons are independent. Let x ⊝ and x Ã be the probability variables of electrons and photons, respectively. The covariance matrix after the convolution is when x ⊝ and x Ã are assumed to be independent. Consequently, the phase-space distribution of radiation is obtained to be The covariance matrix, Σ ⊝ þ Σ Ã , becomes and its determinant is Here, the mismatch parameter, Δ ξ , is defined as Thus, the brightness of this radiation, B Ã G , is

B. Contribution of a single electron to the radiation brightness
In order to calculate the brightness of undulator radiation from an electron beam with a complex phase-space distribution, we consider the contribution of a single electron to the brightness. If the contribution of each electron is obtained, the radiation brightness from an arbitrary electron beam can be calculated by summing up the contribution. Since the brightness of undulator radiation from a Gaussian beam has been already obtained, we try to derive the contribution of a single electron to the brightness of undulator radiation in the Gaussian case.
We define gðxÞ as the contribution of a single electron to the brightness of undulator radiation from a Gaussian beam given by Eq. (1). Since gðxÞ should have a maximum at the phase-space origin and vanish for an electron far from the origin, gðxÞ is considered to be Gaussian also. Therefore, gðxÞ can be written by where C is a normalization factor. The covariance matrix, Σ, is defined as, which can be different from Σ ⊝ of Eq.
(2). WhenB is defined as the brightness computed from gðxÞ,B is calculated from Eqs. (1) and (7): The parameters in Eq. (7) can be determined by maximiz-ingB, sinceB should reflect the brightest part of the electron beam, and by makingB equal to Eq. (6). The brightness,B, can be maximized under the condition of Eq. (3) by using the method of Lagrange multipliers. For simplicity, we take the expression inside the square root of Eq. (8) as a Lagrange function instead of Eq. (8) itself. The Lagrange function, L, is written by, where λ ξ is a Lagrange multiplier. By taking the partial derivatives of L to be 0, the value inside the square root of Eq. (8) gives a minimum at and the Lagrange multipliers are determined to be Thus, the Twiss parameters of Σ ⊝ andΣ are identical in case of a Gaussian beam. The maximum brightness is obtained to beB We want to know C andΣ in Eq. (7) in case that the calculated brightness,B max , is equal to the brightness of undulator radiation, B Ã G , in Eq. (6). However, B Ã G has uncertainty due to the mismatch parameter, Δ ξ , and hence an additional constraint is necessary. Since B Ã G should be as large as possible, we take the maximum value of B Ã G . The brightness, B Ã G , can also be maximized in the similar way as above. As a result, B Ã G takes a maximum value, when the Twiss parameters satisfy This means that the beam envelop of electrons is perfectly matched to that of undulator radiation. From the equation, B max ¼ B Ã G;max , the emittances in Eq. (9),ε x andε y , must bê in order to satisfy the equation for any values of ϵ x and ϵ y . Consequently, the normalization factor, C, is determined to be and the contribution of each electron to the brightness, gðxÞ, is where Σ is expressed by C. Brightness of undulator radiation from an arbitrary electron distribution By using Eq. (12), we can calculate the brightness of the undulator radiation from an electron beam with an arbitrary phase-space distribution, supposing that the phase-space matching between the electrons and the photons is optimum and that the result from a Gaussian beam can also be applied to any electron beams. If we know the phase-space distribution obtained from a particle tracking simulation of an accelerator, we can get the radiation brightness by integrating the product of Eq. (12) and the electron distribution. The brightness, B, can be written by where fðxÞ is the phase-space distribution of the electron beam and x 0 is the parameter giving the central axis of the electron beam, x 0 ≡ ðx 0 ; x 0 0 ; y 0 ; y 0 0 Þ T . The Twiss parameters, α ξ , β ξ , γ ξ (ξ ¼ x, y) in gðxÞ, and the beam axis, x 0 , are determined by maximizing B. Although the obtained Twiss parameters are the same as conventional rms calculation in case of a Gaussian electron beam as derived in the previous section, the Twiss parameters are different from the rms calculation for a complicated electron beam. Thus, the parameters obtained from this analysis reflect the core bright part of the electron beam.
In order to apply this analysis method to actual simulation data, we need to prepare two a priori information. One is the photon wavelength to determine the photon emittance, ϵ Ã , and the other is the phase-space distribution of electrons. Since I 0 in Eq. (12) is a constant which does not affect the analysis, it is not necessary to be specified. The other parameters, such as Twiss parameters and the beam axis, are then determined as the best values that maximize Eq. (13). The effective beam charge or current contributing to the brightness can be calculated by extracting the electrons whose contributions to the brightness are higher than a certain threshold. The effective emittance of the electron beam core can also be estimated from the extracted electrons. The obtained parameters of the core electrons can be utilized for the brightness evaluation of the electron beam and one-dimensional FEL calculations etc. Therefore, this analysis method has possibilities to evaluate the FEL performance properly without executing heavy three-dimensional FEL simulations.

III. APPLICATION TO ELECTRON BEAM FOR XFEL
In order to confirm the applicability of the brightness analysis method, we applied this method to some simulation data. The appropriateness of the analysis procedure was confirmed by simple Gaussian input datasets, which is described in Appendix A. We then applied this method to a simulation data of the XFEL machine, SACLA, as an actual case. For simplicity, we normalize I 0 to unity in this analysis. The photon energy is set to 10 keV, corresponding to the wavelength of 0.124 nm, for all the analyses. The function optimization library, MINUIT [8], was used for maximizing the brightness of undulator radiation.
This analysis was applied to two data sets, A and B, for comparison. Each of the datasets has a charge of 278 pC and the beam energy of approximately 8 GeV. For the data set A, the bunch compression in the linac was moderate and the peak current was approximately 5 kA. For the data set B, the longitudinal bunch length was compressed as short as possible and the peak current was approximately 40 kA. The phase-space distributions of these data sets are plotted in Fig. 1 together with the ellipses representing the core bright parts as the analysis results and the conventional rms values for comparison. The areas of the ellipses are set to the intrinsic photon emittance, ϵ Ã , for the brightness analysis results, and rms emittances for the conventional calculations. The horizontal and vertical normalized rms emittances of the data set A were 1.86 μm rad and 1.81 μm rad, respectively, and those of the data set B were 5.78 μm rad and 1.76 μm rad, respectively. Since the phase-space distribution is dissimilar to Gaussian, the conventional rms emittance does not appropriately reflect the brightness of the electron beam.
The histograms of the beam current and the slice brightness are shown in Fig. 2. Electrons in the tail part of each dataset, s < −10 μm for the data set A and s < −2 μm for the data set B, have almost no contribution to the brightness. This behavior indicates that the slice emittance, the betatron function or the beam axis depends on the longitudinal position in the electron beam.
In order to obtain the core of the electron beam, we dropped electrons with smaller contribution to the brightness of undulator radiation. Since the contribution to the brightness, Eq. (12), is a Gaussian, the threshold of the contribution was changed on a standard deviation basis counted by the photon emittance (ϵ Ã ). If the exponent part of Eq. (12), −x T Σ −1 x=2, of an electron is smaller than a certain threshold, −N 2 =2, this electron is discarded, where N is the number of standard deviations (stds.). The diameters of the blue ellipses in Fig. 1 correspond to one std. of the threshold. The survived charge and the normalized emittance are plotted in Figs. 3 and 4, respectively. Since the beam profile of the data set B is more scattered than A, the survived charge of B is significantly smaller than A. The emittances are almost same up to the cut threshold of 5 stds. of the photon emittance. The emittance at 5 stds., for instance, is approximately 0.5 μm rad for both datasets. Figure 5 shows the brightness and the ratio of the dropped brightness to the total brightness. The tendency of the brightness is almost same as each other. The only difference is the absolute brightness value due to the difference of the survived charge. Thus, an effective charge and emittance were obtained by setting a certain threshold to the contribution to the brightness. Figure 6 shows the phase-space distributions of the core bright parts of the data sets A and B. The cut threshold is set to 5 stds. of the photon emittance. The transverse phasespace distributions are substantially similar to Gaussian, compared with the distributions before cut (Fig. 1), although a fine structure can be seen in a certain level. The beam current histograms of the extracted electrons are shown in Fig. 2 (orange). The core bright parts have still high peak current of approximately 3 kA for the data set A and approximately 15 kA for the data set B. Thus, the brightness analysis successfully found the brightest part in the transverse phase space.
In order to investigate the relationship between the FEL performance and the brightness threshold, we performed XFEL simulations by using SIMPLEX [9]. The undulator beamline consists of 18 undulator segments with the period of 18 mm and the segment length of 5 m. The lattice of the beamline is FUDU (focusing quadrupole, undulator, defocusing quadrupole, and undulator). The quadrupole field strength was adjusted so that the average beta function fit into 22 m, which is the typical value of SACLA. The K value of each undulator was set to the constant value of approximately 2.18, corresponding to 10 keV photons, without any tapers.
The FEL pulse energies dependent on the survived charge for the data sets A and B are plotted in Fig. 7. The pulse energies reached plateaus at the survived charges of approximately 180 pC for the data set A and 100 pC for the data set B, corresponding to the cut threshold of 6 stds. Although the contribution to the brightness is quite small above the threshold of 3 stds., electrons with smaller brightness still contribute to the FEL interaction. The reason for this inconsistency will be discussed in Sec. IV. For the data set B, the FEL pulse energy grows up again around 200 pC. This increase probably comes from the secondary lasing part in the electron beam. The interpretation of this phenomenon is discussed in the Appendix B. Finally, we compare FEL performances from several simulation conditions to confirm whether the beam parameters from the brightness analysis properly reflect the FEL performance or not. The two of the conditions are the simulation results from the original particle data of the entire electrons and of electrons in the core bright part. The cut threshold for the bright part is set to 6 stds. of the photon emittance for both datasets. The other two are Gaussian transverse profiles having the slice rms parameters from the entire electron beam and from the core bright part, while the longitudinal profiles are same as original. The FEL gain curves for these conditions are plotted in Fig. 8. For the data set A, all the gain curves show similar performance, since the transverse profile is not far from Gaussian. For the data set B, on the other hand, the result from the Gaussian transverse profile for the entire electrons is much worse than the others. This means that the conventional slice rms parameters do not properly reflect the electron beam brightness for the beam with a highly complicated profile. For both data sets, the results from the core bright part do not depend on the condition of either the original particle data or the Gaussian transverse profile. In addition, it is notable that the core bright part has similar FEL gain as the entire beam, even if the survived charge is less than a half. Consequently, the brightness analysis can appropriately extract the core bright part of an electron beam without any significant degradation of FEL performance.

IV. DISCUSSION
The analysis in the previous section showed that most of the brightness of undulator radiation comes from electrons within 3 stds. phase-space volume of the intrinsic photon emittance, ϵ Ã in Eq (5). However, the contribution to the FEL interaction still remained up to the cut threshold of about 6 stds. This effect can be explained by the optical guiding of an FEL [10]. An electron beam with finite emittance can produce higher-order spatial modes of the FEL in addition to the fundamental spatial mode. However, the FEL gain of the fundamental mode is larger than those of higher-order modes thanks to optical guiding. Therefore, the fundamental mode becomes dominant after sufficient FEL amplification. As a result, electrons with smaller contributions to the brightness also amplify the fundamental spatial mode of the FEL.
The scaling function of the three-dimensional FEL gain from the emittance, beta function and energy spread were studied in Ref.
[3]. This scaling function expresses the three-dimensional FEL gain, L g , as where L 1D is the one-dimensional FEL gain length. The three-dimensional effect is included in Λðη d ; η ϵ ; η γ Þ, where η d is related to the diffraction effect, η ϵ reflects the emittance of an electron beam and η γ characterizes the energy spread. Among them, η ϵ is the most sensitive to the cut threshold of the brightness analysis and the others are nearly independent of the threshold. The emittance parameter, η ϵ , is written as where ϵ ξ and β ξ are the emittance and beta function of the electron beam, respectively, and ϵ Ã is the photon emittance.
In order to suppress the degradation of the FEL gain, η ϵ should be sufficiently smaller than unity. For the FEL simulations in the previous section, the normalized electron emittance of the core bright part was approximately 0.5 μm mrad, corresponding to 3.3 times larger value than the photon emittance. In contrast, the one-dimensional gain length, L 1D , is 1 or 2 m, which is one order of magnitude smaller than the beta function. As a result, η ϵ takes approximately 0.3, which is well below unity. Consequently, this small η ϵ is thought to be the reason why electrons with smaller brightness can contribute to the FEL interaction.

V. CONCLUSIONS
Since the phase-space distribution of an electron beam from a linear accelerator is not always a simple Gaussian shape, it is sometimes difficult to analyze the brightness of the electron beam. A conventional rms emittance, for example, is not satisfactory to estimate the FEL performance for a complicated phase-space distribution. Therefore, it is necessary to run a heavy three-dimensional FEL simulation for such a complicated beam. To accelerate the performance evaluation, we considered a simple method to extract the core bright part of an electron beam by using the brightness of undulator radiation. The brightness was easily calculated by accumulating the contribution of each electron to the brightness of undulator radiation. The core bright part of an electron beam was appropriately obtained for XFEL simulation data by optimizing the brightness. An FEL simulation showed that the FEL gain of extracted core electrons was comparable to that of the entire electron beam. We also found that electrons with relatively smaller brightness significantly contribute to the FEL pulse energy. The cut threshold for sufficient FEL interaction was approximately 6 stds. of the intrinsic photon emittance. Consequently, parameters from the brightness analysis are highly beneficial to evaluate FEL performance without running time-consuming FEL simulations.

APPENDIX A: CONFIRMATION BY GAUSSIAN PHASE-SPACE DATA
To confirm appropriateness of the brightness analysis, we applied this analysis to a Gaussian phase-space data as the simplest case. An example of the input parameter set and the analysis result is summarized in Table I. In this example, we performed the simulation 100 times and the results are represented as the mean and rms values. The maximum brightness was obtained to be ð6.824 AE 0.068Þ × 10 9 from Eq. (13), which agreed well with the analytical calculation of 6.803 × 10 9 from Eq. (10). The obtained Twiss parameters were also consistent with the input parameters within statistical uncertainties, as derived in Eq. (11). The phase-space distribution of one of the analyzed data is shown in Fig. 9. The phase-space ellipse of the Twiss parameters from the analysis is also plotted. The emittance of the ellipse is set to the intrinsic photon emittance, ϵ Ã , in Eq. (5). Thus, the analysis result showed a good agreement with the input parameter set.
In order to obtain the core part of the electron beam, we dropped electrons having smaller contribution to the brightness of undulator radiation. Figures 10 and 11 shows the survived charge and the normalized emittance, respectively, as functions of the cut threshold N counted by std. of the photon emittance ðϵ Ã Þ. About a half of the charge survives at the threshold of 4 stds. and the emittance in this case is 0.34 μm rad, which is half of the input parameter. Figure 12 shows the brightness and the ratio of the dropped brightness to the total brightness. Almost all of the brightness are survived if the threshold is more than 3 stds.
We performed XFEL simulations by using SIMPLEX [9] and investigated the relationship between the FEL performance and the brightness threshold. The simulation setup was the same as Sec. III. Figure 13 shows the FEL pulse energy as a function of survived charge. The pulse energy is almost proportional to the charge up to 85 pC and the contribution to the pulse energy decreases above 85 pC. This boundary corresponds to the brightness threshold of approximately 6 stds., which is consistent with the results in Sec. III.

APPENDIX B: INTERPRETATION OF SECONDARY FEL GROWTH
The XFEL simulation data set B in Sec. III has a secondary FEL growth around the survived charge of 200 pC, as shown in Fig. 7 (right). Therefore, we investigated the reason for this phenomenon by scanning the profile of FEL radiation during the amplification. Figure 14 shows the FEL profiles around the end of the exponential growth region (z ¼ 48.0 m) and at the end of the undulator beamline (z ¼ 109.5 m), where z is the distance from the entrance of the undulator beamline. The left image in Fig. 14 has two peaks, presumably coming from transversely different lasing parts. The final FEL profile (Fig. 14 right) shows a single peak, probably due to the betatron oscillation of the electron beam, which merged the projections of the two lasing parts. We found that these two lasing parts were longitudinally separated with a distance of approximately 1.6 μm, as shown in Fig. 15, which was too long to interact each other through emitted photons. Such a behavior was not found in the FEL simulation result for the core electrons of the data set B (below the survived charge of 160 pC) nor for the whole charge of the data set A. Since the brightness analysis in this paper finds the maximum of the radiation brightness, a secondary peak would be neglected if the beam had two or more peaks. It is conceivable that only the primary part was survived for a tight threshold region and that the second bright part was joined for a loose threshold. Even though the data set has two brightness peaks, the primary bright part indicates the common FEL behaviour with the other data, as shown in Fig. 7 right (less than 160 pC). Therefore, the brightness analysis in this paper is still effective for an electron beam with several brightness peaks.