Analysis Software
Documentation for sPHENIX simulation 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"
17 
18 #include <algorithm>
19 #include <memory>
20 #include <utility>
21 
22 namespace Acts {
23 
29 
30 class NavigationLayer : public Layer {
31  public:
37  static LayerPtr create(std::shared_ptr<const Surface> sRepresentation,
38  double thickness = 0.) {
39  return LayerPtr(new NavigationLayer(std::move(sRepresentation), thickness));
40  }
41 
43  ~NavigationLayer() override;
44 
53  BinningValue bValue) const final;
54 
56  NavigationLayer() = delete;
57 
59  NavigationLayer(const NavigationLayer&) = delete;
60 
62  NavigationLayer& operator=(const NavigationLayer&) = delete;
63 
66  const Surface& surfaceRepresentation() const final;
67 
68  // Non-const version
70 
79  bool isOnLayer(const GeometryContext& gctx, const Vector3& gp,
80  const BoundaryCheck& bcheck = true) const final;
81 
91  bool resolve(bool resolveSensitive, bool resolveMaterial,
92  bool resolvePassive) const final;
93 
94  protected:
102  double thickness);
103 
110 };
111 
112 inline const Surface& NavigationLayer::surfaceRepresentation() const {
113  return (*m_surfaceRepresentation);
114 }
115 
117  return *(const_cast<Surface*>(m_surfaceRepresentation.get()));
118 }
119 
121  BinningValue bValue) const {
122  return m_surfaceRepresentation->binningPosition(gctx, bValue);
123 }
124 
126  const Vector3& gp,
127  const BoundaryCheck& bcheck) const {
128  return m_surfaceRepresentation->isOnSurface(gctx, gp, Vector3::Zero(),
129  bcheck);
130 }
131 
132 inline bool NavigationLayer::resolve(bool /*resolveSensitive*/,
133  bool /*resolveMaterial*/,
134  bool /*reolvePassive*/) const {
135  return false;
136 }
137 
138 } // namespace Acts