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
2 merge requests!234WIP: Initial example of python as script language from C++,!205UrQMD improvements
......@@ -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,
......
......@@ -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);
......
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