THz cavities and injectors for compact electron acceleration using laser-driven THz sources

We present a design methodology for developing ultrasmall electron injectors and accelerators based on cascaded cavities excited by short multicycle THz pulses obtained from laser-driven THz generation schemes. Based on the developed concept for optimal coupling of the THz pulse, a THz electron injector and two accelerating stages are designed. The designed electron gun consists of a four cell cavity operating at 300 GHz and a door-knob waveguide to coaxial coupler. Moreover, special designs are proposed to mitigate the problem of thermal heat flow and induced mechanical stress to achieve a stable device. We demonstrated a gun based on cascaded cavities that is powered by only 1.1 mJ of THz energy in 300 cycles to accelerate electron bunches up to 250 keV. An additional two linac sections can be added with five and four cell cavities both operating at 300 GHz boosting the bunch energy up to 1.2 MeV using a 4-mJ THz pulse.


I. INTRODUCTION
The conventional techniques to implement particle acceleration are based on radio-frequency (rf) cavities.Although the rf schemes after years of investigation have reached very efficiently functioning devices, their use for applications requiring only low charge bunches causes wasting a large fraction of the output, which in turn reduces the efficiency of the overall system.Compact accelerating structures are highly favored in such cases.In order to shrink accelerators, sufficient energy transfer to electrons should be realized in shorter distances, which in turn means introducing higher accelerating gradients.Engaging higher accelerating gradients makes it also possible to produce beams with higher quality due to less emittance growth.The last decades have witnessed extensive efforts to increase the efficiency of rf cavities which have led to enormous progress in this technology [1,2].Considerable progress has been achieved in superconducting rf cavity technology, both in terms of fabrication and operation to decrease the energy consumption and increase the beam quality [3,4].Further improvements however, are mainly limited by the damage thresholds of metallic surfaces [5][6][7][8][9][10][11].
There exist several mechanisms through which the structure of an accelerator is damaged, including thermal melting, mechanical stress, electron field emission, and magnetic pulsed heating.The last two effects seem to be the main obstacles for the implementation of high-frequency compact accelerators.It has been empirically demonstrated that the breakdown threshold due to field emission scales as f 1=2 • τ 1=4 , where f is the operation frequency and τ is the pulse duration [6][7][8].Employing frequencies beyond V-band  GHz) has therefore the potential to open new horizons in accelerator technology.Considering that ultrafast near infrared (NIR) lasers offer multi-GV=m accelerating gradients based on chirped pulse amplification, optical acceleration seems to be a very promising choice for acquiring compact accelerator devices.This finding is the main motivation behind research on dielectric laser accelerators (DLA) [12][13][14], direct laser acceleration [15], and also laser plasma wake field accelerators (LPWA) [16][17][18][19][20][21][22][23][24][25].However, the very short wavelength in the IR range puts a strong limit on the maximum charge that can be accelerated.To keep the emittance and energy spread of the electron beam in the desired range, the electron bunch should occupy only a few degrees of the optical cycle.Considering that 1°in IR corresponds to just 28 nm, the bunch length and consequently the bunch charge is tightly limited in IR acceleration.Another challenging issue in this scheme is the timing jitter between the optical pulse and the electron bunches that should be kept below 100 as in order to provide a 1°-level resolution phase stability.
The THz frequency range offers an appropriate compromise between the low accelerating gradient of the rf regime and short wavelengths of the optical signals.
Recently, it was experimentally demonstrated that it is possible to push the breakdown limits to a few GV=m in frequencies around 100 GHz and for nanosecond pulse durations [9].Moreover, the tight limitations on charge per bunch are strongly relaxed; for instance 1°phase precision at 300 GHz, corresponds to 10-fs bunch length which allows the acceleration of hundreds of fC to a few of pC electron bunches.Of course this charge is much lower than the nC level charge that we can support with rf accelerators, but it is still orders of magnitude larger than the fC-level charges possible to accelerate with optical accelerators.Emittance growth is prevented by applying high accelerating gradients at the GV=m level to the electron bunches immediately after their generation i.e. using THz driven electron injectors.In a THz gun electrons become relativistic after traveling a smaller distance compared to their rf counterparts.Therefore, space charge forces have less time to influence bunch emittance and deteriorate beam quality.
In addition to the above benefits, there exists another remarkable advantage if laser-driven THz generation schemes are employed.Recent progress in laser-driven THz generation provides the possibility to use one single optical seed to generate the input THz signal as well as the UV pulse for the photo emission process.Hence, tight synchronization between the electron bunch and the accelerating electric field can be fulfilled well below one femtosecond.In addition, problems caused by laser drifts, which are common sources disturbing the synchronization, are largely suppressed.
Nanni et al. demonstrated keV-level energy gain through a linear accelerator using optically-generated THz pulses [26].Considering the already achieved percent level efficiencies in the optical generation of THz pulses [27][28][29][30][31] and the available high-energy picosecond to nanosecond lasers, MeV accelerators seem feasible with present technology.Sub-keV ultrafast electron guns using planar structures fed by THz radiation have been recently reported [32] and advanced concepts are already developed for high energy ultrafast THz guns [33] using single-cycle THz pulses.Besides the promising success in generating ultrashort, single-cycle, THz pulses, forays have been made into optical generation of multicycle THz pulses using periodicallypolled nonlinear crystals [34][35][36][37][38].The efficiency of such schemes can also achieve percent level optical to THz energy conversion when high-energy lasers are employed [38].The concept of using THz waveguides for electron acceleration using multicycle THz pulses is previously proposed and investigated [39].Wong et al. theoretically demonstrated the possibility of electron acceleration to tens of MeV with millijoule level THz pulses.Here, we present how the concept of cascaded cavities can be tailored to build THz injectors fed by multicycle, laser-driven THz pulses.A fourcell, photo-cathode, electron gun operating at 300 GHz has been designed as the electron injector.After this initial acceleration, the electron bunches pass through two accelerating stages which consist of five-cell and four-cell cavities both operating at 300 GHz.Coaxial couplers using a so called door-knob waveguide to coaxial adapter are used to minimize the required THz energy based on the optimization described in Sec.II.Section III introduces in detail the configuration of the gun and its coupler, the procedure of optimizing the coupling constant and the related simulation results.Thermal and mechanical stability of the cavities are investigated in Sec.IV.Short range and long range wake fields are studied in Sec.V.

A. Cavity and coupler design
In most conventional accelerators, the electron injector consists of normal conducting rf cavities.These cavities are compatible with most photocathodes and are able to provide high gradients sufficient to make the electrons relativistic in the first half cell.It is possible therefore, to put the cathode inside the cavity and accelerate the particles immediately after their generation by the photo-electric effect.Analogously we can design photo-injectors based on THz cavities made of normal conducting copper.However, there are two main differences between the rf cavities and the THz ones.
It is of utmost importance to make the particles synchronous with the field inside the cavity in order to maximize the energy gain and achieve the best beam quality.In conventional cavities operating in the rf range, the period of the rf wave is large enough to make the electrons relativistic in the first half cell.Hence, the electrons are usually injected in the phase where the electric field on the cathode is close to maximum.As we increase the operating frequency, the field emission threshold increases proportional to the square root of the frequency according to [5][6][7] and the advantage in terms of pulsed heating damage may be negligible [10,11].However, the period of one cycle decreases proportional to the frequency.Therefore, one can conclude, that there is a maximum frequency after which a half cell structure does not function properly for electron acceleration.As a result, unlike the rf cavities with first cell lengths equal to half of the wavelength, in the designed THz cavities, lengths of the cells should be tapered to less than half of the wavelength to keep the particles synchronous with the electric field.
We designed a three and half cell normal conducting cavity to be used as a THz gun. Figure 1 shows a cross sectional view of the designed cavity.The operating mode is the TM 010 π-mode with operation frequency at 300 GHz.We chose 300 GHz, because the maximum THz generation efficiency is achievable in this frequency range.The onaxis electric field is 500 MV=m and the ratio of peak electric field to the accelerating field (E peak =E acc ) is 3, that means a maximum electric field of 1.5 GV=m occurs in the cavity which is below the damage threshold of copper in this frequency and pulse length [9].As mentioned, in order to synchronize the electrons with the electric field, the lengths of the cells should be equal to the distance that electrons fly in each cycle.In the first cycles, the velocity of the electrons is very subrelativistic and therefore the traveling distances in the first cycles are shorter than in the next cycles.Considering a sinusoidal spatial and temporal distribution of the electric field along the axis of the cavity, it is possible to calculate the distances that electrons traverse in each cycle to find the optimum length of the cells.After designing the cells with the calculated lengths one has to adjust the radii of the cells to provide a flat-top electric field along the axis of the cavity.The thickness and radius of the irises between the cells can be used to change the coupling between the cells to achieve the required mode separation.We tune these parameters manually to obtain the desirable electric field pattern and mode separation.Table I shows the physical parameters of the designed cavity shown in Fig. 1.
Due to the extremely small dimension of the first cell, especially the distance between the cathode and the disk separating the first and second cells, high Lorentz forces are exerted on the walls of the cavity around the first cell.In order to overcome this problem, a nose cone iris is designed to decrease the surface currents and to increase the distance between the cavity walls.However, the nose cone iris for the first cell reduces the field strength in this cell.Therefore, in order to keep the electric field of the first cell equal to the other cells its radius is decreased, which can also be seen in Fig. 1.The radius of the iris between the first two cells is also less than other iris radii.
The second difference between the THz cavities and the rf ones, lies in the operation type of the cavities.Since in the THz regime there is a strong limitation on the total available THz energy, we prefer to operate the cavity at the end of the transient mode and not in steady state.In fact, we want to fill the cavity with the THz signal and immediately accelerate the electrons.In this manner, the filling process of the cavity and the amount of energy required in this period play important roles in our design.In other words, particular attention should be paid to the transient analysis instead of the traditionally considered steady state analysis for the cavities.As it will be shown in the following, critical coupling does not minimize the required energy to fill the cavity unlike the conventional rf cavities which operate in steady state.In order to find the optimum coupling constant to minimize the energy needed to fill the cavity, we describe the loading process of a very simple cavity shown in Fig. 2. As shown in this figure, the iris can be assumed as a two port network.The incident waves to the ports are shown by a 1 and a 2 and the reflected waves are represented by b 1 and b 2 .The behavior of this iris can be described by scattering matrix, S: b which can be derived as: with Γ being the reflection coefficient from the iris.If the cavity is exposed to a constant input power, a 1 is time invariant.If we assume that the input power starts from t ¼ 0, at t ¼ 0 þ a part of power is transmitted to the cavity forming b 2 and the rest of the input power is reflected from the cavity which is described by b 1 .
According to the scattering matrix formalism these two parts can be written as:  The power of b 2 propagates along the cavity, reaches to the end wall, gets reflected completely with 180°phase shift and at t ¼ 2l=v g reaches the iris again.Here, l is the length of the cavity and v g is the group velocity of the wave.If the arrival time of this wave is exactly equal to the period of the input wave or one of its integer multiples, it can constructively interfere with the wave coming from the generator and the field inside the cavity starts increasing.The resonance condition is therefore: If we assume the attenuation constant per unit length in the cavity to be α, the wave reaching back the iris can be written as: This wave is again partially reflected from the iris and added to b 2 , while the rest transmits through the iris and will be added to b 1 .If the resonance condition holds, the new amplitudes after one cycle and N cycles can be written as follows: where x ¼ −Γe −2αl .The optimum coupling would be the case in which the total reflected energy during the filling process is minimum for a given stored energy.The total reflected energy is proportional to P N n¼0 b 1 ðnÞ 2 , which can be written as: The reflected energy described in the above equation, normalized to the stored energy as a function of the reflection coefficient is shown in Fig. 3.In this figure, the attenuation constant times the cavity length (αl) is assumed to be 0.001.The number of the cycles that are needed to fill the cavity has also been found from the filling time of the cavity that can be approximated by [40]: where T is the period of the input signal.As observed from the depicted curve, the reflected energy is minimum if the reflected coefficient is about −0.997.Of course, the value of the optimum reflection coefficient depends on the attenuation constant and cavity length.Although, easily dealing with these parameters during the design process is not feasible, both parameters can be considered by treating the unloaded quality factor of the cavity according to: For the first resonance mode from (4), v g ¼ lω 0 =π and the above equation for the quality factor can be written as: On the other hand, it is difficult to monitor the reflection coefficient during the design.Hence, we choose to adjust the coupling constant between the coupler and the cavity which is defined as: The coupling constant is in turn related to the reflection coefficient as: FIG. 3. The reflected energy from the cavity during the filling process normalized to the stored energy as a function of the reflection coefficient from the iris.
based on Eqs. ( 11) and ( 13), one can find the optimum coupling constant as a function of the unloaded quality factor of the cavity which is shown in Fig. 4. The unloaded quality factor of the normal conducting cavities already operating in S-band, e.g., 3 GHz is the order of ten thousand [41].Since the quality factor is inversely proportional to the square root of the operating frequency, we expect a quality factor on the order of thousands for frequencies around 300 GHz.Hence, as observed from Fig. 4, a coupling constant of 1.75 would be optimum to minimize the required energy for filling the cavity.For conventional cavities in the rf range, a large amount of energy is available in long pulse formats enabling the cavities to operate in steady state.In this case, the optimum coupling constant is β ¼ 1, where there is no reflection from the cavity in steady state.There are several methods to couple the source power to the cavity, including sidecoupling and on-axis injection of the power.However, sidecoupling removes the cylindrical symmetry of the cavity and increases beam emittance, making the axial coupling the superior choice for the gun.For axial injection of the power to the cavity, one can use a coaxial cable with a beam pipe inside the inner conductor of the cable (Fig. 1).The next step is to design a waveguide-coaxial adapter to convert the waveguide mode to the TEM mode of a coaxial cable.In this respect, we have designed a so-called doorknob adapter which is shown in Fig. 5.It is possible to adjust the transmission efficiency by changing the distance between the door-knob shaped conductor and the closed end of the waveguide.In order to change the coupling between the coupler and the cavity, changing the longitudinal position of the inner tube in the coaxial line or changing the opening iris of the outer tube can be followed.Using such couplers also reduces the magnetic field in the coupler region which leads to a considerable reduction in pulsed heating.Figure 6 shows a schematic view of the cavity together with its coupler, waveguide to coaxial adapter and the UV laser.
According to the simulation results obtained with CST Microwave Studio [42], the unloaded and external quality factor of the designed cavity are 900 and 500, respectively, which means a coupling constant of 1.8, being close to the optimum coupling constant according to Fig. 4.

B. Simulation results
Figure 7 shows the electric field pattern of the cavity as well as the normalized field distribution along the axis of the cavity.
In order to find the number of THz cycles needed to fill this cavity and consequently the amount of required energy, transient simulation has been performed for the designed cavity including coupler.The transient evolution of the longitudinal field at the center of the fourth cell on axis of the cavity for a 1.1 MW of input power is shown in Fig. 8.According to the transient results, after about 1 ns the cavity reaches the steady state level, meaning that a THz energy of 1.1 mJ within 300 cycles is required for the desired operation.The electron bunch's acceleration is also simulated using ASTRA [43].We study the longitudinal and transverse dynamics of the electron bunches to gain an intuition about the beam quality at the end of the gun.The photo emission process for generating the electrons is simulated using the ASTRA model.10,000 macroparticles with a total charge of 100 fC are injected from the cathode located at the end plate of the gun and accelerated along the axis.As mentioned before, the electrons do not become relativistic in the first cycles.Therefore, in order to maximize the energy gain of the electrons in the first cell we have to find the optimum phase to emit the electrons.Figure 9 shows the final energy of the electrons and their correlated energy spread as a function of the emission phase.This can be seen from the curve that the optimum emission phase for the designed cavity would be 10°.Figure 10 shows the average kinetic energy of the particles inside the gun, in which the four steps of acceleration corresponding to the four cells are clearly visible.The final mean energy of the 100 fC bunch is about 250 keV with an RMS energy spread of 1 keV.These results obtained for a presumed 1.1 mJ THz energy correspond to 2.4 × 10 − 5 total efficiency of the reported acceleration scheme.
The longitudinal and transverse phase space of the bunch at the end of the gun are shown in Fig. 12.According to the simulation, the transverse beam emittance is 0.3 π mm mrad and the RMS bunch length is 2 μm which corresponds to a 10 fs bunch.Such emittance levels are already small enough for some applications such as electron diffractive imaging and inverse Compton scattering sources.This low emittance is mainly due to high accelerating gradients possible in the THz regime.For achieving even lower emittance values, however, one needs to do an emittance correction.These results are based on a 80-micron FWHM laser spot size at the cathode.By decreasing the spot size, it is possible to decrease the transverse emittance down to few nm rad at the expense of an increase in the bunch length.Figure 11 shows the trade-off between the transverse emittance and bunch length at the gun exit as a function of spot size.From these curves a spot size around 25 μm is optimum.In Fig. 13, side views of the bunch and its temporal profile are depicted.

A. Cavity design
Two stages of accelerating cavities are designed to further accelerate the electrons exiting the gun and increase their velocity up to the relativistic regime.It is also possible to use a 9-cell cavity instead of two 5-cell and 4-cell cavities.However, it would be more difficult to couple the input power and adjust the field profile for a 9-cell cavity.Therefore we decided to use two separated accelerating stages.As will be discussed in the next section, electrons exiting the gun with an average kinetic energy of 245 keV, corresponding to a speed 0.75 times the speed of light.Since the electrons are not yet relativistic, the two designed linac stages are set immediately after the gun to increase the kinetic energy up to 1 MeV.The cross-sectional views of the last accelerating components are both shown in Fig. 14.The first stage is a five-cell cavity while the second stage consists of four cells.The same door-knob coupler as for the gun is used for these cavities with coupling constants  similarly adjusted to minimize the required energy for filling the cavities.We have chosen, as with the electron gun cavity, the TM 010 π-mode for both the 4-cell and the 5-cell cavities.The unloaded and external quality factors of both cavities are set to 1900 and 1100 respectively, that means a coupling constant of 1.7.Transient simulations for the designed cavities show that each cavity needs 2 mJ of THz energy within 300 cycles.

B. Beam dynamics simulation
In the next step, we send the bunch exiting from the gun to the next accelerating cavities to study the dynamics of the final bunch.Figure 15 shows the acceleration of the electron bunch in the two accelerating stages.As shown, the final mean energy increases to about 1.2 MeV.Longitudinal and transverse cuts in phase-space of the bunch exiting from the last accelerating stage are shown in Fig. 16.As observed from the depicted phase space cuts, the final RMS bunch length is about 10 μm corresponding to 30-fs duration, with a longitudinal energy spread of about 15 keV.The RMS transverse beam size (σ x or σ y ) is 10 μm at the exit of the second accelerating stage.The simulations also show a transverse emittance of 0.45 π mm mrad.These results are again for 40-μm spot size of the laser on the cathode.As we saw with the electron gun, it is possible to achieve nm-rad emittance levels by decreasing this spot size.
Table II shows a summary of the beam dynamics simulation for the cavity as well as for the two accelerating stages.

IV. THERMAL AND MECHANICAL STABILITY
One of the instability sources for cavities during operation is their mechanical deformation.This deformation takes place as a result of either Lorentz forces or thermal expansion.In the THz regime, we deal with higher electric fields in much smaller dimensions, both of which fortify the Lorentz forces.However, the length of the pulses is much shorter that might relax the undesired effects of high fields and small dimensions.Therefore, it is very important to study the mechanical stability of the designed cavities, since a very small deformation leads to large deviations in resonant frequency which reduces cavity efficiency dramatically.In order to reduce the Lorentz forces, one should reduce the surface currents or increase the distance between cavity walls.That is the reason that we used a nose-cone iris instead of a normal iris between the first two cells.The simulations are performed for the gun, since the lengths of the cells and consequently the distances between the cavity walls in the gun are shorter than the accelerating cavities and thus the mechanical deformations are more pronounced in the gun. Figure 17 shows the mechanical stress on the cavity body during operation due to the Lorentz forces.We used CST Mphysics solver [42] to simulate the temperature distribution as well as the mechanical stress on cavity walls which uses the electric field results imported from CST eigenmode solver.As observed, the maximum stress would be about 55 MPa.This stress makes a deformation of about 5 nm in this region which in turn changes the resonant frequency by less than 7 kHz which can be tolerated.Furthermore, since this stress is below the yield stress of copper, the material remains in its elastic state and returns to its initial shape when the forces are removed.Transient thermal simulations have also been performed for the gun in order to find the temperature distribution in the cavity during operation.As mentioned before, we apply 1 mJ of THz energy whit a pulse length of 1 ns.Considering our chosen 1-kHz repetition rate, the average input power would be 1 mW.This is too low to be able to have considerable effect on the cavity's temperature.Therefore, we performed transient simulations to make sure that the instantaneous increase in the cavity temperature does not lead to disturbing effects due to pulsed heating.Thermal simulation results are illustrated in Fig. 18 showing the temperature distribution of the cavity at the end of the filling process and a maximum temperature increase of 10 °C.Here, the initial temperature of the cavity is assumed to be equal to the ambient temperature of 20 °C.The thermal expansion due to this temperature increase would be less than 1 nm.This effect is completely negligible for 1-kHz repetition rates.The temperature of the first cell is less than in the second cell which seems to be the result of using nose cone iris for the first cell.

V. WAKEFIELDS AND HIGHER ORDER MODES
When a bunch of charged particles passes through a cavity, the electric field around the bunch excites the fundamental mode as well as higher order modes of the cavity.The bunch therefore, causes an electric field inside the cavity which is the sum of the different modes called wakefield.The high frequency components above the cutoff frequency of the beam pipe can propagate along the beam pipe without remaining localized.However, the low frequency modes below the cutoff frequency of the pipe, remain localized and can affect the particles in the same bunch (short range wakefield) as well as the particles in the trailing bunch (long range wakefield).By decreasing the size of the cavities, wakefield effects become more serious and their investigation more important.This phenomenon sometimes puts a limit on the minimum size of the cavities or in other words, on the maximum feasible operation frequency.For instance, this effect is the main limiting factor for the operation frequency of superconducting TESLA cavities [44].In the THz regime, it is necessary to study the wakefields to find the maximum charge that can be generated and accelerated by the device.Therefore, we try to gain an estimation of the field levels in the radiated wakefields for our designs in order to assess how far this effect can deteriorate the photo-injector's performance.
Long range wakefields can be calculated mainly from the frequencies, quality and loss factors of high order modes (HOMs).Monopole modes determine the longitudinal fields while dipole modes are dominant in generating transverse fields.One can use the following equations to find the longitudinal and transverse fields due to HOMs excited by a charged particle at a distance s after the bunch [45,46].These fields are called delta wake potentials, since they are assumed to be generated from a charged particle with δ-function charge distribution.The delta wake potentials are then used as Green's functions to calculate the wake potential from any given charge distribution.
where k ∥ and k ⊥ are loss factors of the longitudinal and transverse modes, ω and Q are the angular frequency and loaded quality factors of the HOMs and c is the speed of light.The above equations are for a relativistic electron bunch.However, for nonrelativistic electrons traversing through our THz cavities, it is enough to replace c with βc to evaluate the long range wakefields.This subsequently yields the loss factor considering the nonrelativistic velocities of the electrons [47].The long range wakefields for the gun are calculated from the HOMs.For this purpose, all the frequencies, quality factors and loss factors of all the higher order modes up to the cutoff frequency of the beam pipe should be considered.The monopole modes are used to calculate the longitudinal fields while the dipole modes are used to find the transverse fields according to the equations in (14).Figure 19 shows the calculation results for the longitudinal and transverse long-range wakefields in terms of time after the bunch.The transverse fields are calculated assuming 50-μm offset of the beam.It is seen in the results that the amplitude of the wakefield drops off rapidly with time.This is because of the low quality factor and consequently short damping time in the THz regime.Although the amplitude of the wakefields per charge immediately after the bunch is much larger than in rf cavities, since we use orders of magnitude lower charge the burdening effects of wakefields do not introduce a significant perturbation on the device operation.For instance, if we consider 1 pC of charge and a 1 kHz repetition rate, both longitudinal and transverse wake field would be at least three order of magnitude less than the accelerating field.We have also performed short range and long range wakefield simulations on the designed gun using the code ECHO.It is assumed that a bunch with a length of 40 μm passes through the cavity.Figure 20 shows the simulation results for the longitudinal and transverse wake potentials demonstrating the maximum longitudinal potential to be 200 V=pC.We should mention again that this simulation is based on relativistic electrons.According to the LiénardWiechert potential the electric field emitted by a moving particle is proportional to _ β=ð1 − β 2 Þ [48].For a constant accelerating field, this radiated field is then proportional to γ 3 .The electric field radiated by nonrelativistic particles in the THz cavities is therefore smaller than the calculated fields using relativistic approximations.Hence, the real wakefield in the designed gun would be less than the simulated field shown in Fig. 20.Since the maximum on-axis electric field of the designed gun is 500 MV=m and the length of the cavity is about 1 mm, considering a transit time factor of 0.7, the accelerating voltage of the cavity would be 350 kV.The longitudinal wake potential for a 1 pC bunch is therefore at least three orders of magnitude smaller than the accelerating voltage of the cavity.We comment that the transverse wake potential depends on the transverse offset of the bunch.A 30-μm transverse offset gives a maximum transverse potential of about 60 V=pC which is also negligible for charges in the pC range considered in this study.

VI. CONCLUSION
This paper introduced the design for electron guns and linacs for acceleration of electrons using THz pulses with 100 to 1000 cycles, which match with the output of laserdriven THz generation schemes.A 3.5-cell gun and two stages of accelerating cavities are designed to increase the electron energy up to 1.2 MeV.Coaxial couplers with the so-called door-knob adapters are used to inject the THz power into the cavities.The coupling constant between the cavities and their couplers are adjusted to minimize the required THz energy for cavity loading.The gun and each of the main accelerating components require 1.1 mJ and 2 mJ of THz signal, respectively, within 300 cycles, corresponding to a total required energy of 5.1 mJ.The kinetic energy of the electrons are increased up to 250 keV at the end of the gun and 0.7 MeV and 1.2 MeV after the two accelerating stages.The RMS longitudinal bunch length and transverse beam size of the final bunch are both 10 μm.Mechanical simulations have been performed for the designed gun to find the mechanical deformation of the cavity due to the Lorentz forces as well as thermal simulations to investigate the deformations due to thermal expansion.The results show a negligible effect on the efficiency of the cavity.Short range and long range wakefield simulations show that the effect of bunch wakefields on the acceleration process is also negligible for the bunch charges considered.

FIG. 1 .
FIG. 1.The cross-sectional view of the designed three and a half-cell gun.

FIG. 5 .
FIG. 5.The door-knob waveguide-coaxial adapter.FIG. 4. The optimum value for the coupling constant between the cavity and its coupler to minimize the required filling energy.

FIG. 7 .
FIG. 7. Top: The electric field pattern of the π-mode and Bottom: the electric field distribution on the axis of the cavity.

FIG. 11 .
FIG. 11.The transverse emittance (black) and RMS bunch length (blue) of the bunch at the gun exit are shown for different spot sizes.
FIG.13.The (a) front view, (b) side view, and (c) temporal profile of the bunch at gun's exit as simulated in ASTRA.

FIG. 15 .
FIG. 15.Acceleration of the electron bunch in the (a) first and (b) second accelerating stages.

FIG. 18 .
FIG. 18. Temperature distribution inside the gun at the end of the filling cycle.

FIG. 19 .
FIG.19.The (a) longitudinal and (b) transverse wake potentials of the gun versus time after the first bunch.

TABLE I .
The amounts of the Physical parameters of the 3.5 cell gun shown in Fig.1.
FIG.2.The schematic view of a cavity.The iris is assumed as a two port network with its forward and backward waves.

TABLE II .
Summary of the beam dynamics simulation results.
FIG. 17. Mechanical stress due to Lorentz forces for the gun.