Normalization Issues When Using User Routines

Dear FLUKA experts,

I’m using the mgdraw.f file to obtain energies of some particles, but I’m not sure how to convert the results into normalized form (per primary), as I get a list of energies where each energy corresponds to a target particle. I later need to convert this into an energy distribution. How should I perform the normalization?

Attached are my results and the mgdraw.f file.Only partial data is included in the results.
mgdraw_empty.f (10.0 KB)
pka.flair (5.0 KB)
pka001_fort.99.txt (4.6 KB)

Thanks a lot in advance

Best regards

Dear Yingming Sang,

When using mgdraw you indeed need to take care of the proper normalization yourself in post-processing since it is not built in compared to for example USRBIN or USRYIELD output. Regardless of the binning you apply on the list of energies you obtain (“pka001_fort.99.txt”), you will need to divide your results by the total amount of primary particles you simulated, say that it is 1E5 primaries then you need to divide each bin value of your histogram by 1E5 to obtain a result that can be expressed “per primary”. This is assuming that all there is no biasing and all particle weights are equal to 1. In case it is applicable to you: in this post this is explained in more detail. If you want to have a more fundamental grasp on this I advise you to have a look at the last Basic FLUKA couse lecture on MC simulations which contains more information.

Hope this helps, best regards,

Andreas