EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
calculate bin indices for a variable binning More...
#include <acts/blob/sPHENIX/Core/include/Acts/Utilities/detail/Axis.hpp>
Public Member Functions | |
Axis (std::vector< double > binEdges) | |
default constructor | |
bool | isEquidistant () const override |
returns whether the axis is equidistante | |
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 bin) 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 | |
std::vector< double > | m_binEdges |
vector of bin edges (sorted in ascending order) | |
calculate bin indices for a variable binning
This class provides some basic functionality for calculating bin indices for a given binning with variable bin sizes.
Definition at line 383 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 383 of file Axis.hpp
|
inline |
default constructor
[in] | binEdges | vector of bin edges |
binEdges
must be strictly sorted in ascending order. binEdges
must contain at least two entries.Create a binning structure with nBins
variable-sized bins from the given bin boundaries. nBins
is given by the number of bin edges reduced by one.
Definition at line 394 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 394 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 561 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 561 of file Axis.hpp
References it.
|
inline |
|
inlineoverridevirtual |
Return a vector of bin edges.
Implements Acts::IAxis.
Definition at line 641 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 641 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 588 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 588 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 600 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 600 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 409 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 409 of file Axis.hpp
|
inlineoverridevirtual |
get maximum of binning range
Implements Acts::IAxis.
Definition at line 616 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 616 of file Axis.hpp
|
inlineoverridevirtual |
get minimum of binning range
Implements Acts::IAxis.
Definition at line 621 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 621 of file Axis.hpp
|
inlineoverridevirtual |
get total number of bins
Implements Acts::IAxis.
Definition at line 626 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 626 of file Axis.hpp
|
inlineoverridevirtual |
returns whether the axis is equidistante
Implements Acts::IAxis.
Definition at line 399 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 399 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 635 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 635 of file Axis.hpp
References x.
|
inlineoverridevirtual |
returns whether the axis is variable
Implements Acts::IAxis.
Definition at line 404 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 404 of file Axis.hpp
|
inline |
Get #size bins which neighbor the one given.
Generic overload with symmetric size
[in] | idx | requested bin index |
[in] | size | how many neighboring bins |
Definition at line 418 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 418 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 434 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 434 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 455 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 455 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 479 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 479 of file Axis.hpp
|
inline |
|
inline |
|
inline |
|
private |