Theory of the Spatial Distributions of Ion Range and Energy Deposition