template<typename Txvec, typename Tyvec, typename Tz, typename Trandom = float>
TFCS2DFunctionTemplateHistogram class

Base classes

class TFCS2DFunction

Derived classes

template<typename Txvec, typename Tyvec, typename Tz, typename Trandom = float>
class TFCS2DFunctionTemplateInterpolationExpHistogram
template<typename Txvec, typename Tyvec, typename Tz, typename Trandom = float>
class TFCS2DFunctionTemplateInterpolationHistogram

Public types

using size_t = TFCS1DFunction_size_t
using random_type = Trandom
using xvec_type = Txvec
using yvec_type = Tyvec
using z_value_type = Tz

Constructors, destructors, conversion operators

TFCS2DFunctionTemplateHistogram(TH2* hist = nullptr)
~TFCS2DFunctionTemplateHistogram()

Public functions

auto MemorySizeArray() const -> std::size_t
auto MemorySize() const -> std::size_t virtual
void set_nbins(size_t nbinsx, size_t nbinsy)
set number of bins
auto get_nbins() const -> size_t
return number of bins
void Initialize(const TH2* hist)
void rnd_to_fct(float& valuex, float& valuey, float rnd) const virtual
void rnd_to_fct(float& valuex, float& valuey, float rnd, float rnd2) const virtual
auto get_HistoBordersx() const -> const Txvec&
auto get_HistoBordersy() const -> const Tyvec&
auto get_HistoBordersx() -> Txvec&
auto get_HistoBordersy() -> Tyvec&
auto get_HistoContents() const -> const TFCS1DFunction_HistogramContent<Tz, Trandom>&
auto get_HistoContents() -> TFCS1DFunction_HistogramContent<Tz, Trandom>&
void rnd_to_fct() const pure virtual
void rnd_to_fct() const

Protected variables

Txvec m_HistoBordersx
Tyvec m_HistoBordersy
TFCS1DFunction_HistogramContent<Tz, Trandom> m_HistoContents

Function documentation

template<typename Txvec, typename Tyvec, typename Tz, typename Trandom>
std::size_t TFCS2DFunctionTemplateHistogram<Txvec, Tyvec, Tz, Trandom>::MemorySize() const virtual

Gives the total memory size, including the size of additional memory allocated inside the class

template<typename Txvec, typename Tyvec, typename Tz, typename Trandom>
void TFCS2DFunctionTemplateHistogram<Txvec, Tyvec, Tz, Trandom>::Initialize(const TH2* hist)

Initialize from root histogram. Depending on the precision of the x- and y-axis, bins are merged if numerical identical

template<typename Txvec, typename Tyvec, typename Tz, typename Trandom>
Txvec& TFCS2DFunctionTemplateHistogram<Txvec, Tyvec, Tz, Trandom>::get_HistoBordersx()

inline void get_XYZfromGlobal(int &ix, int &iy, int &iz, int global) const {hist;};

template<typename Txvec, typename Tyvec, typename Tz, typename Trandom>
void TFCS2DFunctionTemplateHistogram<Txvec, Tyvec, Tz, Trandom>::rnd_to_fct() const pure virtual

Function gets random number rnd in the range [0,1) as argument and returns function value according to a histogram distribution

template<typename Txvec, typename Tyvec, typename Tz, typename Trandom>
void TFCS2DFunctionTemplateHistogram<Txvec, Tyvec, Tz, Trandom>::rnd_to_fct() const

Function gets random number rnd in the range [0,1) as argument and returns function value according to a histogram distribution