CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Protected Attributes
PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t > Class Template Reference

#include <Histogram2D.h>

Public Types

typedef Range< AxisX_t > RangeX
 
typedef Range< AxisY_t > RangeY
 

Public Member Functions

int bin2D (int binX, int binY) const
 
Value_t binContent (int bin) const
 
Value_t binContent (int binX, int binY) const
 
Value_t binError (int bin) const
 
Value_t binError (int binX, int binY) const
 
std::pair< RangeX, RangeYbinRange (int bin) const
 
std::pair< RangeX, RangeYbinRange (int binX, int binY) const
 
RangeX binRangeX (int binX) const
 
RangeY binRangeY (int binY) const
 
bool empty () const
 
Value_t error (AxisX_t x, AxisY_t y) const
 
void fill (AxisX_t x, AxisY_t y, Value_t weight=1.0)
 
int findBin (AxisX_t x, AxisY_t y) const
 
int findBinX (AxisX_t x) const
 
int findBinY (AxisY_t y) const
 
bool hasEquidistantBinsX () const
 
bool hasEquidistantBinsY () const
 
 Histogram2D ()
 
 Histogram2D (const Histogram2D &orig)
 
template<typename OValue_t , typename OAxisX_t , typename OAxisY_t >
 Histogram2D (const Histogram2D< OValue_t, OAxisX_t, OAxisY_t > &orig)
 
 Histogram2D (const std::vector< AxisX_t > &binULimitsX, const std::vector< AxisY_t > &binULimitsY)
 
template<typename OAxisX_t , typename OAxisY_t >
 Histogram2D (const std::vector< OAxisX_t > &binULimitsX, const std::vector< OAxisY_t > &binULimitsY)
 
template<typename OAxisX_t , typename OAxisY_t >
 Histogram2D (const std::vector< OAxisX_t > &binULimitsX, unsigned int nBinsY, const PhysicsTools::Calibration::Range< OAxisY_t > &rangeY)
 
template<typename OAxisX_t , typename OAxisY_t >
 Histogram2D (unsigned int nBinsX, const PhysicsTools::Calibration::Range< OAxisX_t > &rangeX, const std::vector< OAxisY_t > &binULimitsY)
 
template<typename OAxisX_t , typename OAxisY_t >
 Histogram2D (unsigned int nBinsX, const PhysicsTools::Calibration::Range< OAxisX_t > &rangeX, unsigned int nBinsY, const PhysicsTools::Calibration::Range< OAxisY_t > &rangeY)
 
 Histogram2D (unsigned int nBinsX, AxisX_t minX, AxisX_t maxX, unsigned int nBinsY, AxisY_t minY, AxisY_t maxY)
 
Value_t normalization () const
 
Value_t normalizationX (int binY) const
 
Value_t normalizationY (int binX) const
 
Value_t normalizedError (AxisX_t x, AxisY_t y) const
 
Value_t normalizedValue (AxisX_t x, AxisY_t y) const
 
Value_t normalizedXError (AxisX_t x, AxisY_t y) const
 
Value_t normalizedXValue (AxisX_t x, AxisY_t y) const
 
Value_t normalizedYError (AxisX_t x, AxisY_t y) const
 
Value_t normalizedYValue (AxisX_t x, AxisY_t y) const
 
int numberOfBins () const
 
int numberOfBinsX () const
 
int numberOfBinsY () const
 
Histogram2Doperator= (const Histogram2D &orig)
 
template<typename OValue_t , typename OAxisX_t , typename OAxisY_t >
Histogram2Doperator= (const Histogram2D< OValue_t, OAxisX_t, OAxisY_t > &orig)
 
RangeX rangeX () const
 
RangeY rangeY () const
 
void reset ()
 
void setBinContent (int bin, Value_t value)
 
void setBinContent (int binX, int binY, Value_t value)
 
void setValues (const std::vector< Value_t > &values)
 
template<typename OValue_t >
void setValues (const std::vector< OValue_t > &values)
 
const std::vector< AxisX_t > upperLimitsX () const
 
const std::vector< AxisY_t > upperLimitsY () const
 
Value_t value (AxisX_t x, AxisY_t y) const
 
const std::vector< Value_t > & values () const
 
 ~Histogram2D ()
 

Protected Attributes

std::vector< AxisX_t > binULimitsX
 
std::vector< AxisY_t > binULimitsY
 
std::vector< Value_t > binValues
 
 COND_SERIALIZABLE
 
Value_t total COND_TRANSIENT
 
std::atomic< bool > totalValid COND_TRANSIENT
 
std::vector< Value_t > rowTotal COND_TRANSIENT
 
std::vector< Value_t > columnTotal COND_TRANSIENT
 
RangeX limitsX
 
RangeY limitsY
 
unsigned int stride
 

Detailed Description

template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
class PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >

Definition at line 21 of file Histogram2D.h.

Member Typedef Documentation

template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
typedef Range<AxisX_t> PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::RangeX

Definition at line 23 of file Histogram2D.h.

template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
typedef Range<AxisY_t> PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::RangeY

Definition at line 24 of file Histogram2D.h.

Constructor & Destructor Documentation

template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::Histogram2D ( )
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::Histogram2D ( const Histogram2D< Value_t, AxisX_t, AxisY_t > &  orig)
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
template<typename OValue_t , typename OAxisX_t , typename OAxisY_t >
PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::Histogram2D ( const Histogram2D< OValue_t, OAxisX_t, OAxisY_t > &  orig)
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::Histogram2D ( const std::vector< AxisX_t > &  binULimitsX,
const std::vector< AxisY_t > &  binULimitsY 
)
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
template<typename OAxisX_t , typename OAxisY_t >
PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::Histogram2D ( const std::vector< OAxisX_t > &  binULimitsX,
const std::vector< OAxisY_t > &  binULimitsY 
)
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
template<typename OAxisX_t , typename OAxisY_t >
PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::Histogram2D ( const std::vector< OAxisX_t > &  binULimitsX,
unsigned int  nBinsY,
const PhysicsTools::Calibration::Range< OAxisY_t > &  rangeY 
)
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
template<typename OAxisX_t , typename OAxisY_t >
PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::Histogram2D ( unsigned int  nBinsX,
const PhysicsTools::Calibration::Range< OAxisX_t > &  rangeX,
const std::vector< OAxisY_t > &  binULimitsY 
)
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
template<typename OAxisX_t , typename OAxisY_t >
PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::Histogram2D ( unsigned int  nBinsX,
const PhysicsTools::Calibration::Range< OAxisX_t > &  rangeX,
unsigned int  nBinsY,
const PhysicsTools::Calibration::Range< OAxisY_t > &  rangeY 
)
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::Histogram2D ( unsigned int  nBinsX,
AxisX_t  minX,
AxisX_t  maxX,
unsigned int  nBinsY,
AxisY_t  minY,
AxisY_t  maxY 
)
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::~Histogram2D ( )

Member Function Documentation

template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
int PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::bin2D ( int  binX,
int  binY 
) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
Value_t PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::binContent ( int  bin) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
Value_t PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::binContent ( int  binX,
int  binY 
) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
Value_t PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::binError ( int  bin) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
Value_t PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::binError ( int  binX,
int  binY 
) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
std::pair<RangeX, RangeY> PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::binRange ( int  bin) const
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
std::pair<RangeX, RangeY> PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::binRange ( int  binX,
int  binY 
) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
RangeX PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::binRangeX ( int  binX) const
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
RangeY PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::binRangeY ( int  binY) const
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
bool PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::empty ( ) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
Value_t PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::error ( AxisX_t  x,
AxisY_t  y 
) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
void PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::fill ( AxisX_t  x,
AxisY_t  y,
Value_t  weight = 1.0 
)
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
int PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::findBin ( AxisX_t  x,
AxisY_t  y 
) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
int PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::findBinX ( AxisX_t  x) const
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
int PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::findBinY ( AxisY_t  y) const
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
bool PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::hasEquidistantBinsX ( ) const
inline

Definition at line 101 of file Histogram2D.h.

References PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::binULimitsX.

101 { return binULimitsX.empty(); }
std::vector< AxisX_t > binULimitsX
Definition: Histogram2D.h:134
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
bool PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::hasEquidistantBinsY ( ) const
inline

Definition at line 102 of file Histogram2D.h.

References PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::binULimitsY.

102 { return binULimitsY.empty(); }
std::vector< AxisY_t > binULimitsY
Definition: Histogram2D.h:135
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
Value_t PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::normalization ( ) const
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
Value_t PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::normalizationX ( int  binY) const
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
Value_t PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::normalizationY ( int  binX) const
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
Value_t PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::normalizedError ( AxisX_t  x,
AxisY_t  y 
) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
Value_t PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::normalizedValue ( AxisX_t  x,
AxisY_t  y 
) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
Value_t PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::normalizedXError ( AxisX_t  x,
AxisY_t  y 
) const
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
Value_t PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::normalizedXValue ( AxisX_t  x,
AxisY_t  y 
) const
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
Value_t PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::normalizedYError ( AxisX_t  x,
AxisY_t  y 
) const
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
Value_t PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::normalizedYValue ( AxisX_t  x,
AxisY_t  y 
) const
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
int PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::numberOfBins ( ) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
int PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::numberOfBinsX ( ) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
int PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::numberOfBinsY ( ) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
Histogram2D& PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::operator= ( const Histogram2D< Value_t, AxisX_t, AxisY_t > &  orig)
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
template<typename OValue_t , typename OAxisX_t , typename OAxisY_t >
Histogram2D& PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::operator= ( const Histogram2D< OValue_t, OAxisX_t, OAxisY_t > &  orig)
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
RangeX PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::rangeX ( ) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
RangeY PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::rangeY ( ) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
void PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::reset ( )
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
void PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::setBinContent ( int  bin,
Value_t  value 
)
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
void PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::setBinContent ( int  binX,
int  binY,
Value_t  value 
)
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
void PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::setValues ( const std::vector< Value_t > &  values)
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
template<typename OValue_t >
void PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::setValues ( const std::vector< OValue_t > &  values)
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
const std::vector<AxisX_t> PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::upperLimitsX ( ) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
const std::vector<AxisY_t> PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::upperLimitsY ( ) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
Value_t PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::value ( AxisX_t  x,
AxisY_t  y 
) const
inline
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
const std::vector<Value_t>& PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::values ( ) const
inline

Member Data Documentation

template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
std::vector<AxisX_t> PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::binULimitsX
protected
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
std::vector<AxisY_t> PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::binULimitsY
protected
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
std::vector<Value_t> PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::binValues
protected
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::COND_SERIALIZABLE
protected

Definition at line 150 of file Histogram2D.h.

template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
Value_t total PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::COND_TRANSIENT
mutableprotected

Definition at line 141 of file Histogram2D.h.

template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
std::atomic<bool> totalValid PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::COND_TRANSIENT
mutableprotected

Definition at line 143 of file Histogram2D.h.

template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
std::vector<Value_t> rowTotal PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::COND_TRANSIENT
mutableprotected

Definition at line 147 of file Histogram2D.h.

template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
std::vector<Value_t> columnTotal PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::COND_TRANSIENT
mutableprotected

Definition at line 148 of file Histogram2D.h.

template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
RangeX PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::limitsX
protected
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
RangeY PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::limitsY
protected
template<typename Value_t, typename AxisX_t = Value_t, typename AxisY_t = AxisX_t>
unsigned int PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >::stride
protected