IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 28d68d01 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan: Committed by Felix Riehn
Browse files

added momentum conservation test for sibyll::Interaction

parent beece705
No related branches found
No related tags found
No related merge requests found
......@@ -136,8 +136,18 @@ TEST_CASE("SibyllInterface", "[processes]") {
Interaction model;
[[maybe_unused]] const process::EProcessReturn ret = model.DoInteraction(projectile);
[[maybe_unused]] auto const pSum = sumMomentum(view, cs);
auto const pSum = sumMomentum(view, cs);
// for debugging!
std::cout << pSum.GetComponents(cs) << std::endl;
std::cout << plab.GetComponents(cs) << std::endl;
CHECK(pSum.GetComponents(cs).GetX() / P0 == Approx(1).margin(1e-4));
CHECK(pSum.GetComponents(cs).GetY() / 1_GeV == Approx(0).margin(1e-4));
CHECK(pSum.GetComponents(cs).GetZ() / 1_GeV == Approx(0).margin(1e-4));
CHECK((pSum - plab).norm() / 1_GeV == Approx(0).margin(1e-4));
CHECK(pSum.norm() / P0 == Approx(1).margin(1e-4));
[[maybe_unused]] const GrammageType length = model.GetInteractionLength(particle);
}
......
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