diff --git a/Processes/UrQMD/UrQMD.cc b/Processes/UrQMD/UrQMD.cc index b0f09708831f081a4cb40d52189b0a99af718095..0c9f632657c41b7f60722ff0f4ae0f7e1d499f60 100644 --- a/Processes/UrQMD/UrQMD.cc +++ b/Processes/UrQMD/UrQMD.cc @@ -191,29 +191,29 @@ template <typename TParticle> // need template here, as this is called both with // SetupParticle as well as SetupProjectile CrossSectionType UrQMD::GetCrossSection(TParticle const& projectile, corsika::particles::Code targetCode) const { - // TODO: return 0 for non-hadrons? auto const projectileCode = projectile.GetPID(); auto const projectileEnergyLab = projectile.GetEnergy(); - return GetTabulatedCrossSection(projectileCode, targetCode, projectileEnergyLab); - - // if (projectileCode == particles::Code::K0Long) { - // return 0.5 * - // (GetCrossSection(particles::Code::K0, vTargetCode, projectileEnergyLab) + - // GetCrossSection(particles::Code::K0Bar, vTargetCode, projectileEnergyLab)); - // } + if (projectileCode == particles::Code::Nucleus) { + /* + * unfortunately unavoidable at the moment until we have tools to get the actual + * inealstic cross-section from UrQMD + */ + return CrossSectionType::zero(); + } - // int const Ap = - // (projectileCode == particles::Code::Nucleus) ? vProjectile.GetNuclearA() : 1; - // return GetCrossSection(projectileCode, vTargetCode, projectileEnergyLab, Ap); + return GetTabulatedCrossSection(projectileCode, targetCode, projectileEnergyLab); } bool UrQMD::CanInteract(particles::Code vCode) const { // According to the manual, UrQMD can use all mesons, baryons and nucleons // which are modeled also as input particles. I think it is safer to accept // only the usual long-lived species as input. - // TODO: Charmed mesons should be added to the list, too + + // Interactions with nucleus projectiles are possible in principle with UrQMD + // but right now we don't have access to the inelastic (production) cross-section, + // so we unfortunately have to forbid these interactions for the time being. static particles::Code const validProjectileCodes[] = { particles::Code::Proton, particles::Code::AntiProton, particles::Code::Neutron, diff --git a/Processes/UrQMD/testUrQMD.cc b/Processes/UrQMD/testUrQMD.cc index c5cdffd883a2b9a87acf11590564e3e954afe735..d93334f6ff3ce9f48fce31afc147867339819a0c 100644 --- a/Processes/UrQMD/testUrQMD.cc +++ b/Processes/UrQMD/testUrQMD.cc @@ -149,7 +149,7 @@ TEST_CASE("UrQMD") { REQUIRE(stack->GetSize() == 1); // simple check whether the cross-section is non-vanishing - // only nuclei with available tabluated data so far + // only nuclei with available tabluated data so far REQUIRE(urqmd.GetCrossSection(view->GetProjectile(), particles::Code::Nitrogen) / 1_mb > 0);