{'fraction_non_alphanumeric': 0.03189759194166098, 'fraction_numerical': 0.017470227165416297, 'mean_word_length': 4.371090448013525, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An adjustable focusing system for a 2 MeV H- ion beam line based on permanent magnet quadrupoles

A compact adjustable focusing system for a 2 MeV H- RFQ Linac is designed, constructed and tested based on four permanent magnet quadrupoles (PMQ). A PMQ model is realised using finite element simulations, providing an integrated field gradient of 2.35 T with a maximal field gradient of 57 T/m. A prototype is constructed and the magnetic field is measured, demonstrating good agreement with the simulation. Particle track simulations provide initial values for the quadrupole positions. Accordingly, four PMQs are constructed and assembled on the beam line, their positions are then tuned to obtain a minimal beam spot size of (1.2 x 2.2) mm^2 on target. This paper describes an adjustable PMQ beam line for an external ion beam. The novel compact design based on commercially available NdFeB magnets allows high flexibility for ion beam applications.


Introduction
Magnetic quadrupoles are commonly used for focusing charged particle beams in accelerators. Mostly, electromagnets are used to achieve magnetic fields of sufficient strength. These require electricity and cooling, and are usually the best choice for high energy beam lines. However, in recent years developments in the field of permanent magnets have allowed for the use of permanent magnet multipoles in beam lines [1].
In this paper we report of the design and construction of a focusing system for a 2 MeV Hion beam using two FODO doublets, consisting of two PMQs each. This high energy beam transport (HEBT) configuration is compact, cost-efficient and easily adjustable in order to fit the needs of different experimental applications. For fixed target experimental activities, a focused beam is desired in order to obtain higher interaction rates on a target. Such a setup enables applications in material analysis such as PIGE/PIXE [2,3,4] and GRNA [5,6,7]. Another interesting option is the use of the envisioned PMQ system for beam transfer lines (BTL), where minimal beam divergence is required instead of minimal beam size. The scope of this work is to achieve small spot sizes for fixed target experiments, while maintaining maximum flexibility of the beam line.

The RFQ accelerator
The 2 MeV RFQ Linac used here was originally conceived for the calibration of the BGO calorimeter of the L3 experiment at LEP [8,9,10]. The RFQ was decommissioned in 2000 and stored at CERN. In 2009, it was recommissioned and put into operation at the University of Bern. The accelerator provides a pulsed 1.92 MeV Hion beam at a repetition rate in the range of (10-150) Hz. The peak current and the pulse width are adjustable in the range (1-5) mA and (1-25) µm, respectively. In the extraction beam line, beam cross sections between (5 × 5) mm 2 and (50 × 50) mm 2 can be obtained.

Beam emittance
The nominal value for the normalised transverse output emittance (90% of the full beam) of the RFQ Linac is < 0.6 π mm mrad, given by the manufacturer [11]. This corresponds to a geometric output emittance (90%) of < 9.4 π mm mrad. As the RFQ was completely dismantled and recommissioned several years later, it was necessary to revise this figure. An emittance measurement using the "pepper-pot" technique was conducted [12]. A stainless steel hole-plate is placed in the beam line, thereby splitting the beam into several beamlets of equal size, which are equally separated by the distance d between two holes. At a certain distance L downstream of the plate, a beam monitor M is placed, which measures the position and intensities of these beamlets. A scheme of this setup is shown in Fig. 1a. In this paper, a stainless steel hole-plate of thickness 0.5 mm with a (a) (b) Figure 1: (a) Scheme of the "pepper-pot" method [12] and (b) measured 2D dataset.
25 × 25 matrix of holes was used, positioned at a distance z 0 = 310 mm from the RFQ output plane. The hole diameter was 0.5 mm, with a distance between holes of 1 mm. The monitor consisted of a 1 mm thick glass plate placed at L = 62 mm downstream of the hole-plate, producing scintillation light as a result of the incoming beamlets. The amount of scintillation light produced corresponds to the intensity of the beamlets and was measured using a linear-response CCD camera. This 2D dataset was then processed in the following way [12,13]: After subtracting the camera background from the image dataset, a small correction on the rotation of the camera was done using bilinear interpolation. Furthermore, noise was subtracted and false signals removed (e.g. reflection of light on the edges of the glass scintillator). For each beamlet, the intensities I(x) and I(y) through the centre of hole-plate (Fig. 1b) were then determined and their derivatives dI(x)/dx and dI(y)/dy calculated. The maxima and minima of the derivatives indicate the projected positions of the edges of each hole on the monitor. The points in trace space (x, x , y, y ) at the hole-plate (Fig. 1a) were then obtained as follows: 1. The angles u , v are calculated using the projected edges of the hole-plate on the screen.
2. The positions u, v are calculated using the obtained values within a few pixels around the found maxima and minima.
3. Coordinates at the monitor (u, v) are drifted upstream to coordinates at the hole-plate (x, y).
The centre hole on the hole plate was designed to be 20% larger for reference, thus it needed to be normalised in the dataset. The points in trace space were then extrapolated upstream to the RFQ output plane: Finally, ellipses were fitted around the data points in trace space, containing 90% of the particles (Fig. 2). Results show that at current settings, the transverse output emittances (90%) are 5.4 π mm mrad and 4.9 π mm mrad for the x and y coordinates respectively, a relatively small figure with respect to the value given by the manufacturer. These measured values were used as input for the beam line simulations reported in this paper.

Design of the PMQs
A Halbach array is an array of permanent magnets designed to augment the magnetic field on one side of the array, whereas cancelling it on the other. Such an array can be arranged into a ring, which is often called Halbach cylinder. This arrangement of permanent magnets creates a magnetic multipole, depending on their direction of magnetisation. Typical designs use 16 trapezoidal permanent magnets with a residual magnetisation B r to create a "ring" with an inner radius r i and an outer radius r o . The resulting field inside such a quadrupole (distance from axis r < r i ) is where K is a constant depending on the number of magnets M used to create the PMQ. For M = 16, K = 0.94 and for M = 8, K = 0.77 [14]. The former design is shown in Fig. 3a.
In this paper, a magnetic quadrupole using eight identical square permanent magnets as in Fig. 3b is used. Criteria for choosing an optimal design included high field gradients, commercial availability of the magnets, and cost. The result is a compact, light, highly flexible PMQ which is easily disassembled and reassembled, and cost effective.
Beam simulations of the envisioned setup were conducted to determine approximate requirements for the PMQs, resulting in field gradients of the order of 60 T/m and a PMQ length of 40 mm. Accordingly, the design implemented contains eight cuboid nickel-plated NdFeB magnets of dimensions (40 × 10 × 10) mm 3 with a residual magnetisation of 1.3 T (grade N42) [16]. These are supported by a metal frame on the outside and a stainless steel pipe (Ø = 25 mm) on the inside. The magnets are kept in place by a lid on each end, attached with four stainless steel screws. A 3-D rendering of the PMQ is shown in Fig. 4. Materials with low relative magnetic permeabilities µ r = µ/µ 0 had to be chosen for the supporting frame, as materials with high µ r would weaken the field at the centre of the PMQ. Due to its easy workability and a relative permeability of µ r = 1.000022 [17], aluminium was chosen for the frame in the final implementation. According to Eq. 2.1, the magnetic field gradient G = ∂ B ∂ r at the longitudinal centre of an 8-piece PMQ should equal 71.2 T/m. As the magnets are not trapezoidal, this value is expected to be slightly smaller. The generated magnetic field of the described design was therefore simulated with Comsol 1 and is Concerning the longitudinal field component, fringe fields must be taken into account. Therefore, the longitudinal field at a radius r = 5 mm (Fig. 6) was extracted from the 3D simulations and used as input for later particle track simulations. The integrated field gradient was found to be G(z) dz = 2.35 T.

Particle transport simulation
For the beam line, a lattice of two FODO doublets was realised by four PMQs. Due to the focusing strength being constant for a given PMQ, the necessary degrees of freedom for beam steering must be obtained by adjusting the drift distances between elements d i . This is shown schematically in   For particles entering the beam line at 1.92 MeV, calculations of single particle tracks were made using the simplified case of decoupled 2x2-matrices [18,19]. This simplification is valid assuming a short beam line with L < 1 m in which the quadrupoles are ideally aligned, and dispersion effects and transverse coupling are therefore negligible. The simulation was written in Matlab 2 , with which a Monte-Carlo simulation (MCS) using 10 3 particles was run for many different parameter sets As input for the RFQ beam, particles with random trace space coordinates (x, x , y, y ), equally distributed within the measured emittance (Fig. 2), were used. A magnetic field map for the designed PMQ was obtained from Comsol simulations and used to estimate the focusing factor κ for each z-coordinate with step sizes dz = 1 mm, taking into account fringe fields (Fig. 6). The transfer matrix for the beam line was then obtained by sequentially mul-tiplying each matrix for a thick quadrupole lens of thickness dz. It is to be noted that space charge effects were not taken into account.
The drift parameter set had to be chosen within certain boundary conditions (d 1 ≥ 200 mm; d i ≥ 20 mm, i = 1) and optimised. Using an iterative algorithm, a number of local optima were found, one of which was the parameter set [262 27 248 17 46] mm, resulting in a spot size of (0.92 × 0.88) mm 2 . The simulated particle tracks for this setup are shown in Fig. 8. A fraction of the beam is lost to the beam pipe due to the initial defocusing in the x-coordinate. This cannot be completely avoided due to the size of the beam pipe and the minimal distance at which the first PMQ can be positioned in our experimental setup. A possibility for reducing beam losses by a few percent would be the construction of two DOFO doublets, seeing as the beam divergence is slightly larger in the horizontal coordinate (see Fig. 2). This could easily be achieved without realigning the quadrupoles by rotating the entire beam pipe by 90 • . Because the requirements for beam spot size depend highly on the envisioned applications of the ion beam, a minimisation of beam losses is in general not essential.

Construction of the PMQs
Following the results of the simulations, a prototype of the designed PMQ was constructed at the Laboratory for High Energy Physics (LHEP) in Bern. For easier machinability and assembly, the aluminium supporting frame consists of sixteen semicircle plates of 5 mm thickness. These are assembled on a steel test piece of the same dimensions as the beam pipe (Ø = 25 mm), held in place by four stainless steel aglets. The NdFeB magnets can then be inserted. Finally, the "lids" are assembled, again consisting of four individual semicircle pieces. These are fixed with four stainless steel screws, making it impossible for the magnets to move within the frame (Fig. 4).

Magnetic field in the PMQs
To confirm the validity of the magnetic field simulations, the PMQ was mounted on a test piece with the same diameter as the beam pipe of the RFQ linac. The magnetic field strength was then measured at various transverse positions at the longitudinal centre of the PMQ using a Hall probe 3 . Results are presented in Fig. 9. For the radial dependency, the measurements were consistent with the simulations with the simulated line lying well within the error bars of the measurement points (Fig. 9a). For the angular dependency, slightly higher field strengths were found close to those magnets orientated towards the centre of the PMQ (Fig. 9b). This is to be expected, as a Halbach cylinder does not generate an ideal quadrupole field [14]. This modulation may be due to a slight misalignment of either the PMQ or the Hall probe, or to non-linear field errors. To study these effects, a full 3-D mapping of the magnetic fields within each constructed quadrupole would be necessary. Within the scope of this work, a simplified model is used: The magnetic field strength is less homogeneous close to the magnets, but becomes more homogeneous near the transversal centre of the PMQ, which is why the magnetic field is later assumed to be angle-independent with a maximal field gradient of G max = 57 T/m at the longitudinal centre of the PMQ.

Tuning the beam line
After successfully testing the magnetic field of the PMQ prototype, four additional PMQs were manufactured. The field strength and homogeneity of 50 permanent magnets were measured using the Hall probe. On this basis, a selection of 8 similar magnets was made for each PMQ, in order to minimise deviations from an ideal quadrupole field [14]. The PMQs were arranged into two FODO cells on a stainless steel beam pipe at the positions calculated in the previous sections, as shown in Fig. 10. The longitudinal position of each PMQ can be varied manually by sliding them along and turning them around the pipe axis. The effect of a certain PMQ's position and orientation on the beam can be observed in real-time on a scintillating glass plate (located inside the beam pipe) through a borosilicate window. In order to better tune the beam line, a simple device was constructed for moving the glass plate along the beam line without breaking the vacuum. The plate has a thickness of 1 mm and a diameter of 20 mm, and is fixed within a magnetic holder. The holder can be shifted along the beam line by dragging it with a small magnet on the outside of the beam pipe. No effect on the beam could be seen due to this additional magnet.

Beam spot size at target position
The size of the beam was estimated using photographs of the glass plate taken with a camera at fixed position. The beam "width" and "height" were estimated via the projected beam intensity profile onto the x and y axis. This was done using the FWHM of the intensity profile, as well as the width containing 90% of the integrated intensity profile (indicated as 90%INT). An example for the measured spot size is given in Fig. 11. An absolute uncertainty ∆x i = ∆y i = 1 mm was assumed for the measured beam spot sizes.
The beam spot sizes were measured for 12 different PMQ configurations at 2-3 target positions on average, yielding a total of N = 30 measured beam spots. The comparison between simulation x sim i and measurements x meas i (using the 90%INT beam size) was done using a quality figure of merit that was defined as follows: The average values were found to beχ 2 x = 3.35,χ 2 y = 5.27. The average simulated beam loss in the horizontal plane was 30%, though the true value is expected to be lower as the beam intensity is not equally distributed within the 90% emittance. Examples for the agreement between the simulated and the measured beams are given in Fig. 12 and Fig. 13. A quantitative comparison is shown in Table 1. For all measurements, we observed that χ 2 x < χ 2 y ; this is most likely caused by the beam Figure 11: Estimation of the beam spot size. Original image (above left, units are pixels), processed image after background subtraction (above right), and projected intensity profiles onto x-and yaxes (below). The camera resolution is ∼ 15 px/mm. The estimated spot sizes using the FWHM (yellow) and the 90%INT method (green) are shown.
collimation in x-coordinate on the beam pipe wall, thereby removing contributions of the beam which lie outside the 90% emittance. Finally, the PMQ positions were adjusted iteratively to tune the beam line, reaching a minimal beam spot for the drift distance parameter set [229 21 159 20 203] mm (shown in Fig. 10). The final beam size on target was (1.2 × 2.2) mm 2 , shown in Fig. 14. The particle intensity was estimated using the integrated beam current and the simulated beam losses, resulting in a value of 2.9 · 10 14 cm −2 s −1 . It should be noted that the obtained minimal beam spot size is a factor 3 higher than the simulated optimum, this is likely due to non-linear contributions to the magnetic field which may limit the achievable minimal spot size. Further optimisation of the beam line is possible, should a specific application require smaller spot sizes.

Conclusions
The scope of this work was the realisation of a beam line for a 2 MeV Hion beam to enable fixed target experiments that require small spot sizes. The high energy beam transport section for an RFQ Linac was realised by means of four permanent magnet quadrupoles. Eight cuboid NdFeB permanent magnets with a residual magnetism of 1.3 T were used to construct Halbach cylinders, arranged in a manner to generate quadrupole fields. The magnetic fields inside the PMQs were simulated using Comsol, the obtained values were confirmed experimentally using a Hall probe. The integrated field of the PMQs was found to be 2.35 T with a maximal field gradient of 57 T m −1 .
An emittance measurement provided the initial parameters for the beam optics simulations. A Monte-Carlo particle track simulation code using Matlab and iterative optimisation was employed to find ideal PMQ positions for minimal spot sizes. Starting from these parameters, the PMQs were slid along the beam pipe to tune their positions to an optimum in the experimental setup. The minimal achieved spot size was (1.2 × 2.2) mm 2 , resulting in a particle intensity of 2.9 · 10 14 cm −2 s −1 , beam losses included. The beam was made visible on a moveable scintillating glass plate, observable through a vacuum window. The measured spot sizes agreed with the simulation sufficiently well, though the agreement for the x-coordinate was better than for the y-coordinate. This is most likely due to the horizontal collimation of the beam on the beam pipe wall following the first quadrupole.
Though this work concentrated on realising a small beam spot, the same beam line could be adjusted to obtain a parallel beam (minimal divergence) which would be useful in beam transfer lines. To the authors knowledge, this paper describes the first adjustable PMQ beam line for an external ion beam. The novel compact design based on commercially available magnets allows high flexibility for ion beam applications at low cost.