Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-11 07:50:29

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/GeoModelDetector/GeoModelDetector.hpp"
0010 
0011 #include "Acts/Geometry/CuboidVolumeBounds.hpp"
0012 #include "Acts/Geometry/TrackingGeometry.hpp"
0013 #include "Acts/Plugins/GeoModel/GeoModelReader.hpp"
0014 #include "Acts/Plugins/GeoModel/GeoModelTree.hpp"
0015 
0016 namespace ActsExamples {
0017 
0018 GeoModelDetector::GeoModelDetector(const Config& cfg)
0019     : Detector(Acts::getDefaultLogger("GeoModelDetector", cfg.logLevel)),
0020       m_cfg(cfg) {
0021   if (!m_cfg.geoModelTree.worldVolume) {
0022     m_cfg.geoModelTree = Acts::GeoModelReader::readFromDb(m_cfg.path);
0023   }
0024   if (!m_cfg.geoModelTree.worldVolume) {
0025     throw std::runtime_error(
0026         "GeoModelDetector() - Failed to load geometry from '" + m_cfg.path +
0027         "'");
0028   }
0029 }
0030 
0031 }  // namespace ActsExamples