Accurate measurement of uncorrelated energy spread in electron beam

We present measurements of slice energy spread at the injector section of the European X-Ray Free Electron Laser for an electron bunch with charge of 250 pC. Two methods considered in the paper are based on measurements at the dispersive section after a transverse deflecting structure (TDS). The first approach uses measurements at different beam energies. We show that with a proper scaling of the TDS voltage with the beam energy the rms error of the measurement is less than 0.3 keV for the energy spread of 6 keV. In the second approach we demonstrate that keeping the beam energy constant but adjusting only the optics we are able to simplify the measurement complexity and to reduce the rms error below 0.1 keV. The accuracy of the measurement is confirmed by numerical modelling including beam transport effects and collective beam dynamics of the electron beam. The slice energy spread measured at the European XFEL for the beam charge of 250 pC is nearly 3 times lower as the one reported recently at SwissFEL for the same cathode material and the beam charge of 200 pC.


I. INTRODUCTION
The small emittance and the low energy spread of the electron beam required at X-Ray Free Electron Lasers (XFELs) can cause the microbunching instability [1,2] and destroy the lasing. On the other hand, a large initial energy spread will hinder a proper compression of the bunch and will lead to intolerable energy spread after arXiv:2103.11640v1 [physics.acc-ph] 22 Mar 2021 compression. Hence a reliable high resolution method of the measurements of the uncorrelated (or slice) energy spread is crucial for a proper operation of the modern facilities.
In order to measure the slice energy spread a standard approach with a transverse deflector and the dispersive section is used. However, it shows only a low resolution (of several keV) due to impact of OTR screen resolution, the betatron beam size and the deflector strength on the measurement. The energy spread induced by deflector can be excluded with a set of measurements with different deflector amplitudes.
Such experiments have been done at PITZ [3].
Recently in [4] it was suggested to carry out the measurements at different electron beam energies. For the setup used at SwissFEL -deflector at constant energy and an acceleration section after it -the authors have written a polynomial equation of the second order and analyzed the accuracy of the coefficient reconstruction relative to statistical and systematic errors. On the basis of this analysis they concluded that the accuracy of the measurements for their setup could be better than 1 keV. In order to exclude the impact of the deflector the authors in [4] suggested to carry out additional sets of measurements, but it was not done and an analytical estimation was used instead.
The energy scan method seems to be simple. However at the layout of the European XFEL this method requires modifications and even with the changes described in this paper it has not shown the expected performance.
At this paper we present the measurement at the European XFEL with layout shown in Fig. 1. The situation is different as compared to SwissFEL case. The deflector is placed after the acceleration section, and the beam energy in it changes during the experiment. This case was mentioned in [4] too and it was suggested to use a polynomial equation of the third order with additional sets of measurements in order to exclude the impact of the deflector.
If we use only energy scan then in our setup the accuracy of the reconstruction of the polynomial of the third order is low and very sensitive to errors. In order to overcome it we suggest a proper scaling of the deflector voltage with the beam energy. It allows (1) to reduce the order of the polynomial equation; (2) to avoid a need in additional sets of measurement with different deflector amplitudes. And the most important advantage of the suggested method is (3) a considerable higher accuracy of the reconstruction of the coefficients and as a consequence a higher accuracy of the energy spread measurements. The experiments described in our paper are done at low energetic part of the facility. In order to analyze the accuracy of the measurement we have done numerical modeling including beam transport effects and collective beam dynamics of the electron beam. We have found that the radio-frequency (RF) focusing impacts the beam considerably and a matching of the beam to the optics before the TDS is necessary for each beam energy. Additionally we see in the modeling and in the experiment that due to collective effects the emittance and the energy spread are not constant during the energy scan.
Applying the method based on the energy scan in practice we have found that (for our setup and a small interval of energy change available) the method is very time-intensive due to beam matching and the optics scaling. In the measurements we have failed to obtain reliable data which allow to carry out an accurate reconstruction. Hence we developed another method and have used the data from energy scan experiments only to show the consistence with the results obtained by the second method.
In the second approach we keep the beam energy constant and avoid timeconsuming matching of the beam before TDS. By adjusting the strength of quadrupoles after TDS we are able to carry out independent scans in dispersion, in TDS strength and in beta-function on OTR screen. The method is fast and allows to obtain accurate measurements of slice energy spread with resolution better than 0.1 keV.
The paper is organized as follows. The methods of the measurement and their analysis are described in Section II. The beam dynamics modeling of the approaches with collective effects is considered in Section III. Then, in Section IV the results of the measurements at the European XFEL injector and their analysis are presented.

II. METHODS OF THE MEASUREMENT AND THEIR ANALYSIS
For the setup of Fig. 1 the measured beam size σ M on the screen can be written as where E is the beam energy, σ R is the screen resolution, β x is the optical function at the position of the screen, n is the normalized beam emittance, γ 0 is the relative beam energy, D is the horizontal dispersion at the screen position; β 0 y , γ 0 y and α 0 y are the twiss parameters at the beginning of TDS; k, V, and L are the wave number, voltage and length of the TDS and e is the electron charge.
In this section we propose and validate two methods to measure the slice energy spread. The parameters used in the simulations are listed in Table I. These param- eters are close to estimations obtained in the experiment. The resolution of OTR screen is 28 µm and it agrees with other publications: 10-20 µm in [5], 30 µm in [4].

A. Method based on energy scan
If the second and the third terms in the right hand side of Eq.(1) are not known then the energy spread can be estimated as The error of this estimation is defined by the resolution In order to increase the resolution it was suggested in [4] to "perform beam size measurements for different energies and deflector voltages and to fit the data" with Eq.(1). Note that Eq.(1) uses a more accurate approximation of the last term compared to [4] where the authors used σ 2 I = n β 0 y /γ 0 . If we keep the voltage of the deflector constant and change only the beam energies than we can fit the measurements to Eq.(1) in hope to reconstruct all coefficients of this polynomial. We simulated with Eq.(1) a measurement of the beam size σ M with constant TDS voltage V 0 and the beam energy changing between 90 and 190 MeV with step of 10 MeV. At each beam energy we simulate 30 measurements of the beam size σ M with random error of 2%. We consider the slice energy spread between 0.5 and 7 keV. In the fit we used the simplex search method of Lagarias et al [6].
From numerical experiment we have found that the rms error of the reconstruction of energy spread is larger than 2 keV. Under the rms error of reconstruction in the paper we mean the value defined as where N is the number of shots (reconstructions), σ E is the energy spread obtained from the reconstruction (of the polynomial coefficient from the simulated measurements) and σ 0 E is true energy spread used in the simulation of the reconstruction procedure. In order to estimate this error we used 100 shots at each energy spread point.
In order to reduce the error we can do an additional scan with different deflector voltages to estimate the last term in Eq. (1). With this estimation we reduce the error of the reconstruction. However, we will not analyze this approach here and suggest below another technique to reduce the order of the polynomial and to increase the accuracy of the reconstruction of the polynomial coefficients.
It can be achieved if we will keep constant not the voltage V but the streaking parameter of the deflector: where ∆µ y is the phase advance between the middle of TDS and the OTR screen, β 0 y is the optical function at the TDS, β y is the optical function at the position of OTR and the voltage V 0 is a fixed value which produces the desired streak S 0 at the fixed beam energy E 0 .
In the following we adjust the voltage of TDS proportionally to the beam energy: If we put Eq.(6) in Eq.(1) then we reduce the order of the polynomial from the third to the second one: We simulated with Eq. In experiment and in the beam dynamics simulations we have not been able to show this accuracy. We show with beam dynamics simulations that in order to use this method we have to match the beam to the optics at each beam energy. It requires considerable efforts and we failed to make it with high accuracy at the experiment. Additionally, in the modelling and the experiment we have seen that the slice emittance is not constant.

B. Method based on dispersion scan
In this section we present another method which use constant beam energy E 0 and avoids above described difficulties. The method shows much better resolution theoretically and it is easy to use experimentally.
We have developed a special optics described in the next section. Using only few quadrupoles between TDS and the OTR screen we are able to change the dispersion D at the OTR position keeping β x -function constant with only moderate changes in β y -function and in the streaking S .
We start with changing of TDS voltage V and fit the measured slice size σ M to the quadratic polynomial: During the scan we keep the dispersion at constant value D 0 . At the second step we keep constant the TDS voltage at V 0 and change the dispersion D. We fit the measured slice size σ M to the quadratic polynomial: After these two fits we are able to find out all terms of Eq. (1): Eq. (11) We simulated with Eq. (1) the measurement of the beam size σ M for two scans as given by Eqs. If the errors are systematic with the same sign then the reconstruction of energy spread only weakly affected by them. Indeed, we calculate energy spread by Eq. (10) and use only the constant terms A D and A V . If we suggest that during the TDS voltage scan we set the voltage with the same negative error, for example it is 10 %, then it has only impact on coefficient B V which in this case will be increased by factor 0.9 −2 , but the constant term A V is not changed. The same is true for the impact of the systematic error in the dispersion D during the dispersion scan.
Hence we analyze only random errors in the setup of voltage or dispersion. The results of the analysis are shown in Fig. 4. In the suggestion of rms error of 5% the rms reconstruction error remains below 0.3 keV for the energy spread of 6 keV.

III. MODELLING OF THE EXPERIMENT WITH COLLECTIVE EFFECTS AND THE BEAM TRANSPORT
The electron beam dynamics at the European XFEL accelerator has been recently discussed in [7] and [8]. In the last work, an experimental validation of the collective effects modeling at the European XFEL injector was presented. Here we use the same approach from [8] to simulate the beam dynamics, namely (1) the dynamics of the electron beam in the gun was simulated using ASTRA code [10], (2) the beam tracking starting from 3.2 m from the gun cathode, was performed using Ocelot code [9] with the space charge and the wakefield effects included, (3) the coherent synchrotron radiation was omitted as negligible for this section. In the measurements described in Section IV we have found that the uncorrelated energy spread is equal to approximately 5.9 keV. As it is discussed in Section V one of the possible reasons of such large energy spread could be intrabeam scattering (IBS). The codes ASTRA and Ocelot do not model IBS. In the simulation of RF gun with ASTRA for charge of 250 pC we obtain the energy spread of 0.6 keV. Hence we apply random generator at distance of 3.2 m from the cathode to increase the energy spread artificially to 5.9 keV. The properties of the electron bunch after this procedure at position z = 3.2 m are shown in Fig. 5. Let us note here that the projected emittance at this distance from the cathode is relatively large. The emittance will reduce in the booster considerably according with the emittance compensation process [11].

A. Magnetic lattice and its properties
A special optics (shown in Fig. 6 and Table I)  Taking into account the effect described above, the third harmonic cavity AH1 was turned off. measurement of the slice energy spread was carried out at the ex-tremum of the mean slice energy. The horizontal twiss parameters of the slice have been matched to the magnetic lattice before TDS. Since the RF-focusing effect is strong, the beam should be matched for all beam energies. At the Fig. 9 are shown β-functions of the central slice for highest and lowest energies. Twiss parameters were calculated from the beam transported in Ocelot with collective effects included.
In the simulations and in the experiment we have seen increase of the slice emittance by 30% at the highest voltage of RF module A1. It is due to very strong RF focusing and very small β-functions in module A1 which, in turn, enhance the SC effect. Additionally we think that IBS would change the energy spread during the energy scan as well. But this effect was omitted in the simulation.
The true values used in the simulation are listed in the first row of Table II. For the data shown in the right plot of Fig. 10 the reconstruction was impossible.
The black dotted line shows the expected values calculated by Eq. (7) using the true data listed in the first row of   Table II. Thus, in the setup of the European XFEL the slice matching procedure should be applied on each step. However even with the matching the reconstruction could be non-accurate due to changes in the slice emittance and the energy spread at different energies.  The results of the modelling are shown in Fig. 11. The black circles show the central slice width σ M obtained from beam dynamics simulations. The blue dotted lines presents the curves reconstructed by method of Section II B.
Using reconstruction procedure described in Section II B for the true energy spread of 5.9 keV we got the reconstructed values listed in the last row of Table II.
We see that all values are reconstructed with high accuracy. For the true energy spread of 2 keV the reconstructed energy spread is 2.13 keV.

IV. MEASUREMENTS
In the analysis of the images obtained in the experiment we have followed the same procedure as in the simulations. At each point we took 30 images and for each of them we calculated the mean slice energy and the slice size. The slice length was taken about 0.2 ps and the slice width was found by fitting to the Gaussian shape.
Then the slice width at the extremum of the mean slice energy curve has been taken as σ M .
From the measurements we estimate that the standard deviation error in σ M is below 1.5 %. Hence the error in the mean value from the 30 measurement is below 0.3%.
Due to substantial difficulties with the energy scan method in the experiment we change the order of consideration and consider the energy scan method at the beginning.  Table. At the second step we conducted the measurements at constant TDS voltage    The measured values from Table III correspond to the coordinate t = 0 ps at  Table IV. In the same Table are presented the physical values of interest with the estimated errors. They are obtained with the help of Eqs.(10)- (11). The errors are estimated by the numerical experiment described in Section II A.
If we take into account that the estimated instrumental errors in the setup of the TDS voltage and dispersion are smaller than 2 % then we can state that the uncorrelated energy spread in the core of the beam is equal to 5.9 ± 0.1 k eV. Note that the emittance estimation agrees well with the independent method of the mesurement of the beam emittance (see Fig. 15). Finally the estimated screen resolution σ R agrees with the numbers published in [4,5]. The results are shown in Fig. 14. We were not able to do the reconstruction from the data measured and simply compare the measurements with the expected values calculated from the results of the previous method presented in Table IV.
Taking into account the issues with the beam matching and non-constant slice emittance (see Section III B) we think that there is no contradiction between the data.
It is shown in Section III B that the energy scan method could be used but requires stringent control of the shape of the longitudinal phase space and very accurate matching of the beam to the optics before TDS. Unfortunately, we have not managed in two very time-consuming experiments to show it.

C. Validation of the experimental results
In this section we consider several arguments to confirm the accuracy of the obtained data.
The energy spread estimation based on Eq.(10) uses only coefficient A V and A D .
But there is another equation we obtain that the energy spread is equal to 5.946 keV that agrees with the previous estimation (see Table IV) with accuracy 0.03%.
FIG. 15: The slice emittance along the bunch measured by standard method [12]. Black line on the right plot is BMAG parameter [13].
In order to check the estimation of the emittance n we have done an independent measurement of the slice emittance with the standard tools [12] used by operators of the facility. The results of independent measurement of the slice emittance are shown in Fig. 15 and the emittance of the central slice (slice index 0) agrees with the value listed in Table IV.
We had additional possibility to do the measurement of the slice energy spread with the laser heater tuned for maximal SASE radiation energy. We have found that the energy spread in the electron bunch was 7.5 ± 0.1 keV.
In theoretical studies of microbunching carried out by our colleague M. Dohlus (see, for example, [14]) the optimal energy spread after laser heater for microbunching suppression is nearly 8 keV. This number agrees reasonable with the measured one.

V. DISCUSSION
The theoretical calculations with different numerical models predict the uncorrelated energy spread below 1 keV. The discrepancy between the theoretical estimations and the measurements could be caused by neglecting of full physics in the simplified numerical models. For example, it could be that the emission process from the cathode should be simulated differently. Additionally we do not take into account the intrabeam scattering and wakefields in the RF gun cavity. The number of macroparticles used in the simulations does not allow to take into account the microbunching during the transport from the gun to the OTR screen.
It was shown in [15,16] that the intrabeam scattering in the injector section increases the energy spread considerably and has to be taken into account. For example, a simple estimation of the induced energy spread due to IBS from [16] reads where r e is the electron radius, N b is the number of electrons, σ z is the rms length of the bunch, σ x is the transverse rms size and integration is done along the bunch path s. If we use this equation with the parameters used in the paper we obtain that the energy spread introduced during the beam transport from the gun to OTR is about 2 keV. Hence it is considerable effect and should be taken into account in the simulations. We are considering now different models of IBS to include IBS in the beam dynamics codes The energy spread from the RF gun measured at the European XFEL for charge of 250 pC is 5.9 ± 0.1 keV. This number is approximately 3 times lower then the energy spread of 14.8±0.6 keV reported recently by SwissFEL for the bunch charge of 200 pC [4] . The both guns use cesium telluride cathodes and the larger difference between these results requires additional efforts to understand.

VI. SUMMARY
We have described two methods for measurement of the slice energy spread of electron bunch. With the beam dynamics simulations we have identified substantial difficulties of the first method based on energy scan: we need match the beam and the slice emittance changes. The difficulties are confirmed in the real experiment.
We have shown with the beam dynamics simulations and the measurements that the second method based on dispersion scan at the constant beam energy shows high accuracy and easy to conduct.
At the same time the measured slice energy spread of 5.9 ± 0.1 keV is several times higher than theoretically estimated and it requires additional theoretical research to clarify.