## 3 Results of the Beam Tests  
Measurements with the \(\pi^{3}\) detector were performed with beam currents between 20 nA and 60 nA to avoid image over-exposure. This current range is unusual for a medical cyclotron designed for radioisotope production and can be obtained by using a specific method developed by our group [7]. Images acquired with \(\pi^{3}\) are shown in Figure 5. The image taken at 360 nA (Figure 5, left) shows a clear saturation effect. At low currents, the image can be affected by inhomogeneities of the thickness of the P47 coating, as shown in Figure 5 (right) taken with an early prototype. For the measurements reported in this manuscript, a foil with very high-quality deposition was used to reduce unwanted effects to a negligible level. For a given beam condition, images were acquired in sequence during the movement of the detector all along the beam path. For the tests presented in this paper, images were acquired at the rate of 8 images/s. For a full pass, a path of 660 mm was covered in 3 min. The images were processed using the Python software. As shown in Figure 6, the projections were fitted using a generalized Gaussian curve to calculate the position of the center and the sigma of the beam. The width of the beam and the rotation angle were stored for each image to obtain a full 3D reconstruction of the beam profile. For these first beam tests, the performance of the \(\pi^{3}\) detector was studied using three different beam optics configurations: (1) disabling the MBL magnets (the currents of the two MBL quadrupoles are set to zero), which is equivalent to move the \(\pi^{3}\) detector along a drift space; (2) a beam focalized by the BTL entering the MBL (the currents of the two MBL quadrupoles are set to 40 A); (3) a flat beam entering the MBL (the currents of the two MBL quadrupoles are set to 0 and 75 A for the first and second quadrupole, respectively). The position in \(x\) and in \(y\) on the beam center is shown in Figure 7 as function of the position along the MBL for the three chosen cases. The error bars correspond to the dominating systematic uncertainty estimated to be of 0.3 mm, mostly due to the accuracy of the mechanics (see laboratory tests described in Section 2). The center of the first quadrupole of the MBL is located at 0, where the beam enters the MBL, while the center of the second quadrupole is located at 220 mm. Tiny effects are visible, demonstrating the high sensitivity of the \(\pi^{3}\) detector. In Figure 7 (top) the drift of the beam is clearly observed. The linear decrease in the \(x\) direction is due to a non-perfect alignment of the MBL with respect to the beam path. In Figure 7 (center and bottom), the modest kinks are due to steering effects of the quadrupoles. In fact, the beam was not perfectly centered with respect to the quadrupole axis. It must be noted that some data are missing due to transmission saturation problems between the CCD and the Raspberry Pi computer. Figure 5: 2D images taken by the \(\pi^{3}\) detector with beam currents of 360 nA (**left**) and 60 nA (**right**). The evolution of the sigma of the beam was studied for the three cases, as shown in Figure 8. The error bars come from the results of the fits. For the first configuration (Figure 8, top), the beam was focused only by the BTL magnets. In this case, the foil and the camera were moved along a drift space, and the sigma increases in both planes as expected. In the second case (Figure 8, center), the beam is focused at the MBL entrance by the BTL magnets and refocused in the MBL. The overall effect results in a small focusing of the beam in the vertical plane, as compared with the drift space, whereas in the horizontal plane it remains basically the same. It must be noted that the focusing power of the BTL is much higher with respect to the one of the MBL. In the third case (Figure 8, bottom), when a flat (not focalized) beam enters the MBL, the MBL is able to reduce the sigma in both planes.