How to Determine Primary Cosmic Ray Flux and Composition in SPECSOUR Cosmic ray Simulations

Description

Dear FLUKA experts,

I am currently simulating cosmic rays passing through the atmosphere and extracting information about muons. You can find my input file and the fluscw user routine (used to obtain muon information) at the following link:
https://fluka-forum.web.cern.ch/t/questions-about-the-cosmic-ray-simulation/7739

Now my question is: The primary cosmic rays are defined using the SPECSOUR card, which includes 28 types of cosmic rays (28 .spc files, with the x-axis in [MeV/n] and the y-axis in [p/s/m²/sr/MeV]) as the primary cosmic ray source. These particles are incident on a spherical surface. For example, if I set START to 10000 (the number of primary particles), then theoretically, there should be 10,000 primary cosmic ray particles.

What I want to know is:

  1. How many primary cosmic ray particles are incident per second? (In my understanding, is this obtained by integrating over the spherical surface area at the incident height, over the 4Ď€ solid angle, and over the energy, to determine the total number of incident particles per second for each of the 28 particle types?)

  2. I also want to know the proportion of each particle type among the 10,000 primary cosmic rays. (In my view, this would involve integrating over all 28 cosmic ray particle types and then calculating the percentage of each particle type.)

However, I am unsure whether my approach is correct because I do not fully understand how SPECSOUR defines the incidence of primary cosmic rays—whether they are incident perpendicular to the spherical surface, within a 2π solid angle, or within a 4π solid angle. In other words, what confuses me the most is how I should perform the solid angle integration.

If I knew the number of primary cosmic rays per second, I could then determine the number of muons arriving per second using the formula:
N Ă— (primary cosmic ray per second / START set number),
where N is the number of muons recorded by my fluscw.f routine.

If FLUKA provides any built-in method or output that directly reports the “primary cosmic ray per second” without requiring manual integration of the .spc files, it would greatly simplify my workflow.

I apologize if my description is unclear. Please feel free to ask for clarification on any points that are not well explained, and I will respond as soon as possible.

Best regards,
Yongce

1 Like

Dear Yongce,

thank you for your question and sorry for the delayed reply.

As you already stated correctly, the flux information in the .spc files is given in units of p / (s · m² · sr · MeV).
To obtain the total rate per second for each of the 28 primary particle types, you need to integrate the spectrum over energy and over the full solid angle (4Ď€).

Your approach to determining the composition is appropriate. You can either integrate each of the 28 spectra and compute the relative fractions from the resulting integrals, or simply count in the simulation how many primaries of each type are sampled and normalize by the total number of primaries.

To my knowledge, there is unfortunately no built-in FLUKA output that directly reports the “primary cosmic-ray particles per second.” This quantity has to be reconstructed from the .spc files or from your own sampling statistics.

I hope this helps.

Kind regards,
Barbara