ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::MultiAxisSpec Class Reference

Specification of a multi-dimensional binning that builds the axes of a grid. More...

#include <Acts/Utilities/MultiAxisSpec.hpp>

Inheritance diagram for Acts::MultiAxisSpec:
[legend]

Public Types

using Options = std::vector<AxisSpec::Options>
 Consumer supplied inputs, one AxisSpec::Options per axis, in axis order.

Public Member Functions

 MultiAxisSpec (const MultiAxisSpec &other)=default
 Copy constructor.
 MultiAxisSpec (MultiAxisSpec &&other) noexcept=default
 Move constructor.
 MultiAxisSpec (std::vector< AxisSpec > axisSpecs)
 Construct from one axis spec per dimension.
const AxisSpecaxisSpec (std::size_t i) const
 Get the axis spec at the given dimension.
std::span< const AxisSpecaxisSpecs () const
 Get all axis specs.
std::unique_ptr< IMultiAxisbuildMultiAxis (const Options &options={}) const
 Build a multi-axis, one option set per axis or none at all.
bool isDeferred () const
 Check if any of the contained specs is deferred, i.e.
MultiAxisSpecoperator= (const MultiAxisSpec &other)=default
 Copy assignment.
MultiAxisSpecoperator= (MultiAxisSpec &&other) noexcept=default
 Move assignment.
std::size_t size () const
 Get the number of axes spanning the grid.
std::string toString () const
 Get a string representation of this spec.

Protected Member Functions

std::unique_ptr< IMultiAxisbuildMultiAxisImpl (std::span< const AxisSpec::Options > options) const
 Build a multi-axis from a view onto the option sets.

Detailed Description

Specification of a multi-dimensional binning that builds the axes of a grid.

Bundles one AxisSpec per grid dimension, mirroring the IMultiAxis / IMultiAxisXD split: the dimension is known at runtime here and at compile time in the derived MultiAxisSpecXD . Unlike IMultiAxis this is a value type and can be held by configuration objects.

The build API mirrors AxisSpec : fully specified specs build without input, deferred ones need one AxisSpec::Options per axis, in storage order.

Constructor & Destructor Documentation

◆ MultiAxisSpec() [1/3]

Acts::MultiAxisSpec::MultiAxisSpec ( std::vector< AxisSpec > axisSpecs)
explicit

Construct from one axis spec per dimension.

Parameters
axisSpecsthe axis specs, in axis order
Exceptions
std::invalid_argumentif no axis spec is given

◆ MultiAxisSpec() [2/3]

Acts::MultiAxisSpec::MultiAxisSpec ( const MultiAxisSpec & other)
default

Copy constructor.

Parameters
otherthe spec to copy from

◆ MultiAxisSpec() [3/3]

Acts::MultiAxisSpec::MultiAxisSpec ( MultiAxisSpec && other)
defaultnoexcept

Move constructor.

Parameters
otherthe spec to move from

Member Function Documentation

◆ axisSpec()

const AxisSpec & Acts::MultiAxisSpec::axisSpec ( std::size_t i) const

Get the axis spec at the given dimension.

Parameters
iindex of the axis
Returns
const reference to the requested axis spec

◆ axisSpecs()

std::span< const AxisSpec > Acts::MultiAxisSpec::axisSpecs ( ) const

Get all axis specs.

Returns
view onto the axis specs, in axis order

◆ buildMultiAxis()

std::unique_ptr< IMultiAxis > Acts::MultiAxisSpec::buildMultiAxis ( const Options & options = {}) const

Build a multi-axis, one option set per axis or none at all.

Parameters
optionsone option set per axis, in axis order, or empty
Exceptions
std::domain_errorif a property is given by neither side, or the dimension exceeds the supported maximum of 3
std::invalid_argumentif the number of option sets is neither zero nor the number of axes, or a property mismatches
Returns
the created multi-axis

◆ buildMultiAxisImpl()

std::unique_ptr< IMultiAxis > Acts::MultiAxisSpec::buildMultiAxisImpl ( std::span< const AxisSpec::Options > options) const
protected

Build a multi-axis from a view onto the option sets.

Parameters
optionsone option set per axis, in axis order, or empty
Returns
the created multi-axis

◆ isDeferred()

bool Acts::MultiAxisSpec::isDeferred ( ) const

Check if any of the contained specs is deferred, i.e.

requires consumer supplied options to produce axes

Returns
true if any axis spec is deferred

◆ operator=() [1/2]

MultiAxisSpec & Acts::MultiAxisSpec::operator= ( const MultiAxisSpec & other)
default

Copy assignment.

Parameters
otherthe spec to copy from
Returns
reference to this

◆ operator=() [2/2]

MultiAxisSpec & Acts::MultiAxisSpec::operator= ( MultiAxisSpec && other)
defaultnoexcept

Move assignment.

Parameters
otherthe spec to move from
Returns
reference to this

◆ size()

std::size_t Acts::MultiAxisSpec::size ( ) const

Get the number of axes spanning the grid.

Returns
number of axes (i.e. the dimension of the grid)

◆ toString()

std::string Acts::MultiAxisSpec::toString ( ) const

Get a string representation of this spec.

Returns
the string representation