IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 479e610a authored by ralfulrich's avatar ralfulrich Committed by Ralf Ulrich
Browse files

fixed unit test values

parent 80abca7a
No related branches found
No related tags found
Loading
...@@ -263,23 +263,25 @@ TEST_CASE("SibyllInterface", "modules") { ...@@ -263,23 +263,25 @@ TEST_CASE("SibyllInterface", "modules") {
SECTION("NuclearInteractionInterface") { SECTION("NuclearInteractionInterface") {
HEPMomentumType const P0 = 2500_GeV; // per nucleon HEPMomentumType const P0 = 50_TeV;
MomentumVector plab = MomentumVector(cs, {P0, 0_eV, 0_eV}); // per nucleon MomentumVector plab = MomentumVector(cs, {P0, 0_eV, 0_eV});
corsika::sibyll::InteractionModel hmodel; corsika::sibyll::InteractionModel hmodel;
NuclearInteractionModel model(hmodel, *env); NuclearInteractionModel model(hmodel, *env);
HEPEnergyType const ElabNuc = Code const pid = Code::Oxygen;
sqrt(static_pow<2>(P0 * 8) + static_pow<2>(get_nucleus_mass(8, 4))) / 8; size_t const A = get_nucleus_A(pid);
HEPEnergyType const sqrtSnn = sqrt((ElabNuc + constants::nucleonMass + P0) * HEPEnergyType const Elab = sqrt(static_pow<2>(P0) + static_pow<2>(get_mass(pid)));
(ElabNuc + constants::nucleonMass - P0)); HEPEnergyType const sqrtSnn = sqrt((Elab / A + constants::nucleonMass + P0 / A) *
model.doInteraction(view, getCOMboost(ElabNuc, plab, cs), Code::Iron, Code::Oxygen, (Elab / A + constants::nucleonMass - P0 / A));
model.doInteraction(view, getCOMboost(Elab, plab, cs), Code::Oxygen, Code::Oxygen,
sqrtSnn); sqrtSnn);
CrossSectionType const cx = model.getCrossSection(Code::Iron, Code::Oxygen, sqrtSnn); CrossSectionType const cx =
model.getCrossSection(Code::Oxygen, Code::Oxygen, sqrtSnn);
// Felix, are those changes OK? Below are the checks before refactory-2020 // Felix, are those changes OK? Below are the checks before refactory-2020
// CHECK(length / 1_g * 1_cm * 1_cm == Approx(44.2).margin(.1)); // CHECK(length / 1_g * 1_cm * 1_cm == Approx(44.2).margin(.1));
// CHECK(view.getSize() == 11); // CHECK(view.getSize() == 11);
CHECK(cx / 1_mb == Approx(1900).margin(100)); // this is not physics validation CHECK(cx / 1_mb == Approx(1300).margin(300)); // this is not physics validation
// CHECK(view.getSize() == 20); // also sibyll not stable wrt. to compiler changes // CHECK(view.getSize() == 20); // also sibyll not stable wrt. to compiler changes
CHECK(view.getSize() == Approx(300).margin(90)); // this is not physics validation CHECK(view.getSize() == Approx(100).margin(90)); // this is not physics validation
} }
} }
......
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