diff --git a/corsika/detail/modules/sibyll/HadronInteractionModel.inl b/corsika/detail/modules/sibyll/HadronInteractionModel.inl index 5114ce159011d7da979101f2c2eadee12c6a8711..00bce22a53b2ee9bfb4bd204d19bced868d91a54 100644 --- a/corsika/detail/modules/sibyll/HadronInteractionModel.inl +++ b/corsika/detail/modules/sibyll/HadronInteractionModel.inl @@ -20,7 +20,9 @@ namespace corsika::sibyll { - inline void HadronInteractionModel::setVerbose(bool const flag) { sibyll_listing_ = flag; } + inline void HadronInteractionModel::setVerbose(bool const flag) { + sibyll_listing_ = flag; + } inline HadronInteractionModel::HadronInteractionModel() : sibyll_listing_(false) { @@ -36,9 +38,8 @@ namespace corsika::sibyll { CORSIKA_LOG_DEBUG("Sibyll::Model n={}, Nnuc={}", count_, nucCount_); } - inline bool constexpr HadronInteractionModel::isValid(Code const projectileId, - Code const targetId, - HEPEnergyType const sqrtSnn) const { + inline bool constexpr HadronInteractionModel::isValid( + Code const projectileId, Code const targetId, HEPEnergyType const sqrtSnn) const { if ((minEnergyCoM_ > sqrtSnn) || (sqrtSnn > maxEnergyCoM_)) { return false; } if (is_nucleus(targetId)) { @@ -57,9 +58,10 @@ namespace corsika::sibyll { } inline std::tuple<CrossSectionType, CrossSectionType> - HadronInteractionModel::getCrossSectionInelEla(Code const projectileId, Code const targetId, - FourMomentum const& projectileP4, - FourMomentum const& targetP4) const { + HadronInteractionModel::getCrossSectionInelEla(Code const projectileId, + Code const targetId, + FourMomentum const& projectileP4, + FourMomentum const& targetP4) const { int targetSibCode = 1; // nucleon or particle count if (is_nucleus(targetId)) { targetSibCode = get_nucleus_A(targetId); } @@ -98,10 +100,10 @@ namespace corsika::sibyll { template <typename TSecondaryView> inline void HadronInteractionModel::doInteraction(TSecondaryView& secondaries, - Code const projectileId, - Code const targetId, - FourMomentum const& projectileP4, - FourMomentum const& targetP4) { + Code const projectileId, + Code const targetId, + FourMomentum const& projectileP4, + FourMomentum const& targetP4) { int targetSibCode = 1; // nucleon or particle count if (is_nucleus(targetId)) { targetSibCode = get_nucleus_A(targetId); } diff --git a/corsika/detail/modules/sibyll/InteractionModel.inl b/corsika/detail/modules/sibyll/InteractionModel.inl index 42dd8e124c67e15ba7fc12caa420fefe56bc2eb1..5c2be73da315883e2423347519aac6beb4021938 100644 --- a/corsika/detail/modules/sibyll/InteractionModel.inl +++ b/corsika/detail/modules/sibyll/InteractionModel.inl @@ -5,7 +5,7 @@ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of * the license. */ - + #pragma once #include <corsika/framework/core/ParticleProperties.hpp> @@ -23,8 +23,9 @@ namespace corsika::sibyll { inline HadronInteractionModel& InteractionModel::getHadronInteractionModel() { return hadronSibyll_; } - - inline HadronInteractionModel const& InteractionModel::getHadronInteractionModel() const { + + inline HadronInteractionModel const& InteractionModel::getHadronInteractionModel() + const { return hadronSibyll_; } @@ -51,9 +52,9 @@ namespace corsika::sibyll { template <typename TSecondaries> inline void InteractionModel::doInteraction(TSecondaries& view, Code projCode, - Code targetCode, - FourMomentum const& proj4mom, - FourMomentum const& target4mom) { + Code targetCode, + FourMomentum const& proj4mom, + FourMomentum const& target4mom) { if (is_nucleus(projCode)) return getNuclearInteractionModel().doInteraction(view, projCode, targetCode, proj4mom, target4mom); diff --git a/corsika/detail/modules/sibyll/NuclearInteractionModel.inl b/corsika/detail/modules/sibyll/NuclearInteractionModel.inl index 478e375e1bcfae23350c1484e8d8a9762a1a0e88..b3375b264a5759e60ca72d25a6fbd30aab50f151 100644 --- a/corsika/detail/modules/sibyll/NuclearInteractionModel.inl +++ b/corsika/detail/modules/sibyll/NuclearInteractionModel.inl @@ -53,8 +53,7 @@ namespace corsika::sibyll { } // namespace corsika::sibyll template <typename TNucleonModel> - inline void - NuclearInteractionModel<TNucleonModel>::printCrossSectionTable( + inline void NuclearInteractionModel<TNucleonModel>::printCrossSectionTable( Code const pCode) const { if (!hadronicInteraction_.isValid(Code::Proton, pCode, 100_GeV)) { // LCOV_EXCL_START CORSIKA_LOG_ERROR("Invalid target type {} for hadron interaction model.", pCode); @@ -86,8 +85,8 @@ namespace corsika::sibyll { template <typename TNucleonModel> template <typename TEnvironment> - inline void - NuclearInteractionModel<TNucleonModel>::initializeNuclearCrossSections(TEnvironment const& environment) { + inline void NuclearInteractionModel<TNucleonModel>::initializeNuclearCrossSections( + TEnvironment const& environment) { auto const& universe = *(environment.getUniverse()); // generate complete list of all nuclei types in universe @@ -158,8 +157,7 @@ namespace corsika::sibyll { } template <typename TNucleonModel> - inline CrossSectionType - NuclearInteractionModel<TNucleonModel>::readCrossSectionTable( + inline CrossSectionType NuclearInteractionModel<TNucleonModel>::readCrossSectionTable( int const ia, Code const pTarget, HEPEnergyType const elabnuc) const { int const ib = targetComponentsIndex_.at(pTarget) + 1; // table index in fortran @@ -176,11 +174,9 @@ namespace corsika::sibyll { } template <typename TNucleonModel> - CrossSectionType inline NuclearInteractionModel< - TNucleonModel>::getCrossSection(Code const projectileId, - Code const targetId, - FourMomentum const& projectileP4, - FourMomentum const& targetP4) const { + CrossSectionType inline NuclearInteractionModel<TNucleonModel>::getCrossSection( + Code const projectileId, Code const targetId, FourMomentum const& projectileP4, + FourMomentum const& targetP4) const { HEPEnergyType const sqrtSnn = (projectileP4 + targetP4).getNorm(); if (!isValid(projectileId, targetId, sqrtSnn)) { return CrossSectionType::zero(); } diff --git a/corsika/modules/Sibyll.hpp b/corsika/modules/Sibyll.hpp index 48b87cca07e02a3c5ad7d8fc0dfcbc3bdb2d5901..40be61bb2ff4bf688744b0f305bb10c4ab26da29 100644 --- a/corsika/modules/Sibyll.hpp +++ b/corsika/modules/Sibyll.hpp @@ -31,10 +31,10 @@ namespace corsika::sibyll { * The sibyll::InteractionModel is wrapped as an InteractionProcess here in order * to provide all the functions for ProcessSequence. */ - struct Interaction : public InteractionModel, - public InteractionProcess<Interaction> { - template <typename TEnvironment> - Interaction(TEnvironment const& env) : InteractionModel{env} {} + struct Interaction : public InteractionModel, public InteractionProcess<Interaction> { + template <typename TEnvironment> + Interaction(TEnvironment const& env) + : InteractionModel{env} {} }; /** diff --git a/corsika/modules/sibyll/NuclearInteractionModel.hpp b/corsika/modules/sibyll/NuclearInteractionModel.hpp index 6b6f46b3b6d18d11da64066d3669aa935f29e4e6..e13e6027d417bcb8ddb3f60220d486b387037fba 100644 --- a/corsika/modules/sibyll/NuclearInteractionModel.hpp +++ b/corsika/modules/sibyll/NuclearInteractionModel.hpp @@ -28,7 +28,7 @@ namespace corsika::sibyll { public: template <class TEnvironment> NuclearInteractionModel(TNucleonModel&, TEnvironment const&); - + ~NuclearInteractionModel(); bool constexpr isValid(Code const projectileId, Code const targetId, @@ -36,7 +36,7 @@ namespace corsika::sibyll { template <class TEnvironment> void initializeNuclearCrossSections(TEnvironment const&); - + void printCrossSectionTable(Code) const; CrossSectionType readCrossSectionTable(int const, Code const, HEPEnergyType const) const;