diff --git a/corsika/detail/modules/proposal/HadronicPhotonModel.inl b/corsika/detail/modules/proposal/HadronicPhotonModel.inl index c6e30a4d34b905a94bc1f2f00d02cc4d52df197a..eeba6a1be76447adbb8032d95614bb0c65d978bd 100644 --- a/corsika/detail/modules/proposal/HadronicPhotonModel.inl +++ b/corsika/detail/modules/proposal/HadronicPhotonModel.inl @@ -25,14 +25,15 @@ namespace corsika::proposal { HEPEnergyType const sqrtS = calculate_com_energy(_heenthresholdNN, Rho0::mass, Proton::mass); if (!heHadronicInteraction_.isValid(Code::Rho0, Code::Proton, sqrtS)) { - CORSIKA_LOG_ERROR( + CORSIKA_LOGGER_CRITICAL( + logger_, "Invalid energy threshold for hadron interaction model. theshold_lab= {} GeV, " "theshold_com={} GeV", _heenthresholdNN / 1_GeV, sqrtS / 1_GeV); throw std::runtime_error("Configuration error!"); } - CORSIKA_LOG_INFO( - "Threshold for HE hadronic interactions in proposal set to Elab={} GeV", + CORSIKA_LOGGER_DEBUG( + logger_, "Threshold for HE hadronic interactions in proposal set to Elab={} GeV", _heenthresholdNN / 1_GeV); }; @@ -42,8 +43,8 @@ namespace corsika::proposal { TStackView& view, CoordinateSystemPtr const& labCS, FourMomentum const& photonP4, Code const& targetId) { if (photonP4.getTimeLikeComponent() > heHadronicModelThresholdLabNN_) { - CORSIKA_LOG_INFO( - "HE photo-hadronic interaction! calling hadronic interaction model.."); + CORSIKA_LOGGER_TRACE( + logger_, "HE photo-hadronic interaction! calling hadronic interaction model.."); // copy from sibyll::NuclearInteractionModel // temporarily add to stack, will be removed after interaction in DoInteraction @@ -63,8 +64,9 @@ namespace corsika::proposal { TStackView photon_secondaries(hadronicPhoton); // call inner hadronic event generator - CORSIKA_LOG_INFO("{} + {} interaction. Ekinlab = {} GeV", hadPhotonCode, targetId, - photonP4.getTimeLikeComponent() / 1_GeV); + CORSIKA_LOGGER_TRACE(logger_, "{} + {} interaction. Ekinlab = {} GeV", + hadPhotonCode, targetId, + photonP4.getTimeLikeComponent() / 1_GeV); heHadronicInteraction_.doInteraction(photon_secondaries, hadPhotonCode, targetId, photonP4, targetP4); for (const auto& pSec : photon_secondaries) { @@ -74,10 +76,10 @@ namespace corsika::proposal { calculate_kinetic_energy(p3lab.getNorm(), get_mass(pid)); view.addSecondary(std::make_tuple(pid, secEkin, p3lab.normalized())); } - CORSIKA_LOG_INFO("number of particles produced: {}", view.getEntries()); } else { - CORSIKA_LOG_INFO( - "LE photo-hadronic interaction! production of secondaries not implemented.."); + CORSIKA_LOGGER_TRACE( + logger_, + "LE photo-hadronic interaction! Production of secondaries not implemented.."); } return ProcessReturn::Ok; } diff --git a/corsika/detail/modules/proposal/InteractionModel.inl b/corsika/detail/modules/proposal/InteractionModel.inl index 867b0385836d47f68f844dd449974d67e9469444..4790e1e5443b432d38fed4a6edb893d7eacd21f1 100644 --- a/corsika/detail/modules/proposal/InteractionModel.inl +++ b/corsika/detail/modules/proposal/InteractionModel.inl @@ -124,7 +124,8 @@ namespace corsika::proposal { auto const A = int(target.GetAtomicNum()); auto const Z = int(target.GetNucCharge()); Code const targetId = get_nucleus_code(A, Z); - CORSIKA_LOG_INFO( + CORSIKA_LOGGER_DEBUG( + logger_, "photo-hadronic interaction of projectile={} with target={}! Energy={} GeV", projectileId, targetId, E / 1_GeV); this->doHadronicPhotonInteraction(view, labCS, photonP4, targetId); diff --git a/corsika/modules/proposal/HadronicPhotonModel.hpp b/corsika/modules/proposal/HadronicPhotonModel.hpp index b8e8a41564e1eff35745b724e769f09129634846..f021ab508b7d8cecbbbb8cc105f0f23cae4229da 100644 --- a/corsika/modules/proposal/HadronicPhotonModel.hpp +++ b/corsika/modules/proposal/HadronicPhotonModel.hpp @@ -35,6 +35,7 @@ namespace corsika::proposal { FourMomentum const&, Code const&); private: + inline static auto logger_{get_logger("corsika_proposal_HadronicPhotonModel")}; THadronicModel& heHadronicInteraction_; //! threshold for high energy hadronic interaction model. Lab. energy per nucleon HEPEnergyType heHadronicModelThresholdLabNN_; diff --git a/corsika/modules/proposal/InteractionModel.hpp b/corsika/modules/proposal/InteractionModel.hpp index 6e41f9752562fda794dfa997c2beb1161d9edf02..78a9445dc4e3f9705886d8beb38c7da0a102ddf8 100644 --- a/corsika/modules/proposal/InteractionModel.hpp +++ b/corsika/modules/proposal/InteractionModel.hpp @@ -49,6 +49,8 @@ namespace corsika::proposal { //! void buildCalculator(Code, NuclearComposition const&) final; + inline static auto logger_{get_logger("corsika_proposal_InteractionModel")}; + public: //! //! Produces the stoachastic loss calculator for leptons based on nuclear