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

The layer node is essentially an auto-sizing wrapper around a set of surfaces. More...

#include <Acts/Geometry/LayerBlueprintNode.hpp>

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

Public Types

enum class  LayerType { Cylinder , Disc , Plane }
 Enum that lists out the supported layer types. More...
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.

Public Member Functions

 LayerBlueprintNode (std::string_view name)
 Constructor for a layer node.
 ~LayerBlueprintNode () override
Volumebuild (const BlueprintOptions &options, const GeometryContext &gctx, const Logger &logger=Acts::getDummyLogger()) override
 This function participates in the geometry construction.
const ExtentEnvelopeenvelope () const
 Access the envelope of the layer node.
const LayerTypelayerType () const
 Access the layer type of the layer node.
const std::string & name () const override
 Get the name of this node.
const MutableProtoLayerprotoLayer () const
 Access the registered proto layer.
LayerBlueprintNodesetEnvelope (const ExtentEnvelope &envelope)
 Set the envelope of the layer node.
LayerBlueprintNodesetLayerType (LayerType layerType)
 Set the layer type of the layer node.
LayerBlueprintNodesetProtoLayer (std::optional< MutableProtoLayer > protoLayer)
 Register a proto layer with the layer node.
LayerBlueprintNodesetSurfaces (std::vector< std::shared_ptr< Surface > > surfaces)
 Register a set of surfaces with the layer node.
LayerBlueprintNodesetTransform (const Transform3 &transform)
 Set the transformation of the layer node.
LayerBlueprintNodesetUseCenterOfGravity (bool x, bool y, bool z)
 Set the layer volume to be centered on the center of gravity of the surfaces.
const std::vector< std::shared_ptr< Surface > > & surfaces () const
 Access the registered surfaces.
const Transform3transform () const
 Access the transformation of the layer node.
Public Member Functions inherited from Acts::Experimental::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::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.

Additional Inherited Members

Protected Member Functions inherited from Acts::Experimental::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::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.
Protected Attributes inherited from Acts::Experimental::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

The layer node is essentially an auto-sizing wrapper around a set of surfaces.

Note
This implementation is preliminary and will likely change in the future. It defers most of the functionality to Acts::Experimental::StaticBlueprintNode, after the initial volume creation is completed.

The layer volume is created to wrap around the surfaces registered with this node. The orientation of the resulting volume defaults to the identity matrix. If another orientation is desired, this can be set with the setTransform method. See Acts::ProtoLayer for details on the auto-sizing from surfaces.

Member Enumeration Documentation

◆ LayerType

Enum that lists out the supported layer types.

Enumerator
Cylinder 

A cylinder layer.

Disc 

A disc layer.

Plane 

A plane layer.

Note
This is not yet implemented

Constructor & Destructor Documentation

◆ LayerBlueprintNode()

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

Constructor for a layer node.

Parameters
nameThe name of the layer

◆ ~LayerBlueprintNode()

Acts::Experimental::LayerBlueprintNode::~LayerBlueprintNode ( )
override

Member Function Documentation

◆ build()

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

This function participates in the geometry construction.

It will:

  1. Analyze the surfaces provided and produce a wrapping volume
  2. Register the surfaces with the volume
  3. Return the volume
    Parameters
    optionsBlueprint options for construction
    gctxGeometry context for construction
    loggerLogger for debug output
    Returns
    Reference to constructed Volume
    Note
    At least one surfaces needs to be registered via Acts::Experimental::LayerBlueprintNode::setSurfaces before geometry construction.

Implements Acts::Experimental::BlueprintNode.

◆ envelope()

const ExtentEnvelope & Acts::Experimental::LayerBlueprintNode::envelope ( ) const

Access the envelope of the layer node.

Returns
The envelope

◆ layerType()

const LayerType & Acts::Experimental::LayerBlueprintNode::layerType ( ) const

Access the layer type of the layer node.

Returns
The layer type

◆ name()

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

Get the name of this node.

Returns
Reference to the node name string

Implements Acts::Experimental::BlueprintNode.

◆ protoLayer()

const MutableProtoLayer * Acts::Experimental::LayerBlueprintNode::protoLayer ( ) const

Access the registered proto layer.

Note
This will return nullptr if no proto layer is registered or built yet
Returns
The registered proto layer

◆ setEnvelope()

LayerBlueprintNode & Acts::Experimental::LayerBlueprintNode::setEnvelope ( const ExtentEnvelope & envelope)

Set the envelope of the layer node.

This configures the amount of space to add around the contained surfaces.

Parameters
envelopeThe envelope to set
Returns
Reference to this node for chaining

◆ setLayerType()

LayerBlueprintNode & Acts::Experimental::LayerBlueprintNode::setLayerType ( LayerType layerType)

Set the layer type of the layer node.

Parameters
layerTypeThe layer type to set
Returns
Reference to this node for chaining

◆ setProtoLayer()

LayerBlueprintNode & Acts::Experimental::LayerBlueprintNode::setProtoLayer ( std::optional< MutableProtoLayer > protoLayer)

Register a proto layer with the layer node.

Parameters
protoLayerThe proto layer to register
Note
This will clear any previously registered surfaces
Returns
Reference to this node for chaining

◆ setSurfaces()

LayerBlueprintNode & Acts::Experimental::LayerBlueprintNode::setSurfaces ( std::vector< std::shared_ptr< Surface > > surfaces)

Register a set of surfaces with the layer node.

Parameters
surfacesThe surfaces to register
Note
This will clear any previously registered proto layer
Returns
Reference to this node for chaining

◆ setTransform()

LayerBlueprintNode & Acts::Experimental::LayerBlueprintNode::setTransform ( const Transform3 & transform)

Set the transformation of the layer node.

This can be used to specifically orient the resulting layer volume.

Parameters
transformThe transformation to set
Returns
Reference to this node for chaining

◆ setUseCenterOfGravity()

LayerBlueprintNode & Acts::Experimental::LayerBlueprintNode::setUseCenterOfGravity ( bool x,
bool y,
bool z )

Set the layer volume to be centered on the center of gravity of the surfaces.

Parameters
xWhether to center the layer volume on the x-axis
yWhether to center the layer volume on the y-axis
zWhether to center the layer volume on the z-axis
Returns
Reference to this node for chaining

◆ surfaces()

const std::vector< std::shared_ptr< Surface > > & Acts::Experimental::LayerBlueprintNode::surfaces ( ) const

Access the registered surfaces.

Returns
The registered surfaces

◆ transform()

const Transform3 & Acts::Experimental::LayerBlueprintNode::transform ( ) const

Access the transformation of the layer node.

Returns
The transformation