From e60e156d1d331309f997c592fab74af3cfa41176 Mon Sep 17 00:00:00 2001 From: Felix Riehn <felix@matilda> Date: Wed, 26 Dec 2018 22:42:17 +0000 Subject: [PATCH] added mass to sibstack --- Processes/Sibyll/SibStack.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Processes/Sibyll/SibStack.h b/Processes/Sibyll/SibStack.h index d78273822..9d395c19b 100644 --- a/Processes/Sibyll/SibStack.h +++ b/Processes/Sibyll/SibStack.h @@ -28,6 +28,11 @@ namespace corsika::process::sibyll { using namespace corsika::units::hep; s_plist_.p[3][i] = v / 1_GeV; } + void SetMass(const int i, const corsika::units::hep::MassType v) { + using namespace corsika::units::hep; + s_plist_.p[4][i] = v / 1_GeV; + } + void SetMomentum(const int i, const MomentumVector& v) { using namespace corsika::units; using namespace corsika::units::hep; @@ -41,6 +46,10 @@ namespace corsika::process::sibyll { using namespace corsika::units::hep; return s_plist_.p[3][i] * 1_GeV; } + corsika::units::hep::EnergyType GetMass(const int i) const { + using namespace corsika::units::hep; + return s_plist_.p[4][i] * 1_GeV; + } MomentumVector GetMomentum(const int i) const { using corsika::geometry::CoordinateSystem; @@ -80,6 +89,12 @@ namespace corsika::process::sibyll { corsika::units::hep::EnergyType GetEnergy() const { return GetStackData().GetEnergy(GetIndex()); } + void SetMass(const corsika::units::hep::MassType v) { + GetStackData().SetMass(GetIndex(), v); + } + corsika::units::hep::EnergyType GetMass() const { + return GetStackData().GetMass(GetIndex()); + } bool HasDecayed() const { return abs(GetStackData().GetId(GetIndex()))>100 ? true : false; -- GitLab