Logo ROOT   6.21/01
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 216 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 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...
 
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...
 
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 fSumWeightsSquared
 Uncertainty of the content for each bin. 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 257 of file RHistData.hxx.

◆ ConstBinStat_t

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

Definition at line 256 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 224 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 220 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 222 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  size)
inline

Definition at line 265 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 289 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 268 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 275 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 278 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 281 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 284 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 286 of file RHistData.hxx.

Member Data Documentation

◆ fSumWeightsSquared

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

Uncertainty of the content for each bin.

Sum of squared weights

Definition at line 261 of file RHistData.hxx.


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