#include <DualHistoAxis.h>
Public Member Functions | |
double | binCenter (const int binNum) const |
Interval< double > | binInterval (const int binNum) const |
int | binNumber (const double x) const |
double | binWidth (const int binNum) const |
unsigned | closestValidBin (const double x) const |
DualHistoAxis (const NUHistoAxis &a) | |
DualHistoAxis (const HistoAxis &u) | |
DualHistoAxis (const std::vector< double > &binEdges, const char *label=0) | |
DualHistoAxis (unsigned nBins, double min, double max, const char *label=0) | |
double | fltBinNumber (const double x, const bool mapLeftEdgeTo0=true) const |
Interval< double > | interval () const |
bool | isClose (const DualHistoAxis &r, const double tol) const |
bool | isUniform () const |
const std::string & | label () const |
double | leftBinEdge (const int binNum) const |
double | length () const |
double | max () const |
double | min () const |
unsigned | nBins () const |
bool | operator!= (const DualHistoAxis &r) const |
bool | operator== (const DualHistoAxis &r) const |
DualHistoAxis | rebin (const unsigned newBins) const |
double | rightBinEdge (const int binNum) const |
void | setLabel (const char *newlabel) |
const NUHistoAxis * | getNUHistoAxis () const |
const HistoAxis * | getHistoAxis () const |
gs::ClassId | classId () const |
bool | write (std::ostream &of) const |
Static Public Member Functions | |
static const char * | classname () |
static DualHistoAxis * | read (const gs::ClassId &id, std::istream &in) |
static unsigned | version () |
Private Member Functions | |
DualHistoAxis () | |
unsigned | overflowIndex (const double x, unsigned *binNumber) const |
Static Private Member Functions | |
static std::vector< double > | dummy_vec () |
Private Attributes | |
NUHistoAxis | a_ |
HistoAxis | u_ |
bool | uniform_ |
Friends | |
template<typename Numeric , class Axis > | |
class | HistoND |
Histogram axis which can be either uniform or non-uniform. Will work a little bit slower than either HistoAxis or NUHistoAxis, but can be used in place of either one of them.
Definition at line 23 of file DualHistoAxis.h.
|
inline |
Definition at line 27 of file DualHistoAxis.h.
|
inline |
Definition at line 30 of file DualHistoAxis.h.
|
inline |
Definition at line 33 of file DualHistoAxis.h.
|
inline |
Definition at line 37 of file DualHistoAxis.h.
|
inlineprivate |
Definition at line 165 of file DualHistoAxis.h.
Referenced by read().
|
inline |
Definition at line 65 of file DualHistoAxis.h.
|
inline |
Definition at line 74 of file DualHistoAxis.h.
|
inline |
This method returns arbitrary integer bin number. Possible output depends on whether the axis is uniform or not.
Definition at line 98 of file DualHistoAxis.h.
|
inline |
Definition at line 59 of file DualHistoAxis.h.
|
inline |
Definition at line 136 of file DualHistoAxis.h.
|
inlinestatic |
Definition at line 140 of file DualHistoAxis.h.
|
inline |
Return the closest valid bin number (above 0 and below nBins() )
Definition at line 113 of file DualHistoAxis.h.
|
inlinestaticprivate |
Definition at line 158 of file DualHistoAxis.h.
|
inline |
Floating point bin number given the coordinate. Useful for interpolation methods and such.
Definition at line 105 of file DualHistoAxis.h.
|
inline |
Definition at line 86 of file DualHistoAxis.h.
|
inline |
Return a pointer to the underlying axis. This will be a null pointer if the axis does not correspond to the constructed type.
Definition at line 83 of file DualHistoAxis.h.
|
inline |
Definition at line 50 of file DualHistoAxis.h.
|
inline |
Comparison within given tolerance
Definition at line 123 of file DualHistoAxis.h.
|
inline |
Definition at line 42 of file DualHistoAxis.h.
|
inline |
Definition at line 62 of file DualHistoAxis.h.
|
inline |
Definition at line 68 of file DualHistoAxis.h.
|
inline |
Definition at line 53 of file DualHistoAxis.h.
|
inline |
Definition at line 47 of file DualHistoAxis.h.
|
inline |
Definition at line 44 of file DualHistoAxis.h.
|
inline |
Definition at line 56 of file DualHistoAxis.h.
|
inline |
Definition at line 119 of file DualHistoAxis.h.
|
inline |
Definition at line 116 of file DualHistoAxis.h.
|
inlineprivate |
Definition at line 151 of file DualHistoAxis.h.
|
static |
Definition at line 18 of file DualHistoAxis.cc.
References EnergyCorrector::c, DualHistoAxis(), npstat::NUHistoAxis::read(), and npstat::HistoAxis::read().
|
inline |
Return uniformly rebinned axis
Definition at line 131 of file DualHistoAxis.h.
|
inline |
Definition at line 71 of file DualHistoAxis.h.
|
inline |
Modify the axis label
Definition at line 91 of file DualHistoAxis.h.
|
inlinestatic |
Definition at line 141 of file DualHistoAxis.h.
bool npstat::DualHistoAxis::write | ( | std::ostream & | of | ) | const |
Definition at line 8 of file DualHistoAxis.cc.
References a_, EnergyCorrector::c, npstat::NUHistoAxis::classId(), npstat::HistoAxis::classId(), u_, uniform_, npstat::NUHistoAxis::write(), and npstat::HistoAxis::write().
|
friend |
Definition at line 149 of file DualHistoAxis.h.
|
private |
Definition at line 145 of file DualHistoAxis.h.
Referenced by write().
|
private |
Definition at line 146 of file DualHistoAxis.h.
Referenced by write().
|
private |
Definition at line 147 of file DualHistoAxis.h.
Referenced by write().