## 2 Deflecting Cavity Design
### Microwave Design and Particle Tracking  
Microwave design is carried out in CST [19], which includes geometry optimization, mode separation and power coupling design. The normal-conducting standing-wave deflecting cavity is designed based on circular waveguide, and its working mode is TM\({}_{110}\). Benefiting from the good design of the 150 kV DC structure, the electron is accelerated relatively uniformly from the photocathode. The energy spread is low enough to neglect at low bunch charge. Therefore, the average beta of the electron beam is considered during the cavity geometry optimization. The single-cell length of the standing-wave deflecting cavity is  
\[l=\beta_{g}\lambda/2 \tag{3}\]  
where \(\beta_{g}\) is the geometric beta of the deflecting structure which is nearly the same as the electron beam beta \(\beta\), \(\lambda\) is the wavelength of the electromagnetic field. As the \(\beta\) of the electron beam from the DC photocathode gun is 0.634, if the \(\beta_{g}\) of deflecting cavity is equal to \(\beta\), the TM\({}_{110}\) transverse shunt impedance \(R_{\perp}\) of a pure copper pillbox cavity is about 0.4 M\(\Omega\). In this paper, the polarization direction of the working mode is chosen along \(y\)-axis, so the definition of transverse shunt impedance is  
\[R_{\perp}=\frac{V_{def}^{2}}{P}=\frac{\beta^{2}|\int\ E_{z}(x=0,y=y_{0})e^{i \hbar z/\beta}dz|^{2}}{\omega U(ky_{0})^{2}} \tag{4}\]where the integration path takes off-axis (\(x=0\), \(y=y_{0}\)), \(P\) is the power dissipated in the cavity walls, \(k\) is wave-number of the microwave. To provide higher deflecting voltage with same input power, a 3-cell cavity is finally adopted. The two-dimensional diagram of the deflecting cavity is shown in Figure 1.  
The key geometric parameters are optimized. Cavity radii \(b_{m}\) and \(b_{e}\) are optimized for the goal resonant frequency and better field flatness. The cell length \(l\) comprising disk thickness \(t\) and the length \(d\) is optimized to acquire the value of the shunt impedance \(R_{\perp}\) as high as possible. Considering that obvious mechanical deformation could occur during fabrication if \(t\) is too small, and a large \(t\) is not beneficial to \(R_{\perp}\), a compromised resolution with \(t\) of 16 mm is made. As the cavity deflects electron beam with medium-\(\beta\), the cell length \(l\) is calculated in detail in the following. In this paper, three structures with different cavity length are optimized. The simulations start from simple structures of which the three cells have equal length. The first structure is that each cell length is as Equations (2) and (3) with \(\beta_{g}\) of 0.634. Simulation shows the \(R_{\perp}\) acquire its maximum value at \(\beta\) of 0.72. To enable the \(R_{\perp}\) acquire its maximum value at \(\beta\) of 0.634, the simulations show that \(\beta_{g}\) should be equal to 0.551 which is called as the second structure. The reason why the value of \(\beta\) with the peak \(R_{\perp}\) is not identical with that of the design \(\beta_{g}\) is from the influence of the beam pipes at both ends. The attenuation distance of the RF field is much longer than \(t/2\) at the beam pipe, so the electron beam experiences a longer distance than the cavity length determined by Equations (1) and (2). To make the value of \(\beta\) with the peak \(R_{\perp}\) the same as the design \(\beta_{g}\), the length of the end cell should be shorter than that of the middle cell. The third structure is proposed that the middle cell length is with \(\beta_{g}\) of 0.634 and the end cells length is shortened. Figure 2 shows the \(R_{\perp}\) of the three structures with different \(\beta\) electron beams. It is shown all the three structures can produce deflecting force for electron beams with \(\beta\) larger than 0.5. The simulated \(Q_{0}\) values of the three structures are \(1.95\times 10^{4},\ 1.73\times 10^{4},\ 1.69\times 10^{4}\) with pure copper, respectively. Finally, the first structure with the largest cavity length is selected.