**6. Conclusions**

In this paper, the proton range of the analytical medium has been used to calculate the distribution of the dose in space. Specifically, we have addressed values of time between 1 μs and 10 μs, energies between 20 MeV and 200 MeV, and protons per pulse from 3.1 <sup>×</sup> 108 to 8 <sup>×</sup> 108. In the same way, an analytical model to calculate the distribution of the initial pressure at a single point has been used with a computing program to find the numerical solution of the general wave equation and calculate the acoustic waves resulting from the initial pressure. Some simulation parameters include pulse widths, beam energy, and spatial and temporal configuration. Thus, it is possible to determine the parameters and frequency spectrum to select the frequency responses of the transmitter and the receiver for the experiment.

This study has described and tested a procedure for monitoring the location of a hadrontherapy acoustic source based on the detection of the signal through piezoelectric sensors and on a model for calculating the position of the energy deposition. The localization algorithm has been applied for different configurations of sensors. Thus, the results show a significant improvement when a greater number of sensors is used. For a minimal set of four sensors, the results are better if the sensors

cover different directions of the space. The accuracy of the results improves as the number of sensors increases, as shown in Table 4. Although the calculation time increases with the number of sensors, the difference is not significant for any of the proposed cases. Thus, the results indicate that it would be possible to monitor in real time the hadrontherapy treatment acoustically. At first look, the case studied may be considered too simplistic since the human body is neither homogenous nor isotropic and sensors are not omnidirectional. Therefore, for a practical case in hadrontherapy, all these aspects should be considered when taking care of the geometry and tissues involved, the real response of sensors, etc. However, for most of the cases, the results in small differences in the technique proposed, and the situation considered in the paper is good, and most probably the best, for a first general assessment of the technique proposed.

**Author Contributions:** Conceptualization, J.E.O. and I.F. Investigation, J.E.O., M.A., and I.F. Methodology, I.F. and A.H. Project administration, M.A. Supervision, M.A., I.F., and A.H. Writing—review & editing, J.E.O., M.A., I.F., and A.H.

**Funding:** This research was funded by the Spanish Agencia Estatal de Investigación, grant number FPA2015-65150-C3-2-P (MINECO/FEDER).

**Conflicts of Interest:** The authors declare no conflict of interest.
