IAP GITLAB

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

added Stack::first() to access first particle irrespective of deleted flag

parent 6f35d600
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
......@@ -8,7 +8,6 @@
#pragma once
namespace corsika::stack {
/**
......
......@@ -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);
......
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