Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GenericDetectorElement.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GenericDetectorElement.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 
17 
18 #include <memory>
19 
20 namespace Acts {
21 class Surface;
22 class PlanarBounds;
23 class DiscBounds;
24 class ISurfaceMaterial;
25 class DigitizationModule;
26 } // namespace Acts
27 
28 namespace ActsExamples {
29 
30 namespace Generic {
31 
38  public:
41 
51  const Identifier identifier,
52  std::shared_ptr<const Acts::Transform3> transform,
53  std::shared_ptr<const Acts::PlanarBounds> pBounds, double thickness,
54  std::shared_ptr<const Acts::ISurfaceMaterial> material = nullptr,
55  std::shared_ptr<const Acts::DigitizationModule> digitizationModule =
56  nullptr);
57 
67  const Identifier identifier,
68  std::shared_ptr<const Acts::Transform3> transform,
69  std::shared_ptr<const Acts::DiscBounds> dBounds, double thickness,
70  std::shared_ptr<const Acts::ISurfaceMaterial> material = nullptr,
71  std::shared_ptr<const Acts::DigitizationModule> digitizationModule =
72  nullptr);
73 
75  Identifier identifier() const final;
76 
83  const Acts::Transform3& transform(
84  const Acts::GeometryContext& gctx) const override;
85 
87  const Acts::Surface& surface() const override;
88 
90  Acts::Surface& surface() override;
91 
94 
96  double thickness() const override;
97 
99  const std::shared_ptr<const Acts::DigitizationModule> digitizationModule()
100  const override;
101 
102  private:
113  std::shared_ptr<const Acts::PlanarBounds> m_elementPlanarBounds = nullptr;
114  std::shared_ptr<const Acts::DiscBounds> m_elementDiscBounds = nullptr;
116  std::shared_ptr<const Acts::DigitizationModule> m_digitizationModule =
117  nullptr;
118 };
119 
120 inline void ActsExamples::Generic::GenericDetectorElement::assignIdentifier(
121  const Identifier& identifier) {
122  m_elementIdentifier = identifier;
123 }
124 
126  const {
127  return m_elementIdentifier;
128 }
129 
130 inline const Acts::Transform3&
132  const Acts::GeometryContext& /*gctx*/) const {
133  return *m_elementTransform;
134 }
135 
136 inline const Acts::Surface&
138  return *m_elementSurface;
139 }
140 
142  return *m_elementSurface;
143 }
144 
146  return m_elementThickness;
147 }
148 
149 inline const std::shared_ptr<const Acts::DigitizationModule>
151  return m_digitizationModule;
152 }
153 
154 } // end of namespace Generic
155 
156 } // end of namespace ActsExamples