diff --git a/Framework/Geometry/QuantityVector.h b/Framework/Geometry/QuantityVector.h index 2c09260c0a65bd0ee24ce806eeb22d8addb2d15f..0b3776464e0cdeadce5cec17bd770ce9eab452ee 100644 --- a/Framework/Geometry/QuantityVector.h +++ b/Framework/Geometry/QuantityVector.h @@ -54,11 +54,11 @@ namespace corsika::geometry { return Quantity(phys::units::detail::magnitude_tag, eVector[index]); } - auto GetX() const { return Quantity(phys::units::detail::magnitude_tag, eVector[0]); } + auto GetX() const { return (*this)[0]; } - auto GetY() const { return Quantity(phys::units::detail::magnitude_tag, eVector[1]); } + auto GetY() const { return (*this)[1]; } - auto GetZ() const { return Quantity(phys::units::detail::magnitude_tag, eVector[2]); } + auto GetZ() const { return (*this)[2]; } auto norm() const { return Quantity(phys::units::detail::magnitude_tag, eVector.norm());