Warning, file /acts/Examples/Detectors/DD4hepDetector/src/OpenDataDetector.cpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "ActsExamples/DD4hepDetector/OpenDataDetector.hpp"
0010
0011 #include "Acts/Geometry/CylinderVolumeBounds.hpp"
0012 #include <Acts/Geometry/Blueprint.hpp>
0013 #include <Acts/Geometry/BlueprintOptions.hpp>
0014
0015 namespace ActsExamples {
0016
0017 OpenDataDetector::OpenDataDetector(const Config& cfg,
0018 const Acts::GeometryContext& gctx)
0019 : DD4hepDetectorBase{cfg}, m_cfg{cfg} {
0020 ACTS_INFO("OpenDataDetector construct");
0021 construct(gctx);
0022 }
0023
0024 auto OpenDataDetector::config() const -> const Config& {
0025 return m_cfg;
0026 }
0027
0028 void OpenDataDetector::construct(const Acts::GeometryContext& gctx) {
0029 using namespace Acts::Experimental;
0030 using namespace Acts;
0031 using namespace Acts::UnitLiterals;
0032
0033 Blueprint::Config cfg;
0034 cfg.envelope[AxisDirection::AxisZ] = {20_mm, 20_mm};
0035 cfg.envelope[AxisDirection::AxisR] = {0_mm, 20_mm};
0036 Blueprint root{cfg};
0037
0038 auto volBounds = std::make_shared<CylinderVolumeBounds>(0_mm, 100_mm, 1_m);
0039 auto vol =
0040 std::make_unique<TrackingVolume>(Transform3::Identity(), volBounds);
0041
0042 root.addStaticVolume(std::move(vol));
0043
0044 BlueprintOptions options;
0045
0046 m_trackingGeometry = root.construct(options, gctx, logger());
0047 }
0048
0049 }