# Conceptual and Technical Design Aspects of Accelerators for External Injection in LWFA
## 3 Production of Ultra-Short e-Bunches
### Non Linearity in the Longitudinal Phase Space Distribution  
If only linear forces are present, the motion of the particles in an accelerator is linear and their phase space distribution maintains the shape of an ellipse. When non-linear effects are present, the phase-space ellipse gets distorted and a non-linear description of the beam becomes necessary. The curvature of the longitudinal distribution of the beam can be described by the function \(\delta(s)=\frac{E_{0}(s)-E_{0,ref}}{E_{0,ref}}\), where \(E_{0}(s)\) is the mean energy of the particles in position s and \(E_{0,ref}\) is the reference particle energy, at the entrance of the bunch compressor:  
\[\delta(s)=k_{1}\cdot s+k_{2}\cdot s^{2}+k_{3}\cdot s^{3}+\mathcal{O}(s^{4}) \tag{8}\]  
where the \(k_{i}\) are given by the \(i_{th}\) derivatives of the \(\delta\) distribution in \(s\). Also, the beam transport matrices have to be extended to include the second and third order contributions of the momentum compaction factor, \(T_{566}=1/2(\partial^{2}L/\partial\delta^{2})\) and \(U_{5666}=1/6(\partial^{3}L/\partial\delta^{3})\) respectively, where \(L\) is the reference particle path length. In this new formulation, the longitudinal matching conditions have to be extended to the higher order terms [42]:  
\[k_{1}=\frac{-1}{R_{56}}; \tag{9}\]  
\[k_{2}=-k_{1}^{2}\frac{T_{566}}{R_{56}}; \tag{10}\]  
\[k_{3}=\frac{1}{R_{56}}\cdot\left(-k_{1}^{3}\cdot U_{5666}+2k_{1}\cdot\frac{T_{ 566}^{2}}{R_{56}}\right). \tag{11}\]  
In order to increase the variables to be used to fulfill the matching condition a so-called _linearizing cavity_ can be employed [43; 44; 45]. This cavity must have a RF frequency different from the main accelerator frequency and it is normally higher order harmonic of it. However in practical cases the full compensation of the second and third order terms can be limited, for example, by the maximum energy gradient in the linac cavities or the maximum momentum compaction factor of the beamline [46]. An elegant procedure has been worked out in [47] to correct the non-linear terms in ballistic bunching compression at REGAE by properly setting the phase of the RF gun and the buncher. This method relies on the change in bunch length between the RF gun and the buncher, which effectively works as a change of the RF frequency of the buncher for the correction of the non-linearity. Finally at FERMI it has been recently demonstrated that wakefields can also be used to achieve passive linearization of the longitudinal phase space in combination with magnetic bunch compression [48]. Another approach for achieving a linear phase space at the maximum compression point consists in minimizing the non-linear terms in the phase space directly at the gun exit by proper photo-cathode laser shaping and then transporting the beam in a linear system. When working with laser pulses which are much shorter than the RF period, the non-linearity of the longitudinal phase space at the cathode is mostly caused by non-linear space charge forces. By shaping the bunch distribution in an ellipsoidal way, the non-linear space charge force vanishes and the beam has a perfectly linear position-momentum distribution. Achieving an ellipsoidal beam distribution from an ellipsoidal photo-cathode laser is extremely challenging and so far has not yet been experimentally demonstrated, nevertheless there are several groups working on this research field [49]. An alternative way to achieve such beam shaping from a non-ellipsoidal laser, consists of working in the so called _blow-out regime_, taking advantage of the expansion driven by the space charge force.