ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::Experimental::CylinderContainerBlueprintNode Class Referencefinal

#include <Acts/Geometry/ContainerBlueprintNode.hpp>

Inheritance diagram for Acts::Experimental::CylinderContainerBlueprintNode:
[legend]
Collaboration diagram for Acts::Experimental::CylinderContainerBlueprintNode:
[legend]

Public Member Functions

PortalShellBaseconnect (const Experimental::BlueprintOptions &options, const GeometryContext &gctx, const Logger &logger=Acts::getDummyLogger()) override
 This participates in the construction of the geometry via the blueprint tree.
 ContainerBlueprintNode (const std::string &name, AxisDirection axis, VolumeAttachmentStrategy attachmentStrategy, std::pair< VolumeResizeStrategy, VolumeResizeStrategy > resizeStrategies)
 Main constructor for the container node.
 ContainerBlueprintNode (const std::string &name, AxisDirection axis, VolumeAttachmentStrategy attachmentStrategy=VolumeAttachmentStrategy::Midpoint, VolumeResizeStrategy resizeStrategy=VolumeResizeStrategy::Expand)
 Main constructor for the container node.
std::unique_ptr< VolumeStackmakeStack (const GeometryContext &gctx, std::vector< Volume * > &volumes, const Logger &logger) override
 Make the volume stack for the container.
Public Member Functions inherited from Acts::Experimental::ContainerBlueprintNode
 ContainerBlueprintNode (const std::string &name, AxisDirection axis, VolumeAttachmentStrategy attachmentStrategy, std::pair< VolumeResizeStrategy, VolumeResizeStrategy > resizeStrategies)
 Main constructor for the container node.
 ContainerBlueprintNode (const std::string &name, AxisDirection axis, VolumeAttachmentStrategy attachmentStrategy=VolumeAttachmentStrategy::Midpoint, VolumeResizeStrategy resizeStrategy=VolumeResizeStrategy::Expand)
 Main constructor for the container node.
void addToGraphviz (std::ostream &os) const override
 Method that writes a representatiohn of this node only to graphviz.
VolumeAttachmentStrategy attachmentStrategy () const
 Accessor to the attachment strategy.
Volumebuild (const Experimental::BlueprintOptions &options, const GeometryContext &gctx, const Logger &logger=Acts::getDummyLogger()) override
 This participates in the construction of the geometry via the blueprint tree.
AxisDirection direction () const
 Accessor to the stacking direction.
void finalize (const Experimental::BlueprintOptions &options, const GeometryContext &gctx, TrackingVolume &parent, const Logger &logger) override
 This participates in the construction of the geometry via the blueprint tree.
const std::string & name () const override
 Get the name of this node.
std::pair< VolumeResizeStrategy, VolumeResizeStrategyresizeStrategies () const
 Accessor to the resize strategies.
ContainerBlueprintNodesetAttachmentStrategy (VolumeAttachmentStrategy attachmentStrategy)
 Setter for the attachment strategy.
ContainerBlueprintNodesetDirection (AxisDirection direction)
 Setter for the stacking direction.
ContainerBlueprintNodesetResizeStrategies (VolumeResizeStrategy inner, VolumeResizeStrategy outer)
 Setter for the resize strategies.
ContainerBlueprintNodesetResizeStrategy (VolumeResizeStrategy resizeStrategy)
 Setter for the resize strategy.
Public Member Functions inherited from Acts::Experimental::BlueprintNode
virtual ~BlueprintNode ()=default
 Virtual destructor to ensure correct cleanup.
BlueprintNodeaddChild (std::shared_ptr< BlueprintNode > child)
 Register a child to this node.
MutableChildRange children ()
 Return a MutableChildRange to the children of this node.
ChildRange children () const
 Return a ChildRange to the children of this node.
void clearChildren ()
 Remove all children from this node.
std::size_t depth () const
 Return the depth of this node in the blueprint tree.
void graphviz (std::ostream &os) const
 Print the node tree starting from this node to graphviz format.
StaticBlueprintNodeaddStaticVolume (std::unique_ptr< TrackingVolume > volume, const std::function< void(StaticBlueprintNode &cylinder)> &callback={})
 This method creates a new Acts::Experimental::StaticBlueprintNode wrapping volume and adds it to this node as a child.
StaticBlueprintNodeaddStaticVolume (const Transform3 &transform, std::shared_ptr< VolumeBounds > volumeBounds, const std::string &volumeName="undefined", const std::function< void(StaticBlueprintNode &cylinder)> &callback={})
 Alternative overload for creating a Acts::Experimental::StaticBlueprintNode.
CylinderContainerBlueprintNodeaddCylinderContainer (const std::string &name, AxisDirection direction, const std::function< void(CylinderContainerBlueprintNode &cylinder)> &callback={})
 Convenience method for creating a cylinder specialization of Acts::Experimental::ContainerBlueprintNode.
CuboidContainerBlueprintNodeaddCuboidContainer (const std::string &name, AxisDirection direction, const std::function< void(CuboidContainerBlueprintNode &cylinder)> &callback={})
 Convenience method for creating a cuboid specialization of Acts::Experimental::ContainerBlueprintNode.
MaterialDesignatorBlueprintNodeaddMaterial (const std::string &name, const std::function< void(MaterialDesignatorBlueprintNode &material)> &callback={})
 Convenience method for creating a Acts::Experimental::MaterialDesignatorBlueprintNode.
LayerBlueprintNodeaddLayer (const std::string &name, const std::function< void(LayerBlueprintNode &layer)> &callback={})
 Convenience method for creating a Acts::Experimental::LayerBlueprintNode.
GeometryIdentifierBlueprintNodewithGeometryIdentifier (const std::function< void(GeometryIdentifierBlueprintNode &geometryIdentifier)> &callback={})
 Convenience method for creating a Acts::Experimental::GeometryIdentifierBlueprintNode.

Protected Member Functions

const std::string & typeName () const override
 Get the type name of the container.
Protected Member Functions inherited from Acts::Experimental::ContainerBlueprintNode
template<typename BaseShell, typename SingleShell>
std::vector< BaseShell * > collectChildShells (const Experimental::BlueprintOptions &options, const GeometryContext &gctx, VolumeStack &stack, const std::string &prefix, const Logger &logger)
 Collect shells from child nodes and gap volumes.
template<typename BaseShell, typename SingleShell, typename ShellStack>
PortalShellBaseconnectImpl (const Experimental::BlueprintOptions &options, const GeometryContext &gctx, VolumeStack *stack, const std::string &prefix, const Logger &logger)
 Implementation of the connect method for container nodes.
Protected Member Functions inherited from Acts::Experimental::BlueprintNode
std::string indent () const
 An indentation depending on the depth of this node.
std::string prefix () const
 Printing helper returning a prefix including an indent depending on the depth.
void setDepth (std::size_t depth)
 Set the depth to depth and update children recursively.
virtual void toStream (std::ostream &os) const
 Virtual method to determine stream representation.

Static Protected Attributes

static const std::string s_typeName = "Cylinder"

Additional Inherited Members

Public Types inherited from Acts::Experimental::BlueprintNode
using ChildRange
 A range-like object that allows range based for loops and index access.
using MutableChildRange
 A range-like object that allows range based for loops and index access.
Protected Attributes inherited from Acts::Experimental::ContainerBlueprintNode
VolumeAttachmentStrategy m_attachmentStrategy
 Volume attachment strategy for connecting volumes in the stack.
std::vector< Volume * > m_childVolumes
 Container of child volumes managed by this blueprint node.
AxisDirection m_direction = AxisDirection::AxisZ
 Stacking axis direction in local reference frame.
std::vector< std::pair< std::unique_ptr< PortalShellBase >, std::unique_ptr< TrackingVolume > > > m_gaps
 Container of gap volumes and their portal shells created between child volumes.
std::string m_name
 Name of the container node for debugging purposes.
std::pair< VolumeResizeStrategy, VolumeResizeStrategym_resizeStrategies
 Resize strategies for inner and outer sides of the container.
std::unique_ptr< PortalShellBasem_shell {nullptr}
 Portal shell representation of this container for geometry connection.
std::unique_ptr< VolumeStackm_stack {nullptr}
 Volume stack instance created by derived classes during build phase.
std::map< const Volume *, BlueprintNode * > m_volumeToNode
 Mapping from child volumes to their corresponding blueprint nodes.

Member Function Documentation

◆ connect()

PortalShellBase & Acts::Experimental::CylinderContainerBlueprintNode::connect ( const Experimental::BlueprintOptions & options,
const GeometryContext & gctx,
const Logger & logger = Acts::getDummyLogger() )
overridevirtual

This participates in the construction of the geometry via the blueprint tree.

The steps are approximately as follows:

  1. Walk through all volumes that were created by the build phase
  2. Check if they are: real child volumes or gap volumes
    • If gap volume: produce a Acts::TrackingVolume, and wrap it in a single use shell
    • If child volume: locate the right child node it came from, call connect and collect the returned shell
  3. Produce a combined StackPortalShell (cuboid or cylinder) from all the shells
  4. Return that shell representation
Parameters
optionsThe global blueprint options
gctxThe geometry context (nominal usually)
loggerThe logger to use
Returns
The combined StackPortalShell (cuboid or cylinder)

Implements Acts::Experimental::BlueprintNode.

◆ ContainerBlueprintNode() [1/2]

Main constructor for the container node.

Parameters
nameThe name of the node (for debug only)
axisThe stacking axis direction in local reference frame
attachmentStrategyThe attachment strategy for the stack
resizeStrategiesThe resize strategies for the stack

◆ ContainerBlueprintNode() [2/2]

Main constructor for the container node.

Parameters
nameThe name of the node (for debug only)
axisThe stacking axis direction in local reference frame
attachmentStrategyThe attachment strategy for the stack
resizeStrategyThe resize strategy for the stack

◆ makeStack()

std::unique_ptr< VolumeStack > Acts::Experimental::CylinderContainerBlueprintNode::makeStack ( const GeometryContext & gctx,
std::vector< Volume * > & volumes,
const Logger & logger )
overridevirtual

Make the volume stack for the container.

This is called by the build method and is implemented by the derived classes.

Parameters
gctxThe current geometry context object, e.g. alignment
volumesThe volumes to stack
loggerThe logger to use
Returns
The volume stack

Implements Acts::Experimental::ContainerBlueprintNode.

◆ typeName()

const std::string & Acts::Experimental::CylinderContainerBlueprintNode::typeName ( ) const
overrideprotectedvirtual

Get the type name of the container.

This is used for the debug output of the container and encoding the volume shape in the dot graph.

Returns
The type name

Implements Acts::Experimental::ContainerBlueprintNode.

Member Data Documentation

◆ s_typeName

const std::string Acts::Experimental::CylinderContainerBlueprintNode::s_typeName = "Cylinder"
staticprotected