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

Fluent builder that assembles a combined barrel + endcap subdetector into a CylinderContainerBlueprintNode arranged along the Z axis. More...

#include <Acts/Geometry/BlueprintBuilder.hpp>

Inheritance diagram for Acts::Experimental::BarrelEndcapAssembler< 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 ContainerCustomizer = detail::ContainerCustomizer<Element>
 Callback type that can replace or wrap a CylinderContainerBlueprintNode.
using Element = typename BackendT::Element
 Backend detector element handle type.
using ElementLayerAssembler
 The ElementLayerAssembler specialisation for this backend.

Public Member Functions

 BarrelEndcapAssembler (const Builder &builder)
 Construct a BarrelEndcapAssembler bound to builder.
void addTo (BlueprintNode &node) const &&
 Build the container node and attach it as a child of node.
std::shared_ptr< CylinderContainerBlueprintNodebuild () const
 Build and return the assembled barrel+endcap container node.
template<typename CustomizerT>
requires (detail::ContainerNodeReturningCallable< Element, std::decay_t<CustomizerT>> || detail::ContainerNodeReplacingCallable<Element, std::decay_t<CustomizerT>>)
BarrelEndcapAssembler && onContainer (CustomizerT customizer) &&
 Register a callback invoked for each barrel or endcap container node.
template<typename CustomizerT>
requires ( detail::LayerNodeReturningCallable<Element, std::decay_t<CustomizerT>> || detail::LayerNodeReplacingCallable<Element, std::decay_t<CustomizerT>>)
BarrelEndcapAssembler && onLayer (CustomizerT customizer) &&
 Register a layer callback forwarded to each inner ElementLayerAssembler.
BarrelEndcapAssembler && setAssembly (const Element &assembly) &&
 Set the top-level detector element whose subtree is searched for barrel and endcap elements.
BarrelEndcapAssembler && setEndcapAxes (AxisDefinition axes) &&
 Set the axis definition used for endcap layers only.
BarrelEndcapAssembler && setLayerFilter (const std::regex &pattern) &&
 Set the regex filter used to select individual layer elements within each barrel or endcap container.
BarrelEndcapAssembler && setSensorAxes (AxisDefinition barrel, AxisDefinition endcap) &&
 Set the axis definitions for both barrel and endcap layers at once.

Detailed Description

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

Fluent builder that assembles a combined barrel + endcap subdetector into a CylinderContainerBlueprintNode arranged along the Z axis.

Instances are obtained from BlueprintBuilder::barrelEndcap(). The builder inspects the subtree of the provided assembly element for barrel and endcap children (using the backend's isBarrel / isEndcap / isTracker predicates, when available) and delegates individual layer assembly to ElementLayerAssembler internally.

Typical usage:

builder.barrelEndcap()
.setAssembly(innerTrackerElement)
.setSensorAxes(barrelAxes, endcapAxes)
.setLayerFilter(layerPattern)
.addTo(rootNode);

This builder requires backend predicates that classify elements as barrel, endcap, and tracker components.

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::BarrelEndcapAssembler< 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.

◆ ElementLayerAssembler

template<detail::BlueprintBackend BackendT>
using Acts::Experimental::BarrelEndcapAssembler< BackendT >::ElementLayerAssembler
Initial value:
Fluent builder that assembles a flat collection of cylindrical or disc-like detector layers from laye...
Definition BlueprintBuilder.hpp:253

The ElementLayerAssembler specialisation for this backend.

Constructor & Destructor Documentation

◆ BarrelEndcapAssembler()

template<detail::BlueprintBackend BackendT>
Acts::Experimental::BarrelEndcapAssembler< BackendT >::BarrelEndcapAssembler ( const Builder & builder)
explicit

Construct a BarrelEndcapAssembler bound to builder.

Parameters
builderThe owning BlueprintBuilder; must outlive this object.

Member Function Documentation

◆ addTo()

template<detail::BlueprintBackend BackendT>
void Acts::Experimental::BarrelEndcapAssembler< 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.

◆ build()

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

Build and return the assembled barrel+endcap container node.

Locates barrel and endcap sub-elements inside the assembly, creates one ElementLayerAssembler -based barrel container and one or more endcap containers, then returns a Z-axis CylinderContainerBlueprintNode holding them all.

Exceptions
std::runtime_errorif the assembly element has not been set, if axes are required by the backend but not provided, if the layer filter has not been set, or if more than one barrel element is found inside the assembly.
Returns
Shared pointer to the assembled Z-axis container node.

◆ onContainer()

template<detail::BlueprintBackend BackendT>
template<typename CustomizerT>
requires (detail::ContainerNodeReturningCallable< Element, std::decay_t<CustomizerT>> || detail::ContainerNodeReplacingCallable<Element, std::decay_t<CustomizerT>>)
BarrelEndcapAssembler && Acts::Experimental::BarrelEndcapAssembler< BackendT >::onContainer ( CustomizerT customizer) &&
nodiscard

Register a callback invoked for each barrel or endcap container node.

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

Parameters
customizerCallback applied to each created barrel or endcap container node.
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>>)
BarrelEndcapAssembler && Acts::Experimental::BarrelEndcapAssembler< BackendT >::onLayer ( CustomizerT customizer) &&
nodiscard

Register a layer callback forwarded to each inner ElementLayerAssembler.

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).

◆ setAssembly()

template<detail::BlueprintBackend BackendT>
BarrelEndcapAssembler && Acts::Experimental::BarrelEndcapAssembler< BackendT >::setAssembly ( const Element & assembly) &&
nodiscard

Set the top-level detector element whose subtree is searched for barrel and endcap elements.

Parameters
assemblyRoot element of the barrel+endcap sub-detector.
Returns
*this (rvalue).

◆ setEndcapAxes()

template<detail::BlueprintBackend BackendT>
BarrelEndcapAssembler && Acts::Experimental::BarrelEndcapAssembler< BackendT >::setEndcapAxes ( AxisDefinition axes) &&
nodiscard

Set the axis definition used for endcap layers only.

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

Parameters
axesAxis definition forwarded to endcap ElementLayerAssembler s.
Returns
*this (rvalue).

◆ setLayerFilter()

template<detail::BlueprintBackend BackendT>
BarrelEndcapAssembler && Acts::Experimental::BarrelEndcapAssembler< BackendT >::setLayerFilter ( const std::regex & pattern) &&
nodiscard

Set the regex filter used to select individual layer elements within each barrel or endcap container.

Parameters
patternRegular expression matched against child element names.
Returns
*this (rvalue).

◆ setSensorAxes()

template<detail::BlueprintBackend BackendT>
BarrelEndcapAssembler && Acts::Experimental::BarrelEndcapAssembler< BackendT >::setSensorAxes ( AxisDefinition barrel,
AxisDefinition endcap ) &&
nodiscard

Set the axis definitions for both barrel and endcap layers at once.

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

Parameters
barrelAxis definition forwarded to barrel ElementLayerAssembler s.
endcapAxis definition forwarded to endcap ElementLayerAssembler s.
Returns
*this (rvalue).