Dear Francesco,
Thank you for your help, I removed the blank line at the end of the file and now it works perfectly.
Thank you again.
Faith
________________________________________
From: Francesco Cerutti <Francesco.Cerutti_at_cern.ch>
Sent: 04 September 2015 16:56
To: Green FH Miss (PG/R - Physics)
Cc: FLUKA discussion
Subject: [fluka-discuss]: Re: Modelling a polychromatic X-ray source
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¬c_info
Received on Mon Sep 07 2015 - 13:51:33 CEST