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

Fluent builder that assembles a single cylindrical or disc-like detector layer directly from sensor elements, returning a LayerBlueprintNode (no container wrapper). More...

#include <Acts/Geometry/BlueprintBuilder.hpp>

Inheritance diagram for Acts::Experimental::SensorLayer< 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 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 layer node and attach it as a child of node.
SensorLayer && barrel () &&
 Shorthand for setLayerType(LayerType::Cylinder).
std::shared_ptr< LayerBlueprintNodebuild () const
 Build and return the assembled layer node.
SensorLayer && endcap () &&
 Shorthand for setLayerType(LayerType::Disc).
template<typename CustomizerT>
requires ( detail::LayerNodeReturningCallable<Element, std::decay_t<CustomizerT>> || detail::LayerNodeReplacingCallable<Element, std::decay_t<CustomizerT>>)
SensorLayer && onLayer (CustomizerT customizer) &&
 Register a callback invoked for the created layer node.
SensorLayer && planar () &&
 Shorthand for setLayerType(LayerType::Plane).
SensorLayer && setEnvelope (const Acts::ExtentEnvelope &envelope) &&
 Set an envelope applied to the produced layer node.
SensorLayer && setLayerName (std::string name) &&
 Set the name for the produced layer node (required).
SensorLayer && setLayerType (LayerType layerType) &&
 Set the layer geometry type explicitly.
template<typename B = BackendT>
requires (detail::HasAxisDefinition<B>)
SensorLayer && setSensorAxes (typename B::AxisDefinition axes) &&
 Set the axis definition used to orient sensitive surfaces.
SensorLayer && setSensors (std::vector< Element > sensors) &&
 Set the sensor elements to assemble into the layer.

Detailed Description

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

Fluent builder that assembles a single cylindrical or disc-like detector layer directly from sensor elements, returning a LayerBlueprintNode (no container wrapper).

Unlike SensorLayerAssembler, this builder produces exactly one layer. The layer name must be provided explicitly via setLayerName. No grouping function is required or supported. Obtained from BlueprintBuilder::layerFromSensors().

builder.layerFromSensors()
.barrel()
.setSensorAxes(myAxes)
.setSensors(sensorElements)
.setLayerName("MyLayer")
.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::SensorLayer< 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::SensorLayer< BackendT >::addTo ( BlueprintNode & node) const &&

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

Equivalent to node.addChild(build()).

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

◆ barrel()

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

Shorthand for setLayerType(LayerType::Cylinder).

Returns
*this (rvalue).

◆ build()

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

Build and return the assembled layer 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, or if setLayerName has not been called.
Returns
Shared pointer to the assembled LayerBlueprintNode.

◆ endcap()

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

Shorthand for setLayerType(LayerType::Disc).

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>>)
SensorLayer && Acts::Experimental::SensorLayer< BackendT >::onLayer ( CustomizerT customizer) &&
nodiscard

Register a callback invoked for the 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 the created layer node.
Returns
*this (rvalue).

◆ planar()

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

Shorthand for setLayerType(LayerType::Plane).

Returns
*this (rvalue).

◆ setEnvelope()

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

Set an envelope applied to the produced layer node.

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

◆ setLayerName()

template<detail::BlueprintBackend BackendT>
SensorLayer && Acts::Experimental::SensorLayer< BackendT >::setLayerName ( std::string name) &&
nodiscard

Set the name for the produced layer node (required).

Parameters
nameLayer node name.
Returns
*this (rvalue).

◆ setLayerType()

template<detail::BlueprintBackend BackendT>
SensorLayer && Acts::Experimental::SensorLayer< 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>)
SensorLayer && Acts::Experimental::SensorLayer< 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>
SensorLayer && Acts::Experimental::SensorLayer< BackendT >::setSensors ( std::vector< Element > sensors) &&
nodiscard

Set the sensor elements to assemble into the layer.

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