A Simple Approach for Experimental Characterization and Validation of Proton Pencil Beam Profiles

A precise characterization of therapeutic proton pencil beams is essential for the commissioning of any treatment planning system (TPS). The dose profile characterization includes measurement of the beam lateral dose profile in the beam core and far from the beam core, in the so called low-dose envelope, and requires a sophisticated detection system with a few orders of magnitude dynamic range. We propose the use of a single-quantum-sensitive MiniPix Timepix detector, along with an in-house-designed holder to perform measurements of the pencil beam dose profile in air and in water. We validated the manufacturer calibration of the MiniPix Timepix detector in proton beams of various energies and compared the deposited energy spectra to Monte Carlo (MC) simulations. The precision of the lateral dose profile measurements has been systematically validated against Krakow proton facility commissioning data and dose profile simulations performed with MC codes Gate/Geant4 and Fred. We obtained an excellent agreement between MiniPix Timepix measurements and simulations demonstrating the feasibility of the system for a simple characterization and validation of proton pencil beams. The proposed approach can be implemented at any proton therapy facility to acquire experimental data needed to commission and validate analytical and MC-based TPS.


INTRODUCTION
The dosimetric advantage of proton beams in radiotherapy is due to their depth-dose distribution (Bragg curve), which allows us to minimize the dose deposited in healthy tissues and to maximize it in the tumor region [1,2]. After many years of research and development, a growing interest in proton radiotherapy is observed. According to data provided by the Particle Therapy Co-Operative Group (https://www.ptcog.ch/, 2020), there are 91 proton (or proton and carbon ion) radiotherapy facilities in operation, 33 under construction, and 27 in the planning stage all around the world. Upon startup of each new proton facility, for the purpose of launching a treatment planning system (TPS), a commissioning of the proton pencil beam is required. The beam commissioning, which includes, e.g., an experimental characterization of lateral and longitudinal beam profiles, is a demanding and time-consuming experimental procedure. In this paper, we propose a new approach for characterization of lateral beam profiles in air and in water to simplify the procedure of beam data library acquisition and TPS commissioning.
The procedure of dosimetric commissioning and validation of single pencil beams was established and applied by several ion beam therapy facilities [3][4][5]. It is usually performed within commercially available active and/or passive dosimetry systems. However, the existing solutions do not offer dynamic range, and the possibility to perform measurements in water with single quantum sensitivity has not been reported as feasible when using only one device. Passive dosimetry (TLD, photochromic films) might have wider dynamic range, but the dose is integrated. Such detectors often require technologically complicated and timeconsuming post-processing, and the response is often dependent on the LET. Scintillator-based detectors, such as Lynx, show a dynamic range of two orders of magnitude and cannot be easily used in water due to its large size. Active dosimetry with ionization chambers requires a complex correction procedure for temperature, pressure, recombination effect, etc. Moreover, none of these methods are single-quantum sensitive.
The state-of-the-art experimental approach for proton beam commissioning is to measure lateral dose profiles in air with a scintillating screen and CCD camera [6][7][8][9][10]. This method allows us only to measure the major component of the lateral beam dose profile characterized by a Gaussian distribution. In fact, primary particles scatter on the passive components of a beam delivery system, such as gantry nozzle equipment and range shifters/compensators, building up an additional dose envelope of the lateral beam profiles [6], which is recognized as a nuclear halo. The nuclear halo is often approximated in TPS by a double Gaussian model of proton pencil beam. The accurate characterization of pencil beam lateral dose profiles is particularly important for facilities using very small beam sizes as the uncertainty of the nuclear halo modeling is propagated over a greater number of beams [6,11]. Also, the effect is pronounced for small, shallowly located targets that are irradiated with a limited number of beams because the uncertainties are not averaged [11]. Still, the measurements of the dose envelope are often neglected because characterization of pencil beam nuclear halo requires dedicated detector technology with sufficient sensitivity and accuracy.
In order to compensate for the uncertainties in the beam modeling caused by the dose envelope, some of the proton centers investigate and develop new detection techniques for characterization of the lateral beam profile far from the beam core. For instance, in the Krakow proton facility, passive dosimetry [12,13] or single particle sensitive methods like scCVD diamond detectors [14] have been investigated. Refer to the following publications and their references for review of beam halo measurement approaches [15,16] and more generally proton beam commissioning protocols [17][18][19][20].
Within the commissioning stage, a validation of the beam model implementation in TPS is required, and it is typically performed by means of experimental measurements in water. The dose in complex radiation fields consisting of several pencil beams is usually measured, and, if necessary, field size factors are applied to correct for experimental and computational uncertainties of the pencil beam modeling [21]. The introduction of Monte Carlo (MC) tools in the clinical routine offers computational accuracy, allowing for consideration of the nuclear halo in patient treatment plan simulations. However, the experimental validation of single pencil beam dose profiles in water, including the nuclear halo, is even more demanding than in air because it requires operation of the detector in water. There is still a necessity to provide more accurate, fast, and easy-touse experimental methods for characterization of the low-dose envelope of proton pencil beams.
Here, we propose an alternative to the existing solutions, to be applied for measurements in air and in water with higher resolution, single particle sensitivity, and improved detector dynamic range. Our approach allows for experimental characterization and validation of lateral and longitudinal dose profiles of a proton beam halo up to 150 mm off the beam core. For this purpose, we used MINIPIX TIMEPIX semiconductor pixel detector, an in-house-developed detector holder, and water phantom. The proposed experimental setup can be used for commissioning and validation measurements both in air and in water. We measured pencil beam profiles and compared the results to the facility commissioning data, TPS calculations, and Monte Carlo (MC) simulations, demonstrating the feasibility of the approach.

Proton Radiotherapy Facility
The Krakow proton beam facility has been in clinical operation since October 2016, offering protons for radiation therapy treatment as well as for physics and radiobiology experiments. The Krakow facility offers stable beam intensities ranging from 1 to 300 nA and scanning pencil beam within an energy range from 70 to 226 MeV, which corresponds to range in water from 4.2 to 31.8 cm. The microstructure of the proton beam produced by C-235 IBA cyclotron in Krakow consists of 0.79 ns micropulses generated with the frequency 106 MHz, which is common to all beam intensity settings. The lateral beam size (1σ ) ranges depending on the proton beam energy and application of a range modulator (range shifter -RS) from about 3 to 15 mm. The RS made of 4.2 cm thick PMMA material, mounted at the gantry nozzle, is used to modulate proton range.
In Krakow, Eclipse TPS version 13.6 (Varian Medical Systems, Palo Alto, CA, US), commissioned against experimental data, is used for treatment planning. The TPS in this version is equipped only with an analytical pencil beam algorithm [22]. Longitudinal dose profile measurements were performed in water using a Bragg Peak Chamber (PTW, Freiburg, Germany). Lateral dose profiles in air were measured using LYNX scintillating screen (IBA Dosimetry, Schwarzenbruck, Germany) and thermoluminescence detectors (TLDs) in the primary Gaussian and the dose envelope regions, respectively. Eclipse TPS was used to compute 3D pencil beam dose profiles in water. In addition to the clinical TPS, the dose profiles were simulated using a secondary dose computation tool, FRED MC code [23] that was commissioned and validated for quality assurance purposes in Krakow [Gajewski et al. accepted]. The FIGURE 1 | The MINIPIX TIMEPIX detector equipped with a TIMEPIX ASIC and 300 µm thick silicon sensor (left) and an example frame obtained from the measurements (right). Clusters are produced by different particles in mixed radiation field of proton pencil beam in water. Low-LET narrow, curly tracks are typical for electrons, high-LET wide, straight tracks for energetic heavy charged particles such as protons, and low-LET straight tracks are characteristic for photons. In the right side of the frame, an example of overlapping clusters is shown. proton beam model used by the clinical TPS and FRED have been adopted for GATE/Geant4 simulations performed in this work.

MINIPIX TIMEPIX Detector and Data Acquisition Software
In this study, we propose using the technology of pixel semiconductor detectors, TIMEPIX from ADVACAM (https:// advacam.com), for characterization of therapeutic proton pencil beams and validation of TPS and MC simulations. TIMEPIX is a commercial version of MEDIPIX detector developed at CERN and is widely used for radiation research, e.g., in proton and ion beam therapy [24][25][26][27][28][29], in brachytherapy [27,30], in radiation dosimetry [31][32][33][34], in particle accelerator environments [35], or for space radiation characterization on board of the International Space Station [36][37][38]. The single particle sensitivity of the device finds applications in particle therapy as well as for very small field dosimetry needed for investigations on in-vitro and animal model systems [39].
Due to the single-quantum sensitivity and particle tracking capability, TIMEPIX technology enables particle-by-particle dosimetry of proton pencil beams in wide dynamic range. It is achievable thanks to hybrid semiconductor pixel architecture and highly integrated signal electronics (amplifier, amplitude discriminators, and digital counter). TIMEPIX processes signal from single-quantum events on-board using a megahertz frequency clock and multi-channel analyzer with 11.8k channels per pixel enabling measurement of the number of events, the energy, or the time of interaction. These features offer a wide dynamic range of the MINIPIX TIMEPIX in term of quantum sensitivity and noiseless particle type identification (neutrons, X rays, light, and heavy charged particles) as well as measurements of particle flux (from single particles up to 10 6 in event by event spectrometry tracking mode and 10 8 in integrated counting mode), linear energy transfer (0.1-500 keV/µm in silicon), or directional tracking in a wide field of view (2π solid angle) [40].
In this work, a compact MINIPIX TIMEPIX detector was used (Figure 1, left). The entire MINIPIX TIMEPIX has dimensions of 77 × 21 × 10 mm, and its total weight is 25 g. The sensitive volume of the semiconductor silicon sensor (14.08 × 14.08 × 0.3 mm) consists of a 2D array of 256 × 256 pixels, and each has dimensions of 55 × 55 µm. The ionizing particle penetrating the sensitive volume of the MINIPIX TIMEPIX produces electric charge, which is collected by adjacent electrode pixels forming a cluster. The charge collected by each pixel is converted by an analog-to-digital (ADC) converter into a signal. As long as the ADC output is not saturated and its response is linear to the collected charge, we can assume that the measured energy deposited by two or more particles in the same time and position (overlapping) is equal to a sum of the single energy depositions (non-overlapping). The signal read-out is performed in each pixel individually in a single frame acquisition time of typical length of about 1-100 ms. The MINIPIX TIMEPIX frame readout dead-time is 22 ms. Data acquisition electronics is fully integrated, connected to the computer via USB port and does not require a dedicated cooling system. The temperature effect on energy deposition measurement is negligible [41]. For more details on the TIMEPIX detector technology, refer to [40,42,43] and references.
The MINIPIX TIMEPIX detector is equipped with a data acquisition and real-time visualization software, PIXET PRO, which also provides data processing tools for cluster morphology analysis. Figure 1 (right) shows an example of data frame acquired in Krakow. The morphology of each cluster is characterized by the following: the position of the cluster center of mass, the total energy deposited, the cluster length, and the angle at which the particle enters the detector. The cluster analysis enables identification of impinging particle type [43]. The analysis of multiple clusters enables particle-byparticle experimental characterization of the mixed radiation fields consisting of primary and secondary protons, secondary electrons, photons, etc. Depending on the primary particle fluence, the single frame acquisition time needs to be adjusted for each measurement individually in order to minimize the overlapping of the clusters. The cluster overlapping effect occurs when different particles at short time intervals produce clusters, which are so close to each other that they overlap and are recognized by PIXET PRO software as a single cluster of larger energy deposition. The shortest single frame acquisition time (1 ms) determines the maximal primary particle fluence, which can be used for measurement. In case of measurements performed in the beam core, the lowest clinically available beam current (1 nA) was too high to avoid the detector saturation. Therefore, the unregulated accelerator dark current was used for measurements in the beam core and the stable beam current of 1 nA off the beam core.

Dose Calculation Engines
In this work, the dose distributions were calculated using the clinical TPS used in the Krakow proton facility (cf. section 2.1) as well as two MC toolkits: GATE/Geant4 (version 8.2), interfaced to Geant4 (version 10.4.p2) [44] and FRED MC (version 3.0.18) [23]. GATE/Geant4 is a full MC simulation engine transporting all the primary and secondary particles contributing to the dose deposition. FRED is a fast, GPU-accelerated MC tool transporting primary and secondary protons, deuterons, and tritons, whereas the energy from gammas and delta-electrons is deposited at their production point. Because the GPU parallelization and physics are trimmed down to the processes relevant for proton dose calculations, the computation time is reduced up to a factor 100 with respect to GATE/Geant4 computations running on CPU [45].

Calibration Measurements
The MINIPIX TIMEPIX detector is calibrated by the manufacturer aiming at a uniform response of each individual pixel to energy depositions from X-rays source [46]. In principal, primary and/or secondary particles can enter the detector surface at any angle, which specially occurs measuring mixed radiation field produced by a proton beam in water. In this work, we performed a validation of the detector response to proton beams impinging the detector surface at different angles. We compared the energy deposition spectra obtained experimentally to MC simulations. Moreover, the measurements allowed to determine optimal detector angle with respect to the beam core used in further acquisitions.

Experimental Setup and Data Acquisition
The MINIPIX TIMEPIX was exposed to proton pencil beams of nominal energies E70, E100, E150, and E200, corresponding to proton mean energies and energy spreads (standard deviation) at the detector position of 70.5 (0.6) MeV, 100.1 (0.8) MeV, 149.9 (1) MeV, and 199.6 (1) MeV, respectively. For each nominal energy, the detector was positioned at the isocentre in air (in the beam core) at β angles ranging from 27 • to 83 • . We defined β as the angle between the normal to the silicon sensor surface and the proton beam axis (cf. Figure 2). The accelerator dark current was used allowing to keep the particle fluence low enough to avoid saturation of the detector and to minimize the cluster overlapping.

Monte Carlo Simulations
We performed MC simulations of the calibration setup in GATE/Geant4 toolkit. The MINIPIX TIMEPIX detector active volume was simulated as a 14.08 × 14.08 × 0.3 mm 3 cube made out of silicon (ρ = 2.33 g/cm 3 , I pot = 173 eV [47]). The detector was positioned at the isocentre at β angles, mimicking the experimental conditions. For simulations of proton pencil beams, the MC implementation of the clinical beam model based on Krakow proton facility commissioning measurements was used. We used the QGSP_BIC_HP_EMZ physics list, which contains the high precision (HP) model for low-energy neutrons and the most precise electromagnetic physics (EMZ) [48]. We used production cuts in the active volume of 10 µm for protons, electrons, and gammas. For each individual calibration simulation the total number of 10 6 primary particles were simulated. Using a phase space actor in GATE/Geant4 we scored the type, energy, angle, and position of the incidence of each primary particle crossing the detector surface. The history of the interactions and energy depositions of primary and secondary particles of unique identification number (UID) was scored using a GATE/Geant4 sensitive volume.

Data Analysis
The results scored by the phase space actor and the GATE/Geant4 sensitive volume were merged based on the primary particle UID. The total energy deposited in the detector by a single primary proton was calculated as a sum of all energy depositions from the primary and secondary particles scored inside the GATE/Geant4 sensitive volume.
For each primary proton energy and detector angular position (β), the energy deposition distributions obtained from the MINIPIX TIMEPIX measurements were compared to the GATE/Geant4 simulations. Due to a simplified geometry implemented in the MC simulations, i.e., omitting the detector case and the PMMA holder, in simulations, all the primary particles entered the detector at nearly the same angle β (cf. Figure 2). In fact, in the experimental conditions, the particles can enter the detector at different angles because they scatter on the MINIPIX TIMEPIX case and on the holder. For this reason, to compare the results of measurements and simulations, we filtered out from the experimental data particles, entering the detector at an angle different than ±3 • . The β angle was obtained from the cluster morphology by calculating its track in the silicon sensor. In addition we compared the mean deposited energy measured by the MINIPIX TIMEPIX detector and simulated in GATE/Geant4 to the deposited energy calculated based on PSTAR data of proton stopping power in silicon [47].

Dose Profile Characterization
The experimental setup was used for two types of dose profile measurements. We performed lateral dose profile measurements in air to demonstrate the capability of the MINIPIX TIMEPIX detector to be used for commissioning and characterization of proton therapeutic pencil beams. Next, we performed lateral and longitudinal dose profile measurements in water to validate the pencil beam propagation performed by TPS and MC simulations.

Experimental Setup, Beam Conditions, and Data Acquisition
The MINIPIX TIMEPIX detector was positioned in a dedicated, waterproof, in-house-designed PMMA holder mounted inside the water phantom (BluePhantom 2 by IBA). We enclose the technical sketch of the PMMA holder in Supplementary Materials. The detector sensitive volume was positioned at isocentre using water phantom step motors and laser patient positioning system. Based on the step motor movement and laser positioning system accuracy, we estimate the setup positioning uncertainty as 1 mm. The MINIPIX TIMEPIX was positioned at an angle β = 45 • . See the middle panel of Figure 2 for the detector placed in the phantom (in air) without the waterproof cover and the right panel of Figure 2 for the detector placed in water.
The lateral proton pencil beam profiles in air and in water were acquired for proton beams at nominal energies E100, E150, and E200 with and without range shifter. All the measurements were performed using the lowest possible accelerator beam current of 1 nA to keep the beam current stable between measurements. The shortest acquisition time frame duration used by Timepix was 1 ms. Therefore, the time architecture of the beam is negligible for the measurements performed in the integration mode. For the 1 nA beam current, we did not perform measurements with the detector placed in the beam core (0-20 mm away from the isocentre), as, at such a current, the primary proton yield leads to detector saturation for a single acquisition frame. For dose profile measurements, the time frame duration was set by the software operator based on a real-time visual assessment of the data in the PIXET PRO software. Before starting the data acquisition, while the beam was on, the most optimal time frame duration was selected allowing acquisition of the maximal possible number of clusters in one frame and avoiding cluster overlapping effect. The total acquisition time of each measurement in single point of radiation field depends on particle fluence, and it was from 20 to 40 s and thus resulted in the order of 10 4 -10 6 registered single particle events (clusters). In total, we performed 26 proton pencil beam lateral and longitudinal dose profile measurements.
For measurements in air, MINIPIX TIMEPIX was positioned at the gantry room isocentre, and lateral profiles were acquired at the distance from 30 to 180 mm away from the isocentre. Following the measurements in air, BluePhantom 2 was filled with water. See Figure 3 for simulated 2D dose distributions of proton pencil beams in water with and without range shifter for three investigated nominal proton beam energies. Note that each detector position along the axis of measurement data acquired with a 2D MINIPIX TIMEPIX detector is integrated to one measurement point corresponding to center of mass of the detector surface. This is because the analysis of the acquired data has shown that the particle fluence and energy deposition gradient within the 14 × 14 mm 2 detector frame do not vary for measurement points from 45 to 150 mm away from the beam core. The dose distributions are overlapped with lines indicating which lateral and longitudinal dose profiles were measured. We measured lateral dose profiles at three depths, at 1/2 and 3/4 of the proton beam range, and as in the Bragg peak position. For 150 MeV proton beam, the longitudinal profiles were measured at the distance of 25, 37, 49, and 61 mm away from the isocentre.

Monte Carlo Simulations
The dose distributions in water for the nominal energies used in the experiment with and without the RS were calculated using clinical TPS (analytical dose computation algorithm) as well as simulated in GATE/Geant4 and FRED MC engines. In GATE/Geant4, we used the QGSP_BIC_HP_EMZ physics list with 1 mm production cut for gammas, electrons, and positrons and 10 µm for protons. In both MC engines, a high statistics of 10 9 primaries were simulated in order to obtain the beam dose envelope in water up to 150 mm far from the beam core. The dose was scored in water in 2×2×2 mm 3 voxels.

Data Analysis
The data pre-processing was performed using PIXET PRO track processing tool, which provided a list of clusters and their parameters for each measurement performed at the given point of radiation field. For analysis of the dose profiles we extracted from PIXET PRO, we noted the following: (i) the total energy deposition in each cluster, (ii) the cluster position in the detector sensor, (iii) the total number of frames, and (iv) the frame duration time for each measurement point. For each measurement point, we calculated the relative dose rate D: where E i is the total energy deposited by a particle in a cluster, m is the mass of the detector silicon sensor, t acq is the frame acquisition time (constant within one measurement point), and n is the total number of frames acquired in one measurement point. The visualization and comparison of the lateral dose profiles obtained experimentally in air and in water to simulations were performed as follows. The maximum value of the lateral beam dose profile simulated in GATE/Geant4, FRED, and TPS were normalized. The dose experimental profiles were adjusted to the corresponding simulated profiles using least mean square algorithm. This was the optimal method to visualize and compare the experimental and simulation results because the dose rate at the profile maximum varies depending on primary beam energy and measurement depth. The value of relative dose rate obtained experimentally was not modified between the measurement points within a single profile.
Next, we compared lateral and longitudinal dose profiles measured with MINIPIX TIMEPIX in water with the simulations of 3D dose profiles performed with clinical TPS, fast MC code FRED, and full MC code GATE/Geant4. A median filter with kernel size of 5 was used for lateral GATE/Geant4 profiles at the distance larger than 50 mm from the beam core to compensate for the statistical fluctuations of MC simulation.
For the purpose of visualization of the longitudinal dose profile measurement in water, the maximum value of the 3D dose distribution simulated in GATE/Geant4, FRED, and TPS was normalized to 1. The longitudinal profiles simulated at the distance from beam core are plotted according to the normalization, and the MINIPIX TIMEPIX measurement results were adjusted to the simulations using the same least mean square algorithm.  Figure 2 left panel) and nominal proton energy E150. The spectrum obtained experimentally (raw data) exhibits considerable amount of clusters with low-energy depositions (below 0.4 MeV) and particles incoming at significantly smaller angles than β. These clusters are produced mostly by photons originating from the gantry nozzle equipment (plane-parallel and multiwire ionization chambers), which are not explicitly simulated in the GATE/Geant4. The main energy deposition peak, with the maximum of about 0.5 MeV, is produced by the protons entering the detector at angle 57 ± 3 • . The peaks to the right, with the maximum of about 1 MeV and 1.6 MeV, result from the overlapping effect, where respectively two or three primary protons overlap creating a single clusters with the doubled or tripled energy deposition. The overlapped clusters exhibit larger incident angles than the primaries in the main energy deposition peak. The overlapping effect is not taken into account in GATE/Geant4 simulations. In order to compare the spectra obtained experimentally with the MC simulations, all the particles incoming at angles different than 57±3 • were filtered out. As a result of the filtration, the energy depositions from particles produced at the gantry nozzle equipment, as well as from overlapping clusters are removed from the energy deposition spectrum. Figure 4 (left panel) shows the spectra obtained experimentally before and after filtering, spectra obtained from simulations, and the measured angle of the incoming particles as a function of deposited energy. Figure 4 (middle panel) shows energy deposition spectra for nominal energy E150 and various β angles after angle filtering β ± 3 • . The maximum value and width of the energy deposition spectra increase with the detector angle. This is because the average track length, thus the total energy deposited by a single particle crossing the detector active volume, increases with the detector angle with respect to the beam direction. The main energy deposition peak shapes, and positions are comparable with the simulations. The mean deposited energy obtained from MINIPIX TIMEPIX measurements (after filtering), simulated in GATE/Geant4 MC and calculated based on PSTAR stopping power data are presented in Figure 4 (right panel). The mean deposited energy simulated in GATE/Geant4 is consistent within 100 keV with the value expected from the PSTAR database in the entire range of the investigated detector angles and energies. The discrepancy between the mean energy deposition measured with MINIPIX TIMEPIX and the expected value from the PSTAR database, for detector angle β less than 73 • , ranges from 1 to 60 keV. For angles greater than 73 • it is higher, up to 550 keV. This might be an effect of registering particles scattered on the MINIPIX TIMEPIX case made of aluminum, which produce long clusters of large energy depositions. Therefore, for the beam profile measurements in water and in air, the detector angle of 45 • was chosen. Figure 5 shows proton pencil beam lateral profiles measured for nominal energies E100, E150, and E200 in air, at the isocentre, without and with the RS. The profile shapes measured with MINIPIX TIMEPIX correspond well to TPS beam model data obtained during the facility commissioning. The high sensitivity of MINIPIX TIMEPIX allowed to perform measurements in significant distance from the beam core (from 30 mm up to 180 mm) in relative dose range of three orders of magnitude. This allowed to measure the buildup of the nuclear halo. Figure 6 shows MINIPIX TIMEPIX results in water performed with and without the RS for three nominal beam energies E100, E150, and E200. The measurement results of (i) the first Gaussian term obtained with the LYNX scintillating screen and (ii) the lowdose envelope (nuclear halo) obtained with MINIPIX TIMEPIX are compared with GATE/Geant4 and FRED MC simulations.

Lateral Profiles in Water
We observed an excellent agreement between the shape of the profiles obtained experimentally with LYNX and MINIPIX TIMEPIX and simulated with full MC code GATE/Geant4 up to 150 mm far from the beam core. The shapes of the lateral dose profiles were also accurately reproduced at different depths in water and behind the RS. In FRED simulations, the shapes of the lateral dose profiles in comparison to MINIPIX TIMEPIX measurements were well-mimicked up to four orders of magnitude. The disagreement for more distant measurement points is due to the fact the FRED code does not transport secondary gammas and electrons. Note, that in terms of performance, tracking rate achieved with GPU-accelerated MC code FRED was up to 3.6 · 10 6 primary/s on a single GPU card, compared to 1.1 · 10 3 primary/s with GATE/Geant4 running on CPU cluster. FIGURE 4 | Example of energy deposition spectrum for proton beam at the nominal energy E150 measured with MINIPIX TIMEPIX positioned at angle β = 57 • before and after filtering for the particles incidence angle (±3 • ) as well as the one obtained from GATE/Geant4 MC simulation (left). Energy deposition spectra after applying the cluster filtering procedure for nominal energy E150 and various β detector angles (middle). Mean energy deposited in MINIPIX TIMEPIX was exposed to nominal proton energies E70, E100, E150, and E200 when positioned at various angles. The measurement results are compared to MC simulations and data calculated based on PSTAR stopping power tables (right). FIGURE 5 | Lateral pencil beam dose profiles measured at the gantry room isocentre in air for primary proton beams at three nominal energies. Points correspond to MINIPIX TIMEPIX measurement results, whereas solid and dashed lines are the data obtained from TPS beam model without RS (nRS) and with RS, respectively.

DISCUSSION
In the frame of this work we performed a validation of the detector calibration for protons. The comparison of the calibration measurements and MC simulations demonstrate that the MINIPIX TIMEPIX accurately measures energy deposited by proton beams. The comparison of the mean energy deposition in the detector to MC simulation results and PSTAR data indicates that positioning of the detector at 45 • with respect to the beam axis is the most optimal for the measurements. The calibration measurements provide information on the energy deposited by particles producing separate or overlapping clusters (c.f. Figure 4, middle panel). The total energy deposited by several particles forming separate clusters and an overlap of clusters is nearly the same. Therefore, we assume that cluster overlapping does not influence the total dose measured in a single frame, as long as the signal in a pixel is within the dynamic range from 4 keV/pixel up to 2 MeV/pixel [49]. Here, we performed only the validation of the calibration for protons in energy range from 70 to 200 MeV, whereas in the mixed radiation field in water, a wider energy spectrum of particles can be registered by the detector. The response of the MINIPIX TIMEPIX detector to other radiation types was studied elsewhere [Granja et al., under review].  The measurements of the lateral and longitudinal pencil beam dose profiles performed with the MINIPIX TIMEPIX detector in air and in water show its capability to measure the dose with the dynamic range of up to four orders of magnitude. The measurements of the beam lateral profiles in air correspond well to the TPS beam model data obtained during the facility commissioning. The beam lateral and longitudinal profiles measured in water are in an excellent agreement with GATE/Geant4 simulations. We presented the relative difference between measurements and simulations normalized to the dose value in the beam core. For the lateral beam profiles in air, the relative difference is below 0.004% for the beam halo measurement points at 45-150 mm away from the beam core and 10% for the measurements at 30 mm away from the beam core. In case of lateral beam profiles in water the difference between the measurement and simulation is below 0.1% of the dose in the beam core. The difference increases up to 1.3% for the measurement points at 30 mm off the beam core. Higher discrepancy between measurements and simulations close to the beam core results from high dose gradients in this region. This leads to significantly different particle fluence measured in different locations of the detector sensitive area measuring close to the beam core. For longitudinal beam profiles in water the relative difference between the measurement and simulation is less than 0.12%. Because of the limited time resolution of the MINIPIX TIMEPIX detector, it was not possible to perform measurements in the beam core, where the fluence of particles was high, causing detector saturation. A new generation of the TIMEPIX detectors, the MINIPIX TIMEPIX 3 (ADVACAM), offers time resolution better than the MINIPIX TIMEPIX used in this work. MINIPIX TIMEPIX 3 will allow for measurements in the beam core and in therapeutic fields, where the particle fluence is high. This will be particularly important for patient treatment plan verification when several beams of various energies contribute to in-point distributions of LET spectrum. In order to minimize the fraction of particles scattered on the aluminum detector case, an alternative, e.g., PMMA case, should be considered.
Since MINIPIX TIMEPIX provides information about a single particle energy deposition and its track length, it is possible to calculate the linear energy transfer (LET) value of each particle penetrating the detector sensor. Future work will focus on an experimental characterization of the energy deposition and the LET spectra in mixed radiation fields produced by therapeutic proton beams in water. The results will be used for validation of MC codes and TPS, aiming at improved physical and biological modeling in proton radiotherapy.

DATA AVAILABILITY STATEMENT
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.

AUTHOR CONTRIBUTIONS
PS, AR, JG, CG, GK, CO, MP-N, SN, and MR performed the experiments. PS and JG made the experiment data analysis and prepared figures. CG and CO provided expertise in MINIPIX TIMEPIX data analysis. JG performed the MC simulations, analyzed the data, and prepared the figures. MP-N and JB provided expertise in GATE/Geant4 MC simulations and data analysis. AS developed and made substantial improvements in FRED source code required to enable presented studies. PS, AR, and JG drafted the manuscript. NK extensively reviewed the manuscript. AR and JG designed the project. AR acquired funding. All authors contributed to the article and approved the submitted version.

FUNDING
This project was carried out within the Reintegration programme of the Foundation for Polish Science co-financed by the EU under the European Regional Development Fund-grant no. POIR.04.04.00-00-2475/16-00.

ACKNOWLEDGMENTS
We acknowledge Aleksander Krempa from Krakow proton therapy center for IT support during implementation of this project. This research was supported in part by computing resources of ACC Cyfronet AGH. We acknowledge the support of NVIDIA Corporation with the donation of the GPU used for FRED MC simulations.