ant
A2 ant: class-based analysis framework
ant::TH_ext Namespace Reference

Functions

TH1D * FitSlicesY (TH2 *h, TF1 *f1, Int_t cut, double IQR_range_lo, double IQR_range_hi)
 
TH1D * HistOfBins (const TH2 *h2)
 Fill the contents of a TH2 into a TH1. More...
 
std::string TH1ToLaTeX (const TH1 *h, const int precission)
 
TH2D * GetSlice (const TH3 &h, const int bin, const char *projection)
 GetSlice creates a new TH2D histogram which contains the bin contents of a slice of a 3D histogram. The given bin determines where the slice should be retrieved from, the projection specifies the axes of the slice/projection, where "yx" means y vs x projection of the histogram and "xy" means original x vs y axis is used at z bin position bin. More...
 
TH2D * GetSlice (const TH3 &hist, const char *name, const char *title, const int bin, const TAxis *const axis1, const TAxis *const axis2)
 
BinSettings getBins (const TAxis *axis) noexcept
 
bool haveSameBinning (const TAxis *a1, const TAxis *a2) noexcept
 
bool haveSameBinning (const TH1 *h1, const TH1 *h2) noexcept
 
bool haveSameBinning (const TH2 *h1, const TH2 *h2) noexcept
 
std::pair< int, int > getBinNums (double x, double y, const TH2 *hist)
 
template<typename T >
T * Clone (const T *obj, const std::string &name)
 
template<typename H , typename Func >
std::enable_if<!std::is_base_of< TH2, H >::value, H * >::type Apply (const H *h1, Func f, const std::string &newname="")
 
template<typename H , typename Func >
std::enable_if<!std::is_base_of< TH2, H >::value, H * >::type Apply (const H *h1, const H *h2, Func f, const std::string &newname="")
 
template<typename H , typename Func >
std::enable_if< std::is_base_of< TH2, H >::value, H * >::type Apply (const H *h1, Func f, const std::string &newname="")
 
template<typename H , typename Func >
std::enable_if< std::is_base_of< TH2, H >::value, H * >::type Apply (const H *h1, const H *h2, Func f, const std::string &newname="")
 
template<typename H , typename Func >
std::enable_if< std::is_base_of< TH2, H >::value, H * >::type Apply (const H *h1, const H *h2, const H *h3, Func f, const std::string &newname="")
 
template<typename Func , typename TH2 >
TH2 * ApplyMany (const std::vector< const TH2 *> &c, Func f, const std::string &newname="")
 
ant::interval< double > GetZMinMax (const TH2 *h)
 

Function Documentation

◆ Apply() [1/5]

template<typename H , typename Func >
std::enable_if<!std::is_base_of<TH2, H>::value, H*>::type ant::TH_ext::Apply ( const H *  h1,
Func  f,
const std::string &  newname = "" 
)

◆ Apply() [2/5]

template<typename H , typename Func >
std::enable_if<!std::is_base_of<TH2, H>::value, H*>::type ant::TH_ext::Apply ( const H *  h1,
const H *  h2,
Func  f,
const std::string &  newname = "" 
)

◆ Apply() [3/5]

template<typename H , typename Func >
std::enable_if<std::is_base_of<TH2, H>::value, H*>::type ant::TH_ext::Apply ( const H *  h1,
Func  f,
const std::string &  newname = "" 
)

◆ Apply() [4/5]

template<typename H , typename Func >
std::enable_if<std::is_base_of<TH2, H>::value, H*>::type ant::TH_ext::Apply ( const H *  h1,
const H *  h2,
Func  f,
const std::string &  newname = "" 
)

◆ Apply() [5/5]

template<typename H , typename Func >
std::enable_if<std::is_base_of<TH2, H>::value, H*>::type ant::TH_ext::Apply ( const H *  h1,
const H *  h2,
const H *  h3,
Func  f,
const std::string &  newname = "" 
)

◆ ApplyMany()

template<typename Func , typename TH2 >
TH2* ant::TH_ext::ApplyMany ( const std::vector< const TH2 *> &  c,
Func  f,
const std::string &  newname = "" 
)
inline

◆ Clone()

template<typename T >
T* ant::TH_ext::Clone ( const T *  obj,
const std::string &  name 
)
inline

◆ FitSlicesY()

TH1D * ant::TH_ext::FitSlicesY ( TH2 *  h,
TF1 *  f1,
Int_t  cut,
double  IQR_range_lo,
double  IQR_range_hi 
)

◆ getBinNums()

std::pair<int,int> ant::TH_ext::getBinNums ( double  x,
double  y,
const TH2 *  hist 
)
inline

◆ getBins()

BinSettings ant::TH_ext::getBins ( const TAxis *  axis)
inlinenoexcept

◆ GetSlice() [1/2]

TH2D * ant::TH_ext::GetSlice ( const TH3 &  h,
const int  bin,
const char *  projection 
)

GetSlice creates a new TH2D histogram which contains the bin contents of a slice of a 3D histogram. The given bin determines where the slice should be retrieved from, the projection specifies the axes of the slice/projection, where "yx" means y vs x projection of the histogram and "xy" means original x vs y axis is used at z bin position bin.

Parameters
h3D histogram to obtain a slice from
binspecify the bin of the slice
projectiondetermines the axes of the slice, like "xy" or "zy"
Returns
slice as a new TH2D

◆ GetSlice() [2/2]

TH2D * ant::TH_ext::GetSlice ( const TH3 &  hist,
const char *  name,
const char *  title,
const int  bin,
const TAxis *const  axis1,
const TAxis *const  axis2 
)

◆ GetZMinMax()

ant::interval<double> ant::TH_ext::GetZMinMax ( const TH2 *  h)
inline

◆ haveSameBinning() [1/3]

bool ant::TH_ext::haveSameBinning ( const TAxis *  a1,
const TAxis *  a2 
)
inlinenoexcept

◆ haveSameBinning() [2/3]

bool ant::TH_ext::haveSameBinning ( const TH1 *  h1,
const TH1 *  h2 
)
inlinenoexcept

◆ haveSameBinning() [3/3]

bool ant::TH_ext::haveSameBinning ( const TH2 *  h1,
const TH2 *  h2 
)
inlinenoexcept

◆ HistOfBins()

TH1D * ant::TH_ext::HistOfBins ( const TH2 *  h2)

Fill the contents of a TH2 into a TH1.

Parameters
h2
Returns
a new TH1D

◆ TH1ToLaTeX()

std::string ant::TH_ext::TH1ToLaTeX ( const TH1 *  h,
const int  precission 
)