File indexing completed on 2025-01-18 09:11:45
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "ActsExamples/GenericDetector/GenericDetectorElement.hpp"
0010
0011 #include "Acts/Surfaces/DiscSurface.hpp"
0012 #include "Acts/Surfaces/PlaneSurface.hpp"
0013
0014 #include <utility>
0015
0016 namespace ActsExamples {
0017
0018 GenericDetectorElement::GenericDetectorElement(
0019 const Identifier identifier,
0020 std::shared_ptr<const Acts::Transform3> transform,
0021 std::shared_ptr<const Acts::PlanarBounds> pBounds, double thickness,
0022 std::shared_ptr<const Acts::ISurfaceMaterial> material)
0023 : Acts::DetectorElementBase(),
0024 m_elementIdentifier(identifier),
0025 m_elementTransform(std::move(transform)),
0026 m_elementSurface(
0027 Acts::Surface::makeShared<Acts::PlaneSurface>(pBounds, *this)),
0028 m_elementThickness(thickness),
0029 m_elementPlanarBounds(std::move(pBounds)),
0030 m_elementDiscBounds(nullptr) {
0031 m_elementSurface->assignSurfaceMaterial(std::move(material));
0032 }
0033
0034 GenericDetectorElement::GenericDetectorElement(
0035 const Identifier identifier,
0036 std::shared_ptr<const Acts::Transform3> transform,
0037 std::shared_ptr<const Acts::DiscBounds> dBounds, double thickness,
0038 std::shared_ptr<const Acts::ISurfaceMaterial> material)
0039 : Acts::DetectorElementBase(),
0040 m_elementIdentifier(identifier),
0041 m_elementTransform(std::move(transform)),
0042 m_elementSurface(
0043 Acts::Surface::makeShared<Acts::DiscSurface>(dBounds, *this)),
0044 m_elementThickness(thickness),
0045 m_elementPlanarBounds(nullptr),
0046 m_elementDiscBounds(std::move(dBounds)) {
0047 m_elementSurface->assignSurfaceMaterial(std::move(material));
0048 }
0049
0050 const Acts::Transform3& GenericDetectorElement::transform(
0051 const Acts::GeometryContext& ) const {
0052 return *m_elementTransform;
0053 }
0054
0055 const Acts::Surface& GenericDetectorElement::surface() const {
0056 return *m_elementSurface;
0057 }
0058
0059 Acts::Surface& GenericDetectorElement::surface() {
0060 return *m_elementSurface;
0061 }
0062
0063 double GenericDetectorElement::thickness() const {
0064 return m_elementThickness;
0065 }
0066
0067 GenericDetectorElement::Identifier GenericDetectorElement::identifier() const {
0068 return m_elementIdentifier;
0069 }
0070
0071 }