Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-12 07:52:17

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