diff --git a/Stack/History/HistoryObservationPlane.cpp b/Stack/History/HistoryObservationPlane.cpp index 542478eb5aca9dc99a4576ca3186fd9390a9ad0b..e8a8e06a9c605f9af5d334219d6762321ee5b84d 100644 --- a/Stack/History/HistoryObservationPlane.cpp +++ b/Stack/History/HistoryObservationPlane.cpp @@ -73,9 +73,10 @@ void HistoryObservationPlane::fillHistoryHistogram( int intCounter = 0; while (event) { + if (event->eventType() == EventType::Interaction) intCounter++; event = event->parentEvent().get(); - intCounter++; } + histogram_(intCounter); } diff --git a/Stack/History/HistoryObservationPlane.hpp b/Stack/History/HistoryObservationPlane.hpp index ef1aa037371b77347960ac8813ee8e91de732a78..11c4b86cc16945c8db400132f12b40874716fe66 100644 --- a/Stack/History/HistoryObservationPlane.hpp +++ b/Stack/History/HistoryObservationPlane.hpp @@ -23,18 +23,9 @@ namespace corsika::history { inline auto hist_factory() { namespace bh = boost::histogram; namespace bha = bh::axis; - auto h = bh::make_histogram( - bha::regular<double, bha::transform::log>{130, 1e8, 1e21, "muon energy/eV"}, - bha::integer<int, bh::use_default, bha::option::growth_t>{ - 0, 10, "hadronic interaction generation"}, - bha::regular<double, bha::transform::log>{130, 1e8, 1e21, "hadronic energy/eV"}, - bha::category<int, bh::use_default, bha::option::growth_t>{}); - /* - auto h = bh::make_histogram( - bha::integer<int, bh::use_default, - bha::option::growth_t>{ - 0, 10, "hadronic generation"}); - */ + auto h = + bh::make_histogram(bha::integer<int, bh::use_default, bha::option::growth_t>{ + 0, 10, "hadronic generation"}); return h; } } // namespace detail @@ -44,8 +35,6 @@ namespace corsika::history { public: HistoryObservationPlane(setup::Stack const&, geometry::Plane const&, bool = true); - //~ void save(std::string const&); - corsika::units::si::LengthType MaxStepLength( corsika::setup::Stack::ParticleType const&, corsika::setup::Trajectory const& vTrajectory);