File indexing completed on 2025-01-18 09:10:52
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/Layer.hpp"
0014 #include "Acts/Surfaces/BoundaryTolerance.hpp"
0015 #include "Acts/Surfaces/Surface.hpp"
0016 #include "Acts/Utilities/AxisDefinitions.hpp"
0017
0018 #include <algorithm>
0019 #include <memory>
0020 #include <utility>
0021
0022 namespace Acts {
0023
0024
0025
0026
0027
0028
0029 class NavigationLayer : public Layer {
0030 public:
0031
0032
0033
0034
0035
0036 static LayerPtr create(std::shared_ptr<const Surface> sRepresentation,
0037 double thickness = 0.) {
0038 return LayerPtr(new NavigationLayer(std::move(sRepresentation), thickness));
0039 }
0040
0041
0042 ~NavigationLayer() override;
0043
0044
0045
0046
0047
0048
0049
0050
0051 Vector3 referencePosition(const GeometryContext& gctx,
0052 AxisDirection aDir) const final;
0053
0054
0055 NavigationLayer() = delete;
0056
0057
0058 NavigationLayer(const NavigationLayer&) = delete;
0059
0060
0061 NavigationLayer& operator=(const NavigationLayer&) = delete;
0062
0063
0064
0065 const Surface& surfaceRepresentation() const final;
0066
0067
0068 Surface& surfaceRepresentation() final;
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078 bool isOnLayer(const GeometryContext& gctx, const Vector3& gp,
0079 const BoundaryTolerance& boundaryTolerance =
0080 BoundaryTolerance::None()) const final;
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091 bool resolve(bool resolveSensitive, bool resolveMaterial,
0092 bool resolvePassive) const final;
0093
0094 protected:
0095
0096
0097
0098
0099
0100
0101 NavigationLayer(std::shared_ptr<const Surface> surfaceRepresentation,
0102 double thickness);
0103
0104
0105
0106
0107
0108
0109 std::shared_ptr<const Surface> m_surfaceRepresentation;
0110 };
0111
0112 inline const Surface& NavigationLayer::surfaceRepresentation() const {
0113 return (*m_surfaceRepresentation);
0114 }
0115
0116 inline Surface& NavigationLayer::surfaceRepresentation() {
0117 return *(const_cast<Surface*>(m_surfaceRepresentation.get()));
0118 }
0119
0120 inline Vector3 NavigationLayer::referencePosition(const GeometryContext& gctx,
0121 AxisDirection aDir) const {
0122 return m_surfaceRepresentation->referencePosition(gctx, aDir);
0123 }
0124
0125 inline bool NavigationLayer::isOnLayer(
0126 const GeometryContext& gctx, const Vector3& gp,
0127 const BoundaryTolerance& boundaryTolerance) const {
0128 return m_surfaceRepresentation->isOnSurface(gctx, gp, Vector3::Zero(),
0129 boundaryTolerance);
0130 }
0131
0132 inline bool NavigationLayer::resolve(bool ,
0133 bool ,
0134 bool ) const {
0135 return false;
0136 }
0137
0138 }