## 3 Results
### Performance of the THz Radiation with Undulator at 11.5 THz and 23 THz  
Start-to-end simulations are performed with ASTRA [50], FALCON [51], and GENESIS [52] using the typical parameters listed in Table 1. ASTRA is firstly used to simulate the electron beam dynamics in the photoinjector, which consists of an L-band Pitz gun and four L-band accelerating structures. A longitudinal uniform beam is generated in the gun with a charge of 4 nC and peak current of about 300 A. The electron beam is compressed by the velocity bunching process [53] to about 520 A in the first accelerating cavity and then boosted to about 54 MeV in the downstream accelerating structures. Figure 5 shows the longitudinal phase space of electron beam and the current profile at the exit of the linac. One can find that there is a quasi-linear energy chirp and quasi-Gaussian current profile along the longitudinal position. Figure 4: (**a**) The square root of power distribution and field amplitude of the combined laser pulse; (**b**) the frequency and wavelength of the frequency-beating pulse. Figure 5: The longitudinal phase space of electron beam at the exit of the linac (**left**); The current profile at the exit of the linac (**right**). The electron beam and the frequency beating laser pulse are simultaneously sent into a modulator with period length of 1.6 cm and total length of 1.5 m, which is resonant at 800 nm. The modulation processes are performed with FALCON. After interacting with the frequency beating laser, the electron beam is modulated with an energy envelope at a THz wavelength (26 \(\upmu\)m). The modulation strength is proportion to the amplitude of the laser pulse. Then the electron beam is sent through a magnetic chicane to transfer the initial energy modulation into density modulation. In Figure 6, the longitudinal phase spaces before and after the dispersion section are presented. In addition, the current profile and bunching factors at different frequencies are also given. From Figure 6b,c one can find there is apparent density modulation at THz wavelength, which results in the bunching factors at 11.5 THz (26 \(\upmu\)m) and 23 THz (13 \(\upmu\)m) of about 0.28 and 0.18, respectively. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Value** \\ \hline Electron beam energy & 6–70 MeV \\ Energy spread (slice) & 0.01\% \\ Peak current & \(\sim\)520 A \\ Bunch length & 10 ps \\ Bunch charge & 4 nC \\ Normalized emittance & \(\sim\)3.5 \(\upmu\)m-rad \\ Seed laser wavelength & 800 nm \\ THz frequency & 0.1–100 THz \\ THz wavelength & 3 \(\upmu\)m–3 mm \\ Undulator period & 10 cm \\ \hline \end{tabular}
\end{table} 
Table 1: Main parameters of a THz light source. Figure 6: (**a**) The longitudinal phase space before the dispersion section; (**b**) the longitudinal phase space after the dispersion section; (**c**) the current profile after the dispersion section; (**d**) the bunching factor after the dispersion section. To generate radiation at 11.5 THz, the bunched electron beam passes through an undulator with magnetic period of 10 cm and dimensionless parameter of 2.2. Simulations are performed with GENESIS. Figure 7 shows the peak power and bunching factor evolutions along the undulator. According to Figure 7, the power gets saturation at the undulator position of only about 3 m with a peak power of about 500 MW. Undulator taper is utilized to further enhance the radiation power. The peak power increases to about 3.2 GW at the undulator position of about 10 m. Meanwhile, the final spectrum and the power profile are also presented in Figure 7. From Figure 7, one can observe that the radiation has great longitudinal coherence with a FWHM (full width at half maximum) spectral bandwidth of about 0.05 and the final FWHM pulse length is about 400 \(\upmu\)m (1.3 ps). The single pulse energy is about 6.3 mJ. To generate radiation at 23 THz, the bunched beam passes through the same undulator with dimensionless parameter of 1.37.