## 2 Accelerator
### Injector  
The generation and preservation of very high brightness electron beams able to drive an FEL requires particular care at the source and in the low-energy section of the machine. The electron source determines the best obtainable emittance at the FEL undulator line and hence the FEL performance. The SwissFEL injector consists of a 2.5-cells S-band (3 GHz) RF photoinjector gun followed by an S-band booster linac providing the necessary energy gain before the first compression stage (BC1). The PSI RF photoinjector gun [43] generates high brightness electron bunches with an energy of 7.1 MeV, an intrinsic emittance of 0.55 um/mm and a peak current of 20 A. An IR Yb:CaF\({}_{2}\) laser system operating at 1040 nm with frequency multiplication to 260 nm drives the Cs\({}_{2}\)Te coated copper photocathode installed in the backplane of the RF gun. A detailed description of the gun laser system is given in Section 2.2.1. The ensuing booster linac consists of two sections. In booster 1 two S-band traveling-wave cavities [44] accelerate the electron beam on crest up to an energy of 150 MeV. After this first acceleration stage a set of five quadrupole magnets allows matching the optical functions through a laser heater chicane, whose purpose is the controlled enhancement of the uncorrelated energy spread of the beam to mitigate micro-bunching instabilities in the bunch compressors [45]. Another set of five quadrupoles follows the laser heater modulator undulator to control the matching into booster 2. The second booster section consists of two S-Band RF modules, each including one klystron amplifier and two accelerating cavities. In booster 2 the electrons are accelerated off crest, up to an energy of 345 MeV, to provide the necessary energy-time correlation needed for the longitudinal compression of the bunches. Enough space has been reserved to allow future energy upgrades with a third RF accelerating module. The focusing along booster 2 consists of three FODO cells with 11 m period. To suppress the second-order energy-time correlation two X-band RF cavities (4 th harmonic of S-band) [46; 47; 48] running in decelerating mode precede the 13.5 m long compression chicane, which is typically set to yield compression factors between 10 and 15. The final nominal energy of the injector is 320 MeV. The compact SwissFEL design hinges on the small beam emittance provided by the injector. Therefore a great deal of experimental effort, carried out mainly at the SwissFEL Injector Test Facility [49], has gone into the characterization and optimization of the emittance at the source [50; 51; 52], as well as its preservation under acceleration, transport and compression. The starting point of our injector optimization is the effective working point found by [PERSON] et al. [53] during the redesign of the Linac Coherent Light Source (LCLS), further refined for the SwissFEL case by numerical optimization [54]. The main empirical tuning steps toward minimal emittance consist in achieving the optimal laser spot size on the cathode with homogeneous transverse and longitudinal pulse profiles, the adjustment of the relative phase between laser injection and gun RF, the optimal setting of the gun solenoid excitation current, the correction of coupling terms by means of small (regular and skew) quadrupole magnets integrated into the gun solenoid as well as further solenoid magnets [55],the centering of the orbit in the S-band booster structures and the correction of spurious dispersion downstream of the booster [56]. For compressed beams special care must be taken to keep adverse effects from coherent synchrotron radiation in the compression chicane under control, e.g., by ensuring a small transverse beam size in the last chicane dipole or by adopting a shallow bending angle for the compression. Our studies also revealed a strong sensitivity of the final slice emittance on the beam optics upstream of the bunch compressor.