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) 2019 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/GenericDetector.hpp"
0010 
0011 #include "Acts/Geometry/ILayerBuilder.hpp"
0012 #include "Acts/Geometry/TrackingGeometry.hpp"
0013 #include "ActsExamples/GenericDetector/BuildGenericDetector.hpp"
0014 #include "ActsExamples/GenericDetector/GenericDetectorElement.hpp"
0015 #include "ActsExamples/GenericDetector/ProtoLayerCreatorT.hpp"
0016 
0017 auto GenericDetector::finalize(
0018     const Config& cfg,
0019     std::shared_ptr<const Acts::IMaterialDecorator> mdecorator)
0020     -> std::pair<TrackingGeometryPtr, ContextDecorators> {
0021   DetectorElement::ContextType nominalContext;
0022   /// Return the generic detector
0023   TrackingGeometryPtr gGeometry =
0024       ActsExamples::Generic::buildDetector<DetectorElement>(
0025           nominalContext, detectorStore, cfg.buildLevel, std::move(mdecorator),
0026           cfg.buildProto, cfg.surfaceLogLevel, cfg.layerLogLevel,
0027           cfg.volumeLogLevel);
0028   ContextDecorators gContextDecorators = {};
0029   // return the pair of geometry and empty decorators
0030   return std::make_pair<TrackingGeometryPtr, ContextDecorators>(
0031       std::move(gGeometry), std::move(gContextDecorators));
0032 }