Fix inconsistent usage of particle mass definitions for secondary particles coming from PROPOSAL
Within proposal::InteractionModel::doInteraction()
, we loop over all secondary particles produced by PROPOSAL (here) and put them on the stack (here).
Note that the energy returned by PROPOSAL is a total energy. To calculate this total energy, PROPOSAL used its internal definition of the particle mass. When putting the particle on the stack, CORSIKA 8 transforms the total energy back to kinetic energies, but uses the particle mass definition of CORSIKA 8. This is inconsistent.
On the test-high-energy-showers
branch (commit f4e794b4), when switching maxRadians
to 0.1, using proposal/7.5.1
, setting the emcut
to 0.5 MeV, running radio_em_shower.cpp
with 1e4 2723141261
crashed with an arithmetic exception.
The reason for this was that PROPOSAL simulated a compton energy loss, where a photon transferred a very small amount of energy (~eV) to an electron (note that this is very rare). The electron mass within CORSIKA 8 is defined as 0.511MeV, within PROPOSAL as 0.5109989461MeV. Due to the inconsistent usage of the mass definitions, the electron on the stack ended up with a kinetic energy smaller than 0.511MeV (but larger than 0.5109989461MeV). This caused the crash within EnergyMomentumOperations::calculate_momentum
.
With this MR, this inconsistency is solved.
Merge request reports
Activity
- Resolved by Maximilian Reininghaus
Should we just go ahead and merge this then?
added 5 commits
-
9181ada6...a599430b - 4 commits from branch
master
- 31196fb9 - Use proposal-internal mass definition when converting total energies to...
-
9181ada6...a599430b - 4 commits from branch
requested review from @acoleman
added 3 commits
-
31196fb9...a198618a - 2 commits from branch
master
- 4e2c74b5 - Use proposal-internal mass definition when converting total energies to...
-
31196fb9...a198618a - 2 commits from branch
enabled an automatic merge when the pipeline for 4e2c74b5 succeeds
mentioned in commit 22a09a17