Dear Faith,
your problem is simply due to a blank line before the end of your spectrum
file (line #452), which is incomprehensible in reading. Remove it and your
run will be regularly completed.
Concerning the source routine code, the sampling lines are perfectly
correct. The cumulative spectrum is built by trapezoidal integration,
where the energy step represents the trapezoid height. Then the sampling
of the energy value inside the selected bin assumes a linear behavior of
the spectrum over the bin. That is a linear spectrum sampling, implying
the square root of the random value (the integral of a straight line
yields a parabola as cumulative function, whose inversion gives the square
root).
Cheers
Francesco
**************************************************
Francesco Cerutti
CERN-EN/STI
CH-1211 Geneva 23
Switzerland
tel. ++41 22 7678962
fax ++41 22 7668854
__________________________________________________________________________
You can manage unsubscription from this mailing list at
https://www.fluka.org/fluka.php?id=acc_info
Received on Fri Sep 04 2015 - 19:26:21 CEST