EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NavigationLayer.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file NavigationLayer.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2016-2018 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
13 #include "Acts/Geometry/Layer.hpp"
16 
17 namespace Acts {
18 
19 class Surface;
20 class BinUtility;
21 
27 
28 class NavigationLayer : public Layer {
29  public:
35  static LayerPtr create(std::shared_ptr<const Surface> sRepresentation,
36  double thickness = 0.) {
37  return LayerPtr(new NavigationLayer(std::move(sRepresentation), thickness));
38  }
39 
41  ~NavigationLayer() override;
42 
51  BinningValue bValue) const final;
52 
54  NavigationLayer() = delete;
55 
57  NavigationLayer(const NavigationLayer&) = delete;
58 
60  NavigationLayer& operator=(const NavigationLayer&) = delete;
61 
64  const Surface& surfaceRepresentation() const final;
65 
66  // Non-const version
68 
77  bool isOnLayer(const GeometryContext& gctx, const Vector3D& gp,
78  const BoundaryCheck& bcheck = true) const final;
79 
89  bool resolve(bool resolveSensitive, bool resolveMaterial,
90  bool resolvePassive) const final;
91 
92  protected:
100  double thickness);
101 
108 };
109 
110 inline const Surface& NavigationLayer::surfaceRepresentation() const {
111  return (*m_surfaceRepresentation);
112 }
113 
115  return *(const_cast<Surface*>(m_surfaceRepresentation.get()));
116 }
117 
119  BinningValue bValue) const {
120  return m_surfaceRepresentation->binningPosition(gctx, bValue);
121 }
122 
124  const Vector3D& gp,
125  const BoundaryCheck& bcheck) const {
126  return m_surfaceRepresentation->isOnSurface(gctx, gp, s_origin, bcheck);
127 }
128 
129 inline bool NavigationLayer::resolve(bool /*resolveSensitive*/,
130  bool /*resolveMaterial*/,
131  bool /*reolvePassive*/) const {
132  return false;
133 }
134 
135 } // namespace Acts