Logo ROOT   6.14/05
Reference Guide
List of all members | Classes | Public Types | Public Member Functions | Private Attributes | List of all members
ROOT::Experimental::THistStatUncertainty< DIMENSIONS, PRECISION, STORAGE > Class Template Reference

template<int DIMENSIONS, class PRECISION, template< class P_ > class STORAGE>
class ROOT::Experimental::THistStatUncertainty< DIMENSIONS, PRECISION, STORAGE >

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

Definition at line 199 of file THistData.hxx.

Classes

class  TBinStat
 Modifying view on a THistStatUncertainty for a given bin. More...
 
class  TConstBinStat
 Const view on a THistStatUncertainty for a given bin. More...
 

Public Types

using BinStat_t = TBinStat
 
using ConstBinStat_t = TConstBinStat
 
using Content_t = STORAGE< 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

 THistStatUncertainty ()=default
 
 THistStatUncertainty (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...
 
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/THistData.hxx>

Member Typedef Documentation

◆ BinStat_t

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE>
using ROOT::Experimental::THistStatUncertainty< DIMENSIONS, PRECISION, STORAGE >::BinStat_t = TBinStat

Definition at line 240 of file THistData.hxx.

◆ ConstBinStat_t

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE>
using ROOT::Experimental::THistStatUncertainty< DIMENSIONS, PRECISION, STORAGE >::ConstBinStat_t = TConstBinStat

Definition at line 239 of file THistData.hxx.

◆ Content_t

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE>
using ROOT::Experimental::THistStatUncertainty< DIMENSIONS, PRECISION, STORAGE >::Content_t = STORAGE<PRECISION>

Type of the bin content array.

Definition at line 207 of file THistData.hxx.

◆ CoordArray_t

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE>
using ROOT::Experimental::THistStatUncertainty< DIMENSIONS, PRECISION, STORAGE >::CoordArray_t = Hist::CoordArray_t<DIMENSIONS>

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

Definition at line 203 of file THistData.hxx.

◆ Weight_t

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE>
using ROOT::Experimental::THistStatUncertainty< DIMENSIONS, PRECISION, STORAGE >::Weight_t = PRECISION

The type of the weight and the bin content.

Definition at line 205 of file THistData.hxx.

Constructor & Destructor Documentation

◆ THistStatUncertainty() [1/2]

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE>
ROOT::Experimental::THistStatUncertainty< DIMENSIONS, PRECISION, STORAGE >::THistStatUncertainty ( )
default

◆ THistStatUncertainty() [2/2]

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE>
ROOT::Experimental::THistStatUncertainty< DIMENSIONS, PRECISION, STORAGE >::THistStatUncertainty ( size_t  size)
inline

Definition at line 248 of file THistData.hxx.

Member Function Documentation

◆ Fill()

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE>
void ROOT::Experimental::THistStatUncertainty< DIMENSIONS, PRECISION, STORAGE >::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 251 of file THistData.hxx.

◆ GetBinUncertaintyImpl()

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE>
double ROOT::Experimental::THistStatUncertainty< DIMENSIONS, PRECISION, STORAGE >::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 258 of file THistData.hxx.

◆ GetSumOfSquaredWeights() [1/4]

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

Get a bin's sum of squared weights.

Definition at line 261 of file THistData.hxx.

◆ GetSumOfSquaredWeights() [2/4]

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

Get a bin's sum of squared weights.

Definition at line 264 of file THistData.hxx.

◆ GetSumOfSquaredWeights() [3/4]

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

Get the structure holding the sum of squares of weights.

Definition at line 267 of file THistData.hxx.

◆ GetSumOfSquaredWeights() [4/4]

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

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

Definition at line 269 of file THistData.hxx.

Member Data Documentation

◆ fSumWeightsSquared

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE>
Content_t ROOT::Experimental::THistStatUncertainty< DIMENSIONS, PRECISION, STORAGE >::fSumWeightsSquared
private

Uncertainty of the content for each bin.

Sum of squared weights

Definition at line 244 of file THistData.hxx.


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