Sampling from energy spectra

For more complex simulations one often needs a beam that is not mono-energetic but follows a specific energy distribution. This feature is provided “out-of-the box” for CERN FLUKA by the
CERN-FLUKA-spectra-sampling.tgz (21.8 KB)
user routine package (version 1.4) that can be fully configured via the input file.
IMPORTANT NOTICE: With the release of FLUKA 4.0.0 the package had to be upgraded. In order to use it with FLUKA version >= 4.0.0 please re-download from the link above.

The provided code also supports the optional propagation of uncertainties of the input spectra to the simulation. In addition, the user can bias the provided distribution to “favor” certain energy regions while not changing the physics. More detailed explanations + an example can be found in the provided archive.

NOTE: Any configuration of the spatial distribution (e.g. volumetric sources) or divergence from the input file are taken into account.

The routines are mainly written in C++ and should also serve as a more complex example of how to combine C/C++ with FLUKA.

7 Likes