IAP GITLAB

Skip to content

Harmonize calculation of sqrtSNN in `corsika_proposal::HadronicPhotonModel` with `corsika::sophia::InteractionModel`

I've been simulating a bunch of low-energy EM showers, realizing that at least one of the runs have failed.

The error message was

terminate called after throwing an instance of 'std::runtime_error'
  what():  SOPHIA: Invalid target/projectile/energy combination

This means that PROPOSAL called SOPHIA to perform a hadronic interaction, but SOPHIA was unable to do so. Normally, this shouldn't be the case, because here, it is checked whether SOPHIA can handle this configuration.

However, the calculation of the center of mass energy sqrtSNN is slightly different between the validation call and the actual calculation of the interaction by SOPHIA.

For the validation, sqrtSNN is calculated here, with photonP4 + targetP4 / A, where targetP4 is the four momentum of the nucleus at rest.

For the actual calcuation, sqrtSNN is calculated here, with photonP4 + targetP4, but here, targetP4 is the four momentum of either a proton or neutron at rest.

This means that both values for sqrtSNN are almost identical. But when we are at the lower energy limit where SOPHIA starts to become applicable (1.079166345 GeV), this can mean that the validation call says that the interaction is possible, but SOPHIA still fails and therefore throws the exception.

This fix just harmonizes both calls, so that for the validation, the same calculation of sqrtSNN is used.

Merge request reports