## 4 Discussion  
This study successfully presents and explains the outcomes of the first experiment that was carried out with a HEXITEC detector in a proton therapy environment, where there is evidence of the complexity of the radiation fields produced by the interaction between protons and matter. By comparing the experimental measurements with Monte Carlo simulations, the Geant4 model is an accurate representation of the experiment, meaning that it serves as a useful tool for the future of this research, particularly for the optimisation of detector parameters, without depending on the accessibility of the proton beam at the hospital. However, the comparisons suggest that a further characterisation of the background noise should be performed and included in the model to increase the accuracy. By using the equivalence process described in Section 2.3, a valid standarisation was achieved between HEXITEC frames and Geant4 events. In addition, a way to perform particle discrimination was tested based on solely the cluster size, which can be complemented by further filtering to increase noise reduction, such as more complex algorithms based on machine learning and involving other variables, such as the total energy deposited. Although constrained by its dimensional limitations, the HEXITEC detector shows promising results in the detection of gamma particles. The low flux reported in the detector area is a result of the dimensions of the detector under study. Fortunately, these values may be enhanced, as recent HEXITEC developments include bigger detector areas and higher frame rates [27,35]. The amount of gammas with the potential to be detected outside of the patient's body have been reported to be low, especially for gammas that are classified as prompt. Thus, the reported statistical data are consistent with previously estimated absolute gamma yields [36]. In addition, the statistical results regarding the percentage contribution of gamma particles show that gamma production depends on the proton beam energy: at lower energies, the contribution of other particles is minimised. This means that when the target volume is located at shallower depths, the background noise coming from other secondary particles is lower, suggesting that prompt gamma imaging could potentially be more accurate in these particular cases, although the difference between energies is not highly significant. Regarding the classification of cluster events into either a gamma or another particle, the current HEXITEC model has a pixel pitch that enables highly energetic gammas to produce mainly one-pixel clusters, which is indeed helpful for a cluster size analysis that, although simple, is a step towards further reducing the noise coming from undesirable particles to perform prompt gamma imaging in the future. A way to improve cluster classification for future studies involves the implementation of machine learning techniques  
Figure 7: Energy loss inside the detector for experimental and simulated data using a proton beam of 150 MeV. that can include not only the size but also the energy deposition per cluster. As the CZT HEXITEC is characterised by its spectral resolution, energy information can be accurately obtained from the sensor and this feature can be further exploited. Nonetheless, this characteristic is highly dependent on the sensor thickness. This means that the system will have to be optimised if a Compton camera is to be built based on HEXITEC detectors. Thus, parameters such as the number of layers, the layer thickness and the possibility of stacking several HEXITEC sensors to increase the sensitive area are the basis of future optimisation studies. Conceptualisation, R.M.M., M.D.W., B.D.C. and M.L.P.-L.; Experimental data acquisition, J.C.K. and M.D.W. ; simulated data production, M.L.P.-L.; data curation, M.L.P.-L.; writing, M.L.P.-L.; review and editing, R.M.M. and M.D.W. ; supervision, R.M.M. All authors have read and agreed to the published version of the manuscript. This research received no external funding. Not applicable.