## 2 Materials and Methods
### Spatial Resolution  
A QA procedure in hadron therapy requires not only an accurate dose calculation, but also a high spatial resolution. A high spatial resolution of the 2D dose distribution is important because most of the treatment plans in Pencil Beam Scanning (PBS) are characterized by very high \"in-field\" dose gradients. Distal falloff values defined as the distance between the distal position of the 80% and 20% dose levels, \(\rm{z_{80-20}}\), at intensity-modulated proton therapy can reach 4 mm, which corresponds to a gradient of 15%/mm [28; 29]. Therefore, it is critical to validate that the required dose is delivered exactly where needed to spare the healthy tissue. The resolution of the LaGEMPix can be compared with that of commercially available 2D detectors, using the appropriate definitions applied by manufacturers and medical physicists. For example, the company PTW (PTW-Freiburg, Lorracher Strasse 7, 79115 Freiburg, Germany, Web: [[https://www.ptwdosimetry.com/](https://www.ptwdosimetry.com/)]([https://www.ptwdosimetry.com/](https://www.ptwdosimetry.com/)), accessed on 21 February 2021) uses the distance between the ionization chambers to define the spatial resolution of their two-dimensional arrays [30]. On the other hand, the spatial resolution of IBA (IBA Dosimetry, Bahnhofstrasse 5, 90592 Schwarzenbruck, Germany, Web: [[https://www.iba-dosimetry.com/](https://www.iba-dosimetry.com/)]([https://www.iba-dosimetry.com/](https://www.iba-dosimetry.com/)), accessed on 21 February 2021) detectors is stated as the pixel size for the myQA(r) SRS* and Lynx, or as the pixel pitch for the Giraffe [31]. The spatial resolution of dosimetry equipment used at hadron therapy facilities is often given as the value provided by the manufacturer [32; 33; 34]. The pixel size or pixel pitch limit the system's spatial resolution. Moreover, they are not the only factors that contribute to its true or effective measured value. ISO 12233:2017 raises awareness to the various connotations of the term \"spatial resolution\", stating that \"the term resolution is often incorrectly interpreted as the number of addressable photoelements\" [35]. The spatial resolution can be defined, on the other hand, as the ability to differentiate objects that are found within a certain distance from each other. ISO 1233:2017 states that the visual resolution is the maximum value of the spatial frequency at which the individual black and white lines of a test pattern can no longer be distinguished by the human eye. This observation is also called vanishing resolution and corresponds to a modulation transfer function (MTF) of roughly 10-20% [36]. To estimate the effective spatial resolution of the LaGEMPix, we used three methods. The first method is based on the evaluation of the Edge Spread Function (ESF), which describes the response of the system to a sharp edge (discontinuity). The second method determines the Line Spread Function (LSF) of the system in one dimension. The goal is to evaluate the capability of the LaGEMPix to resolve the adjacent points. For that, two copper masks with holes separated by different distances were imaged. Finally, a lead test pattern mask was used to evaluate the MTF of the system. A typical method consists of estimating the spatial resolution using the ESF [37]. According to the ESF method, a high-resolution system will exhibit a well-defined edge with minimum blurring. We applied this approach by measuring the projection of the straight edge of a 2.5 cm thick lead block, as explained in more detail in Section 3.2.1. Ideally, the intensity distribution should be a step-like function, where the maximum intensity corresponds to the illuminated area and zero intensity to the non-irradiated region blocked by the lead. The typical value quoted for the edge response is the full width at half maximum (FWHM) [38; 39; 40]. A region of interest (ROI) perpendicular to the edge is selected.