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