From 30cd3e7dabf3db4e073c565c8a180fc784c1ac73 Mon Sep 17 00:00:00 2001 From: Felix Riehn <felix@matilda> Date: Sat, 16 Apr 2022 08:35:24 +0100 Subject: [PATCH] extend testProposal --- tests/modules/testProposal.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/modules/testProposal.cpp b/tests/modules/testProposal.cpp index 7b6f14812..8b74c87af 100644 --- a/tests/modules/testProposal.cpp +++ b/tests/modules/testProposal.cpp @@ -41,8 +41,11 @@ public: MomentumVector(csPrime, {0_GeV, 0_GeV, 0_GeV}).normalized())); } } - bool constexpr isValid(Code const, Code const, HEPEnergyType const) const { - return true; + bool constexpr isValid(Code const, Code const, HEPEnergyType const sqrsNN) const { + if (sqrsNN < 10_GeV) + return false; + else + return true; }; }; @@ -60,6 +63,12 @@ TEST_CASE("ProposalInterface", "modules") { RNGManager<>::getInstance().registerRandomStream("proposal"); + SECTION("InteractionInterface - hadronic photon model threshold") { + DummyHadronicModel hadModel; + HEPEnergyType heThresholdLab1 = 10_GeV; + CHECK_THROWS(corsika::proposal::InteractionModel(*env, hadModel, heThresholdLab1)); + } + DummyHadronicModel hadModel; HEPEnergyType heThresholdLab = 80_GeV; corsika::proposal::InteractionModel emModel(*env, hadModel, heThresholdLab); -- GitLab