diff --git a/Processes/Sibyll/NuclearInteraction.h b/Processes/Sibyll/NuclearInteraction.h index 917cda8c3d3d769d4a2097a4fb6ee67835ce3f16..7520b2dfb5a6448e82f3ffbf204694c662dea428 100644 --- a/Processes/Sibyll/NuclearInteraction.h +++ b/Processes/Sibyll/NuclearInteraction.h @@ -58,16 +58,17 @@ namespace corsika::process::sibyll { using namespace corsika::units::si; double sigProd, dummy, dum1, dum2, dum3, dum4; double dumdif[3]; - - if(!corsika::particles::IsNucleus(BeamId)){ - sigProd = std::numeric_limits<double>::infinity(); - return std::make_tuple(sigProd * 1_mbarn, 1); - } - // TODO: use nuclib to calc. nuclear cross sections - // FOR NOW: use proton cross section for nuclei - auto const BeamIdToUse = corsika::particles::Proton::GetCode(); - std::cout << "WARNING: replacing beam nucleus with proton!" << std::endl; + corsika::particles::Code BeamIdToUse; + if(corsika::particles::IsNucleus(BeamId)){ + + // TODO: use nuclib to calc. nuclear cross sections + // FOR NOW: use proton cross section for nuclei + BeamIdToUse = corsika::particles::Proton::GetCode(); + std::cout << "WARNING: replacing beam nucleus with proton!" << std::endl; + } else { + BeamIdToUse = BeamId; + } const int iBeam = process::sibyll::GetSibyllXSCode(BeamIdToUse); const double dEcm = CoMenergy / 1_GeV; diff --git a/Processes/Sibyll/sibyll2.3c.h b/Processes/Sibyll/sibyll2.3c.h index df5a576095e956a5087911b9a2d48c42f1b7bef9..5003b42e7eb0ada5e641613dfcdb7b997410a1f1 100644 --- a/Processes/Sibyll/sibyll2.3c.h +++ b/Processes/Sibyll/sibyll2.3c.h @@ -102,8 +102,6 @@ void sibyll_(const int&, const int&, const double&); // subroutine to initiate sibyll void sibyll_ini_(); -// subroutine to initiate nuclib -void nuc_nuc_ini_(); // subroutine to SET DECAYS void dec_ini_(); diff --git a/Processes/Sibyll/testSibyll.cc b/Processes/Sibyll/testSibyll.cc index 795ba53aa04b1c4adaa5ddcede38d070df7d3d1c..bf79d05f121cbce6adae509a7fe9f31fba3ca26d 100644 --- a/Processes/Sibyll/testSibyll.cc +++ b/Processes/Sibyll/testSibyll.cc @@ -144,7 +144,7 @@ TEST_CASE("SibyllInterface", "[processes]") { auto particle = stack.AddParticle(particles::Code::Proton, E0, plab, pos, 0_ns); - Interaction model(env); + NuclearInteraction model(env); model.Init(); [[maybe_unused]] const process::EProcessReturn ret =