I used a 150MeV proton beam irradiating directly into the detector in water. Could there be a physical explanation for the discrepancy in the results? (I personally thought that the protons might exit the thin detector as they pass through it due to their transverse straggling, could that be a correct explanation?) Or there should be something wrong with my code or with the detector?
If you plot the transverse dose profiles you will see the answer. Alternatively, plot the raw (not normalized) PDDs, and consider the integrals (areas under the curves). Why are they different?
I tracked the protons as they pass through a small vs. large detectors. The material of the detectors is water and the world material is air. It seems that the protons exit the small detector due to transverse straggling though.