Simulating a GCR event

Dear @kjohnson ,

The FLUKA distribution comes with a series of tools and particle spectra that can be used out-of-the-box for GCR simulations. The key ingredients are the usage of the SPECSOUR and GCR-SPE cards, in addition with the provided spectra. Please have a look to Chapter 16 of the manual, where you can finds all the info.

If you aim to use external particle spectra, you might want to use a dedicated source routine that samples directly from your auxiliary file. The source routine can be modified to fit your needs. However, please keep in mind that some parameters of the BEAM/BEAMPOS cards might be overwritten, depending on how you code the source routine. There are a number of posts in the forum with regard to this topic. I link the following which looks to me a similar post to your problem. Anyway I invite you also to make use the search function of the forum to access similar or other topics that might be of help.

Once you have the routine, you have to link to the executable and call the routine from the inp file via the SOURCE card. For cosmic ray applications I suggest to link to DPMJET.

Regards,

Angelo