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

This node type assigns string tags to specific portal faces of its child volume during the blueprint construction. More...

#include <Acts/Geometry/PortalDesignatorBlueprintNode.hpp>

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

Public Member Functions

 PortalDesignatorBlueprintNode (std::string_view name)
 Main constructor for the portal designator node.
Volumebuild (const BlueprintOptions &options, const GeometryContext &gctx, const Logger &logger=Acts::getDummyLogger()) override
 This method participates in the geometry construction.
PortalShellBaseconnect (const BlueprintOptions &options, const GeometryContext &gctx, const Logger &logger=Acts::getDummyLogger()) override
 This method participates in the geometry construction.
void finalize (const BlueprintOptions &options, const GeometryContext &gctx, TrackingVolume &parent, const Logger &logger) override
 This method participates in the geometry construction.
const std::string & name () const override
 Get the name of this node.
PortalDesignatorBlueprintNodetagFace (CuboidVolumeBounds::Face face, const std::string &label)
 Tag a cuboid face with a string label.
PortalDesignatorBlueprintNodetagFace (CylinderVolumeBounds::Face face, const std::string &label)
 Tag a cylinder face with a string label.
void toStream (std::ostream &os) const override
 Virtual method to determine stream representation.
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.
PortalDesignatorBlueprintNodeaddPortalDesignator (const std::string &name, const std::function< void(PortalDesignatorBlueprintNode &portals)> &callback={})
 Convenience method for creating a Acts::Experimental::PortalDesignatorBlueprintNode.
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.

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 Member Functions inherited from Acts::Experimental::BlueprintNode
std::span< std::shared_ptr< BlueprintNode > > childPtr ()
 Return a span over the children's shared_ptrs.
std::span< const std::shared_ptr< BlueprintNode > > childPtr () const
 Return a span over the children's shared_ptrs.
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.

Detailed Description

This node type assigns string tags to specific portal faces of its child volume during the blueprint construction.

The tags can be used to look up the corresponding portals from the final Acts::TrackingGeometry, e.g. "the portal connecting the tracker and the calorimeter".

Tagging happens in the finalize phase, after all portal merging and fusing has completed, so the tagged portal is the final, shared portal that ends up in the geometry. The position of this node in the blueprint tree determines which face is meant, which makes the lookup robust against volume subdivision and portal ordering.

Note
This node can only have a single child. This is not an error during tree building, but during geometry construction.

Constructor & Destructor Documentation

◆ PortalDesignatorBlueprintNode()

Acts::Experimental::PortalDesignatorBlueprintNode::PortalDesignatorBlueprintNode ( std::string_view name)
explicit

Main constructor for the portal designator node.

Parameters
nameThe name of the node (for debug only)

Member Function Documentation

◆ build()

Volume & Acts::Experimental::PortalDesignatorBlueprintNode::build ( const BlueprintOptions & options,
const GeometryContext & gctx,
const Logger & logger = Acts::getDummyLogger() )
overridevirtual

This method participates in the geometry construction.

It checks that this node only has a single child and forwards the call.

Parameters
optionsThe global blueprint options
gctxThe geometry context (nominal usually)
loggerThe logger to use
Returns
The child volume

Implements Acts::Experimental::BlueprintNode.

◆ connect()

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

This method participates in the geometry construction.

It captures the populated portal shell from its only child so the tags can be applied in the finalize phase (after all merging/fusing), and forwards the call.

Parameters
optionsThe global blueprint options
gctxThe geometry context (nominal usually)
loggerThe logger to use
Returns
The portal shell of the child

Implements Acts::Experimental::BlueprintNode.

◆ finalize()

void Acts::Experimental::PortalDesignatorBlueprintNode::finalize ( const BlueprintOptions & options,
const GeometryContext & gctx,
TrackingVolume & parent,
const Logger & logger )
overridevirtual

This method participates in the geometry construction.

It applies the configured tags to the (now final) portals of the captured shell, then passes the call through to its only child.

Parameters
optionsThe global blueprint options
gctxThe geometry context (nominal usually)
parentThe parent volume
loggerThe logger to use during construction

Implements Acts::Experimental::BlueprintNode.

◆ name()

const std::string & Acts::Experimental::PortalDesignatorBlueprintNode::name ( ) const
overridevirtual

Get the name of this node.

Returns
Reference to the node name string

Implements Acts::Experimental::BlueprintNode.

◆ tagFace() [1/2]

PortalDesignatorBlueprintNode & Acts::Experimental::PortalDesignatorBlueprintNode::tagFace ( CuboidVolumeBounds::Face face,
const std::string & label )

Tag a cuboid face with a string label.

Note
This method can be called multiple times to tag different faces.
Parameters
faceThe face of the cuboid to tag
labelThe tag to assign to the portal at that face
Returns
The portal designator node
Note
If this node has previously been configured with a different volume shape, this will throw an exception during geometry construction.

◆ tagFace() [2/2]

PortalDesignatorBlueprintNode & Acts::Experimental::PortalDesignatorBlueprintNode::tagFace ( CylinderVolumeBounds::Face face,
const std::string & label )

Tag a cylinder face with a string label.

Note
This method can be called multiple times to tag different faces.
Parameters
faceThe face of the cylinder to tag
labelThe tag to assign to the portal at that face
Returns
The portal designator node
Note
If this node has previously been configured with a different volume shape, this will throw an exception during geometry construction.

◆ toStream()

void Acts::Experimental::PortalDesignatorBlueprintNode::toStream ( std::ostream & os) const
overridevirtual

Virtual method to determine stream representation.

Parameters
osOutput stream to write to
Note
This method is called by the stream operator.

Reimplemented from Acts::Experimental::BlueprintNode.