#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=nullptr) | |
DualHistoAxis (unsigned nBins, double min, double max, const char *label=nullptr) | |
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 26 of file DualHistoAxis.h.
|
inline |
Definition at line 28 of file DualHistoAxis.h.
|
inline |
Definition at line 30 of file DualHistoAxis.h.
|
inline |
Definition at line 33 of file DualHistoAxis.h.
|
inlineprivate |
Definition at line 144 of file DualHistoAxis.h.
Referenced by read(), and rebin().
|
inline |
Definition at line 53 of file DualHistoAxis.h.
References a_, npstat::HistoAxis::binCenter(), npstat::NUHistoAxis::binCenter(), u_, and uniform_.
|
inline |
Definition at line 63 of file DualHistoAxis.h.
References a_, npstat::NUHistoAxis::binInterval(), npstat::HistoAxis::binInterval(), u_, and uniform_.
|
inline |
This method returns arbitrary integer bin number. Possible output depends on whether the axis is uniform or not.
Definition at line 87 of file DualHistoAxis.h.
References a_, npstat::NUHistoAxis::binNumber(), npstat::HistoAxis::binNumber(), u_, uniform_, and x.
Referenced by overflowIndex().
|
inline |
Definition at line 49 of file DualHistoAxis.h.
References a_, npstat::NUHistoAxis::binWidth(), npstat::HistoAxis::binWidth(), u_, and uniform_.
|
inline |
Definition at line 118 of file DualHistoAxis.h.
|
inlinestatic |
Definition at line 122 of file DualHistoAxis.h.
|
inline |
Return the closest valid bin number (above 0 and below nBins() )
Definition at line 98 of file DualHistoAxis.h.
References a_, npstat::HistoAxis::closestValidBin(), npstat::NUHistoAxis::closestValidBin(), u_, uniform_, and x.
|
inlinestaticprivate |
Definition at line 138 of file DualHistoAxis.h.
|
inline |
Floating point bin number given the coordinate. Useful for interpolation methods and such.
Definition at line 93 of file DualHistoAxis.h.
References a_, npstat::NUHistoAxis::fltBinNumber(), npstat::HistoAxis::fltBinNumber(), u_, uniform_, and x.
|
inline |
Definition at line 77 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 73 of file DualHistoAxis.h.
|
inline |
Definition at line 43 of file DualHistoAxis.h.
References a_, npstat::NUHistoAxis::interval(), npstat::HistoAxis::interval(), u_, and uniform_.
|
inline |
Comparison within given tolerance
Definition at line 107 of file DualHistoAxis.h.
References a_, npstat::NUHistoAxis::isClose(), npstat::HistoAxis::isClose(), u_, and uniform_.
|
inline |
|
inline |
Definition at line 51 of file DualHistoAxis.h.
References a_, npstat::NUHistoAxis::label(), npstat::HistoAxis::label(), u_, and uniform_.
Referenced by rebin().
|
inline |
Definition at line 55 of file DualHistoAxis.h.
References a_, npstat::NUHistoAxis::leftBinEdge(), npstat::HistoAxis::leftBinEdge(), u_, and uniform_.
|
inline |
Definition at line 45 of file DualHistoAxis.h.
References a_, npstat::NUHistoAxis::length(), npstat::HistoAxis::length(), u_, and uniform_.
|
inline |
Definition at line 41 of file DualHistoAxis.h.
References a_, npstat::NUHistoAxis::max(), npstat::HistoAxis::max(), u_, and uniform_.
Referenced by rebin().
|
inline |
Definition at line 39 of file DualHistoAxis.h.
References a_, npstat::NUHistoAxis::min(), npstat::HistoAxis::min(), u_, and uniform_.
Referenced by rebin().
|
inline |
Definition at line 47 of file DualHistoAxis.h.
References a_, npstat::NUHistoAxis::nBins(), npstat::HistoAxis::nBins(), u_, and uniform_.
|
inline |
Definition at line 104 of file DualHistoAxis.h.
|
inline |
|
inlineprivate |
Definition at line 134 of file DualHistoAxis.h.
References a_, binNumber(), npstat::NUHistoAxis::overflowIndex(), npstat::HistoAxis::overflowIndex(), u_, uniform_, and x.
|
static |
Definition at line 17 of file DualHistoAxis.cc.
References HltBtagPostValidation_cff::c, DualHistoAxis(), recoMuon::in, npstat::NUHistoAxis::read(), and npstat::HistoAxis::read().
Referenced by edmIntegrityCheck.PublishToFileSystem::get().
|
inline |
Return uniformly rebinned axis
Definition at line 112 of file DualHistoAxis.h.
References DualHistoAxis(), label(), max(), and min().
|
inline |
Definition at line 59 of file DualHistoAxis.h.
References a_, npstat::NUHistoAxis::rightBinEdge(), npstat::HistoAxis::rightBinEdge(), u_, and uniform_.
|
inline |
Modify the axis label
Definition at line 81 of file DualHistoAxis.h.
References a_, npstat::NUHistoAxis::setLabel(), npstat::HistoAxis::setLabel(), u_, and uniform_.
|
inlinestatic |
Definition at line 123 of file DualHistoAxis.h.
Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().
bool npstat::DualHistoAxis::write | ( | std::ostream & | of | ) | const |
Definition at line 8 of file DualHistoAxis.cc.
References a_, HltBtagPostValidation_cff::c, npstat::NUHistoAxis::classId(), npstat::HistoAxis::classId(), haddnano::of, u_, uniform_, npstat::NUHistoAxis::write(), and npstat::HistoAxis::write().
|
friend |
Definition at line 132 of file DualHistoAxis.h.
|
private |
Definition at line 127 of file DualHistoAxis.h.
Referenced by binCenter(), binInterval(), binNumber(), binWidth(), closestValidBin(), fltBinNumber(), getNUHistoAxis(), interval(), isClose(), label(), leftBinEdge(), length(), max(), min(), nBins(), operator==(), overflowIndex(), rightBinEdge(), setLabel(), and write().
|
private |
Definition at line 128 of file DualHistoAxis.h.
Referenced by binCenter(), binInterval(), binNumber(), binWidth(), closestValidBin(), fltBinNumber(), getHistoAxis(), interval(), isClose(), label(), leftBinEdge(), length(), max(), min(), nBins(), operator==(), overflowIndex(), rightBinEdge(), setLabel(), and write().
|
private |
Definition at line 129 of file DualHistoAxis.h.
Referenced by binCenter(), binInterval(), binNumber(), binWidth(), closestValidBin(), fltBinNumber(), getHistoAxis(), getNUHistoAxis(), interval(), isClose(), isUniform(), label(), leftBinEdge(), length(), max(), min(), nBins(), operator==(), overflowIndex(), rightBinEdge(), setLabel(), and write().