Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooFit::Detail::MathFuncs Namespace Reference

Functions

double approxErf (double arg)
 
template<typename DoubleArray >
double bernstein (double x, double xmin, double xmax, DoubleArray coefs, int nCoefs)
 The caller needs to make sure that there is at least one coefficient.
 
template<typename DoubleArray >
double bernsteinIntegral (double xlo, double xhi, double xmin, double xmax, DoubleArray coefs, int nCoefs)
 
double bifurGauss (double x, double mean, double sigmaL, double sigmaR)
 
double bifurGaussIntegral (double xMin, double xMax, double mean, double sigmaL, double sigmaR)
 
template<typename DoubleArray >
unsigned int binNumber (double x, double coef, DoubleArray boundaries, unsigned int nBoundaries, int nbins, int blo)
 
double binomial (int n, int k)
 Calculates the binomial coefficient n over k.
 
double cbShape (double m, double m0, double sigma, double alpha, double n)
 
double cbShapeIntegral (double mMin, double mMax, double m0, double sigma, double alpha, double n)
 
template<typename DoubleArray >
double chebychev (DoubleArray coeffs, unsigned int nCoeffs, double x_in, double xMin, double xMax)
 
template<typename DoubleArray >
double chebychevIntegral (DoubleArray coeffs, unsigned int nCoeffs, double xMin, double xMax, double xMinFull, double xMaxFull)
 
double chi2Asymmetric (double mu, double weight, double errLo, double errHi)
 Chi-squared contribution of one bin with asymmetric (Poisson-style) data errors.
 
double chi2Expected (double mu, double weight)
 Chi-squared contribution of one bin with "expected" errors: \( \sigma^2 = \mu \).
 
double chi2Symmetric (double mu, double weight, double sigma2)
 Chi-squared contribution of one bin with a user-supplied symmetric error squared (e.g.
 
template<typename DoubleArray >
double constraintSum (DoubleArray comp, unsigned int compSize)
 
double efficiency (double effFuncVal, int catIndex, int sigCatIndex)
 
double effProd (double eff, double pdf)
 
double exponentialIntegral (double xMin, double xMax, double constant)
 
double fast_fma (double x, double y, double z) noexcept
 use fast FMA if available, fall back to normal arithmetic if not
 
template<typename ParamsArray , typename DoubleArray >
double flexibleInterp (unsigned int code, ParamsArray params, unsigned int n, DoubleArray low, DoubleArray high, double boundary, double nominal, int doCutoff)
 
double flexibleInterpSingle (unsigned int code, double low, double high, double boundary, double nominal, double paramVal, double res)
 
double gaussian (double x, double mean, double sigma)
 Function to evaluate an un-normalized RooGaussian.
 
double gaussianIntegral (double xMin, double xMax, double mean, double sigma)
 Function to calculate the integral of an un-normalized RooGaussian over x.
 
template<typename DoubleArray >
double interpolate1d (double low, double high, double val, unsigned int numBins, DoubleArray vals)
 
double landau (double x, double mu, double sigma)
 
double logNormal (double x, double k, double m0)
 
double logNormalIntegral (double xMin, double xMax, double m0, double k)
 
double logNormalIntegralStandard (double xMin, double xMax, double mu, double sigma)
 
double logNormalStandard (double x, double sigma, double mu)
 
template<typename DoubleArray >
double multipdf (int idx, DoubleArray pdfs)
 
template<typename XArray , typename MuArray , typename CovArray >
double multiVarGaussian (int n, XArray x, MuArray mu, CovArray covI)
 
double nll (double pdf, double weight, int binnedL, int doBinOffset)
 
double poisson (double x, double par)
 
double poissonIntegral (int code, double mu, double x, double integrandMin, double integrandMax, unsigned int protectNegative)
 
template<bool pdfMode = false, typename DoubleArray >
double polynomial (DoubleArray coeffs, int nCoeffs, int lowestOrder, double x)
 In pdfMode, a coefficient for the constant term of 1.0 is implied if lowestOrder > 0.
 
template<bool pdfMode = false, typename DoubleArray >
double polynomialIntegral (DoubleArray coeffs, int nCoeffs, int lowestOrder, double xMin, double xMax)
 In pdfMode, a coefficient for the constant term of 1.0 is implied if lowestOrder > 0.
 
template<typename DoubleArray >
double product (DoubleArray factors, std::size_t nFactors)
 
double ratio (double numerator, double denominator)
 
template<typename DoubleArray >
unsigned int rawBinNumber (double x, DoubleArray boundaries, std::size_t nBoundaries)
 
template<typename DoubleArray >
double recursiveFraction (DoubleArray a, unsigned int n)
 
template<typename DoubleArray >
double stepFunctionIntegral (double xmin, double xmax, std::size_t nBins, DoubleArray boundaries, DoubleArray coefs)
 
unsigned int uniformBinNumber (double low, double high, double val, unsigned int numBins, double coef)
 

Function Documentation

◆ approxErf()

double RooFit::Detail::MathFuncs::approxErf ( double arg)
inline

Definition at line 502 of file MathFuncs.h.

◆ bernstein()

template<typename DoubleArray >
double RooFit::Detail::MathFuncs::bernstein ( double x,
double xmin,
double xmax,
DoubleArray coefs,
int nCoefs )

The caller needs to make sure that there is at least one coefficient.

Definition at line 50 of file MathFuncs.h.

◆ bernsteinIntegral()

template<typename DoubleArray >
double RooFit::Detail::MathFuncs::bernsteinIntegral ( double xlo,
double xhi,
double xmin,
double xmax,
DoubleArray coefs,
int nCoefs )

Definition at line 814 of file MathFuncs.h.

◆ bifurGauss()

double RooFit::Detail::MathFuncs::bifurGauss ( double x,
double mean,
double sigmaL,
double sigmaR )
inline

Definition at line 111 of file MathFuncs.h.

◆ bifurGaussIntegral()

double RooFit::Detail::MathFuncs::bifurGaussIntegral ( double xMin,
double xMax,
double mean,
double sigmaL,
double sigmaR )
inline

Definition at line 554 of file MathFuncs.h.

◆ binNumber()

template<typename DoubleArray >
unsigned int RooFit::Detail::MathFuncs::binNumber ( double x,
double coef,
DoubleArray boundaries,
unsigned int nBoundaries,
int nbins,
int blo )

Definition at line 211 of file MathFuncs.h.

◆ binomial()

double RooFit::Detail::MathFuncs::binomial ( int n,
int k )
inline

Calculates the binomial coefficient n over k.

Equivalent to TMath::Binomial, but inlined.

Definition at line 32 of file MathFuncs.h.

◆ cbShape()

double RooFit::Detail::MathFuncs::cbShape ( double m,
double m0,
double sigma,
double alpha,
double n )
inline

Definition at line 482 of file MathFuncs.h.

◆ cbShapeIntegral()

double RooFit::Detail::MathFuncs::cbShapeIntegral ( double mMin,
double mMax,
double m0,
double sigma,
double alpha,
double n )
inline

Definition at line 749 of file MathFuncs.h.

◆ chebychev()

template<typename DoubleArray >
double RooFit::Detail::MathFuncs::chebychev ( DoubleArray coeffs,
unsigned int nCoeffs,
double x_in,
double xMin,
double xMax )

Definition at line 144 of file MathFuncs.h.

◆ chebychevIntegral()

template<typename DoubleArray >
double RooFit::Detail::MathFuncs::chebychevIntegral ( DoubleArray coeffs,
unsigned int nCoeffs,
double xMin,
double xMax,
double xMinFull,
double xMaxFull )

Definition at line 615 of file MathFuncs.h.

◆ chi2Asymmetric()

double RooFit::Detail::MathFuncs::chi2Asymmetric ( double mu,
double weight,
double errLo,
double errHi )
inline

Chi-squared contribution of one bin with asymmetric (Poisson-style) data errors.

The side facing the prediction is used: errHi when \( \mu > \mathrm{weight} \), otherwise errLo.

Definition at line 438 of file MathFuncs.h.

◆ chi2Expected()

double RooFit::Detail::MathFuncs::chi2Expected ( double mu,
double weight )
inline

Chi-squared contribution of one bin with "expected" errors: \( \sigma^2 = \mu \).

Empty/no-prediction bins contribute zero; bins with non-positive \( \mu \) but non-empty data yield NaN (to let the minimizer recover).

Definition at line 409 of file MathFuncs.h.

◆ chi2Symmetric()

double RooFit::Detail::MathFuncs::chi2Symmetric ( double mu,
double weight,
double sigma2 )
inline

Chi-squared contribution of one bin with a user-supplied symmetric error squared (e.g.

SumW2 weights from the data).

Definition at line 423 of file MathFuncs.h.

◆ constraintSum()

template<typename DoubleArray >
double RooFit::Detail::MathFuncs::constraintSum ( DoubleArray comp,
unsigned int compSize )

Definition at line 180 of file MathFuncs.h.

◆ efficiency()

double RooFit::Detail::MathFuncs::efficiency ( double effFuncVal,
int catIndex,
int sigCatIndex )
inline

Definition at line 120 of file MathFuncs.h.

◆ effProd()

double RooFit::Detail::MathFuncs::effProd ( double eff,
double pdf )
inline

Definition at line 400 of file MathFuncs.h.

◆ exponentialIntegral()

double RooFit::Detail::MathFuncs::exponentialIntegral ( double xMin,
double xMax,
double constant )
inline

Definition at line 570 of file MathFuncs.h.

◆ fast_fma()

double RooFit::Detail::MathFuncs::fast_fma ( double x,
double y,
double z )
inlinenoexcept

use fast FMA if available, fall back to normal arithmetic if not

Definition at line 600 of file MathFuncs.h.

◆ flexibleInterp()

double RooFit::Detail::MathFuncs::flexibleInterp ( unsigned int code,
ParamsArray params,
unsigned int n,
DoubleArray low,
DoubleArray high,
double boundary,
double nominal,
int doCutoff )

Definition at line 369 of file MathFuncs.h.

◆ flexibleInterpSingle()

double RooFit::Detail::MathFuncs::flexibleInterpSingle ( unsigned int code,
double low,
double high,
double boundary,
double nominal,
double paramVal,
double res )
inline

Definition at line 254 of file MathFuncs.h.

◆ gaussian()

double RooFit::Detail::MathFuncs::gaussian ( double x,
double mean,
double sigma )
inline

Function to evaluate an un-normalized RooGaussian.

Definition at line 88 of file MathFuncs.h.

◆ gaussianIntegral()

double RooFit::Detail::MathFuncs::gaussianIntegral ( double xMin,
double xMax,
double mean,
double sigma )
inline

Function to calculate the integral of an un-normalized RooGaussian over x.

To calculate the integral over mean, just interchange the respective values of x and mean.

Parameters
xMinMinimum value of variable to integrate wrt.
xMaxMaximum value of of variable to integrate wrt.
meanMean.
sigmaSigma.
Returns
The integral of an un-normalized RooGaussian over the value in x.

Definition at line 519 of file MathFuncs.h.

◆ interpolate1d()

template<typename DoubleArray >
double RooFit::Detail::MathFuncs::interpolate1d ( double low,
double high,
double val,
unsigned int numBins,
DoubleArray vals )

Definition at line 219 of file MathFuncs.h.

◆ landau()

double RooFit::Detail::MathFuncs::landau ( double x,
double mu,
double sigma )
inline

Definition at line 383 of file MathFuncs.h.

◆ logNormal()

double RooFit::Detail::MathFuncs::logNormal ( double x,
double k,
double m0 )
inline

Definition at line 390 of file MathFuncs.h.

◆ logNormalIntegral()

double RooFit::Detail::MathFuncs::logNormalIntegral ( double xMin,
double xMax,
double m0,
double k )
inline

Definition at line 728 of file MathFuncs.h.

◆ logNormalIntegralStandard()

double RooFit::Detail::MathFuncs::logNormalIntegralStandard ( double xMin,
double xMax,
double mu,
double sigma )
inline

Definition at line 738 of file MathFuncs.h.

◆ logNormalStandard()

double RooFit::Detail::MathFuncs::logNormalStandard ( double x,
double sigma,
double mu )
inline

Definition at line 395 of file MathFuncs.h.

◆ multipdf()

template<typename DoubleArray >
double RooFit::Detail::MathFuncs::multipdf ( int idx,
DoubleArray pdfs )

Definition at line 169 of file MathFuncs.h.

◆ multiVarGaussian()

double RooFit::Detail::MathFuncs::multiVarGaussian ( int n,
XArray x,
MuArray mu,
CovArray covI )

Definition at line 841 of file MathFuncs.h.

◆ nll()

double RooFit::Detail::MathFuncs::nll ( double pdf,
double weight,
int binnedL,
int doBinOffset )
inline

Definition at line 452 of file MathFuncs.h.

◆ poisson()

double RooFit::Detail::MathFuncs::poisson ( double x,
double par )
inline

Definition at line 239 of file MathFuncs.h.

◆ poissonIntegral()

double RooFit::Detail::MathFuncs::poissonIntegral ( int code,
double mu,
double x,
double integrandMin,
double integrandMax,
unsigned int protectNegative )
inline

Definition at line 681 of file MathFuncs.h.

◆ polynomial()

template<bool pdfMode = false, typename DoubleArray >
double RooFit::Detail::MathFuncs::polynomial ( DoubleArray coeffs,
int nCoeffs,
int lowestOrder,
double x )

In pdfMode, a coefficient for the constant term of 1.0 is implied if lowestOrder > 0.

Definition at line 133 of file MathFuncs.h.

◆ polynomialIntegral()

template<bool pdfMode = false, typename DoubleArray >
double RooFit::Detail::MathFuncs::polynomialIntegral ( DoubleArray coeffs,
int nCoeffs,
int lowestOrder,
double xMin,
double xMax )

In pdfMode, a coefficient for the constant term of 1.0 is implied if lowestOrder > 0.

Definition at line 581 of file MathFuncs.h.

◆ product()

template<typename DoubleArray >
double RooFit::Detail::MathFuncs::product ( DoubleArray factors,
std::size_t nFactors )

Definition at line 96 of file MathFuncs.h.

◆ ratio()

double RooFit::Detail::MathFuncs::ratio ( double numerator,
double denominator )
inline

Definition at line 106 of file MathFuncs.h.

◆ rawBinNumber()

template<typename DoubleArray >
unsigned int RooFit::Detail::MathFuncs::rawBinNumber ( double x,
DoubleArray boundaries,
std::size_t nBoundaries )

Definition at line 199 of file MathFuncs.h.

◆ recursiveFraction()

template<typename DoubleArray >
double RooFit::Detail::MathFuncs::recursiveFraction ( DoubleArray a,
unsigned int n )

Definition at line 471 of file MathFuncs.h.

◆ stepFunctionIntegral()

template<typename DoubleArray >
double RooFit::Detail::MathFuncs::stepFunctionIntegral ( double xmin,
double xmax,
std::size_t nBins,
DoubleArray boundaries,
DoubleArray coefs )

Definition at line 858 of file MathFuncs.h.

◆ uniformBinNumber()

unsigned int RooFit::Detail::MathFuncs::uniformBinNumber ( double low,
double high,
double val,
unsigned int numBins,
double coef )
inline

Definition at line 192 of file MathFuncs.h.