Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:09:52

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2016-2018 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/GenericDetector/GenericDetectorElement.hpp"
0010 
0011 #include "Acts/Surfaces/DiscSurface.hpp"
0012 #include "Acts/Surfaces/PlaneSurface.hpp"
0013 
0014 #include <utility>
0015 
0016 ActsExamples::Generic::GenericDetectorElement::GenericDetectorElement(
0017     const Identifier identifier,
0018     std::shared_ptr<const Acts::Transform3> transform,
0019     std::shared_ptr<const Acts::PlanarBounds> pBounds, double thickness,
0020     std::shared_ptr<const Acts::ISurfaceMaterial> material,
0021     std::shared_ptr<const Acts::DigitizationModule> digitizationModule)
0022     : Acts::IdentifiedDetectorElement(),
0023       m_elementIdentifier(identifier),
0024       m_elementTransform(std::move(transform)),
0025       m_elementSurface(
0026           Acts::Surface::makeShared<Acts::PlaneSurface>(pBounds, *this)),
0027       m_elementThickness(thickness),
0028       m_elementPlanarBounds(std::move(pBounds)),
0029       m_elementDiscBounds(nullptr),
0030       m_digitizationModule(std::move(digitizationModule)) {
0031   m_elementSurface->assignSurfaceMaterial(std::move(material));
0032 }
0033 
0034 ActsExamples::Generic::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     std::shared_ptr<const Acts::DigitizationModule> digitizationModule)
0040     : Acts::IdentifiedDetectorElement(),
0041       m_elementIdentifier(identifier),
0042       m_elementTransform(std::move(transform)),
0043       m_elementSurface(
0044           Acts::Surface::makeShared<Acts::DiscSurface>(dBounds, *this)),
0045       m_elementThickness(thickness),
0046       m_elementPlanarBounds(nullptr),
0047       m_elementDiscBounds(std::move(dBounds)),
0048       m_digitizationModule(std::move(digitizationModule)) {
0049   m_elementSurface->assignSurfaceMaterial(std::move(material));
0050 }