IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 0084fc56 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan: Committed by ralfulrich
Browse files

count only interactions in HistoryObservationPlane

parent 99ff6eda
No related branches found
No related tags found
No related merge requests found
...@@ -73,9 +73,10 @@ void HistoryObservationPlane::fillHistoryHistogram( ...@@ -73,9 +73,10 @@ void HistoryObservationPlane::fillHistoryHistogram(
int intCounter = 0; int intCounter = 0;
while (event) { while (event) {
if (event->eventType() == EventType::Interaction) intCounter++;
event = event->parentEvent().get(); event = event->parentEvent().get();
intCounter++;
} }
histogram_(intCounter); histogram_(intCounter);
} }
......
...@@ -23,18 +23,9 @@ namespace corsika::history { ...@@ -23,18 +23,9 @@ namespace corsika::history {
inline auto hist_factory() { inline auto hist_factory() {
namespace bh = boost::histogram; namespace bh = boost::histogram;
namespace bha = bh::axis; namespace bha = bh::axis;
auto h = bh::make_histogram( auto h =
bha::regular<double, bha::transform::log>{130, 1e8, 1e21, "muon energy/eV"}, bh::make_histogram(bha::integer<int, bh::use_default, bha::option::growth_t>{
bha::integer<int, bh::use_default, bha::option::growth_t>{ 0, 10, "hadronic generation"});
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"});
*/
return h; return h;
} }
} // namespace detail } // namespace detail
...@@ -44,8 +35,6 @@ namespace corsika::history { ...@@ -44,8 +35,6 @@ namespace corsika::history {
public: public:
HistoryObservationPlane(setup::Stack const&, geometry::Plane const&, bool = true); HistoryObservationPlane(setup::Stack const&, geometry::Plane const&, bool = true);
//~ void save(std::string const&);
corsika::units::si::LengthType MaxStepLength( corsika::units::si::LengthType MaxStepLength(
corsika::setup::Stack::ParticleType const&, corsika::setup::Stack::ParticleType const&,
corsika::setup::Trajectory const& vTrajectory); corsika::setup::Trajectory const& vTrajectory);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment