Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-10-13 08:18:31

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 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 https://mozilla.org/MPL/2.0/.
0008 
0009 #include "ActsTests/CommonHelpers/DetectorElementStub.hpp"
0010 
0011 #include "Acts/Geometry/DetectorElementBase.hpp"
0012 #include "Acts/Surfaces/CylinderBounds.hpp"
0013 #include "Acts/Surfaces/CylinderSurface.hpp"
0014 #include "Acts/Surfaces/PlanarBounds.hpp"
0015 #include "Acts/Surfaces/PlaneSurface.hpp"
0016 #include "ActsTests/CommonHelpers/LineSurfaceStub.hpp"
0017 
0018 using namespace Acts;
0019 
0020 ActsTests::DetectorElementStub::DetectorElementStub(const Transform3& transform)
0021     : DetectorElementBase(), m_elementTransform(transform) {}
0022 
0023 ActsTests::DetectorElementStub::DetectorElementStub(
0024     const Transform3& transform, std::shared_ptr<const CylinderBounds> cBounds,
0025     double thickness, std::shared_ptr<const ISurfaceMaterial> material)
0026     : DetectorElementBase(),
0027       m_elementTransform(transform),
0028       m_elementThickness(thickness) {
0029   m_elementSurface =
0030       Surface::makeShared<CylinderSurface>(std::move(cBounds), *this);
0031   m_elementSurface->assignSurfaceMaterial(std::move(material));
0032 }
0033 
0034 ActsTests::DetectorElementStub::DetectorElementStub(
0035     const Transform3& transform, std::shared_ptr<const PlanarBounds> pBounds,
0036     double thickness, std::shared_ptr<const ISurfaceMaterial> material)
0037     : DetectorElementBase(),
0038       m_elementTransform(transform),
0039       m_elementThickness(thickness) {
0040   m_elementSurface =
0041       Surface::makeShared<PlaneSurface>(std::move(pBounds), *this);
0042   m_elementSurface->assignSurfaceMaterial(std::move(material));
0043 }
0044 
0045 ActsTests::DetectorElementStub::DetectorElementStub(
0046     const Transform3& transform, std::shared_ptr<const LineBounds> lBounds,
0047     double thickness, std::shared_ptr<const ISurfaceMaterial> material)
0048     : DetectorElementBase(),
0049       m_elementTransform(transform),
0050       m_elementThickness(thickness) {
0051   m_elementSurface =
0052       Surface::makeShared<LineSurfaceStub>(std::move(lBounds), *this);
0053   m_elementSurface->assignSurfaceMaterial(std::move(material));
0054 }