diff --git a/Documentation/Examples/vertical_EAS.cc b/Documentation/Examples/vertical_EAS.cc index be2de7fe9aea5a4dfe78a55a33f56eaa56d2c276..2f4bd7dabd90807502147b4e7bf55b99dbea0cf8 100644 --- a/Documentation/Examples/vertical_EAS.cc +++ b/Documentation/Examples/vertical_EAS.cc @@ -6,7 +6,6 @@ * the license. */ -#include <corsika/process/interaction_counter/InteractionCounter.hpp> #include <corsika/cascade/Cascade.h> #include <corsika/environment/Environment.h> #include <corsika/environment/FlatExponential.h> @@ -31,12 +30,13 @@ #include <corsika/process/sibyll/NuclearInteraction.h> #include <corsika/process/switch_process/SwitchProcess.h> #include <corsika/process/tracking_line/TrackingLine.h> +#include <corsika/process/urqmd/UrQMD.h> #include <corsika/random/RNGManager.h> #include <corsika/setup/SetupStack.h> #include <corsika/setup/SetupTrajectory.h> #include <corsika/units/PhysicalUnits.h> #include <corsika/utl/CorsikaFenv.h> -#include <corsika/process/urqmd/UrQMD.h> +#include <corsika/process/interaction_counter/InteractionCounter.hpp> #include <iomanip> #include <iostream> diff --git a/Framework/StackInterface/ParticleBase.h b/Framework/StackInterface/ParticleBase.h index e372b768ef5f04d50bf4129222e8987ef0a5f7b9..1bf7d0ad8834eddd51971feffcd4db0fd23fabb6 100644 --- a/Framework/StackInterface/ParticleBase.h +++ b/Framework/StackInterface/ParticleBase.h @@ -8,7 +8,6 @@ #pragma once - namespace corsika::stack { /** diff --git a/Framework/StackInterface/Stack.h b/Framework/StackInterface/Stack.h index d91ac679f5786d86831f080bfb922898184b8d3f..103d7b63cf1132525d06175c5447745f87c3e614 100644 --- a/Framework/StackInterface/Stack.h +++ b/Framework/StackInterface/Stack.h @@ -165,6 +165,11 @@ namespace corsika::stack { } return StackIterator(*this, i); } + + StackIterator first() { return StackIterator{*this, 0}; } + + ConstStackIterator cfirst() const { return ConstStackIterator{*this, 0}; } + StackIterator end() { return StackIterator(*this, getSize()); } StackIterator last() { unsigned int i = 0; @@ -345,9 +350,9 @@ namespace corsika::stack { nDeleted_ = 0; } - protected: unsigned int getSize() const { return data_.GetSize(); } + protected: bool isDeleted(unsigned int i) const { if (i >= deleted_.size()) return false; return deleted_.at(i);