Energy spectrum for a source

Hi everyone
How to define the energy spectrum for a neutron source in a macro file?
Thank you for the attention

Hi @gholaminejad,

One possible way to define the neutron spectrum in a macro file is using the General Particle Source (GPS). Please see the documentation here: http://geant4-userdoc.web.cern.ch/geant4-userdoc/UsersGuides/ForApplicationDeveloper/html/GettingStarted/generalParticleSource.html

Example GPS macro files can be found here: http://hurel.hanyang.ac.kr/Geant4/Geant4_GPS/reat.space.qinetiq.com/gps/examples/examples.html Example 25 shows a user defined energy spectrum / histogram.

Hope this helps,

Joseph

Thank you very much for your help.

gholaminejad