Logo ROOT   6.18/05
Reference Guide
List of all members | Classes | Public Types | Public Member Functions | Private Attributes | List of all members
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 198 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 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...
 
std::vector< double > & GetSumOfSquaredWeights ()
 Get the structure holding the sum of squares of weights (non-const). More...
 
const std::vector< double > & GetSumOfSquaredWeights () const
 Get the structure holding the sum of squares of weights. More...
 
Weight_tGetSumOfSquaredWeights (int binidx)
 Get a bin's sum of squared weights. More...
 
Weight_t GetSumOfSquaredWeights (int binidx) const
 Get a bin's sum of squared weights. 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 239 of file RHistData.hxx.

◆ ConstBinStat_t

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

Definition at line 238 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 206 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 202 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 204 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 247 of file RHistData.hxx.

Member Function Documentation

◆ 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 250 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 257 of file RHistData.hxx.

◆ GetSumOfSquaredWeights() [1/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 268 of file RHistData.hxx.

◆ GetSumOfSquaredWeights() [2/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 266 of file RHistData.hxx.

◆ GetSumOfSquaredWeights() [3/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 263 of file RHistData.hxx.

◆ GetSumOfSquaredWeights() [4/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 260 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 243 of file RHistData.hxx.

Libraries for ROOT::Experimental::RHistStatUncertainty< DIMENSIONS, PRECISION >:
[legend]

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