EIC 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 
16 
17 namespace Acts {
18 class Surface;
19 class PlanarBounds;
20 class DiscBounds;
21 class ISurfaceMaterial;
22 class DigitizationModule;
23 } // namespace Acts
24 
25 namespace ActsExamples {
26 
27 namespace Generic {
28 
35  public:
38 
48  const Identifier identifier,
49  std::shared_ptr<const Acts::Transform3D> transform,
50  std::shared_ptr<const Acts::PlanarBounds> pBounds, double thickness,
51  std::shared_ptr<const Acts::ISurfaceMaterial> material = nullptr,
52  std::shared_ptr<const Acts::DigitizationModule> digitzationModule =
53  nullptr);
54 
64  const Identifier identifier,
65  std::shared_ptr<const Acts::Transform3D> transform,
66  std::shared_ptr<const Acts::DiscBounds> dBounds, double thickness,
67  std::shared_ptr<const Acts::ISurfaceMaterial> material = nullptr,
68  std::shared_ptr<const Acts::DigitizationModule> digitzationModule =
69  nullptr);
70 
72  Identifier identifier() const override final;
73 
80  const Acts::Transform3D& transform(
81  const Acts::GeometryContext& gctx) const override;
82 
84  const Acts::Surface& surface() const final override;
85 
88 
90  double thickness() const final override;
91 
93  const std::shared_ptr<const Acts::DigitizationModule> digitizationModule()
94  const final override;
95 
96  private:
107  std::shared_ptr<const Acts::PlanarBounds> m_elementPlanarBounds = nullptr;
108  std::shared_ptr<const Acts::DiscBounds> m_elementDiscBounds = nullptr;
110  std::shared_ptr<const Acts::DigitizationModule> m_digitizationModule =
111  nullptr;
112 };
113 
114 inline void ActsExamples::Generic::GenericDetectorElement::assignIdentifier(
115  const Identifier& identifier) {
116  m_elementIdentifier = identifier;
117 }
118 
120  const {
121  return m_elementIdentifier;
122 }
123 
124 inline const Acts::Transform3D&
126  const Acts::GeometryContext& /*gctx*/) const {
127  return *m_elementTransform;
128 }
129 
130 inline const Acts::Surface&
132  return *m_elementSurface;
133 }
134 
136  return m_elementThickness;
137 }
138 
139 inline const std::shared_ptr<const Acts::DigitizationModule>
141  return m_digitizationModule;
142 }
143 
144 } // end of namespace Generic
145 
146 } // end of namespace ActsExamples