Local energy deposition dumped by mgdraw.f

Dear @Jungle,

From a first look at your input, output and source files you provided I can make a few recommendations that might help by first answering your questions:

  1. The first line states that the energy deposition is caused by a secondary particle. Note that in mgdraw.f you enter in ENDRAW before USDRAW so you access and print the information on the interaction type only after recording the energy deposition.

  2. Very likely, the last secondary particle is the scattered primary photon, the first one could be a fluorescence photon since this is activated in the PRECISIO defaults. You could try for example as a check to run with EMFFLUO off and the same seed to check if this photon is still present in the output?

  3. As indeed indicated by the “Bel. Th.” entries in the mgdraw output those particles are below threshold. You should judge yourself if it makes sense to further lower the thresholds for your problem at the expense of longer computation times, however for photons you are already at the recommended limit of 1 keV.

You could optimize the routine in terms of more clearly pinning down which energy deposition events result as consequence of a certain interaction. You could use an additional stupre.f routine as detailed for example here, here or here to access the parent particle information of the generated secondaries.

Also not that you are using both the ENDRAW and USDRAW entries in the mgdraw.f routine, however you are using the logical LFCOPE flag in both. Perhaps it is better to use a separate flag for each entry?

Hope this helps,

Andreas