Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-17 09:20:55

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/DetectorCommons/Detector.hpp"
0010 
0011 #include "Acts/Geometry/GeometryContext.hpp"
0012 #include "Acts/Geometry/TrackingGeometry.hpp"
0013 #include "Acts/Utilities/Logger.hpp"
0014 #include "ActsExamples/Framework/IContextDecorator.hpp"
0015 
0016 namespace ActsExamples {
0017 
0018 Detector::Detector(std::unique_ptr<const Acts::Logger> logger)
0019     : m_logger(std::move(logger)) {}
0020 
0021 Detector::~Detector() = default;
0022 
0023 std::vector<std::shared_ptr<IContextDecorator>> Detector::contextDecorators()
0024     const {
0025   return m_contextDecorators;
0026 }
0027 
0028 std::unique_ptr<G4VUserDetectorConstruction>
0029 Detector::buildGeant4DetectorConstruction(
0030     const Geant4ConstructionOptions& /*options*/) const {
0031   throw std::runtime_error("Geant4 detector construction is not available.");
0032 }
0033 
0034 const Acts::GeometryContext& Detector::nominalGeometryContext() const {
0035   return m_nominalGeometryContext;
0036 }
0037 
0038 std::shared_ptr<const Acts::TrackingGeometry> Detector::trackingGeometry()
0039     const {
0040   if (m_trackingGeometry == nullptr) {
0041     throw std::runtime_error("Tracking geometry is not built");
0042   }
0043   return m_trackingGeometry;
0044 }
0045 
0046 const Acts::Logger& Detector::logger() const {
0047   return *m_logger;
0048 }
0049 
0050 }  // namespace ActsExamples