![]() |
EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
calculate bin indices for an equidistant binning More...
#include <acts/blob/sPHENIX/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 103 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 103 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 113 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 113 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 284 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 284 of file Axis.hpp
|
inline |
|
inlineoverridevirtual |
Return a vector of bin edges.
Implements Acts::IAxis.
Definition at line 358 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 358 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 303 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 303 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 317 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 317 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 132 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 132 of file Axis.hpp
|
inlineoverridevirtual |
get maximum of binning range
Implements Acts::IAxis.
Definition at line 335 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 335 of file Axis.hpp
|
inlineoverridevirtual |
get minimum of binning range
Implements Acts::IAxis.
Definition at line 340 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 340 of file Axis.hpp
|
inlineoverridevirtual |
get total number of bins
Implements Acts::IAxis.
Definition at line 345 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 345 of file Axis.hpp
|
inlineoverridevirtual |
returns whether the axis is equidistant
Implements Acts::IAxis.
Definition at line 122 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 122 of file Axis.hpp
|
inline |
check whether value is inside axis limits
true
if 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 354 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 354 of file Axis.hpp
|
inlineoverridevirtual |
returns whether the axis is variable
Implements Acts::IAxis.
Definition at line 127 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 127 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 141 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 141 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 157 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 157 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 178 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 178 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 202 of file Axis.hpp.
View newest version in sPHENIX GitHub at line 202 of file Axis.hpp
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |