File indexing completed on 2026-06-17 07:46:02
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Geometry/GeometryContext.hpp"
0013 #include "Acts/Geometry/GeometryIdentifier.hpp"
0014 #include "Acts/Utilities/AxisDefinitions.hpp"
0015 #include "Acts/Utilities/VectorHelpers.hpp"
0016
0017 namespace Acts {
0018
0019
0020
0021
0022
0023
0024
0025 class GeometryObject {
0026 public:
0027
0028 GeometryObject() = default;
0029
0030
0031 GeometryObject(const GeometryObject&) = default;
0032
0033
0034
0035
0036 explicit GeometryObject(const GeometryIdentifier& geometryId)
0037 : m_geometryId(geometryId) {}
0038
0039 virtual ~GeometryObject() noexcept = default;
0040
0041
0042 GeometryIdentifier geometryId() const;
0043
0044
0045
0046
0047
0048
0049
0050 virtual Vector3 referencePosition(const GeometryContext& gctx,
0051 AxisDirection aDir) const = 0;
0052
0053
0054
0055
0056
0057
0058
0059 virtual double referencePositionValue(const GeometryContext& gctx,
0060 AxisDirection aDir) const;
0061
0062
0063
0064
0065 void assignGeometryId(const GeometryIdentifier& geometryId);
0066
0067 protected:
0068
0069 GeometryIdentifier m_geometryId;
0070 };
0071
0072 inline GeometryIdentifier GeometryObject::geometryId() const {
0073 return m_geometryId;
0074 }
0075
0076 inline void GeometryObject::assignGeometryId(
0077 const GeometryIdentifier& geometryId) {
0078 m_geometryId = geometryId;
0079 }
0080
0081 inline double GeometryObject::referencePositionValue(
0082 const GeometryContext& gctx, AxisDirection aDir) const {
0083 return VectorHelpers::cast(referencePosition(gctx, aDir), aDir);
0084 }
0085
0086 }