IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 13a513b7 authored by Alan Coleman's avatar Alan Coleman
Browse files

Merge branch 'Fix_cross_section_for_sibyll_nucl_primaries' into 'master'

fix cross section calc. in sibyll nuclear cross section

Closes #618 and #143

See merge request !565
parents a9561f94 6eca5f0a
No related branches found
No related tags found
1 merge request!565fix cross section calc. in sibyll nuclear cross section
Pipeline #11883 passed with warnings
...@@ -178,7 +178,16 @@ namespace corsika::sibyll { ...@@ -178,7 +178,16 @@ namespace corsika::sibyll {
Code const projectileId, Code const targetId, FourMomentum const& projectileP4, Code const projectileId, Code const targetId, FourMomentum const& projectileP4,
FourMomentum const& targetP4) const { FourMomentum const& targetP4) const {
HEPEnergyType const sqrtSnn = (projectileP4 + targetP4).getNorm(); // check if projectile and target are nuclei!
if (!is_nucleus(projectileId) || !is_nucleus(targetId)) {
return CrossSectionType::zero();
}
// calculate sqrt(Snn) (only works if projectile and target are nuclei)
HEPEnergyType const sqrtSnn =
(projectileP4 / get_nucleus_A(projectileId) + targetP4 / get_nucleus_A(targetId))
.getNorm();
if (!isValid(projectileId, targetId, sqrtSnn)) { return CrossSectionType::zero(); } if (!isValid(projectileId, targetId, sqrtSnn)) { return CrossSectionType::zero(); }
HEPEnergyType const LabEnergyPerNuc = HEPEnergyType const LabEnergyPerNuc =
static_pow<2>(sqrtSnn) / (2 * constants::nucleonMass); static_pow<2>(sqrtSnn) / (2 * constants::nucleonMass);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment