|
ACTS
Experiment-independent tracking
|
Common base class for all Axis instance. More...
#include <Acts/Utilities/IAxis.hpp>
Public Member Functions | |
| IAxis (std::optional< AxisDirection > direction) | |
| Constructs a new axis with the given direction. | |
| virtual std::size_t | getBin (double x) const =0 |
| Get corresponding bin index for given coordinate. | |
| virtual std::vector< double > | getBinEdges () const =0 |
| Returns a vector of bin edges. | |
| virtual AxisBoundaryType | getBoundaryType () const =0 |
| Returns the boundary type set in the template param. | |
| std::optional< AxisDirection > | getDirection () const |
| Returns the direction of the axis. | |
| virtual double | getMax () const =0 |
| Get maximum of binning range. | |
| virtual double | getMin () const =0 |
| Get minimum of binning range. | |
| virtual std::size_t | getNBins () const =0 |
| Get total number of bins. | |
| virtual AxisType | getType () const =0 |
| Returns the type of the axis. | |
| virtual bool | isEquidistant () const =0 |
| Returns whether the axis is equidistant. | |
| virtual bool | isVariable () const =0 |
| Returns whether the axis is variable. | |
| template<typename callable_t> | |
| decltype(auto) | visit (const callable_t &callable) const |
Helper function that dispatches from the IAxis base class to a concrete axis type. | |
Static Public Member Functions | |
| static std::unique_ptr< IAxis > | createEquidistant (AxisBoundaryType aBoundaryType, double min, double max, std::size_t nbins, std::optional< AxisDirection > direction=std::nullopt) |
| Centralized axis factory for equidistant binning. | |
| static std::unique_ptr< IAxis > | createVariable (AxisBoundaryType aBoundaryType, const std::vector< double > &edges, std::optional< AxisDirection > direction=std::nullopt) |
| Centralized axis factory for variable binning. | |
Protected Member Functions | |
| virtual void | toStream (std::ostream &os) const =0 |
| Dispatch to the correct stream operator. | |
Common base class for all Axis instance.
This allows generice handling such as for inspection.
|
explicit |
Constructs a new axis with the given direction.
| direction | the optional direction of the axis |
|
static |
Centralized axis factory for equidistant binning.
| aBoundaryType | the axis boundary type |
| min | the minimum edge of the axis |
| max | the maximum edge of the axis |
| nbins | the number of bins |
| direction | the optional direction of the axis |
| std::invalid_argument | if min >= max or nbins == 0 |
|
static |
Centralized axis factory for variable binning.
| aBoundaryType | the axis boundary type |
| edges | are the bin edges |
| direction | the optional direction of the axis |
| std::invalid_argument | if edges is empty or not strictly increasing |
|
pure virtual |
Get corresponding bin index for given coordinate.
| [in] | x | input coordinate |
1. The underflow bin has the index 0 while the index nBins + 1 indicates the overflow bin . Implemented in Acts::Axis< AxisType::Equidistant, bdt >, and Acts::Axis< AxisType::Variable, bdt >.
|
pure virtual |
Returns a vector of bin edges.
Implemented in Acts::Axis< AxisType::Equidistant, bdt >, and Acts::Axis< AxisType::Variable, bdt >.
|
pure virtual |
Returns the boundary type set in the template param.
AxisBoundaryType of this axis Implemented in Acts::Axis< AxisType::Equidistant, bdt >, and Acts::Axis< AxisType::Variable, bdt >.
| std::optional< AxisDirection > Acts::IAxis::getDirection | ( | ) | const |
Returns the direction of the axis.
AxisDirection of this axis
|
pure virtual |
Get maximum of binning range.
Implemented in Acts::Axis< AxisType::Equidistant, bdt >, and Acts::Axis< AxisType::Variable, bdt >.
|
pure virtual |
Get minimum of binning range.
Implemented in Acts::Axis< AxisType::Equidistant, bdt >, and Acts::Axis< AxisType::Variable, bdt >.
|
pure virtual |
Get total number of bins.
Implemented in Acts::Axis< AxisType::Equidistant, bdt >, and Acts::Axis< AxisType::Variable, bdt >.
|
pure virtual |
Returns the type of the axis.
AxisType of this axis Implemented in Acts::Axis< AxisType::Equidistant, bdt >, and Acts::Axis< AxisType::Variable, bdt >.
|
pure virtual |
Returns whether the axis is equidistant.
Implemented in Acts::Axis< AxisType::Equidistant, bdt >, and Acts::Axis< AxisType::Variable, bdt >.
|
pure virtual |
Returns whether the axis is variable.
Implemented in Acts::Axis< AxisType::Equidistant, bdt >, and Acts::Axis< AxisType::Variable, bdt >.
|
protectedpure virtual |
Dispatch to the correct stream operator.
| os | output stream |
Implemented in Acts::Axis< AxisType::Equidistant, bdt >, and Acts::Axis< AxisType::Variable, bdt >.
| decltype(auto) Acts::IAxis::visit | ( | const callable_t & | callable | ) | const |
Helper function that dispatches from the IAxis base class to a concrete axis type.
It will call the provided callable with a const reference to the concrete axis type.
| callable_t | the callable type |
| callable | the callable object |