Logo ROOT   master
Reference Guide
ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION > Class Template Reference

template<int DIMENSIONS, class PRECISION>
class ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >


Histogram statistics to keep track of the Poisson uncertainty per bin.

Definition at line 259 of file RHistData.hxx.

Classes

class  RBinStat
 
Modifying view on a RHistStatUncertainty for a given bin. More...
 
class  RConstBinStat
 
Const view on a RHistStatUncertainty for a given bin. More...
 

Public Types

using BinStat_t = RBinStat
 
using ConstBinStat_t = RConstBinStat
 
using Content_t = std::vector< PRECISION >
 Type of the bin content array. More...
 
using CoordArray_t = Hist::CoordArray_t< DIMENSIONS >
 The type of a (possibly multi-dimensional) coordinate. More...
 
using Weight_t = PRECISION
 The type of the weight and the bin content. More...
 

Public Member Functions

 RHistStatUncertainty ()=default
 
 RHistStatUncertainty (size_t bin_size, size_t overflow_size)
 
void Add (const RHistStatUncertainty &other)
 Merge with other RHistStatUncertainty data, assuming same bin configuration. More...
 
void Fill (const CoordArray_t &, int binidx, Weight_t weight=1.)
 Add weight to the bin at binidx; the coordinate was x. More...
 
Weight_t GetBinArray (int binidx) const
 Get a reference to the bin corresponding to binidx of the correct bin content array i.e. More...
 
Weight_tGetBinArray (int binidx)
 Get a reference to the bin corresponding to binidx of the correct bin content array (non-const) i.e. More...
 
double GetBinUncertaintyImpl (int binidx) const
 Calculate a bin's (Poisson) uncertainty of the bin content as the square-root of the bin's sum of squared weights. More...
 
const std::vector< double > & GetOverflowSumOfSquaredWeights () const
 Get the structure holding the under-/overflow sum of squares of weights. More...
 
std::vector< double > & GetOverflowSumOfSquaredWeights ()
 Get the structure holding the under-/overflow sum of squares of weights (non-const). More...
 
Weight_t GetSumOfSquaredWeights (int binidx) const
 Get a bin's sum of squared weights. More...
 
Weight_tGetSumOfSquaredWeights (int binidx)
 Get a bin's sum of squared weights. More...
 
const std::vector< double > & GetSumOfSquaredWeights () const
 Get the structure holding the sum of squares of weights. More...
 
std::vector< double > & GetSumOfSquaredWeights ()
 Get the structure holding the sum of squares of weights (non-const). More...
 

Private Attributes

Content_t fOverflowSumWeightsSquared
 Uncertainty of the under-/overflow content. More...
 
Content_t fSumWeightsSquared
 Uncertainty of the content for each bin excluding under-/overflow. More...
 

#include <ROOT/RHistData.hxx>

Member Typedef Documentation

◆ BinStat_t

template<int DIMENSIONS, class PRECISION >
using ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::BinStat_t = RBinStat

Definition at line 300 of file RHistData.hxx.

◆ ConstBinStat_t

template<int DIMENSIONS, class PRECISION >
using ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::ConstBinStat_t = RConstBinStat

Definition at line 299 of file RHistData.hxx.

◆ Content_t

template<int DIMENSIONS, class PRECISION >
using ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::Content_t = std::vector<PRECISION>

Type of the bin content array.

Definition at line 267 of file RHistData.hxx.

◆ CoordArray_t

template<int DIMENSIONS, class PRECISION >
using ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::CoordArray_t = Hist::CoordArray_t<DIMENSIONS>

The type of a (possibly multi-dimensional) coordinate.

Definition at line 263 of file RHistData.hxx.

◆ Weight_t

template<int DIMENSIONS, class PRECISION >
using ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::Weight_t = PRECISION

The type of the weight and the bin content.

Definition at line 265 of file RHistData.hxx.

Constructor & Destructor Documentation

◆ RHistStatUncertainty() [1/2]

template<int DIMENSIONS, class PRECISION >
ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::RHistStatUncertainty ( )
default

◆ RHistStatUncertainty() [2/2]

template<int DIMENSIONS, class PRECISION >
ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::RHistStatUncertainty ( size_t  bin_size,
size_t  overflow_size 
)
inline

Definition at line 310 of file RHistData.hxx.

Member Function Documentation

◆ Add()

template<int DIMENSIONS, class PRECISION >
void ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::Add ( const RHistStatUncertainty< DIMENSIONS, PRECISION > &  other)
inline

Merge with other RHistStatUncertainty data, assuming same bin configuration.

Definition at line 362 of file RHistData.hxx.

◆ Fill()

template<int DIMENSIONS, class PRECISION >
void ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::Fill ( const CoordArray_t ,
int  binidx,
Weight_t  weight = 1. 
)
inline

Add weight to the bin at binidx; the coordinate was x.

Definition at line 337 of file RHistData.hxx.

◆ GetBinArray() [1/2]

template<int DIMENSIONS, class PRECISION >
Weight_t ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::GetBinArray ( int  binidx) const
inline

Get a reference to the bin corresponding to binidx of the correct bin content array i.e.

depending if binidx is a regular bin or an under- / overflow bin.

Definition at line 315 of file RHistData.hxx.

◆ GetBinArray() [2/2]

template<int DIMENSIONS, class PRECISION >
Weight_t& ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::GetBinArray ( int  binidx)
inline

Get a reference to the bin corresponding to binidx of the correct bin content array (non-const) i.e.

depending if binidx is a regular bin or an under- / overflow bin.

Definition at line 327 of file RHistData.hxx.

◆ GetBinUncertaintyImpl()

template<int DIMENSIONS, class PRECISION >
double ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::GetBinUncertaintyImpl ( int  binidx) const
inline

Calculate a bin's (Poisson) uncertainty of the bin content as the square-root of the bin's sum of squared weights.

Definition at line 344 of file RHistData.hxx.

◆ GetOverflowSumOfSquaredWeights() [1/2]

template<int DIMENSIONS, class PRECISION >
const std::vector<double>& ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::GetOverflowSumOfSquaredWeights ( ) const
inline

Get the structure holding the under-/overflow sum of squares of weights.

Definition at line 357 of file RHistData.hxx.

◆ GetOverflowSumOfSquaredWeights() [2/2]

template<int DIMENSIONS, class PRECISION >
std::vector<double>& ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::GetOverflowSumOfSquaredWeights ( )
inline

Get the structure holding the under-/overflow sum of squares of weights (non-const).

Definition at line 359 of file RHistData.hxx.

◆ GetSumOfSquaredWeights() [1/4]

template<int DIMENSIONS, class PRECISION >
Weight_t ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::GetSumOfSquaredWeights ( int  binidx) const
inline

Get a bin's sum of squared weights.

Definition at line 347 of file RHistData.hxx.

◆ GetSumOfSquaredWeights() [2/4]

template<int DIMENSIONS, class PRECISION >
Weight_t& ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::GetSumOfSquaredWeights ( int  binidx)
inline

Get a bin's sum of squared weights.

Definition at line 349 of file RHistData.hxx.

◆ GetSumOfSquaredWeights() [3/4]

template<int DIMENSIONS, class PRECISION >
const std::vector<double>& ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::GetSumOfSquaredWeights ( ) const
inline

Get the structure holding the sum of squares of weights.

Definition at line 352 of file RHistData.hxx.

◆ GetSumOfSquaredWeights() [4/4]

template<int DIMENSIONS, class PRECISION >
std::vector<double>& ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::GetSumOfSquaredWeights ( )
inline

Get the structure holding the sum of squares of weights (non-const).

Definition at line 354 of file RHistData.hxx.

Member Data Documentation

◆ fOverflowSumWeightsSquared

template<int DIMENSIONS, class PRECISION >
Content_t ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::fOverflowSumWeightsSquared
private

Uncertainty of the under-/overflow content.

Sum of squared weights for under-/overflow.

Definition at line 306 of file RHistData.hxx.

◆ fSumWeightsSquared

template<int DIMENSIONS, class PRECISION >
Content_t ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >::fSumWeightsSquared
private

Uncertainty of the content for each bin excluding under-/overflow.

Sum of squared weights.

Definition at line 304 of file RHistData.hxx.


The documentation for this class was generated from the following file: