# Synchronised TeraHertz Radiation and Soft X-rays Produced in a FEL Oscillator
## 3 The THz FEL Oscillator: Numerical Results  
In this section, we describe and discuss the simulation results of the THz FEL oscillator. The procedure follows the evolution of the radiation within the system composed by the cavity and the undulator. As a first step, the FEL emission is computed starting from noise in the undulator. The radiation electric field is extracted over a three-dimensional grid at the end of the undulator and transported through the cavity. After reflection by the rear mirror, the radiation pulse encounters a successive electron bunch and seeds it in the subsequent passage inside the undulator. The process is then reiterated up to saturation. The FEL simulation has been carried out by using the three-dimensional, time-dependent FEL code Genesis 1.3 [35]. The cycling of the radiation through the cavity has been evaluated by means of the Huygens integral [36; 37; 38], taking into account the losses on the optical elements and the geometry of the whole optical line. Besides the absorption of the optics and the effect of the holes, other losses come from the imperfect matching between radiation and electrons at the undulator entrance due to the natural difference in their transverse sizes. The THz radiation, in fact, arrives at the entrance of the undulator with a dimension much larger than the electron beam size, and only a fraction of its energy is coupled to and contributes to seed the particles. The profiles of the electron beam size matched to the undulator and of the radiation at a different round trip are presented along the undulator coordinate z, respectively, in Figures 4 and 5. The radiation starts at the beginning of the electron beam and diverges due to diffraction, but then achieves stationary behaviour on values determined by the cavity properties. The total losses _Loss_ are given by the sum of several terms, namely the fraction of energy extracted from the system \(L_{ext}=E_{EC}/E_{IC}\), \(E_{IC}\) and \(E_{EC}\) being the intra-cavity and extra-cavity energies, the absorption of the mirrors \(L_{mirr}\), the losses on the lenses and the effect of the holes \(L_{lens}\), and the mismatch term \(L_{mm}\) estimated by \(L_{mm}=1-A_{e}/A_{rad}\), where \(A_{rad}\) and \(A_{e}\) are the radiation and electron area at the beginning of the undulator, respectively. The last term, connected to the filling factor, is widely dominating. In order to take into account the jitters in energy of the linac, a sequence of electron bunches different ones from others both microscopically (by randomly changing the seed of the Hammerslay sequences of the electron phase space distributions) and macroscopically, by preparing and injecting them into the undulator, thus simulating the shot-to-shot fluctuations of the bunch train. The macroscopic shot-to-shot variations of the average characteristics within the jitter intervals include the random change of the electron energy by \(1\) per mill, the tuning between electron beam and radiation within \(100\) fs of time delay, and the transverse overlapping with \(50\)\(\upmu\)m of pointing jitter. Due to their different velocities, the radiation field travelling inside the cavity overtakes the electron beam. The pulse therefore needs to be delayed by the total slippage length at the successive round trip. Implementing a slight shortening of the cavity length, the radiation turns out to be synchronised with the next bunch at the undulator entrance and within the temporal jitter [39]. The value of the energy achieved at saturation as a function of the time delay between electrons and radiation is shown in Figure 6. The wide width of the curve is much larger than the time fluctuation of an electron beam train in an SC linac, less or at a maximum of the order of \(100\) fs.