From 736094c4e457a5e64510569de16712b7374c04a2 Mon Sep 17 00:00:00 2001 From: Gordon McCann Date: Wed, 12 Jan 2022 14:15:43 -0500 Subject: [PATCH] Fixed energy loss for case of neutron. Now returns zero (energy loss here only for ions) --- src/EnergyLoss.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EnergyLoss.cpp b/src/EnergyLoss.cpp index 53eb3d9..2fdcbfb 100644 --- a/src/EnergyLoss.cpp +++ b/src/EnergyLoss.cpp @@ -50,7 +50,7 @@ namespace Mask { MP = MassLookup::GetInstance().FindMass(ZP, AP)*MEV2U; } - if(thickness == 0.0 || e_initial == 0.0) + if(thickness == 0.0 || e_initial == 0.0 || zp == 0) return 0; double e_final = e_initial;