Transverse Confinement of Electron Beams in a 2D Optical Lattice for Compact Coherent X-Ray Sources

Compact coherent x-ray sources have been the focus of extensive research efforts over the past decades. As a result, several novel schemes like optical and nano-undulators for generating x-ray emissions in"table-top"setups are proposed, developed, and assessed. Despite the extensive efforts in the past decades, there exists no operational FEL based on optical or electromagnetic undulators. By combining the particle confinement capability of optical cavities with wiggling motion inside an optical undulator, this paper proposes a new concept for making a compact coherent x-ray source. The full-wave solution of first-principle equations based on finite-difference time-domain and particle-in-cell (FDTD/PIC) is performed to simulate inverse-Compton scattering (ICS) off both free and confined electrons. It is shown that the strong space-charge effect in a low-energy electron beam (5 MeV) is the main obstacle in acquiring coherent gain through the ICS mechanism with a 10-micrometer laser. Subsequently, it is shown that by confining the electron beam at the field nodes of an optical cavity, the space-charge effect is compensated, and additionally, the ultrahigh charge density enables high FEL-gain at confinement spots. The full-wave numerical simulations predict enhancement of about three orders of magnitude in the radiation efficiency when ICS is carried out with confined electrons compared to free electrons. These theoretical results show promising potential as a new scheme for implementing a compact coherent x-ray source.


I. INTRODUCTION
Conventional compact x-ray sources include bremsstrahlung tubes [1], channeling radiation [2], triboluminescence [3], and inverse Compton scattering (ICS) sources [4][5][6][7][8]. The first three make use of non-relativistic electron (e-) beams of about the same energy as that of the desired x-ray photon. Through an interaction between the e-beams and a properly designed structure, the energy of non-relativistic electrons is transferred to photons. While these sources are highly mature and stable technologies, they have certain drawbacks as they: (a) emit with very low directivity, i.e. into 4π solid angles; (b) emit incoherently, resulting in fluxes that increase only linearly with the number of electrons; (c) are generally not wavelength-tunable; and (d) have difficulties to achieve both high-flux and ultra-small source sizes, as is desirable for various applications. Currently, the only x-ray sources that do not suffer from these drawbacks are free-electron lasers (FEL) [9][10][11][12], which, however, require giant facilities. Thus, research efforts world-wide are focused on the development of more compact x-ray sources.
In an FEL setup, x-ray radiation is produced from interactions between relativistic e-beams and an undulator [13]. In the low-gain regime of FEL, incoherent radiation is generated from wiggling motion, whereas, in the high-gain regime, the self-amplification of incoherent radiation due to micro-bunching results in highly coherent and bright radiation. The majority of the methods currently under investigation adhere to the FEL scheme. Investigators either try to produce relativistic electrons in a small facility, i.e., perform compact accelerator research, or elaborate on realization of short wavelength wiggling motion in a compact undulator device.
The ultimate goal in compact accelerator research is to boost the average accelerating gradient. The use of the plasma environment for particle acceleration engendered the research field of laser-plasma wake-field acceleration (LPWA) [6,[14][15][16][17][18]. This method uses a high-intensity laser that is focused on an atomic gas jet, creating a plasma and in turn inducing extremely high field gradients in the plasma area surrounding the laser. Electrons in the plasma can find the right phase and accelerate to high energies [19,20]. Gradients of tens of GeV/m in few millimeters of the acceleration path have been demonstrated [16], and cascades of these interactions have been implemented in a multistage setup [21]. Another group of techniques make use of increasing the operating frequency of accelerators. The higher operation frequency shrinks the device dimensions, which in turn reduces the energy required for particle acceleration, and relaxes limitations on the maximally tolerable fields due to pulsed heating [22][23][24]. Furthermore, higher field emission thresholds, as well as the easier realization of short pulses at high frequencies, assist in obtaining high-gradient accelerators [25,26]. Dielectric laser accelerators (DLA) [27][28][29][30] as the second method and terahertz (THz) driven linear electron acceleration [31][32][33][34][35] as the third are promising high-frequency accelerators. A fourth method, ultrafast accelerator technology, is based on ultrashort pulses employed for electron acceleration [36][37][38]. In addition to the aforementioned methods, there exist numerous other ideas towards high-gradient accelerators, which are investigated in detail. Some examples are the inverse free-electron laser scheme [39], inverse Cerenkov acceleration [40], laser plasma acceleration [41][42][43], and beam-driven acceleration [44,45].
Techniques for the realization of compact undulators include cryogenic undulators [46] and optical undulators [47][48][49][50], where the oscillations in an electromagnetic (EM) wave realize the wiggling motion of electrons. Sources based on optical undulators are typically referred to as inverse Compton scattering (ICS) sources. The first ICS x-ray sources were proposed soon after the discovery of lasers in 1963 [51,52] and experimentally demonstrated just one year later [53]. The compactness and ability to produce photons of very high energy up to the gamma (γ-) ray regime is a remarkable peculiarity of ICS sources [54]. Techniques other than those listed above -e.g., transverse gradient undulators [55], travelling-wave undulator [56], and interaction with an optical lattice [57] -have also been proposed for x-ray radiation generation.
In addition to the aforementioned schemes, researchers have explored novel approaches for generating coherent x-ray radiation. Wiggling a modulated electron beam to enable intense superradiant x-ray generation is one example. The electron modulation can be produced either by field-emitter arrays combined with emittance exchange [58], by field-emission from flat emitter arrays [59] or by electron beam diffraction from a perfect crystal combined with emittance exchange [60]. Moreover, the interaction of an electron beam with a periodic nanostructure leads to radiation through the inverse Smith-Purcell effect [61][62][63]. Such sources are currently under investigation in various frameworks including metallic gratings realizing surface plasmon polaritons [64], 2D materials [65], and dielectric nanostructures [66]. Various research institutes around the world are pursuing compact x-ray sources by combining one or more of the above-listed technologies.
All techniques described for the realization of compact x-ray sources are based on the radiation equation in the wiggling motion, namely where λ x , λ u , K, and γ are the radiation wavelength, undulator period, undulator parameter, and Lorentz factor of the electron beam, respectively. This equation changes to for ICS interactions with a counter-propagating laser of wavelength λ 0 and strength parameter a 0 . Some techniques elaborate to reach the required Lorentz factor γ in a small setup, others to reduce λ u so that the Lorentz factor required for output radiation λ x is decreased. Nonetheless, accounting for the 3D dynamics of FEL radiation, it can be shown that there are strong fundamental challenges in achieving coherent gain [67][68][69][70]. Some examples are meeting the lasing condition < λ x /4π with being the electron beam emittance, preserving the transverse coherence of the beam, delimiting the longitudinal energy spread, and circumventing the space-charge effects. These effects are safely covered in the theoretical studies only if full-wave solvers based on first-principle equations are used for simulation of the radiation phenomenon. Therefore, the methodology in this study is using a 3D full-wave solver based on FDTD/PIC to assess the performance of the introduced scheme. The theory of FEL using an optical undulator has been proposed in the 1980s for the first time [48,71]. However, despite the extensive efforts in the past decades, there exists no operational FEL based on optical or EM undulators. Some studies try to explore the main challenges in free-electron lasing of low-energy electrons using the available simulation tools [49,50]. Fulfilling a detailed investigation on obstacles in FEL operation using optical undulators, similar to the study in [72] for LPWA based sources, is out of the scope of this paper. This paper argues that the strong space-charge forces between electrons are the main impediment in achieving a coherent gain in the radiation. Afterwards, we aim at establishing a mechanism based on particle beam confinement for relativistic electrons to propose an unconventional approach for tackling the compact coherent x-ray source problem. The proposed setup is illustrated in Fig. 1, which shows the conventional optical undulator (Fig. 1a) setup compared to the new technique. It is known that charged particles inside a spatially varying field profile are influenced by gradient forces, driving them towards the area of weaker field strengths [73][74][75]. This occurs inside an optical cavity (Fig. 1b) or when two counter-propagating twin beams impinge on the electron bunch (Fig. 1c). It is hypothesized that when the electrons in a beam are transversely confined, many of the existing challenges emanating from transverse motions and repulsive forces are overcome, thereby achieving the coherent-gain regime is alleviated.

II. FULL-WAVE SIMULATION OF FELS
Numerical simulation of a x-ray FEL in a full-wave fashion based on first-principle equations was for a long time impossible due to the involvement of dramatically multidimensional EM effects. For instance, the undulator wiggling period is around 1-3 cm with a total undulator length of 10-100 m, whereas the radiation wavelength of the radiation source is 0.1-100 nm. As a result, very high computation costs are needed to resolve all the involved physical phenomena, which is not practical even with the existing supercomputer technology.
In 2007, the breakthrough theory of simulation in a Lorentz-boosted framework was pioneered by Jean-Luc Vay [76]. This theory had direct implications on the problem of x-ray FEL simulations, which was further discussed in [77]. The coordinate transformation results in the expansion of bunch size and optical wavelengths and the contraction of the undulator period. Interestingly, the transformation to electron moving frame transforms these very different length scales to values with the same order of magnitude. Consequently, the length of the computation domain is reduced to slightly larger than the bunch dimensions making the full-wave simulation numerically feasible. Based on this principle, the code MITHRA was developed which provides a full-wave simulation tool for FEL mechanism [78]. This code is widely benchmarked against standard simulation tools in FEL and accelerator physics [79] and is currently incorporated into the OPAL platform [80]. All simulations presented in this paper are performed using MITHRA. The data for reproducing the presented results in this paper are open-source and available under https://github.com/aryafallahi/mithra. Typical finite-difference time-domain particle-in-cell (FDTD/PIC) codes like WARP and OSIRIS employ the Yee algorithm to solve Maxwell equations and a symplectic algorithm like Boris scheme to solve for the particle motion. Such a framework is not able to capture the Coulomb forces between the charged particles, i.e. the so-called spacecharge effect. To this end, the Poisson equation needs to be solved in conjunction with the Maxwell and motion equations. MITHRA implements the FDTD/PIC algorithm on potential equations, namely where A, φ, J and ρ are the time-and space-dependent magnetic vector potential, electric scalar potential, current density, and charge density, respectively. The electric and magnetic fields are extracted from potential fields to update the particles' phase-space coordinates. Subsequently, the charge and current densities, J and ρ, are updated according to the motion in the latest time step. The updated values for J and ρ are inserted in (3) and (4) to solve for the backaction of particles' motion on the EM fields. Through such an implementation, the space-charge effect is covered in the simulations (Example 4 in [79]). Although the space-charge effect is negligible in conventional x-ray FELs owing to the ultra-relativistic beam energies, as will be seen later, it dramatically influences the operation of compact x-ray sources.
In addition to the space-charge effect, the EM recoil and quantum effects also should be addressed. In [81], it is shown that the finite-difference formulation for potential equations coupled to a symplectic algorithm for the equation of motion preserves the symplectic two-form associated with the original Hamiltonian systems, similar to an exact solution. In other words, such an algorithm should also capture the EM recoil effect. On the other hand, the classical treatment of electron-wave interaction within MITHRA does not allow for any consideration of quantum mechanical effects. The ratio ρ 1 = ω/γmc 2 , with ω = 2πc/λ x , representing the amount of quantum recoil due to each photon emission, quantifies the quantum mechanical effects. Furthermore, ρ 2 = ( ω/2ρ F EL γmc 2 ) 2 with ρ F EL being the FEL parameter, estimates the level of recoil influence on the gain process [82,83]. The simulated cases in this paper hold the condition ρ 1 1 and ρ 2 1 thus the use of MITHRA software and its implemented formulation is justified.

III. CHALLENGES IN LASING OF OPTICAL UNDULATORS
The Pierce or FEL parameter, ρ F EL describes the conversion efficiency from the electron beam power into the FEL radiation power. In a one-dimensional ideal case, where detrimental effects originating from energy spread, emittance, diffraction, space-charge, and time-dependence of the beam and radiation profile are neglected, the FEL parameter for planar undulator can be derived from [12] whereK = K(J 0 (ξ) − J 1 (ξ)) with J 0 and J 1 being first and second order Bessel functions and ξ = K 2 /(4 + 2K 2 ). In addition, n e stands for the electron density in the beam. For an optical undulator, after considering the transformations λ u ↔ λ 0 /2 and K ↔ a 0 , the equivalent FEL parameter is obtained from The main goal in utilizing optical undulators is to achieve a targeted λ x using a smaller λ u and γ. By accounting for a constant λ x , equations (6) and (2) yield the following equation for the FEL parameter: The laser strength parameter a 0 is often constant and set close to one to procure maximum efficiency on one hand and avoid disadvantageous nonlinear effects on the other. Hence, it can be deduced that obtaining the same coherent radiation efficiency (ρ F EL ) for low-energy electrons requires a proportionally higher electron density (n e ). This requirement is completely contrary to the space-charge effect, which becomes considerably stronger in the low-energy regimes. As a result, an electron density which may be easily achievable for electron beams with GeV energy can be difficult to realize at MeV electron energies let alone the thousand times higher density dictated by equation (7). In addition to the realization of the required electron density, maintaining this high density throughout the whole interaction length is of utmost importance. To demonstrate this hypothesis, an exemplary FEL interaction with parameters tabulated in table I is taken into account. The considered values are chosen based on the state-of-the-art electron gun as well as CO 2 laser technologies. The interaction is simulated using the code MITHRA with and without considering the space-charge effect. The analysis without space-charge effect is performed by setting φ = ρ = 0 in equation (4). The electron and optical beam propagation direction is assumed to reside along the z-axis and the optical beam is linearly polarized along the y-axis. In the simulations, the electron bunch is modeled by 2 × 10 6 particles each representing one electron, and a shot noise is added over the particle distribution. The co-moving computational domain around the bunch is discretized into 45 million pixels, which leads to around 16 hour simulation time on 128 parallel nodes. Fig. 2a shows the comparison of the radiated power from the bunch for the two simulated cases. The predicted radiation efficiency for the simulation without space-charge consideration is 3.0 × 10 −5 , which reduces to 9.1 × 10 −7 when the effect is considered. It is observed that the minute radiation gain obtained in the analysis without spacecharge is completely suppressed when the Coulomb repulsion of electrons is taken into account. Comparing the bunch sizes and lengths in the two analyses, which is shown in Fig. 2b, confirms that the space-charge forces intensify the bunch expansion. As indicated in Fig. 2b, the longitudinal size of the beam increases by 7% due to the space-charge effect. Such a large variation in the bunch length strongly degrades the self-modulation of the bunch at the correct wavelength. Hence, the coherent gain is hampered, and thereby the FEL radiation efficiency is dramatically reduced.  Our results indicate that a mechanism is required that substantially reduces the gain-length such that lasing of the low-energy electrons is enabled before the bunch longitudinal expansion degrades the amplification process. To this end, higher charge densities need to be realized and additionally preserved throughout the interaction. This is in line with the hypothesis on scaling FEL operation to small undulator periods discussed in the previous section.

IV. CONFINEMENT OF ELECTRON BEAMS TRAVERSING OPTICAL CAVITIES
It is known that when a particle is exposed to spatially varying EM fields, a so-called gradient force or ponderomotive force influences the particle motion [84,85]. This pondermotive force is derived from where E denotes the time-varying, i.e. oscillating electric field and ω is the oscillation frequency. This equation suggests that a charged particle in an inhomogeneous oscillating field not only oscillates at the ω frequency but is also accelerated by F p toward the weak field locations. When an ensemble of charged particles resides in the standing wave of an optical or EM cavity, owing to the existence of points with minimum and maximum field strengths, ponderomotive forces reshape the bunch distribution. More accurately, these forces push the particles to field nodes and pull them away from the field antinodes. Similarly, it is expected that when an electron beam traverses an optical cavity, the transverse distribution of the electrons is influenced by the gradient forces in an analogous fashion. Fig. 3a illustrates the variations in normalized charge density of an ideal beam (zero emittance) when it passes through a cavity. This visualized data is obtained through particle-in-cell simulation of electrons experiencing cavity fields which are formulated as a standing-wave Gaussian field distribution (see Appendix). Without loss of generality,  a 2D interaction problem, as schematically shown in the figure subset, is considered here. In this 2D case, confinement happens only along one transverse direction (x−axis in Fig. 3). A second simulation tackles the extreme case, in which an exploding beam with high emittance enters the cavity. The results of this simulation are illustrated in Fig. 3b. Note that these 2D simulations are presented to qualitatively examine the bunch evolution inside the optical cavity yet, for the sake of brevity, the detailed parameters for the beam and cavity are not outlined. In both ideal and extreme cases the confinement of particles in specific regions coinciding with field nodes is well observed.
Originated from this confinement effect, three closely interrelated phenomena happen simultaneously, which are advantageous for achieving the coherent-gain. First, the confinement effect prevents the increase in beam transverse size due to the transverse energy spread, thereby minimizing the beam effective emittance. It should be emphasized that the electrons are confined inside a potential well produced by the ponderomotive forces. Athough the intirinsic emmitance of the beam is conserved, since the microbeams are no more free beams the beam divergence is not directly related to the beam emittance. Considering the effective emittance as the product of the beam divergence with its transverse size, this parameter is reduced inside the cavity fields. This dramatic reduction in the effective emittance facilitates meeting the lasing-condition, < λ x /4π, and consequently makes the electron beam a perfect candidate for an FEL mechanism.
Second, if confinement is enforced along both transverse directions, the ponderomotive force suppresses the transverse expansion of the beam size due to Coulomb forces. Although this expansion marginally reduces the charge density (see Fig. 2b), its prevention is important when high charge densities are realized.
Third, and most importantly, is the realization of beams with considerably higher charge densities. As shown in Fig. 3a and 3b, the ponderomotive force divides a single low-charge density beam at the cavity entrance to several beams with intensified charge densities. Inspired by the name microbunches in FEL physics, throughout this paper, these beams inside the cavity are named as microbeams. As postulated in the previous sections, the higher charge density of each microbeam augments their aptitude for coherent-gain in the radiation. As a conclusion, a freely propagating electron beam passing through the cavity transforms into several confined microbeams which are more suitable candidates for coherent radiation compared to the original beam.

V. INVERSE COMPTON SCATTERING OFF A CONFINED ELECTRON BEAM
To verify this hypothesis, the same ICS simulation as in table I is performed but with the fields of standing-waves superposed on the field of the counter-propagating ICS laser. Here, two cavities configured along x-and y-axes are taken into account such that the particle confinement happens in both transverse directions. The cavity beam parameters are listed in table II. The cavity wavelength (λ c = 11.8 µm) and the center position with respect to the starting point of bunch undulation (cδt = 8.4 mm) are obtained through optimization sweeps. A physical interpretation of these values will be explained in the next sections. Moreover, the two cavities are linearly polarized with a magnetic field along the beam direction, i.e. B z polarized. This is a critical requirement for the cavity configuration because an electric field along the beam traveling direction disturbs the longitudinal motion of the electrons and consequently the formation of microbunches. The total radiated power at λ x = 37.6 µm as well as the bunch dimensions for simulations with and without space-charge are shown in Fig. 4. The obtained results for final radiation are compared against the simulation without cavity fields, namely conventional ICS off free electrons (Fig. 2a).  Several effects are observed in the results which are in agreement with the previously addressed predictions. First, the transverse expansion of the beam due to beam intrinsic emittance and space-charge effects are totally suppressed as seen in Fig. 4b. Second, the results without space-charge consideration show that the intensified charge density leads to smaller gain-length and ultimately higher FEL efficiency. Third, there is a considerably less detrimental effect due to space-charge fields. Due to the fast coherent gain process, the FEL radiation is saturated before space-charge forces expand the longitudinal size of the beam. As a result, the ultimate radiation efficiency of the ICS source with confined electrons increases to 2.8 × 10 −4 , which is close to conventional FEL sources. Comparing the source efficiencies with and without cavity fields reveals an enhancement factor of ≈ 307 owing to the confinement effect of electrons.
Scrutiny of the bunch and radiation profile sheds more light on the radiation mechanism of a confined electron bunch. Figure 5 shows the bunch profile at the maximum radiation instant for simulations with and without cavity fields. For the visualizations here, results of the simulations capturing the space-charge effect are considered. Note that the bunch profiles viewed along the x-and y-axis are analogous owing to the inherent symmetry of the problem. In correspondence with the described hypothesis, the initial beam is divided into several microbeams (Fig. 5e and  f), that enable shorter gain-length due to higher charge density. This results in overcoming space-charge forces and consequently the rapid formation of microbunches in each microbeam (Fig. 5a-d). The radiations in the microbunches then add up coherently and lead to the observed enhancement in the total radiation.
In Fig. 6a, the radiation profile in the ICS from the confined electron beam in its co-moving coordinate frame is visualized. The radiated field is depicted on the cavity nodes as well as on a plane residing 5.7 µm in front of the bunch center. The results show that the forward-propagating radiation becomes as strong as the coherent backward propagating radiation at the maximum radiation instant. The output beam from the proposed source has a different beam profile from conventional FEL sources. Since multiple radiation sources are produced, radiation main-lobe and side-lobes emerge as in phased array antennas. This is observed in visualized power profile in Fig. 6b.
The obtained results numerically confirm the promising potential for ICS with confined electron beam as a new generation for x-ray sources. In the next sections, the anticipated characteristics of the proposed x-ray source are discussed.

VI. COHERENCE PROPERTIES OF THE RADIATION
The presented visualization of the bunch profile illustrated qualitatively the occurrence of microbunching in each microbeam. Notwithstanding, such a data visualization does not demonstrate the event of coherent gain in the output radiation. To demonstrate the coherent gain in radiation, and thereby theoretically proving the functioning of a compact coherent x-ray source, the maximum radiated power was investigated when the bunch length is varied. By changing proportionally the total number of electrons, a constant average charge density is maintained throughout the sweep. The bunch length is directly proportional to the number of microbunches. Thus, the variation of the saturation (i.e. the maximum) power in terms of the bunch length shows the degree of coherent gain occurring during the interaction. Fig. 7 shows the result of this study on a logarithmic scale. It can be seen that in the small bunch length regime, the saturation power increases slightly with the bunch length. The increase rate becomes drastically stronger for longer bunch lengths after the coherent gain is triggered. Eventually, the radiated power is saturated and stays constant with the bunch length. This observation is in agreement with the free-electron laser principle and confirms the coherent buildup of the radiation from each microbunch.  It is known from FEL physics that the transverse and longitudinal coherence are two strongly interdependent properties [69,70]. In a conventional FEL setup, the radiation of individual microbunches is coherently amplified if the transverse coherence of the radiation is preserved throughout the beam cross-section. This raises an intricate question on the coherent radiation from microbunched microbeams in the proposed scheme: why does the microbunching in all microbeams take place coherently in-phase (see. Fig. 5c)?
Note that in the presented simulations, shot noise is added over uniformly distributed electrons as the trigger source for coherent radiation [86,87]. This shot noise is a z-dependent function, which may raise the suspicion that the observed transverse coherence among all the microbeams is the consequence of this assumption. To test this effect, a simulation is performed in which the electrons are distributed randomly according to the random number generator of the simulation platform, with no additional shot-noise. It is known that such a bunch generation algorithm leads to unrealistic clustering of the electrons and consequently deviations from the correct simulation results [10]. However, its effect on the microbunch formation assists in clearing up the aforementioned ambiguity. The result is shown in Fig. 8 where the particle density along the traveling direction is depicted for the four central microbeams (see Fig. 5e). As observed in the simulations, despite the random generation of particles, the microbeams are all microbunched coherently in-phase, resulting in transverse coherent radiation.
There are two primary reasons leading to the observed effect. First, we know from FEL physics that the microbunch phase is mainly determined during the initial gain lengths ( [12] pages [79][80][81]. After the optimization process, it was always observed that the position of the cavity with respect to the ICS interaction point is set such that wiggling motion is started before the formation of microbeams. As a consequence, during the time when the microbunch phase is determined no transverse modulation exists, which results in a constant microbunching phase throughout the whole beam. This phasing does not change after the formation of microbeams and as a result, all microbeams  are micorbunched coherently in phase. The second reason is linked to the coupling between the microbeams through the radiated fields. As observed in the radiated field profile (Fig. 6a), the radiation from each microbeam strongly diffracts because of the small beam size of the microbeams. This beam diffraction effect causes a microbeam to be influenced by the superposition of radiated fields from the whole bunch. Therefore, the microbunching of individual microbeams is a collective effect in the whole bunch similar to a conventional FEL mechanism. As a consequence, transversely coherent microbunching is anticipated in the proposed interaction.
Coherence time is an important property of any radiation source including the proposed x-ray source. Here, the coherence time (τ ) is approximated as the inverse of spectral bandwidth for the on-axis radiation. In Fig. 9, the radiation spectra of on-axis radiations are depicted for ICS off free electrons (no cavity fields) and confined electrons. It is seen that the spectrum of the ICS source is slightly broadened when electrons are confined in the cavity fields. Cavity fields induce a transverse oscillating motion to the electron beams around the cavity nodes (see Fig. 3a). This means that the particles are not transversely stationary at the cavity nodes but are oscillating around the nodes. As a result of the two simultaneously happening oscillations due to ICS and cavity beams and the non-linear effects emanated from the longitudinal motion of electrons, a wave-mixing process takes place which leads to a broadening of the radiation spectrum. In other words, there exists a trade-off between the output power and spectral linewidth of the generated radiation. The coherence times of the ICS source with free e-beam and confined e-beam are calculated as 27.5 fs, and 116.2 fs, respectively. This means that the ∼300 times gain enhancement is obtained at the cost of ∼4 times broader bandwidth.

VII. RADIATION ENERGY SCALING
In the previous sections, the drastic increase in the radiated energy caused by the cavity fields was numerically demonstrated. This section addresses the variation of output energy with respect to the cavity parameters.
The first parameter is the beam strength parameter (a 0c ) which determines the ponderomotive force on the particles around the cavity nodes. This parameter is studied in Fig. 10, where the output power at resonance frequency is depicted in terms of the beam strength parameter of the cavity. It is shown that the output power is maximized around a certain ponderomotive force, here a 0c = 0.09. In other words, by increasing the ponderomotive force the output power is not necessarily enhanced. The enhancement takes place merely in the weak ponderomotive force regime. The reason for this effect is the oscillations caused by cavity fields. As mentioned previously, the polarization of cavity fields should be selected such that no oscillation happens in the propagation (z−) direction, to avoid perturbation in the microbunching process. This means that the cavity fields wiggle the electrons along the same direction as the ICS laser beam, thereby realizing a pondermotive focusing force. The wiggling motion due to cavity fields should be negligible compared to those of ICS laser because the main role of the cavity in this scheme is confinement. As a result, a compromise needs to be reached to maintain strong ponderomotive force and simultaneously weak wiggling motion. This trade-off is the origin of the results observed in Fig. 10.
The next important parameter to be studied is the cavity wavelength, whose influence on the saturation power is examined in Fig. 11. The illustrated simulation results show that the best efficiency is acquired when the cavity wavelength is close to the wavelength of the ICS laser. The existence of optimal wavelengths for the cavity beams is anticipated because a large wavelength, on one hand, does not impose a considerable confinement effect and a  small cavity wavelength, on the other, results in a large number of tiny focal spots that do not ultimately change the bunch transverse profile. However, the reason why this optimum wavelength occurs at values close to the ICS wavelength is still unknown. To theoretically prove this, one needs to derive analytical formulations for the radiation of modulated microbeams, which will be presented in a future study. There exists a small deviation between optimum cavity wavelength and ICS wavelength. The simulations with e-beams of larger transverse sizes showed that this deviation becomes smaller for larger beam sizes. An anomaly in the radiation at λ c ≈ 5 µm is observed in the plot. This wavelength is equal to the wiggling period of the electrons. When the two wiggling motions induced by the cavity and ICS laser fields are synchronous, the distribution of the ponderomotive force will be affected and the focal spots will be disturbed. This leads to the suppression of coherent gain in the radiation generation.

VIII. CONCLUSION AND OUTLOOK
This paper aimed at introducing a new roadmap for realizing compact coherent x-ray sources. A new scheme based on inverse Compton scattering off low-energy electrons transversely confined inside fields of an optical cavity is presented. The transverse gradient forces stemming from inhomogeneous cavity fields are capable of confining and additionally focusing the electron beams close to the cavity nodes. It is shown that the microbeams produced by this effect are more suitable choices for radiation generation compared to a free electron beam. The possibility of achieving fast coherent gain before bunch expansion due to space-charge forces is theoretically demonstrated. As a result, the appropriate design of the total interaction leads to compact x-ray sources that enable efficiencies close to the existing x-ray free-electron lasers.
Maximum effort was put into simulating the proposed phenomenon based on first-principle equations in order to capture all involved effects in the interaction between electrons, cavity and counter-propagating beams. Furthermore, the parameters of electron and optical beams were chosen according to the state-of-the-art e-beam and laser technology. This approach theoretically proves that the proposed scheme may be a viable venue for realizing a "table-top" coherent x-ray source. However, the realization of an x-ray source based on the investigated scheme requires a self-consistent start-to-end simulation as well as sensitivity studies. Particularly, the effects of existing experimental limitations on the source performance need to be scrutinized. For instance, fluctuations in the phase front of cavity beams, nonuniform (usually Gaussian) current profile in the electron beams, a non-uniform envelope of the ICS laser beam are parameters that influence the efficiency of radiation generation. In addition, the required synchronization between the electron beam and counter-propagating laser to collide at a certain position with respect to the cavity center needs to be explored. On the other side, this paper presented the design of a soft x-ray source. The potential of ICS off confined relativistic beams to realize a coherent hard x-ray source can be the focus of a future study. Hopefully, the presented analysis and proposal of one possible solution for a compact coherent x-ray source further motivates this field of research. Ultimately, these proposals are necessary to achieve a well-performing x-ray source that can be integrated into small labs for easier access and usage by physicists, chemists, and biologists.