File indexing completed on 2025-12-17 09:20:55
0001
0002
0003
0004
0005
0006
0007
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& ) 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 }