#include <NUHistoAxis.hh>
|
| NUHistoAxis (const std::vector< double > &binEdges, const char *label=0) |
|
double | min () const |
|
double | max () const |
|
Interval< double > | interval () const |
|
double | length () const |
|
unsigned | nBins () const |
|
double | binWidth (const int binNum) const |
|
const std::string & | label () const |
|
bool | isUniform () const |
|
double | leftBinEdge (const int binNum) const |
|
double | rightBinEdge (const int binNum) const |
|
double | binCenter (const int binNum) const |
|
Interval< double > | binInterval (const int binNum) const |
|
void | setLabel (const char *newlabel) |
|
int | binNumber (double x) const |
|
double | fltBinNumber (double x, bool mapLeftEdgeTo0=true) const |
|
unsigned | closestValidBin (double x) const |
|
bool | operator== (const NUHistoAxis &) const |
|
bool | operator!= (const NUHistoAxis &) const |
|
bool | isClose (const NUHistoAxis &, double tol) const |
|
NUHistoAxis | rebin (unsigned newBins) const |
|
gs::ClassId | classId () const |
|
bool | write (std::ostream &of) const |
|
|
static const char * | classname () |
|
static unsigned | version () |
|
static NUHistoAxis * | read (const gs::ClassId &id, std::istream &in) |
|
|
template<typename Numeric , class Axis > |
class | HistoND |
|
class | DualHistoAxis |
|
This class can be used to create histograms with non-uniform binning
◆ NUHistoAxis()
npstat::NUHistoAxis::NUHistoAxis |
( |
const std::vector< double > & |
binEdges, |
|
|
const char * |
label = 0 |
|
) |
| |
The number of bin edges provided must be at least 2. Edge coordinates will be sorted internally in the increasing order. The number of bins will be less by 1 than the number of edges.
◆ binCenter()
double npstat::NUHistoAxis::binCenter |
( |
const int |
binNum | ) |
const |
|
inline |
Return the coordinate of the given bin center
◆ binInterval()
Interval<double> npstat::NUHistoAxis::binInterval |
( |
const int |
binNum | ) |
const |
|
inline |
Return the coordinate interval occupied by the given bin
◆ binNumber()
int npstat::NUHistoAxis::binNumber |
( |
double |
x | ) |
const |
This method returns -1 for values below the lower limit and "nBins()" for values equal to or above the upper limit
◆ classId()
gs::ClassId npstat::NUHistoAxis::classId |
( |
| ) |
const |
|
inline |
Method related to "geners" I/O
◆ closestValidBin()
unsigned npstat::NUHistoAxis::closestValidBin |
( |
double |
x | ) |
const |
This method returns the closest valid bin number (>= 0 and below nBins() )
◆ fltBinNumber()
double npstat::NUHistoAxis::fltBinNumber |
( |
double |
x, |
|
|
bool |
mapLeftEdgeTo0 = true |
|
) |
| const |
Floating point bin number given the coordinate. Useful for interpolation methods and such.
◆ isClose()
bool npstat::NUHistoAxis::isClose |
( |
const NUHistoAxis & |
, |
|
|
double |
tol |
|
) |
| const |
Comparison of axis coordinates within given tolerance
◆ leftBinEdge()
double npstat::NUHistoAxis::leftBinEdge |
( |
const int |
binNum | ) |
const |
|
inline |
Return the coordinate of the given bin left edge
◆ min()
double npstat::NUHistoAxis::min |
( |
| ) |
const |
|
inline |
◆ rebin()
NUHistoAxis npstat::NUHistoAxis::rebin |
( |
unsigned |
newBins | ) |
const |
Return uniformly rebinned axis
◆ rightBinEdge()
double npstat::NUHistoAxis::rightBinEdge |
( |
const int |
binNum | ) |
const |
|
inline |
Return the coordinate of the given bin right edge
◆ setLabel()
void npstat::NUHistoAxis::setLabel |
( |
const char * |
newlabel | ) |
|
|
inline |
The documentation for this class was generated from the following file: