Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:10:42

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2020-2021 CERN for the benefit of the Acts project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
0008 
0009 #include "ActsExamples/TelescopeDetector/TelescopeDetectorElement.hpp"
0010 
0011 #include "Acts/Surfaces/DiscSurface.hpp"
0012 #include "Acts/Surfaces/PlaneSurface.hpp"
0013 
0014 ActsExamples::Telescope::TelescopeDetectorElement::TelescopeDetectorElement(
0015     std::shared_ptr<const Acts::Transform3> transform,
0016     std::shared_ptr<const Acts::PlanarBounds> pBounds, double thickness,
0017     std::shared_ptr<const Acts::ISurfaceMaterial> material)
0018     : Acts::DetectorElementBase(),
0019       m_elementTransform(std::move(transform)),
0020       m_elementSurface(
0021           Acts::Surface::makeShared<Acts::PlaneSurface>(pBounds, *this)),
0022       m_elementThickness(thickness),
0023       m_elementPlanarBounds(std::move(pBounds)),
0024       m_elementDiscBounds(nullptr) {
0025   auto mutableSurface =
0026       std::const_pointer_cast<Acts::Surface>(m_elementSurface);
0027   mutableSurface->assignSurfaceMaterial(std::move(material));
0028 }
0029 
0030 ActsExamples::Telescope::TelescopeDetectorElement::TelescopeDetectorElement(
0031     std::shared_ptr<const Acts::Transform3> transform,
0032     std::shared_ptr<const Acts::DiscBounds> dBounds, double thickness,
0033     std::shared_ptr<const Acts::ISurfaceMaterial> material)
0034     : Acts::DetectorElementBase(),
0035       m_elementTransform(std::move(transform)),
0036       m_elementSurface(
0037           Acts::Surface::makeShared<Acts::DiscSurface>(dBounds, *this)),
0038       m_elementThickness(thickness),
0039       m_elementPlanarBounds(nullptr),
0040       m_elementDiscBounds(std::move(dBounds)) {
0041   m_elementSurface->assignSurfaceMaterial(std::move(material));
0042 }