Neutron spectrum in source_newgen.f

Dear experts,
In source_newgen.f at 3.4.5 part, for the neutron spectrum

momentum_energy = sample_spectrum_momentum_energy( [filename], MeV )
  1. Does I simply use a .txt file with 2 columns(one is energy and other is intensity) is right? The spectrum represent histogram’s intensity or not?,if not, how to discribe it?
  2. How do I link the .txt file to source_newgen.f and to .flair?

Dear Xiong,

1.) Yes, only a simple text file with two columns is needed. The values can be intensity, but in the code, they will be normalized to create the probability density function of the primary particles’s energy distribution.
2.) You need to keep the spectrum file in the directory where the FLUKA input file is.


Dear @horvathd ,
Your answer solved my question, thank you!