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

Wraps a single child blueprint node and pads it into a larger volume whose dimensions are evaluated at construction time using the child's extent plus a configurable envelope. More...

#include <Acts/Geometry/PadBlueprintNode.hpp>

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

Public Types

enum class  Centering { Centered , FitBounds }
 Controls how the padded volume is centered along the directions its bounds express symmetrically (z for a cylinder, x/y/z for a cuboid). More...
Public Types inherited from Acts::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.

Public Member Functions

 PadBlueprintNode (const std::string &name, const ExtentEnvelope &envelope=ExtentEnvelope::Zero())
 Main constructor for the padding node.
Volumebuild (const BlueprintOptions &options, const GeometryContext &gctx, const Logger &logger=Acts::getDummyLogger()) override
 This method is called during the build phase of the blueprint tree construction.
Centering centering () const
 Get the centering mode.
PadBlueprintNodeclearReferenceAxis ()
 Drop the reference axis and pad in the child's own frame (the default).
const ExtentEnvelopeenvelope () const
 Get the padding envelope.
const std::optional< Transform3 > & referenceAxis () const
 Get the reference axis, if one is configured.
PadBlueprintNodesetCentering (Centering centering)
 Set how the volume is centered along its symmetric directions.
PadBlueprintNodesetEnvelope (const ExtentEnvelope &envelope)
 Set the padding envelope applied to the child's extent.
PadBlueprintNodesetReferenceAxis (const Transform3 &axis)
 Align the enclosure to an external reference axis instead of the child's own frame (cylinder children only).
Public Member Functions inherited from Acts::StaticBlueprintNode
 StaticBlueprintNode (std::unique_ptr< TrackingVolume > volume)
 Construct the static node from an existing volume.
Volumebuild (const BlueprintOptions &options, const GeometryContext &gctx, const Logger &logger=Acts::getDummyLogger()) override
 This method is called during the build phase of the blueprint tree construction.
PortalShellBaseconnect (const BlueprintOptions &options, const GeometryContext &gctx, const Logger &logger=Acts::getDummyLogger()) override
 This method is called during the connect phase.
void finalize (const BlueprintOptions &options, const GeometryContext &gctx, TrackingVolume &parent, const Logger &logger=Acts::getDummyLogger()) override
 This method is called during the finalize phase.
const std::string & name () const override
 Get the name of this node.
const NavigationPolicyFactorynavigationPolicyFactory () const
 Get the navigation policy factory for this node.
virtual StaticBlueprintNodesetNavigationPolicyFactory (std::shared_ptr< NavigationPolicyFactory > navigationPolicyFactory)
 Set the navigation policy factory for this node.
Public Member Functions inherited from Acts::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::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::StaticBlueprintNode.
CylinderContainerBlueprintNodeaddCylinderContainer (const std::string &name, AxisDirection direction, const std::function< void(CylinderContainerBlueprintNode &cylinder)> &callback={})
 Convenience method for creating a cylinder specialization of Acts::ContainerBlueprintNode.
CuboidContainerBlueprintNodeaddCuboidContainer (const std::string &name, AxisDirection direction, const std::function< void(CuboidContainerBlueprintNode &cylinder)> &callback={})
 Convenience method for creating a cuboid specialization of Acts::ContainerBlueprintNode.
MaterialDesignatorBlueprintNodeaddMaterial (const std::string &name, const std::function< void(MaterialDesignatorBlueprintNode &material)> &callback={})
 Convenience method for creating a Acts::MaterialDesignatorBlueprintNode.
PortalDesignatorBlueprintNodeaddPortalDesignator (const std::string &name, const std::function< void(PortalDesignatorBlueprintNode &portals)> &callback={})
 Convenience method for creating a Acts::PortalDesignatorBlueprintNode.
LayerBlueprintNodeaddLayer (const std::string &name, const std::function< void(LayerBlueprintNode &layer)> &callback={})
 Convenience method for creating a Acts::LayerBlueprintNode.
GeometryIdentifierBlueprintNodewithGeometryIdentifier (const std::function< void(GeometryIdentifierBlueprintNode &geometryIdentifier)> &callback={})
 Convenience method for creating a Acts::GeometryIdentifierBlueprintNode.

Static Public Member Functions

static std::unique_ptr< TrackingVolumepadded (const GeometryContext &gctx, const Volume &inner, const ExtentEnvelope &envelope, const std::string &name, const Logger &logger)
 Overload keeping the pre-reference-axis call signature source compatible, i.e.
static std::unique_ptr< TrackingVolumepadded (const GeometryContext &gctx, const Volume &inner, const ExtentEnvelope &envelope, const std::string &name, const std::optional< Transform3 > &referenceAxis=std::nullopt, Centering centering=Centering::Centered, const Logger &logger=Acts::getDummyLogger())
 Create a volume that encloses inner, enlarged by envelope.

Additional Inherited Members

Protected Member Functions inherited from Acts::StaticBlueprintNode
void addToGraphviz (std::ostream &os) const override
 Method that writes a representatiohn of this node only to graphviz.
Protected Member Functions inherited from Acts::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.
virtual void toStream (std::ostream &os) const
 Virtual method to determine stream representation.
Protected Attributes inherited from Acts::StaticBlueprintNode
std::shared_ptr< NavigationPolicyFactorym_navigationPolicyFactory
 Factory for creating navigation policies for this volume.
std::unique_ptr< PortalShellBasem_shell
 Portal shell representation for geometry connection.
std::unique_ptr< TrackingVolumem_volume
 The wrapped tracking volume managed by this blueprint node.

Detailed Description

Wraps a single child blueprint node and pads it into a larger volume whose dimensions are evaluated at construction time using the child's extent plus a configurable envelope.

Note
This node can only have a single child. This is not an error during tree building, but during geometry construction. It defers most of the functionality to Acts::StaticBlueprintNode, and only implements the build phase to perform the padding.

Two orthogonal, opt-in settings control where the padded volume ends up:

  • setReferenceAxis picks the frame the enclosure is built in. By default it is the child's own frame. When a reference axis is set, a cylinder child's transverse offset from that axis is absorbed into radial growth and the enclosure is re-centered onto the axis, so a displaced cylindrical subtree can be dropped into a strictly co-axial Acts::CylinderVolumeStack without weakening its alignment checks. Axis alignment is cylinder-only.
  • setCentering picks how the volume is centered along the directions its bounds express symmetrically (z for a cylinder, x/y/z for a cuboid). The default Centering::Centered keeps the volume centered on the child and requires a symmetric envelope there; Centering::FitBounds allows an asymmetric envelope and shifts the enclosure so the child stays contained.

    Deprecated
    The blueprint geometry moved out of the Acts::Experimental namespace. Use Acts::PadBlueprintNode instead. This alias is kept for backward compatibility and will be removed.

Member Enumeration Documentation

◆ Centering

Controls how the padded volume is centered along the directions its bounds express symmetrically (z for a cylinder, x/y/z for a cuboid).

Enumerator
Centered 

Keep the padded volume centered on the child (default).

The envelope must be symmetric in those directions, otherwise build throws: the volume cannot move to absorb the asymmetry.

FitBounds 

Place the padded volume at the midpoint of the expanded extent, so an asymmetric envelope simply shifts the enclosure off the child while keeping it fully contained.

Constructor & Destructor Documentation

◆ PadBlueprintNode()

Acts::PadBlueprintNode::PadBlueprintNode ( const std::string & name,
const ExtentEnvelope & envelope = ExtentEnvelope::Zero() )
explicit

Main constructor for the padding node.

Parameters
nameThe name of the padded volume.
envelopeThe envelope to apply to the child node's extent to create the padded volume.

Member Function Documentation

◆ build()

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

This method is called during the build phase of the blueprint tree construction.

It returns a single Acts::Volume which represents transform and bounds of the entire subtree. This does not have to correspond to the final Acts::TrackingVolume, some node types will produce temporary volume representations. Lifetime of the returned volume is managed by the source node! Nodes higher in the hierarchy will issue resizes down the tree hierarchy. This is not done through a direct hierarchy, but coordinated by the respective node type, by internally consulting its children.

Note
Generally, you should not need to to call this method directly. The construction should usually be done through the special Acts::Blueprint class.
Parameters
optionsThe global construction options
gctxThe geometry context for construction (usually nominal)
loggerThe logger to use for output during construction
Returns
The volume used for communicating transform and size up the hierarchy Build-phase of the blueprint construction. Returns the padded volume.

Implements Acts::BlueprintNode.

◆ centering()

Centering Acts::PadBlueprintNode::centering ( ) const

Get the centering mode.

Returns
The configured centering mode

◆ clearReferenceAxis()

PadBlueprintNode & Acts::PadBlueprintNode::clearReferenceAxis ( )

Drop the reference axis and pad in the child's own frame (the default).

Returns
Reference to this node for chaining

◆ envelope()

const ExtentEnvelope & Acts::PadBlueprintNode::envelope ( ) const

Get the padding envelope.

Returns
The configured envelope

◆ padded() [1/2]

std::unique_ptr< TrackingVolume > Acts::PadBlueprintNode::padded ( const GeometryContext & gctx,
const Volume & inner,
const ExtentEnvelope & envelope,
const std::string & name,
const Logger & logger )
static

Overload keeping the pre-reference-axis call signature source compatible, i.e.

padding in the child's own frame with Centering::Centered.

Deprecated
Pass the reference axis and centering explicitly, i.e. padded(gctx, inner, envelope, name, std::nullopt, Centering::Centered, logger).
Parameters
gctxThe geometry context
innerThe volume to enclose
envelopeThe envelope to add to the bounds of inner
nameThe name of the padded volume
loggerThe logger to use
Returns
The padded volume enclosing inner
Exceptions
std::logic_errorif inner has unsupported bounds, or if the envelope is asymmetric where it must not be

◆ padded() [2/2]

std::unique_ptr< TrackingVolume > Acts::PadBlueprintNode::padded ( const GeometryContext & gctx,
const Volume & inner,
const ExtentEnvelope & envelope,
const std::string & name,
const std::optional< Transform3 > & referenceAxis = std::nullopt,
Centering centering = Centering::Centered,
const Logger & logger = Acts::getDummyLogger() )
static

Create a volume that encloses inner, enlarged by envelope.

Without a referenceAxis the enclosure is built in the child's own frame; with one (cylinder children only) it is re-centered onto that axis and its radial bounds are grown by the child's radial offset. The centering mode governs the symmetric directions (z for cylinders, x/y/z for cuboids): Centering::Centered keeps the volume centered on the child and requires a symmetric envelope there, while Centering::FitBounds allows an asymmetric envelope and shifts the enclosure to the midpoint of the expanded extent.

Parameters
gctxThe geometry context
innerThe volume to enclose
envelopeThe envelope to add to the bounds of inner
nameThe name of the padded volume
referenceAxisOptional reference axis for axis-aligned enclosure
centeringCentering mode for the symmetric directions
loggerThe logger to use
Returns
The padded volume enclosing inner
Exceptions
std::logic_errorif inner has unsupported bounds, if a Centering::Centered envelope is asymmetric where it must not be, or if a reference axis is used with a non-cylinder or tilted child

◆ referenceAxis()

const std::optional< Transform3 > & Acts::PadBlueprintNode::referenceAxis ( ) const

Get the reference axis, if one is configured.

Returns
The optional reference axis transform

◆ setCentering()

PadBlueprintNode & Acts::PadBlueprintNode::setCentering ( Centering centering)

Set how the volume is centered along its symmetric directions.

Parameters
centeringThe centering mode
Returns
Reference to this node for chaining

◆ setEnvelope()

PadBlueprintNode & Acts::PadBlueprintNode::setEnvelope ( const ExtentEnvelope & envelope)

Set the padding envelope applied to the child's extent.

Parameters
envelopeThe per-side envelope to apply
Returns
Reference to this node for chaining

◆ setReferenceAxis()

PadBlueprintNode & Acts::PadBlueprintNode::setReferenceAxis ( const Transform3 & axis)

Align the enclosure to an external reference axis instead of the child's own frame (cylinder children only).

The child's transverse offset from axis is absorbed into radial growth and the enclosure is re-centered onto axis; the child keeps its displaced placement. This transverse re-centering happens irrespective of the Centering setting, which still governs the axial (z) direction.

Parameters
axisTransform of the reference axis frame
Returns
Reference to this node for chaining