IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 0c7c189e authored by Felix Riehn's avatar Felix Riehn Committed by Maximilian Reininghaus
Browse files

fixed CanInteract for Nucleus, added test

parent dcef0c88
No related branches found
No related tags found
No related merge requests found
...@@ -64,7 +64,7 @@ def generate_corsika2sibyll(particle_db): ...@@ -64,7 +64,7 @@ def generate_corsika2sibyll(particle_db):
def generate_corsika2sibyll_xsType(particle_db): def generate_corsika2sibyll_xsType(particle_db):
string = "std::array<int, {:d}> constexpr corsika2sibyllXStype = {{\n".format(len(particle_db)) string = "std::array<int, {:d}> constexpr corsika2sibyllXStype = {{\n".format(len(particle_db))
for identifier, pData in particle_db.items(): for identifier, pData in particle_db.items():
sibCodeXS = pData.get("sibyll_xsType", -1) sibCodeXS = pData.get("sibyll_xsType", 0)
string += " {:d}, // {:s}\n".format(sibCodeXS, identifier if sibCodeXS else identifier + " (not implemented in SIBYLL)") string += " {:d}, // {:s}\n".format(sibCodeXS, identifier if sibCodeXS else identifier + " (not implemented in SIBYLL)")
string += "};\n" string += "};\n"
return string return string
......
...@@ -45,6 +45,9 @@ TEST_CASE("Sibyll", "[processes]") { ...@@ -45,6 +45,9 @@ TEST_CASE("Sibyll", "[processes]") {
REQUIRE_FALSE(process::sibyll::CanInteract(particles::Electron::GetCode())); REQUIRE_FALSE(process::sibyll::CanInteract(particles::Electron::GetCode()));
REQUIRE_FALSE(process::sibyll::CanInteract(particles::SigmaC0::GetCode())); REQUIRE_FALSE(process::sibyll::CanInteract(particles::SigmaC0::GetCode()));
REQUIRE_FALSE(process::sibyll::CanInteract(particles::Nucleus::GetCode()));
REQUIRE_FALSE(process::sibyll::CanInteract(particles::Helium::GetCode()));
} }
SECTION("cross-section type") { SECTION("cross-section type") {
......
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