Major bug, fixed
Created by: moukaddam
The bug affected mainly simulations using a thick target (here it's ~25.6um) inducing large energy loss of the beam. Before the fix, the energy loss of the beam particle in the target was overestimated for interactions taking place close to the upstream target surface. The opposite was true for interactions downstream. Problem spotted in NPS/Core/Target.cxx, below some typical values and their fix. =============== Example Target Z: 0 mm halfTargetThickness: 12.3 micrometer
(below in micrometer) test case 1: Generated Interaction Z: -8.1 Calculated depth : -20.4 --> This should be 12.3-8.1 = 4.2 test case 2: Generated Interaction Z: +9.8 Calculated depth : -2.5 --> This should be 12.3+9.8 = 23.1
Result on a test case:
The peaks shown corresponds to the g.s in different angular bin. Data are simulated for 60Fe(d,p) reaction. Left panel before fix, right panel after.