nrc-cnrc / EGSnrc

Toolkit for Monte Carlo simulation of ionizing radiation — Trousse d'outils logiciels pour la simulation Monte Carlo du rayonnement ionisant
http://nrc-cnrc.github.io/EGSnrc
GNU Affero General Public License v3.0
217 stars 146 forks source link

Incomplete multiple-scattering comment in egsnrc.mortran #1131

Open dworogers opened 4 months ago

dworogers commented 4 months ago

Lines 1247-1250 in egsnrc.mortran state

IF((tustep <= tperp) & ((~exact_bca) | (tustep > skindepth)))
                [
                    "We are further way from a boundary than a skindepth, so
                    "perform a normal condensed-history step

The comment ignores the fact that only if the step is greater than skindepth does the CH step get taken. Otherwise the CH step is replaced by single scattering. As far as I can tell, the coding is correct, it's just the comment that I find misleading. It should be something like

"We are further away from a boundary than a skindepth or the requested CH step is
"greater than skindepth so perform a normal condensed-history step