diff --git a/corsika/detail/framework/process/IntLengthModifyingProcess.inl b/corsika/detail/framework/process/InteractionLengthModifier.inl similarity index 76% rename from corsika/detail/framework/process/IntLengthModifyingProcess.inl rename to corsika/detail/framework/process/InteractionLengthModifier.inl index 1300439a4193c2aef6aa5d7cf05a6ecc41810747..a11c22ee4ca9fdd0dc7720f3cdd45d5431a1d4d9 100644 --- a/corsika/detail/framework/process/IntLengthModifyingProcess.inl +++ b/corsika/detail/framework/process/InteractionLengthModifier.inl @@ -16,22 +16,22 @@ namespace corsika { template <class TUnderlyingProcess> - inline IntLengthModifyingProcess<TUnderlyingProcess>::IntLengthModifyingProcess( + inline InteractionLengthModifier<TUnderlyingProcess>::InteractionLengthModifier( TUnderlyingProcess&& process, - std::function<IntLengthModifyingProcess::functor_signature> modifier) + std::function<InteractionLengthModifier::functor_signature> modifier) : process_{std::move(process)} , modifier_{std::move(modifier)} {} template <class TUnderlyingProcess> template <typename TSecondaryView> - inline void IntLengthModifyingProcess<TUnderlyingProcess>::doInteraction( + inline void InteractionLengthModifier<TUnderlyingProcess>::doInteraction( TSecondaryView& view) { process_.doInteraction(view); } template <class TUnderlyingProcess> template <typename TParticle> - inline GrammageType IntLengthModifyingProcess<TUnderlyingProcess>::getInteractionLength( + inline GrammageType InteractionLengthModifier<TUnderlyingProcess>::getInteractionLength( TParticle const& particle) { GrammageType const original = process_.getInteractionLength(particle); Code const pid = particle.getPID(); @@ -42,12 +42,12 @@ namespace corsika { template <class TUnderlyingProcess> inline TUnderlyingProcess const& - IntLengthModifyingProcess<TUnderlyingProcess>::getProcess() const { + InteractionLengthModifier<TUnderlyingProcess>::getProcess() const { return process_; } template <class TUnderlyingProcess> - inline TUnderlyingProcess& IntLengthModifyingProcess<TUnderlyingProcess>::getProcess() { + inline TUnderlyingProcess& InteractionLengthModifier<TUnderlyingProcess>::getProcess() { return process_; } diff --git a/corsika/framework/process/IntLengthModifyingProcess.hpp b/corsika/framework/process/InteractionLengthModifier.hpp similarity index 89% rename from corsika/framework/process/IntLengthModifyingProcess.hpp rename to corsika/framework/process/InteractionLengthModifier.hpp index ab1e4e3ad1b840eebea2bbae3456ee4f381c0d92..d9013033e9b1b1716925c2110477d95e7a3176b1 100644 --- a/corsika/framework/process/IntLengthModifyingProcess.hpp +++ b/corsika/framework/process/InteractionLengthModifier.hpp @@ -23,8 +23,8 @@ namespace corsika { * length returned by the underlying process in a user-defined way. * */ template <class TUnderlyingProcess> - class IntLengthModifyingProcess - : public InteractionProcess<IntLengthModifyingProcess<TUnderlyingProcess>> { + class InteractionLengthModifier + : public InteractionProcess<InteractionLengthModifier<TUnderlyingProcess>> { //! identity function as default modifier static auto constexpr non_modifying_functor = [](GrammageType original, corsika::Code, @@ -39,7 +39,7 @@ namespace corsika { * Create wrapper around InteractionProcess. Note that the passed process object * itself may no longer be used, only through this class. */ - IntLengthModifyingProcess(TUnderlyingProcess&& process, + InteractionLengthModifier(TUnderlyingProcess&& process, std::function<functor_signature> modifier); //! wrapper around internal process doInteraction @@ -63,4 +63,4 @@ namespace corsika { } // namespace corsika -#include <corsika/detail/framework/process/IntLengthModifyingProcess.inl> +#include <corsika/detail/framework/process/InteractionLengthModifier.inl> diff --git a/tests/framework/testIntLengthModifyingProcess.cpp b/tests/framework/testInteractionLengthModifier.cpp similarity index 86% rename from tests/framework/testIntLengthModifyingProcess.cpp rename to tests/framework/testInteractionLengthModifier.cpp index 93e2072aff186ffd14d15e363f36abf0430b10fd..5d8ee70ed26ec29ff53c540cc2533e4b6b556668 100644 --- a/tests/framework/testIntLengthModifyingProcess.cpp +++ b/tests/framework/testInteractionLengthModifier.cpp @@ -6,7 +6,7 @@ * the license. */ -#include <corsika/framework/process/IntLengthModifyingProcess.hpp> +#include <corsika/framework/process/InteractionLengthModifier.hpp> #include <corsika/framework/core/PhysicalUnits.hpp> #include <catch2/catch.hpp> @@ -40,7 +40,7 @@ struct DummyParticle { Code getPID() const { return Code::MuPlus; } }; -TEST_CASE("IntLengthModifyingProcess", "[process]") { +TEST_CASE("InteractionLengthModifier", "[process]") { DummyProcess u; u.id = 38; @@ -48,8 +48,8 @@ TEST_CASE("IntLengthModifyingProcess", "[process]") { return orig * 2; }; - IntLengthModifyingProcess mod{std::move(u), modifier}; - REQUIRE(std::is_same_v<decltype(mod), IntLengthModifyingProcess<DummyProcess>>); + InteractionLengthModifier mod{std::move(u), modifier}; + REQUIRE(std::is_same_v<decltype(mod), InteractionLengthModifier<DummyProcess>>); SECTION("getInteractionLength") { DummyParticle const p;