Novel 
X
-band transverse deflection structure with variable polarization

A collaboration between DESY, PSI and CERN has developed and built an advanced modular X-band transverse deflection structure (TDS) system with the new feature of providing variable polarization of the deflecting force. The prototype of the novel X-band TDS, the polarizable $X$-band (PolariX) TDS, was fabricated at PSI following the high-precision tuning-free production process developed for the C-band Linac of the SwissFEL project. Bead-pull rf measurements were also performed at PSI to verify, in particular, that the polarization of the dipole fields does not have any rotation along the structure. The high-power test was performed at CERN and now the TDS is at DESY and has been installed in the FLASHForward beamline, where the first streaking experience with beam has been accomplished. We summarize in this paper the rf design of the TDS and its key components, such as the $X$-band pulse compressor, E-rotator, and phase shifter, the results of the bead-pull measurements and the high power test and finally the rf setup at DESY.


I. INTRODUCTION
Transverse deflection structures (TDS) are well known diagnostics devices for the characterization of the longitudinal properties of electron bunches in a linear accelerator [1][2][3][4][5][6][7][8][9][10][11][12][13][14]. By using a conventional TDS system it is possible to characterize the slice properties of an electron beam in the transverse direction perpendicular to the timedependent streaking. Therefore, typically only either the horizontal or the vertical slice envelopes can be measured. Furthermore, electron beam diagnostic based on a TDS placed downstream of the undulators (postundulator TDS) in conjunction with an electron beam energy spectrometer can indirectly measure the pulse duration of ultrashort photon beams by analyzing the induced energy spread on the electron bunch due to the FEL process [8]. Recently, an innovative design for a TDS was proposed at CERN [15], which gives full control of the angle of the transverse streaking field inside of the TDS to characterize the projections of the beam distribution on different transverse axes, as illustrated in Fig. 1. The possibility of changing the orientation of the streaking field of the TDS to an arbitrary azimuthal angle opens new opportunities for extended beam characterization which makes particular use of the variable streaking direction. For example, a six dimensional (6D) phase-space characterization becomes possible by streaking the beam horizontally and vertically (provided that the phase-advance can be scanned and dispersion can be generated in the two transverse directions). These types of measurements may reveal possible cross correlations between the different phase spaces that cannot be detected with the present measurements using a conventional TDS. Another important application is to retrieve the three dimensional (3D) charge distribution by collecting measurements of the bunches streaked at different angles and combining those using tomographic techniques [16,17]. It is worthwhile noting that this technique could not be realized by using conventional TDSs and makes special use of the possibility of continuously tuning the streaking direction of the dipolelike field in the deflecting structure.
Combining these novel and more extended beam characterizations with the already proven capability of achieving fs and sub-fs longitudinal resolution of the X-band TDS [8], this diagnostic tool will be able to provide new insight on the multidimensional-beam-phase-space characterization with sub-fs resolution.
As this new TDS design requires very high manufacturing precision to guarantee highest azimuthal symmetry of the structure to avoid the deterioration of the polarization of the streaking field, the high-precision tuning-free assembly procedures developed at PSI for the SwissFEL C-band accelerating structures were used for the manufacturing process [18][19][20][21][22] and also for the realization of the tuning-free X-band structure prototypes for CLIC [23]. In this context and based on the success of the X-band TDS diagnostic at LCLS [8], a collaboration between DESY, PSI and CERN was established to develop and build an advanced modular X-band TDS system with the new feature of providing variable polarization of the deflecting force, namely the polarizable X-band (PolariX) TDS [24][25][26].
During the commissioning of the structure the first threedimensional charge density reconstruction as well as the first slice emittance measurements in both the horizontal and vertical planes were successfully performed. The details of the experimental results have been recently presented in [27].
The research discussed in this paper was developed within the PolariX TDS project, which aims at prototyping a series production of the PolariX TDS for applications at DESY and PSI in fs and sub-fs beam diagnostics. The paper has the following structure: In Sec. II, after a brief introduction to the four experiments that are planning to use the PolariX TDS system, a table with the TDS specifications for a design in common to all four experiments is presented; Section III presents the RF design of the TDS and its key components, such as the X-band pulse compressor, E-rotator and phase shifter; Section IV describes the procedure for the prototype fabrication and the low-power measurements verifying the RF performances of the TDS. The section starts by discussing the mechanical design and continues with the description of the manufacturing process and low-power measurements and in particular the bead-pull measurements to verify that the polarization of the dipole field does not rotate along the structure; Section V presents the results of the high-power conditioning of the TDS and XBOC carried out at CERN; Finally, Section VI describes the rf setup for the first experiment in the FLASHForward beamline at DESY where the expected performance of the structure was validated during the first commissioning with electron beam.

II. EXPERIMENTS AND TDS SPECIFICATIONS
Several experiments at DESY (FLASH2, FLASH-Forward, SINBAD) and PSI (ATHOS at SwissFEL) are interested in the utilization of high gradient X-band TDS systems for high resolution longitudinal diagnostics [24][25][26]. In this section, each of the experiments is introduced and their needs are highlight their needs.

A. FLASH2
At FLASH1 [28], the direct measurement of the longitudinal phase space with a deflecting rf structure has proven to be of the utmost importance in establishing femtosecondscale photon pulses [29][30][31]. Based on this experience, the installation of two PolariX TDSs was decided for FLASH2 [32][33][34]. In order to be compatible with long bunch trains in FLASH2 the streaked bunch is kicked onto an off-axis screen. Downstream of the location foreseen for the PolariX TDSs, FLASH2 comprises a horizontal dipole that separates the electron beam from the FEL beam and can serve as an energy spectrometer. Combining the vertical streak polarization of the PolariX TDSs with this horizontal spectrometer will allow mapping of the full longitudinal phase space density and thereby enhance the operational capabilities for optimization of the longitudinal bunch parameters for the FEL process. The PolariX TDSs at FLASH2 will be installed downstream of the undulator beamline. In such a configuration, the lasing part of the electron bunch can directly be identified. As this measurement can be performed almost parasitically to the regular operation, an estimate of the photon pulse duration can be provided online for the photon users. Additionally, slice emittance measurements in both planes can be performed [33,34]. The experiment aims for a temporal resolution of less than 5 fs.

B. FLASHForward
The FLASHForward project [35] is an innovative plasma-wakefield acceleration experiment housed at the FLASH FEL facility at DESY [28], aiming to accelerate electrons to GeV energies over a few centimeters of ionized gas. The beams accelerated in this high-gradient regime should ultimately exit the plasma without degradation of their high-quality transverse and longitudinal properties; a goal likely only achievable through rigorous analysis of the longitudinal phase space and slice emittance of both the beams driving the wakefield and those witnessing its accelerating effect. In addition, due to the intrinsically short plasma wavelengths in these schemes, the pulse duration of the accelerated beams may be on the femtosecond scale and thus difficult to resolve with traditional diagnostic methods. As such, a TDS operating at X-band frequency in order to reach the sub-fs resolution and with the ability to resolve beam properties in different transverse planes is the only diagnostic device capable of addressing these needs.

C. SINBAD
The SINBAD (Short Innovative Bunches and Accelerators at DESY) facility [36] is dedicated to accelerator research and development, building upon DESYs recent investment in this area in the framework of the Helmholtz ARD program. It will be used for experiments in plasmawakefield acceleration, dielectric accelerating structures and other novel accelerators. The SINBAD-ARES (Accelerator Research Experiment at SINBAD) linac, a 100 MeV electron linac, will be able to provide very short (sub-fs) electron bunches with low charge (sub-pC), as required for plasma and dielectric experiments [37,38]. The planned PolariX TDS will make the characterization of ARES bunches at the end of the linac possible, which is essential for these experiments [39,40].

D. ATHOS at SwissFEL
The SwissFEL facility, in operation at the Paul Scherrer Institut (PSI), produces FEL radiation for hard x-rays at the ARAMIS beamline [41] and generate soft X-ray radiation for scientific users at the ATHOS beamline from 2021 [42], with pulse durations ranging from a few to several tens of femtoseconds. The goal of ATHOS is to provide a flexible source with advanced control over several pulse properties such as the pulse duration, peak power, and bandwidth. To increase the performance in terms of photon-beam brightness and bandwidth, several innovative lasing schemes and technical developments for some key components are underway [43]. As a diagnostic tool, two PolariX TDSs will be installed downstream of the undulators of the ATHOS beamline, which will allow the indirect measurement of the x-ray pulse length by analyzing the induced energy spread on the electron bunch due to the FEL process. Furthermore, thanks to the variable polarization of the TDS it will be possible to perform a characterization of the 6D phase space by means of measurements of bunch length, energy, and transverse slice emittance (both vertical and horizontal) [44]. Table I summarizes the beam parameters, the spatial constraints, and the specifications for the PolariX TDS design for all the experiments listed above. A common mechanical design for the structure is possible by tuning the operational temperature of the structure itself in order to adjust its resonant frequency.

III. RF DESIGN
The design concept of a TDS with variable polarization of the transverse deflecting kick was presented for the first time in [15] and is illustrated in Fig. 2. The input RF pulse coming from an rf power source is compressed using an rf pulse compressor device and split by a 3 dB hybrid. Although any type of rf pulse compressor can be used, the barrel open cavity (BOC) type is considered in this work due to its numerous advantages described below. The two signals are recombined using a circular waveguide TE 11 mode launcher, the so-called E-rotator. In one of the waveguide arms a variable rf phase shifter is introduced to control the rf phase difference between the two rf inputs of the E-rotator.
The E-rotator combines two input signals into horizontally or vertically linearly polarized TE 11 modes at the output circular waveguide for rf phase differences of 0°or 180°, respectively. This mode is launched into the TDS, which supports both degenerate TM 110 -like dipole modes and, thus, can operate at any polarization angle. Varying the rf phase difference from 0°to 180°, the polarization angle can be changed from horizontal to vertical continuously. At the output of the TDS another E-rotator splits the TE 11 mode of the circular waveguide into two output waveguides, which have to be terminated individually by rf loads. It is worthwhile mentioning an alternative scheme that using the same rf components can be envisaged based on two identical rf sources with independent rf phase and amplitude controls. Although this scheme would offer a purely electronic way of controlling the TDS polarization with no need for a mechanical rf phase shifter, it has not been the primary choice of this work due to the additional complexity and cost associated with a second rf power source.
In this section, the detailed design of the TDS and the associated rf components is presented, with special emphasis on the design of the TDS itself since it is the centerpiece of the whole system which was designed and successfully built for the first time. The design choices made along the way may not be unique but they reflect the expertise available in the PolariX TDS collaboration coming from two important previous experiences. The first one, from the design studies of linear collisions in general and from the Compact Linear Collider (CLIC) in particular [45]. The second one, from the most recent developments within the SwissFEL project, where more than 100 C-band acceleration structures have been realized with such a high accuracy of form that no rf tuning was necessary [21]. These fabrication techniques were also successfully applied to X-band accelerating structures and were proved to operate at an accelerating gradient of 100 MV=m [23,46]. This technique is essential for the fabrication of the TDS with variable polarization because it avoids the use of dimple tuning, which is not applicable to the TDS with variable polarization, requiring a perfect symmetry of rotation along the entire structure.
The main numerical tool for the rf design presented in this section is ANSYS HFSS [47]. Second order elements and a curvilinear tetrahedral mesh were used. For all numerical simulation results presented below numerical convergence was checked not only in terms of internal volume mesh but also in terms of surface mesh quality which is characterized by the deviation of the surface mesh from the true surface. This deviation parameter was set to the level of a few micrometers. The typical level of convergence criteria used in the rf design was set to a level of −50 dB for the S-parameter solver and to a level of 1 × 10 −4 for the relative frequency error in the eigenmode solver. This level of numerical accuracy was considered to be adequate for the design to keep the rf design error below the level of shape accuracy achievable in the fabrication. This is an important consideration for the rf design of devices which will not have any rf tuning features and have to be designed and fabricated with the accuracy required for the operation at the nominal parameters.
A. Design of rf components 1. X-band pulse compressor The X-band pulse compressor is based on a single BOC. A BOC makes use of a "whispering gallery" mode which has a large quality factor and has the advantage of requiring only a single resonator instead of two as for the conventional SLED scheme. The design and fabrication of the XBOC are similar to a previous C-band BOC developed and presently used in the SwissFEL Linac [48]. The TM 18;1;1 operating mode is the same while the coupling factor (β) was reduced to 7.5 in order to maximize the energy multiplication factor (M) for the new Q value, klystron pulse length and filling time of the TDS structure. The mechanical design of the XBOC is also very similar to the one of the C-band version. It is composed of an inner body which fully confines the inner resonator, two stainless steel cooling rings that also provide stiffness to the pulse compressor, an external copper ring to close the circular waveguide and an input/output coupler. The C-band BOC is characterized by the complete absence of mechanical tuning at any step of the production and operation. The same approach was successfully used for the XBOC. Because of the extreme compactness of the X-band version and the relative low average power, the cooling circuit was simplified. The six cooling channels of the C-band version were reduced to four and the cooling of the T-shaped coupler was removed as shown in Figs. 3 and 4.
The simulated and measured parameters of the BOC with main geometric and rf pulse parameters are reported in Table II.

E-rotator
Although the rf design of the waveguide components shown in Fig. 2 is described in [15], a short summary is presented here for completeness. The so-called E-rotator is an rf device with two rectangular and one circular waveguide ports. In the circular port two degenerate TE 11 modes can propagate so that the S-matrix of the E-rotator is a 4 × 4 matrix similar to the one of a standard 3 dB-hybrid. The two output signals have the same amplitude and 90°phase difference. In the output circular port this forms a circularly polarized (rotating) TE 11 mode from two degenerate linearly polarized TE 11 modes. This is shown in Fig. 5. If the input signal comes to the rectangular port 1, the output mode is a right-circularly-polarized TE 11 mode, cf. Fig. 5 (left). If the input signal comes to port 2, a left-circularly-polarized TE 11 mode is formed, c.f.  FIG. 5. E-rotator geometry and electric field distribution for 1 W of input power into port 1 (left) and port 2 (right). The polarization of the circular TE 11 mode in the output port is indicated using black arrows. but different design concept, an rf polarizer, is described in [49]. Although designed for pulse compression systems it can also be used for the application described here.
The design of the E-rotator was adapted to accommodate the beam pipe, which is necessary for the application as an rf power coupler for the TDS. The operation of the E-rotator as a linearly polarized circular waveguide TE 11 mode launcher with variable polarization described above is illustrated in Fig. 6.

Variable rf phase shifter
Applying the input signal to port 1 of the E-rotator and terminating the circular port 3 with a short circuit will cause full reflection of the circularly polarized wave back into the device. As in the case of a 3 dB-hybrid, the signal then propagates to port 2. Moving the position of the short circuit will change the rf phase of the output signal at port 2 without causing any reflection back to port 1. In this way, the E-rotator serves as variable rf phase shifter. The geometry of the device is shown in Fig. 7 where additionally the electric field distribution in the x ¼ 0 plane is shown to visualize the cross section of the movable short circuit. The piston of the movable short has a compact choke integrated at the end which suppresses the penetration of the field into the gap between the piston and the circular waveguide wall. This rf phase shifter was constructed and high power tested. The operation at a peak power level of 37 MW, a pulse length of 100 ns and a repetition rate of 50 Hz was demonstrated [50], which is sufficient for the application to the PolariX TDS.

B. rf design of the TDS
The TDS is a constant impedance (CI) circular diskloaded waveguide structure operating at TM 110 -like mode in the backward travelling wave (TW) regime. This is the typical configuration for a TDS operating in TW regime. Several designs exist at different frequencies including S-, C-and X-bands [9,51]. In all these cases, the TDS cell is not azimuthally symmetric. This is done to avoid degeneracy of the two polarizations of the TM 110 -like mode and to guarantee that the nominal operation at only one polarization is not perturbed by the other one due to structure imperfections. In the case presented in this paper, the TDS has to support both polarizations and both TM 110like modes have to remain degenerate. In this case, the natural choice is an azimuthally symmetric cell. This simplifies not only the design but also the fabrication. Moreover, it reduces the cost and, most importantly, improves the achievable accuracy of the shape. The final cell geometry, designed to operate at the PSI rf frequency of 11.9952 GHz specified in Table I, is shown in Fig. 8. Table III summarizes the cell parameters. The choice of these parameters is described in this section.
Several parameters were optimized at the level of the single cell design: the cell length h is defined by the choice of the rf phase advance per cell δϕ 0 ; the cell radius b is used to tune the eigenfrequency of the cell f 0 to the operating frequency; the rounding radius of the cell rr is maximized to increase the Q-factor of the cell Q; the ratio of the major to the minor axis of the elliptical iris e is optimized to minimize the surface fields on the iris. In particular, great care was taken to minimize the modified Poynting vector S c [52]. The resulting distribution of the normalized Poynting vector S c =G 2 ⊥ on the cell surface is shown in Fig. 9 (right), where G ⊥ is the transverse deflecting gradient. For comparison, the normalized distribution of the surface electric E s =G ⊥ and magnetic field H s =G ⊥ are also shown in Fig. 9 (left) and (middle), respectively. The maximum values of the normalized surface fields and rf parameters of the cell are shown in Table III. This includes the group velocity v g which is negative in the backward TW structure and transverse shunt impedance per meter length R 0 ⊥ .
The iris thickness d was optimized together with the TDS active length L. To achieve this, a formalism was used which was developed for the optimization of a linac operating with a SLED-type rf pulse compression system in the single bunch regime, when the compressed pulse length is equal to the structure filling time t f ¼ L=v g . The formalism is summarized in [53] and in the references therein. Substituting the accelerating shunt impedance R 0 and voltage V with the transverse shunt impedance R 0 ⊥ and the deflecting voltage V ⊥ , the formalism can be directly applied to the case of the TDS with BOC. Then, the effective transverse shunt impedance per meter length where P k is the peak power from the klystron, can be calculated and used as a figure of merit. In Fig. 10 (solid line), the impedance of the TDS with BOC normalized to the cell impedance is plotted versus TDS attenuation τ ¼ t f f 0 π=Q for a klystron pulse length of t k ¼ 1500 ns and a BOC Q-factor of Q 0 ¼ 150000. The optimum value of the TDS attenuation is given by the position of the maximum of this curve which is at τ ¼ 0.665. For fixed cell parameters, this defines the optimum length L 0 of the TDS. Furthermore, by varying the external Q-factor Q e its optimum value was found to be Q e ¼ 19800. This is the value used for the plot in Fig. 10. Lower or higher values of Q e result in lower R 0 ⊥;TDS . For comparison, the dashed line shows the effective impedance of the TDS without BOC, clearly demonstrating the strong effect of rf pulse compression. Using this approach, the optimum TDS length L 0 was found for different values of the iris thickness which was varied from 1 mm to 3.4 mm and is shown in Fig. 11 (dashed). The smaller the value of d, the higher the effective impedance, which is presented in Fig. 11 (blue solid line) normalized to its maximum value for d ¼ 1 mm. In addition, the inverse value of the maximum of S c in the TDS is shown. Opposite to the impedance, a smaller d results in higher S c with a minimum around d ¼ 3.1 mm. Considering both functions as a figure of merit, an iris thickness value of 2.6 mm was chosen in  This also defines the optimum TDS active length L 0 ¼ 0.93 m. The impact of the two remaining parameters, a and δϕ 0 on the parameters and the performance of the TDS was also analyzed. Although no optimum was found within the range of varying a from 4 mm to 5 mm and δϕ 0 from 120°to 150°, limited by practical rather than fundamental considerations, the following conclusions were drawn, leading to the final choice of a ¼ 4 mm and δϕ ¼ 120°. First of all, Table IV clearly demonstrates that a reduction of a from 5 mm used in the previous X-band design [51] to 4 mm significantly improves the TDS performance. In particular, it increases R 0 ⊥;TDS by 30% and at the same time it reduces the ratio of maximum S c in the TDS to the square of its average transverse deflecting gradient by 40%. The former will result in 30% less rf power for the same deflecting gradient, the latter in 20% higher achievable deflecting gradient if it is limited by the rf breakdowns. There are several disadvantages of a smaller aperture including a tighter limit on the electron or photon beam transmission and stronger longitudinal and transverse wakefields.
The longitudinal and transverse wake-potentials for a structure having 4 mm aperture has been calculated using Karl Bane's analytical model, which assumes an infinitely long periodic structure [54,55]. The result of the calculation is shown in Fig. 12. From these plots, it is possible to derive the integrated induced energy spread and emittance growth after the transit through the structure using the analytical equations described in [56]. As an example, some calculations valid for the SINBAD-ARES linac case-which operates with the lowest beam energy-are presented. If a 100 MeV bunch with a charge of 2.7 pC and a length of 0.7 fs rms traveling along a 2 m-long TDS is considered, the corresponding estimated increase in energy spread at the exit of the structure will be ΔE < 4 keV. Also, the increase of the transverse emittance will be completely negligible. The situation is different for a beam with 200 pC charge and a length of 1 ps. The latter would experience an increase in energy spread ΔE ¼ 100 keV. The same beam for a 200 μm transverse trajectory offset in the structure would undergo an increase of the normalized emittance of about 5%. These effects were analyzed for all experiments and it was concluded that a ¼ 4 mm is an acceptable value for the TDS iris aperture.
The photon beam transmission is relevant for ATHOS since the TDS is located in a post-undulator location. The distance between the first undulator stage and the TDS system is about 40 m, and the worst case is the two color operation with the first undulator stage tuned to the longest wavelength of 5 nm [42]. In this case, the divergence is approximately 25 μrad providing an rms photon beam radius of 1 mm at the TDS location which is enough for the photon beam transmission.
Finally, Table IV shows the effect of a larger rf phase advance per cell on the TDS parameters. Increasing this   parameter results in some reduction of both the TDS shunt impedance and the maximum value of S c , therefore, resulting in no advantage. Nonetheless, a higher rf phase advance per cell results in a smaller value of the optimum active length L 0 . This makes it an attractive solution if there are severe constraints on the total length of the TDS. However, this is not the case for any of the facilities described in Table I. In order to couple rf power into the TDS with no reflections, a matching cell is introduced between the circular waveguide port of the input E-rotator and the TDS. The same is done at the TDS output for terminating the leftover rf power by means of the output E-rotator and two rf loads. The geometry of the input E-rotator, matching cell and first regular cell is shown in Fig. 13. The shape of the matching cell is similar to that of the regular cell, but the dimensions are rather different. The cell radius and iris radius are used as parameters for matching. The cell length and the iris shape were optimized to minimize both electric and magnetic surface fields as well as S c in the matching cell to be lower than in the first regular cell, where they are the highest. This ensures that the high gradient performance is not limited by the matching cell and results in a slightly longer matching cell and a thicker asymmetric matching iris. The length of the circular waveguide between the E-rotator and the matching iris is minimized but it is still long enough to guarantee that the matching is not affected by the evanescent modes. The total length of the rf power coupler including beam pipe, E-rotator, circular waveguide and matching cell is 80 mm. The output rf coupler is the same as the input one, thus twice this length must be added to the active length to obtain the total length from flange to flange of the TDS. For practical reasons two versions of the TDS were selected for fabrication. A short version, 960 mm  long, and a longer and more efficient structure about 1160 mm long. Table V lists the rf parameters for both versions together with the optimum one for comparison. The length of the optimum TDS is in between the two, and both are very close to the optimum TDS in terms of impedance per meter length, but the long TDS has higher total impedance R ⊥;TDS ¼ R 0 ⊥;TDS L 0 because it is longer. The short version, matching the space constraints at FLASH2 at DESY [24,57], was fabricated as a first prototype.

IV. PROTOTYPE FABRICATION AND BEAD-PULL MEASUREMENTS
A. Tolerance study and slippage effects for operation at zero-crossing In order to estimate the slippage effect between the electron bunch and the synchronous deflecting wave due to cell-to-cell phase advance errors (δϕ) the electron beam trajectories in the TDS were estimated. The following iterative equation of motion of the beam centroid in the horizontal plane for each ith cell was considered where N is the number of cells, h is the cell period and E 0 is the beam energy in eV. The deflecting field E ⊥ ðiÞ in each ith cell is given by where l is the active length, V ⊥ is the integrated deflecting voltage and τ 0 the total power attenuation parameter as listed in Table V. The integrated phase advance error ϕðiÞ is finally given by where Δδϕ M;i is the phase advance error due to systematic and random mechanical errors in the i-th cell, Δδϕ T ¼ c=v g αδϕ 0 δT is the phase advance variation due to a temperature variation and α ¼ 1.8 × 10 −5 K −1 is the copper expansion coefficient. φ rf is the rf phase with φ rf ¼ 0°c orresponding to the zero-crossing. The initial conditions are xð1Þ ¼ x 0 ð1Þ ¼ 0 because the mechanical errors in the input/output coupler are not considered in this analysis. Table VI lists the results of the sensitivity analysis of the frequency versus geometrical error for different dimensions as indicated in Fig. 8. As expected the external cell radius (b) is the most sensitive parameter and is considered as an estimate of the phase advance error in the following analysis.
Effects of the cell-to-cell phase advance errors on the beam centroid trajectory and the transverse kick along the TDS axis, when the TDS is used at the zero-crossing rf phase, depend on the ratio of the integrated voltage to the beam energy, see Eqs. (1) and (2). Based on this consideration, the most critical application for the TDS is the SINBAD setup due to lowest beam energy of 100 MeV and the relatively high integrated deflecting voltage. For this reason, only the SINBAD case is considered in the following studies. It is important to emphasize that the systematic mechanical errors can also be compensated by a temperature regulation system. For this purpose, a temperature regulation system must be used to keep the beam offset and transverse kick inside the TDS under control. In particular, in case of installation of two TDSs in the same beamline, each of them has to have a dedicated temperature regulation system to compensate its own phase advance systematic errors. These errors can be well characterized by low power rf measurements and the operational TABLE VI. Sensitivity analysis of the frequency and cell-tocell phase advance versus geometrical error for different dimensions as indicated in Fig. 8   temperature to minimize these effect can be also estimated. Nevertheless, the random cell-to-cell errors cannot be fully compensated by the temperature regulation and a dedicated study of random cell-to-cell phase errors was performed to evaluate their impact on the beam trajectory. In particular the impact on the residual offset and transverse kicks at the TDS exit were studied.
Based on the experience with the ultra precision (UP)machining of the SwissFEL C-band accelerating structures the inner profile of a single cup should be within the tolerance of AE3 μm. Considering the geometrical sensitivity listed in Table VI and a tolerance of AE3 μm, a normal distribution for the phase advance errors along the TDS with a mean of zero and a standard deviation of 0.25°was chosen to generate a number of configurations having random cell-to-cell phase advance errors, as shown in Fig. 14. Figure 15 shows the effect of the tuning errors for 50 random configurations on the transverse displacement (up) and on the transverse kick (bottom) as a function of the coordinate along the TDS axis. The beam energy is 100 MeV and the integrated deflecting voltage is V ⊥ ¼ 20 MV. The beam offset and residual transverse kick at the TDS exit resulted to be 1.4 mm rms and 3.9 mrad rms, respectively.
The residual beam offset and the transverse kick at the TDS exit can still be compensated by globally adjusting the rf phase. In the following, the zero-crossing rf phase is defined as the phase for which the transverse kick at the TDS exit is zero. Figure 16 shows the beam trajectory and the transverse kick along the TDS axis for the worse case in Fig. 15 and different rf phases around the zero-crossing. As can be seen in Fig. 16, the TDS has no residual transverse kick at the TDS exit and the residual beam offset is also under control and is approximately 0.5 mm at the TDS exit. However, all these considerations are based on the assumption that the errors of the phase advance are only caused by mechanical machining tolerances. This is not necessarily true, since brazing and assembly play a key role in defining the correct geometry and phase advance.

B. Mechanical design
The mechanical design is very similar to that of the SwissFEL C-band structure and PSI T24 X-band structures [18,19,22,23], with the main difference in the input/output power couplers. For the PolariX TDS they comprise an E-rotator geometry as shown in Fig. 5. Figure 17 shows a section of the mechanical drawing of the TDS. It is composed of seven different kinds of disks: three for the couplers, three special disks to adapt the two sides of the coupler to the regular disks, and 95 and 119 regular identical disks for the short and the long version of the TDS, respectively. As for the C-band accelerating structures, a double rounded cell (T-shape) design was chosen, see   feature, machining of the half cell will be subsequently performed on both sides with the aim of having the brazing plane in the middle of the cell. This design avoids placing the brazing copper-silver alloy in one brazing groove to flow into the structure through capillary action. Furthermore, sharp edges are foreseen in the cells in order to eventually hold the melted brazing material back from flowing into the cells. However, the size of the brazing groove was experimentally optimized in order to fully fill the brazing gaps with the melted brazing material. The diameter of the iris and the cell radius is constant from cell to cell to generate a constant impedance gradient along the structure. The phase advance per cell is 120°as discussed in the previous section. The design of the copper cell includes two round brazing joints to effectively separate the vacuum from the water cooling. Air channels allow checking for vacuum tightness after brazing. The discussion in the Sec. IVA fixed the tolerance for the inner profile of the cups to AE3 μm. Furthermore, based on the experience gathered from the high power test with C-band and X-band accelerating structures at PSI, an average surface roughness R a below 25 nm was specified. This extremely high accuracy in the machining of the cups is required in order to avoid tuning and guarantee any rotation of the dipole polarization.
The highest power loss of 3 kW will be achieved in the ATHOS application for a repetition rate of 100 Hz, an rf pulse length of 1.5 μs and an integrated voltage of 60 MV. Finite element (FE) calculations were performed to verify that thermal dissipation and temperature stabilization can be achieved by water flowing through eight azimuthally distributed channels integrated in each disk of the structure and running all along it. The design pressure of these 8 mmdiameter channels is around 6 bar, and the foreseen flow velocity is around 1 m=s. The cooling circuits are integrated in the disks as shown in Fig. 18 (right). The nominal inlet temperature of the water is 30°C and will be stabilized within AE0.01°C. Figure 19 shows a typical temperature distribution in the TDS model with few disks. A global tuning of the TDS can be performed by varying the inlet temperature of the water within AE5°C of the nominal temperature.

C. Manufacturing process
Following the C-band tuning-free technology developed at PSI for the SwissFEL linac [20,21], the main production steps are summarized here: (i) Machining and visual inspection of the UP-parts. All cups and the two couplers were produced by the company VDL [58]. In order to verify the cup size all the cups had metrology control. The histogram in Fig. 20 shows the metrology results for the inner diameter of the cups: the cups have a systematic error of −0.15 μm, the error distribution has a standard deviation of 0.77 μm and a peak to peak difference of 2.0 μm. Interferometric probing of the copper surface was used to measure the surface roughness and the surfaces were scanned for possible defects using microscopic inspection. Figure 21 shows a typical picture of the interferometric probing of the precision copper surface. The surface roughness R a was measured as 14 nm. The inner profiles of the cups are all well within the specified tolerances (AE2 μm) and the average surface roughness R a is below 15 nm.  (ix) Metrology straightness. Figure 22 shows the full TDS prototype. To check for possible elongation or shrinking and for the perpendicularity along the 90 cm-long structure, the length and the axial deviations are measured with a laser tracker. Typical results are depicted in Fig. 23 with an axial deviation of AE5 μm rms. The length measured between reference planes corresponds well to the reference length of 838.350 mm minus 37 μm.

D. rf characterization and bead-pull measurements
The measurements were performed with a 4-port vector network analyzer (VNA), connecting each port of the TDS to one port of the VNA, according to the scheme described in Fig. 24 (right). Properly combining the measured Sparameters, this setup made both the TDS reflection coefficient and insertion loss measurements possible. The insertion loss was obtained from S 31 þ S 41 and the reflection coefficient from S 11 þ S 12 . As shown in the plot of Fig. 24 (left), the values measured at the nominal frequency are −5.5 dB and −35 dB, respectively.
The bead-pull technique was used to measure the field flatness and the dipole mode polarization. The structure was fixed to a metallic frame and aligned in vertical position. A step motor was used to drive a dielectric sphere with a diameter of 2 mm along the structure, fixed to a dielectric wire having a diameter of 0.16 mm. Taking the coordinate system, sketched in Fig. 24 (right), as reference, the bead pulling was done along several paths parallel to the z-axis, with different offsets in x or y. A spherical, dielectric bead perturbs only the electric field, and cannot distinguish between longitudinal and transverse components. However, the measurement still provides information about each single components of the E-field. To this purpose, it is useful to remember that for an ideal structure: (i) along the z-axis, the transverse component of E rotates from x to y when the phase difference between port 1 and port 2 (Δϕ in ) varies from 180°to 0°. The longitudinal component, E z ðzÞ, is zero on the z-axis; (ii) moving out from the z-axis, for example with a given x-axis offset, also E z ðzÞ depends on Δϕ in and it increases from zero to its maximum when Δϕ in (iii) If the offset is in the y-axis, the plots in Fig. 25 are still valid exchanging Δϕ in ¼ 0°with Δϕ in ¼ 180°, and E x with E y . Figure 26 (top) shows the electric field as obtained from an on-axis bead-pull measurement. According to what stated above, this field pattern is the transverse component of E, which, varying Δϕ in , rotates in the xy-plane. Figure 26 (bottom) reports the cell-to-cell phase advance. It resulted to be 120°with a dispersion of 0.67°rms at the working frequency of 11995.2 MHz and a temperature of 33.9°C. It is worth noting that same results for the phase advance were obtained varying Δϕ in from 0°to 360°with a step of 10°, namely for different polarizations. With this set up only the transverse component of the electric field E ⊥ was measured.
In order to verify that the different polarizations are also well tuned, bead-pull measurements were performed for different offset values and relative phases between the ports resulting in different polarizations. For this scope, the wire guiding the bead was moved out of the z-axis, introducing an offset of 1 mm in the x-axis. The first three plots in the top of Fig. 27 show the measured field patterns for three different values of Δϕ in . Comparing these three plots to the expected E-field components in Fig. 25, one can observe that the oscillation peaks of the measured field, marked with red dots, identify the iris positions, while the negative peaks, marked with green dots, identify the cell gap center.  Thus, changing the polarization, the transverse component of E rotates but its amplitude remains constant. On the contrary, the longitudinal component varies from zero to its maximum when the polarization changes from one plane to its orthogonal one. In addition, one can also observe that in the gap center the amplitude of the transverse component of electric field is almost independent of Δϕ in . One concludes that the variation of the height of the line determined by the green points with Δϕ in is due to the longitudinal component of electric field. For Δϕ in ¼ 0°, E z ðzÞ is expected to be zero, then it starts to increase to reach the maximum amplitude for Δϕ in ¼ 180°. The height of the green dots confirms these expectations. Along the TDS, for any given Δϕ in , the alignment of the green dots can be fitted by a first order polynomial (the slope is due to the power losses along the TDS, which is a constant impedance structure). Since the standard deviation of the errors from this linear fit is practically zero, one can conclude that the polarization of the dipole fields does not have any rotation along the structure. The average of all the green dot values as a function of Δϕ in is presented in the plot at the bottom of Fig. 27. From the measurements this function, E min , has a minimum at Δϕ in ¼ −10°, and not at 0°as expected. This discrepancy can be justified by an error in the wire alignment that was made manually. If the offset is not purely in the x-axis but the wire is also slightly displaced along the y-axis, the value of Δϕ in which minimizes E min is slightly shifted from zero.

Slippage effect due to phase advance errors
As stated in Sec. IVA the effects of the measured phase advance errors on the beam trajectory are estimated with the equation of motion 1. Figure 28 (top) shows the average integrated phase error along the TDS axis and the integrated phase error for different polarizations with Δϕ in from 0°to 360°with a step of 10°. Figure 28 also shows the effect of the phase advance errors on the transverse displacement of the centroid (middle) and on the angular divergence (bottom) as a function of the longitudinal coordinate inside the TDS and for different rf phases. As an example, we used the SINBAD-ARES linac application, which operates with the lowest beam energy of 100 MeV and the integrated deflecting voltage is 20 MV. Residual effects of the cell-tocell phase advance errors can still be compensated by globally adjusting the rf phase. In this case, the residual kick can be compensated with an rf phase of −2.8°and then only an offset of −1.2 mm remains. For the application at SINBAD, where the operation of two TDSs in series is foreseen, the presence of this offset requires some flexibility in the precise adjustment of the second TDS. In particular this aspect was addressed with the design of a remote position adjustment system for the positioning of both structures.

V. HIGH POWER TESTS
Following the low power measurement, the structure was installed in CERN's XBOX2 facility for high power testing [59]. XBOX2 is equipped with a 50 MW CPI klystron with a repetition rate of 50 Hz and at the time of testing a pulse compression scheme consisting of a prototype BOC described above and CCC (correction cavity chain) [60]. The CCC comprises eight spherical cavities and provides a passive means of pulse shape correction to produce the high power flat top while offering improved efficiency over doing so via phase and amplitude modulation [61].   Figure 29 shows the structure installed in CERN's high power test stand. The polarization was controlled during testing via a high-power variable phase shifter placed on one of the input arms of the PolariX TDS as shown in Fig. 30. The phase shifter was of the aforementioned design and had previously been conditioned in XBOX3 up to a peak power of 44 MW at 50 ns and 37 MW at 200 ns [50]. As the XBOX2 test stand is a facility without beam capability, it was not possible to measure the polarization via spectrometric methods. Instead, the polarization during testing was inferred by using the LLRF system to measure the phase difference between the two directional couplers connected to the structure outputs also shown in the experimental setup in Fig. 30.
Similar to previously tested components an automated conditioning algorithm was used to gradually increase the input power while maintaining a fixed BDR (breakdown rate) of 3 × 10 −5 bpp (breakdowns per pulse) [62]. Typically, during structure conditioning a 50 ns pulse is used in the initial stages and the pulse length is later increased gradually in steps. However, due to the short window available for testing the pulse length was fixed to 100 ns for the duration of the test, as this corresponds approximately to the fill time of the structure. Conventional accelerating structures operate in the TM 010 -like mode where the internal field pattern is azimuthally symmetric, meaning that the cavity surface conditions evenly. In a TDS, however, the field necessarily varies azimuthally due to the established TM 110 -like deflecting mode. As the PolariX TDS is capable of varying the polarization during operation it presents a unique case where the surface peak electric and magnetic fields may be completely redistributed and hence each polarization must be conditioned separately. To expose the entire surface to high surface electric fields and ensure the structure is capable of highpower operation in different polarizations the variable phase shifter was moved several times during the test to rotate the field orientation. Figure 31 shows the full conditioning history alongside the polarization for each period. The conditioning began at an arbitrary polarization angle with the phase shifter in the fully retracted position in order to expose the entire internal surface to high power rf. Initially, it was planned that the surface would be conditioned evenly by moving the phase shifter every 5 MW then recommencing in a different polarization. For this reason, the phase shifter was moved remotely during testing after approximately 10 million pulses. A change in phase was observed, however, the system was then limited by high vacuum levels in the region surrounding the phase shifter. Further attempts at remote actuation were unsuccessful, and so after 20 million pulses the device was removed, reset manually and reinstalled with the piston in the central position. Conditioning proceeded normally and after approximately 30 million pulses the decision was made to once again actuate the phase shifter remotely. As before, an immediate phase shift was observed, however, the system was then limited by vacuum activity and not BDR. Attempts to remotely reposition the device were once again unsuccessful due to what is believed to be a problem with the magnetic coupling of the mechanical drive system. A further intervention to remove and reset the device was performed after approximately 45 million pulses and it was decided not to vary the polarization again for the remainder of the testing period. The FLASHForward [35] beamline at DESY operates a 6 MW Toshiba E37113A klystron with plans to install an XBOC to increase the peak power by a factor of 4. After 60 million pulses the PolariX TDS had exceeded this value in the test, reaching a peak input power of 26.5 MW at a polarization of ≈10°. It was then decided to cease ramping and run at a fixed input power and decreased BDR for the remainder of the test to avoid the risk of damaging the structure. Additionally, given the azimuthal symmetry of the cells it was assumed that the structure would be capable of operation at this power level in any polarization. No upper limit emerged during the test and results indicate that the structure is capable of establishing the deflecting voltage required in the FLASH beamline.
Where possible, all breakdowns occurring in the PolariX TDS were localized via the edge method [63] to monitor the structure health and progress during conditioning. The distribution of breakdowns occurring in the structure is shown in Fig. 32 and the corresponding phase distribution of each breakdown event was calculated in Fig. 33. Although a structure-long spread is present, the vast majority of breakdowns occurred close to the structure input and/or in the first few cells. However, this is an expected behaviour since the PolariX TDS is a constant impedance structure where the highest fields are present in the first cells and then decay accordingly. Additionally, the phase of the breakdown events populate three distinct regions separated by approximately 120°, corresponding to the phase advance of each cell, and suggesting that breakdowns tend to occur on the irises. The combined time and phase of these results are summarized in Fig. 34.
The power test also offered the possibility to evaluate the high power performance of the XBOC. This pulse compressor was tested longer than the TDS structure, since it was left in the high power network also for the following test of the CLIC superstructure reaching a total of 2550 hours or 450 million pulses. During this time the XBOC was tested up to 12 MW input power at a pulse length of 104.5 ns and was operating mainly at 7.5 MW and a pulse length of 700 ns. The device ran very smoothly showing vacuum activity or breakdowns very rarely. It was not possible to clearly distinguish between events in the CCC and XBOC and a simple estimation indicates the total amount of breakdowns in the XBOC was in a range of 100 to 200. This corresponds to a BDR in the 10 −7 range. Because of the rarity of events in the pulse compressor, the evaluated BDR cannot be considered as the final result of the high power performance of the device but as an indication of the partial conditioning. In the ATHOS line of the SwissFEL the maximum operational value of the X-band klystron is 25 MW peak power and a pulse length of 1500 ns at 100 Hz, which corresponds, after losses in the long waveguide, to 19 MW input power for the XBOC. This value is clearly much larger than the power level during the test in the XBOX. Nevertheless, the very smooth operation and the rarity of events are clear indications that the device was only partially conditioned and far from the high power limits.

VI. RF SETUP AT DESY
In summer 2019, after the successful high power tests at CERN, the PolariX TDS prototype was installed at DESY in the FLASHForward beamline. Figure 35 shows the PolariX TDS after installation and the rf station feeding the structure. The FLASHForward and FLASH2 experiments designed a shared rf station that in the future will feed either the FLASHForward TDS or the FLASH2 TDSs installed in the two neighbor beamlines. For the commissioning of the PolariX TDS prototype a much simpler setup feeding only the TDS installed at FLASHForward was employed. In the next subsections, we will describe the main subsets of components which were installed in preparation of the commissioning of the structure with an electron beam in more detail.

A. rf components
The structure is driven by a 6 MW Toshiba klystron E37113A operated at a frequency of 11.988 GHz. The modulator to provide the high voltage (HV) to the klystron is semiconductor switch, designed and built by AMPEGON/PPT [64]. The modulator is split into a control and switching unit, located outside the accelerator enclosure, and a klystron unit containing the pulse transformer and klystron, located close to the structure inside the enclosure. Two switches are operated in parallel at a voltage of 2.6 kV.
To achieve a good matching to the impedance of the pulse transformer and klystron the switches are connected via two bundles of up to 16 RG213 cables. The cables are 15 m long, which provides flexibility in the placement of the pulse transformer of up to 2 m. The klystron can deliver up to 2 μs rf while the HV pulse can be 6 μs long. Thus, it was decided to use a relatively slow rise time of the HV pulse of up to 2 μs to possibly alleviate problems due to the unusually long pulse cables. The rise time achieved was 1.5 μs.
The klystron is located between the FLASH2 beamline and the FLASHForward beamline. In the initial setup the klystron is directly connected to the input network of the PolariX TDS in the FLASHForward beamline. In a second evolution of the setup, a variable waveguide switch will be used to switch the power between one structure in the FLASHForward beamline and two structures in the FLASH2 beamline. A ceramic window separates the waveguide from the beam vacuum system. A fixed shunt T-splitter is used to split the rf evenly into two waveguide arms. In one arm, a variable phase shifter of the same type as used at CERN can rotate the phase between 0°to 200°. The phase shifter was rf conditioned prior to the installation in the accelerator. The conditioning time up to full power was 2 days and no problems were observed afterwards at any position of the phase shifter. The limit of 200°for the phase shifter was established as a precaution after the unfortunate experience during the conditioning at CERN although no problems were observed up to settings of 300°. There is one directional coupler in the common waveguide at the entrance of the structure and one directional coupler at each exit before the rf absorbers.
The initial commissioning of the system was done with a pulse length of 2 ns at a power of 6 MW. Subsequently, it was possible to increase the pulse length. The majority of the measurements were done with rf pulses of 400 ns flat top plus a linear decay over 100 ns. The latter proved to be beneficial to reduce reflections in the system. Meanwhile, a flat top length of 700 ns was established for stable operation at 6 MW.

B. Low level rf concept
As the PolariX TDS is the first X-band structure installed on the DESY campus, there are no means available to measure, control and drive its rf field. Already existing LLRF systems are used to operate structures at 1.3 GHz (FLASH, EuXFEL) or 3 GHz (SINBAD, REGAE). For the X-band LLRF system, the 12 GHz signals will be downconverted to 3 GHz allowing the use of already existing processing components and greatly reducing the need for new developments. Figure 36 shows the block diagram of the LLRF system for the PolariX TDS at FLASHForward. As described above, the general approach is to reuse already existing components. These are the frequency generation box (FGB), the universal local oscillator generation module (UniLOGM) [65] and the S-band LLRF system already available in MicroTCA.4 [66]. The FGB takes the 1.3 GHz reference signal and converts it to 3 GHz. This step is needed, as the rest of the system is built to also be used at, e.g., SINBAD which is operated using a reference signal of 3 GHz. This signal is fed into the UniLOGM which provides all needed signals for the digitization and processing in the S-band MicroTCA.4 system.
The X-band local oscillator generation module (XLOGM), the X-band down-converter module (XDWCM) and the X-band down-converter module with up-conversion (XDWCM_UPC) are newly designed 19 00 modules. The XLOGM converts the reference signals up to 9 GHz, which is then used as an Local Oscillator (LO) for rf mixers in the XDWCM to convert the measured 12 GHz signals from the PolariX down to 3 GHz. The XDWCM_UPC contains an upconversion channel for the drive signal which is fed into the klystron.

C. Precision temperature stabilization system
The precision temperature control system for the PolariX TDS and the XBOC is designed to a achieve a temperature stability of 20 mK. Each structure (the TDS for FLASHForward, the two future ones for FLASH2, and the future XBOC) will have a dedicated pumping station to regulate the water temperature with 20 mK accuracy by means of a precision heater closely upstream of the structures. A three-way valve in the return of each water circuit allows the injection of pre-cooled water for removing heat from the structures. The common precooler circuit keeps the water temperature closely below the operating temperatures of the structures. Since the temperature differences between the temperature target values of the specific systems and the temperature supplied by the precooler are kept small, the required accuracy and stability can be achieved.
The operation of the prototype at FLASHForward ran smoothly. The stability of operation allowed performing first measurements on an electron beam. The detailed outcome of the campaign of the prototype commissioning with electrons is going to be presented in two separate publications.

VII. SUMMARY
Based on the recent development of compact high power X-band rf components at CERN, a new TDS design that enables the variable polarisation of the streaking field has been proposed. In contrast to conventional structures the novel device can provide a unique insight into the multidimensional phase space of electron bunches with sub-fs resolution, allowing to retrieve their 3D charge distribution and even their full 6D phase space. In order to develop and produce a modular system for the new Polarizable X-band TDS (PolariX-TDS), a collaboration between DESY, PSI and CERN has been put forth, which will provide several experiments of these institutions with unprecedented diagnostics capabilities.
The design of the main rf components and the structure itself profits from the experience gained from linear collider design studies-particularly from CLIC-and from the C-band tuning-free technology recently developed at PSI for the SwissFEL linac. The design parameters have been carefully optimized to fulfill the diagnostics requirements of the four targeted experiments of the collaboration and the system has been devised to be able to accommodate to their different operating conditions.
A first prototype of the PolariX-TDS has been successfully produced following the tuning-free technology. The deflection field flatness and the perfect tuning of the freely adjustable polarization of the structure have been confirmed by means of bead-pull measurements performed at the PSI. The measurements corroborate the validity of the novel assembly technology and are in perfect agreement with the rf simulations. The high power performance of the structure has been substantiated at the XBOX2 facility at CERN, reaching peak input powers of 26.5 MW for certain polarization angles. The XBOC has been successfully designed and produced at PSI profiting from the experience of the C-band version. The high power test has been limited to a maximum power from the klystron of 12 MW and has not shown any limitations in any case. The prototype will be further conditioned in the ATHOS beam line up to 20 MW.
The prototype has been installed and successfully operated for first time in the FLASHForward beam line at DESY. The expected performance of the structure and the other rf components has been validated during the first beam-based commissioning campaigns, from which the first 3D charge density reconstruction as well as the first slice emittance measurement in both the horizontal and the vertical plane have been obtained. The details of these experimental results are currently being summarized in [27].
The success of the design, fabrication and prototyping presented in this paper accounts for the further production of the other six structures together with three XBOCs and several movable phase shifters-as initially devised in the context of the PolariX-TDS collaboration.