IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 81da08b8 authored by ralfulrich's avatar ralfulrich
Browse files

working

parent ba6b8c63
No related branches found
No related tags found
No related merge requests found
......@@ -28,10 +28,11 @@ def read_sibyll_codes(filename, pythia_db):
line = line.strip()
if line[0] == '#':
continue
identifier, sib_code, canInteractFlag, xsctnId = line.split()
identifier, sib_code, canInteractFlag, xsType = line.split()
try:
pythia_db[identifier]["sibyll_code"] = int(sib_code)
pythia_db[identifier]["sibyll_canInteract"] = int(canInteractFlag)
pythia_db[identifier]["xsType"] = int(xsType)
except KeyError as e:
raise Exception("Identifier '{:s}' not found in pythia_db".format(identifier))
......@@ -126,7 +127,7 @@ def generate_interacting_particle(pythia_db):
low = numeric & 0xFFFFFFFF
numeric = numeric >> 32
string += " 0x{:0x},\n".format(low)
string += "}}};\n"
return string
......
# input file for particle conversion to/from SIBYLL
# the format of this file is: "corsika-identifier" "sibyll-id" "can-interact-in-sibyll" "cross-section-type"
Electron 3 0 0
Positron 2 0 0
NuE 15 0 0
......
......@@ -33,10 +33,20 @@ TEST_CASE("Sibyll", "[processes]") {
13 );
}
SECTION("KnownBySibyll") {
SECTION("handledBySibyll") {
REQUIRE(process::sibyll::KnownBySibyll(corsika::particles::Electron::GetCode()));
REQUIRE_FALSE(
process::sibyll::KnownBySibyll(corsika::particles::XiPrimeC0::GetCode()));
}
SECTION("cross-section type") {
REQUIRE(process::sibyll::CanInteract(corsika::particles::Proton::GetCode()));
REQUIRE(process::sibyll::CanInteract(corsika::particles::XiCPlus::GetCode()));
REQUIRE_FALSE(
process::sibyll::CanInteract(corsika::particles::Electron::GetCode()));
REQUIRE_FALSE(
process::sibyll::CanInteract(corsika::particles::SigmaC0::GetCode()));
}
}
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