Enhancing particle bunch-length measurements based on Radio Frequency Deflector by the use of focusing elements

A method to monitor the length of a particle bunch, based on the combination of a Radio Frequency Deflector (RFD) with magnetic focusing elements, is presented. With respect to state-of-the-art bunch length measurement, the additional focusing element allows to measure also the correlations between the longitudinal and transverse planes in terms of both position and divergence. Furthermore, the quadrupole-based focusing increases the input dynamic range of the measurement system (i.e. allows for a larger range of beam Twiss parameters at the entrance of the RFD). Thus, measurement resolution and precision are enhanced, by simultaneously preserving the accuracy. In this paper, the method is first introduced analytically, and then validated in simulation, by the reference tool ELEctron Generation ANd Tracking, ELEGANT. Finally, a preliminary experimental validation at CLEAR (CERN Linear Electron Accelerator for Research) is reported.

Scientific RepoRtS | (2020) 10:11457 | https://doi.org/10.1038/s41598-020-67997-1 www.nature.com/scientificreports/ whole, e.g. to reduce the space between the klystron and the deflecting cavity, by consequently shortening the necessary waveguides. Furthermore, quadrupoles could be used to focus the beam on the screen. However, the impact on the RFD measurement quality of the position of the focusing element was not investigated until now. In this paper, a theoretical derivation of the bunch length measurement, when focusing elements are present between the RFD and the screen, is presented. It will be proven that the focusing element does not introduce additional effects that can invalidate the measurement. Furthermore, the metrological performance of the method with the focusing element is analyzed.
In particular, in section "Methods", the general theory is derived analytically. In section "Validation using tracking simulations", the mathematical derivation is numerically validated through a reference simulation tool, the ELEGANT code 33 . In section "Experimental verification", a preliminary experimental validation on CLEAR at CERN is reported. Finally, in "Discussion", the promising advantages of the non-conventional layout are discussed.

Methods
In the following, the term "conventional layout" of an RFD-based measurement points to the configuration without a focusing element (Fig. 2a), while "non-conventional" to its presence (Fig. 2b). In the conventional layout, some focusing elements (e.g. quadrupoles) are usually placed before the RFD, and can be used to minimize the beam spot on the screen and to improve the measurement resolution 4,34 . In the non-conventional layout, additional focusing elements are also placed between the RFD and the screen.
In this section, the analytical equations for the centroid and the vertical spot size with the RFD turned on and off are derived for the non-conventional layout. The analytical treatment is first carried out for a generic linear element (i.e. described through a matrix M ) between the RFD and the screen, and then applied to the quadrupole case. For the sake of the simplicity, the analysis is carried out for the vertical plane. But, an analogous analytical treatment is also valid for the horizontal plane. Finally, the measurement method is formalized.
RfD off. As usual in literature, the deflector is approximated as a thin element and the transverse kick is applied at the center of the RFD 34 . In the case of RFD turned off, the equations describing the system behavior in terms of positions (y) and divergences ( y ′ ) are:  www.nature.com/scientificreports/ the subscripts s and 0 are for the variables at the screen and the RFD center, respectively (as shown in Fig. 2). The terms M ij are the elements of the transport matrix M of the components between the RFD and the screen. The vertical spot size at the screen, with RFD off, can be calculated using Eq. 1: where σ y 0 is the initial rms dimension of the bunch, σ y ′ 0 is the initial rms divergence, and σ y 0 y ′ 0 = �(y 0 − �y 0 �)(y ′ 0 − �y ′ 0 �)� is the correlation between position and divergence, all in the vertical plane.

RfD on.
In the case of RFD on, the system equation becomes: where y ′ 0 represents the transverse kick given by the deflector in the short deflector and bunch approximation ( sin(kz 0 + φ) = sin(kz 0 ) cos(φ) + cos(kz 0 ) sin(φ) ≈ kz 0 cos(φ)) + sin(φ)) 34 : where E 0 is the energy of the reference particle, z 0 the displacement between the position of the particle and the center of the beam in the longitudinal plane in the laboratory reference frame, k the wavenumber ( k = 2πf RF /c ) of the deflecting voltage, and V t , φ , and f RF are the amplitude, the RF phase, and the frequency, respectively, of the transverse deflecting voltage.
Centroid position. The beam in terms of distribution is assessed by introducing the centroid, i.e. the average vertical position of the electrons over the whole bunch. The variation of the centroid position with the RF phase C y s,ON (φ) can be written as: By writing Eq. 1, it is already assumed that the elements M ij are identical for all particles. In the specific case of single quadrupole, this assumption means that the energy spread is neglected. The terms M ij can be extracted from the average: Let's assume that �y 0 � = 0 , �y ′ 0 � = 0 , and �z 0 � = 0 . Thus, the vertical centroid at the screen becomes: Calibration factor. A calibration factor K CAL can be defined 1 : K CAL allows to assess the bunch length from the vertical beam size and from the frequency of the deflector f RF . The calibration is done by varying the RF phase of the RFD and observing the effect on the centroid on the screen 7 . From Eqs. 7 and 8, the calibration factor can be determined as: The Eq. 9 is a general form of the conventional expression of the calibration factor in 35 .
Scientific RepoRtS | (2020) 10:11457 | https://doi.org/10.1038/s41598-020-67997-1 www.nature.com/scientificreports/ All the terms of σ 2 y s,OFF (Eq. 2) are present in Eq. 10, plus additional terms related to: (i) the bunch length σ t 0 (i.e. the value to be measured), and the correlation between longitudinal position and the vertical plane ( σ y 0 t 0 and σ y ′ 0 t 0 ). Contracting the expression using σ 2 y s,OFF and K CAL (φ) (Eq. 9), σ 2 y s,ON can be written as: Also in this case, Eq. 11 is a general expression of the formula found in 35 . In the case of conventional layout ( M 11 = 1 and M 12 = L ), Eqs. 9 and 11, provide the K CAL and the σ 2 y s,ON , respectively 35,36 . The terms due to the correlations can be canceled by averaging two measurements in phase opposition: The term σ y s, ON 2 is equal to σ 2 y s,ON in absence of correlations between the vertical and longitudinal planes. From Eqs. 9, 11, and 12, some preliminary points can be made: (i) a calibration factor can be defined with the same meaning of the conventional layout (i.e. including the variation of the centroid on the screen); (ii) the nonconventional layout does not introduce any deterministic error source in the measurement, (iii) the possibility of removing the correlation effects (i.e. σ y ′ 0 t 0 ,and σ y 0 t 0 ) is preserved, by carrying out two different measurements of σ y s,ON in phase opposition (at φ and φ + π ), and then evaluating the average between their squared values 35,36 , and (iv) thanks to the dependence of σ y s,ON and σ y s,OFF on the focal length, these quantities can be optimized over a wider range of beam parameters.
Single quadrupole case. In the case of a single thick focusing quadrupole, the transport matrix M , between the RFD and the screen, is obtained from the multiplication of the following matrices: where k is the focusing strength of a quadrupole, L q the effective magnetic length of the quadrupole, L a the drift space from the end of the quadrupole to the screen, and L b the drift from the middle of the RFD to the entrance of the quadrupole (see Fig. 3).
In order to do some considerations, it is convenient to use the well-known thin lens approximation. The matrix M becomes: where f is the quadrupole focal length, L 1 is the distance between the quadrupole center and the screen (i.e. L 1 = L a + L q 2 ), and L 2 is the distance between the RFD center and the quadrupole center (i.e.
The relation between the focusing strength and the focal length is: For a focusing magnet in the plane of interest (i.e. vertical) f is positive, while in the same plane for a defocusing magnet f is negative.
With this approximation, the terms M 11 and M 12 are: www.nature.com/scientificreports/ In the non-conventional layout, the term M 12 is present in K CAL (φ) (Eq. 9), which depends on the focal length of the quadrupole (from Eq. 17). Therefore, σ y s,OFF (depends as well on the focal length Eq. 2) cannot be decorrelated from the deflecting power as in the conventional layout. Another result that comes from Eq. 17 is the possibility to make M 12 zero, and consecutively also K CAL (φ) (Eq. 9). This happens when the focal length is equal to From a physical point of view, operating with such a value of focal length means that the RFD is increasing the bunch spot size on the screen by exactly the same amount as the quadrupole is squeezing it. There is a phase advance of π between the z = 0 and z = s . Therefore, for this value of focal length, the measurement cannot be carried out.
All the derived equations and considerations can be extended for a general configuration such as a doublet or triplet. Measurement method. From Eq. 12, considering φ = 0rad , the formula for the bunch length can be written in the same form as in literature 34 : In Eq. 19, the measured values are σ y s,ON and σ y s,OFF , while the measurand is σ t 0 . If the values of σ y s,OFF and σ y s,ON are too close, the information on the measurand could be lost in the uncertainty or in the resolution of the measurement.

Validation using tracking simulations
The aim of this section is to validate numerically the model proposed in section "Methods", by exploiting the parameters of the machine CERN Linear Electron Accelerator for Research (CLEAR) 11 . Several simulations were carried out by scanning the focal length of the quadrupole. All the equations were tested by taking into account the correlations between longitudinal and vertical planes. Then, the simulation results were compared with the ones of the analytical equations in the previous section.
Simulation setup. Tracking codes (e.g. ELEGANT, ASTRA, MAD-X, and so on) are very useful and reliable tools in order to simulate the behavior of particle bunches in accelerators 37 . These codes have been validated against a large number of different practical cases, and are currently used as reference standards in designing and commissioning modern accelerators.
Both the cases of conventional and non-conventional layout were simulated by referring to the configuration of the accelerator CLEAR. In particular, the used parameters and their corresponding values are reported in Table 1, where: α y and β y are the Twiss parameters at the entrance of the RFD; ǫ g,y is the beam geometrical emittance; σ t 0 is the bunch length; L a , L b , and L q correspond to the lengths shown in Fig. 3; L RFD is the RFD length; V t and f RF are the amplitude and frequency of the deflecting voltage, respectively; f min is the minimum focal length and depends on the beam stiffness and the type of quadrupole (the quadrupole parameters correspond to the QL3 magnets used in CLEAR 38 ); and f * is the focal length to zero the calibration factor (reported in Eq. 18). The total distance between the RFD and the screen was kept constant in the simulations.
Simulation results. The comparisons between theoretical values (solid and dashed lines) and the simulation results (stars and dots line) for K CAL , σ y s,OFF , and σ y s,ON are shown in Fig. 4a-c respectively.
The dashed lines and the dots are used for the case of the conventional layout, while the solid lines and the stars for the non-conventional layout.
For the conventional layout, the values of the K CAL , σ OFF , and σ ON do not depend on the focal length, owing to the absence of the quadrupole. Conversely, for the non-conventional layout, the values change with the focal length of the quadrupole. For the sake of the simplicity, only the case of the focusing quadrupole is reported, but also the defocusing case was tested analogously. The minimum focal length used in the simulations is f * , derived from Eq. 18. Its numerical value is shown in the row before the last of Table 1. The Twiss parameter used (see Table 1) position the waist after the screen. The curve of the K CAL (for φ = 0 ) of the non-conventional layout tends to the curve of the conventional layout while at increasing the focal length, (i.e. switching off the quadrupole, see Fig. 4a). This can be explained from Eq. 9, which contains M 12 from Eq. 17. Switching off the quadrupole is equivalent to let f approach infinity. The maximum calibration factor is obtained in the absence of the focusing quadrupole.
In Fig. 4b, all the points of the solid line (i.e. σ y s,OFF in the non-conventional layout) above the dashed line (i.e. σ y s,OFF in the conventional layout) correspond to over-focusing, where the quadrupole is making the beam on the screen larger than in the case without quadrupole. On the other hand, there are values of focal length that make σ y s,OFF smaller than the value obtained with the conventional layout. The minimum of σ y s,OFF corresponds to the focal length that imposes the waist at the screen position. www.nature.com/scientificreports/ In the considered range, all the values of σ y s,ON of the non-conventional layout are smaller than the values of the conventional layout for all the focal lengths, as seen in Fig. 4c.
A satisfying agreement between the theory and the simulation is achieved: for K CAL , σ OFF , and σ ON , the maximum difference is less than 0.6% . From Eq. 19 it is possible to see that to have a good measurements a relatively large difference between σ y s,ON and σ y s,OFF would be needed. Thanks to the flexibility added by additional Table 1. CLEAR-like parameters used in the ELEGANT simulations, where: α y and β y are the Twiss parameters at the entrance of the RFD; ǫ g,y is the beam geometrical emittance; σ t 0 is the bunch length; L a , L b , and L q correspond to the lengths shown in Fig. 3; L RFD is the RFD length; V t and f RF are the amplitude and frequency of the deflecting voltage, respectively; f min is the minimum focal length achievable by the quadrupole; and f * is the focal length to zero the calibration factor (reported in Eq. 18).  www.nature.com/scientificreports/ focusing elements it is easier to achieve these conditions. The relative error, between the theoretical σ t 0 and the simulated σ t 0,m values, using Eq. 19, is defined as: The error is smaller than 0.5% (Fig. 5).
A simulation was performed using f = f * (as defined in Eq. 18), by imposing σ y s,ON = σ y s,OFF . In this case, the bunch length cannot measured, because no information on the measurand can be obtained from the size of the bunch.
In the simulations, for f approaching f * , the error is still lower than 3% , but this is an artifact because the resolution of the screen is not taken into account.

Correlations between longitudinal and transverse position.
In this section, the effects of the correlations between the particle longitudinal positions and the position/divergence in the vertical plane are analyzed. In particular, the correlation terms of Eq. 11 (proportional to σ y 0 t 0 and σ y ′ 0 t 0 ) are compared with the simulation results. Furthermore, the cancellation of the correlation terms is validated with simulations (see Eq. 12) in Fig. 6.
The correlation terms between the planes are defined as: where r y 0 t 0 and r y ′ 0 t 0 are the correlation factors between the particle longitudinal positions and the vertical positions, and between the particle longitudinal positions and the vertical divergences, respectively.
Simulations at two different RF phases ( 0rad and πrad ), and varying the correlation coefficients r y 0 t 0 and r y ′ 0 t 0 , are shown in Fig. 6a and b, respectively. In the figure, the correlation coefficients are scanned, with the RFD phase equal to 0rad and πrad . In the scan, the correlation coefficients are equal, and the notation is simplified correspondingly: r yt = r y ′ t = r.
Five correlation coefficients were chosen ( −80% , −30% , 0% , 30% , 80% ). In Fig. 6a and b, σ y s,ON (0) and σ y s,ON (π) are plotted respectively (theoretical results from Eq. 11 with dashed line and simulation results with dots). The value of σ y s,ON (0) and σ y s,ON (π) are only equal when the correlation coefficients are zero. In Fig. 6c, the average of the squared value between σ y s,ON (π) and σ y s,ON (0) is shown (Eq. 12). A satisfying agreement between theoretical values and simulation results (error less than 1%) was experienced.

Experimental verification
A preliminary experimental validation at the CERN facility CLEAR was carried out. The preliminary experimental campaign consist of twofold main test sessions, with the quadrupole off and on, corresponding to both the conventional and non-conventional layouts: (i) verify that, in the same beam conditions, compatible values of bunch length are measured, and (ii) compare theoretical, simulation, and measurement results, for the vertical centroid position versus RF phase. cLeAR case study. The proposed method was implemented in CLEAR, an electron linear accelerator located at CERN 39 . CLEAR mainly aims to general accelerator research and development, as well as to component studies for existing and future accelerators.
CLEAR is based on a broad internal and external user community 39 . CLEAR was used as case study for the measurement method proposed here, because a quadrupole triplet is installed between the RFD and the screen. www.nature.com/scientificreports/ The relevant part of the layout of the CLEAR machine is shown in Fig. 7. A more detailed view of the location, where the RFD is installed, is shown in Fig. 8. The main parameters of the CLEAR machine are summarized in Table 2.
The particle beam is described by the Twiss parameters measured at the entrance of the first quadrupole in the beam line.

Measurement validation.
In this section, the results of the experimental validation are shown for the conventional and non-conventional layout. The explored RF phase range is 0.174rad . The current in the quadrupole is 58A , corresponding to a focal length of 1m, chosen intentionally far from the value of f * (from Eq. 18). In the measurements, the bunch energy is 200MeV , the charge 80pC , and the deflecting voltage 3.9MV . When the quadrupole is off (conventional layout), σ y s,OFF = 183µm , while when on (non-conventional layout), σ y s,OFF = 147µm.
In Fig. 9a and b, the vertical centroid ( C y s,ON ) versus the RFD phase is shown around 0rad and πrad , respectively, for both the conventional and non-conventional layout. The measurements are pointed out with points (circle and star for conventional and non-conventional layout, respectively), the theoretical values with lines (solid and dashed for conventional and non-conventional layout, respectively), and the simulations with points www.nature.com/scientificreports/ (cross and plus sign for conventional and non-conventional layout, respectively). The 1-sigma repeatability bar for each RF phase is the standard deviation of 10 measurements. The K CAL can be evaluated in both cases from the data shown in Fig. 9, using Eq. 8, and for the conventional layout is equal to 7.37 · 10 11 m/s , while for the non-conventional layout, K CAL is equal to 3.30 · 10 11 m/s. Figure 9 highlights a satisfying agreement between measurements, simulations, and theory (the maximum absolute error, between measurements and theory, is in the range between 0.019 and 0.34 mm). Furthermore, the bunch length evaluated using Eq. 19 is exactly the same, within experimental errors, for both configurations: 1.9 ± 0.3 ps . All the results are consistent with the theory prediction.  Table 2. CLEAR machine parameters, where: ǫ g,y is the beam geometrical emittance; β y and α y are the Twiss parameters at the entrance of the RFD; L a , L b , and L q correspond to the lengths shown in Fig. 3.

Discussion
The non-conventional layout opens new opportunities with a strong impact on the accelerators physics community: (i) increase in the input dynamic range of the measurement, giving rise to a further enhancement in resolution and precision; and (ii) measurement of the correlations between the vertical plane and the longitudinal position, by varying the focusing power of the quadrupole. For the latter point, the correlation terms can be picked up from Eq. 11, by assessing the difference between the two σ y s,ON in phase opposition: where τ is the sum of the correlation terms, each one multiplied by known factors. In the non-conventional layout, the two correlation terms have different dependence on the focal length of the quadrupole, making it possible to isolate and quantify their individual effects. In fact, the terms M 11 is multiplied by the correlation terms σ y 0 t 0 , and the term M 12 is multiplied by the correlation terms σ y ′ 0 t 0 . This consideration is not valid in the case of the conventional layout 41 .

conclusion
In this paper, the effect on the bunch length measurement technique of additional focusing elements between the RF deflector and the screen has been analyzed and modeled. All the derived equations have been numerically validated by means of the ELEGANT code. Moreover, a preliminary experimental validation has been carried out at the CLEAR facility. A good agreement have been found for all the physical quantities, as well as in terms of accuracy and precision, between: theoretical predictions, simulations results, and measurements. From the theoretical derivation, the following conclusions are obtained: (i) a calibration factor with the same meaning as in the conventional layout can be defined in a sound way; (ii) the absence of additional terms which could introduce systematic errors is shown, (iii) the possibility of removing correlation effects is preserved, by first two independent measurements of the spot size with the RFD on in phase opposition, and then by assessing the average between their squared values, and (iv) thanks to the dependence of the beam sizes on the focal length a wider range of beam parameters can be exploited at the entrance of the RFD. Furthermore, a critical value of the focal length preventing the measurements to perform, and thus to be avoided, was identified. In conclusion, the non-conventional layout was validated satisfyingly.
Both the calibration factor and the σ y s,OFF with RFD off depend on the focal length of the focusing element. For this reason, the optimum resolution is not necessarily obtained by minimizing the beam size on the screen with the RFD off, like in the conventional layout. While this implies a more complex experimental configuration, it opens up the possibility of a further enhancement in input dynamic range, making available further improvement of resolution and precision.
In the future, a full study, including a more comprehensive experimental validation campaign, will be carried out. First, the optimum focal length maximizing the resolution and the precision, is to be identified. Then, the achieved metrological performance is to be compared for the conventional and non-conventional layout. Besides, as discussed above in section "Discussion", the additional advantage of measuring the correlations is to be further investigated and proved experimentally.