Harmonic lasing in x-ray free electron lasers

Harmonic lasing in a free electron laser with a planar undulator (under the condition that the fundamental frequency is suppressed) might be a cheap and efficient way of extension of wavelength ranges of existing and planned x-ray free electron laser (FEL) facilities. Contrary to nonlinear harmonic generation, harmonic lasing can provide much more intense, stable, and narrow-band FEL beam which is easier to handle due to the suppressed fundamental frequency. In this paper we perform a parametrization of the solution of the eigenvalue equation for lasing at odd harmonics, and present an explicit expression for FEL gain length, taking into account all essential effects. We propose and discuss methods for suppression of the fundamental harmonic. We also suggest a combined use of harmonic lasing and lasing at the retuned fundamental wavelength in order to reduce bandwidth and to increase brilliance of x-ray beam at saturation. Considering 3rd harmonic lasing as a practical example, we come to the conclusion that it is much more robust than usually thought, and can be widely used in the existing or planned x-ray FEL (XFEL) facilities. In particular, Linac Coherent Light Source (LCLS) after a minor modification can lase to saturation at the 3rd harmonic up to the photon energy of 25–30 keV providing multigigawatt power level and narrow bandwidth. As for the European XFEL, harmonic lasing would allow one to extend operating range (ultimately up to 100 keV), to reduce FEL bandwidth and to increase brilliance, to enable two-color operation for pump-probe experiments, and to provide more flexible operation at different electron energies. Similar improvements can be realized in other x-ray FEL facilities with gap-tunable undulators like FLASH II, SACLA, LCLS II, etc. Harmonic lasing can be an attractive option for compact x-ray FELs (driven by electron beams with a relatively low energy), allowing the use of the standard undulator technology instead of small-gap in-vacuum devices. Finally, in this paper we discover that in a part of the parameter space, corresponding to the operating range of soft x-ray beam lines of x-ray FEL facilities (like SASE3 beam line of the European XFEL), harmonics can grow faster than the fundamental wavelength. This feature can be used in some experiments, but might also be an unwanted phenomenon, and we discuss possible measures to diminish it.


I. INTRODUCTION
Successful operation of x-ray free electron lasers (FELs) [1][2][3], based on the self-amplified spontaneous emission (SASE) principle [4], down to an A ˚ngstro ¨m regime opens up new horizons for photon science.Even shorter wavelengths are requested by the scientific community.A possible way to extend operating range of a high-gain FEL is to use nonlinear harmonic generation [1,[5][6][7][8][9][10] when bunching at harmonics is driven by the fundamental frequency in the vicinity of saturation.Then odd harmonics can be radiated in the same (planar) undulator.However, intensity of harmonics is rather small; for example, the third one is typically at the level of a percent of the fundamental harmonic intensity [1,[6][7][8]10], and higher harmonics are much weaker.In addition, for a typical user experiment, one has to suppress the fundamental frequency by external filters which might also result in an additional suppression of the harmonic intensity.Note also that a relative bandwidth of a harmonic is approximately the same as that of the fundamental mode [8] contrary to the incoherent undulator radiation for which it is inversely proportional to a harmonic number.Finally, nonlinear harmonic generation in a SASE FEL is more strongly subjected to fluctuations than lasing at the fundamental wavelength [7,8,11].
An alternative option is a harmonic lasing that was first proposed for FEL oscillators [12], and was experimentally demonstrated in infrared and optical wavelength ranges for oscillator configurations [13][14][15][16].Harmonic lasing in single-pass high-gain FELs [5,7,17,18], i.e., the radiative instability at an odd harmonic of the planar undulator developing independently from lasing at the fundamental wavelength, might have significant advantages over nonlinear harmonic generation (much higher power, much better stability, smaller bandwidth, and no necessity in filters), provided that lasing at the fundamental frequency is suppressed (for lasing at the 3rd harmonic) [19].
A possible method to suppress the fundamental harmonic without affecting the third harmonic lasing was suggested in [18]: one can use 2=3 phase shifters between undulator modules.We found out, however, that this method is inefficient in the case of a SASE FEL (the simulations in [18] were done for the case of a monochromatic seed).In this paper we suggest a modification of the phase shifters method which can also work in the case of a SASE FEL.We also propose suppression of the fundamental harmonic by using a spectral filter in a chicane installed between two parts of the undulator (one can also use a closed bump formed by movable quadrupoles of the undulator focusing system).Such a chicane, for example, is used in Linac Coherent Light Source (LCLS) [2] as a part of the self-seeding scheme [20].In either case only minor or no modifications of existing or planned undulator systems are required so that harmonic lasing can be considered as a (practically) free option.
The key question, however, is whether or not the harmonic lasing is sufficiently robust with respect to the electron beam and undulator quality.Undulators for x-ray FELs are usually designed and built with a sufficient safety margin in terms of length and quality [21].As for the electron beam quality, there is a general opinion that harmonic lasing is too sensitive to emittance and energy spread effects, so that it is not practically interesting.One of the main goals of this paper is to disprove this statement.We study a realistic three-dimensional (3D) model of harmonic lasing and compare its gain length with that of the fundamental mode.We find out that harmonic lasing is of interest in many practical cases.
In order to calculate FEL gain length (and, therefore, saturation length), one has to solve an eigenvalue equation.An eigenvalue equation for harmonic lasing was derived in the framework of the one-dimensional (1D) model in [5,17], and a thorough 1D analysis can be found in [18].Usually, a more realistic 3D model is required to make conclusions on a possibility of practical realization of some option.Three-dimensional analysis was done in [7], where an eigenvalue equation was derived based on an approach developed in [22] for the fundamental frequency.However, this eigenvalue equation is rather complicated and can be solved only numerically.One can correctly calculate the gain length for a specific set of parameters, but it is very difficult to trace general dependencies and perform analysis of the parameter space.
In this paper we perform a parametrization of the solution of the eigenvalue equation for lasing at odd harmonics [7], and present explicit (although approximate) expressions for FEL gain length, optimal beta function, and saturation length taking into account emittance, betatron motion, diffraction of radiation, energy spread, and its growth along the undulator length due to quantum fluctuations of the undulator radiation.Considering 3rd harmonic lasing as a practical example, we come to the conclusion that it is much more robust than usually thought, and can be widely used at the present level of accelerator and FEL technology.We surprisingly find out that in many cases the 3D model of harmonic lasing gives more optimistic results than the 1D model.For instance, one of the results of our studies is that in a part of the parameter space, corresponding to the operating range of soft x-ray beam lines of x-ray FEL facilities, harmonics can grow faster than the fundamental mode.
We briefly discuss properties of saturated harmonic lasing, and conclude that at a given wavelength the brilliance of a harmonic is approximately the same as that of the retuned fundamental mode.We suggest a combined use of harmonic lasing and lasing at the same wavelength with the retuned fundamental mode in order to reduce bandwidth and to increase brilliance of x-ray beam at saturation.
We consider a possible application of harmonic lasing to different x-ray FEL facilities, and conclude that they can strongly profit from this option.In particular, LCLS [2] can significantly extend its operating range towards shorter wavelengths making use of the third harmonic lasing with the help of the intraundulator spectral filtering and phase shifters.In the case of the European x-ray free electron laser (XFEL) [23], the harmonic lasing can allow one to extend the operating range, to reduce FEL bandwidth and increase brilliance, to enable two-color operation for pump-probe experiments, and to provide more flexible operation at different electron energies.Similar improvements can be realized in other x-ray FEL facilities with gap-tunable undulators like FLASH II [24], SACLA [3], LCLS II [25], etc.Finally, let us mention that the results of this paper can also be used for high-gain FELs using external seed (if, for example, the 3rd or the 5th harmonic of the undulator is tuned to the seed frequency).

II. GAIN LENGTH OF HARMONIC LASING
The results of this section are generalizations of the results of Ref. [26] for the fundamental frequency to the case of harmonic lasing.The eigenvalue equation [7] and the approach to its parametrization are discussed in Appendix A.
Let us consider an axisymmetric electron beam with a current I, and a Gaussian distribution in transverse phase space and in energy.The resonance condition for the fundamental wavelength is written as More generally, lasing in a planar undulator can be achieved at the odd harmonics defined by the condition B rms being the rms undulator field.
In what follows we assume that the harmonic with a number h lases to saturation, while lasing at harmonics with lower numbers and at the fundamental wavelength is suppressed with the help of phase shifters or by other means (see Sec. IV).We also assume that the beta function is optimized so that the FEL gain length at a considered harmonic achieves the minimum for given wavelength, beam, and undulator parameters.Under this condition the solution of the eigenvalue equation for the field gain length [27] of the TEM 00 mode can be approximated as follows (see Appendix A for details): where and The following notations are introduced here: is the rms energy spread (in units of the rest energy), and is the usual coupling factor for harmonics with J n being Bessel functions.The coupling factors for the 1st, 3rd, and 5th harmonics are shown in Fig. 1.When the rms undulator parameter K is large, the coupling factors are A JJ1 ' 0:696, A JJ3 ' 0:326, A JJ5 ' 0:230.Asymptotically for large h we have A JJh ' 0:652h À2=3 .Also note that all the formulas of this section are valid in the case of helical undulator and the fundamental wavelength (h ¼ 1), in this case the coupling factor is equal to 1 [26].
The formulas (3)-( 5) provide an accuracy better than 5% in the range of parameters In fact, the formulas (3)-( 5) can also be used well beyond this range, but the above-mentioned accuracy is not guaranteed.
We also present here an approximate expression for the optimal beta function (an accuracy is about 10% in the above mentioned parameter range): To estimate the saturation length, one can use the result from Ref. [28], generalized to the case of harmonic lasing: Here N h is a number of electrons per wavelength of the considered harmonic.For operating VUV and x-ray SASE FELs, one typically has L sat ' ð10 AE 1Þ Â L g .Energy spread in the electron beam grows along the undulator length due to the quantum diffusion [29,30].In this case an effective parameter can be introduced in order to describe an increase in saturation length due to this effect, see Appendix B. Let us also note that all the above presented results are reduced to those of Ref. [26] for the case of the first harmonic (h ¼ 1).All these results were obtained under the assumption that beta function is optimal [i.e. it is given by Eq. ( 8)].However, for technical reasons this is not always the case in real machines, and it could often be that > opt .In such a case the gain length can be approximated as follows: for > opt : Finally, let us note that widely used Ming Xie formulas [31,32] can be easily generalized to the case of harmonic lasing, see Appendix C. Comparing two approaches to parametrization of FEL gain length, we have found that they agree reasonably well, also for nonoptimal beta functions and well beyond the range given by Eq. (6).

III. SIMULTANEOUS LASING
In the linear regime of a SASE FEL operation the fundamental frequency and harmonics grow independently with gain lengths L ðhÞ g (here and below in this paper the superscript indicates harmonic number).In 1D theory [18] the gain length of the fundamental mode is always the shortest, i.e., the fundamental always reaches saturation first.When analyzing parameter space in the frame of 3D theory, we realized that one can have an opposite situation in the parameter range 2= ( 1, which is typical for soft x-ray beam lines of x-ray FEL facilities.This case is discussed in Sec.VII.Here we consider the case 2= ' 1, or 2= ) 1, so we will use the results of the previous section.We will show that in this regime the fundamental mode has always an advantage, i.e., its gain length is always the shortest.
Formulas of the previous section are obtained under the condition that beta function is optimal for each harmonic.In this case, as one can see from (4), the gain lengths for harmonics are significantly larger than that for the fundamental mode (this is mainly due to decrease of the wavelength, i.e., an increase of parameter 2=; see Appendix A for details).For example, when the undulator parameter K is large, one obtains that L ð1Þ g =L ð3Þ g ' 0:56 if beta function is optimized for each case.However, if we consider simultaneous lasing then the beta function is, obviously, the same for the fundamental and for harmonics.Thus, the ratio of gain lengths depends on the choice of beta function.
Let us consider the case when an influence of the energy spread on FEL gain can be neglected.We find from (8) that optimal beta function for harmonics is significantly larger than that for the fundamental frequency.If one optimizes for the fundamental mode, then there is practically no lasing at harmonics.Indeed, in addition to the above-mentioned tendency for optimal beta functions, the gain lengths of harmonics will be strongly increased due to the longitudinal velocity spread caused by too tight focusing.In this case only nonlinear harmonic generation is possible.
If one optimizes for the lasing at a harmonic, the situation can be much improved.For example, in the case of a large K value, we find from (8) that the optimal beta function for the third harmonic is larger by a factor of 3.7 than that for the fundamental frequency.Then from (4) and (10) one can obtain that L ð1Þ g =L ð3Þ g ' 0:67.If one further increases such that it is much larger than the optimal one for the considered harmonic, one can find from (4), (8), and (10) that the ratio of gain lengths can be approximated by The considered situation corresponds to the 1D cold beam limit, and Eq. ( 11) reproduces the result of the 1D model [18].However, this should be considered as a coincidence since we used the fitting formulas rather than asymptotical behavior of the exact solution of 3D theory.As an example, let us consider again the third harmonic and large values of the undulator parameter K.In this case we get L ð1Þ g =L ð3Þ g ' 0:87, i.e., the fundamental wavelength still has an advantage, although less pronounced.Note that the inclusion into consideration of the energy spread effects leads always to a decrease of the considered ratio since harmonics are more sensitive to this parameter than the fundamental mode.We conclude that in the case of the simultaneous lasing in the parameter range 2= ' 1, or 2= ) 1 the fundamental mode always has the shortest gain length, i.e., it saturates first.

IV. SUPPRESSION OF THE FUNDAMENTAL HARMONIC
When the saturation is achieved at the fundamental frequency, the nonlinear harmonic generation occurs, i.e., the radiation of the bunched beam at odd harmonics of the undulator [1,[5][6][7]9,10].This radiation has a relatively low power (for the 3rd harmonic it is on the order of a percent of the saturated power of the fundamental wavelength), and its relative bandwidth is about the same as that of the fundamental [8].Intensity of harmonics is subjected to much stronger fluctuations than that of the fundamental frequency [7,8,11].Linear amplification of a harmonic does not proceed due to a strong impact of the saturation at the fundamental mode on the longitudinal phase space of the electron beam.
If, however, we disrupt the lasing at the fundamental frequency such that it stays well below saturation, then the third harmonic lasing proceeds up to saturation resulting in a significant intensity (about 30% of the saturated power of the fundamental mode in 1D limit, see Appendix D), narrow relative bandwidth (also about 30% of that at the fundamental in 1D case).In other words, the brilliance can be by 2 orders of magnitude higher than in the case of nonlinear harmonic generation (for the 5th harmonic the improvement can reach three orders).Intensity fluctuations of a harmonic are about the same as those at the fundamental wavelength of a SASE FEL since statistics is the same.Moreover, if the fundamental harmonic is strongly suppressed in the undulator, the users of x-ray facilities do not need filters which are in most cases required if one uses nonlinear harmonic generation.Note that the filters suppress the fundamental wavelength but may also partially suppress harmonics.Thus, harmonic lasing up to its saturation has decisive advantages over nonlinear harmonic generation, so one should have good methods to disrupt the fundamental mode. A. Phase shifters A method to disrupt the fundamental harmonic (while keeping the lasing at the third harmonic undisturbed) was proposed in [18].The undulators for x-ray FELs consist of many segments.In case of gap-tunable undulators, phase shifters are foreseen between the segments.If phase shifters are tuned such that the phase delay is 2=3 (or 4=3) for the fundamental, then its amplification is disrupted.At the same time the phase shift is equal to 2 for the third harmonic, i.e., it continues to get amplified without being affected by phase shifters.However, the simulations in [18] were done for the case of a monochromatic seed, and the results cannot be applied for a SASE FEL.The reason is that in the latter case the amplified frequencies are defined self-consistently, i.e., there is frequency shift (red or blue) depending on positions and magnitudes of phase kicks.This leads to a significantly weaker suppression effect.In particular, we found out (see Appendix D) that a consecutive use of phase shifters with the same phase kicks 2=3 (as proposed in [18]) is inefficient, i.e., it does not lead to a sufficiently strong suppression of the fundamental wavelength.
We propose here a modification of the phase shifters method that can work in the case of a SASE FEL.We define phase shift in the same way as it was done in [18] in order to make our results compatible with the previous studies.For example, the shift 2=3 corresponds to the advance [33] of a modulated electron beam with respect to electromagnetic field by 1 =3.In the following we assume that a distance between phase shifters is shorter than the field gain length of the fundamental harmonic.Our method of disrupting the fundamental mode can be defined as a piecewise use of phase shifters with the strength 2=3 and 4=3.For example, in the first part of the undulator (consisting of several segments with phase shifters between them) we introduce phase shifts 4=3.A redshifted (with respect to a nominal case without phase shifters) frequency band is amplified starting up from shot noise [34].In the following second part of the undulator we use 2=3 phase shifts, so that the frequency band, amplified in the first part, is practically excluded from the amplification process.In a realistic 3D case, the radiation is diffracted out of the electron beam, and the density and energy modulations within this frequency band are partially suppressed due to emittance and energy spread while the beam is passing the second part of the undulator (although the suppression effect is often small).Instead, a blue-shifted frequency band is amplified in the second part of the undulator, starting up from shot noise.Then, in the third part we change back to 4=3 phase shifters, having the residual modulations in the electron beam and diffracted radiation from the first part as initial conditions for the redshifted frequency band.Then one can change to the fourth part with 2=3 phase shifts, and so on.A more thorough optimization can also include a part (or parts) of the undulator with zero phase shifts.As a result of these manipulations, the bandwidth of the FEL radiation strongly increases, while the saturation is significantly delayed.The efficiency of the method strongly depends on the ratio of the distance between phase shifters and the field gain length of the undisturbed fundamental mode.The smaller this ratio, the stronger suppression can be achieved after optimization of phase shifts distribution.For example, when the ratio is about 0.5, one can relatively easily increase the ''effective'' gain length by a factor of 2.
An example of using this method is shown in Fig. 8, the FEL process is simulated with 3D code FAST [35] modified in order to include harmonic lasing.The described method also works well in the 1D cold beam case (see Appendix D).The main effect here is an efficient increase of the bandwidth due to amplification of different subbands in different parts of the undulator.
We can simply generalize the method to the 5th harmonic lasing (higher harmonic numbers we do not discuss in this paper).One can introduce a piecewise combination of some of the phase shifts 2=5, 4=5, 6=5, or 8=5 (for the fundamental frequency).In this case also the third harmonic will see the disrupting shifts, while the fifth harmonic will not be affected.If the number of phase shifters is sufficient, the fundamental mode and the third harmonic can be strongly suppressed so that the fifth harmonic can reach saturation.
We have considered the case when a distance between phase shifters is shorter than the field gain length of the fundamental frequency.If the distance is essentially larger, the phase shifts can still be used to delay the saturation of the fundamental but typically the suppression effect is not sufficiently strong.However, a combination of these rare phase shifts with intraundulator spectral filtering can be efficient enough.

B. Intraundulator spectral filtering
In some segmented undulator systems a number of phase shifters might not be sufficient for a required suppression of the fundamental harmonic.Also, some undulator systems of x-ray FELs have fixed gap, and therefore they have no phase shifters.In this case, one can either install them (if space is available) in order to have a possibility of harmonic lasing, or to use another method, that we would like to propose here, namely an intraundulator spectral filtering.
The idea of the method is simple: at a position in the undulator where the fundamental harmonic is in the highgain linear regime (well below saturation), the electron beam trajectory deviates from a straight line, and a filter is inserted that strongly suppresses the fundamental mode but only weakly affects the third harmonic.As a simple bending system, one can use, for example, a chicane that substitutes one of the undulator segments as it is done at LCLS for operation of the self-seeding scheme HARMONIC LASING IN X-RAY FREE ELECTRON LASERS Phys.Rev. ST Accel.Beams 15, 080702 (2012) 080702-5 [20].A possible alternative is to make a closed bump with the help of moving quadrupoles of the undulator focusing system (quadrupoles are usually placed after each undulator segment, so that in this case two segments are excluded from lasing).Although the main purpose of the bending system is to provide an offset for insertion of a filter, it has to satisfy two other requirements: on the one hand, a delay of the bunch with respect to a radiation pulse must be smaller than the bunch length; on the other hand, the R 56 (equal to the double delay) should be sufficient for smearing of energy and density modulations at the fundamental wavelength: 2 R 56 =ð 1 Þ ) 1.Both conditions can be easily satisfied simultaneously in most cases.
If the filter is efficient in suppression of the fundamental frequency (i.e. if the power is reduced to the level of the effective power of shot noise), after the chicane we have only the amplified radiation at the third harmonic as an input signal, and no modulations in the beam.It means that in the second part of the undulator the fundamental mode starts up practically from shot noise again, so that the third harmonic can reach saturation first despite the fact that its gain length is larger.
Filters in the x-ray regime can be very efficient when the ratio of photon energies is pretty large.Indeed, an attenuation in a material depends exponentially on the product of the attenuation coefficient and a material thickness d (Lambert-Beer's law), i.e., the transmitted intensity scales as expðÀdÞ.In the region of photon energies (up to several tens of keV, depending on material) where the photoabsorption dominates the attenuation, the coefficient depends on frequency as a expðÀb=!Þ.Thus, properly choosing a material and a thickness of the filter, one can achieve the situation when losses of the third harmonic intensity are in the range of tens of percent, while the fundamental wavelength loses many orders of magnitude due to the double exponential suppression.An important requirement to the filter is that it does not disturb significantly the phase front of the third harmonic radiation.It was suggested, for example, to use diamond or silicon crystals as attenuators for LCLS II [25] since they are expected to not disturb phase front essentially.To provide the wavelength tunability, one can arrange a stack of insertable filters with different thicknesses [25].
The active length [36] of the first part of the undulator is chosen such that, on the one hand, the highest possible gain is achieved; on the other hand, energy modulations, induced by the FEL interaction at the fundamental wavelength (and converted to uncorrelated energy spread through the chicane), should be sufficiently small to avoid a significant increase of gain length of the third harmonic in the second part of the undulator.Also, there might be limitations on peak and average power load on the filter.So, in practice in most cases the fundamental frequency in the first part of the undulator has to stay in the exponential gain regime, and no nonlinear harmonic generation should be expected (although in some cases the latter regime can also be considered as an option).
If one filter is not sufficient, one can use two-stage filtering.Alternatively, a combination with phase shifters can be used.Practical application of this combination is illustrated in Sec.VIII.We should also note that the considered method can be used to suppress the fundamental mode and the third harmonic, so that the fifth harmonic can lase to saturation.
In the following section we assume that harmonic lasing occurs under the condition that lasing at the fundamental frequency is disrupted.

V. HARMONICS VERSUS THE RETUNED FUNDAMENTAL MODE
Let us consider a harmonic lasing and lasing at the same wavelength with the retuned fundamental.In other words, we reduce the wavelength of the fundamental harmonic by, for example, a factor of 3 (in case of comparison with the third harmonic) by either increasing electron energy or reducing the undulator parameter K. Thus, we are going to understand if harmonic lasing can be an alternative to a standard way of reducing wavelength in x-ray FEL facilities.Let us start with the case when we can neglect energy spread effects ( ¼ 0).In this section we always assume that the beta function is tuned to the optimum for each case.

A. Reduced K
In the case when the wavelength of the fundamental harmonic is adjusted by reducing parameter K, the ratio of gain lengths is obtained in Appendix E, and is given by (E3) The superscript ð1KÞ indicates that the retuning of the undulator parameter was used to reduce wavelength of the first harmonic.The retuned undulator parameter K re is given by the simple relation: Obviously, K must be larger than ffiffiffiffiffiffiffiffiffiffiffiffi h À 1 p .It is shown in Appendix E that Eq. ( 12) under accepted assumptions (no energy spread and optimal beta function) is rather general, i.e., it is valid for any value of the parameter 2=.In a particular case when the approximation ( 4) is valid, one can also obtain ( 12) from ( 4) and (13).
For large K the ratio in Eq. ( 12) is reduced with the help of (13) to a simple form hA JJh =A JJ1 , so that the gain length of the retuned fundamental mode is larger by a factor of 1.41 (1.65) than that of the third (fifth) harmonic.In the case of a large harmonic number, one can obtain that this ratio is given by 0:94h 1=3 (see the asymptotic expression for A JJh in Sec.II).
For an arbitrary K we plot in Fig. 2 the ratio of gain lengths (12).It is seen that the third harmonic always has an advantage (in case of negligible energy spread), i.e., its gain length is shorter for any value of K.In Appendix E we compare this result with the result of 1D theory, and come to the conclusion that the 3D theory actually gives more optimistic predictions in this respect, i.e., the ratio ( 12) is always larger than the corresponding ratio of 1D theory.

B. Increased beam energy
If, instead of changing undulator parameter K, one changes electron energy in order to reduce fundamental wavelength by a factor of h (i.e. one increases the energy by ffiffiffi h p ), the corresponding ratio of gain lengths at the fundamental frequency and at a harmonic can be easily deduced from (4): The superscript ð1Þ tells that the change of relativistic factor was used to reduce wavelength of the fundamental.
In Fig. 2 we present the ratio calculated with (14).In the case of boosting electron energy for lasing at 3 times reduced fundamental wavelength, the advantage of using the 3rd harmonic is not that obvious (since an increase of electron energy at the same wavelength leads to a decrease of the parameter 2= thus improving FEL properties, in general).However, even in this case, the gain length for the third harmonic is shorter if the rms value of K is larger than 1.4.

C. Numerical example
Let us present a numerical example for the European XFEL [23].New baseline parameters [37][38][39] assume operation at different charges from 20 pC to 1 nC and three different electron energies: 10.5, 14, and 17.5 GeV.Let us consider operation at 1 A ˚with the charge 0.5 nC, peak current 5 kA, normalized emittance 0:7 m, and electron energy 10.5 GeV in a planar undulator with the period 4 cm.Energy spread effects are neglected here ( ¼ 0).For the rms K value of 2.3 the fundamental wavelength is 3 A ˚, which is suppressed by using phase shifters and/or spectral filtering [40].Then we have third harmonic lasing at 1 A ˚with the field gain length of 6.9 m according to (4) for h ¼ 3. Now we change the rms K value to 1.05 so that lasing at the fundamental frequency occurs at 1 A ˚.In that case we find from (4) for h ¼ 1 that the gain length is 10.4 m, i.e., about 50% larger than in the case of 3rd harmonic lasing.If, instead, we increase beam energy to 17.5 GeV and lase at 1 A ˚with K ¼ 2:2, the gain length is 7.9 m, i.e., it is still visibly larger than in the case of low energy and the 3rd harmonic lasing.

D. Energy spread effects
Higher harmonics are more sensitive to the energy spread than the fundamental one [7,18], see the discussion below.However, a reserve in gain length in the case of no energy spread lets harmonics be competitive with the fundamental frequency also when the energy spread effects are significant.
To be specific, we consider the case when the fundamental wavelength is adjusted by reducing the parameter K. Let the ratio of gain lengths of a harmonic and of the fundamental mode from Eq. (3) be equal to 1.Then, observing that for a given harmonic number the ratios of parameters and of L g0 are the functions of the parameter K only, one can calculate the value of , for which the gain lengths are equal, as a function of K.In Fig. 3 we plot such a dependence for the case of the third harmonic lasing.Continuing the numerical example of the previous section for 1 A ˚operation at 10.5 GeV, we find that the gain lengths of the fundamental mode and of the third harmonic become equal to 12.5 m when the energy spread is 2.8 MeV.For smaller values of the energy spread the third harmonic has shorter gain length than the fundamental one.
In the case of going to higher beam energy for reducing the fundamental wavelength, the margins for energy spread are reduced in the case of harmonic lasing.Still, acceptable values of the energy spread can be relatively large.In particular, in the considered numerical example (with 17.5 GeV for lasing at the fundamental frequency) the third harmonic lasing at 10.5 GeV has a shorter gain length when the energy spread is below 1.3 MeV.FIG. 2. Ratio of gain lengths of the retuned fundamental and the third harmonic for lasing at the same wavelength versus rms undulator parameter K.The fundamental wavelength is reduced by means of reducing the undulator parameter K (solid) or increasing beam energy (dash).

E. Fifth and higher harmonics
To let the fifth harmonic lase to saturation, one has to suppress lasing at the fundamental frequency and at the third harmonic.This can be done as discussed above in this paper: by using either a special set of phase shifters or intraundulator spectral filtering or a combination of these two methods.We do not consider higher harmonic numbers in this paper, but the tendency can be summarized as follows.In the case of a sufficiently large K value, the gain length gets shorter with an increase of harmonic number (as discussed above) if there is no energy spread.However, the sensitivity to the energy spread also strongly increases, so that at some point there is a cutoff.From a practical point of view, one has to consider limitations due to undulator phase errors, undulator wakefields, etc.These issues are discussed in Sec.VIII.The use of the fifth harmonic can still be considered in some cases as quite realistic.
For illustration, let us continue the numerical example for the European XFEL with the energy of 10.5 GeV.In order to lase at 1 A ˚with the fifth harmonic, one has to increase K to 3.1, so that the fundamental wavelength is 5 A ˚.In case of negligible energy spread the field gain length for the fifth harmonic is 5.8 m (to be compared with 10.4 m for the retuned fundamental harmonic).When the energy spread is 2.3 MeV, the gain length is the same in both cases and equals 11.8 m.

F. Discussion on 3D and warm beam effects
An obvious disadvantage of higher harmonics in comparison with the fundamental harmonic is a weaker coupling between the electron current and the electromagnetic field, described by the coupling factor A JJh .When one considers lasing at the same wavelength with a harmonic and a retuned fundamental, the main advantage of the harmonic is connected with a higher mobility of particles which allows them to get bunched easier.Indeed, the derivative of the longitudinal dispersion R 0 56 ¼ ð1 þ K 2 Þ= 2 is proportional to a harmonic number, no matter if one changes K or beam energy in order to adjust wavelength of the fundamental harmonic.As a net effect, in a simple 1D model harmonics have an advantage as soon as K is sufficiently large so that the A JJh is not too small.In a particular case of retuning K in order to adjust wavelength of the fundamental, harmonics have always an advantage [18] since the retuned K for the fundamental frequency gets too small before A JJh for a harmonic drops.
An inclusion of such 3D effects as diffraction of radiation and transverse motion of particles does not change the ratio of gain lengths significantly since we are considering the same wavelength.But a difference with the 1D model is also connected with the possibility to optimize beta function.If is too large, the current density is too small and FEL gain is weak; if is too small, the longitudinal velocity spread due to emittance suppresses the FEL gain.As a result, there is always an optimum.Note that an effect of the longitudinal velocity spread due to emittance has nothing to do with the above-mentioned mobility, characterized by longitudinal dispersion (which is important for energy spread effect, see below).When higher harmonics have an advantage in zero order, as explained above, they are somewhat less sensitive to this velocity spread than the retuned fundamental harmonic, and the optimal is smaller for harmonics.Thus, due to tighter focusing one gets smaller beam size and therefore, an additional advantage over the fundamental frequency.This explains the fact that the 3D model (with optimized beta function) gives more advantage in growth rate to harmonics than the 1D model does (see Appendix E).
Finally, harmonics are more sensitive to the energy spread due to a larger R 0 56 .However, when they have a significant advantage in the case of negligible energy spread, a relatively large correction to the gain length due to a finite energy spread can be tolerated, as one can see from numerical examples.Note that is adjusted depending on the energy spread, which cannot be done in a simple 1D model.
Concluding this section, we can state that harmonic lasing is especially attractive in the case of gap-tunable undulator when lasing at the shortest wavelength is achieved with the opened gap, i.e., when K is reduced.In fact, the highest photon energy of an x-ray FEL facility, at which saturation occurs, in the case of the 3rd harmonic lasing can be typically increased by 30%-100%.On the other hand, harmonic lasing at a reduced electron energy is a possible solution for a compact and relatively cheap x-ray FEL facility.

VI. PROPERTIES AT SATURATION AND A POSSIBLE INCREASE OF BRILLIANCE
FEL properties at saturation can be calculated with the help of a numerical simulation code (for 1D simulations see Ref. [18] and Appendix D).Here we present a qualitative consideration for the case when the energy spread effect is a relatively weak correction to the FEL operation ( ( 1), and the tuning to the same wavelength is achieved by changing parameter K.A simple estimate (''effective'' parameter [41] is reduced depending on harmonic number) suggests that in the case of harmonic lasing, both the saturation power and the bandwidth are reduced by the same factor.The degree of transverse coherence is about the same for a harmonic and for the fundamental mode since this quantity is mainly defined [42,43] by the parameter 2=, which is the same in the considered case.Thus, the brilliance (a figure of merit for performance of x-ray FELs), depending on the ratio of peak power to bandwidth, remains about the same.In other words, use of harmonic lasing instead of lasing at the fundamental frequency is equivalent to a mild monochromatization of x-ray beam.
Here we propose a simple method of brilliance improvement.In a gap-tunable undulator, one can combine a high power and a narrow bandwidth.A possible trick is to use harmonic lasing in the exponential gain regime in the first part of the undulator, making sure that the fundamental frequency is well below saturation (two options can be considered: with and without disruption of the fundamental by phase shifters, depending on the ratio of gain lengths).In the second part of the undulator the value of K is reduced such that now the fundamental mode is resonant to the wavelength, previously amplified as the third harmonic.The amplification process proceeds in the fundamental mode up to saturation.In this case the bandwidth is defined by the harmonic lasing (i.e. it is reduced by a significant factor depending on harmonic number) but the saturation power is still as high as in the reference case of lasing at the fundamental, i.e., brilliance increases.It is important that this option does not require extra undulator length.

VII. SIMULTANEOUS LASING IN THE CASE OF A THIN ELECTRON BEAM
For a typical operating range of hard x-ray FELs, the condition 2= ' 1 is usually a design goal for the shortest wavelength.In the case of the simultaneous lasing the fundamental mode has shorter gain length than harmonics, as it was shown above in this paper.However, if the same electron beam is supposed to drive an FEL in a soft x-ray beam line, the regime with 2= ( 1 is automatically achieved.Here we present a detailed study of this regime.In this section we assume that beta function is sufficiently large, ) L ðhÞ g .In this case we can use the model of parallel beam (no betatron oscillations), and can also neglect an influence of longitudinal velocity spread due to emittance on the FEL process.If in addition the energy spread is negligibly small, then the normalized FEL growth rate at the fundamental frequency is described by the only dimensionless parameter, namely the diffraction parameter B [44]; see Appendix A. The generalized diffraction parameter B that can be used for harmonics is also introduced in Appendix A; see (A4).We rewrite it here as follows: where !h ¼ 2c= h and À is the gain factor that also depends on harmonic number: The gain length of a harmonic is defined by the universal function of B: The function f 1 ð BÞ can be calculated from the general eigenvalue equation (A2).However, within the parallel beam model, accepted in this section, the eigenvalue equation can be significantly simplified.We use here the solution of the equation presented in [44,45] for the Gaussian transverse distribution of current density (see Fig. 4.52 of Ref. [44]).In the parameter range, that is the most interesting for our purpose, we can approximate the function f 1 ð BÞ as follows: f 1 ð BÞ ' 0:66 À 0:37log 10 ð BÞ for B < 3: Using the superscript ðhÞ to indicate the harmonic number for the diffraction parameter and the gain factor, we can see that According to ( 16) and ( 17), the ratio of gain lengths can be presented as follows: One can easily observe from ( 19) and ( 20) that for a given value of diffraction parameter for the fundamental frequency, B ¼ Bð1Þ , this ratio depends only on the parameter K for a considered harmonic.If K is sufficiently large (see Fig. 1), one can obtain a universal dependence which is presented in Fig. 4 for the case of the third harmonic.For large values of the diffraction parameter (wide electron beam limit), one can use an asymptotic expression for the growth rate [44], so that the function f 1 is proportional to ð BðhÞ Þ À1=3 .In this case, one obtains the result of 1D theory [18]

JJ1
1=3 : In the case of the third harmonic and large K this ratio is equal to 0.87.One can see that the curve in Fig. 4 slowly approaches this value when B is large.So, in the limit of wide electron beam, corresponding to the 1D model, the fundamental frequency has shorter gain length than harmonics.
In the limit of small diffraction parameter (thin electron beam) we wave the opposite situation, as one can see from Fig. 4. When diffraction parameter is smaller than 0.4, the gain length of the fundamental frequency is larger than that of the third harmonic for large values of K.A similar dependence can be calculated for the fifth harmonic, in this case the gain length of the fundamental harmonic is larger than that of the fifth harmonic (for a sufficiently large K) when B < 0:28.Moreover, the fifth harmonic grows faster than the third one when B < 0:15 and K is large.In fact, if the diffraction parameter for the fundamental harmonic is about 0.1 or less, there might a number of amplified harmonics with similar growth rates.We should note that this number can be reduced when the energy spread is included into consideration.
To find out how the value of B, at which the harmonics have the same gain length as the fundamental, depends on the undulator parameter K, one can use Eqs.( 18)- (20).We present the results for the third and the fifth harmonics in Fig. 5.The areas below the curves in Fig. 5 correspond to the case when corresponding harmonics grow faster than the fundamental frequency.We should stress that the condition 2= ( 1 is necessary but not sufficient for reaching this regime. Let us discuss why the effect, considered in this section, can only take place in the frame of 3D theory and in the limit of a thin beam.In 1D theory the gain factor (inversely proportional to the gain length) scales as ðA 2  JJh !h Þ 1=3 , if we keep only parameters that depend on harmonic number.The frequency here comes from the dynamical part of the problem; it reflects the fact that the beam gets bunched easier at higher frequencies.As for the electrodynamic part of the problem, the amplitude of the radiation field of charged planes does not depend on frequency.Since the product A 2 JJh h decreases with harmonic number for any K, gain length of harmonics is always larger than that of the fundamental frequency.Concerning the 3D theory, the solution of the paraxial wave equation shows that on-axis field amplitude is proportional to the frequency.So, both dynamical and electrodynamic parts contribute to the solution of the self-consistent problem with !h .That is why in the gain factor in Eq. ( 16) we have squared frequency

it depends on harmonic number via the product A 2
JJh h 2 which can increase with harmonic number if K is sufficiently large.Since in the case of a thin electron beam the function f 1 depends only weakly, in fact logarithmically, on the diffraction parameter (which is larger for harmonics), harmonics can grow faster than the fundamental frequency in some range of parameters B and K, as it is illustrated in Fig. 5.
So far we have discussed an exponential gain regime and did not consider an initial-value problem.In the simulations one can observe that the fundamental dominates saturation regime even if its gain length is slightly longer than that of harmonics.First, it has a higher effective startup power.Second, in nonlinear regime the longitudinal phase space of the electron beam is affected stronger by the fundamental frequency.As a result, saturation power of harmonics in the case B ' 0:1 is weaker [46] than it would have been in the absence of the fundamental frequency (but FIG. 4. Ratio of gain lengths for lasing at the fundamental wavelength and at the third harmonic versus diffraction parameter of the fundamental wavelength for large values of the undulator parameter K.

FIG. 5. Diffraction parameter of the fundamental wavelength,
for which the third (solid) and the fifth (dashed) harmonics have the same gain length as the fundamental, versus the rms undulator parameter K. Below these curves harmonics have shorter gain lengths than the fundamental frequency.
still much higher than in the case of nonlinear harmonic generation).The bandwidth at saturation is inversely proportional to harmonic number (contrary to the case of nonlinear harmonic generation).
Let us present a numerical example for the European XFEL.An electron beam with the energy of 10.5 GeV lases in the SASE3 undulator (which is placed behind the hard xray undulator SASE1) with the period 6.8 cm and the rms undulator parameter 7.4 at the fundamental wavelength 4.5 nm.We consider electron bunches with the charge of 100 pC: the peak current is 5 kA, averaged normalized slice emittance is 0:3 m from start-to-end simulations [38], and slice energy spread [47] is 1 MeV.For the beta function of 15 m we obtain from ( 15) that the diffraction parameter for the fundamental wavelength is 0.3, so that a simplified model, considered in this section, suggests that the third harmonic can grow faster than the fundamental.However, harmonics are more sensitive to the energy spread than the fundamental frequency, therefore we use a general eigenvalue equation (A2) that includes all the important effects.We find that the field gain length is 2.44 m for the fundamental harmonic, 2.42 m for the third harmonic, and 2.52 m for the fifth one.In Fig. 6 we present the results of numerical simulations.Even though the saturation power of harmonics is lower than it would have been in the absence of the fundamental, it is still by an order of magnitude higher than that expected from nonlinear harmonic generation [39].The saturation power of the third (fifth) harmonic is 12% (3%) of the saturation power of the fundamental frequency.Thus, accurate calculation of harmonic lasing is necessary for planning of user experiments and x-ray beam transport.
Note that the method of brilliance improvement, described in the previous section, is especially attractive in the considered regime.Indeed, one can, in principle, use a high harmonic number so that the bandwidth reduction can be significant.Another useful application is the simultaneous lasing at the fundamental wavelength and at the third harmonic with comparable intensities that can be used in jitter-free pump-probe experiments making use of a splitand-delay stage [48].For such an experiment one can, in principle, manipulate relative intensities with the help of phase shifters.
On the other hand, a high-intensity harmonic radiation can disturb some experiments, or may lead to an excessive power load on mirrors of x-ray transport.In this case the harmonics can be suppressed by different means.For example, one can increase the energy spread with the help of a laser heater [49][50][51] which is going to be a part of the standard design of an x-ray FEL accelerator complex.In the above presented example, an increase of the energy spread up to 5 MeV would strongly suppress harmonic lasing, so that one would get an intensity level expected from nonlinear harmonic generation.Another method is the use of phase shifters, but now aiming at suppression of harmonics.In this case the phase shifts for the fundamental frequency could be below 1 rad while for harmonics they are h times larger, i.e., the suppression effect is stronger.Other options are an increase of the beta function (what leads to an increase of the diffraction parameter) or the application of linear undulator taper [52,53] that would have a stronger effect on the amplification of harmonics.

VIII. PRACTICAL APPLICATIONS OF HARMONIC LASING IN X-RAY FELS
A. LCLS: Intraundulator spectral filtering and phase shifters Linac Coherent Light Source (LCLS) is the first hard xray free electron laser [2].Because of the limited electron energy and fixed-gap undulator, the facility can presently cover photon energy range up to 10 keV.Nonlinear harmonic generation was studied in [10] with the third harmonic at 25 keV, and the second harmonic afterburner [54] operation was demonstrated at 18 keV, but the intensity was relatively low in both cases.Here we present a numerical example for third harmonic lasing at LCLS up to the photon energy of 25-30 keV with a significant power and a relatively narrow intrinsic bandwidth.
The LCLS undulator [21] consists of 33 identical 3.4-m-long segments, undulator period is 3 cm, and the peak undulator parameter is 3.5 (rms value of K is 2.5).The 16th segment is replaced with a chicane for operation of the self-seeding scheme [20].When this scheme is operated, a crystal monochromator is inserted on-axis while the electron beam goes through the chicane thus by-passing the crystal.We notice that a simple add-on to this setup, namely an insertable filter, would allow the use of the intraundulator spectral filtering method described in FIG. 6.An example for the European XFEL.Averaged peak power for the fundamental harmonic (solid), the third harmonic (dashed), and the fifth harmonic (dotted) versus undulator length for SASE3 operating at 4.5 nm.Parameters are in the text.Simulations were performed with the code FAST.Sec.IVA.As a possible realization of the filter we propose here a silicon crystal [55] that is not supposed to spoil the phase front [25] of the third harmonic radiation while attenuating the fundamental harmonic by orders of magnitude.A thickness of the crystal is defined by a required attenuation factor and an expected photon energy range.As an example we consider here the thickness of 600 m and third harmonic lasing at 25 keV.Attenuation length at 8.3 keV is À1 ¼ 73 m, and at 25 keV it is À1 ¼ 1:85 mm [56], so that the corresponding transmission factors are 2:7 Â 10 À4 and 0.72.With a given thickness of the crystal the scheme would work well in the range 20-30 keV, and for lower photon energies of the third harmonic a thinner crystal would be needed.
In the considered parameter range the spectral filtering method alone is not sufficient, therefore we suggest to combine it with the phase shifters method.We propose to install phase shifters with the shift 4=3 (the definition of Ref. [18] is used here, see Sec.IVA) after undulator segments 1-5 and 17-22, and with the shift 2=3 after segments 6-10 and 23-28.As a possible space-saving technical solution, one can consider insertable permanentmagnet phase shifters with a length of a few centimeters and a fixed phase shift.Of course, if space allows, the tunable (electromagnetic or permanent-magnet) phase shifters would be more flexible.Note also that phase shifters without spectral filtering might not be sufficient for a sure suppression of the fundamental harmonic.
Let us consider a specific parameter set for third harmonic lasing at 0.5 A ˚(photon energy 25 keV).The electron beam parameters are as follows: energy is 13.6 GeV (the fundamental wavelength is 1.5 A ˚), peak current is 3 kA, normalized slice emittance is 0:3 m, uncorrelated energy spread is 1.4 MeV.The beta function in the undulator is 30 m. Parameters of the chicane are chosen as described in Sec.IV B, the smallest possible delay (given by either the required beam offset or minimum R 56 for smearing of beam modulations at the fundamental wavelength) would define the shortest electron bunch that can be used for operation of this scheme.In our simulations we do not consider a specific bunch length, so that our result is the peak power of the third harmonic radiation in the part of the pulse that overlapped with the electron beam after the chicane.One should also notice that an easy control of the third harmonic pulse duration is possible by changing the delay.
We performed simulations with the code FAST [35], the results are presented in Fig. 7.The averaged peak power of the third harmonic radiation is 6 GW, and an intrinsic bandwidth is 3 Â 10 À4 (FWHM).The power incident on the crystal is in the range of tens of megawatts, and should not be problematic from the point of view of peak and average power load.Note that the saturation of the third harmonic lasing is achieved after the 28th segment, so that there is a sufficient contin-gency for given wavelength and beam parameters.It means, in particular, that the saturation at 30 keV could be in reach, or the saturation at 25 keV with a larger emittance is possible.We should also note that a reduction of the beta function would increase the contingency.If one considers the scheme for operation in the range 10-20 keV, it would work with significantly loosened requirements on the electron beam quality.
As a quick test [57] of harmonic lasing at LCLS, one can consider operation with the filter only (without phase shifters), making use of nonlinear generation of the third harmonic in the first part of the undulator if the fundamental harmonic enters the nonlinear regime there.The main issues that were discussed in Sec.IV B are high power load on the filter and an increase of energy spread in the beam.However, the last issue might be partially tolerated.Indeed, in a SASE FEL the radiation intensity and beam modulations in energy and density consist of random spikes that have a typical duration of FEL coherence time.Thus, energy spread after the chicane is modulated on the same time scale.One can have the situation when some of the third harmonic intensity spikes overlap after the chicane with unspoiled parts of the electron beam, and are amplified in the second part of the undulator without gain suppression due to a large energy spread (however, the slippage effects in the second part must be considered).In principle, these spikes can reach saturation in the second part at a high power level before they are caught up by the fundamental harmonic.FIG. 7. Averaged peak power for the fundamental harmonic (solid) and the third harmonic (dash) versus geometrical length of the LCLS undulator (including breaks).The wavelength of the third harmonic is 0.5 A ˚(photon energy 25 keV).Beam and undulator parameters are in the text.The fundamental is disrupted with the help of the spectral filter (see the text) and of the phase shifters.The phase shifts are 4=3 after segments 1-5 and 17-22, and 2=3 after segments 6-10 and 23-28.Simulations were performed with the code FAST.

B. European XFEL: Free option
The gap-tunable hard x-ray undulators SASE1 and SASE2 of the European XFEL consist of 35 segments each [37], the length of a segment is 5 m, the undulator period is 4 cm.The phase shifters are installed between the segments, so that the number of the shifters is big.This means that, at least in some cases, the phase shifter method alone might be sufficient for suppression of the fundamental harmonic.As an example we consider the third harmonic lasing at 0.2 A ˚(photon energy 62 keV) by the electron beam with the energy of 17.5 GeV and the charge of 100 pC, slice parameters are the same as those given in Sec.VII, beta function is 60 m, the rms undulator parameter is 1.6.Note that the considered wavelength cannot be reached by lasing at the fundamental harmonic because the undulator parameter is too small in this case.The results of numerical simulations are presented in Fig. 8. Indeed, one can disrupt the fundamental harmonic and let the third harmonic saturate.The averaged peak power is 3 GW, and the bandwidth is 2 Â 10 À4 (FWHM).One can still notice that a stronger suppression of the fundamental would be desirable, so that spectral filtering method would improve operation of the facility in such a regime.Eventually, the self-seeding scheme [58] will be implemented at the European XFEL, then it is also worth installing a filter.Another option is a closed bump (made by movable quadrupoles between the segments).Such a bump involves two segments with an insertable filter installed between them.We should note that, if we consider a 20 pC electron bunch with slice parameters from start-to-end simulations [38], the third harmonic lasing to saturation can be extended to photon energies up to 100 keV.
The extension of the photon energy range is the main application of harmonic lasing at the European XFEL.A related application is a more flexible operation of the facility, for example, operation of SASE1 at a longest possible wavelength (with the closed gap), and of SASE2 at a very short wavelength in the regime of harmonic lasing.Note, however, that the considered options might be significantly limited if the longitudinal space charge driven microbunching instability [49,59] will have to be cured by the laser heater [49][50][51] that increases the energy spread.
Another attractive option that one can consider in the case of the European XFEL is a reduction of the bandwidth by going to harmonic lasing instead of lasing in the fundamental mode.If one combines them as described in Sec.VI, this will happen without reduction of power, i.e., the brilliance will increase.Although this increase is essentially smaller than in the case of application of seeding and self-seeding schemes, the method of combined lasing does not require extra undulator length, is not restricted by a finite wavelength interval, and is completely based on a baseline design.For many experiments, however, such a mild reduction of the bandwidth (to the level of few 10 À4 ) would be desirable.The detailed numerical simulations of combined lasing will be presented elsewhere.
As it was discussed in Sec.VII, the simultaneous lasing at the fundamental and the third harmonics with comparable intensities for jitter-free pump-probe experiments can easily be done in the SASE3 beam line.Now we can also notice that the same holds in the case of the two hard x-ray beam lines, if one uses phase shifters to suppress the fundamental mode as it was illustrated above.One can easily control relative intensities of the fundamental and the third harmonics by changing phase shifters.

C. Other facilities and applications
Similar improvements can be realized at other x-ray FEL facilities like SACLA, FLASH II, LCLS II, etc.In particular, FLASH II can cover the whole water window with the help of the third harmonic lasing.According to our estimates, one would need to combine phase shifters with intraundulator spectral filtering, so that some modifications in the undulator beam line would be necessary.
We also suggest that even if fixed-gap undulators are supposed to be used in some x-ray FEL facilities, phase shifters should be incorporated into an undulator design such that the option of harmonic lasing is enabled.
We should also note that electromagnetic phase shifters can have an advantage in comparison with permanentmagnet ones.Indeed, the electromagnetic phase shifters can be switched on and off between electron pulses (or macropulses) so that one can switch between two colors and then deliver them to different experiments.FIG. 8.An example for the European XFEL.Averaged peak power for the fundamental harmonic (solid) and the third harmonic (dash) versus magnetic length of SASE1 undulator.The wavelength of the third harmonic is 0.2 A ˚(photon energy 62 keV).The fundamental is disrupted with the help of phase shifters installed after 5 m long undulator segments.The phase shifts are 4=3 after segments 1-8 and 21-26, and 2=3 after segments 9-16.Simulations were performed with the code FAST.HARMONIC LASING IN X-RAY FREE ELECTRON LASERS Phys.Rev. ST Accel.Beams 15, 080702 (2012) One more application of the harmonic lasing is the operation of compact x-ray FEL facilities using relatively low energy of electron beams.In order to reach short wavelength they rely on the technology of short-period small-gap in-vacuum undulators [3,60].As an alternative, one could consider a more standard and robust undulator technology by going to larger period undulators with larger gaps, and lasing at the third (or even the fifth) harmonic.We estimated, in particular, with the help of formulas of Sec.II that it could be an interesting option for the Swiss FEL [60].

D. Possible technical issues
One can identify possible issues using the fact that the harmonic lasing is more narrow-band process than lasing at the fundamental wavelength (parameter [41] is smaller).In particular, harmonic lasing is more sensitive to the undulator phase errors, undulator wakefields, etc.
However, undulators for x-ray FELs are usually designed and built with a sufficient safety margin in terms of length and quality.For example, the LCLS undulator has phase shake about 1-2 deg for the fundamental wavelength [21], which means 3-5 deg for the third harmonic.This is still too small phase shake to have a significant impact on the third harmonic lasing.
The wakefields in the undulator can have an impact on the amplification process in x-ray FELs [52], a relevant parameter is a relative energy change per gain length, divided by .However, they can be compensated by using undulator taper as it was successfully demonstrated at LCLS.The harmonic lasing is more sensitive to wakefields, however a proper optimization of the taper would allow one to diminish this effect in many practical situations, especially for low charge scenarios.
We have shown in the paper that the application of harmonic lasing allows one to generate FEL radiation with intrinsically narrow bandwidth.However, from a practical point of view it is important that the energy chirp in the electron beam and energy fluctuations are smaller than a half of that bandwidth.For example, in the case of the European XFEL the chirp can be kept under control and the energy stability can be provided at the level of 10 À4 or better.This would allow one to make use of the narrowband nature of harmonic lasing.

IX. SUMMARY
In this paper we have shown that harmonic lasing in xray FELs is a very attractive option.It works well in the frame of the realistic 3D model of the FEL process, and can be realized in practice in a relatively simple way, based on the achievements in production of high-brightness electron beams and high-quality undulators.In this paper we have discussed only a few possible applications of harmonic lasing that can be summarized as follows: (i) extension of wavelength ranges of existing and planned x-ray FEL facilities beyond the baseline; (ii) more flexible operation of facilities having several undulator beam lines; (iii) reduction of the bandwidth at saturation (mild monochromatization) and an increase of brilliance; (iv) simultaneous production of two colors for pump-probe experiments with an easy control of the intensity ratio; (v) fast switching between two or more colors for different user experiments; (vi) a possibility of using more simple and robust undulator technology with larger periods and gaps at low-energy x-ray FEL facilities.
We have also found out that harmonic lasing is, in principle, possible in soft x-ray beam lines of x-ray FEL facilities without being aimed at.This lasing can be used as a mode of operation, or suppressed in a simple way.
Finally, let us express a hope that the list of possible applications will be significantly extended in the future.

ACKNOWLEDGMENTS
We would like to thank R. Brinkmann for his interest in this work, and D. Ratner for useful discussions.

APPENDIX A: PARAMETRIZATION OF THE EIGENVALUE EQUATION FOR HARMONIC LASING
In Ref. [22] the eigenvalue equation for a high-gain FEL was derived that includes such important effects as diffraction of radiation, betatron motion of particles and longitudinal velocity spread due to emittance, energy spread in the electron beam, frequency detuning.The eigenvalue equation is an integral equation which can be evaluated numerically for any particular parameter set with a desirable accuracy.The generalization of this eigenvalue equation to the case of harmonic lasing was done in [7].Here we present the latter result for the growth rate of TEM nm mode in a dimensionless form accepted in [61]: (A1) where h ¼ 1; 3; 5; . . . is harmonic number, I n is the modified Bessel function of the first kind.The normalized growth rate Ã ¼ Ã=À has to be found from numerical solution of the integral equation.The following notations are used here: is the transverse rms size of the matched Gaussian beam, emittance is simply given by ¼ n = with n being normalized rms emittance, k ¼ k =À is the betatron motion parameter, k ¼ 1= is the betatron wave number, is the beta function, Ã2 Note that the scaling factors (À, " ) reflect the growth rate of the fundamental harmonic.The efficiency parameter " is related to the corresponding parameter [41] of the onedimensional model as follows: " ¼ B 1=3 .One can observe that Eq. (A1) can be rewritten such that it looks the same for all harmonics: Note that the gain parameter can be rewritten as The new scaled parameters are now written as follows: z Þ= À is the detuning parameter, and is the diffraction parameter.
In this paper we concentrate on the case when beta function is optimized for the highest FEL gain.Since diffraction parameter depends on beta function, it is more convenient to go over to the normalized parameters other than those introduced above.Indeed, the diffraction parameter can be rewritten as B ¼ 2= k , where ¼ 2= h and h ¼ 2c=! h .Then we can go from parameters ð B; k Þ to ð; k Þ, and Eq.(A2) becomes Our goal is to find the reduced growth rate (the real part of the eigenvalue) Re Ã ¼ ReÃ= À of the transverse mode TEM 00 when an FEL lases at hth harmonic.The field gain length of this mode is then simply L g ¼ 1=ReÃ.In the case of a SASE FEL the detuning parameter falls out of the parameters of the problem since the lasing always takes place at the optimal detuning.Thus, when solving the eigenvalue equation, we should always find the eigenvalue at the optimal detuning.Let us also assume at the first step that the energy spread parameter is negligibly small (denoting the gain length for this case as L g0 ), so that its influence on FEL operation can be neglected.In this case the reduced growth rate Re Ã depends only on two dimensionless parameters: and k .If in addition one optimizes beta function, then the reduced growth rate is the function of the only parameter, scaled emittance: Re Ã ¼ fðÞ.Correspondingly, the field gain length can be written as follows: Numerical solution of the eigenvalue equation (A5) is time consuming, so we used an approximate solution [61] which agrees very well (to better than 1% in the whole parameter space) with the solution of Eq. (A5).In the most interesting parameter range, 1 < < 5, we have found [26] that the function fðÞ is well approximated as fðÞ / À5=6 , so that the gain length in the case of negligible energy spread and optimal beta function is where a 1 is the fitting coefficient.Now we would like to include the effects of the energy spread.For that we present the growth rate as L g ¼ L g0 ð1 þ Þ, where depends on the energy spread.Again, for the optimal beta function, we found that the fit / Ã2 T 5=4 works very well in the wide range of values of the energy spread parameter.Thus, the field gain length for the optimal beta function can be written as follows: Optimizing fitting coefficients a 1 and a 2 in the range of parameters, specified in ( 6) and ( 7), we obtain Eqs. ( 3)-( 5).
In a similar way we obtained the expression (8) for the optimal beta function.In particular, in the case of Energy spread growth due to the quantum fluctuations of the spontaneous undulator radiation can be an important effect [29,30] in x-ray FELs.The rate of the energy diffusion is given by [30] (note that the peak value of the undulator parameter K was used in formulas of Ref. [30]) for planar undulator.To estimate the FEL saturation length for the case of optimal beta function, we accept the following scheme [26].First, we neglect energy diffusion and find a zeroth order approximation to the saturation length from ( 9) and ( 3)-( 5).Then we calculate an induced energy spread in the middle of the undulator from (B1), add it quadratically to the initial energy spread, and find a new expression for .Then, using (3)-( 5) and ( 9), we find the first approximation to the saturation length.Then we do the next iteration, etc.Finally, the saturation length can be estimated as Note that in the latter formula the powers are somewhat simplified.Comparing Eqs. ( 9) and (B3), we can introduce an effective parameter, which should be used instead of in (7) to check the applicability range and in (8) to estimate the optimal beta function.
Although formula (B3) is a rather crude estimate, it can be used for quick orientation in the parameter space with a posteriori check using a numerical simulation code.

APPENDIX C: GENERALIZATION OF MING XIE FORMULAS TO THE CASE OF HARMONIC LASING
In Refs.[31,32] the fitting formulas were presented that approximate FEL power gain length, L g .Note that in our parametrization in Sec.II (and throughout this paper) we use the same notation for the field gain length which is twice longer.The power gain length of the fundamental harmonic was expressed in [31,32] as follows: where L 1d is the 1D gain length for the cold beam, and Ã depends on the three dimensionless parameters: d , , and .This dependence can be found in [31,32], it was obtained by fitting the solution of the eigenvalue equation with the help of 19 fitting coefficients.We can generalize these results for calculation of power gain length L ðhÞ g of harmonic lasing in a simple way.Equation (C1) can be generalized as The 1D gain length of harmonics can be calculated as and the function Ã now depends on the three generalized parameters: It was suggested in [18] that the fundamental mode can be disrupted by introducing consecutive phase shifts 2=3 while the third harmonic is amplified without interruptions up to saturation.However, the simulations in [18] were done for the case of a monochromatic seed.We would like to check if this method also works in the case of a SASE FEL, using the same 1D model as in [18], and a similar normalization procedure.For example, the reduced longitudinal coordinate ẑ in our notations [44] corresponds to " z in [18].
We define phase shift in the same way as it was done in [18] to make the results compatible.For example, the shift 2=3 corresponds to the advance of a modulated electron beam with respect to electromagnetic field by 1 =3.In Fig. 9 we present the simulation of SASE FEL with the set of phase shifters considered in [18]: phase shifts are equal to 2=3 at the positions ẑ ¼ 4; 5; 6; . . . .One can see that this set does not provide a sufficient disruption of the fundamental mode so that it reaches saturation not allowing the third harmonic to achieve high-intensity level (although it is somewhat larger than that in the case without phase shifters).Note that starting with phase shifts earlier, at ẑ ¼ 1, or using them more often does not bring a significant improvement of the situation.Better results are achieved if one uses 4=3 shifts, but this is also not sufficient for a sure suppression of the fundamental harmonic and obtaining an ultimate performance of the third harmonic.The main difference of a SASE FEL with a seeded FEL amplifier is that in the former case the amplified frequency band is defined self-consistently, i.e., the mean frequency is shifted depending on magnitude and positions of phase shifts.
One can try to use a sequence of phase shifters 2=3; 4=3; 2=3; 4=3 . . .[62] but this is a less efficient method than the one described in Sec.IVA, namely a piecewise use of phase shifts 2=3, 4=3, and 0. In the latter case we can achieve a desirable situation as one can see from Fig. 10.Indeed, the third harmonic saturates while the fundamental mode stays well below saturation.

APPENDIX E: HARMONICS VERSUS THE RETUNED FUNDAMENTAL MODE: COMPARISON WITH 1D MODEL
Here we consider harmonic lasing and lasing at the same wavelength at the fundamental mode with the reduced undulator parameter K.In this section we neglect energy spread effects ( ¼ 0), and concentrate on comparison of 3D and 1D models.
A comparison between gain length of the third harmonic and that of the fundamental harmonic (with reduced undulator parameter K re such that the wavelength is the same in both cases) was done in [18] in the framework of 1D model.It was shown that in the case of cold electron beam the FEL gain length is always shorter for third harmonic lasing.The ratio of gain length of the retuned fundamental mode to the gain length of the hth harmonic is given by the formula The superscript ð1KÞ indicates that the retuning of the undulator parameter was used to reduce wavelength of the first harmonic.The retuned undulator parameter K re can be found from the equation: Now we can present the corresponding ratio of gain lengths for the case of a full 3D model of FEL process including diffraction of radiation, finite transverse beam size, betatron motion, etc.As it was done above, we assume that beta function is optimized in each case, and the energy spread effects can be neglected.Since the wavelength and the beam energy in the considered case are the same for a harmonic and for the fundamental mode, the emittance parameter is also the same.Thus, according to (A6), the ratio of gain lengths is simply given by the inverse ratio of gain parameters À [see (A3)], i.e., it can be written [with the help of (E2)] as follows: FIG. 10.Normalized power of the fundamental harmonic (solid) and of the third harmonic (dash) versus normalized undulator length.Phase shifts are equal to 4=3 at the positions ẑ ¼ 1; 2; 3; 8; 9 and 2=3 at the positions ẑ ¼ 4; 5; 6; 7; 10; 11.The undulator parameter is large, K ) 1.
FIG. 9. Normalized power of the fundamental harmonic (solid) and of the third harmonic (dash) versus normalized undulator length for a SASE FEL.Phase shifts are equal to 2=3 at the positions ẑ ¼ 4; 5; 6; . . .; 14, as suggested in [18].The undulator parameter is large, K ) 1. Definitions of the normalized parameters can be found in [44].HARMONIC  We indicated explicitly that in the 3D case the beta function was optimized for a harmonic and for the retuned fundamental.In contrast, in the 1D case the emittance and the beta function are not the parameters of the problem, and the current density is kept the same.It was shown in [18] that in the frame of 1D theory with cold electron beam the gain length of the retuned fundamental mode is always larger than the gain length of the third harmonic.It follows from (E4) that this also holds in the 3D case with negligible energy spread and optimal beta function, moreover the ratio is even larger (it is raised to the power 3=2) than in the 1D case.This means that inclusion of 3D effects actually improves the situation and makes harmonic lasing even more attractive option than 1D theory suggests, see Fig. 11.

FIG. 3 .
FIG.3.Parameter for the retuned fundamental harmonic ( ð1Þ , solid line), and for the third harmonic ( ð3Þ , dashed line), versus rms undulator parameter.The gain lengths of the third harmonic and of the retuned fundamental harmonic are equal.Retuning is done by reducing undulator parameter.