IAP GITLAB

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

make sibyll tests independent of random number state

parent f124e5c6
No related branches found
No related tags found
1 merge request!430Resolve "Connection between PROPOSAL and hadronic interaction models"
...@@ -106,7 +106,7 @@ auto sumMomentum(TStackView const& view, CoordinateSystemPtr const& vCS) { ...@@ -106,7 +106,7 @@ auto sumMomentum(TStackView const& view, CoordinateSystemPtr const& vCS) {
TEST_CASE("SibyllInterface", "modules") { TEST_CASE("SibyllInterface", "modules") {
logging::set_level(logging::level::trace); logging::set_level(logging::level::info);
// the environment and stack should eventually disappear from here // the environment and stack should eventually disappear from here
auto [env, csPtr, nodePtr] = setup::testing::setup_environment(Code::Oxygen); auto [env, csPtr, nodePtr] = setup::testing::setup_environment(Code::Oxygen);
...@@ -266,8 +266,8 @@ TEST_CASE("SibyllInterface", "modules") { ...@@ -266,8 +266,8 @@ TEST_CASE("SibyllInterface", "modules") {
MomentumVector(cs, {0_eV, 0_eV, 0_eV})); MomentumVector(cs, {0_eV, 0_eV, 0_eV}));
model.doInteraction(view, pid, Code::Oxygen, P4, targetP4); model.doInteraction(view, pid, Code::Oxygen, P4, targetP4);
CrossSectionType const cx = model.getCrossSection(pid, Code::Oxygen, P4, targetP4); CrossSectionType const cx = model.getCrossSection(pid, Code::Oxygen, P4, targetP4);
CHECK(cx / 1_mb == Approx(1250).margin(100)); // this is not physics validation CHECK(cx / 1_mb > 0); // this is not physics validation
CHECK(view.getSize() == Approx(150).margin(140)); // this is not physics validation CHECK(view.getSize() != 0); // this is not physics validation
// invalid to underlying model // invalid to underlying model
FourMomentum P4mu( FourMomentum P4mu(
...@@ -321,8 +321,8 @@ TEST_CASE("SibyllDecayInterface", "modules") { ...@@ -321,8 +321,8 @@ TEST_CASE("SibyllDecayInterface", "modules") {
CHECK(time == get_lifetime(Code::Lambda0) * gamma); CHECK(time == get_lifetime(Code::Lambda0) * gamma);
model.doDecay(view); model.doDecay(view);
// run checks // run checks
// lambda decays into proton and pi- or neutron and pi+ // not physics validation, just check doDecay finished with something
CHECK(stack.getEntries() == 3); CHECK(stack.getEntries() > 1);
} }
SECTION("DecayInterface - decay not handled") { SECTION("DecayInterface - decay not handled") {
......
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