File indexing completed on 2025-01-18 09:11:25
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Geometry/TrivialPortalLink.hpp"
0010
0011 #include "Acts/Geometry/GridPortalLink.hpp"
0012 #include "Acts/Geometry/TrackingVolume.hpp"
0013
0014 #include <memory>
0015
0016 namespace Acts {
0017
0018 std::unique_ptr<GridPortalLink> TrivialPortalLink::makeGrid(
0019 AxisDirection direction) const {
0020 return GridPortalLink::make(m_surface, *m_volume, direction);
0021 }
0022
0023 Result<const TrackingVolume*> TrivialPortalLink::resolveVolume(
0024 const GeometryContext& , const Vector2& ,
0025 double ) const {
0026 return m_volume;
0027 }
0028
0029 Result<const TrackingVolume*> TrivialPortalLink::resolveVolume(
0030 const GeometryContext& gctx, const Vector3& position,
0031 double tolerance) const {
0032 static_cast<void>(gctx);
0033 static_cast<void>(position);
0034 static_cast<void>(tolerance);
0035 assert(m_surface->isOnSurface(gctx, position, BoundaryTolerance::None(),
0036 tolerance) &&
0037 "Trivial portal lookup point should be on surface");
0038 return m_volume;
0039 }
0040
0041 void TrivialPortalLink::toStream(std::ostream& os) const {
0042 os << "TrivialPortalLink<vol=" << m_volume->volumeName() << ">";
0043 }
0044
0045 const TrackingVolume& TrivialPortalLink::volume() const {
0046 return *m_volume;
0047 }
0048
0049 }