rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.0
Rivet::HistoGroup< GroupAxisT, AxisT > Class Template Reference
Inheritance diagram for Rivet::HistoGroup< GroupAxisT, AxisT >:

Public Types

using BaseT = YODA::FillableStorage< sizeof...(AxisT)+1, BinnedHistoPtr< AxisT... >, GroupAxisT >
 
using BinContentT = BinnedHistoPtr< AxisT... >
 
using FillDim = std::integral_constant< size_t, sizeof...(AxisT)+1 >
 

Public Member Functions

 HistoGroup (const std::vector< GroupAxisT > &edges)
 
 HistoGroup (std::initializer_list< GroupAxisT > &&edges)
 
int fill (GroupAxisT tmpCoord, AxisT... coords, const double weight=1.0, const double fraction=1.0)
 
Reset methods
void reset () noexcept
 Reset the histogram.
 
Whole histo data
size_t fillDim () const noexcept
 Fill dimension of the object (number of conent axes + temprary axis)
 
size_t dim () const noexcept
 Total dimension of the object (number of fill axes + filled value)
 
double numEntries (const bool includeOverflows=true) const noexcept
 Get the number of fills (fractional fills are possible).
 
double effNumEntries (const bool includeOverflows=true) const noexcept
 Get the effective number of fills.
 
double sumW (const bool includeOverflows=true) const noexcept
 Calculates sum of weights in histo group.
 
double sumW2 (const bool includeOverflows=true) const noexcept
 Calculates sum of squared weights in histo group.
 
double integral (const bool includeOverflows=true) const noexcept
 Get the total volume of the histogram group.
 
double integralError (const bool includeOverflows=true) const noexcept
 Get the total volume error of the histogram group.
 
Transformations
void divByGroupWidth () const noexcept
 
void scaleW (const double scalefactor) noexcept
 Rescale as if all fill weights had been different by factor scalefactor.
 
void scale (const size_t i, const double scalefactor) noexcept
 Rescale as if all fill weights had been different by factor scalefactor along dimension i.
 
void normalize (const double normto=1.0, const bool includeOverflows=true)
 Normalize the (visible) histo "volume" to the normto value.
 
void normalizeGroup (const double normto=1.0, const bool includeOverflows=true)
 Normalize the (visible) histo "volume" to the normto value.
 

Member Function Documentation

◆ normalize()

template<typename GroupAxisT , typename... AxisT>
void Rivet::HistoGroup< GroupAxisT, AxisT >::normalize ( const double  normto = 1.0,
const bool  includeOverflows = true 
)
inline

Normalize the (visible) histo "volume" to the normto value.

Note
Consider each sub-histogram separately when calculating the integral.

◆ normalizeGroup()

template<typename GroupAxisT , typename... AxisT>
void Rivet::HistoGroup< GroupAxisT, AxisT >::normalizeGroup ( const double  normto = 1.0,
const bool  includeOverflows = true 
)
inline

Normalize the (visible) histo "volume" to the normto value.

Note
Treat the histogram group as an entity when calculating the integral.

References Rivet::HistoGroup< GroupAxisT, AxisT >::integral(), and Rivet::HistoGroup< GroupAxisT, AxisT >::scaleW().

◆ reset()

template<typename GroupAxisT , typename... AxisT>
void Rivet::HistoGroup< GroupAxisT, AxisT >::reset ( )
inlinenoexcept

Reset the histogram.

Keep the binning but set all bin contents and related quantities to zero


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