IAP GITLAB

Skip to content

Draft: Restructuring of table management

Jean-Marco Alameddine requested to merge proposal_table_restructuring into master

With this PR I would like to introduce/propose some improvements to the PROPOSAL table management.

Table creation at the beginning of simulation

Until now, PROPOSAL has only created tables whenever necessary during simulation. For example, the tables for a specific medium were only created when a particle entered the medium for the first time. This meant that table creation could be initialized in the middle of a simulation . With this PR, when creating a ProposalProcessBase object, it will immediately initialize all tables that might be necessary (and create them, if not available).

Only use PROPOSAL tables with specific cut settings

Until now, PROPOSAL used tables with the exact EnergyCut settings which fit to the electromagnetic ParticleCut. This would, for example, mean that when changing the emcut from 0.5GeV to 0.4GeV, all tables would need to be re-created. With this PR, there is now a list of specific, limited EnergyCuts that will be used. At the moment, these are the energies 0.01MeV, 0.1MeV, 1MeV, ..., 100 TeV. For a specific emcut, CORSIKA will now search for EnergyCut settings closest to the emcut, but still smaller than the emcut. From my understanding, this is similar to the treatment in EGS4/CORSIKA7.

We can now provide the tables for all these EnergyCut values in the corsika-data repo, which means that new users don't need to wait for the table creation, even if they play around with the ParticleCut settings.

Concerning the runtimes, I have checked for 10TeV showers that using an EnergyCut of 0.01GeV (instead of 0.1GeV) for a ParticleCut of 0.1GeV doesn't have a significant influence on the runtime (differences in the runtime only became visible for 0.001GeV). For 1TeV showers with a ParticleCut of 0.5MeV, using an EnergyCut of 0.05MeV (instead of 0.5MeV), the runtime increased by 50%. Note that this increase of 50% is only the "worst-case-scenario" for the currently proposed selection of tables.

Use emcut as production threshold for muons

So far, the production threshold for muons was set the the ParticleCut of muons. However, muons mainly produce electromagnetic losses. And since we want to track all electromagnetic particles until the emcut, we should also use emcut as a production threshold of muons.

Further improvements (probably for future PR)

  • We have introduced a v_cut for the ICRC tag (for more information see the workshop presentation). However, this v_cut is currently not used for ionization losses due to numerical instabilities of the interpolation.
  • We should also provide the option to "override" the proposed treatment of the tables so that users can "force" the creation of tables for a specific EnergyCut. This might be useful for large-scale simulation efforts. I would want to wait with this feature until we have restrucutred the steering functionality of CORSIKA 8.
  • We should think about readablity (read-only, write-only) of folders where the tables might be written.
Edited by Jean-Marco Alameddine

Merge request reports