|
||||
File indexing completed on 2025-01-19 09:23:22
0001 // This file is part of the Acts project. 0002 // 0003 // Copyright (C) 2016-2018 CERN for the benefit of the Acts project 0004 // 0005 // This Source Code Form is subject to the terms of the Mozilla Public 0006 // License, v. 2.0. If a copy of the MPL was not distributed with this 0007 // file, You can obtain one at http://mozilla.org/MPL/2.0/. 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/BoundaryCheck.hpp" 0015 #include "Acts/Surfaces/Surface.hpp" 0016 #include "Acts/Utilities/BinningType.hpp" 0017 0018 #include <algorithm> 0019 #include <memory> 0020 #include <utility> 0021 0022 namespace Acts { 0023 0024 /// @class NavigationLayer 0025 /// 0026 /// Class to be used for gaps in Volumes as a navigational link. 0027 /// Navigation Layers have a surface representation, but should usually never be 0028 /// propagated to. 0029 class NavigationLayer : public Layer { 0030 public: 0031 /// Factory Constructor - the surface representation is given by pointer 0032 /// (ownership passed) 0033 /// 0034 /// @param sRepresentation is the representation for extrapolation 0035 /// @param thickness is the thickness for the binning 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 /// Destructor 0042 ~NavigationLayer() override; 0043 0044 /// The binning position method 0045 /// 0046 /// @param gctx The current geometry context object, e.g. alignment 0047 /// @param bValue is the value for which the binning position is requested 0048 /// - as default the center is given, but may be overloaded 0049 /// 0050 /// @return The return vector can be used for binning in a TrackingVolume 0051 Vector3 binningPosition(const GeometryContext& gctx, 0052 BinningValue bValue) const final; 0053 0054 /// Default Constructor - deleted 0055 NavigationLayer() = delete; 0056 0057 /// Copy Constructor - deleted 0058 NavigationLayer(const NavigationLayer&) = delete; 0059 0060 /// Assignment operator - deleted 0061 NavigationLayer& operator=(const NavigationLayer&) = delete; 0062 0063 /// Transforms the layer into a Surface representation for extrapolation 0064 /// In general, extrapolation to a surface should be avoided 0065 const Surface& surfaceRepresentation() const final; 0066 0067 // Non-const version 0068 Surface& surfaceRepresentation() final; 0069 0070 /// Geometric isOnLayer() method 0071 /// using isOnSurface() with Layer specific tolerance 0072 /// 0073 /// @param gctx The current geometry context object, e.g. alignment 0074 /// @param gp is the global position for the check 0075 /// @param bcheck is the boundary check directive 0076 /// 0077 /// @return boolean that indicates if the position is on surface 0078 bool isOnLayer(const GeometryContext& gctx, const Vector3& gp, 0079 const BoundaryCheck& bcheck = BoundaryCheck(true)) const final; 0080 0081 /// Accept layer according to the following collection directives 0082 /// 0083 /// @param resolveSensitive is the prescription to find the sensitive surfaces 0084 /// @param resolveMaterial is the precription to find material surfaces 0085 /// @param resolvePassive is the prescription to find all passive surfaces 0086 /// 0087 /// @note navigation layers are never accepted 0088 /// 0089 /// @return a boolean whether the layer is accepted for processing 0090 bool resolve(bool resolveSensitive, bool resolveMaterial, 0091 bool resolvePassive) const final; 0092 0093 protected: 0094 /// Private Constructor 0095 /// - this is called by the creat(args*) method 0096 /// passed spacer layer if needed 0097 /// 0098 /// @param surfaceRepresentation is the surface of the layer 0099 /// @param thickness ithe layer thickness 0100 NavigationLayer(std::shared_ptr<const Surface> surfaceRepresentation, 0101 double thickness); 0102 0103 /// for the navigation Volume the surface 0104 /// 0105 /// We will need to mutate this surface during the geometry building process, 0106 /// but the C++ type system has no const-correct way of expressing this. 0107 /// 0108 std::shared_ptr<const Surface> m_surfaceRepresentation; 0109 }; 0110 0111 inline const Surface& NavigationLayer::surfaceRepresentation() const { 0112 return (*m_surfaceRepresentation); 0113 } 0114 0115 inline Surface& NavigationLayer::surfaceRepresentation() { 0116 return *(const_cast<Surface*>(m_surfaceRepresentation.get())); 0117 } 0118 0119 inline Vector3 NavigationLayer::binningPosition(const GeometryContext& gctx, 0120 BinningValue bValue) const { 0121 return m_surfaceRepresentation->binningPosition(gctx, bValue); 0122 } 0123 0124 inline bool NavigationLayer::isOnLayer(const GeometryContext& gctx, 0125 const Vector3& gp, 0126 const BoundaryCheck& bcheck) const { 0127 return m_surfaceRepresentation->isOnSurface(gctx, gp, Vector3::Zero(), 0128 bcheck); 0129 } 0130 0131 inline bool NavigationLayer::resolve(bool /*resolveSensitive*/, 0132 bool /*resolveMaterial*/, 0133 bool /*reolvePassive*/) const { 0134 return false; 0135 } 0136 0137 } // namespace Acts
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |