ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
calculate bin indices for an equidistant binning More...
#include <acts/blob/master/Core/include/Acts/Utilities/detail/Axis.hpp>
Public Member Functions | |
Axis (double xmin, double xmax, size_t nBins) | |
default constructor | |
bool | isEquidistant () const override |
returns whether the axis is equidistant | |
bool | isVariable () const override |
returns whether the axis is variable | |
AxisBoundaryType | getBoundaryType () const override |
returns the boundary type set in the template param | |
NeighborHoodIndices | neighborHoodIndices (size_t idx, size_t size=1) const |
Get #size bins which neighbor the one given. | |
template<AxisBoundaryType T = bdt, std::enable_if_t< T==AxisBoundaryType::Open, int > = 0> | |
NeighborHoodIndices | neighborHoodIndices (size_t idx, std::pair< size_t, size_t > sizes={1, 1}) const |
Get #size bins which neighbor the one given. | |
template<AxisBoundaryType T = bdt, std::enable_if_t< T==AxisBoundaryType::Bound, int > = 0> | |
NeighborHoodIndices | neighborHoodIndices (size_t idx, std::pair< size_t, size_t > sizes={1, 1}) const |
Get #size bins which neighbor the one given. | |
template<AxisBoundaryType T = bdt, std::enable_if_t< T==AxisBoundaryType::Closed, int > = 0> | |
NeighborHoodIndices | neighborHoodIndices (size_t idx, std::pair< size_t, size_t > sizes={1, 1}) const |
Get #size bins which neighbor the one given. | |
template<AxisBoundaryType T = bdt, std::enable_if_t< T==AxisBoundaryType::Open, int > = 0> | |
size_t | wrapBin (int bin) const |
Converts bin index into a valid one for this axis. | |
template<AxisBoundaryType T = bdt, std::enable_if_t< T==AxisBoundaryType::Bound, int > = 0> | |
size_t | wrapBin (int bin) const |
Converts bin index into a valid one for this axis. | |
template<AxisBoundaryType T = bdt, std::enable_if_t< T==AxisBoundaryType::Closed, int > = 0> | |
size_t | wrapBin (int bin) const |
Converts bin index into a valid one for this axis. | |
size_t | getBin (double x) const |
get corresponding bin index for given coordinate | |
double | getBinWidth (size_t=0) const |
get bin width | |
double | getBinLowerBound (size_t bin) const |
get lower bound of bin | |
double | getBinUpperBound (size_t bin) const |
get upper bound of bin | |
double | getBinCenter (size_t bin) const |
get bin center | |
double | getMax () const override |
get maximum of binning range | |
double | getMin () const override |
get minimum of binning range | |
size_t | getNBins () const override |
get total number of bins | |
bool | isInside (double x) const |
check whether value is inside axis limits | |
std::vector< double > | getBinEdges () const override |
Return a vector of bin edges. | |
Private Attributes | |
double | m_min |
minimum of binning range | |
double | m_max |
maximum of binning range | |
double | m_width |
constant bin width | |
size_t | m_bins |
number of bins (excluding under-/overflow bins) | |
calculate bin indices for an equidistant binning
This class provides some basic functionality for calculating bin indices for a given equidistant binning.
Definition at line 102 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 102 of file Axis.hpp
|
inline |
default constructor
[in] | xmin | lower boundary of axis range |
[in] | xmax | upper boundary of axis range |
[in] | nBins | number of bins to divide the axis range into |
Divide the range into equidistant bins.
Definition at line 112 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 112 of file Axis.hpp
|
inline |
get corresponding bin index for given coordinate
[in] | x | input coordinate |
x
lies within a bin with lower bound l
and upper bound u
. 1
. The underflow bin has the index 0
while the index nBins + 1
indicates the overflow bin . Definition at line 283 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 283 of file Axis.hpp
|
inline |
|
inlineoverridevirtual |
Return a vector of bin edges.
Implements Acts::IAxis.
Definition at line 357 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 357 of file Axis.hpp
|
inline |
get lower bound of bin
[in] | bin | index of bin |
bin
must be a valid bin index (excluding the underflow bin), i.e. Definition at line 302 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 302 of file Axis.hpp
|
inline |
get upper bound of bin
[in] | bin | index of bin |
bin
must be a valid bin index (excluding the overflow bin), i.e. Definition at line 316 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 316 of file Axis.hpp
|
inline |
|
inlineoverridevirtual |
returns the boundary type set in the template param
AxisBoundaryType
of this axis Implements Acts::IAxis.
Definition at line 131 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 131 of file Axis.hpp
|
inlineoverridevirtual |
get maximum of binning range
Implements Acts::IAxis.
Definition at line 334 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 334 of file Axis.hpp
|
inlineoverridevirtual |
get minimum of binning range
Implements Acts::IAxis.
Definition at line 339 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 339 of file Axis.hpp
|
inlineoverridevirtual |
get total number of bins
Implements Acts::IAxis.
Definition at line 344 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 344 of file Axis.hpp
|
inlineoverridevirtual |
returns whether the axis is equidistant
Implements Acts::IAxis.
Definition at line 121 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 121 of file Axis.hpp
|
inline |
check whether value is inside axis limits
true
if , otherwise false
true
is returned, the bin containing the given value is a valid bin, i.e. it is neither the underflow nor the overflow bin. Definition at line 353 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 353 of file Axis.hpp
|
inlineoverridevirtual |
returns whether the axis is variable
Implements Acts::IAxis.
Definition at line 126 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 126 of file Axis.hpp
|
inline |
Get #size bins which neighbor the one given.
Generic overload with symmetric size
[in] | idx | requested bin index |
[in] | sizes | how many neighboring bins (up/down) |
Definition at line 140 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 140 of file Axis.hpp
|
inline |
Get #size bins which neighbor the one given.
This is the version for Open
[in] | idx | requested bin index |
[in] | sizes | how many neighboring bins (up/down) |
Definition at line 156 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 156 of file Axis.hpp
|
inline |
Get #size bins which neighbor the one given.
This is the version for Bound
[in] | idx | requested bin index |
[in] | sizes | how many neighboring bins (up/down) |
Definition at line 177 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 177 of file Axis.hpp
|
inline |
Get #size bins which neighbor the one given.
This is the version for Closed
[in] | idx | requested bin index |
[in] | sizes | how many neighboring bins (up/down) |
Definition at line 201 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 201 of file Axis.hpp
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |