EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TGeoDetectorElement.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TGeoDetectorElement.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017-2019 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
13 
14 #include <iostream>
15 
16 #include "TGeoManager.h"
17 
18 namespace Acts {
19 
20 class ISurfaceMaterial;
21 class SurfaceBounds;
22 class DigitizationModule;
23 
34  public:
37 
67  const Identifier& identifier, const TGeoNode& tGeoNode,
68  const TGeoMatrix& tGeoMatrix = TGeoIdentity(),
69  const std::string& axes = "XYZ", double scalor = 10.,
70  std::shared_ptr<const Acts::ISurfaceMaterial> material = nullptr);
71 
72  ~TGeoDetectorElement() override;
73 
74  Identifier identifier() const final;
75 
79  const Transform3D& transform(const GeometryContext& gctx) const final;
80 
82  const Surface& surface() const final;
83 
86  const final {
87  return nullptr;
88  };
89 
91  double thickness() const final;
92 
93  private:
95  const TGeoNode* m_detElement{nullptr};
97  Transform3D m_transform = Transform3D::Identity();
101  std::shared_ptr<const SurfaceBounds> m_bounds{nullptr};
103  double m_thickness{0.};
105  std::shared_ptr<Surface> m_surface{nullptr};
106 };
107 
109  return m_identifier;
110 }
111 
113  const GeometryContext& /*gctx*/) const {
114  return m_transform;
115 }
116 
117 inline const Surface& TGeoDetectorElement::surface() const {
118  return (*m_surface);
119 }
120 
121 inline double TGeoDetectorElement::thickness() const {
122  return m_thickness;
123 }
124 
125 } // namespace Acts