|
|
|||
File indexing completed on 2026-06-16 07:46:24
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/CuboidVolumeBounds.hpp" 0013 #include "Acts/Geometry/DiamondVolumeBounds.hpp" 0014 #include "Acts/Geometry/TrapezoidVolumeBounds.hpp" 0015 #include "Acts/Utilities/ProtoAxis.hpp" 0016 0017 namespace Acts { 0018 class HomogeneousSurfaceMaterial; 0019 0020 namespace Experimental { 0021 0022 namespace detail { 0023 class MaterialDesignatorBlueprintNodeImpl; 0024 } 0025 0026 /// This node type registers material proxies into its child volume during the 0027 /// blueprint construction. It is configured ahead of time which volume faces 0028 /// to mark up, and how do to so. 0029 /// @note This node can only have a single child. This is not an error during 0030 /// tree building, but during geometry construction. 0031 class MaterialDesignatorBlueprintNode final : public BlueprintNode { 0032 public: 0033 /// Main constructor for the material designator node. 0034 /// @param name The name of the node (for debug only) 0035 explicit MaterialDesignatorBlueprintNode(const std::string& name); 0036 0037 ~MaterialDesignatorBlueprintNode() override; 0038 0039 /// @copydoc BlueprintNode::name 0040 const std::string& name() const override; 0041 0042 /// @copydoc BlueprintNode::toStream 0043 void toStream(std::ostream& os) const override; 0044 0045 /// This method participates in the geometry construction. 0046 /// It checks that this node only has a single child, is correctly 0047 /// configured, and forwards the call. 0048 /// @param options The global blueprint options 0049 /// @param gctx The geometry context (nominal usually) 0050 /// @param logger The logger to use 0051 /// @return The child volume 0052 Volume& build(const BlueprintOptions& options, const GeometryContext& gctx, 0053 const Logger& logger = Acts::getDummyLogger()) override; 0054 0055 /// This method participates in the geometry construction. 0056 /// It receives the populated portal shell from its only child and attaches 0057 /// material proxies by consulting the configuration stored in the node. 0058 /// @note Currently, this node will unconditionally attach 0059 /// @ref Acts::ProtoGridSurfaceMaterial 0060 /// 0061 /// @param options The global blueprint options 0062 /// @param gctx The geometry context (nominal usually) 0063 /// @param logger The logger to use 0064 /// @return The portal shell with material proxies attached 0065 PortalShellBase& connect( 0066 const BlueprintOptions& options, const GeometryContext& gctx, 0067 const Logger& logger = Acts::getDummyLogger()) override; 0068 0069 /// This method participates in the geometry construction. 0070 /// Passes through the call to its only child. 0071 /// @param options The global blueprint options 0072 /// @param gctx The geometry context (nominal usually) 0073 /// @param parent The parent volume 0074 /// @param logger The logger to use during construction 0075 void finalize(const BlueprintOptions& options, const GeometryContext& gctx, 0076 TrackingVolume& parent, const Logger& logger) override; 0077 0078 /// Configure the designator with a cylinder face and corresponding binning 0079 /// information. 0080 /// @note This method can be called multiple times to configure different faces. 0081 /// @param face The face of the cylinder to configure 0082 /// @param loc0 The first binning configuration along local axis 0 0083 /// @param loc1 The first binning configuration along local axis 1 0084 /// @return The material designator node 0085 /// @note If this node has previously been configured with a different volume 0086 /// shape, this will throw an exception. 0087 MaterialDesignatorBlueprintNode& configureFace( 0088 CylinderVolumeBounds::Face face, const DirectedProtoAxis& loc0, 0089 const DirectedProtoAxis& loc1); 0090 0091 /// Configure the designator with a cylinder face and a homogeneous surface 0092 /// material. 0093 /// @param face The face of the cylinder to configure 0094 /// @param material The material to use 0095 /// @return The material designator node 0096 /// @note If this node has previously been configured with a different volume 0097 /// shape, this will throw an exception. 0098 MaterialDesignatorBlueprintNode& configureFace( 0099 CylinderVolumeBounds::Face face, 0100 std::shared_ptr<const Acts::ISurfaceMaterial> material); 0101 0102 /// Configure the designator with a cuboid face and corresponding binning 0103 /// information. 0104 /// @note This method can be called multiple times to configure different faces. 0105 /// @param face The face of the cuboid to configure 0106 /// @param loc0 The first binning configuration along local axis 0 0107 /// @param loc1 The second binning configuration along local axis 1 0108 /// @return The material designator node 0109 /// @note If this node has previously been configured with a different volume 0110 /// shape, this will throw an exception. 0111 MaterialDesignatorBlueprintNode& configureFace(CuboidVolumeBounds::Face face, 0112 const DirectedProtoAxis& loc0, 0113 const DirectedProtoAxis& loc1); 0114 0115 /// Configure the designator with a cuboid face and a homogeneous surface 0116 /// material. 0117 /// @param face The face of the cuboid to configure 0118 /// @param material The material to use 0119 /// @return The material designator node 0120 /// @note If this node has previously been configured with a different volume 0121 /// shape, this will throw an exception. 0122 MaterialDesignatorBlueprintNode& configureFace( 0123 CuboidVolumeBounds::Face face, 0124 std::shared_ptr<const Acts::ISurfaceMaterial> material); 0125 0126 /// Configure the designator with a trapezoidal face and a homogeneous surface 0127 /// material. 0128 /// @param face The face of the trapezoid to configure 0129 /// @param material The material to use 0130 /// @return The material designator node 0131 /// @note If this node has previously been configured with a different volume shape, this will throw an exception. 0132 MaterialDesignatorBlueprintNode& configureFace( 0133 TrapezoidVolumeBounds::Face face, 0134 std::shared_ptr<const Acts::ISurfaceMaterial> material); 0135 0136 /// Configure the designator with a diamond face and a homogeneous surface 0137 /// material. 0138 /// @param face The face of the diamond to configure 0139 /// @param material The material to use 0140 /// @return The material designator node 0141 /// @note If this node has previously been configured with a different volume shape, this will throw an exception. 0142 MaterialDesignatorBlueprintNode& configureFace( 0143 DiamondVolumeBounds::Face face, 0144 std::shared_ptr<const Acts::ISurfaceMaterial> material); 0145 0146 private: 0147 /// @copydoc BlueprintNode::addToGraphviz 0148 void addToGraphviz(std::ostream& os) const override; 0149 0150 detail::MaterialDesignatorBlueprintNodeImpl& impl(); 0151 const detail::MaterialDesignatorBlueprintNodeImpl& impl() const; 0152 0153 std::unique_ptr<detail::MaterialDesignatorBlueprintNodeImpl> m_impl; 0154 }; 0155 0156 } // namespace Experimental 0157 } // 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 |
|