diff --git a/tests/modules/testProposal.cpp b/tests/modules/testProposal.cpp index 7b6f148120891113bcd840688e2fe3e6ce4071dc..8b74c87af36dbf11e2f6d50d91970a360adaf843 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);