Mgdraw routine to determine the number of Compton events before absorption

Hello David,

Thank you for your feedback.
I double checked the routine and indeed the problem was still related to flagging of some fluorescence photon created after Compton scattering of the primary photon.
The (eventual) fluorescence photon and/or Auger electron were not correctly flagged due to the logic of the routine and in some rare cases the photon was inheriting the positive flag causing then the printing of its photoelectric effect from mgdraw.

You can find here a stupre.f that now solves this problem (you can actually see that the difference in the logic is minimal):
stupre.f (7.1 KB)

Thanks,
Giuseppe

1 Like