IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 244cff6c authored by Felix Riehn's avatar Felix Riehn
Browse files

added HasDecayed query to SibStack

parent f8e82c66
No related branches found
No related tags found
No related merge requests found
...@@ -220,7 +220,7 @@ namespace corsika::process::sibyll { ...@@ -220,7 +220,7 @@ namespace corsika::process::sibyll {
for (auto& psib : ss) { for (auto& psib : ss) {
++i; ++i;
// skip particles that have decayed in Sibyll // skip particles that have decayed in Sibyll
if (abs(s_plist_.llist[i]) > 100) continue; if( psib.HasDecayed()) continue;
// transform energy to lab. frame, primitve // transform energy to lab. frame, primitve
// compute beta_vec * p_vec // compute beta_vec * p_vec
......
...@@ -20,7 +20,7 @@ namespace corsika::process::sibyll { ...@@ -20,7 +20,7 @@ namespace corsika::process::sibyll {
void Clear() { s_plist_.np = 0; } void Clear() { s_plist_.np = 0; }
int GetSize() const { return s_plist_.np; } int GetSize() const { return s_plist_.np; }
#warning check actual capacity of sibyll stack
int GetCapacity() const { return 8000; } int GetCapacity() const { return 8000; }
void SetId(const int i, const int v) { s_plist_.llist[i] = v; } void SetId(const int i, const int v) { s_plist_.llist[i] = v; }
...@@ -80,6 +80,10 @@ namespace corsika::process::sibyll { ...@@ -80,6 +80,10 @@ namespace corsika::process::sibyll {
corsika::units::hep::EnergyType GetEnergy() const { corsika::units::hep::EnergyType GetEnergy() const {
return GetStackData().GetEnergy(GetIndex()); return GetStackData().GetEnergy(GetIndex());
} }
bool HasDecayed() const
{
return abs(GetStackData().GetId(GetIndex()))>100 ? true : false;
}
void SetPID(const int v) { GetStackData().SetId(GetIndex(), v); } void SetPID(const int v) { GetStackData().SetId(GetIndex(), v); }
corsika::process::sibyll::SibyllCode GetPID() const { corsika::process::sibyll::SibyllCode GetPID() const {
return static_cast<corsika::process::sibyll::SibyllCode>( return static_cast<corsika::process::sibyll::SibyllCode>(
......
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