diff --git a/corsika/detail/modules/conex/CONEXhybrid.inl b/corsika/detail/modules/conex/CONEXhybrid.inl index 5b350013f27d75eeaf7ed2ed8f1ea5c0bed6cb61..6ab443e49bb7920d1e6a544ec84941236c8a1192 100644 --- a/corsika/detail/modules/conex/CONEXhybrid.inl +++ b/corsika/detail/modules/conex/CONEXhybrid.inl @@ -54,7 +54,8 @@ namespace corsika { return b.normalized(); })} - , y_sf_{showerAxis_.getDirection().cross(x_sf_)} { + , y_sf_{showerAxis_.getDirection().cross(x_sf_)} + , energy_em_(0_GeV) { CORSIKA_LOG_DEBUG("x_sf (conexObservationCS): {}", x_sf_.getComponents(conexObservationCS_)); @@ -180,6 +181,7 @@ namespace corsika { double const E = energy / 1_GeV; double const m = mass / 1_GeV; + energy_em_ += energy; CORSIKA_LOG_DEBUG("CONEXhybrid: removing {} {:5e} GeV", egs_pid, energy); @@ -284,4 +286,8 @@ namespace corsika { fitout.close(); } + inline HEPEnergyType CONEXhybrid::getEnergyEM() const { return energy_em_; } + + inline void CONEXhybrid::reset() { energy_em_ = 0_GeV; } + } // namespace corsika diff --git a/corsika/detail/modules/qgsjetII/Interaction.inl b/corsika/detail/modules/qgsjetII/Interaction.inl index a97265abc3a3aa442e9d373d579a37fe3da66412..2409ff8f45c5648269e883875f37b2ef0b8a2294 100644 --- a/corsika/detail/modules/qgsjetII/Interaction.inl +++ b/corsika/detail/modules/qgsjetII/Interaction.inl @@ -241,7 +241,7 @@ namespace corsika::qgsjetII { if (targetCode != Proton::code) throw std::runtime_error("QgsjetII Taget not possible."); } - CORSIKA_LOG_DEBUG("Interaction: target qgsjetII code/A: ", targetMassNumber); + CORSIKA_LOG_DEBUG("Interaction: target qgsjetII code/A: {}", targetMassNumber); int projectileMassNumber = 1; // "1" means "hadron" QgsjetIIHadronType qgsjet_hadron_type = diff --git a/corsika/modules/conex/CONEXhybrid.hpp b/corsika/modules/conex/CONEXhybrid.hpp index b8927f6356bea06dc89845b011517f594a48b928..d5480d9db0ca6ec97e0be7965565172078053c7f 100644 --- a/corsika/modules/conex/CONEXhybrid.hpp +++ b/corsika/modules/conex/CONEXhybrid.hpp @@ -39,6 +39,9 @@ namespace corsika { CoordinateSystemPtr const& getObserverCS() const { return conexObservationCS_; } + HEPEnergyType getEnergyEM() const; + void reset(); + private: // data members //! CONEX e.m. particle codes @@ -52,6 +55,7 @@ namespace corsika { CoordinateSystemPtr const conexObservationCS_; //!< CONEX observation frame DirectionVector const x_sf_, y_sf_; //!< unit vectors of CONEX shower frame, z_sf is shower axis direction + HEPEnergyType energy_em_; }; } // namespace corsika