IAP GITLAB

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

added mass to sibstack

parent fc91d2a2
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,11 @@ namespace corsika::process::sibyll { ...@@ -28,6 +28,11 @@ namespace corsika::process::sibyll {
using namespace corsika::units::hep; using namespace corsika::units::hep;
s_plist_.p[3][i] = v / 1_GeV; 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) { void SetMomentum(const int i, const MomentumVector& v) {
using namespace corsika::units; using namespace corsika::units;
using namespace corsika::units::hep; using namespace corsika::units::hep;
...@@ -41,6 +46,10 @@ namespace corsika::process::sibyll { ...@@ -41,6 +46,10 @@ namespace corsika::process::sibyll {
using namespace corsika::units::hep; using namespace corsika::units::hep;
return s_plist_.p[3][i] * 1_GeV; 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 { MomentumVector GetMomentum(const int i) const {
using corsika::geometry::CoordinateSystem; using corsika::geometry::CoordinateSystem;
...@@ -80,6 +89,12 @@ namespace corsika::process::sibyll { ...@@ -80,6 +89,12 @@ namespace corsika::process::sibyll {
corsika::units::hep::EnergyType GetEnergy() const { corsika::units::hep::EnergyType GetEnergy() const {
return GetStackData().GetEnergy(GetIndex()); 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 bool HasDecayed() const
{ {
return abs(GetStackData().GetId(GetIndex()))>100 ? true : false; return abs(GetStackData().GetId(GetIndex()))>100 ? true : false;
......
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