Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Acts/Geometry/StaticBlueprintNode.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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/GeometryContext.hpp"
0013 #include "Acts/Geometry/PortalShell.hpp"
0014 #include "Acts/Geometry/TrackingVolume.hpp"
0015 
0016 namespace Acts::Experimental {
0017 
0018 /// The static blueprint node wraps a single already-constructred @c TrackingVolume.
0019 /// The node will present this volume to its hierarchy. The volume is given as
0020 /// mutable, and will be potentially enlarged in order to connect to neighboring
0021 /// volumes.
0022 /// - In case the volume already has child volumes, they will be retained.
0023 /// - In case the volume already has a registered navigation policy, it will be
0024 ///   overwritten with the one configured on this node, regardless of content.
0025 class StaticBlueprintNode : public BlueprintNode {
0026  public:
0027   /// Construct the static node from an existing volume
0028   /// @param volume The volume to wrap
0029   explicit StaticBlueprintNode(std::unique_ptr<TrackingVolume> volume);
0030 
0031   /// Get the name of this node. It is automatically taken from the wrapped
0032   /// volume
0033   /// @return The name of the volume
0034   const std::string& name() const override;
0035 
0036   /// @copydoc BlueprintNode::build
0037   /// Build-phase of the blueprint construction. Returns the wrapped volume for
0038   /// sizing.
0039   Volume& build(const BlueprintOptions& options, const GeometryContext& gctx,
0040                 const Logger& logger = Acts::getDummyLogger()) override;
0041 
0042   /// @copydoc BlueprintNode::connect
0043   PortalShellBase& connect(
0044       const BlueprintOptions& options, const GeometryContext& gctx,
0045       const Logger& logger = Acts::getDummyLogger()) override;
0046 
0047   /// @copydoc BlueprintNode::finalize
0048   void finalize(const BlueprintOptions& options, const GeometryContext& gctx,
0049                 TrackingVolume& parent,
0050                 const Logger& logger = Acts::getDummyLogger()) override;
0051 
0052   /// Set the navigation policy factory for this node
0053   /// @param navigationPolicyFactory Shared pointer to navigation policy factory
0054   /// @return Reference to this node for chaining
0055   virtual StaticBlueprintNode& setNavigationPolicyFactory(
0056       std::shared_ptr<NavigationPolicyFactory> navigationPolicyFactory);
0057 
0058   /// Get the navigation policy factory for this node
0059   /// @return Pointer to the navigation policy factory (may be nullptr)
0060   const NavigationPolicyFactory* navigationPolicyFactory() const;
0061 
0062  protected:
0063   void addToGraphviz(std::ostream& os) const override;
0064 
0065   /// The wrapped tracking volume managed by this blueprint node
0066   std::unique_ptr<TrackingVolume> m_volume;
0067 
0068   /// Portal shell representation for geometry connection
0069   std::unique_ptr<PortalShellBase> m_shell;
0070 
0071   /// Factory for creating navigation policies for this volume
0072   std::shared_ptr<NavigationPolicyFactory> m_navigationPolicyFactory;
0073 };
0074 
0075 }  // namespace Acts::Experimental