Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-07-16 08:08:37

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/Surfaces/CylinderBounds.hpp"
0012 #include "Acts/Surfaces/CylinderSurface.hpp"
0013 #include "Acts/Surfaces/PlanarBounds.hpp"
0014 #include "Acts/Surfaces/PlaneSurface.hpp"
0015 #include "Acts/Surfaces/SurfacePlacementBase.hpp"
0016 #include "ActsTests/CommonHelpers/LineSurfaceStub.hpp"
0017 
0018 using namespace Acts;
0019 
0020 ActsTests::DetectorElementStub::DetectorElementStub(const Transform3& transform)
0021     : 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     : m_elementTransform(transform), m_elementThickness(thickness) {
0027   m_elementSurface =
0028       Surface::makeShared<CylinderSurface>(std::move(cBounds), *this);
0029   m_elementSurface->assignThickness(thickness);
0030   m_elementSurface->assignSurfaceMaterial(std::move(material));
0031   assert(m_elementSurface->surfacePlacement() == this);
0032   assert(m_elementSurface->isSensitive() == isSensitive());
0033 }
0034 
0035 ActsTests::DetectorElementStub::DetectorElementStub(
0036     const Transform3& transform, std::shared_ptr<const PlanarBounds> pBounds,
0037     double thickness, std::shared_ptr<const ISurfaceMaterial> material)
0038     : m_elementTransform(transform), m_elementThickness(thickness) {
0039   m_elementSurface =
0040       Surface::makeShared<PlaneSurface>(std::move(pBounds), *this);
0041   m_elementSurface->assignThickness(thickness);
0042   m_elementSurface->assignSurfaceMaterial(std::move(material));
0043   assert(m_elementSurface->surfacePlacement() == this);
0044   assert(m_elementSurface->isSensitive() == isSensitive());
0045 }
0046 
0047 ActsTests::DetectorElementStub::DetectorElementStub(
0048     const Transform3& transform, std::shared_ptr<const LineBounds> lBounds,
0049     double thickness, std::shared_ptr<const ISurfaceMaterial> material)
0050     : m_elementTransform(transform), m_elementThickness(thickness) {
0051   m_elementSurface =
0052       Surface::makeShared<LineSurfaceStub>(std::move(lBounds), *this);
0053   m_elementSurface->assignThickness(thickness);
0054   m_elementSurface->assignSurfaceMaterial(std::move(material));
0055   assert(m_elementSurface->surfacePlacement() == this);
0056   assert(m_elementSurface->isSensitive() == isSensitive());
0057 }