Logo ROOT   6.08/07
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 208 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 251 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 250 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 216 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 212 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 214 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 259 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 262 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 268 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 273 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 278 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 283 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 285 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 255 of file THistData.hxx.


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