IAP GITLAB

Hydrogen cause error in Sibyll interaction

If the medium material has nuclear composition of Hydrogen, it will cause an error in sibyll interaction.

In the file corsika/detail/modules/sibyll/interaction.inl:87:


    if (corsika::is_nucleus(TargetId)) {
      const int iTarget = corsika::get_nucleus_A(TargetId);
      if (iTarget > maxTargetMassNumber_ || iTarget == 0)
        throw std::runtime_error(
            "Sibyll target outside range. Only nuclei with A<18 are allowed.");
      sib_sigma_hnuc_(iBeam, iTarget, dEcm, sigProd, dummy, sigEla);
    } else if (TargetId == corsika::Code::Proton) {
      sib_sigma_hp_(iBeam, dEcm, dum1, sigEla, sigProd, dumdif, dum3, dum4);
    } else {
      // no interaction in sibyll possible, return infinite cross section? or throw?
      sigProd = std::numeric_limits<double>::infinity();
      sigEla = std::numeric_limits<double>::infinity();
    }

The Hydrogen will be classified as nuclear. However when Hydrogen is passed into sib_sigma_hnuc_, sibyll will return nan, which crash the program.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information