RE: [fluka-discuss]: sample discrete energies using SOURCE routine

From: Chiriotti Alvarez Sabina <>
Date: Fri, 25 Nov 2016 07:49:54 +0000

Dear Vittorio,

thank you for your remarks. Yes the energies are spanned in 5 orders of magnitude and it corresponds to the Auger and IC electrons of I-125 Isotope (according to Howell 1992 Med Phys 19 (6). Then in order to simulate a decay I need to sample 26 electrons from this electron spectrum.
Therefore I am actually fine for your point 2 because I am using FLUKA for microdosimetry where I need to know how much energy is deposited locally for each decay.

How can I actually generate a source sample changing the weight of the primary particle (WTFLK) according to the probability associated to the energy?

thank you in advance.

kind regards,

From: Vittorio Boccone []
Sent: donderdag 24 november 2016 20:41
To: Chiriotti Alvarez Sabina
Subject: Re: [fluka-discuss]: sample discrete energies using SOURCE routine

Dear Sabina,

First. The spectrum you sent is not a histogram but a X/Y scattered plot with absolute probabilities (I attach the plot with your data). For this reason the cumulative sum will never work (statistically I mean). This has nothing to do with FLUKA. Clearly this is the cause of the discrepancy you mention between the 15 independent runs and the simulation with the “spectrum”.

Second. The transport for electrons in FLUKA starts at 1 keV -> 10e-6 GeV. Meaning a good fraction of the simulation will do essentially nothing else then depositing all the energy of the electron at the first interaction.
This will leave essentially a few meaningful points for your simulation, and would make me question whether you could really solve your problem this way.

Third. Supposed that you feel fine with what written in point2 2, you still have probabilities which span across 4 orders of magnitudes, therefore I could object if it would be better for you to generate a source sample changing the weight of the primary particle (WTFLK) according to the probability associated to the energy. Eventually you could separate the problem of determining the particle sample from the FLUKA simulation such you could verify it before running the simulation. In this case you could generate an external file from which the simulation would fetch energy and weight of the primary.


On 24 Nov 2016, at 13:59, Chiriotti Alvarez Sabina <<>> wrote:

Dear FLUKA experts,

I would like to define an electron source which has a discrete energy spectrum (each bin of energy has a certain probability).
The sampling is done using a cumulative spectrum and interpolating between the discrete energies but

I have tried to do the sampling following the examples from FLUKA discussion list but I still do not get the same results if I do 15 independent simulations (the number for energies) and I combine the output with each electron probability. What I get is that the sampling is done with an interpolation between the discrete energies and I would like to simulate only the energies of the electron spectrum.
How can I remove the interpolation between discrete energies and sample the energies of the spectrum with their respective probability?

Please find in attachment the routine source, the spectrum and the input file.

Thank you in advance for your help.

Kind regards,


Belgian Nuclear Research Centre, SCK-CEN
Environment, Health and Safety
Radiation protection, Dosimetry and Calibration
Boeretang 200,
2400, Mol, Belgium
tel: + 32 014 33 28 89

SCK•CEN Disclaimer: <hsource.f><example.inp><Electron_spectrum.txt>

You can manage unsubscription from this mailing list at

(image/png attachment: image001.png)

Received on Fri Nov 25 2016 - 10:35:45 CET

This archive was generated by hypermail 2.3.0 : Fri Nov 25 2016 - 10:35:49 CET