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 | expm1OverX (double x) |
| (exp(x) - 1) / x with the removable singularity at x = 0 filled in. | |
| double | expm1OverXDerivative (double x) |
| Derivative of expm1OverX(). | |
| double | exponentialIntegral (double xMin, double xMax, double constant) |
| Integral of exp(constant * x) from xMin to xMax. | |
| double | exponentialIntegralDConstant (double xMin, double xMax, double constant) |
| Derivative of exponentialIntegral() with respect to the constant, i.e. | |
| 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) |
Definition at line 500 of file MathFuncs.h.
| 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.
| double RooFit::Detail::MathFuncs::bernsteinIntegral | ( | double | xlo, |
| double | xhi, | ||
| double | xmin, | ||
| double | xmax, | ||
| DoubleArray | coefs, | ||
| int | nCoefs ) |
Definition at line 861 of file MathFuncs.h.
|
inline |
Definition at line 111 of file MathFuncs.h.
|
inline |
Definition at line 552 of file MathFuncs.h.
| unsigned int RooFit::Detail::MathFuncs::binNumber | ( | double | x, |
| double | coef, | ||
| DoubleArray | boundaries, | ||
| unsigned int | nBoundaries, | ||
| int | nbins, | ||
| int | blo ) |
Definition at line 212 of file MathFuncs.h.
Calculates the binomial coefficient n over k.
Equivalent to TMath::Binomial, but inlined.
Definition at line 32 of file MathFuncs.h.
|
inline |
Definition at line 480 of file MathFuncs.h.
|
inline |
Definition at line 796 of file MathFuncs.h.
| double RooFit::Detail::MathFuncs::chebychev | ( | DoubleArray | coeffs, |
| unsigned int | nCoeffs, | ||
| double | x_in, | ||
| double | xMin, | ||
| double | xMax ) |
Definition at line 145 of file MathFuncs.h.
| double RooFit::Detail::MathFuncs::chebychevIntegral | ( | DoubleArray | coeffs, |
| unsigned int | nCoeffs, | ||
| double | xMin, | ||
| double | xMax, | ||
| double | xMinFull, | ||
| double | xMaxFull ) |
Definition at line 662 of file MathFuncs.h.
|
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 436 of file MathFuncs.h.
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 407 of file MathFuncs.h.
Chi-squared contribution of one bin with a user-supplied symmetric error squared (e.g.
SumW2 weights from the data).
Definition at line 421 of file MathFuncs.h.
| double RooFit::Detail::MathFuncs::constraintSum | ( | DoubleArray | comp, |
| unsigned int | compSize ) |
Definition at line 181 of file MathFuncs.h.
|
inline |
Definition at line 120 of file MathFuncs.h.
Definition at line 398 of file MathFuncs.h.
(exp(x) - 1) / x with the removable singularity at x = 0 filled in.
The derivative is expm1OverXDerivative(), also registered with clad at the end of this header: differentiating the branches would give zero at x = 0.
Definition at line 571 of file MathFuncs.h.
Derivative of expm1OverX().
The closed form (x * exp(x) - expm1(x)) / x^2 cancels for small x, so a Taylor expansion is used there. Both branches are accurate to about 1e-15 at the switching point.
Definition at line 579 of file MathFuncs.h.
|
inline |
Integral of exp(constant * x) from xMin to xMax.
The naive form (exp(constant * xMax) - exp(constant * xMin)) / constant cancels when constant * (xMax - xMin) is small. Factoring out the larger exponential and using std::expm1 for the rest is accurate for any constant and only overflows if the integral itself does. The derivative with respect to the constant is exponentialIntegralDConstant(), also registered with clad at the end of this header (https://github.com/root-project/root/issues/23724).
Definition at line 598 of file MathFuncs.h.
|
inline |
Derivative of exponentialIntegral() with respect to the constant, i.e.
the integral of x * exp(constant * x). With a the endpoint where constant * x is larger and d the signed distance to the other one, substituting x = a + s gives exp(constant * a) * d * (a * expm1OverX(w) + d * expm1OverXDerivative(w)) with w = constant * d <= 0, so the helpers only see bounded arguments.
Definition at line 616 of file MathFuncs.h.
use fast FMA if available, fall back to normal arithmetic if not
Definition at line 647 of file MathFuncs.h.
| 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 370 of file MathFuncs.h.
|
inline |
Definition at line 255 of file MathFuncs.h.
Function to evaluate an un-normalized RooGaussian.
Definition at line 88 of file MathFuncs.h.
|
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.
| xMin | Minimum value of variable to integrate wrt. |
| xMax | Maximum value of of variable to integrate wrt. |
| mean | Mean. |
| sigma | Sigma. |
Definition at line 517 of file MathFuncs.h.
| double RooFit::Detail::MathFuncs::interpolate1d | ( | double | low, |
| double | high, | ||
| double | val, | ||
| unsigned int | numBins, | ||
| DoubleArray | vals ) |
Definition at line 220 of file MathFuncs.h.
Definition at line 381 of file MathFuncs.h.
Definition at line 388 of file MathFuncs.h.
|
inline |
Definition at line 775 of file MathFuncs.h.
|
inline |
Definition at line 785 of file MathFuncs.h.
Definition at line 393 of file MathFuncs.h.
| double RooFit::Detail::MathFuncs::multipdf | ( | int | idx, |
| DoubleArray | pdfs ) |
Definition at line 170 of file MathFuncs.h.
| double RooFit::Detail::MathFuncs::multiVarGaussian | ( | int | n, |
| XArray | x, | ||
| MuArray | mu, | ||
| CovArray | covI ) |
Definition at line 888 of file MathFuncs.h.
|
inline |
Definition at line 450 of file MathFuncs.h.
Definition at line 240 of file MathFuncs.h.
|
inline |
Definition at line 728 of file MathFuncs.h.
| 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 134 of file MathFuncs.h.
| 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 628 of file MathFuncs.h.
| double RooFit::Detail::MathFuncs::product | ( | DoubleArray | factors, |
| std::size_t | nFactors ) |
Definition at line 96 of file MathFuncs.h.
Definition at line 106 of file MathFuncs.h.
| unsigned int RooFit::Detail::MathFuncs::rawBinNumber | ( | double | x, |
| DoubleArray | boundaries, | ||
| std::size_t | nBoundaries ) |
Definition at line 200 of file MathFuncs.h.
| double RooFit::Detail::MathFuncs::recursiveFraction | ( | DoubleArray | a, |
| unsigned int | n ) |
Definition at line 469 of file MathFuncs.h.
| double RooFit::Detail::MathFuncs::stepFunctionIntegral | ( | double | xmin, |
| double | xmax, | ||
| std::size_t | nBins, | ||
| DoubleArray | boundaries, | ||
| DoubleArray | coefs ) |
Definition at line 905 of file MathFuncs.h.