Data structure holding binning information. More...
#include <BinningSpecs.h>
Public Member Functions | |
| BinningSpecs (double lower, double upper, double width) | |
| Constructor: all fields specified, no adjustment performed. More... | |
Access to binning specifications | |
| double | lower () const |
| Returns the value of the lower end of the first bin. More... | |
| double | upper () const |
| Returns the value of the upper end of the last bin. More... | |
| double | range () const |
| Returns the full range covered by the binning. More... | |
| unsigned long | nBins () const |
| Returns the number of bins. More... | |
| double | binWidth () const |
| Returns the width of the bins (all bins have the same width). More... | |
Access to bins | |
| int | binWith (double value) const |
| std::pair< double, double > | binBorders (int iBin) const |
| Returns the lower and upper borders of the bin with the specified index. More... | |
Static Public Member Functions | |
| static unsigned long | NBinsFor (double lower, double upper, double width) |
| Returns a number of bins large enough to cover the specified range. More... | |
Private Attributes | |
| double | fLower { 0.0 } |
| Lower range limit. More... | |
| double | fWidth { 0.0 } |
| Width of all bins. More... | |
| unsigned long | fNBins { 0UL } |
| Number of bins. More... | |
| double | fUpper { 0.0 } |
| Upper range limit. More... | |
Data structure holding binning information.
The binning is at fixed bin size.
Nothing fancy so far.
Functions like icarus::ns::util::makeBinningFromBinWidth() and icarus::ns::util::makeBinningFromNBins() are the recommended way to create a BinningSpecs object.
Definition at line 170 of file BinningSpecs.h.
| icarus::ns::util::BinningSpecs::BinningSpecs | ( | double | lower, |
| double | upper, | ||
| double | width | ||
| ) |
Constructor: all fields specified, no adjustment performed.
Definition at line 44 of file BinningSpecs.cxx.
| std::pair< double, double > icarus::ns::util::BinningSpecs::binBorders | ( | int | iBin | ) | const |
Returns the lower and upper borders of the bin with the specified index.
Definition at line 64 of file BinningSpecs.cxx.
|
inline |
Returns the width of the bins (all bins have the same width).
Definition at line 199 of file BinningSpecs.h.
| int icarus::ns::util::BinningSpecs::binWith | ( | double | value | ) | const |
Returns the index of the bin with the specified value (bin of lower() is 0, bin of upper() is nBins()).
Definition at line 58 of file BinningSpecs.cxx.
|
inline |
Returns the value of the lower end of the first bin.
Definition at line 187 of file BinningSpecs.h.
|
inline |
Returns the number of bins.
Definition at line 196 of file BinningSpecs.h.
|
static |
Returns a number of bins large enough to cover the specified range.
Definition at line 73 of file BinningSpecs.cxx.
|
inline |
Returns the full range covered by the binning.
Definition at line 193 of file BinningSpecs.h.
|
inline |
Returns the value of the upper end of the last bin.
Definition at line 190 of file BinningSpecs.h.
|
private |
Lower range limit.
Definition at line 172 of file BinningSpecs.h.
|
private |
Number of bins.
Definition at line 174 of file BinningSpecs.h.
|
private |
Upper range limit.
Definition at line 175 of file BinningSpecs.h.
|
private |
Width of all bins.
Definition at line 173 of file BinningSpecs.h.
1.8.5