IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 37ed0e4c authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan: Committed by Maximilian Reininghaus
Browse files

return zero cross-section for nucleus projectile

parent fdf32b3d
No related branches found
No related tags found
No related merge requests found
...@@ -191,29 +191,29 @@ template <typename TParticle> // need template here, as this is called both with ...@@ -191,29 +191,29 @@ template <typename TParticle> // need template here, as this is called both with
// SetupParticle as well as SetupProjectile // SetupParticle as well as SetupProjectile
CrossSectionType UrQMD::GetCrossSection(TParticle const& projectile, CrossSectionType UrQMD::GetCrossSection(TParticle const& projectile,
corsika::particles::Code targetCode) const { corsika::particles::Code targetCode) const {
// TODO: return 0 for non-hadrons?
auto const projectileCode = projectile.GetPID(); auto const projectileCode = projectile.GetPID();
auto const projectileEnergyLab = projectile.GetEnergy(); auto const projectileEnergyLab = projectile.GetEnergy();
return GetTabulatedCrossSection(projectileCode, targetCode, projectileEnergyLab); if (projectileCode == particles::Code::Nucleus) {
/*
// if (projectileCode == particles::Code::K0Long) { * unfortunately unavoidable at the moment until we have tools to get the actual
// return 0.5 * * inealstic cross-section from UrQMD
// (GetCrossSection(particles::Code::K0, vTargetCode, projectileEnergyLab) + */
// GetCrossSection(particles::Code::K0Bar, vTargetCode, projectileEnergyLab)); return CrossSectionType::zero();
// } }
// int const Ap = return GetTabulatedCrossSection(projectileCode, targetCode, projectileEnergyLab);
// (projectileCode == particles::Code::Nucleus) ? vProjectile.GetNuclearA() : 1;
// return GetCrossSection(projectileCode, vTargetCode, projectileEnergyLab, Ap);
} }
bool UrQMD::CanInteract(particles::Code vCode) const { bool UrQMD::CanInteract(particles::Code vCode) const {
// According to the manual, UrQMD can use all mesons, baryons and nucleons // 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 // which are modeled also as input particles. I think it is safer to accept
// only the usual long-lived species as input. // 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[] = { static particles::Code const validProjectileCodes[] = {
particles::Code::Proton, particles::Code::AntiProton, particles::Code::Neutron, particles::Code::Proton, particles::Code::AntiProton, particles::Code::Neutron,
......
...@@ -149,7 +149,7 @@ TEST_CASE("UrQMD") { ...@@ -149,7 +149,7 @@ TEST_CASE("UrQMD") {
REQUIRE(stack->GetSize() == 1); REQUIRE(stack->GetSize() == 1);
// simple check whether the cross-section is non-vanishing // 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) / REQUIRE(urqmd.GetCrossSection(view->GetProjectile(), particles::Code::Nitrogen) /
1_mb > 1_mb >
0); 0);
......
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