Fabrication and vertical test experience of the European X-ray Free Electron Laser 3.9 GHz superconducting cavities

We report the experience of the production, processing and qualification testing of the superconducting radio frequency cavities at 3.9 GHz for the third harmonic system at the European XFEL (EXFEL) injector. The rf structure concept, originally developed for the FLASH FEL facility, was adapted to the new interfaces provided by the EXFEL design and the cavities were procured from a qualified vendor, delivered ready for the testing at the INFN infrastructure. A total of 23 cavities, three prototypes and two batches of 10, have been realized and tested up to specifications.


I. INTRODUCTION
The European XFEL (EXFEL) injector includes a radiofrequency section operating at the third harmonic of the main linac frequency (1.3 GHz) to manipulate the longitudinal phase space after the first acceleration stage, in order to deliver high current beams with sufficiently low emittance for the production of 1 Å FEL light to the experimental users [1]. The third harmonic section consists of a single module with 8 SRF cavities at 3.9 GHz, providing a maximum voltage of ≈40 MV, and a quadrupole magnet package. The module is installed and in regular operation in the injector building of the complex since December 2015, and a second module is in final assembly stage as a spare component of the facility.
Section II summarizes the system and cavity design and Sec. III the experience of the cavity production, including the fabrication and preparation procedures developed to meet the specifications. Finally Sec. IV reports the successful qualification testing at LASA of all cavities for the two modules [2,3].

II. SYSTEM AND CAVITY DESIGN, PERFORMANCE GOALS
The first design of a possible 3.9 GHz superconducting radiofrequency (SRF) cavity for the FLASH VUV facility was proposed at DESY in 2002 [4] and further optimized by FNAL [5] for the development of the FLASH third harmonic system (ACC39), which was brought into operation in 2010 [6]. In 2007 INFN and DESY agreed to procure the third harmonic EXFEL system as a joint inkind contribution to the Project. The 3.9 GHz EXFEL system shares the same rf cavity design of the FLASH system, although a number of fabrication details, cavity interfaces and ancillary components have been substantially modified in order to profit from existing procedures and components developed for the 1.3 GHz cavities driven by the EXFEL or the ILC project, or to reflect the different physical layout of the EXFEL cryomodules with respect to the modules installed at the FLASH injector stage.
The main design choices of the EXFEL third harmonic system and of its SRF cavities are listed in Table I. FLASH hosts 3.9 GHz cavities with two different HOM coupler designs, one has been scaled from the 1.3 GHz main linac cavities and the other was developed in order to eliminate multipacting phenomena and to decrease thermal loads on the antenna, effects which limited early test performances at FNAL [7]. The EXFEL cavity design uses the more recent design version.
The FLASH linac is composed of cryomodules of two different types, with different cryogenic piping locations within cross sections of different sizes. The changes were performed in "generations" after successive iterations aimed at design simplification and cost reduction during the development work of the TESLA International Collaboration [8]. Currently Type II and Type III cryomodules are located in the linac tunnel. The first accelerating section of the FLASH linac (ACC1), after which ACC39 is situated, is of the older Type II, meaning a large vacuum vessel (1.2 m diameter) and an internal piping distribution different than in the standardized 38-inch vessel of the Type III. Since ACC39 is cryogenically connected to the ACC1, the transverse cross section of the FNAL module has been designed to match that of a Type II. The EXFEL module design has been derived from the Type III, in particular concerning the relative location of the He Gas Return Pipe (HeGRP, acting as a structural backbone for the entire cold mass), the 2-phase He cooling line and the cavity string. The design of the EXFEL third harmonic cryomodules reflects this important change in the cross-section and, in particular, the ACC39 layout of the dressed cavity package (cavity þ He vessel and 2-phase cooling line) had to be heavily revised to account for these different interfaces.
Additional modifications were required to the system design by beam dynamics considerations. A superconducting magnet package-consisting of a quadrupole, steering correctors and a beam position monitor (BPM)-was placed at the beginning of the cavity string in order to provide a quadrupole focusing doublet before the third harmonic section and steering capabilities in both transverse planes. Furthermore, the arrangement of cavity orientation in the string was optimized in order to provide a complete cancellation of the offset-independent part of the coupler dipole kicks [9]. The chosen layout minimizes the emittance growth due to the dipolar component of the field in the coupler region of these small structures.
The coaxial tuner used on the FNAL ACC39 module was scaled from the INFN blade tuner design originally proposed for the TESLA collider [10]. Progresses at INFN on the ILC blade tuner concept led to the development of a simpler, lighter and cheaper device (the "slim" tuner), that was extensively characterized [11].
For the XFEL third harmonic module the "slim" tuner design has been scaled to the 3.9 GHz cavity dimensions [12]. Due to the much stiffer mechanical behavior of the 3.9 GHz structures and the moderate accelerating gradients needed for their operation, no fast compensating tuning action was needed to handle Lorentz force detuning effects under pulsed operation.
In addition to the necessary changes caused by a revision of the cavity interfaces, other variations have been made to the FNAL fabrication procedure in order to conform either to ancillaries developed for the EXFEL main linac components (like rf pickups and HOM antennas) or to profit from the consolidated expertise of cavity vendors qualified for the main linac cavities production. Figure 1 illustrates the cavity layout and highlights the modifications with respect to the original FLASH design.
In particular, all cavity flanges have been standardized to the same flanging system of the main linac, based on Al "diamond-shaped" gaskets, in order to use the same feedthrough components. Other changes were related to the fabrication process, in order to streamline the electron beam weld (EBW) procedures: the end cone of the original cavity design has a steeper inclination in order to leave access to a 90°equatorial EBW of the end cells and all equatorial welds are performed with a weld lip preparation that allows the welding operation in a single load step of the EBW machine, avoiding temporary tack welding procedures and the long waiting times for additional EBW load operations.
A final modification was then introduced to streamline the cavity alignment procedure during the assembly of the EXFEL module. Similarly to the fabrication procedure followed for the main linac cavities, reference rings and planes were machined at the cone transition of the cavity helium vessel to produce a suitable definition of the cavity mechanical axis. All cavity mechanical surveys use this axis, which is then transferred to a set of reference boreholes on the cavity end flanges to perform the string alignment before the module completion.
The system operation at 40 MV voltage requires a moderate accelerating gradient in the structures of approximately 15 MV=m. In order to assess the nominal performance the acceptance goal of vertical testing was set to a field-emission free level at least 20% higher than this level. This moderate field value can be achieved with a standard

A. Cavity prototypes
Soon after the start of the EXFEL project construction phase and to prepare for the implementation of all changes described in the previous section, a set of three preseries cavities was ordered to a qualified industrial vendor (company Ettore Zanon SpA, EZ), which was responsible for the mechanical production and the rf-grade chemical processing of their surfaces. This preseries was also needed for the development of all the proper fabrication and processing procedures in order to meet the specifications during the subsequent production of the series components for the facility. The three cavities were also used to commission the preparation and vertical test facility deployed at LASA, described in Sec. IV.
A great experience was gained with the construction, preparation and testing of these structures and the several rf tests performed-with scattered but consistent results [13]-and the upgrades on the VT facility allowed us to improve the measured performances and the test throughput, in preparation of the testing activity for the accelerator components.

B. Production of the series cavities
Two additional batches of 10 cavities each were then ordered to the same vendor in order to provide components for the EXFEL third harmonic injector module (X3M1, which was installed in the tunnel in September 2015 and operated during the commissioning run which started in December 2015) and to prepare a complete spare system for the facility (X3M2, currently under assembling stage). With these two batches a total of twenty-three 3.9 GHz cavities have been produced and tested for the EXFEL, showing a steady decrease in the uncertainties in the mechanical fabrication and treatment processes, achieved with a better understanding and control of the fabrication steps and preparation procedures.
The procurement of the EXFEL 3.9 GHz cavities followed the same "build to print" approach of the main linac cavities [14], with no guaranteed performance requirement, and a three step acceptance procedure supervised by the orderer aggregated all quality control documentation ensuring the completion of each fabrication and processing step according to the INFN tender documentation. The fabrication of the two batches for the series cavities benefited also from an increased cleanliness and quality control procedures available at EZ with the deployment of the XFEL main linac cavities production line [14], which was not available at the time of the prototypes fabrication.
C. Cavity fabrication in the context of the European pressure equipment directive All superconducting components of the EXFEL linac need to comply with the European pressure equipment directive (PED, 97=23=EC), under the Project-defined pressure conditions for a maximum allowable working pressure (MAWP) of 4 bar in the 2 K circuits. The most restricting procedure for Category IV vessels has been conservatively followed, according to the Module G (EC Unit Certification) procedure for the 3.9 GHz structures. As the cavity construction materials (Nb, Ti and NbTi alloy) are not listed in the harmonized standards for the fabrication of pressure vessels, a particular material appraisal (PMA) for the fabrication of the resonator was issued by the notifying body, together with the strength calculations [15], design examination and the approval of fabrication drawings. Furthermore all standard provisions for the fabrication of pressure vessels were followed, as material certification according to EN 10204, the traceability of all subcomponents and components at all stages, starting from the raw material to the final cavities. All welds on pressure bearing parts followed a weld qualification process (with the preparation of several weld specimens) with the notifying body and cavity fabrication was performed under its supervision, including a final pressure test of the helium tank space (up to 1.43 times the MAWP, according to the norm). A full strength analysis was performed at INFN according to the EN 13445-3 norm (Appendix C) by means of finite element methods (FEM) in support of the PED certification process [15] and parallel to the activities performed by the notifying body. The most stressed region for the extreme loading conditions defined by the MAWP was found at the cavity cell irises, with maximum Von Mises stresses reaching 136 MPa, well above the 50 MPa yield strength (R p0.2 ) chosen by the notifying body for the Nb RRR300 material, and thus requiring further analysis. The FEM model takes also into account the weld reduction measured by weld specimens during the weld qualification procedure. The stress linearization analysis procedure was used to assess this case by decomposing into a general primary membrane stress and secondary membrane plus bending stresses, and to be able to verify that these satisfy the different limits imposed by the norm, as shown in Table II. With the outcome of the stress analysis and the examination of all fabrication drawings, the design was approved by the notified body.
Even if a similar certification path has been followed for the 1.3 GHz cavities of the main linac [14], all formal certification steps (e.g. PMA, design examination and weld qualification) had to be officially released before the beginning of critical fabrication steps, leading to strong delays for the start of the cavity production.

D. Development of the cavity frequency preparation strategy
High frequency SRF structures have a strong sensitivity to geometry variations and preparation processes. Furthermore, the small size of the 3.9 GHz resonators required several adaptations to the processing infrastructure used for cavities of much larger volumes, to optimize and stabilize all the process parameters (e.g. buffered chemical processes, BCP and high pressure rinsing, HPR). Many of the sensitivity parameters depend on the actual fabrication and processing infrastructure, therefore not all the FNAL 3.9 GHz experience for ACC39 could be applied without proper verification, in order to reach the desired cavity frequency/length and performance goals.
The preseries cavities produced during the development phase allowed us to develop a fabrication and treatment strategy for the series, by cooperation with the industrial qualified vendor. The first batch of series cavities for the 3.9 GHz section were fabricated, processed and tested according to the experience of the preseries, integrating the slight variations of the weld preparation and execution procedures needed for full PED compliance agreed with the notified body. The procedure included the standard  preparation of subcomponents foreseen for elliptical cavities fabrication, and its main steps in order to achieve the rf goals are summarized in Table III. During all these operations rf and process parameters were monitored and specific inspection activities (e.g. optical inner surface inspections with a high resolution camera) were performed to avoid possible contaminants and large geometrical defects (like weld droplets or inclusions, with dimension of the order of 0.1 mm or larger) that could prevent nominal performances. The two optical inspection stages, right after fabrication and after the bulk BCP process were useful in both batches to perform local grinding to eliminate features seen on the surface of 7 cavities (3 in the first batch and 4 in the second) before proceeding to the subsequent operations. Six out of the seven grinding operations were performed after the first inspection after fabrication, mostly close to the equator weld seams (only one to cure scratches at one iris) and one cavity showed a defect at the second inspection after the 800°C annealing stage (and thus was subjected to an additional short 15 minute BCP stage). Figure 2 shows the occurrence of one droplet close to one equatorial weld in cavity 3HZ004, and its evolution after the local grinding stage and after the bulk BCP removal.
A correct estimate of all the frequency effects is important in order to reach the correct operating frequency within the design tuner range. Table IV shows the cavity operational parameters and the cavity frequency sensitivities to different conditions during its lifecycle, as assessed with the two component batches. Error bars derive from the production data. Figure 3 shows the frequency goals during the preparation stages of the two cavity batches and the measured ranges of the production (maximum and minimum deviations of the measured values). Due to the rather large spread of the BCP treatments sensitivities and the difference with the treatment experience of the prototype series, the frequency goals and treatment durations were varied from the first batch to the second, with the aim to stabilize the cavity frequencies after the chemical treatments. An enhanced control of the etching process parameters was also implemented after the first treatments of the first batch. A better stabilization was partially achieved for the bulk BCP phase, but only marginally at the final BCP process. Details on the processing experience are presented in a separate subsection.
As a consequence of the relatively large spread in the final BCP sensitivity values reported in Table IV,   frequency goal was met within the useful range (shown in Table V) only after an additional tuning of a few hundreds kHz of several cavities in both batches after their integration in the tank. Analysis of the bandwidth modification before and after this operation suggests no influence on the achieved field flatness levels. In spite of an enhanced control over the BCP process parameters at the vendor and of the revision of the frequency preparation procedure (reducing the duration of the final BCP steps in order to limit the impact of the spread in the cavity response), it was not possible to avoid the postintegration tuning step in the second batch, due to an insufficient stabilization of the last "final BCP" process in order to meet the target of the production phase. Tables V and VI summarize the results and the strategy for reaching the correct frequency at the nominal cavity length in both batches by showing the frequency goals (and measured and expected variations) at the main steps of the cavity preparation cycle, from the fabrication to the operating conditions.

E. Analysis of the mechanical fabrication experience
An important ingredient to achieve the frequency goal after fabrication at the correct cavity nominal length is the good characterization of the effects of the fabrication processes on the rf behavior of the components (i.e. weld shrinkages and their stability, influence of weld seam perturbations).
This information is needed in order to prepare the subcomponents (half-cells, dumb-bells, and end groups) with the proper provisions to both compensate the weld shrinkages and to allow rf-based trimming operations. Moreover, a control of the execution of the correct trimming instructions with small errors and a great stability is needed in order to limit the spread in the frequencies of the fabricated cavities. During the cavity production all the mechanical, rf, and process steps (dimensional control, rf measurements, trimming instructions, chemistry process parameters and outcomes, …) were documented at the subcomponent (HC), component (DB and EG) and cavity level in certificates, for the production control and supervision by the vendor and by INFN.
The analysis of the different production batches (preseries, first series components and second series components) shows how such a process monitoring was beneficial  3. Frequency ranges foreseen in the cavity preparation sequence (black dots and yellow boxes) and measured data (with error bars) during the production of the first (above) and second (below) cavity batches. From the first to the second batch the frequency preparation goals were changed no pretuning was performed after the mechanical fabrication. for the stabilization of the process and the development of the frequency preparation procedure shown in Table VI. As a result of an increased understanding and control of the whole process, the intermedial frequency goals were modified for the second series and the final frequency goal was lowered in order to provide a slightly higher tuner preload in operation. Figure 4 shows the error in the implementation of the trimming instructions for the dumb bells in the three productions series (3 prototypes, in red, 10 series cavities in blue and 10 spare cavities in green), as retrieved from the DB certificates. A clear decrease in the spread of the datapoints, reaching the foreseen 50 μm tolerance around its average value, was achieved with better quality control and a revision of the machining procedures and tools used in the trimming process. Figure 5 shows the equatorial weld shrinkage experienced in the 23 cavities produced so far. A stabilization of the fabrication experience can be seen also from this trend, with a constant reduction of the weld shrinkage uncertainty, again obtained with a better quality control over the preparation of the equatorial weld tooling. The cavity in the first series that experienced a lower shrinkage than average, 3HZ007, had a correspondingly higher frequency than the expected nominal value. A clear cause for this anomalous value could not be found, but it was likely due to the insufficient spring loading of the tool used for the equatorial weld in the electron beam welding (EBW) machine at the vendor.
Finally, Fig. 6 shows the cavity frequencies after the mechanical fabrication stage, for all the cavities of the three production batches, along with the refinement of the fabrication goals in the three activities. The frequency goals at each fabrication stage were revised with the increasingly better assessments of the production parameters (like the weld shrinkages and the frequency sensitivity to the chemistry). The decrease of the uncertainties shown in Figs. 4 and 5 led to a closer match to the goal and to a decrease of the final spread of the cavity frequencies after mechanical fabrications. The labels in the picture show the average frequencies of all three production and the full range of the measurements (maximum-minimum frequency). The pre-tuning step after mechanical fabrication has been avoided in the second production batch for the cavity spares, due to the somewhat better agreement with the envisaged fabrication goal of Table VI (as can be also graphically noted in the bottom plot of Fig. 3), and the fact that the subsequent field flatness tuning stage is anyhow needed to recover the frequency spread after the bulk BCP process. FIG. 5. Equatorial weld shrinkage (per weld seam) experience in the three production batches of the 3.9 GHz EXFEL cavities. In the labels the averages and uncertainties of each data set.

F. Analysis of the processing experience
The control of the frequency goals after the mechanical fabrication stages shown in Table VI requires a good estimation and a monitoring of the frequency shifts during all processing stages of these sensitive resonators. The cavities of the prototype production(3HZ01-3HZ03) were prepared in a small ISO7 clean room at the vendor and processed in a small dedicated etching cabinet [16], while all BCP treatments of the two batches for the series cavities (3HZ004-3HZ023) were performed in the large "industrialstyle" etching facility which was deployed at the vendor for the treatment of the main linac EXFEL cavities at 1.3 GHz [14]. Due to the high cavity frequency sensitivity to any geometrical change, the bulk BCP treatment was split in three steps, flipping the vertical cavity orientation at each treatment as a provision to minimize longitudinal etching variations. All BCP treatments are performed with an acid mixture of HF (40%), HNO 3 (65%) and H 3 PO 4 (85%) in a 1∶1∶2 volume ratio, chilled in order to limit the temperature of the cavity during the treatment below 15°C, and with filling and emptying times shorter than one minute. A maximum concentration of 4 g=l of Nb in the acid mixture was required for the etching of all the internal cavity surfaces. A typical etching rate in the range of 1-1.6 μm= min was achieved in all treatments. (i) The cavity inner surface layer which has been in contact with mechanical tools, was removed in the first (shorter, typically 30 minutes) step performed in the etching cabinet dedicated to the "external BCP" of the 1.3 GHz production series. This provision was taken to avoid polluting the BCP mixture used in the final surface preparation ("flash BCP") of the 1.3 GHz cavities with possible traces of contaminants from the mechanical workshops. (ii) The second and third "bulk BCP" steps (of equal duration, typically 45 minutes) were performed in the same cabinet used for the "flash BCP" of the 1.3 GHz production. Between all treatment steps a rinsing with ultra pure water (UPW, up to 18 MΩ cm conductivity), weighting, drying, and frequency control in the clean environment of the etching facility was implemented in order to monitor the frequency response of the cavity to the etching process. A short (45 minutes) high pressure rinse (HPR) cycle with 100 bar UPW is then performed at the end of the bulk removal steps. Figure 7 shows the overall frequency sensitivity and the average surface removal for all cavities in the three production batches after the three "bulk BCP" steps. The average surface removal is computed from the weight difference before and after the treatment.   6. Frequencies of the cavities after mechanical fabrication, for the three production batches. In the labels the averages and the uncertainties of the frequencies measured in each production batch. The dashed black line shows the production goal, which was revised in the cavity frequency preparation procedure after each iteration pass with the better knowledge of the fabrication and treatment parameters and cavity responses.  Due to the large operating flows of the BCP systems designed for the larger volume 1.3 GHz cavities, it was initially difficult during the first batch of the series production to operate under stable conditions of cavity frequency (and passband) response to the treatment, indicating variations of the relative etching between iris and equator during different treatments. A dedicated smaller acid pumping system for the smaller 3.9 GHz cavities was installed to decrease the acid flow to the foreseen value of a few l=m. It was anyhow difficult to obtain a stable etching process, as it can be seen by the large variation of the cavity frequency response (expressed in terms of variation of the fundamental mode frequency per removed micron and average thickness removal) shown in the corresponding points of Fig. 7. A precise acid flow meter (installed in the "flash BCP" cabinet) was introduced during the processing of the first batch to better regulate the acid flow, in order to stabilize the unexpected treatment response that was experienced during the process, as clearly shown in Fig. 7. During the treatments of the cavities up to 3HZ010 the acid flow rate was coarsely regulated in a wide range at higher speeds (2-4 l=m), resulting in a deviation from the expected factor of two between the nominal removal at the iris and equatorial regions and, consequently, in a wide spread of frequency sensitivity and thickness removal, as shown by the figure. A more precise regulation at the nominal flow of 1.5 l=m allowed the stabilization of the process response.
The large frequency deviations caused by the spread of frequency sensitivity and thickness removal of the bulk BCP of the first batch were later recovered by the final tuning stage in the cavity preparation sequence. Since the cavity has a large longitudinal tuning sensitivity (see Table IV, 2.3 MHz=mm), the post-bulk BCP tuning stage did not prevent meeting the cavity length tolerances, as shown in Table V. Figure 8 shows the overall frequency sensitivity and the average surface removal for all cavities in the three production batches after the final "final BCP" step. Also in this case a rather large variation of the frequency sensitivity coefficient can be observed. This spread led to the fact that the cavities did not meet in both batches of the series production the correct frequency range foreseen by the cavity preparation procedure outlined in Table VI, as it can be also clearly seen from Fig. 3. The revision of the preparation procedure implemented for the second batch increased the "bulk BCP" removal and decreased the "final BCP" in order to reduce the impact of the spread of the coefficients after the field flatness tuning process. This provision was not sufficient to fully achieve the production goal. Moreover, two cavities of the second batch (3HZ016 and 3HZ020) resulted in anomalous frequencies responses to the last "final BCP" stages, though no process control parameter of the etching process (like temperatures, flows, duration) was observed to deviate from the nominal range.
A further tuning step, performed after the cavity integration in the helium vessel, was implemented to correct the frequencies of the cavities which were not meeting the production goal and would result outside the foreseen tuner range at cold. An analysis of the deviation of the fundamental bandwidth spectrum before and after this frequency correction after integration shows no relevant deviation from a linear decrease of all bandwidth modes, indicating a minor impact on the field flatness levels.

IV. VERTICAL ACCEPTANCE TESTS
A. The LASA testing facility The LASA treatment and vertical testing facility [17] was adapted for the characterization and rf acceptance of  the EXFEL 3.9 GHz structures. A small (9 m 2 ) ISO4 clean room allows the cavity preparation to the tests. A slowpumping/slow-venting system allows pumping and venting cavities with a limited mass flow to avoid dust particle movements [18].
The vertical insert provides the support for two cavities under test, see Fig. 9, to increase the test rate of the EXFEL 3.9 GHz cavities.
The vertical test cryostat (4.5 m long, 0.7 m diameter) is surrounded by a mu-metal magnetic shield, which reduces the absolute value of the residual magnetic field to < 10 mG in the cavity region. A proportional counter, located on the top flange, is used to monitor X rays for field emission assessments.
The cryogenic installation operates in batch mode, where liquid He is provided in dewars from the local liquefying plant and the He gas is recovered from the cryostat, warmed to room temperature and stored at high pressure before purification for further liquefaction. A total inventory of approximately the equivalent of 2200 liters can be handled at any time, and the cryogenic capacity allows operation at 2 K with a 40 W continuous load on the bath.
To avoid sparking we avoided the use of any commercial feedthrough in the low pressure vapor environment of the cryostat top flange, and used a custom-made vacuum-proof solution [19]. All the cavity transmitted signals, from the cavity pick-up (PU) field probe, and from the high order modes (HOMs) are carried out from the cryostat through high screened cryogenic coaxial cables. The cavity accelerating field and the quality factor Q 0 are derived through the accurate readings of the input and reflected powers and all the cavity transmitted powers, both in continuous wave (CW) and pulsed mode. When the dissipated power in the cavity exceeds approximately the 2 W power level the RF measurements are switched to pulsed mode (typically 0.5 Hz, 25% duty cycle) to limit the helium consumption.
All the readout instrumentation is interfaced to a LabVIEW ™ control program that allows setting up the pulse timings and the calibration constants for the correct signal readouts. The program acquires data for the different physical measurement sections (surface resistance as a function of temperature, R s vs. T, power rise curves of the quality factor as a function of the accelerating field, Q 0 vs. E acc , characterization of the HOM notch filters).
Cernox resistors placed on the external cavity surface (typically on each HOM coupler bodies and at a few equator locations determined by the analysis of the optical inspection) measure the temperature during the cooldown and allow to detect local heating of the end groups and the possible occurrence of cavity quenches. Other thermal sensors like CLTS, PT100 and PT1000 are placed in the cryostat to monitor its thermal behavior during cooldown. The test facility is also equipped with a second sound system [20] for the 3D determination of the cavity quenches.

B. Cavity preparation for test
The 3.9 GHz cavities were shipped filled with > 18 MΩ cm UPW to INFN Milano-LASA, and arrived within 12 hours after the last HPR with UPW following the "final BCP" removal of 20-30 μm at the vendor premises and before their integration into the helium vessels. All cavity flanges were blanked off, except the two beam pipe flanges, which were equipped with Teflon valves for the water filling.
At the reception in LASA, the cavities were brought to the clean room, emptied from the transport water, which showed a 2 MΩ cm resistivity value. When they were connected to the UPW plant and filled again the nominal resistivity value of ≈18 MΩ cm of the output flow was reached in approximately half a minute. All flanges were then removed and the cavity, equipped with a holding frame for the HPR system, was rinsed 3 times (each with a 45 minutes duration) and let dry overnight. On the subsequent day, the cavity was weighted (to assess the final BCP removal), equipped with its accessories (high-Q antennas for PU, input power and HOMs, UHV valve and flanges), slowly pumped, leak checked, its rf characteristics measured and then sent to storage until preparation for the Vertical Test (i.e. all steps from 1 to 5 of the procedure in Table VII). The cavities proceeding to the vertical test were then subjected to a final HPR rinsing and proceeded to the remaining steps in the preparation sequence from 6 to 14 of the procedure summarized in Table VII.
Each of the two batches of ten cavities was received in approximately two and half weeks, at a rate of four cavities per week, one per day, following the schedule of the "final BCP" treatments at the vendor. Each day two cavities were processed in the clean room at different preparation stages.
Only after receiving all cavities the preparation for cavity testing started, according to the sequence described above and summarized in Table VII.
Six out of the ten cavities of the first batch and all cavities in the second batch were prepared at LASA. In order to keep the tight testing schedule avoiding bottlenecks in the small local clean room four cavities of the first production batch were sent to DESYand processed there from step 6 to 9 of the sequence in Table VII before returning them to LASA, where the remaining steps were performed.
During the preparation phases, various process parameters of clean room procedures, cavity vacuum, vacuum composition, and leak test were recorded.

C. Vertical test results of cavities
Due to the batch operation of the cryogenic infrastructure, the time needed to purify and liquefy the necessary He gas inventory, and the installation and removal operations on the vertical insert, the tests were performed at the rate of 2 cavities (in one cooldown operation) every three to four weeks.
The cavities were first assembled on the vertical insert using a portable clean room to perform the vacuum connection. The insert vacuum line was then slowly pumped and leak checked before switching on the SIP. Only after the vacuum level was below 10 −5 mbar the cavity valves were opened, after isolating the forevacuum system of the vertical insert line.
The warm rf cables were then calibrated and the cavity frequencies checked before moving the insert into the cryostat vacuum space. All signal cables were connected to the top flange of the insert and the cryostat was pumped down and an integral leak check of its inner volume performed.
Cryogenic operation started with filling the cryostat with liquid He, transferred from 450-liter dewars. Typically 5 dewars were needed to accumulate the necessary He level to guarantee the cool-down and at least 8 hours of rf measurements at 2 K. Sub-cooling from 4.2 K to 2 K usually took a 3 hours, in which the measurement of the surface resistance against the bath temperature was measured at moderate field levels (typically between 0.2 and 1 MV=m of accelerating gradient) for one of the two cavities under test. Such a cooling scheme allows a cooldown speed of approximately 1 K= min in the range from room temperature up to approximately 70 K. After that the cooldown speed decreases down to 0.1-0.2 K= min during the T c transition in the He vapors. Due to this low cooldown speed and the short cavity length no significant thermal gradients were recorded across the cavity. Cold rf cables were calibrated at 4.2 K, rechecked when the 2 K temperature was reached, and finally the rf cavity characterization could start. Figure 10 shows the power rise (cavity quality factor Q 0 vs the accelerating field E acc ) for the two batches of cavities at 2 K, while Table VIII shows the average values of the results. None of the cavities showed appreciable field emission during the testing and nearly all were limited by quenches at the highest fields. Only a few cavities were limited by the available rf power and could not reach the quench level. Almost all resonator performances were above the EXFEL specification indicated by the two points on the plot for the nominal system operation at 10.8 MV=m (corresponding to 30 MV of module voltage) and the qualification requirement of 15 MV=m (corresponding to 42 MV of module voltage). Cavity 3HZ014 was the only one that marginally missed the qualification specification, with a hard quench occurring approximately at 15 MV=m. 3HZ014 and 3HZ021 were tested twice after a further HPR processing, being the two cavities with the lowest performance of the whole two batches, but the results were consistent with the first test. Indeed, 3HZ021 reached an accelerating gradient of 17 MV=m well within the requirements for the maximum operation of the EXFEL third harmonic module. Most cavities show a Q-drop at moderate field (around 20 MV=m) before the quench, in the absence of field emission. Such a behavior seems to suggest the onset of a thermal breakdown phenomenon, eventually leading to the quenches in the 20 MV=m range, compatible with the predictions of a simple thermal feedback model [21][22][23]. Further data analysis and modeling is ongoing for the confirmation that thermal breakdown is the possible limiting mechanism for these high frequency structures.
While the quench fields are similar for both batches (see Table VIII), the cavities of the second series shows a higher spread of Q 0 values at low fields, with two cavities (3HZ015 and 3HZ017) showing lower-than average values and one cavity (3HZ022) with Q 0 ≈ 4 × 10 9 . One possible cause for the two cavities with reduced performances could be related to the shortening of the final BCP treatment in the second series, performed in order to minimize the cavity frequency spread after treatment, as described in Sec. III.
During the measurements, second sound and fast thermometers were continuously read to acquire data for the determination of the quench positions [24]. At the operating temperatures, the HOM notch position is checked at low power to avoid any damage to the HOM feedthroughs.
After the characterization at the nominal operating temperature of 2 K, we usually lowered further the He bath temperature to 1.8 K or below, and repeated power rises and quench detection. In some of the tests, we performed power rises also at 1.9 K and 1.7 K. A comparison of the different power rises for cavity 3HZ021 is shown in Fig. 11, where the improvement of Q 0 at low fields for the lower temperatures is clearly visible. In most tests, the accelerating field at the quench increased moderately with the decrease of the measurement temperature. In all tests in the temperature range from 1.7 to 2.0 K this particular cavity experienced a quench close to 20 W of dissipated power.
Once the cavities were characterized, we warmed up the He bath to 4.2 K. During this rise, the surface resistance of the cavity which was not monitored during cool down was measured. Surface resistance measurements were performed for all cavities of the series. The data collected for all cavities in the range from 4.2 to 1.7 K were analyzed and a fit performed using the SUPERFIT code [25] with the quasiexponential formula approximating the full BCS theory [26] (valid for T < T c =2): where a 1 ¼ Δ=k B T c is the reduced energy gap of the superconductor and a 2 correspond to the so-called "residual resistance" (R 0 ) contribution, due to trapped magnetic flux or any other kind of residual loss. Figure 12 shows the low temperature range (from 2.5 K to 1.7 K) of the surface resistance data for all cavities. Figures 13 and 14 show the results of this preliminary analysis of all measured data, that was performed considering a 5% error on the measured data and using the He bath temperature as representative of the cavity surface, thus neglecting Kapitza resistance or heat conduction effects across the cavity wall at the moderate field level (E acc ≈ 1 MV=m) used in the measurement. The distribution of the estimated R 0 values from the analysis is shown in Fig. 13 for all the 20 cavities tested at LASA. Typical values are in the range between approximately 20 and 50 nΩ, with a small number of the tests extending up to a maximum of 100 nΩ. It is interesting to note that, in spite of the large data spread, the value of 29 AE 24 nΩ is consistent with the proposed frequency scaling found in Ref. [27] from the analysis of several cavity production projects at Jefferson Lab at different frequencies. The formula proposed in the above reference, suggests a value of 34 nΩ at 3.9 GHz. The data point for cavity 3HZ010 has a much larger error bar than the others as some data was lost during the subcooling to low temperature. The fit has been performed with available data in the range from 2.4 to 1.8 K and the parameter estimation has larger uncertainties. Figure 14 shows the values of the estimated BCS at the operating temperature of 2 K obtained by subtracting from the measured data the R 0 component shown in Figure 13. The value of 85 AE 19 nΩ is in line with the experience obtained at lower frequencies (typically values in the range of 10 nΩ) and the BCS dependance on the square of the operation frequency [26]. A more systematic analysis of all measured data is in the preparation stages. The fit also resulted in the following estimate for the reduced energy gap: Δ=k B T c ¼ 1.91 AE 0.03.
During the assembling of a few cavities in the clean room, leaks were occasionally detected during the connection of the cavity to the UHV valve but, only in few cases, require a full HPR retreatment of the cavity. Only    during one test a small leak developed at cold, which however did not prevent the possibility to perform the test. The leak was found afterward on the HOM flange connection due to insufficiently tightened bolts.

D. He vessel integration
After the successful test, each cavity was prepared for the integration of the He vessel. All HOM feedthroughs were removed in the clean room to guarantee the clearance for the sliding of the He vessel and to avoid damages during the mechanical operations, and the cavity was sent, in vacuum condition, to the vendor. The high-Q input coupling was left on the cavity to monitor its frequency during the vessel welding and the PU antenna was moved to one beam pipe flange to preserve assembly clearance for the tank integration. During all stages, from the installation of the vessel and toolings, the tack and final weld operation, the frequency variation was kept below few tens of kHz. A proper procedure and tooling was developed to unload the cavity from any mechanical strain possibly originated during the welding process, eventually leading to permanent deformations and cavity detuning. The cavity was then shipped back to LASA where it went through the same steps of the cavity preparation shown before to prepare it for operation at DESY (horizontal tests and string integration). The cavity performances before and after this step of the vessel integration were checked with an additional vertical test on two cavities, for the procedure qualification. Figure 15 shows no significant degradation of the cavity performance by the vessel integration.
Once all the rf antennas were reassembled, the cavities were shipped back to the company for the final operations, i.e. the welding of the two-phase Ti line and the final pressure test required by the PED process. The cavity frequency was monitored during the pressure test to ensure that no detuning could occur. A final mechanical survey and the transfer measurements were taken and the cavity shipped to DESY ready for the string assembly.
One of the cavities of the first batch (3HZ010) was prepared at DESY for horizontal tests, by removing the High-Q antenna and installing the high power coupler. Cavity 3HZ010 reached in the pulsed horizontal high power test a higher quench field [28] than in the vertical test in Milano.

V. CONCLUSIONS
Three prototypes and two series of ten cavities for the 3.9 GHz third harmonic section of the EXFEL injector were fabricated at a qualified vendor and tested at INFN Milano LASA. Superconducting high-frequency resonators are very sensitive to small geometrical variations (resulting from mechanical operation or etching processes). The fabrication and treatment processes had to be closely followed and adjusted with the increasing experience gained during the production, in order to meet the goals for a correct frequency and length at the desired performance levels. All resonators reached the project rf specifications (E acc ¼ 15 MV=m, Q 0 ¼ 10 9 ), most of them with substantially better performances, none of them limited by field emission, but only by quenches. Eight cavities of the first series cavities are presently installed into the 3.9 GHz cryomodule, which has been brought in operation in the EXFEL injector above its nominal performances.

ACKNOWLEDGMENTS
We acknowledge colleagues at FNAL for sharing the design information of the FLASH ACC39 cavities, colleagues at DESY for the support in the development of the EXFEL third harmonic system, and the fruitful collaboration with Ettore Zanon SpA during the cavity fabrication and processing stages.