diff --git a/applications/cross_section.cpp b/applications/cross_section.cpp index 19661f1f909d8894c721b92694a7e7b32969f23d..eb900dd0d9e42e3e16aa75658dbb5965b4e3fbf7 100644 --- a/applications/cross_section.cpp +++ b/applications/cross_section.cpp @@ -99,8 +99,8 @@ void calculate_cross_sections(TModel& model, std::string const& model_name, } // p-p - auto const [xs_prod_pp, xs_ela_pp ]= - model->getCrossSectionInelEla(Code::Proton, Code::Proton, p4protonProj, p4protonTarg); + auto const [xs_prod_pp, xs_ela_pp] = model->getCrossSectionInelEla( + Code::Proton, Code::Proton, p4protonProj, p4protonTarg); // p-O CrossSectionType const xs_prod_pO = model->getCrossSection(Code::Proton, Code::Oxygen, p4protonProj, p4oxygenTarg); diff --git a/corsika/detail/modules/qgsjetII/InteractionModel.inl b/corsika/detail/modules/qgsjetII/InteractionModel.inl index 32e8398b70bdc3ee6bb2ac880239fc1e3f8a2529..1345648c7a8f94ff2047eb400d2987af9d20e16f 100644 --- a/corsika/detail/modules/qgsjetII/InteractionModel.inl +++ b/corsika/detail/modules/qgsjetII/InteractionModel.inl @@ -102,11 +102,13 @@ namespace corsika::qgsjetII { return sigProd * 1_mb; } -inline std::tuple<CrossSectionType, CrossSectionType> InteractionModel::getCrossSectionInelEla( - Code projCode, Code targetCode, FourMomentum const& proj4mom, - FourMomentum const& target4mom) const { - return { getCrossSection(projCode, targetCode, proj4mom, target4mom), CrossSectionType::zero()}; - } + inline std::tuple<CrossSectionType, CrossSectionType> + InteractionModel::getCrossSectionInelEla(Code projCode, Code targetCode, + FourMomentum const& proj4mom, + FourMomentum const& target4mom) const { + return {getCrossSection(projCode, targetCode, proj4mom, target4mom), + CrossSectionType::zero()}; + } template <typename TSecondaries> inline void InteractionModel::doInteraction(TSecondaries& view, Code const projectileId, diff --git a/corsika/detail/modules/sibyll/InteractionModel.inl b/corsika/detail/modules/sibyll/InteractionModel.inl index 8a3b58f7b558f8c558753bc9bff8d7562499fa8e..2373e8da089d6b2fe514791ae228130fdee41888 100644 --- a/corsika/detail/modules/sibyll/InteractionModel.inl +++ b/corsika/detail/modules/sibyll/InteractionModel.inl @@ -50,15 +50,17 @@ namespace corsika::sibyll { target4mom); } -inline std::tuple<CrossSectionType, CrossSectionType> InteractionModel::getCrossSectionInelEla( - Code projCode, Code targetCode, FourMomentum const& proj4mom, - FourMomentum const& target4mom) const { + inline std::tuple<CrossSectionType, CrossSectionType> + InteractionModel::getCrossSectionInelEla(Code projCode, Code targetCode, + FourMomentum const& proj4mom, + FourMomentum const& target4mom) const { if (is_nucleus(projCode)) - return { getNuclearInteractionModel().getCrossSection(projCode, targetCode, proj4mom, - target4mom), CrossSectionType::zero()}; + return {getNuclearInteractionModel().getCrossSection(projCode, targetCode, proj4mom, + target4mom), + CrossSectionType::zero()}; else - return getHadronInteractionModel().getCrossSectionInelEla(projCode, targetCode, proj4mom, - target4mom); + return getHadronInteractionModel().getCrossSectionInelEla(projCode, targetCode, + proj4mom, target4mom); } template <typename TSecondaries> diff --git a/corsika/modules/qgsjetII/InteractionModel.hpp b/corsika/modules/qgsjetII/InteractionModel.hpp index bbd3b24e70875ee165fd3ba16da83be5940c8789..f6dcd97e29bdf301705a51bc1ee5a11ce3547edd 100644 --- a/corsika/modules/qgsjetII/InteractionModel.hpp +++ b/corsika/modules/qgsjetII/InteractionModel.hpp @@ -55,8 +55,7 @@ namespace corsika::qgsjetII { FourMomentum const& projectileP4, FourMomentum const& targetP4) const; - -/** + /** * Returns inelastic AND elastic cross sections. * * These cross sections must correspond to the process described in doInteraction diff --git a/corsika/modules/sibyll/InteractionModel.hpp b/corsika/modules/sibyll/InteractionModel.hpp index 05135bdd62420ef6b78e10ec3c7f05d782614cf4..a89dfa539cf78d03001924958c887ebff313fc22 100644 --- a/corsika/modules/sibyll/InteractionModel.hpp +++ b/corsika/modules/sibyll/InteractionModel.hpp @@ -31,8 +31,8 @@ namespace corsika::sibyll { CrossSectionType getCrossSection(Code, Code, FourMomentum const&, FourMomentum const&) const; - std::tuple<CrossSectionType, CrossSectionType> getCrossSectionInelEla(Code, Code, FourMomentum const&, - FourMomentum const&) const; + std::tuple<CrossSectionType, CrossSectionType> getCrossSectionInelEla( + Code, Code, FourMomentum const&, FourMomentum const&) const; template <typename TSecondaries> void doInteraction(TSecondaries&, Code, Code, FourMomentum const&, diff --git a/tests/framework/testProcessSequence.cpp b/tests/framework/testProcessSequence.cpp index a7f23a329e5c42e0a0407f249b679c86f814274a..3632546508f54a7baec2c693be17554ea1591f9a 100644 --- a/tests/framework/testProcessSequence.cpp +++ b/tests/framework/testProcessSequence.cpp @@ -446,20 +446,20 @@ TEST_CASE("ProcessSequence General", "ProcessSequence") { CHECK(std::is_reference_v<decltype(sequence2.getProcess1())>); // Process1& CHECK(!std::is_reference_v<decltype(sequence2.getProcess2())>); // ProcessSequence - CHECK(std::is_reference_v<decltype( - sequence2.getProcess2().getProcess1())>); // Process2& - CHECK(std::is_reference_v<decltype( - sequence2.getProcess2().getProcess2())>); // Process3& + CHECK(std::is_reference_v< + decltype(sequence2.getProcess2().getProcess1())>); // Process2& + CHECK(std::is_reference_v< + decltype(sequence2.getProcess2().getProcess2())>); // Process3& // and now with rvalue initialization auto sequence2_rv = make_sequence(Process1(0), m2, Process3(0)); CHECK(!std::is_reference_v<decltype(sequence2_rv.getProcess1())>); // Process1 CHECK(!std::is_reference_v<decltype(sequence2_rv.getProcess2())>); // ProcessSequence - CHECK(std::is_reference_v<decltype( - sequence2_rv.getProcess2().getProcess1())>); // Process2& - CHECK(!std::is_reference_v<decltype( - sequence2_rv.getProcess2().getProcess2())>); // Process3 + CHECK(std::is_reference_v< + decltype(sequence2_rv.getProcess2().getProcess1())>); // Process2& + CHECK(!std::is_reference_v< + decltype(sequence2_rv.getProcess2().getProcess2())>); // Process3 } SECTION("lifetime") {