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