## 2 Accelerator
### Linac  
The main acceleration of the electron beam is achieved in a C-band linac that increases the beam energy up to 5.8 GeV. The linac is divided into three segments: linac 1, linac 2 and linac 3. After linac 1, the electron bunches from the injector are further compressed in a second bunch compressor (BC2) at an energy of 2.1 GeV. At the end of linac 2, at an energy of 3.15 GeV, a switch-yard [58] is installed with which electron bunches can be sent either straight into linac 3 and subsequently the Aramis hard X-ray beam line, or into the Athos soft X-ray beam line, currently under construction. The accelerator scheme is shown in Figure 1. The switch-yard allows the parallel operation of both undulator lines at the full design repetition rate of 100 Hz. This is accomplished by generation of two electron pulses from the injector separated by 28 ns, both accelerated up to 3.15 GeV before separation. At the end of linac 3, two C-band transverse deflecting structures (TDS), provided by Mitsubishi Heavy Industries Mechatronics Systems, allow for measurements of the longitudinal charge profile with a resolution of a few femtoseconds. The linac consists of a total of 26 C-band modules, where each module comprises four C-band structures that are mounted onto two granite girders (see [59] for a schematic and [60] for further information). The C-band structures [61] were stacked and brazed at PSI [62] from copper cells manufactured at VDL ETG (J-couplers) and VDL ETG Switzerland (regular cells) with micrometer precision using ultra-precision diamond milling and turning. This process renders further tuning steps of the structures unnecessary while still achieving excellent field flatness and phase advance errors (see [59] for an example). The achieved structure straightness is excellent: the maximum measured deviations from a straight line are typically below 20 \(\upmu\)m, at the resolution limit of the applied laser tracker. In addition to the four structures, each linac module also comprises a barrel open cavity (BOC) RF pulse compressor [63], machined and brazed at PSI [64]. See Figure 2 for a photo of linac 2 installed at SwissFEL. Most parts of the waveguide distribution and the BOC pulse compression cavities are mounted on the granite support girder. This allowed for preassembly of most of the linac vacuum system in a cleanroom, while only the interconnects between girders and the waveguide run to the klystrons have to be done in the tunnel. The produced structures have been sorted according to their resonance frequencies, as determined by RF measurements, with the goal of assigning four similar structures to the same module. This grouping is necessary since all structures of one module are cooled and temperature stabilized to the millikelvin level by a single cooling station. Another advantage of the structure sorting is that the RF power overhead required to compensate for the loss in energy gain by deviating slightly from their beam synchronous frequencies is less than 1%. Figure 2: The C-band accelerating modules of linac 1. Supplying four structures with a single RF power source represents a challenge for the waveguide network, furnished by Mitsubishi Heavy Industries Mechatronics Systems: the mechanical fit demands a mechanical tolerance of 200 \(\upmu\)m between the structures, and the phases at the structure entrances must match within a few degrees. The first requirement was ensured by the manufacturer during the production process by measuring the dimensions of the individual waveguide components and providing accordingly machined correction pieces. To achieve the correct phase relations at the four structures, the complete horizontal waveguide network was assembled and moved away from the structures to measure the phase relations, which were then corrected through suitable deformations of the waveguides. Linacs 1 and 2 are powered by Type-\(\mu\) modulators manufactured by Ampegon, whereas linac 3 uses PSI C-band series modulators M1071 provided by ScandiNova.