Detailed characterization of electron sources yielding demonstration of European X-ray Free-Electron Laser beam quality

The photoinjector test facility at DESY, Zeuthen site (PITZ), was built to develop and optimize photoelectron sources for superconducting linacs for high-brilliance, short-wavelength free-electron laser (FEL) applications like the free-electron laser in Hamburg (FLASH) and the European x-ray free-electron laser (XFEL). In this paper, the detailed characterization of two laser-driven rf guns with different operating conditions is described. One experimental optimization of the beam parameters was performed at an accelerating gradient of about 43 MV = m at the photocathode and the other at about 60 MV = m . In both cases, electron beams with very high phase-space density have been demonstrated at a bunch charge of 1 nC and are compared with corresponding simulations. The rf gun optimized for the lower gradient has surpassed all the FLASH requirements on beam quality and rf parameters (gradient, rf pulse length, repetition rate) and serves as a spare gun for this facility. The rf gun studied with increased accelerating gradient at the cathode produced beams with even higher brightness, yielding the ﬁrst demonstration of the beam quality required for driving the European XFEL: The geometric mean of the normalized x On leave from MEPHI, Russia. projected rms emittance in the two transverse directions was measured to be 1 : 26 (cid:1) 0 : 13 mm mrad for a 1-nC electron bunch. When a 10% charge cut is applied excluding electrons from those phase-space regions where the measured phase-space density is below a certain level and which are not expected to contribute to the lasing process, the normalized projected rms emittance is about 0.9 mm mrad.


I. INTRODUCTION
The performance of high-brilliance, short-wavelength free-electron lasers is critically dependent on the quality of the electron beam driving the free-electron laser (FEL) process. Besides beam peak current and energy spread, which are significantly modified by accelerating structures and bunch compressors during the beam propagation from the electron source to its application in an undulator, the transverse normalized emittance is of paramount importance. The emittance is dominated by effects in the electron injector and, if too large, reduces the light intensity emitted in the undulator, eventually preventing saturation in a selfamplified spontaneous-emission (SASE) FEL of a given undulator length [1]. Therefore, DESY has launched a comprehensive program to study and optimize electron sources for superconducting-linac-driven FELs such as FLASH [2] and the European x-ray free-electron laser (XFEL) [3].
In autumn 1999, the DESY directorate decided to build the photoinjector test facility in Zeuthen. In 2000 and 2001, the civil construction took place, and the necessary infrastructure, a first version of the rf system and a basic electron beam diagnostics system were installed [4,5]. The first photoelectrons were produced in January 2002 and the full experimental characterization of the first rf gun at PITZ (gun prototype 2) was finished in 2003. One example of the experimental results at this time is the demonstration of a minimum projected normalized emittance of 1.7 mm mrad (geometrical mean of both transverse planes) for 1 nC bunch charge [6]. This gun was sent to DESY, Hamburg site, in 2004 and since then has been in operation at FLASH. The experimental program in Zeuthen was then significantly extended, and a major upgrade of the facility began. The aim was not only to further improve the emittance generated at the electron source by improved photocathode laser pulse shaping and an increase in the accelerating gradient at the photocathode, but also to study the emittance conservation when low emittance beams are accelerated further by a subsequent booster cavity [7]. To reach the European XFEL design value of 0.9 mm mrad rms transverse normalized projected emittance for 1-nC bunches at the injector exit, an overall optimization of all injector parameters is needed. A similar extensive optimization and characterization has been reported for the injector of the linac coherent light source [8]. The ongoing extension of the PITZ facility toward the planned configuration (PITZ-2) requires a ma-jor upgrade of the photocathode laser system and the rf supply system, as well as a major extension of the electron beam line including a booster cavity and appropriate diagnostics for the increased beam energy. The subject of this paper is the intermediate extension stage PITZ-1. 6, which includes a preliminary booster cavity (called the TESLA booster), about 60% of the diagnostics foreseen for the PITZ-2 stage and a laser system capable of producing pulses with temporal flattop profile of 20 ps in length, with about 6-7 ps rise and fall times. This setup was used to characterize and optimize two gun cavities at two different operating conditions: 43 MV=m and $60 MV=m peak accelerating gradient at the photocathode. The measurement conditions and characterization results will be described in detail, and compared to the European XFEL design specification of 0.9 mm mrad rms projected emittance at the injector. The intention of this requirement is that, allowing for emittance dilution during the further acceleration and compression of the bunch after the injector, an rms slice emittance of 1.4 mm mrad is achieved at the undulator entrance. The European XFEL also requires a duty factor of 32 500 pulses per second (1 nC micropulses at 5 MHz in 650-s trains produced at 10 Hz), but the demonstration of this high current operation will be the subject of a separate paper. This paper is organized into two main sections. Section II will describe the facility setup with all its subsystems: gun cavity, photocathodes, booster cavity, vacuum beam line, magnet system, laser system, rf system, beam line diagnostic elements, beam dump, electronic readout, controls, and water cooling system. Section III will describe the results on gun rf conditioning and dark current, cathode studies, charge production and thermal emittance, beam-based alignment, longitudinal phasespace measurements and transverse phase-space measurements. Finally, a summary and outlook are presented.

II. DESCRIPTION OF THE PITZ-1.6 SETUP
The beam line at PITZ (Fig. 1) is designed for the detailed characterization of the electron source. It consists of the electron gun containing the photocathode, a second accelerating section called the booster cavity, and electron beam diagnostics. The diagnostics beam line is divided into two parts-the low-energy section between gun and booster cavity and the high-energy section downstream of the booster cavity.
The charge of the electron bunch and its distribution in transverse and longitudinal phase space are analyzed by dedicated measurement stations. Charge and current are measured using Faraday cups and integrating current transformers (ICT). Beam momentum in the longitudinal direction is measured using dipole magnet spectrometers, and the beam position is measured at various points along the beam line using screen stations, beam position monitors (BPM), and wire scanners. The transverse phase space is measured using a combination of movable slits and screens [the emittance measurement system (EMSY) stations], and the longitudinal phase space is analyzed by a streak camera which records light output from aerogel Cherenkov radiators or optical transition radiation (OTR) screens.
Besides these diagnostic devices, essential systems for creating and maintaining the electron beam include the vacuum system, various deflecting and focusing magnets, the photocathode drive laser system, and the rf system which accelerates the electron bunches. In addition, PITZ requires a high-precision water cooling system for the gun and booster, which must remain at their respective resonance temperatures while dissipating significant heat from absorbed rf power. Control of most systems and acquisition of data is done under the distributed object-oriented control system (DOOCS). All these essential technical and detector systems are described in this chapter.

A. Gun cavity
The electron gun consists of a 1.5 cell copper cavity with a resonance frequency of 1.3 GHz. The Cs 2 Te photocathode is inserted into the backplane of the cavity by a load- lock system (see Sec. II B). The cavity is surrounded by a pair of solenoids: the main solenoid, used to focus the beam, counteracting its expansion due to the space-charge force, and the bucking solenoid, which cancels the field of the main solenoid on the photocathode to ensure that the electron bunch leaves the magnetic focusing region without any remaining average angular momentum. Because operation is envisaged with rf pulses up to 1 ms long at several MW of peak power and 10 Hz repetition rate, the cavity body is heavily cooled. Cross-sectional views of gun cavity version 3 are shown in Fig. 2. Two electron guns following this design (gun 3.1 and gun 3.2) were produced, and both were used for the measurements presented in this paper. Details of the original gun design are published elsewhere [9].
After production, the cavities have been tuned, and detailed cavity field measurements have been performed [10,11]. The field profile of the gun cavities was measured with the bead-pull technique. The field strength in the cathode plane was tuned to be about 5%-10% higher than the field in the full cell in order to compromise between high momentum gain and a maximum gradient at the cathode for space-charge compensation. The rf measurements and tuning results of the two gun cavities are summarized in Table I.

B. Photocathode system
The cesium telluride photocathodes used are grown under UHV conditions on molybdenum plugs with optical surface finishing at INFN-LASA in Milan, Italy [12]. The final photoemissive layer is only a few tens of nanometers thick. The transverse size of the coating is defined by a round mask, 5 mm in diameter. Up to five cathodes are loaded on a carrier and moved into the transport system, both continuously maintained under UHV conditions. At PITZ, the transport chamber is connected to the rf-gun load-lock cathode system, allowing the loading of individual cathodes into the gun under UHV conditions. The main characteristics of photocathodes used during the PITZ operation are summarized in Tables II and III [13]. The information there is relevant to their production, starting from the preliminary treatments on the molybdenum plugs, the quality of the optical polishing as verified by reflectivity measurements using a He-Ne laser at 543 nm at normal incidence, and the cleaning procedure. As indicated in Table II, some of these plugs have not been cleaned with the standard procedure (acetone and pure alcohol in the ultrasonic bath) but with a CO 2 cleaning technique performed at the DESY, Hamburg site. No dependence of cathode behavior on the type of cleaning procedure used has been yet observed. After the starting treatments, plugs are inserted in the vacuum system for the high temperature cleaning and the deposition process. All the Cs 2 Te photocathodes used at PITZ during autumn 2006 and summer 2007 operations have been grown with standard 10 nm thickness of Te. In the Table, the production dates have been indicated together with the final quantum efficiency (QE) measured at 254 nm (QE measurement procedures are discussed in Sec. III B 1). The value for 262 nm has been extrapolated from the photocathode spectral responses acquired by varying the photon wavelengths from 239 to 436 nm. The spectral responses have been used also to evaluate the ''E g þ E a '' values (sum of E g , the band gap energy, and E a , the electron affinity), fundamental physical parameters for the photoemission process [14]. The quality of the deposited photoemissive film is also controlled by measuring the QE uniformity over the cathode surface.
The photocathodes presented above have been used and characterized in the PITZ rf gun by pulsed QE and dark current measurements under different conditions of operation such as varying accelerating field, rf pulse length, and focusing (descriptions of the measurements follow in Sec. III). Furthermore, the uniformity of photoemissive surface of cathodes in rf guns has been monitored during the gun operation to check its evolution, using a dedicated tool that has been developed for QE map scans. Some cathodes have been also investigated by taking photographs of the cathode surface during their life in the rf gun. In Table III, main parameters of photocathodes related to their operative usage are reported.
As PITZ is not a user facility (like FLASH), but rather a test facility for photoinjector research and development, cathode operating conditions are less stable. Consequently, the days of operation reported in Table III are significantly shorter than the typical operational lifetime at FLASH (about 90 days of 24 h/7 days operation) [15]. The main reasons are the different operating conditions at PITZ (e.g. higher accelerating field, up to 60 MV=m at the cathode) and the need to frequently change cathodes to evaluate performances of different coatings.

C. Booster cavity
The booster cavity currently in use at the PITZ facility is a normal conducting nine-cell copper resonator, built as a prototype for the TESLA superconducting accelerating cavities. After rf field measurements at DESY, it was used as a low-average-power, low-duty-cycle capture cavity at the photoinjector test stand A0 at Fermilab [16]. A moderate water cooling system with an average power of up to $1:4 kW was installed using small copper pipes joined to the cell's outer wall with thermally conductive epoxy. The maximum average power of the cooling system has limited the operation at PITZ.
The cleaning and tuning of the TESLA booster was completed in Zeuthen in 2004. A thermal tuning coefficient of À21:8 kHz=K was measured. The tuning progress was controlled via amplitude measurements of the resonance frequency and the field flatness along the nine cells of the cavity using the bead-pull technique. In order to establish the resonance frequency of 1.3 GHz, the length of the cavity was changed to set an operating temperature of 50 C. A relatively flat field distribution over the nine cells was realized by pulling or squeezing single cells with tuning clamps on a tuning rod. A field flatness of 0:91 AE 0:02 and a minimum-to-maximum field imbalance relative to the average electric field of 3.4% rms were obtained as shown in Fig. 3.
In 2005, the cavity was conditioned at different repetition rates up to the cooling limit (maximum average power $1:32 kW, maximum peak power $3 MW). Since autumn 2005, the booster has been operated in the PITZ setup. Standard operation parameters are 10 Hz repetition rate, 70 s pulse length, and $1:9 MW peak power, resulting in a momentum gain of about 8 MeV=c.

D. Vacuum beam line
The vacuum system at PITZ is a full metal system because the photoinjector must operate in the ultrahigh vacuum range. In addition, the operation at high accelerating gradients of the gun cavity and the planned use at a superconducting rf linac require particle-free installation. This is ensured by particle-free cleaning of all components before installation and the use of clean rooms of class 100 during installation. The residual gas should not contain hydrocarbons or oxygen, because these can lead to poisoning of the photocathode and reduction of its lifetime. The whole system is divided into vacuum sections separated by gate valves. The most interesting region extends from the gun cavity to the booster, because the gas loads coming from this section have an influence on the stable operation of the accelerating cavities. The schematic of this section is shown in Fig. 4.
The vacuum pressure is measured using the current of the ion getter pumps. With rf power off, pressure readings of 10 À11 mbar are routinely obtained, and with rf power on (continuous running) the pressure readings are in the range of 10 À11 to 10 À9 mbar.
In addition to the usual vacuum technical arrangements, silica aerogel detectors are installed in some diagnostic ports to measure the bunch length. Aerogel has a larger outgassing rate than metals, and these ports require an extra directly mounted vacuum pump. Furthermore there is the possibility of small particles from the aerogel entering the vacuum system. For this reason, the silica aerogel is mounted in a special vacuum chamber inside of the electron beam line as shown in Fig. 5. The electrons pass a thin aluminum foil to strike the aerogel. Scattering effects in the foil have been studied and shown to be negligible [17]. Special particle filters are mounted to reduce the pressure differential at the beginning of evacuation process and avoid destroying the thin aluminum foil [18].
The pressure distribution of the vacuum system is calculated to estimate the influence of gas loads on the pressure in the gun and the booster cavity [19]. An outgassing rate from the cavity walls of 10 À11 mbar l=ðs cm 2 Þ during operation (and 1 order of magnitude less without operation) is used for the calculation. The gas load from the cathode during laser illumination is estimated from experience with similar systems to be 10 À8 mbar l=s. The titanium sublimation pumps have an estimated pumping speed of 800 l=s. Under these conditions and with taking into account the dependence of the pumping speed of the ion pumps on the total pressure, the calculated pressure at the cathode is about 2 Â 10 À8 mbar during operation and almost 1 order of magnitude better when rf is off. Effective vacuum pumping power is only installed 65 cm downstream of the cathode. Vacuum conditions in the gun are then decoupled from gas loads further downstream, but depend critically on the outgassing rate of the cavity and the cathode.

E. Magnets
In the PITZ-1.6 setup, there are several magnets installed along the beam line for different specific purposes. The main solenoid magnet is used to compensate spacecharge effects in the gun. It consists of a symmetric iron yoke and a copper coil, which can produce a magnetic field of up to 0.29 T at a current of 500 A. In order to keep the magnetic field zero at the cathode, a bucking solenoid, which produces the opposite field direction as compared to the main solenoid, is placed behind the cathode. The magnetic axis, calibration coefficients, and hysteresis of these magnets have been measured on a special test bench. The orientation of the magnetic axis has been done by measuring the zero-crossing point of the transverse magnetic field at several points along the beam line near the main solenoid. These points are considered to lie along the magnetic axis of the solenoid, whose position can then be adjusted using a micromover system to align the magnetic axis with the gun electrical axis. The micromover allows control of the transverse position and angle of the solenoid with respect to the beam axis. The range of motion in each transverse direction is about 2 mm, with measured accuracy of 10 m, and the range of accessible angles is around 0.3 for the two axes of rotation. The position of the bucking solenoid is fixed.
The mean momentum and the momentum spread of the electron beam are measured with a dipole spectrometer magnet to deflect the electrons onto a screen in the dispersive arm. The PITZ-1.6 setup contains two dipole spectrometers situated at about 1 and 10 m downstream of the photocathode. Both magnets deflect the beam by 60 with respect to the straight beam trajectory. The first dipole magnet has been used to measure beam momentum up to about 6:5 MeV=c and is capable of measuring up to about 11 MeV=c. The second spectrometer was designed to determine momentum gain in the booster cavity, and measures electron beam momentum up to about 16 MeV=c. The first dipole magnet has a small gap of 20 mm between the pole faces, limiting the inner chamber size to 12 mm and restricting the usable range of the solenoid current for which the full beam can be transmitted. This gap width was increased during the recently completed PITZ upgrade [20,21]. Software for the analysis of the momentum distribution in the dispersive arms has been developed [22] which determines the momentum at the screen center as a function of the dipole current. Away from the screen center, the momentum of the particle is calculated from the dispersion function of the spectrometer [23].
There are several cosinelike wound iron-free steerers installed in the PITZ-1.6 beam line. These small dipole magnets were designed for deflecting a 5 MeV electron beam with a maximum deflecting angle with respect to the beam axis of about 5 mrad. Steering magnets are necessary in order to maintain the electron beam in the beam transport line before and after the booster cavity. They are especially required immediately downstream of the gun, where a steerer is used to deflect the beam away from the laser vacuum mirror. A triplet quadrupole magnet at $8 m downstream of the cathode can also be used to focus the beam at various screens or at the subsequent dipole entry plane.

F. Photocathode laser and laser beam line
The generation of electron bunch trains with optimum beam quality places various demands on the photoinjector laser. The wavelength must match the spectral sensitivity of the photocathodes, and flattop distributions are required in time and in the transverse plane. The photocathode laser is also designed to deliver long bunch trains suitable for efficient use of rf power in pulsed superconducting accelerating cavities.

The laser system
The PITZ laser system has a master oscillator power amplifier architecture. Both the oscillator and the amplifier rely on neodymium-doped yttrium lithium fluoride (Nd: YLF) as the lasing material, and all Nd:YLF rods are pumped from both ends by fiber-coupled laser diodes. The main advantage of Nd:YLF in comparison to other laser materials is very weak thermal lensing, which allows the generation of long pulse trains with a stable beam diameter. A disadvantage of Nd:YLF is its relatively small fluorescence bandwidth of $2 nm which limits the steepness of the edges of the individual flattop micropulses within the train. Figure 6 shows the scheme of the laser setup used for the measurements reported in this paper. The laser contains an actively mode-locked oscillator, a pulse shaper consisting of a grating pair and a two-stage birefringent filter, two pulse pickers (Pockels cells), a six-stage amplifier chain, a wavelength conversion unit, and the optical beam line that transfers the UV pulses to the photocathode.
The mode-locked oscillator generates $3 ms long trains of Gaussian pulses with 27.16 MHz repetition rate in the train. Mode locking is accomplished by a combination of three active mode lockers with 27.08, 108.33, and 1300 MHz modulation frequency, respectively. These mode lockers form Gaussian pulses of 7-9 ps duration, which are synchronous with the PITZ master oscillator to an accuracy of <0:3 ps. This synchronization accuracy is maintained by readjusting the length of the resonator of the oscillator with 50 nm accuracy by means of an electronic feedback loop.
Following the pulse shaper, the pulses are amplified in a six-stage amplifier chain. The amplifiers are usually triggered such that there are 1200 micropulses in the train. Since shorter pulse trains are typically used to drive the photoinjector, a second Pockels cell located in front of the two last amplifiers is used to select the desired number of micropulses. Subsequently, the infrared pulses (1047 nm) from the laser are converted to the ultraviolet (262 nm) by means of lithium triborate (LBO) and beta-barium borate (BBO) crystals. The pulses pass a remote-controlled attenuator that allows for adjustment of the pulse energy sent to the photocathode.
The shape of the individual pulses in the train is mainly controlled by four main components: a grating pair, a twostage birefringent filter, an amplifier, and a wavelength conversion stage. The grating pair allows fine-tuning of both the phase and the chirp of the oscillator pulses. The two-stage birefringent filter [24] preshapes a flattop pulse. In addition, it is adjusted to precompensate for the distortions of the amplifier and the wavelength converter. The amplifier then reduces the bandwidth of the input pulses by gain narrowing. The amplifier can be envisioned as a Gaussian filter acting on a non-Gaussian spectrum. Consequently, the limited fluorescence bandwidth of the laser medium (Nd:YLF) forces the rise and fall times of the output pulses to be longer than 4 ps. Finally, in the wavelength conversion stage, the pulse shape is modified again due to nonlinear behavior. It has been observed that the tilt angle of both frequency-conversion crystals has a particularly strong influence on the pulse shape, and a precise system for remote control, to 0.01 accuracy, of the angle of these crystals is installed.
The resulting pulse shape in the UV is recorded with a streak camera [25]. In practice, the two-stage birefringent filter and the tilt angles of the frequency-conversion crystals are adjusted such that a trapezoidal pulse with 6-8 ps edges and a flattop region of $20 ps duration is obtained. Because of the strong angular dependence of the conversion characteristics of the frequency-conversion crystals, the measured pulse shape depends on the transverse position within the laser beam. This undesirable effect is reduced at PITZ by selecting only the central part of the beam for cathode illumination, by means of a circular aperture in the beam line.
The laser generates trains of flattop pulses with up to 800 micropulses. The typical energy of the individual micropulses is 10 J at 262 nm wavelength, with 10%-15% impinging on the cathode, depending on the aperture chosen.

Laser diagnostics
After the laser pulses have been generated they are transported to the accelerator tunnel by a 20-m long laser beam line. In the first section, the laser beam distribution in the plane of the conversion crystals is imaged onto a beam shaping aperture. This circular hole cuts out the central part of a transverse Gaussian profile, resulting in a nearly flattop distribution. This distribution is then imaged onto the photocathode by a telescope. The transverse profile and temporal distribution of the laser pulses are monitored at different laser beam diagnostics ports in the laser transport system, as well as the energy and position stability.
To measure the transverse laser pulse profile impinging on the photocathode, several cameras are located such that the optical path lengths to the cathode and the detector are equal. At two of these cameras the laser directly illuminates the charge coupled device (CCD) chip, but the third uses a thin Ce:YAG crystal as a radiator to convert the ultraviolet laser light into a broadband signal in the green wavelength region. This green light is imaged on the CCD using an objective. The reason for having two directly illuminated CCDs is their application at different laser intensities. One of them operates using a small reflection of a permanently inserted quartz plate in the laser beam path. This can be used to measure in parasitic mode during high electron bunch charge operation. The other directly illuminated CCD measures the laser profile on demand by inserting a mirror into the beam path. Here, the laser beam is not attenuated, and the monitor is suitable for the low intensity regime.
In Fig. 7, transverse shapes measured with all three laser beam monitors are shown. Figure 7(a) shows the picture of the unattenuated laser beam using the standard settings for the camera (shutter speed 1=60 s). A halo around the image is clearly visible. Since the halo generation appears to be a camera feature appearing over a slow time scale, the timing in Fig. 7(b) was chosen such that the CCD chip is read out immediately after the arrival of the first laser pulse. This timing results in a reliable image of the real transverse laser shape. It has steep edges and a flattop rms modulation of about 7.5%. Figure 7(c) displays the image taken with a low reflectivity quartz plate. One can see that a halo is again present in addition to two intersecting interference patterns whose source is unknown. Finally on Fig. 7(d) a magnified image from the Ce:YAG crystal is shown. Here the interference fringes are assumed to relate to a tilt of the front and back surface of the Ce:YAG plate. The four images were taken with the same laser conditions.
The goal for the temporal laser profile is a flattop shape with 20 ps full width at half maximum (FWHM), short rise and fall times and small modulations on the flattop. The actual profile was measured using a streak camera which  has a resolution of about 2 ps at the laser wavelength [25]. The measured pulse is fit by a flattop trapezoid (see Fig. 8), and investigations have been performed to judge the impact of temporal laser pulse fluctuations on the emittance [26]. A tuning procedure has been developed to come as close as possible to the desired temporal laser profile by rotating the two birefringent crystals and adjusting their temperatures.
To monitor the laser pulse energy, a photomultiplier tube calibrated absolutely with a commercial laser pulse energy meter was used. An example measurement was performed using 50 trains with 40 laser pulses. The overall energy jitter of all pulses in all trains is 2.7% (rms) including any drift of the pulse energy within one train. Averaging the rms values of the individual micropulses gives an energy jitter of $2%, in fair agreement with the rms laser energy fluctuation of $3% calculated from the measured electron beam charge stability (see Fig. 18 and accompanying discussion). As a measure of the slope of the laser energy within the pulse train, the rms of the mean energy values for the individual pulses in the train was calculated to be 1.3%. Work is ongoing to further improve the laser energy stability.
The laser position stability was measured using a quadrant diode. A computer code fits the voltage signals (relative intensity on each quadrant) to the previously measured transverse pulse shape, resulting in the current displacement of the laser pulse. An example measurement with 200 pulse trains containing 40 laser pulses was performed. It shows that the rms position jitter in both transverse planes is less than 40 m.

G. rf system
The rf system at PITZ must provide sufficient rf power at 1.3 GHz to achieve a stable acceleration of the electron beam. For the operation period in 2006, the rf gun was powered with a klystron capable of 5 MW peak power [27]. The rf peak power at the gun was limited to about 3.5 MW, and rf pulse lengths up to 900 s at repetition rates of 10 Hz were used.
For the running in 2007, the rf source for the gun was upgraded to reach an electric field gradient of 60 MV=m at the photocathode inside the gun cavity, as required for the European XFEL. With the current series of electron gun prototypes and considering a certain margin for the rf regulation, this requires $8 MW of peak rf power delivered to the gun at 10 Hz in pulses up to 700 s long. The rf power to the gun is supplied by a 10-MW multibeam klystron [28]. The required 120 kV cathode voltage is provided from the modulator in 1.7-ms rectangular pulses. To reduce phase and amplitude fluctuations in the klystron output, the flattop ripple in the modulator voltage is controlled to AE0:5%. The output rf pulses can be varied up to 1.5 ms in length. The 10-MW klystron has two output ports supplying up to 5 MW each. In all cases, the rf power is carried from the klystron hall to the linac in SF 6 -filled waveguides. Because the high power of the 10-MW klystron prevents the transmission to vacuum via a single rf window, two such windows are used, and the rf power is then recombined under vacuum using a custom T-shaped combiner. A doorknob coupler is used for full axial symmetry of the rf wave coupled into the gun cavity. Because of losses in the rf waveguide system and problems operating the klystron at maximum peak power, the rf power available at the gun has been limited to less than 7.5 MW.
Most fluctuations in the rf pulse are of a repetitive nature and are regulated by fast amplitude and phase modulation of the incident rf power. The fast feed forward system is implemented using a field programmable gate array [29] with switchable feedback loop control (amplitude and phase) and additional adaptive feedback. The input rf signals are down converted using master oscillator frequency into base band and are fed into fast analog-todigital converters. Since the gun has no rf probe, control of the rf field in the gun is only possible via the directional couplers in both waveguides feeding the cavity. The phase difference between the rf from each of the two 5-MW waveguides must be adjusted and regulated, complicating the overall rf system control. The rf control for the 10-MW klystron is currently limited to feed forward operation only.
During both run periods, the TESLA booster cavity was operated with a separate rf source. Again, a single-beam 5-MW klystron was used, but due to the limited cooling capacity of the TESLA booster, the output power from the klystron was limited to 3.4 MW and the rf pulse length between 40 and 120 s. The phase and the amplitude of the rf are controlled by a digital signal processor running in feed forward mode only.

Screen stations and emittance measurement systems
For monitoring and measuring the transverse intensity distribution of the electron beam at PITZ, 12 screen stations are installed at various positions along the beam line. A typical screen station is equipped with yttrium aluminum garnet (YAG) powder and optical transition radiation (OTR) screens. Each screen is combined with an optical system consisting of mirrors, lenses, a resolution grid, and a CCD camera. The images from each camera are transmitted to a personal computer (PC) where the information is analyzed and stored. This versatile video system developed at PITZ [30] provides lossless readout and transport of the video signal, delivers images in real-time from the screens, and provides various tools for postprocessing of the data. For more specific needs a multiplatform video kernel library was created, which provides a flexible interface to various tools for data acquisition and analysis that can be integrated into custom measurement and analysis software.
The video system incorporates two different types of charge coupled device (CCD) cameras, analog cameras [31] and digital cameras, [32] as well as frame grabber PCs and a dedicated software environment for image acquisition and analysis. The analog cameras are equipped with a CCD chip of 1=2 00 size consisting of 768 Â 574 square pixels. The analog signal output is transmitted to a PC with a frame grabber card installed where the signal is encoded into pictures with 8 bit amplitude resolution. The digital camera models have a CCD chip of 1=2 00 size consisting of 1360 Â 1024 square pixels and provide images with 12 bit amplitude resolution. Both camera types can be remotely controlled (gain adjustment, etc.) for optimal performance, and are externally triggered to match the repetition rate of the accelerator.
To measure the transverse beam emittance at PITZ, YAG and OTR screens are used in combination with tungsten slits in the single-slit-scan technique [33]. The emittance measurement system (EMSY) which comprises the movable slit and observation screen was designed and optimized to measure small beam emittance in a wide range of beam momentum and charge densities [34]. Three such devices are installed and commissioned in the PITZ beam line at positions 4.3, 6.6, and 9.9 m downstream of the cathode [35].
An EMSY consists of two orthogonal actuators mounted perpendicular to the direction of beam propagation. Each actuator is equipped with a YAG or an OTR screen for measurement of the transverse rms beam size ffiffiffiffiffiffiffiffi hx 2 i p and a pair of single-slit masks. These slits, with openings of 10 and 50 m, are used to divide the beam into beamlets for the estimation of the local beam divergence. Position and angular orientation of each actuator with respect to the beam is adjusted with stepper motors. Precision in positioning is about 1 m, and of angular orientation about 2 mrad. Images from the screen at the slit position are taken using an 8-bit analog camera while the images of the beamlets are taken with the 12-bit digital camera.
The uncorrelated divergence is estimated by cutting the electron beam into emittance-dominated slices and measuring their size ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi hx 2 beamlet i q on a screen after a drift length average of the beamlet divergences ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi hx 02 beamlet i q for all measured beamlets is considered as the total beam divergence ffiffiffiffiffiffiffiffiffi hx 02 i p . The sheared normalized rms emittance is then calculated using the following definition: (1) where x (or y) is the horizontal (vertical) direction transverse to the electron beam average motion, is the average electron velocity normalized to the speed of light, is the relativistic Lorentz factor for the beam, and the bracketed values are the second central moments of the distributions [33]. The momentum of the beam is measured in magnetic spectrometers downstream of the EMSY station, and the rms beam size is measured with the OTR or YAG screens at the EMSY location. This procedure to determine the projected normalized emittance was chosen in order to reduce the overall measurement error compared to the result taking the correlated divergence and subtracting the covariance, as in the standard formula given by " n;x ¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi , where the term ffiffiffiffiffiffiffiffiffi hx 02 i p represents the weighted average of the beamlet divergences including the mean divergence of the beamlet, ignored in the sheared approach. For nonlinear phase-space distributions, the sheared approach introduces some error into the calculation of the rms emittance, which is estimated and discussed for the PITZ results in Sec. III F 1.
The optimization of the EMSY design has taken into account several factors, the most important of which in terms of the emittance measurement uncertainty are the space-charge forces and the beam size measurements, including the resolution of the system. The influence of the space-charge forces can be mitigated by choosing a small slit opening and short distance between the slit mask and the beamlet observation screen. On the other hand, achieving a sufficient signal-to-noise ratio requires a larger slit opening and good resolution of the beamlet divergence requires a longer drift space to the observation screen. Likewise, thicker slits reduce the background from scattered electrons but also reduce the angular acceptance, leading to an underestimation of the local divergence and more stringent constraints on the slit alignment for sufficient transmission. Detailed optimization of these parameters resulted in an optimal slit opening of 10 m and drift length of about 2 m [34,36]. This combination balances the influence of the space-charge forces, the geometric error from the initial beamlet size, and the resolution in the beamlet divergence measurement. Using asymmetric envelope equations [37] it was found that the maximum overestimation caused by the space-charge forces does not exceed 3% for a wide range of the photoinjector parameters [36]. Another major contribution to the systematic uncertainty of the measurement is the uncertainty in the beam and beamlet size measurements. The controlling influences are the spatial resolution as determined by the optical system setup and the amplitude resolution as determined by the bit depth per pixel of the camera CCD chip. For the latter it was estimated that 12 bit camera will guarantee that deviations in the rms beam size are smaller than 2% [36,38]. It has also been estimated that for the present configuration (10 m slit and 2 m drift), the spatial resolution of the beam size measurement system, 30 lines=mm, introduces emittance overestimation which is small compared to the influence of the beam size measurement. Several other important factors were evaluated such as the linearity of the screen response to irradiation with different charge, the screen geometry and material, and inhomogeneities of the CCD chip sensitivity. Their contributions to the emittance uncertainty are estimated to be smaller than the influence from the space charge and the spatial resolution of the optical system [38,39]. The maximum combined deviation including the space-charge forces, the contribution from the finite slit size, and the optical resolution is evaluated to bring an emittance overestimation between 2% and 10% in the expected range of PITZ parameters, namely, mean beam momentum, beam rms size, and emittance [36].

Optical system for measuring the longitudinal phase space
The electron bunch longitudinal distribution and the longitudinal phase space are measured using a streak camera with a temporal resolution of about 2 ps [25]. Silica aerogels [17] of refractive index in the range of 1.008 up to 1.05 and OTR (optical transition radiation) are used as radiators which emit a light distribution that follows the charge distribution in the electron bunch. This light is transmitted to the streak camera using an optical transmission line of about 27 m in length [40]. Three screen stations equipped with aerogel and OTR radiators were installed at PITZ-1.6 [41]. One station was installed in the spectrometer of the low-energy section for the measurement of the longitudinal phase space, and two stations, one before and one after the booster cavity, were installed to measure the longitudinal electron density distribution.
Two types of optical systems are used in the light collection systems (as shown in Table IV). In the case of bunch length measurements in the main electron beam line (LOW.SCR3 and HIGH1.SCR2), the ''full cone'' approach is applied. The light of the full Cherenkov cone is collected by high-numerical-aperture optics. This method is not applicable in the case of the more extended light distributions acquired at the longitudinal phase space station lo-cated in the spectrometer. Light from an extended object field cannot be transported by a high-numerical-aperture system without noticeable light losses for off-axis object points. Therefore, at the spectrometer station, only a small segment of 2 out of the 360 Cherenkov ring is used. In this ''partial cone'' scheme, the light distribution of the momentum spectrum has to be imaged with appropriate spatial resolution onto the entrance slit of the streak camera, which has dimensions of about 0.05 mm by 6 mm. For each station a suitable overall magnification has to be realized.
The spatial resolution for the first magnet spectrometer is 3 lines=mm on the screen in the optical system imaging to the streak camera (for longitudinal phase-space measurements). The resolution was limited by the pixel size of the CCD camera used for this measurement. For momentum measurements at DISP1.SCR1, the spatial resolution is 5 lines=mm at the screen, which corresponds to dp=p of 0.15%.
High resolution in the bunch length and phase-space measurements requires high collection and transmission efficiency and minimum time dispersion of light passing through the optical transmission line. Generally, achromatic lenses of large focal length forming telescopes with four-focal-length geometry are used for imaging over large distances. These lenses usually have a low aperture; therefore, the aperture of the light coming from the different branches of the light collection system has to be matched to the lenses by magnification. The matching system at the end of the optical transport line demagnifies the intermediate images so that the final image fits the dimensions of the streak camera slit. The system is optimized to have minimum light loss and a minimum number of optical elements. The system is modular and can be easily extended.
A general problem of the lens system is the dispersion in time for the wide spectral range of the Cherenkov radiation. The temporal dispersion of the current system is on the order of 70 ps in a spectral range from 450 to 700 nm. Spectral filtering required to reduce this dispersion reduces the light throughput by 96% [42]. One solution for this problem is the design of an optical system based on reflective optics, which is ongoing.

Position and bunch charge diagnostics
A variety of diagnostics are used to measure the transverse position and charge of the electron bunches. These include beam position monitors (BPM), integrated current transformers (ICT), and Faraday cups. Both BPMs and ICTs monitor the beam without intercepting any current, while the Faraday cups measure charge by intercepting the full beam. Four ICTs are installed, one in the low-energy section of the linac and three along the beam line after the booster [43]. The 70-ns output signals from these transformers give the charge in the electron bunch with a precision of about 30 pC. The BPMs are of a simple round-and-flat-button type [44]. They detect the transverse position of the beam in the beam pipe with a precision of about 30 m. The Faraday cups are ground-insulated copper absorbers, some of which are water cooled. They measure the charge in the electron bunch to a precision of about 2 pC. The diagnostics elements are all controlled using the distributed object-oriented control system (DOOCS), discussed below.

Wire scanners for transverse beam profile measurements
A new type of wire scanner for high-sensitivity beam profile measurements has been developed for FLASH [45]. In the beam line of PITZ-1.6, two wire scanners of this type have been mounted in order to measure beam parameters such as position and transverse profile. A first test was performed in 2005 with one device [46]. The test showed that beam properties for bunch charges from 1 nC down to a few pC can be measured. Wire scanners can be used in cases where the standard diagnostics tools (YAG/OTR screens) fail, for example, due to the large heat load from the long pulse trains that can be produced at PITZ.

Beam dump
At the end of the straight section of the PITZ beam line, and at the end of the dispersive arms, the electron beam is dumped into cylindrical aluminum absorbers. The dump in the straight section is open to the vacuum chamber whereas the beam pipe in the dispersive arm is separated from it by a 1.3 cm thick blind flange of stainless steel. Studies with the multiparticle transport code FLUKA [47,48], show that an aluminum absorber of 30 cm length and radius 10 cm is sufficient to stop a 40 MeV electron beam, and the dump in the straight section was built to these dimensions. Because of the limited space in the dispersive arm and a current energy of electrons of 10-15 MeV, the dump at this position is slightly smaller, 25 cm long with a radius of 7.5 cm.
Given the number of bunches per second and the maximum electron energy at the PITZ-1.6 facility, neither further shielding against neutrons or photons nor cooling of the absorbers is needed.
I. Electronics, controls, and data acquisition

Interlock electronics for gun and booster
To ensure safe operation of the gun and booster cavities and reduce the risk of damage during rf conditioning of the cavities, a technical interlock system is installed at PITZ. The gun interlock consists of a photomultiplier (PM), an infrared temperature measurement of the rf window, vacuum pressure measurement, detection of water flow in the cooling system, measurement of temperature at four points at the coupler and the rf windows, photodiode spark detection in the waveguide system, cathode status diagnosis, and an antenna for collecting free electrons. In the case of sparks the PM signals will switch off the klystron within microseconds, while the other signals switch off the rf modulator only after milliseconds. The booster interlock consists of two photomultipliers at each end of the booster cavity, vacuum detection and one temperature sensor.
The thresholds of the different sensors are adjustable with potentiometers. Interlocks are indicated and stored. Reset is possible manually or through the control system.

Timing system
The timing system for PITZ [49] consists of four major components: the rf master oscillator, the repetition rate generator module, the clock generator module, and the delay timer module. The rf master oscillator provides a set of signals with different frequencies for the synchronization of the subsystems of the linac. These frequencies have a fixed phase relationship with respect to each other. The fundamental signal from the master oscillator, at 9.027 775 MHz, is used for timing and diagnostics, the 3rd and 6th harmonics are used by the photocathode laser, the 12th harmonic is used by the streak camera, and the 144th harmonic, at 1.3 GHz, is used both by the laser and the low-level rf control system. Based on the 9-MHz clock, the repetition rate generator provides events to the clock system. It operates on the 50 Hz line frequency, generating a 10 Hz signal by dividing the line frequency by 5. Further division allows for repetition periods from 100 ms up to 1000 s. Synchronization with the line suppresses common noise for all systems.
The clock generator can receive up to eight input signals, and outputs encoded events on the 9 MHz signal. For event encoding a bi-phase marked code (FM1) is used. In this code, a transition occurs at every bit boundary. A ''1'' is represented by an additional transition at the center of the bit cell and a ''0'' is presented by the absence of a transition at the center of the bit cell. The data transmission begins with a start bit (zero) followed by 8 bits of event data and one parity bit. The encoded clock signal is distributed to all delay timer modules within the system. The delay timer modules are located in different subsystems at different places: at the laser, in the klystron hall, and on the diagnostic racks. An on-board event encoder/decoder detects the incoming clock and provides up to eight delayed trigger output pulses or four trigger gates where the delay and the width of the output pulse is controlled by a pair of trigger signals.

Control system
The control system at PITZ, initiated in the year 2001, is based on the distributed object-oriented controls system (DOOCS) developed by DESY [50]. DOOCS is a distributed installation, multilayered structure involving hardware and software parts. To extend the homogeneous backbone structure, a heterogeneous strategy is enforced in order to access installed components that provide control and readout via other control systems like TINE [51,52] and EPICS [53]. To fulfill the main focus of machine operation, many subsystems like machine and system protection, actuation, monitoring, data taking, diagnostic, (remote) displaying, standard as well as nonstandard hardware readout, user interface, and tracing are provided.
The DOOCS data display (DDD) [54] is used for operators on terminals installed in the control room. For dedicated readout and analysis software, TINE servers and clients, semiautomatic applications, the PITZ video system, integrated oscilloscopes, ROOT applications, and MATLAB scripts are used. A World Wide Web-based electronic logbook [55] rounds out the performance and supports the work of users. Midterm storage for monitoring and tracing is done via central archiving, and comprehensive permanent data recording is done by the data acquisition (DAQ) system as discussed below.
PITZ utilizes both industrial hardware and custom-built electronics. On the front-end server level, mainly VME crates based on SPARC-Solaris are installed. For core control services on the middle layer, SPARC-based servers are deployed. For specific functions, VxWorks and embedded computer hardware is installed. In addition, x86based PCs and servers running Windows XP or Linux are used widely for hosting services, server, and client applications. A switched network backbone provides Gigabit Ethernet communication between components.

Data acquisition system
The PITZ data acquisition (DAQ) system continuously stores most representative set point and readback parameters of the facility. A prototype system was created for the TESLATest Facility and then adopted at PITZ. The storage is organized as a collection of ROOT files, with raw data collected via DOOCS calls and transferred to ROOT-based generators. Each generator is dedicated to a certain type of data stream, where the data stream is defined by its correlation with a single bunch per train. There are two basic data types acquired at different rates-slow data, a set of machine parameters monitored once per second, and fast data, recorded in $2 ms-long bursts at 1 MHz from analog-to-digital converters during the micropulse trains. Since each generator produces a separate file, data synchronization is necessary for offline analysis. A DAQ browser program extracts data from a collection of files under defined conditions and performs certain analysis, storage, and visualization functions [56]. Synchronization between measurements is achieved by a timestamp generated together with the data from the generator. The DAQ system is distributed over two hosts, each running a number of generators and transferring the files to dCache [57] or tape for storage.

J. Water cooling system
The water cooling systems for the gun and booster are identical and consist of one chilled water circuit at 27 C and a second at an adjustable temperature controlled by a 20 kW heater (shown schematically in Fig. 9).
A motorized three-way valve in the booster water system mixes the water of both circuits to deliver water of the desired temperature to the cavity channels. An integrated 500-L tank in each circuit prevents oscillations. In the gun cooling system, the three-way valve is replaced by a pair of motorized two-way valves (large and small flow rates) which feed cold water to the cooling circuit. During normal operation the deviation from the set-point value of the temperature control is lower than AE0:05 C. The control unit [58] switches all pumps and supervises the safety of the system.

A. Conditioning and dark current measurements
An extensive rf processing is needed to desorb gases from the cavity walls and to condition field emission and multipacting sites before operation of the gun cavity with long, high-gradient rf pulses is possible. To increase efficiency, safety, and reduce required time for the conditioning process, an automatic conditioning program has been developed [59]. This program controls the conditioning by periodically ramping up the rf power and reacting automatically to vacuum increase or interlock signals. It also sweeps the main and the bucking solenoid currents to distribute the bombardment of the field emission electrons within the gun cavity in order to clean the gun surface.
With the use of this automatic program, the gun prototype 3.1, which was installed at PITZ in early 2006 and foreseen as a replacement gun for the FLASH machine, has been conditioned up to the maximum requirements of FLASH: a maximum gradient of at least 40 MV=m with rf pulse length of 900 s at 10 Hz repetition rate. With a peak rf power of 3.5 MW and the mentioned rf pulse length and repetition rate, gun prototype 3.1 was operated at an average power of up to 31.5 kW, the highest value reached at PITZ at that time. Another rf gun with the same design (prototype 3.2) was conditioned at PITZ in spring 2007. This cavity has been conditioned to stable operation at a maximum gun gradient of $60 MV=m with an rf pulse length of 140 s, at 10 Hz repetition rate. This gradient was possible for short periods after approximately 20 days of conditioning with 60-s rf pulses. Another 30 days using longer rf pulses of up to 400 s were required to reach stable operation of the gun cavity at 60 MV=m peak field at the cathode. Dark current emitted during the rf pulse is an important issue for photoinjectors, as it degrades the vacuum conditions and the radiation produced by it damages the diagnostic components located in the beam tunnel. During the rf conditioning, uncoated molybdenum cathodes were used in place of the standard cesium-telluridecoated ones in order to eliminate the risk of sputtering cesium on the cavity walls. The dark current from field emission was measured for both kinds of cathodes to study the evolution of the conditioning process. Using a Faraday cup about 78 cm downstream of the cathode position, measurements for various rf powers have been performed as a function of the main solenoid current. Results with gun prototype 3.1 at peak fields of up to $44 MV=m are shown in Fig. 10(a), where the maximum recorded dark current at this field was $360 A.
The dependence of the maximum dark current, the highest current measured as a function of the main solenoid strength, on the gun gradient for gun prototype 3.2 with various cathodes is illustrated in Fig. 10(b). Observation of lower dark current levels for the electropolished (EP) Mo cathode #55.3 shows promise for a reduction in dark current with this treatment, but for the other cathodes the dark current measured from gun prototype 3.2 at the beginning of the conditioning and operation period is much higher than from prototype 3.1. Possible reasons for this high dark current include a fabrication error in the area around the cathode plug which was thought to be mechanically corrected and damage to the cathode surface, partly caused by conditioning and during the operation period. The higher dark current from prototype 3.2 caused a much higher radiation level in the accelerator tunnel and led to damage of several electronics components [11,60]. The latest measurements with yet another gun cavity (prototype 4.2), which was cleaned with a dry-ice technique instead of the high-pressure water rinsing used until now, showed a reduction of the dark current by a factor of more than 10 [61].

Quantum efficiency studies
The main methods used for the cathode investigations at PITZ are optical inspection, dark current, and quantum efficiency (QE, ratio of the number of emitted electrons to the number of photons incident on the cathode) measurements, QE maps of the active cathode area and deter- mination of the thermal emittance. During operation in the injector the QE of the Cs 2 Te photocathodes drops from about 10% to below 0.5%. To determine the QE at PITZ and INFN-LASA different measurement techniques are used. At LASA the light from an Hg lamp in combination with optical bandpass filters (center wavelengths between 239 and 436 nm) is used to illuminate the photocathode. For each wavelength the QE is obtained by measuring the power of the impinging light and the current of the emitted electrons from the Cs 2 Te film. The reported QE at 262 nm is an interpolation between measured QEs at other wavelengths. At PITZ the laser wavelength is fixed at 262 nm and the QE is obtained by measuring the extracted charge as a function of the laser energy at the cathode, using a Faraday cup 0.78 m downstream of the cathode. The QE is given by where Q½C is the collected charge in C, E ph ½eV is the photon energy in eV, and E cath ½J is the laser pulse energy at the cathode in J. The laser wavelength 262 nm corresponds to a photon energy of 4.73 eV. The laser beam energy per pulse is measured before the laser beam enters the vacuum system, and the photon fluence at the cathode is estimated by considering the transmission of the vacuum window (about 92%) and the reflectivity of the vacuum laser mirror. The QE is calculated from the linear slope in the low-charge region of the measurements, where the influence of space-charge forces is reduced. In Fig. 11 the measured charge as a function of the laser energy is presented for cathode #90.1 along with the linear fit used to estimate the QE. The maximum acceleration gradient at the cathode was 60 MV=m and the phase was set to maximum mean momentum gain. The rms laser spot size at the cathode was $0:4 mm. The slope of the fit gives a QE of 0.65%. Besides the average value measured using standard laser spot sizes, the homogeneity of the QE over the photocathode was investigated. A small laser spot is moved over the cathode surface by rotating two wedge plates located before the vacuum mirror, and the extracted charge is measured.
The QE maps of new cathodes are homogenous as shown in Fig. 12(a). This QE map of cathode #90.1 was measured at low electric field with 254-nm photons right after production. Figure 12  at 40 MV=m in the rf gun at PITZ. A 0.2 mm aperture was used in the laser beam line, resulting in a $0:07-mm rms spot size at the cathode. After use in the injector, the map is inhomogeneous with an area of reduced QE in the center of approximately the laser spot size during standard operation. Such a strong inhomogeneity of the electron emission was observed for the first time at PITZ after operation at 60 MV=m with gun prototype 3.2. The QE maps are used to monitor the inhomogeneities of the cathode response, not to find the proper position of the laser on the cathode.
The properly aligned position is determined, as described in Sec. III D 1, with beam-based techniques after the selection of the cathode laser spot size (typically $1 mm in diameter, but up to 3 mm).
Analogous changes can be observed by comparing photographs of the cathode taken before, shown in Fig. 13(a), and after use in the linac, Fig. 13(b). While the Cs 2 Te film of the fresh cathode is round and homogeneous, damage appeared during operation in the rf gun with acceleration gradients up to 60 MV=m.

XPS studies
For a better understanding of the QE degradation during operation, the chemical composition of two unused (#90.1 and #42.3) and two used cathodes (#34.6 used at PITZ as shown in Table III, and #92.1, used for 39 days at FLASH) were investigated using x-ray photoelectron spectroscopy (XPS) at BESSY (Berlin, Germany) [62]. Operating conditions and times for the used cathodes are shown in  In Fig. 14, survey scans obtained with a primary photon energy of 900 eV are presented for the two fresh and the two used cathodes. The main peaks for all spectra correspond to Cs 3d and Te 3d electron orbitals. While for fresh cathodes peaks corresponding to O 1s are clearly visible, the intensity of this line and therefore the amount of oxygen reduces with operation time. We interpret this as a cleaning process during operation caused by the laser pulses (wavelength 262 nm) and the high electric field at the cathode. Both effects result in a local heating of the photocathode. This is consistent with the known effect that Cs 2 Te photocathodes poisoned with oxygen can be rejuvenated by heating [63][64][65]. A further difference in the spectra is that, on the used cathodes, F 1s and C 1s lines appear. The amounts of both elements are not negligible, because of the approximately 1 order of magnitude smaller photoionization cross sections in comparison to Cs 3d and Te 3d [66]. The origin of these contaminations can be related to Teflon parts inside the beam line immediately after the gun section. The Cs 3d and Te 3d lines were also investigated in detail, and a transition from mainly Te 2À to metallic tellurium was identified by comparison between fresh and used cathodes [62]. Meanwhile the Teflon washers have been removed from the vacuum system and later XPS studies showed that the metallic tellurium component practically disappeared [67]. In addition, the photocathode lifetime has increased significantly.

Thermal emittance
The thermal emittance determines the lower limit of the normalized emittance of electron beams in injectors. Several authors have performed theoretical and experimental studies on the thermal emittance of semiconductor photocathodes like Cs 2 Te [68][69][70][71]. The photoemission from semiconductors can be described by a three step model [72]. In the first step, an electron from the valence band is excited to the conduction band by photon absorption. The second step involves the transport of the excited electron to the surface, and in the third step the electron is emitted into vacuum. Because of the band gap of Cs 2 Te of 3.3 eV, the photon energy must exceed 3.3 eV in order to excite electrons from the valence into the conduction band. At PITZ, 4.73-eV photons are used to excite the electrons from the valence band to the first density of states maximum in the conduction band, located 4.05 eV above the valence band maximum [72]. To be emitted, the electron has to overcome the potential barrier at the surface, which for semiconductors can be described by the electron affinity (the energy difference between the vacuum level and the conduction band minimum). In Cs 2 Te the electron affinity is 0.2 eV [72]. The threshold energy for electron emission from Cs 2 Te is the sum of the band gap and the electron affinity, 3.5 eV. Electrons emitted from the first density of states maximum in the conduction band will have an average kinetic energy of 0.55 eV after emission. This energy is only valid in the case of pure photoemission (no electric field at the cathode) and for fresh Cs 2 Te photocathodes.
The kinetic energy of emitted electrons can be determined by measuring the thermal emittance [68]. Assuming isotropic emission into the hemisphere in front of the cathode surface, the two quantities are related by where " th is the thermal emittance, l is the laser spot size, E kin is the average kinetic energy of the emitted electrons, and m 0 c 2 is the electron mass. At PITZ it is not possible to measure the thermal emittance directly at the cathode. In order to estimate the thermal emittance, the normalized beam emittance was measured under special conditions with the first emittance measurement system (EMSY1) located 4.3 m downstream of the cathode [73].
It is assumed that the thermal emittance adds in quadrature to other terms (i.e. emittance growth due to spacecharge forces, influence of the rf field at the cathode during the emission) forming the measured transverse emittance. The influence of the space charge decreases with smaller bunch charge, as shown by ASTRA simulations [74] in FIG. 15. ASTRA simulations for the influence of (a) space charge and (b) laser pulse length on the measured emittance " n over the thermal emittance " th for a maximum accelerating gradient of 60 MV=m (with rf phase adjusted for maximum mean momentum gain). Fig. 15(a) for a beam with initial beam rms size of 0.3 mm in both planes and an initial bunch length of 3.4 ps. Based on these simulations, thermal emittance measurements were performed at maximum bunch charges of 6 pC. This bunch charge was determined to be an appropriate compromise between the signal-to-noise ratio during measurements and reduced space-charge forces. Also, the effect of the rf field during emission can be reduced by using short laser pulses, as shown in Fig. 15(b). Therefore, during the experiments a Gaussian laser pulse shape with 3-4 ps rms pulse length was used instead of the usual flattop laser pulse with 20 ps FWHM. The gun rf phase was adjusted to the phase of maximum mean momentum gain. According to the ASTRA simulations, the systematic uncertainty of the thermal emittance estimation at a maximum accelerating gradient of 60 MV=m is about 10%.
In Fig. 16 measured emittances as a function of the laser spot size at the cathode for cathode #90.1 are presented. The measurements were performed at a maximum accelerating gradient at the cathode of 60 MV=m and with the main solenoid current set to minimum electron beam spot size at the first EMSY station, where 10 m slits were used. The kinetic energy of the electrons right after the emission can be derived from the slope of a linear fit to the data using Eq. (3). As discussed above, the variation of the rms laser spot size at the cathodes is achieved by using different apertures in the laser beam line.
The linear fit to the data shown in Fig. 16 is to the geometrical mean of the measured emittances in the two transverse planes. This analysis yields an average kinetic energy of 1:27 AE 0:15 eV. In addition to the experimental results, ASTRA simulations (open symbols) for different kinetic energies are shown in Fig. 16. The red and green lines represent the simulations shifted by an offset. A better understanding of the data is necessary to explain the systematic errors, evidenced by the nonzero fit value for the thermal emittance at zero laser rms spot size.
In Fig. 17 the kinetic energies obtained for different electric fields during the emission for cathode #83.3 and #90.1 are summarized. The field was derived by considering the sinusoidal variation of the rf field according to where E 0 is the maximum field amplitude, m is the gun rf phase for maximum mean momentum gain, and 0 is the zero phase estimated by finding the zero-crossing point in a charge vs rf phase scan. For example, with peak field at the cathode of 60 MV=m, the surface cathode field at emission is $43 MV=m for the phase of maximum mean momentum gain. As shown in Fig. 17, there is a clear influence of the electric field on the kinetic energies in the data from cathode #83.3, but the difference between the two cathodes is notable. The experimentally obtained kinetic energies of the electrons emitted at high gun gradients are in general much higher than the theoretical estimate of 0.55 eV described above. Since there are no theoretical or experimental results describing the band bending of Cs 2 Te in high electric fields, the field free case is used for the theoretical estimate.
The presented data for the thermal emittance together with the derived kinetic energies of the photoelectrons after the emission are the first such measurements under the European XFEL design conditions of 60 MV=m accelerating gradient amplitude. A more precise investigation on the systematic errors is necessary, along with measurements on Cs 2 Te cathodes with higher QE (both measured cathodes had QE below 0.5%). Additionally, XPS studies (described in Sec. III B 2) show fluorine and metallic tellurium to be  present on the used cathodes, further complicating the interpretation of the thermal emittance results.

C. Gun phase scan for bunch charge and charge jitter studies
Faraday cups and integrating current transformers (ICTs) were used to measure the electron beam charge. Since it measures nondestructively, the ICT in the lowenergy section of the linac (before the booster) has been used also to monitor the bunch charge during emittance measurements.
Phase scans measure the accelerated charge downstream of the gun as a function of the laser launch phase, the phase of the rf field at which the laser hits the photocathode. Typical examples of such scans are shown in Fig. 18. Zero phase in this plot refers to the rf phase that gives the maximum electron beam momentum of $6:45 MeV=c. The drive laser was operated with a flattop profile of $21 ps FWHM and $6 ps rise/fall time and had a transverse size of $0:42 mm rms at the cathode. A main solenoid current of 370 A was applied to maximize the beam transport to the ICT located 0.935 m downstream of the cathode. The two phase scans shown in Fig. 18 correspond to laser pulse energies which are different by 21%. The emission processes under these conditions are dominated by space-charge and Schottky-like effects: the maximum charge is only increased by $13% with the 21% increase of the laser energy. The local maximum in the bunch charge around 60 degrees is partially associated with secondary electrons [75].
Detailed charge stability studies have been done for several selected phases. A laser energy jitter of $2:9% can be estimated from the analysis of the charge jitter for the phase of 41 degrees above the phase of maximum mean momentum gain. This is in reasonable agreement with the laser energy jitter measured directly (discussed in Sec. II F 2). Applying this energy jitter to other phases and assuming that the laser energy and rf phase jitter are independent, the estimation of the rf phase jitter is $1 deg .
In order to obtain the zero-crossing phase (the launch phase of zero field at the cathode), the laser temporal profile and a low-charge phase scan can be used. An integrated laser temporal profile fitted to the left edge of the phase scan yields the zero-crossing rf-gun phase (see Fig. 19). Such a procedure provides a long term monitoring of the gun phase and important input for more realistic beam dynamics simulations.

D. Beam-based alignment
Since the rf-gun cavity is supplied by a coaxial rf coupler, the electron beam from the photocathode is emitted into axially symmetric electromagnetic fields: the mode of the standing wave of the 1.  main solenoid magnetic field, and the bucking solenoid magnetic field along the axis are shown.
The beam dynamics in the gun is significantly complicated by the overlapping of rf and solenoid fields. In a perfectly aligned system an electron beam is emitted at the cathode plane on the electromagnetic axis of the cavity which coincides with the magnetic axis of the solenoids. In this case, the electron beam is affected only by rotationally symmetric accelerating and focusing fields. But in reality the beam starts with an offset to the electric axis and it is steered transversely by the rf field. This offset can originate from laser misalignment and can be corrected by tuning of the optical elements in the laser beam line. Another source of the electron beam offset can be inhomogeneity of the laser transverse distribution or QE map of the Cs 2 Te photocathode, either of which results in the offset of the emitted electron beam center. Another source of misalignment is the main solenoid, which besides a transverse offset to the electric axis of the cavity can have tilting (yaw and pitch angles).
Misalignments in the rf-gun region result in projected emittance growth: estimations based on beam dynamics simulations of a misaligned photoinjector yield 1% emittance growth caused by 0.35 mm laser offset or 0.2 mm solenoid offset or 0.6 mrad solenoid tilt [76]. Each of these misalignments is present to some extent, and the resulting emittance growth may be significantly higher than 1%.
The magnetic axis of the main solenoid cannot be assumed to coincide with its mechanical axis. It is therefore necessary to use the electron beam as the alignment tool. The beam-based alignment (BBA) uses measurements of the electron beam transverse motion downstream as a function of the rf-gun launch phase or main solenoid current.

Cathode laser alignment
Laser spot adjustment on the cathode center is realized using a system of remotely controlled movable mirrors and/or rotating wedge plates. As described above in Sec. II F 1, the cathode laser transverse profile is also monitored by CCD cameras and screens at cathodeequivalent positions and the relative position of the laser can be checked and adjusted at these positions as well.
The method for centering the laser on the photocathode is based on a measurement of the electron beam position downstream as a function of the rf phase. All magnets are switched off during these measurements. The electron beam transverse position is measured at a YAG screen in the first diagnostic cross, 0.78 m from the cathode. Moderate rf-gun gradients improve the BBA resolution by reducing the dark current background and lowering the beam energy. Low beam charges ( $ 5-20 pC) are required to fit the whole beam onto the screen without additional focusing (only rf focusing is used). For sufficient intensity of the beam spot a pulse train of 30-50 pulses is required. Under these conditions the electron beam is steered by transverse rf fields and has trajectories developing in the cavity radial direction (shown in Fig. 21). In this example, after the first measurement, a test displacement of the laser spot on the cathode (0.25 mm in one transverse direction, 0.5 mm in the other) was suggested as a first step of BBA. After the second measurement screen coordinates of the cathode center were obtained from the intersection of the two phase trajectories, and the appropriate displacement was performed to center the laser spot on the cathode. The final measurement demonstrated rather good laser centering (electron beam position stable with rf phase to within 0.2 mm, as shown by the green points in the figure).

Main solenoid alignment
The cathode laser alignment is simplified because the offsets in the horizontal and vertical directions are essentially uncoupled, but the solenoid misalignment involves coupling between both transverse directions. The effect of solenoid misalignments is mainly studied using beam simulation codes.
The main solenoid at PITZ is supplied with a micromover system, described above, which adjusts the transverse position and angles of the solenoid. The main solenoid BBA is performed by monitoring the electron beam center position on the YAG screen 0.78 m from the cathode as a function of the main solenoid current. As in the laser BBA, moderate gun gradients ( $ 23-25 MV=m at the cathode, corresponding to a mean beam momentum of $3 MeV=c) reduce background from the dark current and increase the sensitivity of the method. Typical examples of measured curves are shown in Fig. 22 together with simulations. The absolute position of the solenoid is in general unknown, but its relative displacement can be detected with a good precision ( < 10 m). In order to increase the reliability of the simulated misalignments a test solenoid movement can be performed (Fig. 22 shows a horizontal 0.1 mm displacement). Both measurements (initial and after test displacement) have to be simulated before applying a correction.
The solenoid BBA is an iterative procedure of measurement, simulation of the measured curve, and elimination of the largest misalignment. The largest misalignment is determined as an offset or an angle corresponding to the maximum emittance growth at the current iteration of the BBA.

Momentum measurements
The characterization of the spare gun for FLASH (gun prototype 3.1) in 2006 included measurements of both the mean electron beam momentum and the momentum spread. Figure 23 shows these measured results at a peak cathode gradient of about 40 MV=m along with simulations of the momentum distribution and dependence on gun phase using the space-charge tracking code ASTRA [74]. Zero phase in this figure corresponds to zero electric field on the cathode in the simulation, and the measured data are offset so that the phase of maximum mean momentum gain is the same for the measured and simulated results. In 2007 another L-band rf gun (prototype 3.2) was operated at PITZ and characterized for the first time with a peak gradient of up to about 60 MV=m at the cathode, and again the momentum distribution was measured. Figure 24 shows a measurement and simulation of the mean momentum and momentum spread of gun 3.2 as a function of the gun phase at higher gradient. The phase of zero electric field at the cathode was determined using the dependence of the charge (measured by the Faraday cup) on the rf phase in the gun at emission. In the simulation a gradient of 55 MV=m at the cathode and a ratio of the field between half and full cell (field balance) of 1.03 was assumed (field balance measurements of the gun cavity are discussed in Sec. II A).
The momentum distribution was also measured downstream of the booster cavity for different phases of the  booster cavity with about 1 nC beam charge and a flattop longitudinal laser distribution. Simulation, mean momentum, and momentum spread for the gun phase with maximum energy gain are shown in Fig. 25. The booster was not operated at maximum power for this measurement to avoid the operation of the spectrometer dipole in the nonlinear range, where it was not calibrated. Simulation and measurement of the mean momentum fit rather well. Discrepancies between measured and simulated momentum spread might be caused by inadequate focusing of the beam or some phase drift and energy jitter of the beam.  behaves differently. The ratio between the FWHM and the rms bunch length is largest around the phase with the highest momentum gain (34 to 46 deg). For those phases the charge is distributed more homogeneously in temporal space and the nonlinearity of the space-charge forces is reduced. Figure 26(b) shows the measured and simulated bunch length with booster turned on, with gun phase fixed at the highest momentum gain, as a function of the booster phase. The booster phase with the maximum final momentum (about 16 MeV=c) is defined as 0 deg. The rms bunch length is nearly constant over the large phase range covered by the measurement ( $ 120 degrees). Figure 27 shows the electron beam current profile for gun and booster phase with maximum mean momentum gain, and booster phase 60 degrees off crest. t ¼ 0 is defined as the arrival time of the center of the bunch for optimum gun and booster phase. For a booster phase offset of 60 degrees the bunch arrives later.

Longitudinal phase-space measurements
The longitudinal phase-space distribution of the electron bunch of gun 3.1 was determined by measuring the emitted light from a Cherenkov radiator in the dispersive arm using a streak camera. This method measures the correlation of the temporal and momentum distributions. The longitudinal phase space was measured downstream of the gun for different parameters. One example is shown in Fig. 28. Figure 28(a) shows measurement and Fig. 28(b) simulation of the longitudinal phase space. The measured longitudinal phase space is composed of five images taken at different dipole currents. Some discontinuity between the assembled frames is visible. The elongation of the longitudinal distribution and the momentum spread because of the beam size and divergence of the bunch at the entrance of the dipole can be corrected by deconvolution for known distributions. These corrections were performed, but for the correction a constant beam size and divergence along the bunch was assumed. In addition, the measured signal is noisy, so that the deconvolution produces some modulations, visible in the temporal projection of the measured longitudinal phase space. In addition the bunch length measured in the straight section between gun and booster cavity was compared with the projections from the dispersive arm and simulations, as shown in Fig. 28(c). All curves give comparable results. Additionally, the momentum spectrum was measured with a YAG screen in the dispersive section and compared with the projection of the longitudinal phase-space measurement, labeled ''streak'' in Fig. 28(d).
The shape of the measured phase space reproduces the simulation results, but the resolution of the optics, the dipole, and the streak camera limits the resolution of the measurement. A plausible determination of the longitudinal emittance is impossible based on this level of resolution. Upgrades of the spectrometer and readout systems downstream of the gun and booster [77,78] are now under commissioning.

Experimental procedure
Transverse emittance measurements require careful preparation of the photoinjector. Sustaining the proper conditions is a complex multiloop task involving adjustment of sensitive parameters and monitoring a number of machine and beam characteristics. Prior to the emittance measurements, several other measurements must be made as described in the previous sections. Beam-based alignment of the laser spot position on the cathode and of the main solenoid magnetic field must be performed. Laser spot size and pulse length must be checked, along with homogeneity of the transverse laser distribution. The rf phases of the gun and the booster with respect to the laser pulse arrival in the gun cavity and the electron bunch arrival in the booster cavity must be fixed. The laser intensity must be adjusted such that the charge per bunch is 1 nC for the chosen gun phase. The electron beam spot size must be measured as a function of the main solenoid current at the location where the emittance measurement takes place. Finally, mean momentum and the momentum spread from the gun and final mean momentum and momentum spread downstream of the booster must be measured. Some of these measurements (for example, the mean beam momentum) are actually necessary for calculation of the measured emittance, while others are required for consistency and better understanding of the collected data. These tasks are organized at PITZ through the emittance measurement wizard (EMWIZ) software. This custom program interacts through a Qt [79] graphical user interface with the DOOCS system [50] for machine control and ROOT [80] for data analysis and visualization. For interface with the PITZ video system to acquire images from cameras at several screen station, a set of video kernel libraries have been created [30].
The errors shown in this section on emittance measurements represent the statistical uncertainty associated with the measurement. Specifically, each of the measurement components, such as beam rms size, beamlet rms size, and beamlet intensity, is measured several times in succession and the average and standard deviation are calculated. The error bars shown in the graphs are obtained by carrying the standard deviation in the raw measurements through the calculation under the standard rules for error propagation.
These error bars, then, represent to some degree the level of instability in the machine parameters during the data taking process. Laser energy and position jitter (discussed in Sec. II F 2) and rf amplitude and phase stability (discussed in Secs. II G and III C) contribute to the instability in the level of charge, the beam energy, and the beam position on the slits. These errors have subtle correlations and have been studied in simulation. In particular, the effect of beam position jitter at the slit position has been shown to lead to a systematic overestimation of the emittance. For 50-m rms beam position jitter and solenoid settings near the emittance minimum, the overestimation is found to be about 5% [81].
Further, we observe that the method of background subtraction in the beam and beamlet images is quite important for emittance measurements. Background in these images is a result of x rays, scattered beam electrons, dark current, and electronic noise in the video system. A number of algorithms have been developed at PITZ to deal with backgrounds in the captured images including x-ray filtering and multistep next-neighbor filtering to handle noise in the beam tails. These procedures have been analyzed for robustness using simulated measurement data [36]. Because the emittance result is sensitive to the tails of the beam distribution, the step size and scan range for the movable slit has also been analyzed using simulated data, and it has been found that 11 beamlets in steps of 100-200 m is sufficient to bring the errors resulting from phase-space sampling well below the other effects considered [81].
At the level of detail in the phase-space characterization which is now possible at PITZ, another effect must be considered, namely, the deviation between the result of the sheared emittance approach and the standard rms emittance caused by nonlinearity in the phase space. The emittance measurement procedure described in Sec. II H 1 measures the local width of the phase-space distribution, while the standard rms emittance formula measures the full beam divergence and subtracts a linear correlation term. This difference has been calculated for a wide range of PITZ operating conditions. In general, the result is an underestimation of the rms emittance between 10% and 35% using the sheared emittance approach. In the case of the minimum measured emittance at PITZ, the underestimation is about 10%, overcompensating the overestimation resulting from the beam position jitter [81].
Any measurement of electron beam emittance must also deal with the possibility of intrinsic charge cuts in the measurement process, as small tails far away from the beam center can influence the emittance result. All mechanical design, image processing, calibration, and background subtraction has been performed with the aim of minimizing this effect.
The conclusion of the systematic error analysis is that, while estimations of the error vary with the focusing conditions used, the overall systematic uncertainty for the minimum emittance measurements is on the order of 10%. This additional error has to be considered for the emittance results reported in this chapter.

Operation at an accelerating gradient of 40 MV=m in the gun
Experimental optimization of the beam emittance of gun 3.1 was done (in October 2006) at a peak rf power of 3.5 MW. The beam momentum exiting the gun was $5 MeV=c and downstream of the booster $13 MeV=c. The emittance dependence on the solenoid strength was examined as a function of the distance to the cathode for different booster phases. The geometric mean between the two transverse planes is shown in Fig. 29 for a booster phase of À10 degrees with respect to the maximum acceleration phase. Because of limitation in the machine aperture at the low-energy dipole (described in Sec. II E), the minimum emittance versus the main solenoid current could not be demonstrated at the other emittance measurement stations 6.6 and 9.9 m downstream of the cathode. On top of an excepted emittance growth with drift length for lowenergy space-charge dominated beams, this narrow vertical dipole chamber is probably responsible for the significant emittance growth measured at EMSY3. Corresponding electron beam transverse distribution distortions and mea-sured horizontal-vertical emittance asymmetry have been observed as well [36].
For the measurement location 4.3 m downstream of the photocathode a minimum of the emittance was observed at a main solenoid current of 282-284 A and a booster phase of À5 deg with respect to the phase of maximum mean momentum gain. The emittance minimum is shown in Fig. 30, where typical results from a solenoid scan are shown.
As shown in Fig. 30 the lowest normalized projected rms emittance measured according to Eq. (1) in Sec. II H 1 with gun prototype 3.1 was 1:32 AE 0:11 mm mrad in the horizontal plane and 1:43 AE 0:18 mm mrad in the vertical plane (the geometric mean between the two transverse directions is 1:37 AE 0:10 mm mrad). At this minimum, the main solenoid current was 282 A, mean momentum after the gun 4:95 MeV=c, final momentum after the booster 12:85 MeV=c, accelerating phases with respect to maximum mean momentum gain À2 deg for the gun and À5 deg for the booster, and the rms laser spot size on the cathode (initial beam size) was 0.51 mm.
The ASTRA simulation shown in Fig. 30 was performed using 2 Â 10 5 macroparticles. As a goal for the simulation fitting, the measured rms beam size and normalized emittance at 282 A has been chosen. Photoinjector parameters with measurement uncertainty have been varied to fit the beam dynamics simulation result to the measured one. A cathode laser temporal pulse shape of 21.1 ps FWHM, 6.7 and 6.5 ps rise and fall times, and round uniform transverse profile with 0.55 mm rms size was applied as input for the beam dynamics simulations. The simulation rf gradient of 41:05 MV=m at the gun cavity with a field ratio (cathode to the full cell) of 1.04 corresponds to a beam momentum of 4:84 MeV=c for gun phase À2 deg off crest. The fit to the measured momentum after the booster cavity produced a booster maximum field of 14:8 MV=m, and its phase corresponds to the measured À5 deg off crest.
The operation conditions from the measurement with the best results from gun prototype 3.1 were reapplied to gun 3.2. The rf power in the gun was tuned to deliver the same maximum electron beam momentum gain as was measured for gun prototype 3.1. The phases of the gun and booster, as well as the booster gradient and the cathode laser parameters, were kept the same. The comparison between the two cavities is also shown in Fig. 30. Although there is agreement within the error bars between the minimum values (the geometric mean between the two transverse directions for the gun 3.2 minimum at a solenoid current of 290 A is 1:59 AE 0:10 mm mrad), there is a discrepancy between the main solenoid currents at the emittance minima of about 8 A. This large discrepancy is still to be understood and could be related to uncertainty in the rf field distribution during operation of gun prototype 3.2. Another explanation could be possible solenoid fabrication errors. Because of damage of the original solenoid used with gun 3.1, it was replaced with a new magnet of the same construction, but detailed magnetic measurements were not performed for the new solenoid.
At the emittance minimum for gun 3.1, a detailed scan of the local divergence distribution across the beam was done using fine steps with the single slit to reconstruct the twodimensional phase-space distribution in the transverse plane. The result for the horizontal phase space is shown in Fig. 31.

Beam dynamic simulations of the PITZ-1.6 setup
In order to estimate the reduction of the projected emittance with an increase of the rf gradient in the gun, a series  of beam dynamics simulations have been performed. For these simulations an upgraded ASTRA version has been used. The corresponding space-charge routine modification in February 2009 resulted in a general reduction of simulated emittance values. As an important input for the ASTRA simulations, the following parameters have been chosen: a flattop temporal profile of the cathode laser with 24 ps FWHM and 7 ps rise and fall times (as in the streak camera measurement shown in Fig. 8) and assumed kinetic energy of the electrons at the photocathode (for thermal emittance calculation) of 0.55 eV [68].
The longitudinal center positions of the main solenoid and the preliminary TESLA booster were fixed at the actual values of the PITZ-1.6 setup: 0.276 and 3.0 m downstream of the photocathode, respectively.
The ASTRA optimization considers the gun phase (rf phase when the drive laser strikes the cathode), the main solenoid peak field (with the magnetic field at the cathode cancelled by appropriate current in the bucking solenoid), rf gradient in the booster, rf phase of the booster relative to the gun, and the transverse rms size (in each transverse direction) of the laser spot on the photocathode. An rf-gun field ratio (cathode to the full cell) of 1.03 was assumed for these simulations, which corresponds to the measured field profile in the gun cavity 3.2 (Table I).
The goal for the optimization studies is a minimum projected emittance 4.3 m downstream of the cathode (location of the first emittance measurement station) for a nominal bunch charge of 1 nC. The results of the optimization for the cases 42 and 60 MV=m gun gradients are plotted in Fig. 32. The corresponding machine parameters are summarized in Table V. The simulated slice emittance (transverse emittance for a longitudinal section, or slice, of the electron bunch) along the electron bunch at the same location (4.3 m downstream of the cathode) is shown in Fig. 33 together with beam current profiles for both gun gradients.
The beam dynamics simulations have demonstrated that the increase of the gun gradient from 42 MV=m up to 60 MV=m results in 27% projected emittance reduction. To optimize the PITZ setup with an increase of the gun gradient, the main solenoid current should be increased and the laser spot size should be decreased. This corresponds to   a reduction of the thermal emittance, therefore the slice emittance is also reduced. In order to study the influence of the initial kinetic energy of the electrons at the cathode corresponding simulations have been performed. Increasing the initial thermal kinetic energy at the cathode from 0.55 to 1.5 eV in simulations resulted in the optimized transverse emittance values of 1.31 and 0.95 mm mrad for 42 and 60 MV=m, respectively. Simulations also showed that the increase of the gun gradient results in a shortening of the electron bunch and increase of the beam peak current.
The dependence of the normalized transverse emittance versus booster gradient is illustrated in Fig. 34, where the emittance 4.3 m from the cathode is plotted as a function of the momentum gain in the booster for the gun gradients of 42 and 60 MV=m. The booster position for these simulations was fixed close to the optimum value for 42 MV=m. According to the simulations, a reduction of the booster momentum gain at a gun gradient of 60 MV=m should deliver the minimum emittance.

Operation at an accelerating gradient of 60 MV=m in the gun
To reach the beam quality requirements for the European XFEL, gun prototype 3.2 was conditioned to obtain an accelerating gradient of $60 MV=m. The resulting mean beam momentum downstream of the gun reached 6:5 MeV=c. The narrow machine aperture at the lowenergy dipole prevented experimental emittance optimization at the second and third EMSY stations; therefore, the emittance was optimized for the first station, 4.3 m from the cathode. We followed the single-slit-scan procedure described above, varying the main solenoid current around the condition of minimum beam size at EMSY1. The energy gain from the booster cavity was varied such that the final beam momentum was 9.5, 11.0, 13.0, and 14:5 MeV=c. Limitations in the capacity of the booster water cooling system restricted the measurements to this momentum range. In addition, the rms laser spot size on the cathode was varied to be 0.36, 0.42, 0.50, and 0.56 mm to check the numerical emittance optimization described in the previous section. Smaller laser spot sizes were not tested due to limited lifetime of the cathodes.
The optimization series, with more than 100 emittance measurements, shows an overall trend toward smaller emittances at smaller laser spots on the cathode. The minimum emittances were obtained for an rms laser spot size of 0.36 mm, which corresponds to the expectations from simulations (Table V). But the booster gradient was pushed to the maximum accessible value. In Fig. 35    tum of the beam downstream of the gun, rf phase set for maximum mean momentum gain at the gun and the booster, and laser rms spot sizes in the horizontal and vertical directions of 0.353 and 0.376 mm. Figure 35 shows the lowest emittance results obtained at PITZ until 2008. At the minimum, the normalized rms projected horizontal and vertical emittances are 1:25 AE 0:19 mm mrad and 1:27 AE 0:18 mm mrad, respectively. Multiple measurements around the emittance minimum in Fig. 35 show repeatability of the results better than 10% peak to peak.
Comparing the measured emittance dependencies with results of beam dynamics simulations shows that the measured projected emittance for both gun gradients is higher than the simulated one. One part of the discrepancy could be explained by the thermal emittance contribution. The value of 0.55 eV assumed in simulations for the average kinetic energy of electrons emitted from the cathode (see Sec. III F 3) is less than the measured value of up to 1.4 eV as discussed in Sec. III B 3. But as it has been mentioned above, an increase of the kinetic energy from 0.55 to 1.5 eV resulted in a simulated emittance growth of only 16%. Another source of the discrepancy could be nonuniformity of the transverse laser distribution and the QE map of the used cathodes. Overall beam jitter pushes the measured emittance also to higher values. Additional uncertainty is brought by a limited knowledge of the machine conditions during the emittance measurements as obvious from the striking difference in the emittance dependence on the booster gradient. For fixed laser parameters, gun gradient and phase, and booster phase, the minimum emittance obtained from a scan of the main solenoid current is shown in Fig. 36 as a function of the momentum gain in the booster. Simulations predict significantly lower booster gradients for delivering minimum emittance (see Table V and Fig. 34 for 60 MV=m peak field at the cathode) and show an opposite trend for increased booster gradient. This discrepancy is not yet understood but could be related to a nonuniform field distribution in the booster due to the limited cooling when operated with significant rf power. These observed discrepancies between simulations and beam dynamics simulations point out the importance of the experimental optimization of the entire photoinjector setup. Another important aspect is the improvement in theoretical understanding of the space-charge dominated beam dynamics with simulation tools.
For the experimentally determined emittance minimum, a very detailed scan with the single-slit technique, using a separation as small as 25 m between the individual slit positions, was also performed. The horizontal phase-space distribution for this scan is shown in Fig. 37. The ultimate resolution of our current system is estimated to be 36 m Â 15:4 rad.
The shape of the reconstructed transverse phase space in Fig. 37 displays nonlinearities in its shape which are characteristic of photoinjectors. Periodic modulation in the depicted measured phase space is assumed to be due to instabilities of the electron beam (mainly position drift). The rf systems to power the gun and booster are operated at their power limits and without rf regulation (pure feed forward). Also the water cooling of the booster was run at its maximum. All these factors cause instabilities of the rf phases, resulting in beam energy drift. Steering magnets along the beam line couple this energy drift with position drift of the electron beam at the position of the slit mask,  leading to displacements of beamlets. The quoted emittance numbers and phase-space distributions include the smearing effect of this instability.
If a cut is applied to this data to remove the lowest density regions of the phase space, electrons which presumably would not contribute to the lasing process in an FEL are removed. Because these electrons are on the edges of the phase-space distribution, they contribute greatly to the rms emittance. Figure 38 gives the results of applying this procedure to the measured phase space shown in Fig. 37. As the figure shows, a phase-space density threshold that eliminates 10% of the charge in the bunch results in an rms projected emittance of $0:9 mm mrad. A contour drawn at this threshold phase-space density, shown as a white line in Fig. 37, demonstrates that even with this cut, not all outlying electrons have been excluded from the emittance calculation. Therefore, the relevant emittance for operation of an FEL using this electron beam is probably even lower. The measured data presented here demonstrate the first time, experimentally, that the very demanding requirement on the transverse emittance for the injector of the European XFEL of 0.9 mm mrad can be reached.

IV. SUMMARY AND OUTLOOK
This paper has described the detailed characterization of two laser-driven rf guns at the Photoinjector Test Facility at DESY, Zeuthen site (PITZ). Gun prototype 3.1 was operated at a peak cathode electric field of about 43 MV=m yielding a minimum projected normalized transverse emittance of 1:37 AE 0:10 mm mrad (geometrical average of both transverse planes) at 1 nC bunch charge and 12:8 MeV=c beam momentum after the booster (5:0 MeV=c was measured after the gun). In addition to the statistical error given for the transverse emittance measurement, we estimate that the systematic error in the experiment is on the order of 10%. Gun prototype 3.1 was operated up to an rf pulse length of 900 s at 10 Hz repetition rate and 3.5 MW peak power yielding an average rf power in the gun of 31.5 kW and 0.9% duty cycle. These results exceed the requirements of FLASH, and this gun now serves as a spare gun for that machine.
Gun prototype 3.2 was operated at about 60 MV=m peak field at the cathode yielding a minimum projected normalized transverse emittance of 1:26 AE 0:13 mm mrad (geometrical average of both transverse planes) at 1 nC bunch charge and 14:5 MeV=c beam momentum after the booster (6:44 MeV=c was measured after the gun). Since maximum effort was made to minimize intrinsic cuts in the measurement and analysis procedure, the quoted emittance results are considered as 100% rms emittance. If a cut is applied to eliminate 10% of the bunch charge by removing the lowest density regions in the phase-space distribution, an rms normalized projected transverse emittance of about 0.9 mm mrad is obtained. This is the first time that the stringent requirements on injector beam quality for driving the European XFEL have been demonstrated experimentally.
One other important result of the photoinjector characterization period reported here is the measurement of thermal emittance and the cathode characterization using XPS. Emittance measurements at pC charge levels, short laser pulses, and a peak gradient at the cathode of about 60 MV=m yielded thermal emittance numbers of around 0.55 mm mrad for the standard rms laser spot size of 0.35 mm. This is about 70% larger than expected from a simple band gap model of the Cs 2 Te cathodes and stresses the importance of an overall experimental optimization of the photoinjector and the laser spot size at the cathode, in particular. XPS studies showed significant degradation of the Cs 2 Te film on used cathodes. Both cathode-related studies will be continued and extended in the future. The standard operation of gun prototype 3.2 was limited to an rf pulse length of 140 s due to high dark current emission. Later rf conditioning results of a next-generation rf gun with dry-ice surface cleaning (not discussed in this paper) have demonstrated a reduction of the dark current by more than a factor 10 and promise operation with long rf pulses at high gradient in the future.

ACKNOWLEDGMENTS
This work has been partly supported by the European Community, Contracts No. RII3-CT-2004-506008 and No. 011935, and by the ''Impuls-und Vernetzungsfonds'' of the Helmholtz Association, Contract No. VH-FZ-005.