ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::Experimental::SensorLayerAssembler< BackendT > Class Template Reference

Fluent builder that assembles multiple cylindrical or disc-like detector layers directly from sensor elements into a CylinderContainerBlueprintNode. More...

#include <Acts/Geometry/BlueprintBuilder.hpp>

Inheritance diagram for Acts::Experimental::SensorLayerAssembler< BackendT >:
[legend]

Public Types

using AxisDefinition
 Axis definition type, or std::monostate when the backend does not support axis definitions.
using Builder = BlueprintBuilder<BackendT>
 The associated BlueprintBuilder type.
using Element = typename BackendT::Element
 Backend detector element handle type.
using LayerCustomizer = detail::LayerCustomizer<Element>
 Callback type that can replace or wrap a LayerBlueprintNode.
using LayerGrouper = std::function<std::string(const Element&)>
 Callable that maps a sensor element to a string group key.
using LayerSpec = typename BackendT::LayerSpec
 Backend layer-specification type.
using LayerType = LayerBlueprintNode::LayerType
 Distinguishes barrel (Cylinder) from endcap (Disc) layer geometry.

Public Member Functions

void addTo (BlueprintNode &node) const &&
 Build the container node and attach it as a child of node.
SensorLayerAssembler && barrel () &&
 Shorthand for setLayerType(LayerType::Cylinder).
std::shared_ptr< ContainerBlueprintNodebuild () const
 Build and return the assembled container node.
SensorLayerAssembler && endcap () &&
 Shorthand for setLayerType(LayerType::Disc).
SensorLayerAssembler && groupBy (LayerGrouper grouper) &&
 Group sensors into layers by key (required).
template<typename CustomizerT>
requires ( detail::LayerNodeReturningCallable<Element, std::decay_t<CustomizerT>> || detail::LayerNodeReplacingCallable<Element, std::decay_t<CustomizerT>>)
SensorLayerAssembler && onLayer (CustomizerT customizer) &&
 Register a callback invoked for each created layer node.
SensorLayerAssembler && planar () &&
 Shorthand for setLayerType(LayerType::Plane).
SensorLayerAssembler && setAttachmentStrategy (std::optional< Acts::VolumeAttachmentStrategy > strategy) &&
 Override the attachment strategy for the container node.
SensorLayerAssembler && setContainerName (std::string containerName) &&
 Set the output container node name (required).
SensorLayerAssembler && setEnvelope (const Acts::ExtentEnvelope &envelope) &&
 Set an envelope applied to every produced layer node.
SensorLayerAssembler && setLayerType (LayerType layerType) &&
 Set the layer geometry type explicitly.
template<typename B = BackendT>
requires (detail::HasAxisDefinition<B>)
SensorLayerAssembler && setSensorAxes (typename B::AxisDefinition axes) &&
 Set the axis definition used to orient sensitive surfaces.
SensorLayerAssembler && setSensors (std::vector< Element > sensors) &&
 Set the sensor elements to assemble into layers.

Detailed Description

template<detail::BlueprintBackend BackendT>
class Acts::Experimental::SensorLayerAssembler< BackendT >

Fluent builder that assembles multiple cylindrical or disc-like detector layers directly from sensor elements into a CylinderContainerBlueprintNode.

Unlike ElementLayerAssembler, no layer-representative element is assumed to exist. Names and transforms are never deduced from the element hierarchy; they come solely from groupBy keys. Obtained from BlueprintBuilder::layersFromSensors().

A groupBy function is required: sensors mapped to the same key are merged into one layer, and the key becomes the layer name.

For a single layer (no grouping), use SensorLayer via BlueprintBuilder::layerFromSensors() instead.

builder.layersFromSensors()
.barrel()
.setSensorAxes(myAxes)
.setSensors(sensorElements)
.groupBy(keyExtractor)
.setContainerName("MyBarrel")
.addTo(parentNode);
Template Parameters
BackendTGeometry backend that provides detector elements, layer specifications, hierarchy traversal, sensitive-element classification, and surface construction.

Member Typedef Documentation

◆ AxisDefinition

template<detail::BlueprintBackend BackendT>
using Acts::Experimental::SensorLayerAssembler< BackendT >::AxisDefinition
Initial value:
std::conditional_t<detail::HasAxisDefinition<BackendT>,
typename BackendT::AxisDefinition, std::monostate>

Axis definition type, or std::monostate when the backend does not support axis definitions.

Member Function Documentation

◆ addTo()

template<detail::BlueprintBackend BackendT>
void Acts::Experimental::SensorLayerAssembler< BackendT >::addTo ( BlueprintNode & node) const &&

Build the container node and attach it as a child of node.

Equivalent to node.addChild(build()).

Parameters
nodeBlueprint node that will receive the built container as a child.

◆ barrel()

template<detail::BlueprintBackend BackendT>
SensorLayerAssembler && Acts::Experimental::SensorLayerAssembler< BackendT >::barrel ( ) &&
nodiscard

Shorthand for setLayerType(LayerType::Cylinder).

Returns
*this (rvalue).

◆ build()

template<detail::BlueprintBackend BackendT>
std::shared_ptr< ContainerBlueprintNode > Acts::Experimental::SensorLayerAssembler< BackendT >::build ( ) const
nodiscard

Build and return the assembled container node.

Exceptions
std::runtime_errorif the layer type is not set, if the backend requires axes and none were provided, if sensors are not set, if the container name is not set, or if groupBy has not been configured.
Returns
Shared pointer to the assembled container node.

◆ endcap()

template<detail::BlueprintBackend BackendT>
SensorLayerAssembler && Acts::Experimental::SensorLayerAssembler< BackendT >::endcap ( ) &&
nodiscard

Shorthand for setLayerType(LayerType::Disc).

Returns
*this (rvalue).

◆ groupBy()

template<detail::BlueprintBackend BackendT>
SensorLayerAssembler && Acts::Experimental::SensorLayerAssembler< BackendT >::groupBy ( LayerGrouper grouper) &&
nodiscard

Group sensors into layers by key (required).

Sensors mapped to the same key are merged into one layer. The key becomes the layer name.

Parameters
grouperCallable std::string(const Element& sensor).
Returns
*this (rvalue).

◆ onLayer()

template<detail::BlueprintBackend BackendT>
template<typename CustomizerT>
requires ( detail::LayerNodeReturningCallable<Element, std::decay_t<CustomizerT>> || detail::LayerNodeReplacingCallable<Element, std::decay_t<CustomizerT>>)
SensorLayerAssembler && Acts::Experimental::SensorLayerAssembler< BackendT >::onLayer ( CustomizerT customizer) &&
nodiscard

Register a callback invoked for each created layer node.

The callback may either return a (possibly replaced/wrapped) layer node, or mutate a layer node in-place and return void.

Parameters
customizerCallback applied to each created layer node.
Returns
*this (rvalue).

◆ planar()

template<detail::BlueprintBackend BackendT>
SensorLayerAssembler && Acts::Experimental::SensorLayerAssembler< BackendT >::planar ( ) &&
nodiscard

Shorthand for setLayerType(LayerType::Plane).

Returns
*this (rvalue).

◆ setAttachmentStrategy()

template<detail::BlueprintBackend BackendT>
SensorLayerAssembler && Acts::Experimental::SensorLayerAssembler< BackendT >::setAttachmentStrategy ( std::optional< Acts::VolumeAttachmentStrategy > strategy) &&
nodiscard

Override the attachment strategy for the container node.

When unset the backend's default strategy is used.

Parameters
strategyOptional attachment strategy; pass std::nullopt to reset to the default.
Returns
*this (rvalue).

◆ setContainerName()

template<detail::BlueprintBackend BackendT>
SensorLayerAssembler && Acts::Experimental::SensorLayerAssembler< BackendT >::setContainerName ( std::string containerName) &&
nodiscard

Set the output container node name (required).

Parameters
containerNameName of the produced CylinderContainerBlueprintNode.
Returns
*this (rvalue).

◆ setEnvelope()

template<detail::BlueprintBackend BackendT>
SensorLayerAssembler && Acts::Experimental::SensorLayerAssembler< BackendT >::setEnvelope ( const Acts::ExtentEnvelope & envelope) &&
nodiscard

Set an envelope applied to every produced layer node.

Parameters
envelopeEnvelope margins added around each layer's extent.
Returns
*this (rvalue).

◆ setLayerType()

template<detail::BlueprintBackend BackendT>
SensorLayerAssembler && Acts::Experimental::SensorLayerAssembler< BackendT >::setLayerType ( LayerType layerType) &&
nodiscard

Set the layer geometry type explicitly.

Parameters
layerTypeLayerType::Cylinder for barrel, LayerType::Disc for endcap.
Returns
*this (rvalue).

◆ setSensorAxes()

template<detail::BlueprintBackend BackendT>
template<typename B = BackendT>
requires (detail::HasAxisDefinition<B>)
SensorLayerAssembler && Acts::Experimental::SensorLayerAssembler< BackendT >::setSensorAxes ( typename B::AxisDefinition axes) &&
nodiscard

Set the axis definition used to orient sensitive surfaces.

Only available when the backend defines an AxisDefinition type and stores optional surface-axis information in LayerSpec.

Parameters
axesAxis definition forwarded to LayerSpec::axes.
Returns
*this (rvalue).

◆ setSensors()

template<detail::BlueprintBackend BackendT>
SensorLayerAssembler && Acts::Experimental::SensorLayerAssembler< BackendT >::setSensors ( std::vector< Element > sensors) &&
nodiscard

Set the sensor elements to assemble into layers.

Parameters
sensorsSensor elements (leaf-level sensitives).
Returns
*this (rvalue).