![]() |
|
|||
File indexing completed on 2025-07-05 08:11:01
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 #pragma once 0010 0011 #include "Acts/Geometry/BlueprintNode.hpp" 0012 #include "Acts/Geometry/PortalShell.hpp" 0013 #include "Acts/Geometry/TrackingGeometry.hpp" 0014 #include "Acts/Geometry/TrackingVolume.hpp" 0015 0016 namespace Acts { 0017 0018 class GeometryContext; 0019 0020 namespace Experimental { 0021 0022 /// This class is the top-level entry point to build a tracking geometry using 0023 /// the blueprint building mechanism. It forms the root of a tree of nodes where 0024 /// each node performs a portion of the construction. This top-level class has 0025 /// the main construction methods that execute the construction of the geometry. 0026 /// 0027 /// ``` 0028 /// +---------------+ +-----------+ 0029 /// | | | | 0030 /// | Root | | v 0031 /// | | | +---------------+ 0032 /// +---------------+ | | | 0033 /// | | | Child 1 | 0034 /// +----------+ | | | 0035 /// v +----------+ +---------------+ 0036 /// +---------------+ | 0037 /// | | +--------------+ 0038 /// | Child 2 | v +----------+ 0039 /// | | .---------. | | 0040 /// +---------------+ / \ | v 0041 /// ( Proc node ) | +---------------+ 0042 /// `. ,' | | | 0043 /// `-------' | | Child 3 | 0044 /// | | | | 0045 /// | | +---------------+ 0046 /// +---------+ 0047 /// ``` 0048 /// 0049 /// The construction phases are documented in @c BlueprintNode, which is the 0050 /// base class for all nodes in the tree. 0051 /// @note This class inherits from @c BlueprintNode, but hides the main 0052 /// blueprint construction phase overloads. The @c Blueprint class is 0053 /// only ever intended to be the top-level node, and not anywhere else 0054 /// in the tree. 0055 class Blueprint : public BlueprintNode { 0056 public: 0057 struct Config { 0058 /// Determine how much envelope space to produce from the highest volume 0059 /// in the geometry hierarchy and the world volume. 0060 ExtentEnvelope envelope = ExtentEnvelope::Zero(); 0061 }; 0062 0063 /// Constructor from a config object 0064 /// @param config The configuration object 0065 explicit Blueprint(const Config& config); 0066 0067 /// Construct the tracking geometry from the blueprint tree 0068 /// @param options The construction options, see @c BlueprintOptions 0069 /// @param gctx The geometry context for construction. In almost all cases, 0070 /// this should be the *nominal* geometry context 0071 /// @param logger The logger to use for output during construction 0072 std::unique_ptr<TrackingGeometry> construct( 0073 const BlueprintOptions& options, const GeometryContext& gctx, 0074 const Logger& logger = Acts::getDummyLogger()); 0075 0076 protected: 0077 /// The name of the blueprint node, always "Root" 0078 /// @return The name 0079 const std::string& name() const override; 0080 0081 /// @copydoc BlueprintNode::build 0082 Volume& build(const BlueprintOptions& options, const GeometryContext& gctx, 0083 const Logger& logger = Acts::getDummyLogger()) override; 0084 0085 /// @copydoc BlueprintNode::connect 0086 PortalShellBase& connect( 0087 const BlueprintOptions& options, const GeometryContext& gctx, 0088 const Logger& logger = Acts::getDummyLogger()) override; 0089 0090 /// @copydoc BlueprintNode::finalize 0091 void finalize(const BlueprintOptions& options, const GeometryContext& gctx, 0092 TrackingVolume& parent, 0093 const Logger& logger = Acts::getDummyLogger()) override; 0094 0095 /// @copydoc BlueprintNode::addToGraphviz 0096 void addToGraphviz(std::ostream& os) const override; 0097 0098 private: 0099 Config m_cfg; 0100 }; 0101 0102 } // namespace Experimental 0103 } // namespace Acts
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |