File indexing completed on 2025-01-18 09:10:50
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <limits>
0010 #include <map>
0011
0012 namespace Acts {
0013
0014 inline const SurfaceArray* Layer::surfaceArray() const {
0015 return m_surfaceArray.get();
0016 }
0017
0018 inline SurfaceArray* Layer::surfaceArray() {
0019 return const_cast<SurfaceArray*>(m_surfaceArray.get());
0020 }
0021
0022 inline double Layer::thickness() const {
0023 return m_layerThickness;
0024 }
0025
0026 inline LayerType Layer::layerType() const {
0027 return m_layerType;
0028 }
0029
0030 inline const TrackingVolume* Layer::trackingVolume() const {
0031 return m_trackingVolume;
0032 }
0033
0034 inline void Layer::encloseTrackingVolume(const TrackingVolume& tvol) {
0035 m_trackingVolume = &(tvol);
0036 }
0037
0038 inline const Volume* Layer::representingVolume() const {
0039 return m_representingVolume.get();
0040 }
0041
0042 inline const Layer* Layer::nextLayer(const GeometryContext& ,
0043 const Vector3& position,
0044 const Vector3& direction) const {
0045
0046 if (m_nextLayerUtility == nullptr) {
0047 return nullptr;
0048 }
0049 return (m_nextLayerUtility->nextDirection(position, direction) < 0)
0050 ? m_nextLayers.first
0051 : m_nextLayers.second;
0052 }
0053
0054 inline bool Layer::resolve(bool resolveSensitive, bool resolveMaterial,
0055 bool resolvePassive) const {
0056 if (resolvePassive) {
0057 return true;
0058 }
0059 if (resolveSensitive && m_surfaceArray) {
0060 return true;
0061 }
0062 if (resolveMaterial &&
0063 (m_ssSensitiveSurfaces > 1 || m_ssApproachSurfaces > 1 ||
0064 (surfaceRepresentation().surfaceMaterial() != nullptr))) {
0065 return true;
0066 }
0067 return false;
0068 }
0069
0070 inline bool Layer::isOnLayer(const GeometryContext& gctx,
0071 const Vector3& position,
0072 const BoundaryTolerance& boundaryTolerance) const {
0073 if (m_representingVolume != nullptr) {
0074 return m_representingVolume->inside(position);
0075 }
0076 return surfaceRepresentation().isOnSurface(gctx, position, Vector3::Zero(),
0077 boundaryTolerance);
0078 }
0079
0080 }