Back to home page

sPhenix code displayed by LXR

 
 

    


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

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 "ActsExamples/GenericDetector/AlignedGenericDetector.hpp"
0010 
0011 ActsExamples::AlignedGenericDetector::AlignedGenericDetector(const Config& cfg)
0012     : GenericDetector(cfg, GenericDetector::NoBuildTag{}) {
0013   m_nominalGeometryContext =
0014       Acts::GeometryContext::dangerouslyDefaultConstruct();
0015 
0016   // Set the detector element factory
0017   auto alignedDetectorElementFactory =
0018       [&](const Acts::Transform3& transform,
0019           std::shared_ptr<const Acts::PlanarBounds> bounds, double thickness,
0020           std::shared_ptr<const Acts::ISurfaceMaterial> material) {
0021         auto id = static_cast<GenericDetectorElement::Identifier>(
0022             m_detectorStore.size());
0023         auto detElem = std::make_shared<AlignedGenericDetectorElement>(
0024             id, transform, std::move(bounds), thickness, std::move(material));
0025         m_detectorStore.push_back(detElem);
0026         return detElem;
0027       };
0028   buildTrackingGeometry(alignedDetectorElementFactory);
0029 }