CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
cbl::glob::Histogram Class Reference

The class Histogram. More...

#include "Headers/Histogram.h"

Inheritance diagram for cbl::glob::Histogram:

Public Member Functions

 Histogram ()=default
 default constructor
 
 ~Histogram ()=default
 default destructor
 
Functions to set the private members of the class
virtual void set (const size_t nbins, const double minVar=par::defaultDouble, const double maxVar=par::defaultDouble, const double shift=0.5, const BinType bin_type=BinType::_linear_, const std::vector< double > vec_edges={})
 set the histogram variables More...
 
virtual int digitize (const double var)
 get the histogram index More...
 
virtual std::vector< int > digitize (const std::vector< double > var)
 get the histogram indeces More...
 
virtual void put (const double var, const double weight)
 bin the data More...
 
virtual void put (const std::vector< double > var, const std::vector< double > weight)
 bin the data More...
 
virtual void put (const int bin, const double weight, const double var)
 bin the data More...
 
virtual void put (const std::vector< int > bins, const std::vector< double > weight, const std::vector< double > var)
 bin the data More...
 
virtual void set (const size_t nbins1, const size_t nbins2, const double minVar1=par::defaultDouble, const double maxVar1=par::defaultDouble, const double minVar2=par::defaultDouble, const double maxVar2=par::defaultDouble, const double shift1=0.5, const double shift2=0.5, const BinType bin_type1=BinType::_linear_, const BinType bin_type2=BinType::_linear_, const std::vector< double > vec_edges1={}, const std::vector< double > vec_edges2={})
 set the histogram variables More...
 
virtual std::vector< int > digitize (const double var1, const double var2)
 get the histogram index More...
 
virtual std::vector< std::vector< int > > digitize (const std::vector< double > var1, const std::vector< double > var2)
 get the histogram indeces More...
 
virtual void put (const double var1, const double var2, const double weight)
 bin the data More...
 
virtual void put (const std::vector< double > var1, const std::vector< double > var2, const std::vector< double > weight)
 bin the data More...
 
virtual void put (const int bin1, const int bin2, const double weight, const double var1, const double var2)
 bin the data More...
 
virtual void put (const std::vector< std::vector< int >> bins, const std::vector< double > weight, const std::vector< double > var1, const std::vector< double > var2)
 bin the data More...
 
Functions to get the private members of the class
virtual size_t nbins () const
 return the number of bins More...
 
virtual double binSize () const
 return the bin size More...
 
virtual double minVar () const
 return the lower limit of the histogram More...
 
virtual double maxVar () const
 return the upper limit of the histogram More...
 
virtual double shift () const
 return the bin shift More...
 
virtual BinType bin_type () const
 return the bin type More...
 
virtual double bin (const size_t i) const
 return the i-th bin More...
 
virtual std::vector< double > bins () const
 return the bins More...
 
virtual std::vector< double > averaged_bins () const
 return the averaged bins More...
 
virtual std::vector< double > error_bins () const
 return the bin errors More...
 
virtual double edge (const size_t i) const
 return the i-th edge More...
 
virtual std::vector< double > edges () const
 return the histogram edges More...
 
virtual size_t nbins1 () const
 return the number of bins for the first variable More...
 
virtual double binSize1 () const
 return the first variable bin size More...
 
virtual double minVar1 () const
 return the lower limit of the histogram for the first variable More...
 
virtual double maxVar1 () const
 return the upper limit of the histogram for the first variable More...
 
virtual double shift1 () const
 return the bin shift for the first variable More...
 
virtual BinType bin_type1 () const
 return the bin type for the first variable More...
 
virtual size_t nbins2 () const
 return the number of bins for the second variable More...
 
virtual double binSize2 () const
 return the second variable bin size More...
 
virtual double minVar2 () const
 return the lower limit of the histogram for the second variable More...
 
virtual double maxVar2 () const
 return the upper limit of the histogram for the second variable More...
 
virtual double shift2 () const
 return the bin shift for the second variable More...
 
virtual BinType bin_type2 () const
 return the bin type for the second variable More...
 
virtual double bin1 (const size_t i) const
 return the i-th bin of the first variable More...
 
virtual std::vector< double > bins1 () const
 return the first variable bins More...
 
virtual std::vector< std::vector< double > > averaged_bins1 () const
 return the first variable averaged bins More...
 
virtual std::vector< std::vector< double > > error_bins1 () const
 return the first variable averaged bin errors More...
 
virtual double edge1 (const size_t i) const
 return the i-th edge of the first variable More...
 
virtual std::vector< double > edges1 () const
 return the histogram edges of the first variable More...
 
virtual double bin2 (const size_t i) const
 return the i-th bin of the second variable More...
 
virtual std::vector< double > bins2 () const
 return the second variable bins More...
 
virtual std::vector< std::vector< double > > averaged_bins2 () const
 return the second variable averaged bins More...
 
virtual std::vector< std::vector< double > > error_bins2 () const
 return the second variable averaged bin errors More...
 
virtual double edge2 (const size_t i) const
 return the i-th edge of the second variable More...
 
virtual std::vector< double > edges2 () const
 return the histogram edges of the second variable More...
 
virtual double operator() (const int i, const HistogramType hist_type, const double fact=1.) const
 return the histogram More...
 
virtual double operator() (const int i, const int j, const HistogramType hist_type, const double fact=1.) const
 return the histogram at (i,j) More...
 
virtual std::vector< double > operator() (const HistogramType hist_type, const double fact=1.) const
 return the histogram More...
 
virtual double normalization (const int i, const HistogramType hist_type, const double fact=1.) const
 return the bin normalization More...
 
virtual double normalization (const int i, const int j, const HistogramType hist_type, const double fact=1.) const
 return the bin normalization More...
 
virtual int unweighted_counts (const int i) const
 return the unweighted bin counts More...
 
virtual std::vector< int > unweighted_counts () const
 return the weights More...
 
virtual int unweighted_counts (const int i, const int j) const
 return the unweighted bin counts More...
 
virtual double error (const int i, const HistogramType hist_type, const double fact=1.) const
 return the poisson error of the histogram More...
 
virtual double error (const int i, const int j, const HistogramType hist_type, const double fact=1.) const
 return the error of the histogram at (i,j) More...
 
virtual std::vector< double > error (const HistogramType hist_type, const double fact=1.) const
 return the error of the histogram More...
 
input/output member functions (customized in all the derived classes)
virtual void write (const std::string dir, const std::string file, const HistogramType hist_type, const double fact=1.) const
 write the histogram More...
 

Detailed Description

The class Histogram.

This class is used to bin 1D variable.

Definition at line 118 of file Histogram.h.

Member Function Documentation

◆ averaged_bins()

virtual std::vector<double> cbl::glob::Histogram::averaged_bins ( ) const
inlinevirtual

return the averaged bins

Returns
the histogram averaged bins

Definition at line 393 of file Histogram.h.

◆ averaged_bins1()

virtual std::vector<std::vector<double> > cbl::glob::Histogram::averaged_bins1 ( ) const
inlinevirtual

return the first variable averaged bins

Returns
the first variable averaged bins

Reimplemented in cbl::glob::Histogram2D.

Definition at line 555 of file Histogram.h.

◆ averaged_bins2()

virtual std::vector<std::vector<double> > cbl::glob::Histogram::averaged_bins2 ( ) const
inlinevirtual

return the second variable averaged bins

Returns
the second variable averaged bins

Reimplemented in cbl::glob::Histogram2D.

Definition at line 607 of file Histogram.h.

◆ bin()

virtual double cbl::glob::Histogram::bin ( const size_t  i) const
inlinevirtual

return the i-th bin

Parameters
ithe i-th index
Returns
the i-th bin

Definition at line 377 of file Histogram.h.

◆ bin1()

virtual double cbl::glob::Histogram::bin1 ( const size_t  i) const
inlinevirtual

return the i-th bin of the first variable

Parameters
ithe i-th index
Returns
the i-th bin of the first variable

Reimplemented in cbl::glob::Histogram2D.

Definition at line 539 of file Histogram.h.

◆ bin2()

virtual double cbl::glob::Histogram::bin2 ( const size_t  i) const
inlinevirtual

return the i-th bin of the second variable

Parameters
ithe i-th index
Returns
the i-th bin of the second variable

Reimplemented in cbl::glob::Histogram2D.

Definition at line 591 of file Histogram.h.

◆ bin_type()

virtual BinType cbl::glob::Histogram::bin_type ( ) const
inlinevirtual

return the bin type

Returns
the bin type

Definition at line 367 of file Histogram.h.

◆ bin_type1()

virtual BinType cbl::glob::Histogram::bin_type1 ( ) const
inlinevirtual

return the bin type for the first variable

Returns
the bin type for the first variable

Reimplemented in cbl::glob::Histogram2D.

Definition at line 474 of file Histogram.h.

◆ bin_type2()

virtual BinType cbl::glob::Histogram::bin_type2 ( ) const
inlinevirtual

return the bin type for the second variable

Returns
the bin type for the second variable

Reimplemented in cbl::glob::Histogram2D.

Definition at line 529 of file Histogram.h.

◆ bins()

virtual std::vector<double> cbl::glob::Histogram::bins ( ) const
inlinevirtual

return the bins

Returns
the histogram bins

Definition at line 385 of file Histogram.h.

◆ bins1()

virtual std::vector<double> cbl::glob::Histogram::bins1 ( ) const
inlinevirtual

return the first variable bins

Returns
the first variable bins

Reimplemented in cbl::glob::Histogram2D.

Definition at line 547 of file Histogram.h.

◆ bins2()

virtual std::vector<double> cbl::glob::Histogram::bins2 ( ) const
inlinevirtual

return the second variable bins

Returns
the second variable bins

Reimplemented in cbl::glob::Histogram2D.

Definition at line 599 of file Histogram.h.

◆ binSize()

virtual double cbl::glob::Histogram::binSize ( ) const
inlinevirtual

return the bin size

Returns
the bin size

Definition at line 333 of file Histogram.h.

◆ binSize1()

virtual double cbl::glob::Histogram::binSize1 ( ) const
inlinevirtual

return the first variable bin size

Returns
the first variable bin size

Reimplemented in cbl::glob::Histogram2D.

Definition at line 436 of file Histogram.h.

◆ binSize2()

virtual double cbl::glob::Histogram::binSize2 ( ) const
inlinevirtual

return the second variable bin size

Returns
the second variable bin size

Reimplemented in cbl::glob::Histogram2D.

Definition at line 491 of file Histogram.h.

◆ digitize() [1/4]

virtual int cbl::glob::Histogram::digitize ( const double  var)
inlinevirtual

get the histogram index

Parameters
varvalue of the var
Returns
the histogram index

Definition at line 158 of file Histogram.h.

◆ digitize() [2/4]

virtual std::vector<int> cbl::glob::Histogram::digitize ( const double  var1,
const double  var2 
)
inlinevirtual

get the histogram index

Parameters
var1value of the first var
var2value of the second var
Returns
the histogram index

Reimplemented in cbl::glob::Histogram2D.

Definition at line 244 of file Histogram.h.

◆ digitize() [3/4]

virtual std::vector<int> cbl::glob::Histogram::digitize ( const std::vector< double >  var)
inlinevirtual

get the histogram indeces

Parameters
varvalues of the var
Returns
the histogram indeces

Definition at line 168 of file Histogram.h.

◆ digitize() [4/4]

virtual std::vector<std::vector<int> > cbl::glob::Histogram::digitize ( const std::vector< double >  var1,
const std::vector< double >  var2 
)
inlinevirtual

get the histogram indeces

Parameters
var1values of the first var
var2values of the second var
Returns
the histogram indeces

Reimplemented in cbl::glob::Histogram2D.

Definition at line 255 of file Histogram.h.

◆ edge()

virtual double cbl::glob::Histogram::edge ( const size_t  i) const
inlinevirtual

return the i-th edge

Parameters
ithe i-th index
Returns
the i-th edge

Definition at line 411 of file Histogram.h.

◆ edge1()

virtual double cbl::glob::Histogram::edge1 ( const size_t  i) const
inlinevirtual

return the i-th edge of the first variable

Parameters
ithe i-th index
Returns
the i-th edge of the first variable

Reimplemented in cbl::glob::Histogram2D.

Definition at line 573 of file Histogram.h.

◆ edge2()

virtual double cbl::glob::Histogram::edge2 ( const size_t  i) const
inlinevirtual

return the i-th edge of the second variable

Parameters
ithe i-th index
Returns
the i-th edge of the second variabl

Reimplemented in cbl::glob::Histogram2D.

Definition at line 625 of file Histogram.h.

◆ edges()

virtual std::vector<double> cbl::glob::Histogram::edges ( ) const
inlinevirtual

return the histogram edges

Returns
the histogram edges

Definition at line 419 of file Histogram.h.

◆ edges1()

virtual std::vector<double> cbl::glob::Histogram::edges1 ( ) const
inlinevirtual

return the histogram edges of the first variable

Returns
the histogram edges of the first variable

Reimplemented in cbl::glob::Histogram2D.

Definition at line 581 of file Histogram.h.

◆ edges2()

virtual std::vector<double> cbl::glob::Histogram::edges2 ( ) const
inlinevirtual

return the histogram edges of the second variable

Returns
the histogram edges of the second variabl

Reimplemented in cbl::glob::Histogram2D.

Definition at line 633 of file Histogram.h.

◆ error() [1/3]

virtual std::vector<double> cbl::glob::Histogram::error ( const HistogramType  hist_type,
const double  fact = 1. 
) const
inlinevirtual

return the error of the histogram

Parameters
hist_typethe type of histogram
factthe factor used to normalized the histogram
Returns
the histogram error

Definition at line 790 of file Histogram.h.

◆ error() [2/3]

virtual double cbl::glob::Histogram::error ( const int  i,
const HistogramType  hist_type,
const double  fact = 1. 
) const
inlinevirtual

return the poisson error of the histogram

Parameters
ii-th bin
hist_typethe type of histogram
factthe factor used to normalized the histogram
Returns
the histogram error at i

Definition at line 757 of file Histogram.h.

◆ error() [3/3]

virtual double cbl::glob::Histogram::error ( const int  i,
const int  j,
const HistogramType  hist_type,
const double  fact = 1. 
) const
inlinevirtual

return the error of the histogram at (i,j)

Parameters
ithe i-th first variable bin
jthe j-th second variable bin
hist_typethe type of histogram
factthe factor used to normalized the histogram
Returns
the histogram at (i,j)

Reimplemented in cbl::glob::Histogram2D.

Definition at line 775 of file Histogram.h.

◆ error_bins()

virtual std::vector<double> cbl::glob::Histogram::error_bins ( ) const
inlinevirtual

return the bin errors

Returns
the bin errors

Definition at line 401 of file Histogram.h.

◆ error_bins1()

virtual std::vector<std::vector<double> > cbl::glob::Histogram::error_bins1 ( ) const
inlinevirtual

return the first variable averaged bin errors

Returns
the first variable averaged bin errors

Reimplemented in cbl::glob::Histogram2D.

Definition at line 563 of file Histogram.h.

◆ error_bins2()

virtual std::vector<std::vector<double> > cbl::glob::Histogram::error_bins2 ( ) const
inlinevirtual

return the second variable averaged bin errors

Returns
the second variable averaged bin errors

Reimplemented in cbl::glob::Histogram2D.

Definition at line 615 of file Histogram.h.

◆ maxVar()

virtual double cbl::glob::Histogram::maxVar ( ) const
inlinevirtual

return the upper limit of the histogram

Returns
the lower upper of the histogram

Definition at line 351 of file Histogram.h.

◆ maxVar1()

virtual double cbl::glob::Histogram::maxVar1 ( ) const
inlinevirtual

return the upper limit of the histogram for the first variable

Returns
the upper limit of the histogram for the first variable

Reimplemented in cbl::glob::Histogram2D.

Definition at line 456 of file Histogram.h.

◆ maxVar2()

virtual double cbl::glob::Histogram::maxVar2 ( ) const
inlinevirtual

return the upper limit of the histogram for the second variable

Returns
the upper limit of the histogram for the second variable

Reimplemented in cbl::glob::Histogram2D.

Definition at line 511 of file Histogram.h.

◆ minVar()

virtual double cbl::glob::Histogram::minVar ( ) const
inlinevirtual

return the lower limit of the histogram

Returns
the lower limit of the histogram

Definition at line 342 of file Histogram.h.

◆ minVar1()

virtual double cbl::glob::Histogram::minVar1 ( ) const
inlinevirtual

return the lower limit of the histogram for the first variable

Returns
the lower limit of the histogram for the first variable

Reimplemented in cbl::glob::Histogram2D.

Definition at line 446 of file Histogram.h.

◆ minVar2()

virtual double cbl::glob::Histogram::minVar2 ( ) const
inlinevirtual

return the lower limit of the histogram for the second variable

Returns
the lower limit of the histogram for the second variable

Reimplemented in cbl::glob::Histogram2D.

Definition at line 501 of file Histogram.h.

◆ nbins()

virtual size_t cbl::glob::Histogram::nbins ( ) const
inlinevirtual

return the number of bins

Returns
the number of bins

Definition at line 325 of file Histogram.h.

◆ nbins1()

virtual size_t cbl::glob::Histogram::nbins1 ( ) const
inlinevirtual

return the number of bins for the first variable

Returns
the number of bins for the first variable

Reimplemented in cbl::glob::Histogram2D.

Definition at line 428 of file Histogram.h.

◆ nbins2()

virtual size_t cbl::glob::Histogram::nbins2 ( ) const
inlinevirtual

return the number of bins for the second variable

Returns
the number of bins for the second variable

Reimplemented in cbl::glob::Histogram2D.

Definition at line 483 of file Histogram.h.

◆ normalization() [1/2]

virtual double cbl::glob::Histogram::normalization ( const int  i,
const HistogramType  hist_type,
const double  fact = 1. 
) const
inlinevirtual

return the bin normalization

Parameters
ii-th bin
hist_typethe type of histogram
factthe factor used to normalized the histogram
Returns
the bin normalization

Definition at line 694 of file Histogram.h.

◆ normalization() [2/2]

virtual double cbl::glob::Histogram::normalization ( const int  i,
const int  j,
const HistogramType  hist_type,
const double  fact = 1. 
) const
inlinevirtual

return the bin normalization

Parameters
ii-th bin
jj-th bin
hist_typethe type of histogram
factthe factor used to normalized the histogram
Returns
the bin normalization

Reimplemented in cbl::glob::Histogram2D.

Definition at line 711 of file Histogram.h.

◆ operator()() [1/3]

virtual std::vector<double> cbl::glob::Histogram::operator() ( const HistogramType  hist_type,
const double  fact = 1. 
) const
inlinevirtual

return the histogram

Parameters
hist_typethe type of histogram
factthe factor used to normalized the histogram
Returns
the histogram

Definition at line 679 of file Histogram.h.

◆ operator()() [2/3]

virtual double cbl::glob::Histogram::operator() ( const int  i,
const HistogramType  hist_type,
const double  fact = 1. 
) const
inlinevirtual

return the histogram

Parameters
ii-th bin
hist_typethe type of histogram
factthe factor used to normalized the histogram
Returns
the histogram

Definition at line 648 of file Histogram.h.

◆ operator()() [3/3]

virtual double cbl::glob::Histogram::operator() ( const int  i,
const int  j,
const HistogramType  hist_type,
const double  fact = 1. 
) const
inlinevirtual

return the histogram at (i,j)

Parameters
ithe i-th first variable bin
jthe j-th second variable bin
hist_typethe type of histogram
factthe factor used to normalized the histogram
Returns
the histogram at (i,j)

Reimplemented in cbl::glob::Histogram2D.

Definition at line 665 of file Histogram.h.

◆ put() [1/8]

virtual void cbl::glob::Histogram::put ( const double  var,
const double  weight 
)
inlinevirtual

bin the data

Parameters
varvalue of the var
weightweight of the var

Definition at line 178 of file Histogram.h.

◆ put() [2/8]

virtual void cbl::glob::Histogram::put ( const double  var1,
const double  var2,
const double  weight 
)
inlinevirtual

bin the data

Parameters
var1value of the first var
var2value of the second var
weightweight of the var

Reimplemented in cbl::glob::Histogram2D.

Definition at line 267 of file Histogram.h.

◆ put() [3/8]

virtual void cbl::glob::Histogram::put ( const int  bin,
const double  weight,
const double  var 
)
inlinevirtual

bin the data

Parameters
binvalue of the bin
weightweight of the var
varvalue of the var

Definition at line 200 of file Histogram.h.

◆ put() [4/8]

virtual void cbl::glob::Histogram::put ( const int  bin1,
const int  bin2,
const double  weight,
const double  var1,
const double  var2 
)
inlinevirtual

bin the data

Parameters
bin1value of the first bin
bin2value of the second bin
weightweight of the var
var1value of the first var
var2value of the second var

Reimplemented in cbl::glob::Histogram2D.

Definition at line 295 of file Histogram.h.

◆ put() [5/8]

virtual void cbl::glob::Histogram::put ( const std::vector< double >  var,
const std::vector< double >  weight 
)
inlinevirtual

bin the data

Parameters
varvalues of the var
weightweights of the var

Definition at line 188 of file Histogram.h.

◆ put() [6/8]

virtual void cbl::glob::Histogram::put ( const std::vector< double >  var1,
const std::vector< double >  var2,
const std::vector< double >  weight 
)
inlinevirtual

bin the data

Parameters
var1values of the first var
var2values of the second var
weightweights of the var

Reimplemented in cbl::glob::Histogram2D.

Definition at line 279 of file Histogram.h.

◆ put() [7/8]

virtual void cbl::glob::Histogram::put ( const std::vector< int >  bins,
const std::vector< double >  weight,
const std::vector< double >  var 
)
inlinevirtual

bin the data

Parameters
binsvalues of the bin
weightweights of the var
varvalues of the var

Definition at line 212 of file Histogram.h.

◆ put() [8/8]

virtual void cbl::glob::Histogram::put ( const std::vector< std::vector< int >>  bins,
const std::vector< double >  weight,
const std::vector< double >  var1,
const std::vector< double >  var2 
)
inlinevirtual

bin the data

Parameters
binsvalues of the bins
weightweights of the var
var1values of the first var
var2values of the second var

Reimplemented in cbl::glob::Histogram2D.

Definition at line 309 of file Histogram.h.

◆ set() [1/2]

virtual void cbl::glob::Histogram::set ( const size_t  nbins,
const double  minVar = par::defaultDouble,
const double  maxVar = par::defaultDouble,
const double  shift = 0.5,
const BinType  bin_type = BinType::_linear_,
const std::vector< double >  vec_edges = {} 
)
inlinevirtual

set the histogram variables

Parameters
nbinsthe number of bins
minVarthe variable minimum
maxVarthe variable maximum
shiftthe shift of the bin
bin_typethe binning type
vec_edgesthe bin edges, used only if bin_type is custom

Definition at line 148 of file Histogram.h.

◆ set() [2/2]

virtual void cbl::glob::Histogram::set ( const size_t  nbins1,
const size_t  nbins2,
const double  minVar1 = par::defaultDouble,
const double  maxVar1 = par::defaultDouble,
const double  minVar2 = par::defaultDouble,
const double  maxVar2 = par::defaultDouble,
const double  shift1 = 0.5,
const double  shift2 = 0.5,
const BinType  bin_type1 = BinType::_linear_,
const BinType  bin_type2 = BinType::_linear_,
const std::vector< double >  vec_edges1 = {},
const std::vector< double >  vec_edges2 = {} 
)
inlinevirtual

set the histogram variables

Parameters
nbins1the number of bins for the first variable
nbins2the number of bins for the second variable
minVar1minimum range for the first variable
maxVar1maximmum range for the first variable
minVar2minimum range for the second variable
maxVar2maximmum range for the second variable
shift1bin shift for the first variable
shift2bin shift for the second variable
bin_type1the binning type for the first variable
bin_type2the binning type for the second variable
vec_edges1the first variable bin edges, used only if bin_type is custom
vec_edges2the second variable bin edges, used only if bin_type is custom

Reimplemented in cbl::glob::Histogram2D.

Definition at line 233 of file Histogram.h.

◆ shift()

virtual double cbl::glob::Histogram::shift ( ) const
inlinevirtual

return the bin shift

Returns
the bin shift

Definition at line 359 of file Histogram.h.

◆ shift1()

virtual double cbl::glob::Histogram::shift1 ( ) const
inlinevirtual

return the bin shift for the first variable

Returns
the bin shift for the first variable

Reimplemented in cbl::glob::Histogram2D.

Definition at line 465 of file Histogram.h.

◆ shift2()

virtual double cbl::glob::Histogram::shift2 ( ) const
inlinevirtual

return the bin shift for the second variable

Returns
the bin shift for the second variable

Reimplemented in cbl::glob::Histogram2D.

Definition at line 520 of file Histogram.h.

◆ unweighted_counts() [1/3]

virtual std::vector<int> cbl::glob::Histogram::unweighted_counts ( ) const
inlinevirtual

return the weights

Returns
the weights

Definition at line 729 of file Histogram.h.

◆ unweighted_counts() [2/3]

virtual int cbl::glob::Histogram::unweighted_counts ( const int  i) const
inlinevirtual

return the unweighted bin counts

Parameters
ii-th bin
Returns
the unweighted bin counts

Definition at line 721 of file Histogram.h.

◆ unweighted_counts() [3/3]

virtual int cbl::glob::Histogram::unweighted_counts ( const int  i,
const int  j 
) const
inlinevirtual

return the unweighted bin counts

Parameters
ii-th bin
jj-th bin
Returns
the unweighted bin counts

Reimplemented in cbl::glob::Histogram2D.

Definition at line 741 of file Histogram.h.

◆ write()

virtual void cbl::glob::Histogram::write ( const std::string  dir,
const std::string  file,
const HistogramType  hist_type,
const double  fact = 1. 
) const
inlinevirtual

write the histogram

Parameters
diroutput directory
fileoutput file
hist_typethe type of histogram
factthe factor used to normalized the histogram

Reimplemented in cbl::glob::Histogram2D.

Definition at line 812 of file Histogram.h.


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