## 2 Materials and Methods
### Particle Beams and Experimental Setups  
In order to explore a wide range of MGD operating conditions, this work presents measurements performed with two particle beams and different beam delivery systems and time structures. The conditions are summarized in Table 1.  
The synchrotron of the Centro Nazionale di Adroterapia Oncologica (CNAO Pavia, Italy) [14] can deliver both protons and carbon ions at clinical energies. In order to test the effect of different charge recombination due to different particle type, all the measurements were made with carbon ions. The CNAO beam time structure features a spill-based particle delivery, but on average, the fluence within each spill, 1 s long, is assumed to be continuous. To maximize the probability of charge recombination, the lowest energy of 115 MeV/u was selected, and the beam dimension was squeezed to \(\sim\)5 mm of FWHM [15], and the MGD was placed close to the nozzle, thus reducing the particle spread due to the multiple scattering in air. Three beam intensities were used, and the MGD bias voltage was changed in the range 13-400 V for each one. A fix number of carbon ions (10\({}^{8}\)) was planned for each test, and multiple measurements in identical conditions were performed for the error evaluation. Figure 2a shows the MGD in the CNAO treatment room, which was placed close to the nozzle on the couch. The commercial IBA Cyclone 18/18 cyclotron in operation at Bern University Hospital (Inselspital) in Switzerland [16] provides proton beams at the energy of 18 MeV, with a maximum extracted current of 150 \(\upmu\)A and with a continuous delivery time structure. Lower beam energies can be obtained by means of passive absorbers. Eight out-ports are available in this facility, two of which are used for research purposes. The former is equipped with a solid target station for non-conventional radioisotope production, and the latter one is connected to a Beam Transfer Line (BTL) ending in a separate bunker for multidisciplinary research activities. Thanks to a specific method to obtain stable beams \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Particle**} & **Accelerator** & \multirow{2}{*}{**Energy**} & **Averaged** & \multirow{2}{*}{**FWHM**} & \multirow{2}{*}{**Facility Name**} \\  & **(Beam Delivery** & & & & \\  & **Time Structure)** & & & & \\ \hline \multirow{3}{*}{Carbon ions} & Synchrotron & \multirow{3}{*}{115 MeV/u} & 6 \(\times\) 10\({}^{6}\) ions/s & \multirow{3}{*}{\(\sim\)5 mm} & Centro Nazionale di Adroterapia Oncologica \\  & (continuous within & & 2 \(\times\) 10\({}^{7}\) ions/s & & (CNAO, Pavia, Italy) \\  & the spills) & & 3 \(\times\) 10\({}^{7}\) ions/s & & \\ \hline \multirow{3}{*}{Protons} & Cyclotron & \multirow{3}{*}{15 MeV} & 50 pA & \multirow{3}{*}{20 mm} & Bern University Hospital (Bern, Switzerland) \\  & (continuous) & & 550 pA & & \\ \hline \multirow{3}{*}{Protons} & Cyclotron & \multirow{3}{*}{62 MeV} & \multirow{3}{*}{10\({}^{11}\) protons/s} & \multirow{3}{*}{40 mm} & CATANA at Laboratori \\  & (pulsed; 1 Hz, 500 \(\upmu\)s & & & \\ \cline{1-1}  & pulse duration) & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Main characteristics of the beams used for the tests presented in this work. Figure 2: Pictures of the experimental setup for the MGD tests at the end of the Beam Transport Line in the three research rooms, (**a**) CNAO, (**b**) Bern University Hospital, (**c**) CATANA. down to currents in the pA range [17] together with steering and focusing magnets used to focus the beam spot down to a few mm\({}^{2}\), we tested the detector in the research beam line with three currents (50, 350 and 550 pA) and 20 mm FWHM beam size. For the measurements described in this paper, the beam was extracted into air at 15 MeV through a titanium window, with a set-up similar to the one used for radiation hardness studies [18]. The position and the beam were measured on-line by means of a UniBeaM detector [19] and a two-dimensional profiler based on doped silica fibers passed through the beam.